SukkoPera / MegaDrivePlusPlus

Universal Region mod, 50/60 Hz switch and In-Game-Reset (IGR) for Sega Mega Drive (AKA Genesis)
GNU General Public License v3.0
121 stars 29 forks source link

Region is set too slowly at power-up #5

Closed SukkoPera closed 2 years ago

SukkoPera commented 5 years ago

Some games do not start since they find the wrong region value (e.g.: Virtua Racing).

See: https://assemblergames.com/threads/megadrive-new-switchless-region-igr-mod.61273/page-10#post-934050

hadess commented 5 years ago

Could this make a difference? https://github.com/Optiboot/optiboot/

That'd mean nothing to change in MegaDrive++ just a hardware/bootloader change on the target device.

SukkoPera commented 5 years ago

Actually I already use Optiboot on all my Nanos, and it should be the default bootloader on current boards (i.e. those bought in the last year or so), so I'm not sure that makes any difference.

I think that changing some fuse values might fix the issue, but I need to test.

SukkoPera commented 4 years ago

I have been taking some measurements with a logic Analyzer:

The Uno bootloader starts executing MD++ code WAAAAY sooner than the Nano bootloader (which is deprecated and should not be pre-flashed any longer on original Nanos, who knows about clones), so it is definitely recommended.

I still cannot say if 74 ms is fast enough to bypass the initial region check by most games. It surely works well on my Virtua Racing JAP, but even the slower Nano version worked fine. I think another game was mentioned in the original forum thread (which is now inaccessible), Ecco The Dolphin, but I cannot remember what region it was that was causing problems and I don't really wanna buy them all.

I have also investigated using direct port manipulation, but sparing a few _micro_seconds when it's taking us _milli_seconds at best won't help significatively.

It's not clear to me why the time from the lines settling to the reset pulse also changes drastically with the two different bootloaders.

Also, the LA revealed some weird stuff going on at some power-ups. I had captured one but then hit the wrong button :(.

One last thing: some 6-button pads yield weird results at power-up, which might trigger mode-switching combos. Adding debouncing might help.

SukkoPera commented 4 years ago

The 0.45s from lines settling to the reset pulse might be due to a spurious capture or something weird. This other capture took the usual 100 ms: image

SukkoPera commented 4 years ago

Just noticed we are actually forcing the 100 ms delay before the initial reset, which sounds totally useless now, so it could be removed.

mylogon341 commented 4 years ago

Hey. I've sort of come across this. I performed a mod for a client and they've reported issues with Sonic 3 not booting because of region restrictions. The weird thing is, the console is a PAL board (if I remember correctly) but the pal cart is coming up with with an error on boot saying that it will not work on NTSC consoles. Something like that. Either way - is this the same issue as this? If not, it's looking like I might have to make this a return job to repair the issue (if I can). Thanks

SukkoPera commented 4 years ago

I really can't say, I think no one ever reported any issues with Sonic 3. What bootloader does that board use?

SukkoPera commented 2 years ago

I have just got an email from the guy who was experiencing the issue on the AG forum thread (Thanks Chris!) saying:

A few days ago I was going through my pile of unfinished projects and came across the MPP. I decided to look it up and saw there was some more development done, and that a new bootloader was available for the Nano.

After flashing the bootloader and the latest master branch of MPP, it works! Thank you so much for developing this.

I can also confirm that it allows my JP Mega Drive Model 1 to work with a U.S. Sega CD Model 2.

He also reports:

I tried U.S. Sonic 3 and it seems to detect the region settings correctly for me (won't start in JP mode, starts fine in U.S.)

So after 3.5 years, I guess we can finally close this issue.