irixxxx / picodrive

Fast MegaDrive/MegaCD/32X emulator
Other
55 stars 25 forks source link

Accuracy issues against old homebrew public domain ROMS #141

Closed freq-mod closed 2 months ago

freq-mod commented 2 months ago

Recently I have obtained a real PAL Sega Mega Drive model 1, revision VA6 and Mega Everdrive v3. I have them remember about old (pre Pier Solar- public domain ROMs) that circulate online. I have checked them on PicoDrive, these worked perfectly. Checked these on BlastEm, a "better" emulator - half of these didn't work. Checked on a real hardware - just a couple of them didn't work. That's where the issue begins - there are ROMs that start on the emulator, but don't on a real hardware.

PD.zip - zip archive contains the problematic ROMs. All of them exhibit the same problem - black screen on the real hardware. One exception - YM2612 editor "works" in PicoDrive, on real console it displays the image but crashes instantly, making editing YM2612 registers impossible. All these ROMs behave the same as real hw on BlastEm, didn't test other emulators, although they should work as on PicoDrive (i.e. incorrectly) on Kega or Gens.

irixxxx commented 2 months ago

Not that I've checked it yet, but could this be Picodrive ignoring TMSS?

freq-mod commented 2 months ago

Heavily doubt it - other public domain ROMs work as intended. I recall, loading these particular ROMs in BlastEm would have them crashing the program trying to access ivalid/out of bounds memory address or something close to that.

EDIT: indeed, blastem crashes with machine freeze due to write to address DFFFFE terminal message

irixxxx commented 2 months ago

blastem doesn't recognize the smd files in your zip and loads them as bin, which crashes right away. The reason is blastem mandates the second byte in the file to 0x03 and the eight and ninth byte to be 0xaabb to be recognized as smd. If you convert them to bin they work fine in blastem as well. BTW they also work in GX+.

freq-mod commented 2 months ago

I can try to rename these to .bin and load them on real hardware. If they work, case closed. If they don't, time to investicate further.

freq-mod commented 2 months ago

Ok, after converting those to .bin they work fine on real hardware! Weird that picodrive allows them even in SMD format, but still, these work.

irixxxx commented 2 months ago

PicoDrive doesn't look at the header information. Instead it checks if the extra 512 bytes for the header are there, and if the undecoded ROM contains SEGA in the right places. Blastem is looking at the header information, and if that's not correct it doesn't go any further. I have a original Super Magic Drive (which I indeed used until recently to execute checks for picodrive on the MD). I'll check how this behaves with those wrongly encoded files.