pret / pokeruby

Decompilation of Pokémon Ruby/Sapphire
799 stars 224 forks source link

Fix NONMATCHINGs and actual English Debug support #788

Closed jackson2k2 closed 4 years ago

jackson2k2 commented 4 years ago

A big one. This will take long to review, but I am trying to get pokeruby up into at least a better state and parity with pokeemerald after seeing the sources unfortunately leak this early.

Most of it is multiple MATCHINGS ported from pokeemerald and pokefirered. Fixes unique to this PR however include:

English Debug support using the ROMs from the leak is also underway.

jackson2k2 commented 4 years ago

atk24 is now matching; commit below instead of above in history due to squashing/rebasing.

jackson2k2 commented 4 years ago

I have written a WTF tier writeup on matching sub_80D4D64, for anyone who wants to see.

jackson2k2 commented 4 years ago

For the record, the sub_80D4D64 trick works on Pokeblock_BufferEnhancedStatText too. Since a2 is always an uninitialized unlike sub_80D4D64's xDiff, the trickmatch statement can also be "a2 = -a2."

Alternatively, "a2 = 1" appears to work too. UPDATE: It can be any value, actually. I'm not sure what would have been here in the original source.

jackson2k2 commented 4 years ago

@GriffinRichards Fixed.