Difference between revisions of "Disassembly Notes (NES)"

From Dr. Mario
Jump to navigation Jump to search
Line 4: Line 4:
  
 
[https://github.com/brianhuffman/drmario Brian Huffman's disassembly notes]
 
[https://github.com/brianhuffman/drmario Brian Huffman's disassembly notes]
 +
 +
[https://cdn.discordapp.com/attachments/632225442891431936/1016514981623255040/drmario.mlb miscellaneous Mesen labels]
  
 
[[Category:Dr. Mario (NES)]]
 
[[Category:Dr. Mario (NES)]]

Revision as of 19:17, 12 February 2023

Demo

If you sit idle on the title screen for a while, a demo plays. It's triggered by the frame counter rolling over to 00 8 times in a row. The frame counter cycles through from 00-FF. So this means it takes anywhere from ~29-34 seconds to start ((256 frames * 7 + [1,256] frames) / 60 frames per second). It can be disabled a number of ways, but the simplest way is editing the jump offset (to 0) when it decides to load the demo code (at $9905), accomplishable through the Game Genie code AAAPSP. Next, while the demo board is a generatable one (seed 03BE), it's stored directly in the ROM ($CF00-$CF7F) and loaded into memory. The capsules generated do not match this seed, but they're stored right after the board ($CF80-$CFFF). The controls are stored in pairs of bytes, the first byte being the buttons pressed (bitmask - A, B, Select, Start, Up, Down, Left, Right) and the second being the number of frames to hold down those buttons. These are stored right after the board/capsules at $D000-$D1FF.

Brian Huffman's disassembly notes

miscellaneous Mesen labels