Jump to content
IGNORED

FPGA Based Videogame System


kevtris
 Share

Interest in an FPGA Videogame System  

672 members have voted

  1. 1. I would pay....

  2. 2. I Would Like Support for...

  3. 3. Games Should Run From...

    • SD Card / USB Memory Sticks
    • Original Cartridges
    • Hopes and Dreams
  4. 4. The Video Inteface Should be...



Recommended Posts

It IS possible to generate video on i.e. the 2600 the exact same way a real system does it, but I have not done this. I might go back and add it, but right now I have been trying hard to get all my cores converted and playable and debugged first so people can play them.

It's awesome that you're even considering adding stuff like this. Of course, it is not a priority, but still super-awesome for the sake of completeness.

Link to comment
Share on other sites

Sunday Project Update:

 

I have bought a bunch of connectors, and next week I will start the process of designing 6 or 8 cartridge adapters for the system. The list of cart adapters I bought connectors for:

 

* SMS

* Intellivision

* Coleco

* Atari 2600

* Atari 7800

* Odyssey ^2

* Supervision

* Gameboy (salvage units)

* Game Gear (salvage units)

 

Also, I have bought parts to make PS2 keyboard adapters that will let you plug a ps2 keyboard into the fami expansion port.

 

Each adapter will be made the same way- a PCB and 4 pieces of laser cut acrylic. I don't know if I will sell these, I might just release the gerber files and let people make the boards through oshpark or similar. I don't anticipate demand will be super high, but you never know. If there's a market for them, I can provide them for sale.

 

For Atari 2600/7800, it will be separate, because the custom connectors are unavailable. I can use 24 pin and 36 pin connectors, however. The 7800 carts fit perfectly into a 36 pin so that is the method I am going for. Ideally it'd be a combined unit but that isn't possible. I am going to have tabs off the PCB that will be used to open the shutters on the carts. This looks like it will work well. We'll see.

 

The acrylic will have a "front" and a "Back", to make it cart shaped, and then two pieces in the top to guide the cartridges into the sockets. It will be held together with screws and standoffs.

  • Like 3
Link to comment
Share on other sites

I think it's possible the FDS stick doesn't like my speed compensation for HDMI, so it's corrupting the data as it's loaded. I want someone to try the FDS stick while playing in RGB mode to see if that fixes it. If so, then the method of attack will be to fix it on the FDS stick itself. Interestingly, normal FDS games with a regular disk drive work fine- I tested 3 different ones and 20 different games. So whatever is wrong is probably fixable inside the FDS stick. I think it's open source even. I don't have time to work on that though, and it will be moot when I add FDS loading on the system itself.

 

re: modulation counter, I fixed that so my FDS audio should be good to go, other than the total lack of lowpassing which I can't add due to resource usage in the FPGA right now. In fact I was using the bio miracle NSF compared against youtube videos of a real FDS playing the game to make sure I got it right. Supposedly this is one of the most difficult things to get right.

rezb1t posted just above your post that his FDSStick worked fine :

 

I have an FDSStick + RAM Adapter and have been using it with my NT mini with no issues in HDMI and analog mode. However, there is a competing stick called FDSemu that has a weird issue. It works the first time you load a game perfectly, but if you power off the NT mini and power it back on, the menu is corrupted until the stick is unplugged for at least 10-15 minutes.

I would think that this issue would have also popped up with the Hi-Def NES Mod or the original Analogue Nt HDMI, but Coury and Marc are the first to identify an issue with the FDSStick.

 

The Bio Miracle music is among the final frontiers of FDS audio emulation as far as FPGAs go. Neither the NES PowerPak nor the EverDrive N8 get it right.

Link to comment
Share on other sites

 

Any Console or Computer that uses a FM Synthesis (eg Yamaha YM3812 found in the Adlib, SoundBlaster) actually produces frequencies that can't be captured with 48Khz. The SN76489 (Sega Master System, Coleco, PcJr/Tandy 1000) can generate frequencies that are well outside human hearing (eg 111Khz.) So yeah, audio is a bit more of a crapshoot to get perfect because the original audio generation wasn't perfect.

One issue with ultrasonic artifacts is it can mess with certain sound capture devices and create audible artifacts based on the interference pattern between the sample rate and actual ultrasonic harmonics. So it is a very good idea to provide a low pass filter on the circuitry. This also makes accurate emulation of sound a PITA because there is no such thing as a "digital" lowpass filter. It is necessary to take arbitrarily many samples across the sample period, then average them down so they scale nicely into 48khz. For instance, emulation of the waveform at 192000kHz and downmixing the samples down 4x using average would create a cleaner 48kHz signal with much less artifacts compared to doing a "read and hold" operation at 48000 samples without the benefit of a low-pass.

 

If the signal's ultrasonic content is wildly fluctuating between adjacent samples at 48000 Hertz, many of these abberations will produce audible artifacts below 16000Hz. For instance, suppose a strong tone is produced with a frequency of 52000Hz. Taking realtime instantaneous samples at a rate of 48000Hz would produce an interferance pattern with a frequency of 4000Hz. This would be entirely audible as a high-pitched shrill tone. In fact this phenomenon can be heard oftentimes when dialing in the AM band on a radio. Adjacent Channels are spaced 10kHz apart and these interfere with each other producing a very noticable 10Khz pilot tone.

 

Interference patterns can easily be avoided in real world applications by simply inserting a low pass RC filter to the analog signal, typically 20kHz for HiFi audio gear, prior to performing an ADC conversion. But analog signals are continuously variable, and in theory have unlimited bandwidth but this is in practice limited by stray capacitance, resistance, inductance, and interference from outside sources picked up by the conductors that carry the signal. Digital signals are limited by bandwidth, thus emulation, and even FPGA recreations of said signals have limitations. Given the tricky nature of some old analog hardware, an exact recreation of the CPU, GPU, and other components in FPGA, might still benefit by having real filter circuitry applied to an analog signal prior to being converted back to digital. If the traces are kept short and isolated, interference and noise could be minimized.

 

Otherwise, I'm not entirely sure if bandpass filters could be adequately applied from within the FPGA. My understanding is they are mostly digital devices, even if they offer limited support for analog signals on the outputs. I imagine the harmonic oscillations created by analog sound circuits present on very old arcade hardware, and perhaps in some consoles, would be difficult to emulate accurately even on FPGA without resorting to wave samples, as earlier builds of MAME used.

Link to comment
Share on other sites

rezb1t posted just above your post that his FDSStick worked fine :

 

 

I would think that this issue would have also popped up with the Hi-Def NES Mod or the original Analogue Nt HDMI, but Coury and Marc are the first to identify an issue with the FDSStick.

 

The Bio Miracle music is among the final frontiers of FDS audio emulation as far as FPGAs go. Neither the NES PowerPak nor the EverDrive N8 get it right.

Yep! I just tested it again with Zelda 2 to make sure and I played it for 40 minutes with no issues using the FDSStick and the latest firmware for it. I've also played the original Legend of Zelda for hours without any issues and Bio Miracle Bokutte Upa. This works on both my Hi-Def NES modded AV Famicom and the NT Mini.

 

Also the FDSEmu which has issues, does work in the Hi-Def AV Famicom without any issues. Not sure what's going on there, but I think the FDSStick is a lot more common anyway (from what I can tell, the fdsemu is no longer sold)

Link to comment
Share on other sites

Yep! I just tested it again with Zelda 2 to make sure and I played it for 40 minutes with no issues using the FDSStick and the latest firmware for it. I've also played the original Legend of Zelda for hours without any issues and Bio Miracle Bokutte Upa. This works on both my Hi-Def NES modded AV Famicom and the NT Mini.

 

Also the FDSEmu which has issues, does work in the Hi-Def AV Famicom without any issues. Not sure what's going on there, but I think the FDSStick is a lot more common anyway (from what I can tell, the fdsemu is no longer sold)

Have you tested the FDSEmu with the analog output of the Nt mini (timing is different)?

Link to comment
Share on other sites

I think most of us are just one house/apartment/flood fire aware from having no collection. My personal feelings on piracy tends to be pushed aside when it comes to preservation of software I've purchased (sometimes multiple times.) Preservation takes precedence, so if I can save the games from being lost permanently by using something like the Z3K or NT Mini in place of using the original console or computer, the original console gets to live longer (unless they're timebombs like the SNES, then nothing you can do can save them.)

 

For example, Larry Bundy JR, 3 of the first 4 videos on his youtube channel are detailing how his video game collection was destroyed by the storage container's roof leaking

My condolences to this guy. And all that caused by a leaky roof, not even a house flood event. :_(

 

It's not likely the Z3K will be able to use an external hard drive or sd card over 64GB because FAT32 maxes out at 64GB. In order to use more space you have to use a more complicated file system, and you will not be able to read in anything else. For example my 1TB external plugged into the WiiU, the WiiU had to format the drive first ( http://en-americas-support.nintendo.com/app/answers/detail/a_id/1359Nintendo says 2TB max) If I want to backup the external drive, I'd still need the same WiiU, so if that WiiU dies, and no more WiiU's are available, those games are essentially lost. However there is another issue here, and that's you have to use GPT partition tables to access more than 2TB.

FAT32 is NOT limited to 32 or 64 Gb. This is a misnomer. FAT32 supports up to 2Tb but Windows refuse to format anything over 32Gb with the FAT32 file system because Microsoft wants people to use their proprietary NTFS system. You can however force format flash cards larger than 32Gb via the command line, however if you've got multiple drives hooked up to your PC, this can be risky. The SD foundation formatter uses ExFAT on SDXC cards. I'm not sure if there's an option to force format FAT32 to big cards using the SD Foundation formatter. Otherwise you can use another third party format tool or Linux/Mac. While ExFAT is certainly possible, implementation would be complex and there may be licensing issues with supporting it.

 

For ROMs and any ISO disc image files up through Dreamcast and Game Cube, the 4Gb filesize limit is a non-issue because ROMs are generally fairly small. I would recommend avoiding excessive sector sizes however for ROM storage, as bulk copying of tiny files will be slower and occupy more space on the drive. 32Kb is a good sector size, as most post crash game ROMs are bigger than this anyway.

Link to comment
Share on other sites

My condolences to this guy. And all that caused by a leaky roof, not even a house flood event. icon_tears.gif

 

FAT32 is NOT limited to 32 or 64 Gb. This is a misnomer. FAT32 supports up to 2Tb but Windows refuse to format anything over 32Gb with the FAT32 file system because Microsoft wants people to use their proprietary NTFS system. You can however force format flash cards larger than 32Gb via the command line, however if you've got multiple drives hooked up to your PC, this can be risky. The SD foundation formatter uses ExFAT on SDXC cards. I'm not sure if there's an option to force format FAT32 to big cards using the SD Foundation formatter. Otherwise you can use another third party format tool or Linux/Mac. While ExFAT is certainly possible, implementation would be complex and there may be licensing issues with supporting it.

 

For ROMs and any ISO disc image files up through Dreamcast and Game Cube, the 4Gb filesize limit is a non-issue because ROMs are generally fairly small. I would recommend avoiding excessive sector sizes however for ROM storage, as bulk copying of tiny files will be slower and occupy more space on the drive. 32Kb is a good sector size, as most post crash game ROMs are bigger than this anyway.

So if formatted with a special program or via linux or something we could get up to 2tb storage with the nt/z3k? Basically it only matters that the storage is in this specific format right?

Link to comment
Share on other sites

One issue with ultrasonic artifacts is it can mess with certain sound capture devices and create audible artifacts based on the interference pattern between the sample rate and actual ultrasonic harmonics. So it is a very good idea to provide a low pass filter on the circuitry. This also makes accurate emulation of sound a PITA because there is no such thing as a "digital" lowpass filter. It is necessary to take arbitrarily many samples across the sample period, then average them down so they scale nicely into 48khz. For instance, emulation of the waveform at 192000kHz and downmixing the samples down 4x using average would create a cleaner 48kHz signal with much less artifacts compared to doing a "read and hold" operation at 48000 samples without the benefit of a low-pass.

Otherwise, I'm not entirely sure if bandpass filters could be adequately applied from within the FPGA. My understanding is they are mostly digital devices, even if they offer limited support for analog signals on the outputs. I imagine the harmonic oscillations created by analog sound circuits present on very old arcade hardware, and perhaps in some consoles, would be difficult to emulate accurately even on FPGA without resorting to wave samples, as earlier builds of MAME used.

 

Yup. Resonance, harmonics, beating. It all adds up.

 

On another note. Despite tv audio coming from a vintage speaker in a vintage tv set powered by vintage discrete parts - it's rather very good. Almost tube-like warmth if you compare it to modern digital. Or so I've always been told. I never bitched about early tv audio.

 

I even like the background hum and hiss that underlies most 8-bit console audio. And if you really amplify it you can hear the logic gates hammering away. That's cool.

 

---

 

I wonder how you'd play samples on FPGA? How they'd be integrated into core operations? How they'd be supported and managed? How much more infrastructure would need to be build?

 

In MAME it's rather trivial to say, "Play Sample #1". But also remember MAME does it on a game-by-game basis and has the OS of a PC to manage storage and playback.

  • Like 1
Link to comment
Share on other sites

Sunday Project Update:

 

I have bought a bunch of connectors, and next week I will start the process of designing 6 or 8 cartridge adapters for the system. The list of cart adapters I bought connectors for:

 

* SMS

* Intellivision

* Coleco

* Atari 2600

* Atari 7800

* Odyssey ^2

* Supervision

* Gameboy (salvage units)

* Game Gear (salvage units)

 

Also, I have bought parts to make PS2 keyboard adapters that will let you plug a ps2 keyboard into the fami expansion port.

 

Each adapter will be made the same way- a PCB and 4 pieces of laser cut acrylic. I don't know if I will sell these, I might just release the gerber files and let people make the boards through oshpark or similar. I don't anticipate demand will be super high, but you never know. If there's a market for them, I can provide them for sale.

 

For Atari 2600/7800, it will be separate, because the custom connectors are unavailable. I can use 24 pin and 36 pin connectors, however. The 7800 carts fit perfectly into a 36 pin so that is the method I am going for. Ideally it'd be a combined unit but that isn't possible. I am going to have tabs off the PCB that will be used to open the shutters on the carts. This looks like it will work well. We'll see.

 

The acrylic will have a "front" and a "Back", to make it cart shaped, and then two pieces in the top to guide the cartridges into the sockets. It will be held together with screws and standoffs.

This is awesome. I would definitely recommend producing these yourself, or designating someone else to handle the sales of the PCBs and Acrylic. Most people including myself don't have the software to view Gerber files, and the problem with simply providing the files is these types of projects (both the PCBs and laser cut acrylics) are much cheaper to order in bulk quantities rather than single quantity. I'm assuming these cart adapters won't have a lot of components on them, just traces and solder points for the connector.

 

Cool idea working around the custom 7800 connector by using generic 36-pin card ends. A 2600 cart definitely could not be inserted reliably into one of these. In a lot of ways, the design of the 7800 cart slot and the SNES cart slot is similar with the keyed ends. One possibility for a 2-in-1 2600/7800 reader would be to add the 36 pin connector at a right angle (through hole) and have the 2600 connector inline with the PCB. That way you can use the right angled 36-pin connector with the 7800 carts (which lack flaps and do not need keys to open) and the 24-pin connector for the 2600 carts with the PCB edge for the keys. There would be a window in the acrylic to insert right angled 7800 carts. This would IMO be cheaper than buying two adapters for 7800 fans. A bit inelegant perhaps, but doable.

 

I am curious, now that you are producing cart adapters for various systems to piggyback the NT Mini, are you making plans to reuse the existing connectors with the eventual Zimba-3000, or will those be all new? NT Mini is looking more tempting every day, but it would be nice if I finally got one and the connectors for it, if I could keep my connector investment for the Zimba.

Link to comment
Share on other sites

One issue with ultrasonic artifacts is it can mess with certain sound capture devices and create audible artifacts based on the interference pattern between the sample rate and actual ultrasonic harmonics. So it is a very good idea to provide a low pass filter on the circuitry. This also makes accurate emulation of sound a PITA because there is no such thing as a "digital" lowpass filter. It is necessary to take arbitrarily many samples across the sample period, then average them down so they scale nicely into 48khz. For instance, emulation of the waveform at 192000kHz and downmixing the samples down 4x using average would create a cleaner 48kHz signal with much less artifacts compared to doing a "read and hold" operation at 48000 samples without the benefit of a low-pass.

 

If the signal's ultrasonic content is wildly fluctuating between adjacent samples at 48000 Hertz, many of these abberations will produce audible artifacts below 16000Hz. For instance, suppose a strong tone is produced with a frequency of 52000Hz. Taking realtime instantaneous samples at a rate of 48000Hz would produce an interferance pattern with a frequency of 4000Hz. This would be entirely audible as a high-pitched shrill tone. In fact this phenomenon can be heard oftentimes when dialing in the AM band on a radio. Adjacent Channels are spaced 10kHz apart and these interfere with each other producing a very noticable 10Khz pilot tone.

 

Interference patterns can easily be avoided in real world applications by simply inserting a low pass RC filter to the analog signal, typically 20kHz for HiFi audio gear, prior to performing an ADC conversion. But analog signals are continuously variable, and in theory have unlimited bandwidth but this is in practice limited by stray capacitance, resistance, inductance, and interference from outside sources picked up by the conductors that carry the signal. Digital signals are limited by bandwidth, thus emulation, and even FPGA recreations of said signals have limitations. Given the tricky nature of some old analog hardware, an exact recreation of the CPU, GPU, and other components in FPGA, might still benefit by having real filter circuitry applied to an analog signal prior to being converted back to digital. If the traces are kept short and isolated, interference and noise could be minimized.

 

Otherwise, I'm not entirely sure if bandpass filters could be adequately applied from within the FPGA. My understanding is they are mostly digital devices, even if they offer limited support for analog signals on the outputs. I imagine the harmonic oscillations created by analog sound circuits present on very old arcade hardware, and perhaps in some consoles, would be difficult to emulate accurately even on FPGA without resorting to wave samples, as earlier builds of MAME used.

 

This is untrue. It's possible to perform a digital lowpass filtering. In fact, I do this. I have a very high quality digital domain resampler / lowpassing setup which cleans up all the ultrasonics and aliasing. There's a lot of hard to resample things which IMO the nt mini excels at, such as the looped noise on the NES and GB, and I didn't know it at the time, but ET on 2600's ship is very hard to reproduce accurately. Apparently the two channels intermodulate somewhat and this results in things sounding funny without good lowpassing and resampling.

  • Like 1
Link to comment
Share on other sites

This is awesome. I would definitely recommend producing these yourself, or designating someone else to handle the sales of the PCBs and Acrylic. Most people including myself don't have the software to view Gerber files, and the problem with simply providing the files is these types of projects (both the PCBs and laser cut acrylics) are much cheaper to order in bulk quantities rather than single quantity. I'm assuming these cart adapters won't have a lot of components on them, just traces and solder points for the connector.

 

Cool idea working around the custom 7800 connector by using generic 36-pin card ends. A 2600 cart definitely could not be inserted reliably into one of these. In a lot of ways, the design of the 7800 cart slot and the SNES cart slot is similar with the keyed ends. One possibility for a 2-in-1 2600/7800 reader would be to add the 36 pin connector at a right angle (through hole) and have the 2600 connector inline with the PCB. That way you can use the right angled 36-pin connector with the 7800 carts (which lack flaps and do not need keys to open) and the 24-pin connector for the 2600 carts with the PCB edge for the keys. There would be a window in the acrylic to insert right angled 7800 carts. This would IMO be cheaper than buying two adapters for 7800 fans. A bit inelegant perhaps, but doable.

 

I am curious, now that you are producing cart adapters for various systems to piggyback the NT Mini, are you making plans to reuse the existing connectors with the eventual Zimba-3000, or will those be all new? NT Mini is looking more tempting every day, but it would be nice if I finally got one and the connectors for it, if I could keep my connector investment for the Zimba.

 

Probably not. The designs for these are so simple and easy/cheap to make that redoing it for a new form factor makes sense. I can whip out half a dozen of these in a day or two, so it doesn't really make sense. I mean, I guess I could make it the same, but probably won't. It's going to be a PCB, acrylic, and a connector. The only one that will be somewhat more involved will be the SMS one since I want to add the 3D glasses port to it. So there will be a dozen or so components for it. The more interesting part of that project will be adding a delay setup so you can use the 3D glasses on a flat screen, by adjusting an offset so you can synch it up perfectly.

  • Like 2
Link to comment
Share on other sites

@everyone

 

How do you add pallets? I see custom pallet option, but I'm unclear on how it works.

 

I just read this article and I want to experiment now,

 

https://nerdlypleasures.blogspot.ca/2016/10/video-potpourri-ii.html

 

Have you seen this?

https://support.analogue.co/hc/en-us/articles/115001844707-Loading-NSF-Palette-and-LED-Pattern-files

Link to comment
Share on other sites

 

Oh, and lots of well deserved encouragement for a Patreon page.

Seriously this. Kevtris is one of very few people online I would blindly contribute to a Patreon account if he set one up. I sub AtariAge onsite and now NintendoAge through Patreon, but it's really peanuts for using the forums.

Link to comment
Share on other sites

That's right. It seems this thread is growing and moving in multiple directions. While the retroblox and lythium threads are rather stagnant.

Those are both YAEBs (yet another emulation box) :P

 

Retron5: Man in gorilla suit.

 

Zimba3000: An actual gorilla. Also a giraffe. And a Zebra. And a Rhino. And a Lion. It's the console equivalent of a damn shape shiftier, can morph into any animal you want! :grin:

  • Like 2
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...