242 points · by retro_guy · 3y ago · 90 comments
I'm curious if there are any specific shortcomings with modern Genesis/Megadrive emulation that spurred this, or if this is just a pure "for the love of the pursuit" effort.
I'm not sure of the exact state of the art, but I know that getting sound emulation perfectly right for the Genesis/MegaDrive has been a tricky issue over the years, even for Sega themselves. Though, my (loose) understanding is that the issue is moreso with getting the analog bits sounding right rather than the digital bits.
https://junkerhq.net/MDFourier/
Genesis sound emulation is indeed tricky because there were multiple variants of the sound hardware in the Genesis over the years. Some emulators model multiple variants.
https://www.reddit.com/r/emulation/comments/104tgvs/sega_gen...
For most people, myself included, this doesn't matter at all.
For people looking for an extremely "pure" original experience, this is the closest you can get to original hardware - which is getting both more expensive and lower quality with time.
For the competitive speedrunning scene, incorrect emulation speed is a non-starter in some categories, and dropped inputs are a huge problem when they happen.
IIRC the cartridges were effectively just PROMs (I could be wrong and maybe they were fabbed / silicon and didn’t get programmed) which held the application code.
I would definitely be curious to know why - the emulation of Genesis is notably behind most other video game consoles but I always assumed this was because of less interest and not because of any unique technical challenges.
I guess it sort of depends on what you mean, but I don't think there are dramatic differences in emulation quality between the Genesis and other consoles of its generation. Admittedly, I am rather biased since I'm the author of one of those, but I think outside the add-ons Genesis emulation is in pretty good shape overall. Both Ares and BlastEm acquit themselves well on the most demanding demoscene prod[0] for the system and even Genesis Plus GX is fairly accurate for a more performance-focused emulator.
Now none of those are perfect and I think it would probably be fair to say that they are less-perfect than Higan is/was for the SNES (though it wasn't perfect either), but I don't think the delta is huge.
Now once you add the Sega CD and 32X things are definitely worse, but those combined systems are considerably more complicated to emulate than any of the base consoles of that era while also being much less popular.
Not sure where you are getting this from but I think that's far from true.
For years we had Kega Fusion which was able to run most (if not all) commercial games without any issues and was the pioneer of accurate Genesis sound emulation.
Then we have had emulators like Genesis Plus GX with better accuracy and close to 100% compatibility with all licensed and unlicensed games for quite a few years now.
A little more recently, we have Blastem then Ares emulators with devs more focused on improving accuracy for those interested in getting all test ROMs passing in their emus. Sure it isn't the NES emulator scene where you have have like hundreds of emulators to choose from but how many of them are accurate/compatible enough? Comparing to other systems from same time area (SNES, Neo Geo, PC Engine, etc), I would say Sega 8-bit and 16-bit fans have pretty much similar choices than others.
What is sure is that I don't know much system with cycle-accurate C and Verilog emulators based on chips die analysis. That alone shows how much Sega hardware has a dedicated base of talented people still reverse-engineering and documenting it after all these years, even when existing emulators are already good enough to play the majority of games without noticeable issues.
(From memory: they sourced a variant of the sound chip with digital output, characterized the DAC that way, then built a test suite to compare emulator behavior with a real chip)
hit a wall
Is there somewhere you'd recommend where I can read about the unsolved challenges of Genesis/Megadrive emulation?In other words, they are not emulating the 68K, VDP, and other supporting chips on a gate-for-gate basis. They are emulating them at a higher level.
With the decapping of the Genesis' hardware, it should now be possible to truly emulate them at a 1:1 hardware level. This theoretically can lead to far more accurate emulation. I believe this is a lot more FPGA resource-intensive and may exceed what the existing MISTer/Analogue cores can handle, though I'm way out of my depth here.
the genesis "specific" ym* cores look a lot more "authored"; commit history shows more activity around those files too
but thats just a guess... something that can generate verilog from chip images would be pretty cool...
Do we have tools for exposing specific layers instead of 2D images? It would, perhaps, be interesting to go with diagonal slices as we grind the chip and, aided by exaggerated vertical features, capture the full depth on a single pass.
Tho I’m glad this project exists that’s… a huge chunk of change for a 30 yr old console
but yes, it is fairly excessive if you just want to play games, emulation is absolutely "good enough" and even indistinguishable for most. We do it for the love of the hobby ;)
Someone elsewhere pointed out that PS1 disks (or any disk based system for that matter) suffers from disk rot, so likewise, what is now considered piracy should also be considered archival work since the original disks will stop working.
something something entropy, something something the inexorable passage of time.
https://mister-devel.github.io/MkDocs_MiSTer/#what-is-mister...
The core of the MiSTer looks pretty beefy.
https://www.terasic.com.tw/cgi-bin/page/archive.pl?Language=...
In this case, the project isn't very documented but it looks like fairly generic Verilog without a lot of vendor specific extensions. So, what you need is a Verilog toolchain which can synthesize the source code into a netlist, and then into a bitstream, and the right set of extra code to target an actual physical piece of hardware.
Right now, it looks like the only board support that's checked into the repository is for the Icarus Verilog simulation environment: https://github.com/nukeykt/Nuked-MD-FPGA/tree/main/icarus .
But, the overall setup looks pretty simple and generic, so it should (hopefully) be possible to synthesize to your board of choice by reimplementing run.v and memstubs.v towards an actual hardware configuration.
Basically what you'd want to do to start trying to run this on real hardware is to build a hosting environment which wired the inputs and outputs from `md_board.v` into the real hardware provided in your environment, possibly by integrating other soft-IP (ie - you could attach a cartridge emulator of some sort to the cartridge lines, your choice of video encoder to the video output, and so on).
A fully open-source FPGA/CPLD and toolchain would be very disruptive. How hard would it be?
It could be manufactured by any number of smaller foundries with older processes. No need for a 3nm node for this.
By contrast, this is the first effort (well second if you consider the nukeykt's initial C version) to try and recreate the entire system from analysis of silicon die photos. If you just want to enjoy some old games the difference is probably not particularly important, but Nuked-MD-FPGA is already passing some tests that the Mega SG does not. The screenshot in the lower right corner of the "Progress" section is a timing torture test ROM that the Mega SG fails at least 40 subtests for (I say at least because the results I've seen for Mega SG are from an earlier version of the ROM with fewer subtests).
Have you ever been in contact with them? I can imagine your and their skillsets would be very compatible with each other.
Thanks for explaining the screen grab from the torture test ROM; this is brilliant!
Just to be clear, Nuked-MD-FPGA is not my project. I'm the author of a traditional software emulator who happens to have been following development of this with keen interest. I do agree that it would be interesting to see the source of the Mega Sg though.
or included in that project(?) providing MiSTer for any FPGA?