the cutting room mirror

Dr. Mario (NES)

This article has a talk page!
view on tcrf.net

This page contains notes for the game Dr. Mario (NES).

Controller Polling Routines#

The controller polling routines appear to originate from the FDS BIOS, including the zeropage variables ($F1-$F8) and routines which went unused in the final game.

Below is a table of these routines from the final game, mapped to their equivalents from the FDS BIOS:

Rev 1 ROM Address

FDS BIOS Address

Description

$B7AD

$E9EB

Polls the standard controllers and the expansion port. The expansion port inputs are placed into temporary variables (zeropage $00-$01) which will be overwritten unless they are stored/used elsewhere.

$B7CF

$EA0D

Combines the inputs from the standard controllers and the expansion port.

$B7DC

$EA1A

Polls the standard controllers and processes button transitions.

$B7E1

$EA1F

Polls the standard controllers and the expansion port, then processes button transitions. The final game modifies this routine to store the bitwise AND of two consecutive polls, using zeropage variables $48-$49 to temporarily save the poll results.

$B801

$EA25

Entry point to process button transitions from released->pressed.

$B812

$EA36

Polls the standard controllers in a loop until two consecutive reads match, then processes button transitions.

$B828

$EA4C

Polls the standard controllers and expansion port in a loop until two consecutive reads match, then processes button transitions.

$B844

$EA68

Polls the standard controllers and expansion port, places the expansion port inputs into separate variables, and then processes button transitions. This creates four player inputs.