Cite as
vermiceli/nes-contra-us
Original
https://github.com/vermiceli/nes-contra-us
Pinned
vermiceli/nes-contra-us @ 687d651c021fd7020f10d05b970ccb62663c94bd
Accessed
2026-10-21
Licence
none stated
Credit
Annotated ca65 disassembly of Contra (US) by vermiceli (Michael Miceli), who credits Trax's earlier disassembly for his Revenge of the Red Falcon hack; labels and comments quoted in contra claims are theirs.
Notes
Builds Contra (US), and Probotector with a flag. The repo holds no ROM data: the build extracts graphics and audio from a supplied baserom.nes. The atlas built it with contra-nes-rom, and the output matched the build script's expected hash and the ROM's PRG byte for byte.

Cited on

Claims (15)

Contra's cartridge ROM, counted by part of the game: each stretch of code or data goes to the part the disassembly's labels and comments say it serves, and the value sums the bytes of each part.build.shCode notes
While the title screen scrolls in, the US NES Contra compares each new d-pad, A, or B press with a ten-entry table, Up Up Down Down Left Right Left Right B A. A wrong press sets the count to $FF, which stops the check until the title starts over. The full sequence sets a flag, and a new game then gives each player 29 lives in reserve instead of 2: 30 lives instead of 3.src/bank7.asm L749–752src/bank7.asm L930–955src/bank7.asm L716–720src/bank7.asm L1165–1174Code
A new game of the US NES Contra gives each player 2 lives in reserve (3 in all) and the game 3 continues. A death with none in reserve puts that player in game over, and each game over spends a continue; with none left, the CONTINUE/END choice is skipped.src/bank7.asm L1143–1147src/bank7.asm L1165–1166src/bank7.asm L5150–5161src/bank7.asm L3289–3307Code
The US NES Contra awards its first extra life at 20,000 points and each later one 30,000 points past the last threshold, and caps lives at 99.src/bank7.asm L1177–1178src/bank7.asm L1283–1294src/bank7.asm L1310–1314Code
Touching a weapon item in the US NES Contra adds 1,000 points and dispatches on the item's type: R sets the rapid-fire bit, M, F, S, and L replace the gun (keeping rapid fire only when the new gun is the one held), B starts an invincibility timer at $80 ($90 on level 7), and the falcon destroys the enemies on screen. A death resets the gun to the default.src/bank7.asm L6884–6955src/bank7.asm L5150–5151src/bank7.asm L5338–5340Code
Each completed loop of the US NES Contra and the strongest gun either player holds both shorten the timer between random soldiers: from the level's start value (144 on level 1), 40 comes off per loop, counting up to 3, and 5 per point of weapon strength (S 3, M and L 2, F 1, the default 0).src/bank2.asm L1736–1779src/bank7.asm L3270src/bank7.asm L3920–3926src/bank7.asm L4096–4116Code
A jump in the US NES Contra sets the 16-bit vertical speed to $FB.$F0, a rise of 4.06 px/frame ($FC.$90, 3.44 px/frame, in the indoor base levels), and the jump routine adds $23 to it every airborne frame, 0.137 px/frame², without reading a button: the jump's height doesn't depend on holding A.src/bank7.asm L4533–4557src/bank7.asm L4708–4757src/bank7.asm L5113–5130src/bank7.asm L5139–5147Code
On the side-scrolling levels of the US NES Contra the screen moves only while a player passes X 128 (176 when two are playing), by that player's speed, and not while the other player is left of X 33; on the boss's screen it takes over and scrolls on its own to reveal the boss.src/bank7.asm L5164–5208src/bank7.asm L5228–5229src/bank7.asm L6552–6566Code
Start pauses the US NES Gradius, and while it's paused a routine compares each new press with a ten-entry table, Up Up Down Down Left Right Left Right B A: the same ten bytes as Contra's table. A wrong press sends the count back to 0, unlike Contra's, where a miss stores $FF and ends the check. The full sequence sets the speed count to 1, buys Missile, sets the options to 2 and the shield counter to 5, and leaves Double or Laser as they were. It also decrements a per-player byte that must not be negative for the check to run.src/bank7.asm L954–955src/bank7.asm L937–940Code
The US NES Super C checks a different code from Contra's on its title screen: six presses, Right Left Down Up A B, against Contra's ten-press Up Up Down Down Left Right Left Right B A. Like Contra, a wrong press locks the check out. The code raises the starting lives byte from 2 to 9, where Contra's raises it from 2 to 29.src/bank7.asm L930–955src/bank7.asm L1165–1169Code
The US NES Super C allows 2 continues a game, where Contra allows 3: the count is set to 2 at the start, and each game over spends one before offering CONTINUE/END.src/bank7.asm L1143–1147src/bank7.asm L3301–3302Code
The US NES Super C awards its first extra life at 30,000 points and each later one 20,000 points past the last threshold, the reverse of Contra's 20,000 and 30,000, and caps lives at 99 as Contra does.src/bank7.asm L1177–1178src/bank7.asm L1283–1296src/bank7.asm L1312–1314Code
The US NES Super C dispatches a weapon item on its type: M, S, L, and F replace the gun, R sets rapid fire, B sets an invincibility timer to $80, and the falcon destroys the enemies. A new gun drops rapid fire even when it's the gun already held, where Contra keeps it for the same gun.src/bank7.asm L6933–6945Code
The US NES Super C takes 16 off the delay between random enemies once the game has been beaten and 4 for each living player holding the spread gun. The delay's start is read from an eight-entry per-level table with an index that isn't the level; the disassembly reads it as always $80, a value the table doesn't hold, and the atlas hasn't confirmed it. Where Contra counts loops up to 3, Super C keeps a beaten-once flag that stays at 1; where Contra reads every gun's strength, Super C counts only the spread gun.src/bank2.asm L1736–1757src/bank7.asm L4111–4116Code
The US NES Super C keeps Contra's outdoor jump: a take-off speed of $FB.$F0 (4.06 px/frame up) and gravity of $23 a frame. Super C caps a fall at 5 px/frame and jumps out of water at $FD.$00 (3 px/frame).src/bank7.asm L4547–4550src/bank7.asm L5139–5142Code