Cite as
“Mega Man 2 (USA)”
Licence
proprietary; never redistributed (docs/data-policy.md#roms)
Credit
Capcom
Notes
No-Intro "Mega Man 2 (USA)". NES 2.0 header: 256 KB PRG ROM, CHR RAM, mapper 1 (MMC1), no battery. Without the 16-byte header the SHA-1 is 2ec08f9341003ded125458df8697ca5ef09d2209. With the iNES header that lsmmega/mm2 writes (header.asm), the SHA-1 is that disassembly's build target, 6b5b9235c3f630486ed8f07a133b044eaa2e22b2.

Cited on

No page cites it yet.

Claims (34)

Mega Man 2'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.0x10-0x4000fCode notes
Mega Man 2's sound engine entry and channel setup are Mega Man's, with two changes: _music_fade_in_out no longer ignores a new fade while one is running, and where Mega Man steps X with INX, four operands use an address plus 1 instead and one writes SQ1_SWEEP plus X. The engine starts at $8000 instead of $9000, so its jump and call addresses differ too.0x30010-0x30244Code
Mega Man 2's per-frame channel update is Mega Man's, except that _break_frame and the end of _pitch_envelope_common address the next APU register as SQ1_SWEEP plus X, where Mega Man steps X with INX and writes SQ1_VOL plus X. The code sits $100A lower, so its jump and call addresses differ too.0x30245-0x3057cCode
Mega Man 2's sound effect reader is Mega Man's, instruction for instruction and with the same RAM, moved $100C lower: only its jump and call addresses and the addresses in its command table differ.0x3057d-0x306c3Code
Mega Man 2's song data reader is Mega Man's, instruction for instruction and with the same RAM, so the two games read the same note and command format. It sits $100C lower: only its jump and call addresses, its command table, and the address of the note table differ.0x306c4-0x30984Code
Mega Man 2's note length and pitch tables are Mega Man's but for one pitch: the period of the note the disassembly names nEb1 drops from $059E to $0594, about 12 cents higher (computed). The region also ends with 3 bytes of $FF filler instead of 7.0x30985-0x30a5fCode
Mega Man 2's _joy is Mega Man's, line for line; only the two button bytes it writes moved in zero page, from $14 and $18 to $23 and $27.0x3d0e7-0x3d104Code
Mega Man 2's _object_tiles_update is the loop Mega Man enters at _init_object_tiles, which copies the tile buffer to CHR RAM, with its RAM at new addresses. Mega Man 2 drops the test in front of it and the _object_tiles_update_yellow_devil path, which writes two bytes at each of several PPU addresses, a row ($20) apart.0x3d1ef-0x3d208Code
Mega Man 2's _scrolling_vertical follows Mega Man's _scrolling_up_down: the same name table and attribute address math and the same loop writing four 8x8 tiles per 16x16 quarter. Mega Man 2 computes the 32x32 block's address from the screen number, where Mega Man looks the screen up in a pointer table and checks _special_blockset_collision for a block the disassembly labels removed; some of its RAM moved too. The rest of each region is different code.0x3ca26-0x3cb1bCode
Mega Man 2's _nmi_wait_0e and _nmi_wait_0d keep the steps of Mega Man's _nmi_wait: save the last buttons, wait for the NMI, call _joy, and mark the newly pressed buttons. The two differ only in the bank they map at the end, and each first calls _background_palette. Mega Man 2 drops the path for buttons the game forces and moves the water frame into _nmi_wait_water.0x3c08f-0x3c10fCode
Mega Man 2's death explosion takes its twelve pieces' x and y speeds and facing flags from five 12-byte tables identical to Mega Man's explosion tables. The code around them is new: Mega Man's _create_explosion_object sets up one piece per call, and Mega Man 2's _create_explosion loops over all twelve.0x3c3fb-0x3c436Code
Both games' bank switch routines map a PRG bank at $8000, but Mega Man 2's is new code for a different board: Mega Man writes the bank number once, to its own byte of a bank table (the disassembly's uxrom_prg_bank), and Mega Man 2 writes it to MMC1 one bit at a time, then runs any sound an NMI put off during the switch.0x3c010-0x3c060Code
Both games' stage loops run a frame of play and wait for the NMI, but Mega Man 2's is new code: it calls its own routines in its own order, opens the menu on Start with no Select pause, and waits an extra frame now and then in water. Its region also starts the stage before the loop.0x380bb-0x381cbCode
The last 16 screens of Metal Man's map, $1C to $2B (1,024 bytes), are byte for byte the last 16 of Mega Man's Cut Man and Wily stage 1 map: Cut Man's screens $0C to $0F and Wily stage 1's $10 to $1B. Metal Man's screens $18 to $1B repeat four of them, Wily stage 1's $18 to $1B.0x18c10-0x1900fCode
Tiles 1 to 84 of Mega Man 2's title screen patterns (1,344 bytes) are byte for byte tiles 1 to 84 of Mega Man's.0x27020-0x2755fCode
Mega Man 2's six menu border tiles, the end of its common stage tiles, are Mega Man's six menu tiles, byte for byte.0x24410-0x2446fCode
Mega Man 2's five READY letter tiles have Mega Man's letter shapes, row for row, but in each tile's second bit plane instead of its first, so the letters draw in color 2 of their palette where Mega Man's draw in color 1.0x24470-0x244bfCode
Mega Man 3's divide_8bit is Mega Man 2's _divide_mod with its zero-page operands one byte lower ($00-$03 for $01-$04). Its 16-bit division is Mega Man 2's _divide_fraction with its RAM moved and two changes: Mega Man 3 saves and restores X around the loop, and stores the low byte of each successful subtraction back in the remainder ($01), where Mega Man 2 writes it to $09, outside its shift chain.0x3c85e-0x3c8c0Code
Doc Robot's Air Man fight in Mega Man 3 uses Air Man's tornado tables from Mega Man 2 byte for byte (155 bytes): the five delays between rounds, then five patterns of six tornadoes each, with their Y and X speeds (whole and fraction) and how long each flies.0x2c38e-0x2c428Code
Mega Man 3's sprite CHR banks $00-$01, mapped at sprite tiles $00-$7F throughout play, start from Mega Man 2's first 128 sprite tiles (the disassembly's megaman_capsule_e_tank_bullet_mega_buster.chr): 84 of the 127 non-blank tiles are the same at the same numbers, the longest run tiles $20-$37 (384 bytes).0x1210-0x138fCode
The first 32 tiles of 17 of Mega Man 3's sprite CHR banks ($08, $0A, $0C, $0F, $11, $13, $15, $1D, $20, $24, $26, $27, $2A, $2C, $2E, $32, and $3C) are Mega Man 2's sprite tiles $60-$7F, from the same set as Mega Man's own: 29 of the 32 are the same at the same numbers, the longest run tiles $0B-$1F (336 bytes).0x16c0-0x180fCode
Mega Man 3's title screen background tiles (CHR banks $76-$77) are largely Mega Man 2's title set (title.chr, loaded at _load_title_chr), moved a few tile numbers: 102 of their 128 non-blank tiles appear in it, 96 different ones, in runs of up to 16 tiles (256 bytes).0x271b0-0x272afCode
Mega Man 3's background CHR bank $66, mapped for Wily stage 6, holds 27 of the 31 non-blank tiles of Mega Man 2's third font set (the disassembly's font_3.chr), the longest aligned run 10 tiles (160 bytes).0x26c20-0x26cbfCode
Mega Man 3's sprite CHR bank $3C holds 13 of the 23 non-blank tiles of Mega Man 2's set of Dr. Wily bowing down (the disassembly's dogeza.chr), six of them in a run (96 bytes).0x23a20-0x23a7fCode
Mega Man 3's sprite CHR bank $22 holds 17 tiles of Mega Man 2's boss sets, 9 from Wood Man's and 8 from Heat Man's, and bank $21 holds 4 of Crash Man's; the longest run is 9 of Wood Man's tiles (144 bytes).0x1b160-0x1b1efCode
Mega Man 3's check_new_enemies is the enemy half of Mega Man 2's _find_objects, instruction for instruction, with new RAM and table addresses: both take the screen's left and right edges, then on the side the screen moves toward spawn each placement that comes into range and on the other side move a second cursor past placements left behind. Mega Man 3 drops Mega Man 2's matching walk over a separate item list and the switch to the stage bank around it. The spawn routine each calls starts the same way, skipping a placement already in a slot and taking a free one, and then differs: Mega Man 2 fills the slot from per-type tables in its fixed bank, and Mega Man 3 skips a placement marked defeated and copies the type's properties from bank 0.0x3d668-0x3d814Code
Both games run their sound driver from the NMI, but Mega Man 3's is new code with a new layout. Mega Man 2 keeps the driver and its songs together in bank 12, queues up to 16 tracks, and works out a note's length as a table value times its channel's tempo byte. Mega Man 3 keeps the code in bank 22 and the data in bank 23, reading bank 24 for data addresses from $C000; it takes sound IDs from an eight-entry ring buffer in the fixed bank, and refuses a sound whose priority byte is lower than the one playing.0x30010-0x30244Code
Both games strobe the controllers and merge each port's two data bits, but Mega Man 3's routine is new code. Mega Man 2's _joy reads one pad after the other and leaves the newly pressed buttons to the frame wait that calls it; Mega Man 3's read_controllers reads both pads in one loop, works out the new presses itself, and clears the d-pad when opposite directions are held together.0x3d0e7-0x3d104Code
Both games flag a bank switch in progress and catch up on the frame's sound afterward if the NMI arrived during it, but Mega Man 3's switch is new code for a different board: Mega Man 2 maps one 16 KB bank at $8000 by writing its number to MMC1 one bit at a time, and Mega Man 3 writes two 8 KB banks, at $8000 and $A000, to the MMC3 as whole bytes.0x3c010-0x3c060Code
Both games' NMI handlers copy the sprites by DMA, write the queued screen and palette updates, set the scroll, and run the sound driver, but Mega Man 3's handler is new code. Mega Man 2's offsets the scroll for the Mecha Dragon and puts the sound off when the NMI interrupts a bank switch; Mega Man 3's also loads the MMC3's scanline counter for the frame's split-screen interrupt and picks the interrupt handler for the screen mode.0x3d000-0x3d0e6Code
Both games run a stage a frame at a time in step with the NMI, but Mega Man 3's frame loop is new code built on a task scheduler. Mega Man 2's stage loop calls its routines in turn and then spins in _nmi_wait_0e until the NMI sets a flag, reading the pads after it. Mega Man 3 runs up to four tasks, each resumed from its own saved stack pointer; gameplay_frame_loop gives up the CPU for a frame through the scheduler, which reads the controllers only when it resumes task 0.0x3c08f-0x3c10fCode
Both games move an object each frame by a speed with a fraction and change its Y speed by gravity, but Mega Man 3's movers are new code that Mega Man and the enemies share. Mega Man 2's enemy routine, left undecoded by its disassembly, checks the object's hits, moves it by its Y speed, subtracts gravity from that speed when a flag bit asks for it, moves it by its X speed in the way it faces, and removes it once it leaves the screen; walls and floors are a separate routine, and Mega Man moves with his own code. Mega Man 3's move_vertical_gravity and move_right_collide serve slot 0, the player, and every enemy alike, and run the tile check inside each move, snapping the object to the floor, ceiling, or wall it reaches.0x3eec6-0x3efbeCode
Both games find the 32-pixel block at a point in the screen's layout and then its 16-pixel quarter, but Mega Man 3's tile check is new code with a new type format. Mega Man 2's _tsa_collision tests one point a call and takes its type from the quarter byte's top two bits, which a per-stage table remaps; Mega Man 3's check_tile_collision tests a list of points from a hitbox table in one call, clamps them to the screen, takes each type from the upper four bits of the tile's entry in a table at $BF00 in the stage bank, and ORs the types together.0x3cbd3-0x3cc7bCode
Both games' stage selects move a cursor over the bosses' portraits and start the chosen stage, but Mega Man 3's is new code. Mega Man 2's _stage_select blanks a beaten boss's portrait by writing empty tiles to the name table, and on a d-pad press calls _stage_select_set to move the cursor; Mega Man 3 keeps the cursor's column and row apart, moves each by a table offset and ignores a move off its 3 by 3 grid, redraws the six sprites of Mega Man's eyes in the center portrait for the cursor's position, and confirms on A as well as Start.0x34025-0x34367Code