Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Latest Cave Story MD port builds crash Genesis Plus GX. #333

Closed
vaguerant opened this issue Aug 31, 2020 · 3 comments
Closed

Latest Cave Story MD port builds crash Genesis Plus GX. #333

vaguerant opened this issue Aug 31, 2020 · 3 comments

Comments

@vaguerant
Copy link

The compatibility list for the homebrew port of Cave Story has a note for Genesis Plus GX that "Outdated versions will crash at start". I'm not sure whether this means outdated genplus-gx or outdated Cave Story MD, but either way, I seem to be encountering this issue using the latest public builds of both.

On all platforms, the game crashes before it is able to display the title screen. On Wii (native port, not libretro), the crash seems limited to the game itself; emulator menus remain functional. On Wii U, this crashes the entire system, and on Android, it crashes and exits RetroArch.

The latest build of Cave Story MD can be downloaded from this comment on their issue tracker. The genplus-gx builds I have tried are the latest Wii build from the build folder on this repo, and the latest libretro buildbot builds for both Wii U and Android.

The most recent stable build of Cave Story MD, v0.6.0, works without any issues.

@ekeeke
Copy link
Owner

ekeeke commented Aug 31, 2020

Yes, this is because this last build is 5MB and expects linear ROM mapping above the 4MB limit (the 0.6.0 version is only 4MB) but this got broken in Genesis Plus GX at some point.

This was however fixed in emulator source code by this commit 6 days ago, it's just that I didn't rebuild the Wii/GC binaries here yet and those latest changes have not been pulled in libretro fork repository: aef031a

@vaguerant
Copy link
Author

@ekeeke I saw that you'd put up new builds 3 days ago in 2ca416f, so I gave Cave Story MD another shot in that build (Wii version), but unfortunately I'm still seeing exactly the same behavior on my end. I don't think there's any user error going on, I double checked the checksums of the latest build and the one I copied to my Wii. I cleared out my save directory in case the older version's save was interfering or anything like that. No success.

@ekeeke
Copy link
Owner

ekeeke commented Sep 6, 2020

I looked to the ROM file and the problem is that is has replaced "SEGA GENESIS" field by "SEGA SSF" in the ROM header.

This header should be reserved to indicate games that use Krikzz's extended SSF2 mapper (as documented in http://krikzz.com/pub/support/mega-everdrive/x3x5x7/dev/extended_ssf-v2.txt) but it seems a few homebrews and ROM hacks (see also TASEmulators/BizHawk#695) started to use this to force use of Sega "official" mapper in some emulators, which is wrong.

Indeed, when SSF2 extended mapper is being used, first 512K bank of cartridge area is remappable by writing to $A130F1 address. However, this game uses writes to this address to enable/disable SRAM mapping (as documented in Sega "official" mapper), which explains why the crash occurs as it accidentally remaps the first 512K to some unexpected ROM area.

The solution is to avoid using "SEGA SSF" header unless you actually want to use Krikzz extended mapper (which is afaik only supported by Mega ED X5/X7 flashcarts and this emulator). If you need to use official mapper (where first 512K bank is fixed and upper 2MB is mappable to SRAM), you should let the usual product string ("SEGA GENESIS" or "SEGA MEGADRIVE") and the emulator will enable official mapper by default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants