EvilJagaGenius / jagoombacolor

Jaga's Goomba Color fork
105 stars 9 forks source link

Other Infamously Incompatible Games #10

Open frank-jaegar opened 2 years ago

frank-jaegar commented 2 years ago

Hey there, First I just wanted to say thank you for your work getting Crystal to run without having to modify the ROM-- seeing Goomba Color get a fix after so long is a dream come true!

Looking through the documentation and the other issues I understand you're stepping back from the code to enjoy your holidays, but I wanted to ask if there were any plans regarding any of the other "infamous" games that don't get along with Goomba Color. Specifically:

I've verified the above issues are still occuring in 0.4. If these games are not within the scope of this project I understand, I just wanted to report them and check in :) thank you for your work again, great to have Crystal working so well!

EvilJagaGenius commented 2 years ago

I didn't know about those games having issues! I'd definitely like to try fixing MGS and Lufia, and thanks for the forum thread, that should help me figure MGS out. For Crystalis, I know a lot of people consider the NES version the superior version, but I can take a look at that too. I'm not sure if this is the same issue, but I just took a look at Kirby Tilt 'n' Tumble, and the clouds on the title screen also flicker back and forth while that screen is scrolling. It wasn't game-breaking so I didn't try to fix it then, but I wonder if the two are related.

On the note of incompatible games, I recently discovered Faceball 2000 doesn't work as well, it gets to the title screen but freezes upon pressing Start. I tried Goomba Color and Goomba 2.0, but it doesn't run there either... Personally I think the Game Gear port is better but it's an interesting piece of the GB's history that I'd like to have running as well.

Gnarcotik commented 2 years ago

Hey EvilJagaGenius, Just wanted to add that Yu-Gi-Oh! Dark Duel Stories also freezes up upon opening up your chest or trunk. Music Still plays just unresponsive when i press buttons. It used to work on Goomba 2.0.

EvilJagaGenius commented 2 years ago

It looks like even mGBA had issues with Metal Gear, but fixed it somewhere between the old 0.7.1 I had installed and 0.9.3. I wonder what they did. From what I saw in mGBA's debugger, it might be emulating a jump badly and end up in a section of ROM it's not supposed to be in, leading to a crash. But I'm not sure where exactly it goes off the rails yet.

pakrett commented 2 years ago

I've also noticed that castlevania legends (both EUR/USA and JPN) doesn't use the sgb enhanced colors but the sgb borders are working. It's a goomba color bug/incompatibility, it's not only related to jagoombacolor.

therealteamplayer commented 2 years ago

It looks like even mGBA had issues with Metal Gear, but fixed it somewhere between the old 0.7.1 I had installed and 0.9.3.

It seems to have been fixed in the very next release (0.7.2) - which should make narrowing down the problem a little easier

tomexplodes commented 2 years ago

Just wanted to add Hercules: The Legendary Journeys to this list. The title screen is garbled and the game doesn't start after that.

frank-jaegar commented 2 years ago

Hey all, I haven't had the time or skills to dig into the code here yet, but I did stumble upon this thread that EvilJagaGenius created over at romhacking.net regarding Metal Gear Solid Ghost Babel. A user over there going by 'lightbulbsun' had some radical feedback and suggested some small edits that could be made to the relevant ROM to overcome the issue.

EDIT: Back to report that sadly the hex edit did not resolve the issue. Hopefully the tips regarding the code are more fruitful

radimerry commented 2 years ago

Metal Gear Solid: Ghost Babel (game runs great, but crashes on elevator use-- I found this stale thread that points to the instruction calls causing the same issue in a different emulator, but I'm sadly not competent enough as of now to fix the issue myself: < https://forum.odroid.com/viewtopic.php?t=31541>)

I think this fixes the game (didn't crash for me). endrift came up with the original idea. Ingores invalid interrupt pins.

https://github.com/EvilJagaGenius/jagoombacolor/blob/eade75121d7c2568b812867de854e6cdcd527271/src/gbz80.s#L1002-L1015

becomes

@----------------------------------------------------------------------------
_76:@   HALT, wait for interrupt.
@----------------------------------------------------------------------------
    ldrb_ r0,gb_ie
    ldrb_ r1,gb_if

@ --- new
    and r0,r0,r1
    ands r0,r0,#0x1f
@ --- new

    bne _noHalt
    sub gb_pc,gb_pc,#1
    and cycles,cycles,#CYC_MASK
    @orr cycles,cycles,#CYC_HALT
    fetch 4
_noHalt:
    sub cycles,cycles,#4*CYCLE
    b checkMasterIRQ
therealteamplayer commented 2 years ago

I think this fixes the game (didn't crash for me). endrift came up with the original idea. Ingores invalid interrupt pins.

i tried to implement this change and compile, but still got a crash when using the elevator. might be worth trying yourself though, idk.

i've attatched a save file i found online that should make the issue easier to reproduce. you need to go to 'stage select', then select 'normal' then 'stage 5'. there should be an elevator right in front of you which you can use, and if you try to use it to access another floor it will crash after a short period.

Metal Gear Solid.zip

radimerry commented 2 years ago

FF70 reads must return 0xF8 | rambank https://github.com/radimerry/jagoombacolor/commit/70514e446975d7c82c068a8b10a2d055278932de

FF4F reads must return 0xFE | vrambank https://github.com/radimerry/jagoombacolor/commit/55b5404ccba8238c514c42a85a1882e3157d3150

Both fixes credit to LIJI32 of SameBoy (!)

therealteamplayer commented 2 years ago

^ can confirm that this fixes the crash. just made a pull request of @radimerry 's fork

radimerry commented 2 years ago

https://github.com/radimerry/jagoombacolor/commit/55c45f1c4d6887c1726d658ad65003dfa87c6461

Credit to pandocs for fix.

EDIT: Yu-Gi-Oh! Dark Duel Stories seems to work here. No crashes noticed. Maybe it got fixed sometime ago.

radimerry commented 2 years ago

Hercules freezes because it needs game-specific LCD scanline hack added to list

https://github.com/radimerry/jagoombacolor/commit/03439ea18261d5d42c0a245f4499523ce11095fc

As for bad Hercules colors, that will require someone who can change GBA palettes mid-frame. It's listed in the TODO list. https://github.com/EvilJagaGenius/jagoombacolor/blob/eade75121d7c2568b812867de854e6cdcd527271/src/lcd.s#L28

EvilJagaGenius commented 2 years ago

Holy crap, if you guys actually got MGS fixed, many thanks!

Apologies for not seeing the recent pull requests until now, I'll get those merged. Need to tweak Github notifications so it tells me about them.