Difference between revisions of "Disassembly Notes (NES)"

From Dr. Mario
Jump to navigation Jump to search
(Created page with "== 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 <code>00</code> 8 times in a row. The frame coun...")
 
Line 2: Line 2:
  
 
If you sit idle on the title screen for a while, a demo plays. It's triggered by the frame counter rolling over to <code>00</code> 8 times in a row. The frame counter cycles through from <code>00</code>-<code>FF</code>. 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 <code>0</code>) when it decides to load the demo code (at <code>$9905</code>), accomplishable through the Game Genie code <code>AAAPSP</code>. Next, while the demo board is a generatable one (seed <code>03BE</code>), it's stored directly in the ROM (<code>$CF00</code>-<code>$CF7F</code>) and loaded into memory. The capsules generated do not match this seed, but they're stored right after the board (<code>$CF80</code>-<code>$CFFF</code>). 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 <code>$D000</code>-<code>$D1FF</code>.
 
If you sit idle on the title screen for a while, a demo plays. It's triggered by the frame counter rolling over to <code>00</code> 8 times in a row. The frame counter cycles through from <code>00</code>-<code>FF</code>. 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 <code>0</code>) when it decides to load the demo code (at <code>$9905</code>), accomplishable through the Game Genie code <code>AAAPSP</code>. Next, while the demo board is a generatable one (seed <code>03BE</code>), it's stored directly in the ROM (<code>$CF00</code>-<code>$CF7F</code>) and loaded into memory. The capsules generated do not match this seed, but they're stored right after the board (<code>$CF80</code>-<code>$CFFF</code>). 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 <code>$D000</code>-<code>$D1FF</code>.
 +
 +
[[Category:Dr. Mario (NES)]]

Revision as of 01:42, 18 August 2020

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.