Progress at last!
https://files.tasvideos.org/bisqwit/rockman2-boobeamclear.avi (1.9 MB) (*)
https://files.tasvideos.org/bisqwit/rockman2-shinryuu,bisqwit-pending-v2.14.0.fcm
Those who were on the IRC channel tonight got better than a glimpse of what it took to make this trick actually working.
In short:
- I coded
an assembler code tracer into fceu, since the Linux version doesn't have one
- I further developed
nesmock to attempt to convert VirtuaNES savestates into FCEU savestates. It
is not perfect, but it's enough to copy the RAM, CPU status and memory mappings in this particular game so I could start my work. I had to do this because Finalfighter had this VirtuaNES movie that happens to perform the trick by some freaky lucky accident, and I haven't had success in doing it. The movie didn't play quite in sync by the way.
- I analyzed the disassembly meticulously to find a hint of what causes the glitch. It was
2000-16000 lines of code by the way, depending on the way how it's calculated (irrelevant subroutines and loop repeats snipped away, etc)
- I bisected the RAM of the game in order to find the specific variable that controls whether the trick works or not. The address is 06EE by the way. This was done by copying a savestate and using a hex-editor to copypaste&undo stuff between two savestates.
- I pinpointed which values in that address make it work. The range is 70..75 in decimal by the way.
- I analyzed how to make that value occur in the particular address. It is affected by taking damage, by dying, by water surface animations, among other things.
Long story in short, to perform this trick, the _previous_ time you took damage must have been in X coordinate that matches something that is exploding in the current screen.
I wonder if I should choose the guru or tired avatar for this occassion. It took about 8 hours to do that by the way. I think I'll go by guru this time.
What this means that the rest of the movie should be a piece of cake. What 8 boss rematches, but anyway.
*) The numbers displayed on the bottom of the screen are the magic numbers for the trick. Specifically, the second last number. Among other things, it indicates the X position of the last time damage was taken. It must match the X position of the object being exploding at the same time as a boobeamtrap is being killed. Which is why I take damage from the right edge.