mgba icon indicating copy to clipboard operation
mgba copied to clipboard

Conditional ROM patch cheat support

Open JakobDev opened this issue 1 year ago • 1 comments

I stumbled upon this site while looking for Cheat Codes for The Minish Cap EU. I found this Code, which freezes the Cucco Timer:

1256A76F 546F5439
65DA389A 09D8882C
8F498589 DB68ABFF
1256A76F 546F5439
4A68DD8A E1E028C8

Unfortunately this doesn't work on mGBA, but it works on VBA, so I think this uses some Emulation Error of VBA. mGBA already has a VBA compatibility mode for ROM Hacks. The Option to force this mode on normal Games to make old Cheats work, would be a welcome addition.

JakobDev avatar Nov 25 '23 14:11 JakobDev

I'm not sure how you came to the conclusion that VBA compatibility has anything to do with this, given it's cheat code handling and not replicating VBA bugs (which is what that "feature" is for), but what's going on here is simply that the code in question trips up an edge case in mGBA's code handling. Specifically, it applies a ROM patch based on whether or not a certain key is held. mGBA assumes a ROM patch is always applied without conditions. This will probably require a significant overhaul, but also has nothing to do with VBA at all.

endrift avatar Nov 25 '23 17:11 endrift