« on: July 15, 2018, 07:12:05 pm »
I made a quick hack to play Shantae in GBA enhanced mode with the GBC palettes. Took about 5 minutes. I also prefer the original, darker palettes, but why not have the other GBA enhancements?
It's also fairly simple to do: from where Vague Rant left off, note that the value of "B | A" is stored into [0xfffe]. Using bgb, set a read breakpoint on 0xfffe. Every time the palettes change, this breakpoint is triggered, and you see code relating to the palettes. The conditional jump next to the breakpoint must be changed to an unconditional jump. This way, it doesn't affect the other GBA enhancement features, but it always skips over the GBA's different palette code.
Ips file. It doesn't force gba mode, the emulator has to be set to do that. Or follow the instructions in the first post.
Edit: Made some game genie codes to force GBC palettes.
I'm curious about the difference between the IPS patch file in this post and the patch at https://www.romhacking.net/hacks/3567/.
The IPS patch changes only two values, one opcode and the check code. The check code in BGB says `;global check (okay)`. When just the second value is changed, the check code does not show OK, so I'm assuming that some things will care about this and the check code is some sort of hash on the ROM.
The IPS patch includes `001CB8 0001 18`, which translates to "insert `18` which is length `1` at position `001CB8`. This converts from `jr nz 1CC2` to `jr 1CC2`. I'm able to read these opcodes inside BGB as well as looking them up here http://pastraiser.com/cpu/gameboy/gameboy_opcodes.html.
As the quoted post describes, the replaced code does not check before skipping the next few operations while the original checks if a certain memory position FFFE is equal to `03`.
The patch on the upload page instead replaces the memory loading operation and just sets the A value to `03` so that the equality check is zero (the check sets the F flag).
The uploaded patch then does 12 other things which I'm not sure exactly what they are. In most of them, it's replacing something with the opcode `3E` which is `ld A, d8` or set A to the next value.
I've never done anything with opcodes / gameboy programming, 8080 / Z80, etc. It was fun to poke around and read how some of this works. I'm kind of curious why that second uploaded patch does so many more things.
I also have not played the games beyond the title screen where you can see the different colors as well as the "GBA Enhanced" indicator.