gb-save-states icon indicating copy to clipboard operation
gb-save-states copied to clipboard

Super Mario Land DX Patch

Open AngelAbaddon opened this issue 2 years ago • 24 comments

Any chance a patch could be produced for Super Mario Land DX now that the 2.0 version is out? I gave the GB v1.0 patch a shot in case it worked but it just loads to a blank screen. Thanks

AngelAbaddon avatar Apr 23 '22 15:04 AngelAbaddon

Yes, absolutely! Super Mario Land is the very first game I created a save state patch for, so DX must have a patch too :)

I've now created and uploaded the patch. Let me know if any issues.

mattcurrie avatar Apr 23 '22 23:04 mattcurrie

Yes, absolutely! Super Mario Land is the very first game I created a save state patch for, so DX must have a patch too :)

I've now created and uploaded the patch. Let me know if any issues.

Seems broken, atleast for me. Saving would either send me back to the main menu, or would glitch out the graphics. Loading also either does nothing, or crashes.

Espio419 avatar Apr 24 '22 00:04 Espio419

@Espio419 I've just double checked applying the patch and seems to be working fine here.

Note you will need to apply the save state patch to a working Super Mario Land DX v2.0 ROM. The md5 for that ROM should be 119bdf89bdf38e489facd79cf251ccd0.

After patching the expected md5 is 85ccbe7f0806de2575825bb9af0edd93.

mattcurrie avatar Apr 24 '22 00:04 mattcurrie

@mattcurrie The MD5s check out for both roms, but still spazzes out for me. Maybe it has something to do with my EZ-FLASH Junior, even though the other patches here work. It works fine an mGBA, though.

Espio419 avatar Apr 24 '22 00:04 Espio419

@Espio419 Ah strange. I've tested on EZ-Flash jr and Everdrive GB X5 and it works ok on both.

When you put the save state patched ROM on your micro SD, did you already have a ROM with the same name on there? I'm wondering if the EZ-Flash jr saw an existing 8 KB .sav on there and so it didn't enlarge it to 128 KB.

mattcurrie avatar Apr 24 '22 00:04 mattcurrie

@mattcurrie I did have a ROM using the same name. I have tried deleting the save, but it still wouldn't work. Even changing the name of the ROM causes the same issue. It does seem to be using a 128 kB save.

Espio419 avatar Apr 24 '22 00:04 Espio419

@Espio419 Hmm, I can't really think of any other reasons you would have having trouble - it sounds like you're doing everything correctly. Its a bit of a hassle, but other things to try would be either another micro SD card, or re-format the one you have already and set up again.

mattcurrie avatar Apr 24 '22 03:04 mattcurrie

Seem to be having the same issue myself on a EZFlash Jr. I've tested it on my normal MicroSD and a seperately freshly formatted one, both either reboot to title screen or crash to black screen requiring a hard reboot when attempting to save, nothing happens on load. I've checked and the .sav file is the expected 128KB. EZFJr is running FW4 and MD5 matches expected.

Edit: Looks like it may be hardware based. Been having issues with a IPS modded GBC. Tried the exact same rom on emulator and it worked fine. Then tried it with the exact same Ez Flash Jr, exact same MicroSD on my modded GBA and everything worked as expected - could save and load without a problem. Going back to GBC, as soon as I try to load the save state that was working on GBA, I get a white screen crash.

AngelAbaddon avatar Apr 24 '22 18:04 AngelAbaddon

@AngelAbaddon thanks for reporting back.

Strange that it doesn't work with your GBC. I've just tried saving and loading on my GBCs (all different revision SOCs) without issue. I'm using FW5 on my EZFJr, but I'm not aware of any changes compared to FW4 that would affect the save state patch.

I wonder if it could be due to power. Maybe you could you try powering your GBC with fresh AAs or a DC adapter?

mattcurrie avatar Apr 24 '22 22:04 mattcurrie

@AngelAbaddon That's the same with me. Saving and loading doesn't work on my modded Boxy Pixel GBC with the FunnyPlaying Retro Pixel 2.0 display, but works fine on my Boxy Pixel GBA with the FunnyPlaying V2 LCD. Connecting my GBC to a power source for charging doesn't make a difference.

Espio419 avatar Apr 24 '22 22:04 Espio419

@mattcurrie unfortunately no luck. I've not got a plug adapter, but fresh batteries made no difference.

AngelAbaddon avatar Apr 24 '22 23:04 AngelAbaddon

Can you try with this alternate save state patch? It just adds a delay after switching ROM banks. It shouldn't really be required, but if ezfjr has some timing issue then it could help.

test1.bsdiff.zip

mattcurrie avatar Apr 25 '22 00:04 mattcurrie

Saving seems to work, but loading the save still crashes the game.

Espio419 avatar Apr 25 '22 01:04 Espio419

@mattcurrie No luck on my end. Got it to save once, then loading everything went to hell, graphical glitches everywhere leading to a crash. After that if I try to save (after deleting the .sav file to start fresh) I have the same issue as the initial patch.

AngelAbaddon avatar Apr 25 '22 08:04 AngelAbaddon

Thanks for testing @Espio419 and @AngelAbaddon.

I fear this might be a tricky one to fix unless I can reproduce it with my hardware. I tried downgrading my ezfjr to FW 4 just in case, but saving and loading still worked fine for me. There should be another ezfjr in my house somewhere, but the kids seem to have misplaced it. I'll keep hunting...

It would be great if you could try the other CGB games that I've made patches for - if any of the other CGB patches are broken for you on your CGBs too then maybe I can figure out some commonality between them. Apart from that I might be able to create a set of patches testing different parts of the process and see where it is getting stuck... I'd really like to figure out the issue if possible :)

Edit: I found the other ezfjr hidden under a bed. Saving and loading are both working fine with that cart too unfortunately, so isn't useful.

I've tested on all my CGB revisions but if you could run which.gb and let me know which revision it reports for your CGBs, it may be useful information too.

mattcurrie avatar Apr 27 '22 05:04 mattcurrie

My GBC comes up as "CPU CGB C." I tried the other patches, and the only one that didn't work was, interestingly, Super Mario Land 2 DX. I had the same problems as Mario Land DX.

Espio419 avatar Apr 28 '22 01:04 Espio419

@mattcurrie Finally got round to testing this all out. Which.gb shows I have a "CPU CGB C". Same issue as @Espio419, everything works as expected except Mario Land 2 DX has the same issues as Mario Land DX.

AngelAbaddon avatar May 09 '22 11:05 AngelAbaddon

@mattcurrie I have problem with all patched gbc roms (gb - no problem). Every patched gbc roms (all 12) after save button - freeze game forever (or reset to title screen).

My Game Boy Color flash cartridge version is:

System Information

CPLD Version: 1
BIOS Version: 1
OS Version: 4

Asm Date: 16.12.2016
Asm Time: 2:14:28
Which.gb v0.4
Seems to be a...
CPU CGB D

RoxMarty avatar May 20 '22 00:05 RoxMarty

Hi @AngelAbaddon, @Espio419, @RoxMarty,

Sorry it has been a while since I've been able to look at this. If you're still having trouble with these patches, could you try running this test ROM linked below on your flash carts and various game boys? This will check that the full 128 KB of SRAM is available and working correctly. The GBC save patches require that the test reports "Passed!" for all banks (0-9 and A-F).

https://github.com/eievui5/sram128/releases/tag/v1.0.1

mattcurrie avatar Sep 18 '22 06:09 mattcurrie

Hi, @mattcurrie

Testing my flash cartridge with original Game Boy DMG-01 and CGB-001 (with screen modding)

My log:

128KiB SRAM test ROM: Bank 0-3 - Passed! Bank 4-F - Failed!

What it means? GBC quick save/load is never work for me?

RoxMarty avatar Sep 18 '22 10:09 RoxMarty

@RoxMarty, yes unfortunately it looks like your flash cart only has 32KB of SRAM, which is too small for the GBC save states.

mattcurrie avatar Sep 18 '22 23:09 mattcurrie

@RoxMarty, yes unfortunately it looks like your flash cart only has 32KB of SRAM, which is too small for the GBC save states.

All banks passed for me.

Espio419 avatar Sep 18 '22 23:09 Espio419

@mattcurrie, thanks for the answer! Now the problem is clear. It is a pity that there is no way to solve it

RoxMarty avatar Sep 19 '22 09:09 RoxMarty

@mattcurrie All banks passed for me

AngelAbaddon avatar Sep 19 '22 16:09 AngelAbaddon