data/claims/mega-man-code-lineage.yamlMega Man code lineage
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. mega-man-code-lineage/mm1-mm2-audio-control
About: Mega Man 2
Value
{
"lineage": "changed",
"from": "mega-man/audio-control",
"to": "mega-man-2/audio-control",
"bytes": 565
}audio/engine.asm#L223-L234LDA z:zfade_in_out_ratemm2: Mega Man 2 disassembly (lsmmega/mm2) · audio/engine.asm#L222-L229STY z:zfade_in_out_ratemm1: Mega Man disassembly (lsmmega/mm1) · audio/engine.asm#L66-L72INXmm2: Mega Man 2 disassembly (lsmmega/mm2) · audio/engine.asm#L66-L71LDA track_pointers + 1, Xmm1: Mega Man disassembly (lsmmega/mm1) · audio/engine.asm#L394-L401STA SQ1_VOL, Xmm2: Mega Man 2 disassembly (lsmmega/mm2) · audio/engine.asm#L386-L391STA SQ1_SWEEP, Xmm1: Mega Man disassembly (lsmmega/mm1) · audio/engine.asm#L1-L407_nmi_audio_processing:mm2: Mega Man 2 disassembly (lsmmega/mm2) · audio/engine.asm#L1-L397_nmi_audio_processing:Mega Man (USA) · 0x11010-0x1124e — bank 4 $9000-$923EMega Man 2 (USA) · 0x30010-0x30244 — bank 12 $8000-$8234Checked by claude, 2026-10-23 — diffed both disassemblies' cited lines at their pins (ten lines of Mega Man's differ) and compared the two ROM ranges byte by byte; every other differing byte is an address operandMega 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. mega-man-code-lineage/mm1-mm2-audio-processing
About: Mega Man 2
Value
{
"lineage": "changed",
"from": "mega-man/audio-processing",
"to": "mega-man-2/audio-processing",
"bytes": 824
}audio/engine.asm#L876-L900INXmm2: Mega Man 2 disassembly (lsmmega/mm2) · audio/engine.asm#L866-L888STA SQ1_SWEEP, Xmm1: Mega Man disassembly (lsmmega/mm1) · audio/engine.asm#L409-L961_audio_processing:mm2: Mega Man 2 disassembly (lsmmega/mm2) · audio/engine.asm#L399-L949_audio_processing:Mega Man (USA) · 0x1124f-0x11588 — bank 4 $923F-$9578Mega Man 2 (USA) · 0x30245-0x3057c — bank 12 $8235-$856CChecked by claude, 2026-10-23 — diffed both disassemblies' cited lines at their pins (four lines of Mega Man's differ) and compared the two ROM ranges byte by byte; every other differing byte is an address operandMega 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. mega-man-code-lineage/mm1-mm2-audio-sfx-reader
About: Mega Man 2 Sound effects
Value
{
"lineage": "relocated",
"from": "mega-man/audio-sfx-reader",
"to": "mega-man-2/audio-sfx-reader",
"bytes": 327
}audio/engine.asm#L963-L1164_handle_sfx:mm2: Mega Man 2 disassembly (lsmmega/mm2) · audio/engine.asm#L951-L1152_handle_sfx:Mega Man (USA) · 0x11589-0x116cf — bank 4 $9579-$96BFMega Man 2 (USA) · 0x3057d-0x306c3 — bank 12 $856D-$86B3Checked by claude, 2026-10-23 — diffed both disassemblies' cited lines at their pins (no line differs) and compared the two ROM ranges byte by byte; every differing byte is a ROM addressMega 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. mega-man-code-lineage/mm1-mm2-audio-music-reader
About: Mega Man 2 Music driver
Value
{
"lineage": "relocated",
"from": "mega-man/audio-music-reader",
"to": "mega-man-2/audio-music-reader",
"bytes": 705
}audio/engine.asm#L1166-L1633_music_playingmulticheck:mm2: Mega Man 2 disassembly (lsmmega/mm2) · audio/engine.asm#L1154-L1621_music_playingmulticheck:Mega Man (USA) · 0x116d0-0x11990 — bank 4 $96C0-$9980Mega Man 2 (USA) · 0x306c4-0x30984 — bank 12 $86B4-$8974Checked by claude, 2026-10-23 — diffed both disassemblies' cited lines at their pins (no line differs) and compared the two ROM ranges byte by byte; every differing byte is a ROM address or its high or low halfMega 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. mega-man-code-lineage/mm1-mm2-audio-tables
About: Mega Man 2 Music driver
Value
{
"lineage": "changed",
"from": "mega-man/audio-tables",
"to": "mega-man-2/audio-tables",
"bytes": 219
}constants/audio.asm#L117nEb1 = $059Emm2: Mega Man 2 disassembly (lsmmega/mm2) · constants/audio.asm#L117nEb1 = $0594mm1: Mega Man disassembly (lsmmega/mm1) · audio/engine.asm#L1635-L1755_base_note_table:mm2: Mega Man 2 disassembly (lsmmega/mm2) · audio/engine.asm#L1623-L1743_base_note_table:Mega Man (USA) · 0x11991-0x11a6f — bank 4 $9981-$9A5FMega Man 2 (USA) · 0x30985-0x30a5f — bank 12 $8975-$8A4FChecked by claude, 2026-10-23 — diffed both disassemblies' cited lines and note constants at their pins and compared the two ROM ranges byte by byte; the one differing table byte is the low byte of nEb1; cents computed as 1200 log2(1439/1429)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. mega-man-code-lineage/mm1-mm2-joy
About: Mega Man 2 Controller reading
Value
{
"lineage": "relocated",
"from": "mega-man/joy",
"to": "mega-man-2/joy",
"bytes": 30
}home/joy.asm#L1-L22ROR z:zjoy1_pressed, Xmm2: Mega Man 2 disassembly (lsmmega/mm2) · home/joy.asm#L1-L22ROR z:zjoy1_pressed, Xmm2: Mega Man 2 disassembly (lsmmega/mm2) · ram/ram.asm#L35-L39zjoy1_pressed = $23Mega Man (USA) · 0x1d59d-0x1d5ba — bank 7 $D58D-$D5AAMega Man 2 (USA) · 0x3d0e7-0x3d104 — bank 15 $D0D7-$D0F4Checked by claude, 2026-10-23 — diffed both disassemblies' cited lines at their pins (no line differs) and compared the two ROM ranges byte by byte; the three differing bytes are the zero-page operands of zjoy1_pressed_bits and zjoy1_pressedMega 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. mega-man-code-lineage/mm1-mm2-object-tiles
About: Mega Man 2 CHR RAM
Value
{
"lineage": "changed",
"from": "mega-man/object-tiles",
"to": "mega-man-2/object-tiles-update",
"bytes": 26
}home/object_tiles.asm#L1-L54BEQ _object_tiles_update_yellow_devilmm2: Mega Man 2 disassembly (lsmmega/mm2) · home/object_tiles.asm#L1-L14_object_tiles_update:Mega Man (USA) · 0x1d5bb-0x1d619 — bank 7 $D5AB-$D609Mega Man 2 (USA) · 0x3d1ef-0x3d208 — bank 15 $D1DF-$D1F8Checked by claude, 2026-10-23 — diffed both disassemblies' cited lines at their pins and compared the copy loop's bytes in both ROMs; they differ only in RAM operandsMega 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. mega-man-code-lineage/mm1-mm2-scrolling-vertical
About: Mega Man 2
Value
{
"lineage": "changed",
"from": "mega-man/scrolling",
"to": "mega-man-2/scrolling",
"bytes": 246
}home/scrolling.asm#L93-L278_scrolling_up_down:mm1: Mega Man disassembly (lsmmega/mm1) · home/scrolling.asm#L152-L186JSR _special_blockset_collisionmm2: Mega Man 2 disassembly (lsmmega/mm2) · home/scrolling.asm#L103-L240_scrolling_vertical:mm2: Mega Man 2 disassembly (lsmmega/mm2) · home/scrolling.asm#L161-L168ADC #>stage_mapset_pointermm1: Mega Man disassembly (lsmmega/mm1) · home/scrolling.asm#L1-L3_xycoord_to_ppu_address:mm2: Mega Man 2 disassembly (lsmmega/mm2) · home/scrolling.asm#L1-L3_scrolling_horizontal:Mega Man (USA) · 0x1cf33-0x1d075 — bank 7 $CF23-$D065, _scrolling_up_downMega Man 2 (USA) · 0x3ca26-0x3cb1b — bank 15 $CA16-$CB0B, _scrolling_verticalChecked by claude, 2026-10-23 — diffed the two routines at their pins line by line; read the first lines of both regions, which hold different routinesMega 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. mega-man-code-lineage/mm1-mm2-nmi-wait
About: Mega Man 2
Value
{
"lineage": "changed",
"from": "mega-man/nmi-wait",
"to": "mega-man-2/nmi-wait",
"bytes": 129
}home/nmi_wait.asm#L1-L46LDA z:zjoy1_force_pressed_flagmm2: Mega Man 2 disassembly (lsmmega/mm2) · home/nmi_wait.asm#L1-L73JSR _background_paletteMega Man (USA) · 0x1c02b-0x1c069 — bank 7 $C01B-$C059Mega Man 2 (USA) · 0x3c08f-0x3c10f — bank 15 $C07F-$C0FFChecked by claude, 2026-10-23 — read both disassemblies' cited lines side by side at their pinsMega 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. mega-man-code-lineage/mm1-mm2-explosion-tables
About: Mega Man 2 Enemy explosion
Value
{
"lineage": "identical",
"from": "mega-man/create-explosion",
"to": "mega-man-2/create-explosion",
"bytes": 60
}home/create_explosion.asm#L1-L100explosion_object_xcoord_speed_fraction:mm2: Mega Man 2 disassembly (lsmmega/mm2) · home/create_explosion.asm#L1-L111@xcoord_speed_fraction_table:Mega Man (USA) · 0x1f89a-0x1f8d5 — bank 7 $F88A-$F8C5, the five tablesMega Man 2 (USA) · 0x3c3fb-0x3c436 — bank 15 $C3EB-$C426, the five tablesChecked by claude, 2026-10-23 — read both disassemblies' cited lines at their pins; the two ROM ranges have equal digestsBoth 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. mega-man-code-lineage/mm1-mm2-bankswitch
About: Mega Man 2 PRG bank switching
Value
{
"lineage": "rewritten",
"from": "mega-man/bankswitch",
"to": "mega-man-2/bankswitch",
"bytes": 81
}home/bankswitch.asm#L1-L25STA uxrom_prg_bank, Xmm2: Mega Man 2 disassembly (lsmmega/mm2) · home/bankswitch.asm#L1-L45STA mmc1_prg_bankMega Man (USA) · 0x1c3ac-0x1c3ce — bank 7 $C39C-$C3BEMega Man 2 (USA) · 0x3c010-0x3c060 — bank 15 $C000-$C050Checked by claude, 2026-10-23 — read both disassemblies' cited lines side by side at their pinsBoth 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. mega-man-code-lineage/mm1-mm2-stage-loop
About: Mega Man 2 Game loop
Value
{
"lineage": "rewritten",
"from": "mega-man/stage-loop",
"to": "mega-man-2/stage-start-main-loop",
"bytes": 273
}engine/stage_loop.asm#L1-L99_stage_loop_pause:mm2: Mega Man 2 disassembly (lsmmega/mm2) · engine/main.asm#L110-L248JSR _home_open_menuMega Man (USA) · 0x1516e-0x15216 — bank 5 $915E-$9206Mega Man 2 (USA) · 0x380bb-0x381cb — bank 14 $80AB-$81BBChecked by claude, 2026-10-23 — read both disassemblies' cited lines side by side at their pinsThe 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. mega-man-code-lineage/mm1-mm2-metalman-map
About: Mega Man 2 Level loading
Value
{
"lineage": "identical",
"from": "mega-man/cutman-wily1-map",
"to": "mega-man-2/metalman-map",
"bytes": 1024
}stages/cutman_wily1/cutman_wily1_mapset.asm#L161-L319mapset_cutman_wily1_0c:mm1: Mega Man disassembly (lsmmega/mm1) · stages/cutman_wily1/cutman_wily1_screen_id.asm#L1-L45;wily1 screen id setmm2: Mega Man 2 disassembly (lsmmega/mm2) · stages/metalman/metalman_mapset.asm#L241-L439mapset_metalman_1c:Mega Man (USA) · 0x7d0-0xbcf — bank 0 $87C0-$8BBF, screens $0C-$1BMega Man 2 (USA) · 0x18c10-0x1900f — bank 6 $8C00-$8FFF, screens $1C-$2BChecked by claude, 2026-10-24 — read both mapset files' screen labels at their pins; the two ROM ranges have equal digests, as do Mega Man 0xad0-0xbcf and Mega Man 2 0x18b10-0x18c0f; screen owners from Mega Man's screen listsTiles 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. mega-man-code-lineage/mm1-mm2-title-tiles
About: Mega Man 2
Value
{
"lineage": "identical",
"from": "mega-man/title-tiles",
"to": "mega-man-2/opening-title-tiles",
"bytes": 1344
}stages.asm#L157.INCBIN "gfx/title/title.chr"mm2: Mega Man 2 disassembly (lsmmega/mm2) · miscellaneous.asm#L49-L52.INCBIN "gfx/title/title.chr"Mega Man (USA) · 0xe820-0xed5f — bank 3 $A810-$AD4FMega Man 2 (USA) · 0x27020-0x2755f — bank 9 $B010-$B54FChecked by claude, 2026-10-24 — both ranges start one tile into the file each build includes as gfx/title/title.chr (Mega Man 2's at $B000, after the 512-byte opening set); equal digestsMega 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. mega-man-code-lineage/mm1-mm2-ready-tiles
About: Mega Man 2
Value
{
"lineage": "changed",
"from": "mega-man/b0-menu-font-tiles",
"to": "mega-man-2/ready-font-tiles",
"bytes": 80
}stages.asm#L21.INCBIN "gfx/sprites/miscellaneous/ready_font.chr"mm2: Mega Man 2 disassembly (lsmmega/mm2) · miscellaneous.asm#L31.INCBIN "gfx/sprites/miscellaneous/ready_font.chr"Mega Man (USA) · 0x3670-0x36bf — bank 0 $B660-$B6AFMega Man 2 (USA) · 0x24470-0x244bf — bank 9 $8460-$84AFChecked by claude, 2026-10-24 — both builds include gfx/sprites/miscellaneous/ready_font.chr (five tiles, from the BMPs' sizes); compared the two ROM ranges byte by byte, tile by tile; each Mega Man tile's first 8 bytes are the matching Mega Man 2 tile's last 8, and the other halves are zeroMega 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. mega-man-code-lineage/mm2-mm3-divide
About: Mega Man 3 Enemy targeting
Value
{
"lineage": "changed",
"from": "mega-man-2/divide",
"to": "mega-man-3/divide",
"bytes": 103
}home/divide.asm#L1-L69STX z:z09Mega Man 3 (U), annotated ca65 disassembly (plasticsmoke) · src/fixed/movement.asm#L1269-L1363stx $01 ; update remainder lowMega Man 2 (USA) · 0x3c85e-0x3c8c0 — bank 15 $C84E-$C8B0Mega Man 3 (USA) · 0x3fcfb-0x3fd61 — bank 31 $FCEB-$FD51Checked by claude, 2026-10-25 — read both disassemblies' cited lines at their pins and disassembled both ROM ranges side by side; they differ in RAM operands, the STX/LDX $09 pair, and the store after the subtractionDoc 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. mega-man-code-lineage/mm2-mm3-air-tornado-tables
About: Mega Man 3
Value
{
"lineage": "identical",
"from": "mega-man-2/airman-ai",
"to": "mega-man-3/doc-air",
"bytes": 155
}engine/bosses_ai.asm#L522-L558@air_shooter_distance_timer:Mega Man 3 (U), annotated ca65 disassembly (plasticsmoke) · src/bank05_doc_robot_b.asm#L954-L976doc_air_tornado_lifetime_data:Mega Man 2 (USA) · 0x2c38e-0x2c428 — bank 11 $837E-$8418Mega Man 3 (USA) · 0xa70b-0xa7a5 — bank 5 $A6FB-$A795Checked by claude, 2026-10-25 — equal digests over the two ranges; read both disassemblies' table lines at their pinsMega 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). mega-man-code-lineage/mm2-mm3-player-tiles
About: Mega Man 3
Value
{
"lineage": "identical",
"from": "mega-man-2/heatman-wily1-sprite-tiles-l11",
"to": "mega-man-3/chr-player-and-weapon-sprites",
"bytes": 384
}stages.asm#L11-L11gfx/sprites/miscellaneous/megaman_capsule_e_tank_bullet_mega_buster.chrMega Man 3 (U), annotated ca65 disassembly (plasticsmoke) · src/chr.asm#L1-L2.incbin "../chr/chr.bin"Mega Man 2 (USA) · 0x1210-0x138f — bank 0 $9200-$937F, tiles $20-$37 of the set at $9000Mega Man 3 (USA) · 0x40210-0x4038f — CHR $00200-$0037F, tiles $20-$37 of 1 KB bank $00Checked by claude, 2026-10-25 — equal digests over the two ranges; compared all 128 tiles of each 2 KB set one by one with a scriptThe 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). mega-man-code-lineage/mm2-mm3-stage-sprite-tiles
About: Mega Man 3
Value
{
"lineage": "identical",
"from": "mega-man-2/heatman-wily1-sprite-tiles-l11",
"to": "mega-man-3/chr-stage-sprites",
"bytes": 336
}stages.asm#L11-L11gfx/sprites/miscellaneous/megaman_capsule_e_tank_bullet_mega_buster.chrMega Man 3 (U), annotated ca65 disassembly (plasticsmoke) · src/chr.asm#L1-L2.incbin "../chr/chr.bin"Mega Man 2 (USA) · 0x16c0-0x180f — bank 0 $96B0-$97FF, tiles $6B-$7F of the set at $9000Mega Man 3 (USA) · 0x420c0-0x4220f — CHR $020B0-$021FF, tiles $0B-$1F of 1 KB bank $08Checked by claude, 2026-10-25 — equal digests over the two ranges; compared tiles $00-$1F of all 128 of Mega Man 3's 1 KB CHR banks with Mega Man 2's tiles $60-$7F with a scriptMega 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). mega-man-code-lineage/mm2-mm3-title-tiles
About: Mega Man 3
Value
{
"lineage": "identical",
"from": "mega-man-2/opening-title-tiles",
"to": "mega-man-3/chr-title-background",
"bytes": 256
}miscellaneous.asm#L51-L52gfx/title/title.chrMega Man 3 (U), annotated ca65 disassembly (plasticsmoke) · src/chr.asm#L1-L2.incbin "../chr/chr.bin"Mega Man 2 (USA) · 0x271b0-0x272af — bank 9 $B1A0-$B29F, tiles $1A-$29 of the title setMega Man 3 (USA) · 0x5db10-0x5dc0f — CHR $1DB00-$1DBFF, tiles $30-$3F of 1 KB bank $76Checked by claude, 2026-10-25 — equal digests over the two ranges; looked up each of Mega Man 3's 128 tiles in Mega Man 2's 128-tile set with a scriptMega 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). mega-man-code-lineage/mm2-mm3-font-3-tiles
About: Mega Man 3
Value
{
"lineage": "identical",
"from": "mega-man-2/font-3",
"to": "mega-man-3/chr-wily-background-b",
"bytes": 160
}miscellaneous.asm#L48-L48gfx/font/font_3.chrMega Man 3 (U), annotated ca65 disassembly (plasticsmoke) · src/chr.asm#L1-L2.incbin "../chr/chr.bin"Mega Man 2 (USA) · 0x26c20-0x26cbf — bank 9 $AC10-$ACAF, tiles $01-$0A of the setMega Man 3 (USA) · 0x598c0-0x5995f — CHR $198B0-$1994F, tiles $0B-$14 of 1 KB bank $66Checked by claude, 2026-10-25 — equal digests over the two ranges; looked up each tile of the bank in Mega Man 2's 32-tile set with a scriptMega 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). mega-man-code-lineage/mm2-mm3-wily-bow-tiles
About: Mega Man 3
Value
{
"lineage": "identical",
"from": "mega-man-2/wily-sprite-tiles-b8",
"to": "mega-man-3/chr-screen-sprites",
"bytes": 96
}miscellaneous.asm#L24-L24gfx/sprites/dr_wily/dogeza.chrMega Man 3 (U), annotated ca65 disassembly (plasticsmoke) · src/chr.asm#L1-L2.incbin "../chr/chr.bin"Mega Man 2 (USA) · 0x23a20-0x23a7f — bank 8 $BA10-$BA6F, tiles $01-$06 of the setMega Man 3 (USA) · 0x4f210-0x4f26f — CHR $0F200-$0F25F, tiles $20-$25 of 1 KB bank $3CChecked by claude, 2026-10-25 — equal digests over the two ranges; looked up each tile of the bank in Mega Man 2's 32-tile set with a scriptMega 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). mega-man-code-lineage/mm2-mm3-boss-sprite-tiles
About: Mega Man 3
Value
{
"lineage": "identical",
"from": "mega-man-2/metalman-sprite-tiles-l199",
"to": "mega-man-3/chr-doc-robot-sprites",
"bytes": 144
}stages.asm#L196-L200gfx/sprites/bosses/woodman.chrmm2: Mega Man 2 disassembly (lsmmega/mm2) · stages.asm#L177-L177gfx/sprites/bosses/crashman.chrMega Man 3 (U), annotated ca65 disassembly (plasticsmoke) · src/chr.asm#L1-L2.incbin "../chr/chr.bin"Mega Man 2 (USA) · 0x1b160-0x1b1ef — bank 6 $B150-$B1DF, in Wood Man's setMega Man 3 (USA) · 0x48b00-0x48b8f — CHR $08AF0-$08B7F, tiles $2F-$37 of 1 KB bank $22Checked by claude, 2026-10-25 — equal digests over the two ranges; looked up each tile of banks $21 and $22 in the three Mega Man 2 sets with a scriptMega 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. mega-man-code-lineage/mm2-mm3-spawn-check
About: Mega Man 3 Enemy spawning
Value
{
"lineage": "changed",
"from": "mega-man-2/find-objects",
"to": "mega-man-3/enemy-spawn-check",
"bytes": 128
}home/find_objects.asm#L1-L54DEC z:zleft_checkpoint_enemies_indexmm2: Mega Man 2 disassembly (lsmmega/mm2) · home/find_objects.asm#L97-L131INC z:zright_checkpoint_enemies_indexmm2: Mega Man 2 disassembly (lsmmega/mm2) · home/find_objects.asm#L55-L96JSR _generate_itemsmm2: Mega Man 2 disassembly (lsmmega/mm2) · home/find_objects.asm#L174-L200_generate_enemies:Mega Man 3 (U), annotated ca65 disassembly (plasticsmoke) · src/bank1A_1B_oam_sequences.asm#L1017-L1101check_new_enemies:Mega Man 3 (U), annotated ca65 disassembly (plasticsmoke) · src/bank1A_1B_oam_sequences.asm#L1103-L1170spawn_enemyMega Man 2 (USA) · 0x3d668-0x3d814 — bank 15 $D658-$D804Mega Man 3 (USA) · 0x35c10-0x35c8f — bank 26 $9C00-$9C7FChecked by claude, 2026-10-25 — read both disassemblies' cited lines at their pins and disassembled both ROM ranges side by side; the enemy loops match opcode for opcode, operands asideBoth 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. mega-man-code-lineage/mm2-mm3-sound-driver
About: Mega Man 3
Value
{
"lineage": "rewritten",
"from": "mega-man-2/audio-control",
"to": "mega-man-3/sound-driver-entry",
"bytes": 108
}home/track_queue.asm#L1-L9CPY #$10mm2: Mega Man 2 disassembly (lsmmega/mm2) · audio/engine.asm#L1598-L1622_calc_note_length:Mega Man 3 (U), annotated ca65 disassembly (plasticsmoke) · src/bank16_sound_driver.asm#L1-L15Always loaded as a pair with bank $17Mega Man 3 (U), annotated ca65 disassembly (plasticsmoke) · src/bank16_sound_driver.asm#L82-L115read_ptr_bank18_check:Mega Man 3 (U), annotated ca65 disassembly (plasticsmoke) · src/bank16_sound_driver.asm#L216-L249snd_priorityMega Man 3 (U), annotated ca65 disassembly (plasticsmoke) · src/fixed/system.asm#L448-L478process_frame_sound_check:Mega Man 2 (USA) · 0x30010-0x30244 — bank 12 $8000-$8234Mega Man 3 (USA) · 0x2c010-0x2c07b — bank 22 $8000-$806BChecked by claude, 2026-10-25 — read both disassemblies' cited lines side by side at their pinsBoth 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. mega-man-code-lineage/mm2-mm3-read-controllers
About: Mega Man 3 Controller reading
Value
{
"lineage": "rewritten",
"from": "mega-man-2/joy",
"to": "mega-man-3/read-controllers",
"bytes": 88
}home/joy.asm#L1-L22ROR z:zjoy1_pressed, Xmm2: Mega Man 2 disassembly (lsmmega/mm2) · home/nmi_wait.asm#L1-L24EOR z:zjoy1_pressed_frameMega Man 3 (U), annotated ca65 disassembly (plasticsmoke) · src/fixed/ppu_utils.asm#L124-L188read_ctrl_cancel_opposite_loop:Mega Man 2 (USA) · 0x3d0e7-0x3d104 — bank 15 $D0D7-$D0F4Mega Man 3 (USA) · 0x3c555-0x3c5ac — bank 30 $C545-$C59CChecked by claude, 2026-10-25 — read both disassemblies' cited lines side by side at their pinsBoth 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. mega-man-code-lineage/mm2-mm3-bank-switch
About: Mega Man 3 PRG bank switching
Value
{
"lineage": "rewritten",
"from": "mega-man-2/bankswitch",
"to": "mega-man-3/select-prg-banks",
"bytes": 37
}home/bankswitch.asm#L1-L45STA mmc1_prg_bankMega Man 3 (U), annotated ca65 disassembly (plasticsmoke) · src/fixed/system.asm#L427-L478process_frame_race_condition:Mega Man 2 (USA) · 0x3c010-0x3c060 — bank 15 $C000-$C050Mega Man 3 (USA) · 0x3ff7b-0x3ff9f — bank 31 $FF6B-$FF8FChecked by claude, 2026-10-25 — read both disassemblies' cited lines side by side at their pinsBoth 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. mega-man-code-lineage/mm2-mm3-nmi
About: Mega Man 3 Game loop
Value
{
"lineage": "rewritten",
"from": "mega-man-2/nmi",
"to": "mega-man-3/nmi",
"bytes": 231
}home/nmi.asm#L1-L134LDA z:zmecha_dragon_xcoordMega Man 3 (U), annotated ca65 disassembly (plasticsmoke) · src/fixed/nmi.asm#L1-L134sta MMC3_IRQ_LATCHMega Man 2 (USA) · 0x3d000-0x3d0e6 — bank 15 $CFF0-$D0D6Mega Man 3 (USA) · 0x3c010-0x3c0f6 — bank 30 $C000-$C0E6Checked by claude, 2026-10-25 — read both disassemblies' cited lines side by side at their pins and disassembled both ROM rangesBoth 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. mega-man-code-lineage/mm2-mm3-frame-loop
About: Mega Man 3
Value
{
"lineage": "rewritten",
"from": "mega-man-2/nmi-wait",
"to": "mega-man-3/task-scheduler",
"bytes": 146
}home/nmi_wait.asm#L1-L24LDA z:znmi_waitmm2: Mega Man 2 disassembly (lsmmega/mm2) · engine/main.asm#L210-L248JSR _run_enemies_aiMega Man 3 (U), annotated ca65 disassembly (plasticsmoke) · src/fixed/system.asm#L232-L300task_scheduler_restore_sp:Mega Man 3 (U), annotated ca65 disassembly (plasticsmoke) · src/fixed/game_loop.asm#L252-L363jsr process_frame_yield_with_playerMega Man 2 (USA) · 0x3c08f-0x3c10f — bank 15 $C07F-$C0FFMega Man 3 (USA) · 0x3feba-0x3ff4b — bank 31 $FEAA-$FF3BChecked by claude, 2026-10-25 — read both disassemblies' cited lines side by side at their pinsBoth 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. mega-man-code-lineage/mm2-mm3-movers-gravity
About: Mega Man 3 Gravity
Value
{
"lineage": "rewritten",
"from": "mega-man-2/enemy-collide-and-move",
"to": "mega-man-3/gravity-mover",
"bytes": 132
}home.asm#L84-L89.INCBIN "home/home_45.bin"mm2: Mega Man 2 disassembly (lsmmega/mm2) · engine/check_object_horizontal_move.asm#L1-L202_check_object_horizontal_move:Mega Man 3 (U), annotated ca65 disassembly (plasticsmoke) · src/fixed/movement.asm#L1-L60Shared by player (slot 0) and enemies.Mega Man 3 (U), annotated ca65 disassembly (plasticsmoke) · src/fixed/movement.asm#L170-L239move_vertical_gravity:Mega Man 2 (USA) · 0x3eec6-0x3efbe — bank 15 $EEB6-$EFAEMega Man 3 (USA) · 0x3f68c-0x3f70f — bank 31 $F67C-$F6FFChecked by claude, 2026-10-25 — disassembled Mega Man 2's ROM range, which its disassembly includes as binary, and read Mega Man 3's disassembly at its pinBoth 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. mega-man-code-lineage/mm2-mm3-tile-collision
About: Mega Man 3 Tile collision
Value
{
"lineage": "rewritten",
"from": "mega-man-2/tsa-collision",
"to": "mega-man-3/tile-check-vertical",
"bytes": 333
}home/tsa_collision.asm#L1-L141LDA tsa_blockset_table, XMega Man 3 (U), annotated ca65 disassembly (plasticsmoke) · src/fixed/collision.asm#L181-L300and #$F0 ; upper nibble = collision typeMega Man 2 (USA) · 0x3cbd3-0x3cc7b — bank 15 $CBC3-$CC6BMega Man 3 (USA) · 0x3e9f3-0x3eb3f — bank 31 $E9E3-$EB2FChecked by claude, 2026-10-25 — read both disassemblies' cited lines side by side at their pinsBoth 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. mega-man-code-lineage/mm2-mm3-stage-select
About: Mega Man 3
Value
{
"lineage": "rewritten",
"from": "mega-man-2/stage-select",
"to": "mega-man-3/stage-select-input",
"bytes": 298
}engine/stage_select.asm#L1-L100JSR _stage_select_setMega Man 3 (U), annotated ca65 disassembly (plasticsmoke) · src/bank18_stage_select.asm#L990-L1100cursor_selector_sprite_load_loop:Mega Man 2 (USA) · 0x34025-0x34367 — bank 13 $8015-$8357Mega Man 3 (USA) · 0x311fc-0x31325 — bank 24 $B1EC-$B315Checked by claude, 2026-10-25 — read both disassemblies' cited lines side by side at their pinsMega Man 4's sound bank opens with Mega Man 3's entry jumps, multiply, and sound-data read, at the same addresses; only the two bank numbers the read maps differ: the overflow data bank, $18 in Mega Man 3 and $1D in Mega Man 4, and the data bank it restores, $17 and $1F. mega-man-code-lineage/mm3-mm4-sound-driver-entry
About: Mega Man 4 Music driver
Value
{
"lineage": "changed",
"from": "mega-man-3/sound-driver-entry",
"to": "mega-man-4/sound-driver-entry",
"bytes": 108
}src/bank16_sound_driver.asm#L1-L115read_ptr: sty snd_ptr_loMega Man 3 (U), annotated ca65 disassembly (plasticsmoke) · src/bank16_sound_driver.asm#L97-L115lda #$18 ; bank $18 for overflow dataMega Man 4 (U), annotated ca65 disassembly (plasticsmoke) · src/bank1E.asm#L1-L92L_803A:Mega Man 4 (U), annotated ca65 disassembly (plasticsmoke) · src/bank1E.asm#L68-L88LDA #$1DMega Man 3 (USA) · 0x2c010-0x2c07b — bank 22 $8000-$806BMega Man 4 (USA) (Rev 1) · 0x3c010-0x3c07b — bank 30 $8000-$806BChecked by claude, 2026-10-24 — compared the two ROM ranges byte by byte (two bytes differ, both bank numbers) and read both disassemblies' read routines at their pinsMega Man 4's per-frame sound tick is Mega Man 3's sound_driver_update, byte for byte at the same address. mega-man-code-lineage/mm3-mm4-sound-driver-update
About: Mega Man 4
Value
{
"lineage": "identical",
"from": "mega-man-3/sound-driver-update",
"to": "mega-man-4/sound-driver-update",
"bytes": 146
}src/bank16_sound_driver.asm#L117-L201sound_driver_update:Mega Man 4 (U), annotated ca65 disassembly (plasticsmoke) · src/bank1E.asm#L93-L192L_806C:Mega Man 3 (USA) · 0x2c07c-0x2c10d — bank 22 $806C-$80FDMega Man 4 (USA) (Rev 1) · 0x3c07c-0x3c10d — bank 30 $806C-$80FDChecked by claude, 2026-10-24 — equal digests over the two ranges, which start at sound_driver_update and L_806C in the two disassemblies at their pinsMega Man 4's routine that starts a song or an effect, and takes the stop, pause, fade, and transpose commands, is Mega Man 3's, byte for byte at the same address. mega-man-code-lineage/mm3-mm4-play-sound
About: Mega Man 4
Value
{
"lineage": "identical",
"from": "mega-man-3/play-sound",
"to": "mega-man-4/play-sound",
"bytes": 340
}src/bank16_sound_driver.asm#L203-L378play_sound_odd_frame:Mega Man 4 (U), annotated ca65 disassembly (plasticsmoke) · src/bank1E.asm#L193-L393L_80FE:Mega Man 3 (USA) · 0x2c10e-0x2c261 — bank 22 $80FE-$8251Mega Man 4 (USA) (Rev 1) · 0x3c10e-0x3c261 — bank 30 $80FE-$8251Checked by claude, 2026-10-24 — equal digests over the two ranges, which hold play_sound_odd_frame and L_80FE in the two disassemblies at their pinsMega Man 4's sound effect reader is Mega Man 3's (labeled parse_music_data there), byte for byte at the same address. mega-man-code-lineage/mm3-mm4-sfx-reader
About: Mega Man 4 Sound effects
Value
{
"lineage": "identical",
"from": "mega-man-3/music-parser",
"to": "mega-man-4/sfx-stream",
"bytes": 321
}src/bank16_sound_driver.asm#L380-L543parse_music_data:Mega Man 4 (U), annotated ca65 disassembly (plasticsmoke) · src/bank1E.asm#L394-L584L_8252:Mega Man 3 (USA) · 0x2c262-0x2c3a2 — bank 22 $8252-$8392Mega Man 4 (USA) (Rev 1) · 0x3c262-0x3c3a2 — bank 30 $8252-$8392Checked by claude, 2026-10-24 — equal digests over the two ranges, which start at parse_music_data and L_8252 in the two disassemblies at their pinsMega Man 4's music track reader is Mega Man 3's (labeled process_sfx_channel there), byte for byte at the same address, so the two games read the same track format. mega-man-code-lineage/mm3-mm4-music-reader
About: Mega Man 4 Music driver
Value
{
"lineage": "identical",
"from": "mega-man-3/sfx-channel",
"to": "mega-man-4/music-track-reader",
"bytes": 587
}src/bank16_sound_driver.asm#L545-L831process_sfx_channel:Mega Man 4 (U), annotated ca65 disassembly (plasticsmoke) · src/bank1E.asm#L585-L915L_8393:Mega Man 3 (USA) · 0x2c3a3-0x2c5ed — bank 22 $8393-$85DDMega Man 4 (USA) (Rev 1) · 0x3c3a3-0x3c5ed — bank 30 $8393-$85DDChecked by claude, 2026-10-24 — equal digests over the two ranges, which start at process_sfx_channel and L_8393 in the two disassemblies at their pinsMega Man 4's note-to-pitch routines are Mega Man 3's, byte for byte at the same address. mega-man-code-lineage/mm3-mm4-note-frequency
About: Mega Man 4 Music driver
Value
{
"lineage": "identical",
"from": "mega-man-3/note-frequency",
"to": "mega-man-4/note-frequency",
"bytes": 220
}src/bank16_sound_driver.asm#L833-L940note_to_frequency:Mega Man 4 (U), annotated ca65 disassembly (plasticsmoke) · src/bank1E.asm#L916-L1036L_85DE:Mega Man 3 (USA) · 0x2c5ee-0x2c6c9 — bank 22 $85DE-$86B9Mega Man 4 (USA) (Rev 1) · 0x3c5ee-0x3c6c9 — bank 30 $85DE-$86B9Checked by claude, 2026-10-24 — equal digests over the two ranges, which start at note_to_frequency and L_85DE in the two disassemblies at their pinsMega Man 4's volume envelope and fade code is Mega Man 3's, byte for byte at the same address. mega-man-code-lineage/mm3-mm4-volume-envelope
About: Mega Man 4 Music driver
Value
{
"lineage": "identical",
"from": "mega-man-3/volume-envelope",
"to": "mega-man-4/volume-envelope",
"bytes": 379
}src/bank16_sound_driver.asm#L942-L1133update_volume_envelope:Mega Man 4 (U), annotated ca65 disassembly (plasticsmoke) · src/bank1E.asm#L1037-L1263L_86BA:Mega Man 3 (USA) · 0x2c6ca-0x2c844 — bank 22 $86BA-$8834Mega Man 4 (USA) (Rev 1) · 0x3c6ca-0x3c844 — bank 30 $86BA-$8834Checked by claude, 2026-10-24 — equal digests over the two ranges, which start at update_volume_envelope and L_86BA in the two disassemblies at their pinsMega Man 4's code that writes each channel's pitch to the APU, with vibrato, detune, and slides, is Mega Man 3's, byte for byte at the same address. mega-man-code-lineage/mm3-mm4-frequency-output
About: Mega Man 4 Music driver
Value
{
"lineage": "identical",
"from": "mega-man-3/frequency-output",
"to": "mega-man-4/frequency-output",
"bytes": 224
}src/bank16_sound_driver.asm#L1134-L1246write_freq_to_apu:Mega Man 4 (U), annotated ca65 disassembly (plasticsmoke) · src/bank1E.asm#L1264-L1388L_8835:Mega Man 3 (USA) · 0x2c845-0x2c924 — bank 22 $8835-$8914Mega Man 4 (USA) (Rev 1) · 0x3c845-0x3c924 — bank 30 $8835-$8914Checked by claude, 2026-10-24 — equal digests over the two ranges, which start at write_freq_to_apu and L_8835 in the two disassemblies at their pinsMega Man 4's sound driver tables, through the note period table, are Mega Man 3's at the same addresses; the 37 bytes after it ($8A1B-$8A3F), all zero in Mega Man 3, hold data in Mega Man 4. mega-man-code-lineage/mm3-mm4-sound-driver-tables
About: Mega Man 4 Music driver
Value
{
"lineage": "changed",
"from": "mega-man-3/sound-driver-tables",
"to": "mega-man-4/sound-driver-tables",
"bytes": 299
}src/bank16_sound_driver.asm#L1248-L1290frequency_scale_factors_table:Mega Man 4 (U), annotated ca65 disassembly (plasticsmoke) · src/bank1E.asm#L1390-L1427; --- $8A19: (between tables) ---Mega Man 3 (USA) · 0x2c925-0x2ca4f — bank 22 $8915-$8A3FMega Man 4 (USA) (Rev 1) · 0x3c925-0x3ca4f — bank 30 $8915-$8A3FChecked by claude, 2026-10-24 — compared the two ROM ranges byte by byte (the first 262 match; 27 of the last 37 differ, from $8A1B, where Mega Man 3 has only zeros) and read both disassemblies' table ends at their pinsMega Man 4's controller read, which works out the new presses and cancels opposite directions, is Mega Man 3's read_controllers, byte for byte. mega-man-code-lineage/mm3-mm4-read-controllers
About: Mega Man 4 Controller reading
Value
{
"lineage": "identical",
"from": "mega-man-3/read-controllers",
"to": "mega-man-4/read-controllers",
"bytes": 88
}src/fixed/ppu_utils.asm#L124-L188read_controllers:Mega Man 4 (U), annotated ca65 disassembly (plasticsmoke) · src/fixed/fixed_nmi_irq.asm#L646-L717L_C37D:Mega Man 3 (USA) · 0x3c555-0x3c5ac — bank 30 $C545-$C59CMega Man 4 (USA) (Rev 1) · 0x7c38d-0x7c3e4 — bank 62 $C37D-$C3D4Checked by claude, 2026-10-24 — equal digests over the two ranges; read both disassemblies' cited lines at their pinsMega Man 4's routine that fills a name table and its attributes with one value is Mega Man 3's fill_nametable, byte for byte. mega-man-code-lineage/mm3-mm4-fill-nametable
About: Mega Man 4 Forced blanking
Value
{
"lineage": "identical",
"from": "mega-man-3/fill-nametable",
"to": "mega-man-4/fill-nametable",
"bytes": 76
}src/fixed/ppu_utils.asm#L190-L246fill_nametable:Mega Man 4 (U), annotated ca65 disassembly (plasticsmoke) · src/fixed/fixed_ppu_util.asm#L1-L65L_C3D5:Mega Man 3 (USA) · 0x3c5ad-0x3c5f8 — bank 30 $C59D-$C5E8Mega Man 4 (USA) (Rev 1) · 0x7c3e5-0x7c430 — bank 62 $C3D5-$C420Checked by claude, 2026-10-24 — equal digests over the two ranges; read both disassemblies' cited lines at their pinsMega Man 4's name table buffer flush is Mega Man 3's drain_ppu_buffer, byte for byte (37 bytes). Mega Man 4 follows it with four short routines: two that change PPUCTRL and two that turn rendering off and on. mega-man-code-lineage/mm3-mm4-ppu-buffer
About: Mega Man 4 VRAM buffer
Value
{
"lineage": "identical",
"from": "mega-man-3/drain-ppu-buffer",
"to": "mega-man-4/nametable-flush-ppu-control",
"bytes": 37
}src/fixed/ppu_utils.asm#L1-L45drain_ppu_buffer:Mega Man 4 (U), annotated ca65 disassembly (plasticsmoke) · src/fixed/fixed_nmi_irq.asm#L569-L644L_C369:Mega Man 3 (USA) · 0x3c508-0x3c52c — bank 30 $C4F8-$C51CMega Man 4 (USA) (Rev 1) · 0x7c340-0x7c364 — bank 62 $C330-$C354Checked by claude, 2026-10-24 — equal digests over the two ranges; read both disassemblies' cited lines at their pins, and Mega Man 4's added routines after L_C354Mega Man 4's cooperative task scheduler, with its routines to start, kill, and yield tasks, is Mega Man 3's task_scheduler instruction for instruction; it sits 5 bytes lower, and only its jump and call addresses differ. mega-man-code-lineage/mm3-mm4-task-scheduler
About: Mega Man 4 Game loop
Value
{
"lineage": "relocated",
"from": "mega-man-3/task-scheduler",
"to": "mega-man-4/task-scheduler",
"bytes": 146
}src/fixed/system.asm#L232-L378task_scheduler: ldx #$FFMega Man 4 (U), annotated ca65 disassembly (plasticsmoke) · src/fixed/fixed_system.asm#L1562-L1726L_FEA5:Mega Man 3 (USA) · 0x3feba-0x3ff4b — bank 31 $FEAA-$FF3BMega Man 4 (USA) (Rev 1) · 0x7feb5-0x7ff46 — bank 63 $FEA5-$FF36Checked by claude, 2026-10-24 — compared the two ROM ranges instruction by instruction (nine differing operands, all absolute addresses of code) and read both disassemblies' cited lines at their pinsMega Man 4's enemy spawn engine is Mega Man 3's check_new_enemies instruction for instruction, moved from bank 26 at $9C00 to bank 56 at $8000; only the addresses of the stage's placement tables and one zero-page variable ($2E in Mega Man 3, $2F in Mega Man 4) differ. mega-man-code-lineage/mm3-mm4-spawn-engine
About: Mega Man 4 Enemy spawning
Value
{
"lineage": "relocated",
"from": "mega-man-3/enemy-spawn-check",
"to": "mega-man-4/spawn-engine",
"bytes": 128
}src/bank1A_1B_oam_sequences.asm#L1017-L1101check_new_enemies:Mega Man 4 (U), annotated ca65 disassembly (plasticsmoke) · src/bank38.asm#L1-L97L_8000:Mega Man 3 (USA) · 0x35c10-0x35c8f — bank 26 $9C00-$9C7FMega Man 4 (USA) (Rev 1) · 0x70010-0x7008f — bank 56 $8000-$807FChecked by claude, 2026-10-24 — compared the two ROM ranges instruction by instruction (eleven differing absolute operands, all table addresses, and one zero-page operand) and read both disassemblies' cited lines at their pinsMega Man 4's first boss door routine follows Mega Man 3's close_boss_door step for step: the door sound, then four 16x16 blocks of tiles and attributes through the same buffer, one every 4 frames. Mega Man 4 runs it from the fixed bank, with the stage's bank mapped at $A000, and reads the door's addresses and tiles from fixed places in that bank ($B570-$B57B), where Mega Man 3 indexes tables in its door bank by the door's number. mega-man-code-lineage/mm3-mm4-boss-door-close
About: Mega Man 4 Area transition
Value
{
"lineage": "changed",
"from": "mega-man-3/boss-door-close",
"to": "mega-man-4/boss-door-animation",
"bytes": 207
}src/bank10_boss_doors.asm#L1-L180close_boss_door:Mega Man 4 (U), annotated ca65 disassembly (plasticsmoke) · src/fixed/fixed_nametable_update.asm#L792-L898LDA $B570Mega Man 3 (USA) · 0x20010-0x200e2 — bank 16 $8000-$80D2Mega Man 4 (USA) (Rev 1) · 0x7e692-0x7e760 — bank 63 $E682-$E750Checked by claude, 2026-10-24 — read both routines side by side at their pins and compared their bytesMega Man 4's second boss door routine follows Mega Man 3's open_boss_door the same way, with the same changes: it runs from the fixed bank and reads its door's data from $B57C-$B587 in the stage's bank. mega-man-code-lineage/mm3-mm4-boss-door-open
About: Mega Man 4 Area transition
Value
{
"lineage": "changed",
"from": "mega-man-3/boss-door-open",
"to": "mega-man-4/boss-door-animation",
"bytes": 195
}src/bank10_boss_doors.asm#L234-L329open_boss_door:Mega Man 4 (U), annotated ca65 disassembly (plasticsmoke) · src/fixed/fixed_nametable_update.asm#L899-L996LDA $B57CMega Man 3 (USA) · 0x20203-0x202bf — bank 16 $81F3-$82AFMega Man 4 (USA) (Rev 1) · 0x7e761-0x7e823 — bank 63 $E751-$E813Checked by claude, 2026-10-24 — read both routines side by side at their pins and compared their bytesMega Man 4's four routines that push an entity out of a wall, ceiling, or floor after a tile hit are Mega Man 3's snap_x_to_wall_right, snap_x_to_wall_left, snap_y_to_ceil, and snap_y_to_floor instruction for instruction; only the addresses of the entity position arrays differ. Mega Man 3 follows them with two calls into its boss door bank, which Mega Man 4 doesn't have there. mega-man-code-lineage/mm3-mm4-wall-snap
About: Mega Man 4 Tile collision
Value
{
"lineage": "relocated",
"from": "mega-man-3/wall-snap",
"to": "mega-man-4/tile-alignment",
"bytes": 102
}src/fixed/collision.asm#L558-L642snap_x_to_wall_right: lda $12Mega Man 4 (U), annotated ca65 disassembly (plasticsmoke) · src/fixed/fixed_tile_collision.asm#L1895-L1989L_D99E:Mega Man 3 (USA) · 0x3eddb-0x3ee40 — bank 31 $EDCB-$EE30Mega Man 4 (USA) (Rev 1) · 0x7d9af-0x7da14 — bank 62 $D99F-$DA04Checked by claude, 2026-10-24 — compared the two ROM ranges instruction by instruction (every differing operand is an entity array address) and read both disassemblies' cited lines at their pinsMega Man 4's four routines that move an entity by its speed and stop it at a wall, floor, or ceiling follow Mega Man 3's move_right_collide, move_left_collide, move_down_collide, and move_up_collide step for step. Each saves the player's position before the move, checks for a platform, pushes the player off it, and on a push that crosses a screen retries with the opposite side's tile check. Two things changed. Each tile check is one call, where Mega Man 3 calls its tile check and then update_collision_flags. And when the right mover hits a solid tile, Mega Man 4 first copies $45 to $3F for the player, which its disassembly reads as the ground tile type. Two of the screen-crossing tests also test their two flags in the other order, to the same effect. mega-man-code-lineage/mm3-mm4-collide-movers
About: Mega Man 4 Tile collision
Value
{
"lineage": "changed",
"from": "mega-man-3/collide-movers",
"to": "mega-man-4/entity-movers",
"bytes": 248
}src/fixed/movement.asm#L1-L168move_right_collide:Mega Man 4 (U), annotated ca65 disassembly (plasticsmoke) · src/fixed/fixed_entity_physics.asm#L1-L239load ground tile typeMega Man 3 (USA) · 0x3f590-0x3f68b — bank 31 $F580-$F67BMega Man 4 (USA) (Rev 1) · 0x7f010-0x7f107 — bank 63 $F000-$F0F7Checked by claude, 2026-10-25 — read both disassemblies' cited lines side by side at their pins and compared the two ROM ranges instruction by instruction304 bytes of Mega Man 3's default sprite position offsets, $A078-$A1A7 of its bank $19, are byte for byte in Mega Man 4's player animation bank $0C at $97BE-$98ED. They are position sets $08-$17 in both games' pointer tables: sixteen lists of signed Y and X offsets, one pair per tile, 4 to 12 tiles each. mega-man-code-lineage/mm3-mm4-sprite-offsets
About: Mega Man 4
Value
{
"lineage": "identical",
"from": "mega-man-3/sprite-offsets-default",
"to": "mega-man-4/anim-0c-player-sprite-data",
"bytes": 304
}src/bank19_sprite_offsets.asm#L57-L103sprite def $08 (8 tiles)Mega Man 3 (U), annotated ca65 disassembly (plasticsmoke) · src/fixed/sprites.asm#L307-L312subtract 2 to align with def bytesMega Man 4 (U), annotated ca65 disassembly (plasticsmoke) · src/bank0C.asm#L409-L428$97B0Mega Man 4 (U), annotated ca65 disassembly (plasticsmoke) · src/bank0C.asm#L22-L24$BC00/$BD00Mega Man 3 (USA) · 0x32088-0x321b7 — bank 25 $A078-$A1A7Mega Man 4 (USA) (Rev 1) · 0x197ce-0x198fd — bank 12 $97BE-$98EDChecked by claude, 2026-10-25 — equal digests over the two ranges, found by a byte-run scan over both ROMs; read both games' pointer tables for the sets that point into the ranges, and both sprite drawers' use of them (each subtracts 2 from the pointer and reads from the third byte)Mega Man 4's routines that move an entity by its speed without checking tiles, and apply gravity, follow Mega Man 3's with the entity arrays moved, and with four changes. Mega Man 4 drops Mega Man 3's routine that sets a behind-the-background flag from the tile hit. Its gravity tests one flag at $43 first, where Mega Man 3 tests for the player and then a flag at $B9. It drops Mega Man 3's exemption, for one animation ($13), from the cap on falling speed. And when gravity resets, it sets one speed ($FF00) for every entity, where Mega Man 3 sets $FFC0 for the player and $FFAB for the rest. mega-man-code-lineage/mm3-mm4-plain-movers
About: Mega Man 4 Gravity
Value
{
"lineage": "changed",
"from": "mega-man-3/plain-movers",
"to": "mega-man-4/plain-movers",
"bytes": 258
}src/fixed/movement.asm#L241-L433update_collision_flags:Mega Man 4 (U), annotated ca65 disassembly (plasticsmoke) · src/fixed/fixed_entity_physics.asm#L447-L654L_F22D:Mega Man 3 (USA) · 0x3f710-0x3f844 — bank 31 $F700-$F834Mega Man 4 (USA) (Rev 1) · 0x7f23d-0x7f33e — bank 63 $F22D-$F32EChecked by claude, 2026-10-24 — read both disassemblies' cited lines side by side at their pins and compared the two ROM ranges instruction by instructionMega Man 4's 8-bit and 16-bit division routines, used to aim enemies, are Mega Man 3's divide_8bit and its 16-bit version, byte for byte (103 bytes), at $FC14 in its fixed bank where Mega Man 3 has them at $FCEB. mega-man-code-lineage/mm3-mm4-divide
About: Mega Man 4 Enemy targeting
Value
{
"lineage": "identical",
"from": "mega-man-3/divide",
"to": "mega-man-4/entity-aim",
"bytes": 103
}src/fixed/movement.asm#L1269-L1363divide_8bit:Mega Man 4 (U), annotated ca65 disassembly (plasticsmoke) · src/fixed/fixed_system.asm#L1068-L1143; 8-bit Division (div8)Mega Man 3 (USA) · 0x3fcfb-0x3fd61 — bank 31 $FCEB-$FD51Mega Man 4 (USA) (Rev 1) · 0x7fc24-0x7fc8a — bank 63 $FC14-$FC7AChecked by claude, 2026-10-24 — equal digests over the two ranges; read both disassemblies' cited lines at their pinsMega Man 4's four routines after its name table buffer flush, two that reset or set bits of PPUCTRL and two that turn rendering off and on, are Mega Man 3's disable_nmi, dead_code_enable_nmi, rendering_off, and rendering_on instruction for instruction; only the zero-page counter the last two step differs ($EE in Mega Man 3, $EA in Mega Man 4). mega-man-code-lineage/mm3-mm4-rendering-on-off
About: Mega Man 4 Forced blanking
Value
{
"lineage": "relocated",
"from": "mega-man-3/rendering-on-off",
"to": "mega-man-4/nametable-flush-ppu-control",
"bytes": 40
}src/fixed/ppu_utils.asm#L47-L122disable_nmi:Mega Man 4 (U), annotated ca65 disassembly (plasticsmoke) · src/fixed/fixed_nmi_irq.asm#L598-L644; Reset PPUCTRL to base configuration ($C355)Mega Man 3 (USA) · 0x3c52d-0x3c554 — bank 30 $C51D-$C544Mega Man 4 (USA) (Rev 1) · 0x7c365-0x7c38c — bank 62 $C355-$C37CChecked by claude, 2026-10-24 — compared the two 40-byte ROM ranges instruction by instruction (two differing operands, both that counter) and read both disassemblies' cited lines at their pinsThe first 57 sprite tiles ($00-$38) of the set Mega Man 4 shares across its stages (912 bytes) are byte for byte the first 57 tiles of Mega Man 3's sprite CHR banks $00-$01, the set it maps throughout play. Of the first 128 tiles, 96 are the same at the same numbers. mega-man-code-lineage/mm3-mm4-sprite-tiles
About: Mega Man 4
Value
{
"lineage": "identical",
"from": "mega-man-3/chr-player-and-weapon-sprites",
"to": "mega-man-4/chr-common-sprites",
"bytes": 912
}src/chr.asm#L1-L2.incbin "../chr/chr.bin"Mega Man 4 (U), annotated ca65 disassembly (plasticsmoke) · src/bank00.asm#L1-L529CHR TILE DATA BANK $00 — graphics for the 8KBMega Man 3 (USA) · 0x40010-0x4039f — CHR $00000-$0038F, tiles $00-$38 of 1 KB bank $00Mega Man 4 (USA) (Rev 1) · 0x10-0x39f — bank 0 $8000-$838FChecked by claude, 2026-10-24 — equal digests over the two ranges; compared all 128 tiles of each 2 KB set one by one with a scriptMega Man 4 has Mega Man 3's 26 letter tiles, A to Z, byte for byte (416 bytes), in its bank 19 at $9800. Mega Man 3 has two copies, in its password screen tiles (after its digits 0 to 9) and in its stage start sprite tiles; Mega Man 4's digits before them differ. mega-man-code-lineage/mm3-mm4-letter-tiles
About: Mega Man 4
Value
{
"lineage": "identical",
"from": "mega-man-3/chr-password-background",
"to": "mega-man-4/chr-wily1-background",
"bytes": 416
}src/chr.asm#L1-L2.incbin "../chr/chr.bin"Mega Man 4 (U), annotated ca65 disassembly (plasticsmoke) · src/bank13.asm#L1-L527CHR TILE DATA BANK $13 — graphics for the 8KBMega Man 3 (USA) · 0x5f0b0-0x5f24f — CHR $1F0A0-$1F23F, tiles $0A-$23 of 1 KB bank $7CMega Man 4 (USA) (Rev 1) · 0x27810-0x279af — bank 19 $9800-$999FChecked by claude, 2026-10-24 — equal digests over the two ranges; drew Mega Man 3's tiles $00, $09, $0A, $0B, $23 as text from the ROM with a script (0, 9, A, B, Z), and found the same 416 bytes in its CHR banks $74-$75Mega Man 4's bank 20 holds, at $8800-$8FFF, Mega Man 3's 128 title screen background tiles (CHR banks $76-$77), the same in all but two: tiles $20 and $2F, which in Mega Man 4 are plain outlined squares. mega-man-code-lineage/mm3-mm4-title-tiles
About: Mega Man 4
Value
{
"lineage": "changed",
"from": "mega-man-3/chr-title-background",
"to": "mega-man-4/chr-menu-and-cossack-map-background",
"bytes": 2048
}src/chr.asm#L1-L2.incbin "../chr/chr.bin"Mega Man 4 (U), annotated ca65 disassembly (plasticsmoke) · src/bank14.asm#L1-L528CHR TILE DATA BANK $14 — graphics for the 8KBMega Man 3 (USA) · 0x5d810-0x5e00f — CHR $1D800-$1DFFF, 1 KB banks $76-$77Mega Man 4 (USA) (Rev 1) · 0x28810-0x2900f — bank 20 $8800-$8FFFChecked by claude, 2026-10-24 — compared the two 2 KB ranges tile by tile with a script (126 equal) and drew the two differing tiles of each as textMega Man 5's sound bank, bank $18, opens with Mega Man 4's entry jumps, multiply, and sound-data read at the same addresses; only the two bank numbers the read maps differ: the overflow data bank, $1D in Mega Man 4 and $1A in Mega Man 5, and the data bank it restores, $1F and $19. mega-man-code-lineage/mm4-mm5-sound-driver-entry
About: Mega Man 5 Music driver
Value
{
"lineage": "changed",
"from": "mega-man-4/sound-driver-entry",
"to": "mega-man-5/sound-driver-entry",
"bytes": 108
}src/bank1E.asm#L1-L92L_803A:Mega Man 4 (U), annotated ca65 disassembly (plasticsmoke) · src/bank1E.asm#L68-L88LDA #$1DMega Man 5 (U), annotated ca65 disassembly (plasticsmoke) · src/bank18.asm#L1-L153L803A:Mega Man 5 (U), annotated ca65 disassembly (plasticsmoke) · src/bank18.asm#L136-L153lda #$1AMega Man 4 (USA) (Rev 1) · 0x3c010-0x3c07b — bank 30 $8000-$806BMega Man 5 (USA) · 0x30010-0x3007b — bank 24 $8000-$806BChecked by claude, 2026-10-24 — compared the two ROM ranges byte by byte (two bytes differ, both bank numbers) and read both disassemblies' read routines at their pinsMega Man 5's per-frame sound tick is Mega Man 4's, byte for byte at the same address. mega-man-code-lineage/mm4-mm5-sound-driver-update
About: Mega Man 5
Value
{
"lineage": "identical",
"from": "mega-man-4/sound-driver-update",
"to": "mega-man-5/sound-driver-update",
"bytes": 146
}src/bank1E.asm#L93-L192L_806C:Mega Man 5 (U), annotated ca65 disassembly (plasticsmoke) · src/bank18.asm#L155-L252snd_update:Mega Man 4 (USA) (Rev 1) · 0x3c07c-0x3c10d — bank 30 $806C-$80FDMega Man 5 (USA) · 0x3007c-0x3010d — bank 24 $806C-$80FDChecked by claude, 2026-10-24 — equal digests over the two ranges, which start at L_806C and snd_update in the two disassemblies at their pinsMega Man 5's routine that starts a song or an effect, and takes the stop, pause, fade, and transpose commands, is Mega Man 4's, byte for byte at the same address. mega-man-code-lineage/mm4-mm5-play-sound
About: Mega Man 5
Value
{
"lineage": "identical",
"from": "mega-man-4/play-sound",
"to": "mega-man-5/play-sound",
"bytes": 340
}src/bank1E.asm#L193-L393L_80FE:Mega Man 5 (U), annotated ca65 disassembly (plasticsmoke) · src/bank18.asm#L254-L466snd_play:Mega Man 4 (USA) (Rev 1) · 0x3c10e-0x3c261 — bank 30 $80FE-$8251Mega Man 5 (USA) · 0x3010e-0x30261 — bank 24 $80FE-$8251Checked by claude, 2026-10-24 — equal digests over the two ranges, which start at L_80FE and snd_play in the two disassemblies at their pinsMega Man 5's sound effect reader is Mega Man 4's, byte for byte at the same address. mega-man-code-lineage/mm4-mm5-sfx-reader
About: Mega Man 5 Sound effects
Value
{
"lineage": "identical",
"from": "mega-man-4/sfx-stream",
"to": "mega-man-5/sfx-stream",
"bytes": 321
}src/bank1E.asm#L394-L584L_8252:Mega Man 5 (U), annotated ca65 disassembly (plasticsmoke) · src/bank18.asm#L468-L659L8252:Mega Man 4 (USA) (Rev 1) · 0x3c262-0x3c3a2 — bank 30 $8252-$8392Mega Man 5 (USA) · 0x30262-0x303a2 — bank 24 $8252-$8392Checked by claude, 2026-10-24 — equal digests over the two ranges, which start at L_8252 and L8252 in the two disassemblies at their pinsMega Man 5's music track reader is Mega Man 4's, byte for byte at the same address. mega-man-code-lineage/mm4-mm5-music-reader
About: Mega Man 5 Music driver
Value
{
"lineage": "identical",
"from": "mega-man-4/music-track-reader",
"to": "mega-man-5/music-track-reader",
"bytes": 587
}src/bank1E.asm#L585-L915L_8393:Mega Man 5 (U), annotated ca65 disassembly (plasticsmoke) · src/bank18.asm#L661-L1014L8393:Mega Man 4 (USA) (Rev 1) · 0x3c3a3-0x3c5ed — bank 30 $8393-$85DDMega Man 5 (USA) · 0x303a3-0x305ed — bank 24 $8393-$85DDChecked by claude, 2026-10-24 — equal digests over the two ranges, which start at L_8393 and L8393 in the two disassemblies at their pinsMega Man 5's note-to-pitch routines is Mega Man 4's, byte for byte at the same address. mega-man-code-lineage/mm4-mm5-note-frequency
About: Mega Man 5 Music driver
Value
{
"lineage": "identical",
"from": "mega-man-4/note-frequency",
"to": "mega-man-5/note-frequency",
"bytes": 220
}src/bank1E.asm#L916-L1036L_85DE:Mega Man 5 (U), annotated ca65 disassembly (plasticsmoke) · src/bank18.asm#L1016-L1140L85DE:Mega Man 4 (USA) (Rev 1) · 0x3c5ee-0x3c6c9 — bank 30 $85DE-$86B9Mega Man 5 (USA) · 0x305ee-0x306c9 — bank 24 $85DE-$86B9Checked by claude, 2026-10-24 — equal digests over the two ranges, which start at L_85DE and L85DE in the two disassemblies at their pinsMega Man 5's volume envelope and fade code is Mega Man 4's, byte for byte at the same address. mega-man-code-lineage/mm4-mm5-volume-envelope
About: Mega Man 5 Music driver
Value
{
"lineage": "identical",
"from": "mega-man-4/volume-envelope",
"to": "mega-man-5/volume-envelope",
"bytes": 379
}src/bank1E.asm#L1037-L1263L_86BA:Mega Man 5 (U), annotated ca65 disassembly (plasticsmoke) · src/bank18.asm#L1142-L1352L86BA:Mega Man 4 (USA) (Rev 1) · 0x3c6ca-0x3c844 — bank 30 $86BA-$8834Mega Man 5 (USA) · 0x306ca-0x30844 — bank 24 $86BA-$8834Checked by claude, 2026-10-24 — equal digests over the two ranges, which start at L_86BA and L86BA in the two disassemblies at their pinsMega Man 5's code that writes each channel's pitch to the APU, with vibrato, detune, and slides, is Mega Man 4's, byte for byte at the same address. mega-man-code-lineage/mm4-mm5-frequency-output
About: Mega Man 5 Music driver
Value
{
"lineage": "identical",
"from": "mega-man-4/frequency-output",
"to": "mega-man-5/frequency-output",
"bytes": 224
}src/bank1E.asm#L1264-L1388L_8835:Mega Man 5 (U), annotated ca65 disassembly (plasticsmoke) · src/bank18.asm#L1353-L1471L8835:Mega Man 4 (USA) (Rev 1) · 0x3c845-0x3c924 — bank 30 $8835-$8914Mega Man 5 (USA) · 0x30845-0x30924 — bank 24 $8835-$8914Checked by claude, 2026-10-24 — equal digests over the two ranges, which start at L_8835 and L8835 in the two disassemblies at their pinsMega Man 5's sound driver tables, through the note period table, are Mega Man 4's at the same addresses. The 37 bytes after it ($8A1B-$8A3F), which hold data in Mega Man 4, are all zero in Mega Man 5, as in Mega Man 3. mega-man-code-lineage/mm4-mm5-sound-driver-tables
About: Mega Man 5 Music driver
Value
{
"lineage": "changed",
"from": "mega-man-4/sound-driver-tables",
"to": "mega-man-5/sound-driver-tables",
"bytes": 299
}src/bank1E.asm#L1390-L1427; --- $8A19: (between tables) ---Mega Man 5 (U), annotated ca65 disassembly (plasticsmoke) · src/bank18.asm#L1473-L1499L8959:Mega Man 5 (U), annotated ca65 disassembly (plasticsmoke) · src/bank18.asm#L1497-L1499; 8A1AMega Man 4 (USA) (Rev 1) · 0x3c925-0x3ca4f — bank 30 $8915-$8A3FMega Man 5 (USA) · 0x30925-0x30a4f — bank 24 $8915-$8A3FChecked by claude, 2026-10-24 — compared the two ROM ranges byte by byte (the first 262 match; 27 of the last 37 differ, from $8A1B, where Mega Man 5 has only zeros) and read both disassemblies' table ends at their pinsMega Man 5's fixed-bank routine that adds a sound to the queue is Mega Man 4's, byte for byte (27 bytes), at $EC5B where Mega Man 4 has it at $F6BC. mega-man-code-lineage/mm4-mm5-queue-sound
About: Mega Man 5 Sound effects
Value
{
"lineage": "identical",
"from": "mega-man-4/queue-sound",
"to": "mega-man-5/queue-sound",
"bytes": 27
}src/fixed/fixed_system.asm#L1-L30L_F6BC:Mega Man 5 (U), annotated ca65 disassembly (plasticsmoke) · src/fixed_bank.asm#L5323-L5339queue_sound_param:Mega Man 4 (USA) (Rev 1) · 0x7f6cc-0x7f6e6 — bank 63 $F6BC-$F6D6Mega Man 5 (USA) · 0x3ec6b-0x3ec85 — bank 31 $EC5B-$EC75Checked by claude, 2026-10-24 — equal digests over the two ranges; read both disassemblies' cited lines at their pinsMega Man 5's four routines that push an object out of a wall, ceiling, or floor after a tile hit are Mega Man 4's, byte for byte but for one instruction: after a ceiling hit, Mega Man 5 clears the carry before adding where Mega Man 4 sets it, so the object ends one pixel higher than in Mega Man 4. Mega Man 5 follows them with four new routines that move an object along X or Y by the amount in $10 or $11 and compare its position with one saved in $02-$03. mega-man-code-lineage/mm4-mm5-tile-snap
About: Mega Man 5 Tile collision
Value
{
"lineage": "changed",
"from": "mega-man-4/tile-alignment",
"to": "mega-man-5/position-nudges",
"bytes": 216
}src/fixed/fixed_tile_collision.asm#L1895-L1989L_D99E:Mega Man 5 (U), annotated ca65 disassembly (plasticsmoke) · src/fixed_bank.asm#L5635-L5746LEEAF:Mega Man 4 (USA) (Rev 1) · 0x7d9ae-0x7da14 — bank 62 $D99E-$DA04Mega Man 5 (USA) · 0x3eebf-0x3ef96 — bank 31 $EEAF-$EF86Checked by claude, 2026-10-24 — compared the two ROM ranges byte by byte (Mega Man 4's range opens with a shape byte, $05, that Mega Man 5's lacks; then one byte differs, SEC $38 against CLC $18, and Mega Man 5 adds 114 bytes) and read both disassemblies' cited lines at their pinsMega Man 5's routines that move an object right, left, down, or up and then check tiles, and for the player the platforms it stands on, follow Mega Man 4's with three changes besides addresses. The facing flag they set or clear is bit 5 of the object's flags, where Mega Man 4 uses bit 6. A right-wall hit no longer copies the player's ground tile type from $45 to $3F. And before a vertical move, Mega Man 5 saves the player's vertical screen in $03, where Mega Man 4 saves its horizontal screen. mega-man-code-lineage/mm4-mm5-entity-movers
About: Mega Man 5 Tile collision
Value
{
"lineage": "changed",
"from": "mega-man-4/entity-movers",
"to": "mega-man-5/entity-movers",
"bytes": 240
}src/fixed/fixed_entity_physics.asm#L1-L239L_F000:Mega Man 5 (U), annotated ca65 disassembly (plasticsmoke) · src/fixed_bank.asm#L4641-L4775entity_move_right:Mega Man 4 (USA) (Rev 1) · 0x7f010-0x7f107 — bank 63 $F000-$F0F7Mega Man 5 (USA) · 0x3e6d7-0x3e7c6 — bank 31 $E6C7-$E7B6Checked by claude, 2026-10-24 — read both disassemblies' cited lines side by side at their pins and compared the two ROM ranges byte by byteMega Man 5's routines that move an object by its speed without checking tiles, and apply gravity, follow Mega Man 4's, with the gravity amount at $A1 instead of $99 and these changes. Eight bytes before the left mover clear the facing bit and fall into it. The player's gravity is skipped whenever a flag at $52 is set, where Mega Man 4 skips it only while a timer at $43 counts down. And Mega Man 5 adds four routines after them, one of which adds gravity to the vertical speed instead of subtracting it, capped at 7 pixels a frame. mega-man-code-lineage/mm4-mm5-plain-movers
About: Mega Man 5 Gravity
Value
{
"lineage": "changed",
"from": "mega-man-4/plain-movers",
"to": "mega-man-5/entity-collide-movers",
"bytes": 345
}src/fixed/fixed_entity_physics.asm#L447-L654L_F22D:Mega Man 5 (U), annotated ca65 disassembly (plasticsmoke) · src/fixed_bank.asm#L4936-L5108entity_move_right_collide:Mega Man 4 (USA) (Rev 1) · 0x7f23d-0x7f33e — bank 63 $F22D-$F32EMega Man 5 (USA) · 0x3e8f6-0x3ea4e — bank 31 $E8E6-$EA3EChecked by claude, 2026-10-24 — read both disassemblies' cited lines side by side at their pins and compared the two ROM ranges byte by byteMega Man 5's routines for an object's distance to the player on each axis, and the direction to him in 16 steps, are Mega Man 4's, with two changes. It adds two routines that measure the same two distances to another slot's object. And its direction routine starts by setting Y to 0, the player's slot, and falls into the copy of slot Y's position, where Mega Man 4 has a separate entry that copies the player's position and jumps on. The rest is byte for byte, except the address of the 48-byte direction table, which is the same in both and follows the code directly in Mega Man 5. mega-man-code-lineage/mm4-mm5-distance-and-direction
About: Mega Man 5 Enemy targeting
Value
{
"lineage": "changed",
"from": "mega-man-4/distance-and-direction",
"to": "mega-man-5/distance-and-direction",
"bytes": 181
}src/fixed/fixed_system.asm#L32-L203L_F6FD:Mega Man 5 (U), annotated ca65 disassembly (plasticsmoke) · src/fixed_bank.asm#L5340-L5447entity_distance_calc:Mega Man 4 (USA) (Rev 1) · 0x7f6e7-0x7f7b5 — bank 63 $F6D7-$F7A5Mega Man 5 (USA) · 0x3ec86-0x3ed3a — bank 31 $EC76-$ED2AChecked by claude, 2026-10-25 — read both disassemblies' cited lines side by side at their pins and compared the ROM ranges byte by byte (the two axis routines, the 88 bytes from the direction routine's subtraction to its return, and the table)Mega Man 5's two checks for a platform object that the player meets moving vertically or horizontally, and their two distance helpers, follow Mega Man 4's test for test. Both walk the slots down from $17 and skip empty, off-screen, and non-solid ones. A one-way platform only catches a falling player, and the push is capped at 8 pixels. The changes: both checks also give up unless the moving object's own Y screen is 0. The horizontal check skips objects of type $02. The helper reads both of the shape's sizes from two tables through X, which it then sets to 0, the player's slot, where Mega Man 4 looks up the second size in the vertical check itself. The smaller box for a sliding player is chosen by player_state $02, where Mega Man 4 tests the player's sub-type for $10. And the horizontal distance helper no longer masks the screen difference to one bit. The four routines that push the player off a platform, which close Mega Man 4's region, sit after the position nudges in Mega Man 5. mega-man-code-lineage/mm4-mm5-platform-collision
About: Mega Man 5
Value
{
"lineage": "changed",
"from": "mega-man-4/platform-collision",
"to": "mega-man-5/platform-collision",
"bytes": 288
}src/fixed/fixed_system.asm#L240-L523is player sliding? ($10)Mega Man 5 (U), annotated ca65 disassembly (plasticsmoke) · src/fixed_bank.asm#L5482-L5634LED8F:Mega Man 4 (USA) (Rev 1) · 0x7f7e8-0x7f96c — bank 63 $F7D8-$F95CMega Man 5 (USA) · 0x3ed9f-0x3eebe — bank 31 $ED8F-$EEAEChecked by claude, 2026-10-25 — read both disassemblies' cited lines side by side at their pins and compared them instruction by instruction; found Mega Man 4's push routines' bytes in Mega Man 5's ROMMega Man 5's spawn engine walks its stage's spawn list ahead of and behind the camera with Mega Man 4's code, instruction for instruction; only the addresses differ: the stage's placement tables, the two list cursors ($9E and $9F in Mega Man 4, $AD and $AE in Mega Man 5), the scroll direction flag ($2F, $AC), and the four window temporaries, two bytes higher. mega-man-code-lineage/mm4-mm5-spawn-engine
About: Mega Man 5 Enemy spawning
Value
{
"lineage": "relocated",
"from": "mega-man-4/spawn-engine",
"to": "mega-man-5/spawn-engine",
"bytes": 128
}src/bank38.asm#L1-L97L_8000:Mega Man 5 (U), annotated ca65 disassembly (plasticsmoke) · src/bank1B.asm#L3280-L3352spawn_engine:Mega Man 4 (USA) (Rev 1) · 0x70010-0x7008f — bank 56 $8000-$807FMega Man 5 (USA) · 0x3789a-0x37919 — bank 27 $988A-$9909Checked by claude, 2026-10-24 — compared the two 128-byte ROM ranges instruction by instruction (eleven differing absolute operands, all table addresses or the call to the entry routine, and 21 zero-page operands) and read both disassemblies' cited lines at their pinsMega Man 5's routine that spawns an enemy from a spawn list entry follows Mega Man 4's step for step: the same checks for a live copy and the no-respawn bitmap, and the same slot fill from the entry's position and the parameter tables for its code, with the tables and temporaries at other addresses. It changes two things: it keeps the spawn code in the object's $0510 byte, which Mega Man 4 clears, and it masks bit 7 off the flags parameter and, when that bit is clear, ends by calling entity_facing_to_flags. mega-man-code-lineage/mm4-mm5-spawn-enemy
About: Mega Man 5 Enemy spawning
Value
{
"lineage": "changed",
"from": "mega-man-4/spawn-entry",
"to": "mega-man-5/spawn-enemy",
"bytes": 173
}src/bank38.asm#L160-L239L_80DB:Mega Man 5 (U), annotated ca65 disassembly (plasticsmoke) · src/bank1B.asm#L3433-L3513spawn_enemy:Mega Man 4 (USA) (Rev 1) · 0x700eb-0x7018e — bank 56 $80DB-$817EMega Man 5 (USA) · 0x379a5-0x37a51 — bank 27 $9995-$9A41Checked by claude, 2026-10-24 — read both disassemblies' cited lines side by side at their pins and compared the two ROM ranges byte by byteMega Man 5's cooperative task scheduler is Mega Man 4's instruction for instruction; it sits 6 bytes higher, and only its jump and call addresses differ. mega-man-code-lineage/mm4-mm5-task-scheduler
About: Mega Man 5 Game loop
Value
{
"lineage": "relocated",
"from": "mega-man-4/task-scheduler",
"to": "mega-man-5/task-scheduler",
"bytes": 146
}src/fixed/fixed_system.asm#L1562-L1726L_FEA5:Mega Man 5 (U), annotated ca65 disassembly (plasticsmoke) · src/fixed_bank.asm#L6771-L6881scheduler_run:Mega Man 4 (USA) (Rev 1) · 0x7feb5-0x7ff46 — bank 63 $FEA5-$FF36Mega Man 5 (USA) · 0x3febb-0x3ff4c — bank 31 $FEAB-$FF3CChecked by claude, 2026-10-24 — compared the two ROM ranges instruction by instruction (nine differing operands, all absolute addresses of code) and read both disassemblies' cited lines at their pinsMega Man 5's name table buffer flush and the four PPU routines after it are Mega Man 4's instruction for instruction; only the zero-page counter the rendering switches step differs ($EA in Mega Man 4, $F0 in Mega Man 5). mega-man-code-lineage/mm4-mm5-ppu-flush
About: Mega Man 5 VRAM buffer
Value
{
"lineage": "relocated",
"from": "mega-man-4/nametable-flush-ppu-control",
"to": "mega-man-5/nametable-flush-ppu-control",
"bytes": 77
}src/fixed/fixed_nmi_irq.asm#L569-L644L_C330:Mega Man 5 (U), annotated ca65 disassembly (plasticsmoke) · src/fixed_bank.asm#L423-L479nametable_flush:Mega Man 4 (USA) (Rev 1) · 0x7c340-0x7c38c — bank 62 $C330-$C37CMega Man 5 (USA) · 0x3c2a8-0x3c2f4 — bank 30 $C298-$C2E4Checked by claude, 2026-10-24 — compared the two 77-byte ROM ranges instruction by instruction (two differing operands, both that counter) and read both disassemblies' cited lines at their pinsMega Man 5's controller read is Mega Man 4's, byte for byte, with one addition: before it returns, it zeroes controller 2's new presses and held buttons ($15 and $17). mega-man-code-lineage/mm4-mm5-read-controllers
About: Mega Man 5 Controller reading
Value
{
"lineage": "changed",
"from": "mega-man-4/read-controllers",
"to": "mega-man-5/read-controllers",
"bytes": 94
}src/fixed/fixed_nmi_irq.asm#L646-L717L_C37D:Mega Man 5 (U), annotated ca65 disassembly (plasticsmoke) · src/fixed_bank.asm#L481-L537read_controllers:Mega Man 4 (USA) (Rev 1) · 0x7c38d-0x7c3e4 — bank 62 $C37D-$C3D4Mega Man 5 (USA) · 0x3c2f5-0x3c352 — bank 30 $C2E5-$C342Checked by claude, 2026-10-24 — compared the two ROM ranges byte by byte (Mega Man 4's 88 bytes are Mega Man 5's first 87 and its last, with 6 bytes added before the RTS) and read both disassemblies' cited lines at their pinsMega Man 5's routine that fills a name table and its attributes with one value is Mega Man 4's, byte for byte; Mega Man 5 follows it with routines that clear the sprite buffer and the object slots. mega-man-code-lineage/mm4-mm5-fill-nametable
About: Mega Man 5 Forced blanking
Value
{
"lineage": "identical",
"from": "mega-man-4/fill-nametable",
"to": "mega-man-5/fill-and-clear",
"bytes": 76
}src/fixed/fixed_ppu_util.asm#L1-L65L_C3D5:Mega Man 5 (U), annotated ca65 disassembly (plasticsmoke) · src/fixed_bank.asm#L540-L580ppu_fill_nametable:Mega Man 4 (USA) (Rev 1) · 0x7c3e5-0x7c430 — bank 62 $C3D5-$C420Mega Man 5 (USA) · 0x3c353-0x3c39e — bank 30 $C343-$C38EChecked by claude, 2026-10-24 — equal digests over the two ranges; read both disassemblies' cited lines at their pinsMega Man 5's routine that maps the two switchable PRG banks from their shadows, and then runs a sound request that arrived while it was busy, is Mega Man 4's, byte for byte (37 bytes). Mega Man 5 enters it through 6 new bytes that set both shadows from one bank number, the bank and the one after it. mega-man-code-lineage/mm4-mm5-bank-switch
About: Mega Man 5 PRG bank switching
Value
{
"lineage": "identical",
"from": "mega-man-4/bank-switch-apply",
"to": "mega-man-5/bank-switching",
"bytes": 37
}src/fixed/fixed_system.asm#L1728-L1752L_FF37:Mega Man 5 (U), annotated ca65 disassembly (plasticsmoke) · src/fixed_bank.asm#L6883-L6911bank_load_shadow:Mega Man 4 (USA) (Rev 1) · 0x7ff47-0x7ff6b — bank 63 $FF37-$FF5BMega Man 5 (USA) · 0x3ff53-0x3ff77 — bank 31 $FF43-$FF67Checked by claude, 2026-10-24 — equal digests over the two ranges; read both disassemblies' cited lines at their pinsMega Man 5's 8-bit and 16-bit division routines are Mega Man 4's, which are Mega Man 3's, byte for byte (103 bytes), at $F207 in its fixed bank. mega-man-code-lineage/mm4-mm5-divide
About: Mega Man 5 Enemy targeting
Value
{
"lineage": "identical",
"from": "mega-man-4/entity-aim",
"to": "mega-man-5/aim-and-divide",
"bytes": 103
}src/fixed/fixed_system.asm#L1068-L1143; 8-bit Division (div8)Mega Man 5 (U), annotated ca65 disassembly (plasticsmoke) · src/fixed_bank.asm#L6064-L6131div8:Mega Man 4 (USA) (Rev 1) · 0x7fc24-0x7fc8a — bank 63 $FC14-$FC7AMega Man 5 (USA) · 0x3f217-0x3f27d — bank 31 $F207-$F26DChecked by claude, 2026-10-24 — equal digests over the two ranges; read both disassemblies' cited lines at their pinsMega Man 5's reset begins with Mega Man 4's first 98 bytes, byte for byte at the same address ($FE00-$FE61): the interrupt, sound, and rendering shutdown, the wait through four vblanks, the PPU address precharge, the RAM clear, the sound queue's empty markers, and the PPU mask shadow. From the mapper setup on, the two differ. mega-man-code-lineage/mm4-mm5-reset
About: Mega Man 5 Boot sequence
Value
{
"lineage": "identical",
"from": "mega-man-4/reset",
"to": "mega-man-5/reset",
"bytes": 98
}src/fixed/fixed_system.asm#L1433-L1514; RESET Vector Handler ($FE00)Mega Man 5 (U), annotated ca65 disassembly (plasticsmoke) · src/fixed_bank.asm#L6679-L6737reset: seiMega Man 4 (USA) (Rev 1) · 0x7fe10-0x7fe71 — bank 63 $FE00-$FE61Mega Man 5 (USA) · 0x3fe10-0x3fe71 — bank 31 $FE00-$FE61Checked by claude, 2026-10-24 — equal digests over the two ranges; read both disassemblies' cited lines at their pinsMega Man 5's CHR at $31800-$31FFF holds the 128 background tiles of Mega Man 4's bank 20 at $8800-$8FFF, byte for byte (2,048 bytes): the block Mega Man 4 took from Mega Man 3's title screen tiles, with Mega Man 4's two changed tiles. mega-man-code-lineage/mm4-mm5-title-tiles
About: Mega Man 5
Value
{
"lineage": "identical",
"from": "mega-man-4/chr-menu-and-cossack-map-background",
"to": "mega-man-5/chr-bank-18",
"bytes": 2048
}src/bank14.asm#L1-L528CHR TILE DATA BANK $14 — graphics for the 8KBMega Man 5 (U), annotated ca65 disassembly (plasticsmoke) · src/chr.asm#L9-L9.incbin "chr/chr.bin"Mega Man 4 (USA) (Rev 1) · 0x28810-0x2900f — bank 20 $8800-$8FFFMega Man 5 (USA) · 0x71810-0x7200f — CHR $31800-$31FFFChecked by claude, 2026-10-24 — equal digests over the two ranges; the Mega Man 3 to Mega Man 4 comparison is the claim mm3-mm4-title-tilesMega Man 5 has the 26 letter tiles, A to Z, that Mega Man 4 took from Mega Man 3, byte for byte (416 bytes), in its CHR at $32410. mega-man-code-lineage/mm4-mm5-letter-tiles
About: Mega Man 5
Value
{
"lineage": "identical",
"from": "mega-man-4/chr-wily1-background",
"to": "mega-man-5/chr-bank-19",
"bytes": 416
}src/bank13.asm#L1-L527CHR TILE DATA BANK $13 — graphics for the 8KBMega Man 5 (U), annotated ca65 disassembly (plasticsmoke) · src/chr.asm#L9-L9.incbin "chr/chr.bin"Mega Man 4 (USA) (Rev 1) · 0x27810-0x279af — bank 19 $9800-$999FMega Man 5 (USA) · 0x72420-0x725bf — CHR $32410-$325AFChecked by claude, 2026-10-24 — equal digests over the two ranges; the letters are identified in the claim mm3-mm4-letter-tiles52 tiles of Mega Man 4's font in bank 36 ($BB00-$BE3F), which look like Japanese kana when drawn out, are byte for byte tiles in Mega Man 5's CHR at $30300-$3063F (832 bytes). mega-man-code-lineage/mm4-mm5-kana-tiles
About: Mega Man 5
Value
{
"lineage": "identical",
"from": "mega-man-4/bank24-tail",
"to": "mega-man-5/chr-bank-18",
"bytes": 832
}src/bank24.asm#L427-L555--- $B800-$BFFF: tail dataMega Man 5 (U), annotated ca65 disassembly (plasticsmoke) · src/chr.asm#L9-L9.incbin "chr/chr.bin"Mega Man 4 (USA) (Rev 1) · 0x49b10-0x49e4f — bank 36 $BB00-$BE3FMega Man 5 (USA) · 0x70310-0x7064f — CHR $30300-$3063FChecked by claude, 2026-10-24 — equal digests over the two ranges; drew tiles $30, $31, $38, $40, $48, $50, $58, $60, and $63 of Mega Man 4's font as text from the ROM with a scriptMega Man 6's sound bank, bank $34, opens with Mega Man 5's entry jumps, multiply, and sound-data read at the same addresses; only the two bank numbers the read maps differ: the overflow data bank, $1A in Mega Man 5 and $36 in Mega Man 6, and the data bank it restores, $19 and $35. mega-man-code-lineage/mm5-mm6-sound-driver-entry
About: Mega Man 6 Music driver
Value
{
"lineage": "changed",
"from": "mega-man-5/sound-driver-entry",
"to": "mega-man-6/sound-driver-entry",
"bytes": 108
}src/bank18.asm#L1-L153L803A:Mega Man 5 (U), annotated ca65 disassembly (plasticsmoke) · src/bank18.asm#L136-L153lda #$1AMega Man 6 (NES) disassembly (refreshing-lemonade/megaman6-disassembly) · bank34.asm#L1-L75code_34803A:Mega Man 6 (NES) disassembly (refreshing-lemonade/megaman6-disassembly) · bank34.asm#L56-L75LDA #$36Mega Man 5 (USA) · 0x30010-0x3007b — bank 24 $8000-$806BMega Man 6 (USA) · 0x68010-0x6807b — bank 52 $8000-$806BChecked by claude, 2026-10-25 — compared the two ROM ranges byte by byte (two bytes differ, both bank numbers) and read both disassemblies' read routines at their pinsMega Man 6's per-frame sound tick is Mega Man 5's at the same address; three call targets differ, because the stream readers they call sit one byte lower in Mega Man 6. mega-man-code-lineage/mm5-mm6-sound-driver-update
About: Mega Man 6
Value
{
"lineage": "relocated",
"from": "mega-man-5/sound-driver-update",
"to": "mega-man-6/sound-driver-update",
"bytes": 146
}src/bank18.asm#L155-L252snd_update:Mega Man 6 (NES) disassembly (refreshing-lemonade/megaman6-disassembly) · bank34.asm#L77-L171JSR code_348251Mega Man 5 (USA) · 0x3007c-0x3010d — bank 24 $806C-$80FDMega Man 6 (USA) · 0x6807c-0x6810d — bank 52 $806C-$80FDChecked by claude, 2026-10-25 — compared the two ROM ranges byte by byte and read both disassemblies at every difference: each is an address operand or a jump-table entry (three JSR targets)Mega Man 6's sound command routine is Mega Man 5's with one change: where Mega Man 5 steps the sound's data pointer by incrementing $C1 and, on a carry, $C2 before copying it to $D0 and $D1, Mega Man 6 carries into X instead, so $C2 is left as it was, and the routine is a byte shorter. Code after it sits one byte lower, and its jumps, calls, and jump-table entries follow. mega-man-code-lineage/mm5-mm6-play-sound
About: Mega Man 6
Value
{
"lineage": "changed",
"from": "mega-man-5/play-sound",
"to": "mega-man-6/play-sound",
"bytes": 339
}src/bank18.asm#L254-L466snd_play:Mega Man 5 (U), annotated ca65 disassembly (plasticsmoke) · src/bank18.asm#L307-L313inc $C2Mega Man 6 (NES) disassembly (refreshing-lemonade/megaman6-disassembly) · bank34.asm#L173-L378code_3480FE:Mega Man 6 (NES) disassembly (refreshing-lemonade/megaman6-disassembly) · bank34.asm#L221-L229LDX $C2Mega Man 5 (USA) · 0x3010e-0x30261 — bank 24 $80FE-$8251Mega Man 6 (USA) · 0x6810e-0x68260 — bank 52 $80FE-$8250Checked by claude, 2026-10-25 — aligned the two ROM ranges byte by byte and read both disassemblies at every difference: one rewritten pointer step ($814F-$815D); the rest are address operands, branch offsets, and jump-table entriesMega Man 6's sound effect stream reader is Mega Man 5's, one byte lower ($8251 against $8252); only its call and jump targets and jump-table entries differ. mega-man-code-lineage/mm5-mm6-sfx-stream
About: Mega Man 6 Sound effects
Value
{
"lineage": "relocated",
"from": "mega-man-5/sfx-stream",
"to": "mega-man-6/sfx-stream",
"bytes": 321
}src/bank18.asm#L468-L659L8252:Mega Man 6 (NES) disassembly (refreshing-lemonade/megaman6-disassembly) · bank34.asm#L380-L571code_348251:Mega Man 5 (USA) · 0x30262-0x303a2 — bank 24 $8252-$8392Mega Man 6 (USA) · 0x68261-0x683a1 — bank 52 $8251-$8391Checked by claude, 2026-10-25 — compared the two ROM ranges byte by byte and read both disassemblies at every difference: each is an address operand or a jump-table entryMega Man 6's music track reader is Mega Man 5's, one byte lower ($8392 against $8393); only its call and jump targets, jump-table entries, and the addresses of the tables it reads differ. mega-man-code-lineage/mm5-mm6-music-track-reader
About: Mega Man 6 Music driver
Value
{
"lineage": "relocated",
"from": "mega-man-5/music-track-reader",
"to": "mega-man-6/music-track-reader",
"bytes": 587
}src/bank18.asm#L661-L1014L8393:Mega Man 6 (NES) disassembly (refreshing-lemonade/megaman6-disassembly) · bank34.asm#L573-L895code_348392:Mega Man 5 (USA) · 0x303a3-0x305ed — bank 24 $8393-$85DDMega Man 6 (USA) · 0x683a2-0x685ec — bank 52 $8392-$85DCChecked by claude, 2026-10-25 — compared the two ROM ranges byte by byte and read both disassemblies at every difference: each is an address operand or a jump-table entryMega Man 6's note-to-period lookup is Mega Man 5's, one byte lower; the only differences are the two operands that address the period table, which sits seven bytes higher in Mega Man 6 ($8960 against $8959). mega-man-code-lineage/mm5-mm6-note-frequency
About: Mega Man 6 Music driver
Value
{
"lineage": "relocated",
"from": "mega-man-5/note-frequency",
"to": "mega-man-6/note-frequency",
"bytes": 220
}src/bank18.asm#L1016-L1140L85DE:Mega Man 6 (NES) disassembly (refreshing-lemonade/megaman6-disassembly) · bank34.asm#L897-L1020code_3485DD:Mega Man 5 (USA) · 0x305ee-0x306c9 — bank 24 $85DE-$86B9Mega Man 6 (USA) · 0x685ed-0x686c8 — bank 52 $85DD-$86B8Checked by claude, 2026-10-25 — compared the two ROM ranges byte by byte and read both disassemblies at every difference: each is an address operand or a jump-table entry (two table operands)Mega Man 6's volume envelope code is Mega Man 5's, one byte lower; only its jump-table entries, call targets, and the address of the envelope step table, seven bytes higher, differ. mega-man-code-lineage/mm5-mm6-volume-envelope
About: Mega Man 6 Music driver
Value
{
"lineage": "relocated",
"from": "mega-man-5/volume-envelope",
"to": "mega-man-6/volume-envelope",
"bytes": 379
}src/bank18.asm#L1142-L1352L86BA:Mega Man 6 (NES) disassembly (refreshing-lemonade/megaman6-disassembly) · bank34.asm#L1022-L1238code_3486B9:Mega Man 5 (USA) · 0x306ca-0x30844 — bank 24 $86BA-$8834Mega Man 6 (USA) · 0x686c9-0x68843 — bank 52 $86B9-$8833Checked by claude, 2026-10-25 — compared the two ROM ranges byte by byte and read both disassemblies at every difference: each is an address operand or a jump-table entryMega Man 6's period output is Mega Man 5's with one step added: after adding the channel's signed offset at $0714 to the period, a period of zero becomes 1. The added 8 bytes push the sound tables seven bytes higher, and the routine's table operands follow. mega-man-code-lineage/mm5-mm6-frequency-output
About: Mega Man 6 Music driver
Value
{
"lineage": "changed",
"from": "mega-man-5/frequency-output",
"to": "mega-man-6/frequency-output",
"bytes": 232
}src/bank18.asm#L1353-L1471L8835:Mega Man 5 (U), annotated ca65 disassembly (plasticsmoke) · src/bank18.asm#L1387-L1399L8870:Mega Man 6 (NES) disassembly (refreshing-lemonade/megaman6-disassembly) · bank34.asm#L1239-L1368loc_68834:Mega Man 6 (NES) disassembly (refreshing-lemonade/megaman6-disassembly) · bank34.asm#L1277-L1294ORA $C1Mega Man 5 (USA) · 0x30845-0x30924 — bank 24 $8835-$8914Mega Man 6 (USA) · 0x68844-0x6892b — bank 52 $8834-$891BChecked by claude, 2026-10-25 — aligned the two ROM ranges byte by byte (8 bytes inserted at $8883) and read both disassemblies at every difference; the others are table operands and branch offsetsMega Man 6's sound tables (note lengths, octave offsets, envelope steps, octave thresholds, and the period table) are Mega Man 5's byte for byte, seven bytes higher at $891C; the zero padding after them, up to the song directory at $8A40, is seven bytes shorter. mega-man-code-lineage/mm5-mm6-sound-driver-tables
About: Mega Man 6 Music driver
Value
{
"lineage": "identical",
"from": "mega-man-5/sound-driver-tables",
"to": "mega-man-6/sound-driver-tables",
"bytes": 292
}src/bank18.asm#L1473-L1499L8915:Mega Man 6 (NES) disassembly (refreshing-lemonade/megaman6-disassembly) · bank34.asm#L1370-L1406db $02, $04, $08, $10, $20, $40, $80, $03Mega Man 5 (USA) · 0x30925-0x30a48 — bank 24 $8915-$8A38Mega Man 6 (USA) · 0x6892c-0x68a4f — bank 52 $891C-$8A3FChecked by claude, 2026-10-25 — equal digests over Mega Man 5's first 292 bytes of the tables and Mega Man 6's 292; read both disassemblies' table lines at their pinsMega Man 6's 16-bit division at $CC70 is Mega Man 5's div16 at $F22D, except that it saves X in $08 instead of $09. mega-man-code-lineage/mm5-mm6-divide-16
About: Mega Man 6
Value
{
"lineage": "relocated",
"from": "mega-man-5/aim-and-divide",
"to": "mega-man-6/divide-16",
"bytes": 65
}src/fixed_bank.asm#L6092-L6128div16:Mega Man 6 (NES) disassembly (refreshing-lemonade/megaman6-disassembly) · bank38_3F.asm#L16841-L16880STX $08Mega Man 5 (USA) · 0x3f23d-0x3f27d — bank 31 $F22D-$F26DMega Man 6 (USA) · 0x7cc80-0x7ccc0 — bank 62 $CC70-$CCB0Checked by claude, 2026-10-25 — compared the two 65-byte ranges byte by byte (two bytes differ, the zero-page address that holds X) and read both disassemblies' routines at their pinsBoth games slide the screen to a new section when Mega Man leaves by the top or bottom, but Mega Man 6's is new code. Mega Man 5 tests the player's Y ($0378) against $08 and $E8 inside its per-frame scroll update, reads the section layout from the stage bank at $A950, and steps the slide 4 pixels a frame from there; Mega Man 6's transitions are separate routines that clear the object slots, reset the spawner, and run their own loop of 120 frames for a vertical move, drawing and waiting a frame each time. mega-man-code-lineage/mm5-mm6-vertical-section-transition
About: Mega Man 6
Value
{
"lineage": "rewritten",
"from": "mega-man-5/vertical-section-transition",
"to": "mega-man-6/vertical-section-transition",
"bytes": 442
}src/fixed_bank.asm#L1733-L2116scroll_vert_update:Mega Man 5 (U), annotated ca65 disassembly (plasticsmoke) · src/fixed_bank.asm#L1767-L1772cmp #$E8Mega Man 5 (U), annotated ca65 disassembly (plasticsmoke) · src/fixed_bank.asm#L1944-L1973adc #$04Mega Man 6 (NES) disassembly (refreshing-lemonade/megaman6-disassembly) · bank38_3F.asm#L18304-L18549code_3ED7AF:Mega Man 6 (NES) disassembly (refreshing-lemonade/megaman6-disassembly) · bank38_3F.asm#L18416-L18431LDX #$78Mega Man 5 (USA) · 0x3cd20-0x3cfff — bank 30 $CD10-$CFEFMega Man 6 (USA) · 0x7d701-0x7d8ba — bank 62 $D6F1-$D8AAChecked by claude, 2026-10-25 — read both disassemblies' cited lines side by side at their pins; the two 14-byte near matches the signature scan found are look-alikes with different RAMBoth games walk a stage's sorted spawn list with two cursors, one for each side of the screen, comparing the scroll position with each entry's screen and X position, but Mega Man 6's spawner is new code. Mega Man 5 reads fixed tables in the stage bank ($A9FF, $AA7F, $AB80), keeps its cursors in $AD and $AE, and treats codes from $C0 up as palette and CHR commands; Mega Man 6 reaches each stage's lists through pointers it sets in $74-$7F from tables in bank $3A, keeps its cursors in $0649 and $064A, and skips entries whose bit in $0650 marks them used. mega-man-code-lineage/mm5-mm6-stage-spawner
About: Mega Man 6
Value
{
"lineage": "rewritten",
"from": "mega-man-5/spawn-engine",
"to": "mega-man-6/stage-spawner",
"bytes": 663
}src/bank1B.asm#L3278-L3431spawn_engine:Mega Man 5 (U), annotated ca65 disassembly (plasticsmoke) · src/bank1B.asm#L3364-L3367cmp #$C0Mega Man 6 (NES) disassembly (refreshing-lemonade/megaman6-disassembly) · bank38_3F.asm#L7582-L7760LDY $0649Mega Man 6 (NES) disassembly (refreshing-lemonade/megaman6-disassembly) · bank38_3F.asm#L7758-L7758LDA $0650,xMega Man 5 (USA) · 0x3789a-0x379a4 — bank 27 $988A-$9994Mega Man 6 (USA) · 0x74042-0x742d8 — bank 58 $8032-$82C8Checked by claude, 2026-10-25 — read both disassemblies' cited lines side by side at their pins; the 12-byte near match the signature scan found is a look-alikeMega Man 6's bank $10 holds, at $8800-$900F, the 129 tiles of Mega Man 5's CHR at $31800-$3200F (2,064 bytes), the title screen block of claim mm4-mm5-title-tiles plus one tile, with one tile changed: the 33rd ($8A00), a hollow square in Mega Man 5 and a circled R in Mega Man 6. mega-man-code-lineage/mm5-mm6-title-tiles
About: Mega Man 6
Value
{
"lineage": "changed",
"from": "mega-man-5/chr-bank-18",
"to": "mega-man-6/tiles-bank-10",
"bytes": 2064
}src/chr.asm#L9-L9.incbin "chr/chr.bin"Mega Man 6 (NES) disassembly (refreshing-lemonade/megaman6-disassembly) · bank00_28.asm#L16450-L17477bank $10Mega Man 5 (USA) · 0x71810-0x7201f — CHR $31800-$3200FMega Man 6 (USA) · 0x20810-0x2101f — bank 16 $8800-$900FChecked by claude, 2026-10-25 — compared the two ranges tile by tile with a script (one tile differs, in 8 of its 16 bytes) and drew the differing tile of both games as textMega Man 6's bank $11 holds, at $82B0-$844F, Mega Man 5's 26 letter tiles, A to Z, from its CHR at $32410 (416 bytes), with the J redrawn: its hook reaches a pixel further left. mega-man-code-lineage/mm5-mm6-letter-tiles
About: Mega Man 6
Value
{
"lineage": "changed",
"from": "mega-man-5/chr-bank-19",
"to": "mega-man-6/tiles-bank-11",
"bytes": 416
}src/chr.asm#L9-L9.incbin "chr/chr.bin"Mega Man 6 (NES) disassembly (refreshing-lemonade/megaman6-disassembly) · bank00_28.asm#L17478-L18505bank $11Mega Man 5 (USA) · 0x72420-0x725bf — CHR $32410-$325AFMega Man 6 (USA) · 0x222c0-0x2245f — bank 17 $82B0-$844FChecked by claude, 2026-10-25 — compared the two ranges tile by tile with a script (only the tenth tile differs, in 8 bytes) and drew the I and J of both games as text; the letters are identified in the claim mm4-mm5-letter-tiles116 of the 157 non-blank sprite tiles in Mega Man 6's bank $00 at $8000-$89FF (115 distinct) appear in Mega Man 5's sprite CHR at $00000-$01FFF, rearranged: the longest stretch that matches tile for tile is 11 tiles (176 bytes), Mega Man 5's tiles $0A-$14 as Mega Man 6's $0B-$15. mega-man-code-lineage/mm5-mm6-player-tiles
About: Mega Man 6
Value
{
"lineage": "identical",
"from": "mega-man-5/chr-bank-00",
"to": "mega-man-6/tiles-bank-00",
"bytes": 176
}src/chr.asm#L9-L9.incbin "chr/chr.bin"Mega Man 6 (NES) disassembly (refreshing-lemonade/megaman6-disassembly) · bank00_28.asm#L3-L49bank $00Mega Man 5 (USA) · 0x400b0-0x4015f — CHR $000A0-$0014F, tiles $0A-$14Mega Man 6 (USA) · 0xc0-0x16f — bank 0 $80B0-$815F, tiles $0B-$15Checked by claude, 2026-10-25 — equal digests over the two ranges; ran the probe, which counts the tiles of the two map regionsProbe: probes/mega-man/tile-reuse.mjsMega Man 6's background bank $11 has 83 different tiles of Mega Man 5's background CHR at $32000-$33FFF. Besides the 26 letters (claim mm5-mm6-letter-tiles), the ten tiles right before them, at $8200-$829F, are byte for byte Mega Man 5's ten tiles at $32300 (160 bytes); the rest come in stretches of up to 10 tiles. mega-man-code-lineage/mm5-mm6-screen-tiles
About: Mega Man 6
Value
{
"lineage": "identical",
"from": "mega-man-5/chr-bank-19",
"to": "mega-man-6/tiles-bank-11",
"bytes": 160
}src/chr.asm#L9-L9.incbin "chr/chr.bin"Mega Man 6 (NES) disassembly (refreshing-lemonade/megaman6-disassembly) · bank00_28.asm#L17546-L17565$118200Mega Man 5 (USA) · 0x72310-0x723af — CHR $32300-$3239FMega Man 6 (USA) · 0x22210-0x222af — bank 17 $8200-$829FChecked by claude, 2026-10-25 — equal digests over the two ranges; ran the probe, which counts the tiles of the two map regions, and listed the matching stretches with a scriptProbe: probes/mega-man/tile-reuse.mjsMega Man 6's sounds $23-$3C, the first 26 after its music, at $B758-$BAC2 of bank $36, are 22 of Mega Man 5's sounds from $1A to $3E plus four new ones ($2A-$2D). The 22 keep Mega Man 5's order, except that its $3E comes in as $2E. Seventeen are byte for byte. In the other five only addresses differ, each moved as far as the sound: one address inside each of four effects, and the four track pointers of $39, a sound with music's priority $00 (Mega Man 5's $30). Mega Man 6 leaves out 12 of Mega Man 5's $1A-$3A: $1F, $21, $23, $2B, $2F, $31-$34, and $36-$38. The Mega Man 5 disassembly's notes name two of the carried sounds, the ricochet ($1E, Mega Man 6's $27) and the hit ($2A, Mega Man 6's $35); the kill sound ($2B) is one of those left out. mega-man-code-lineage/mm5-mm6-sound-effects
About: Mega Man 6
Value
{
"lineage": "changed",
"from": "mega-man-5/sound-data-bank1a",
"to": "mega-man-6/sound-data-bank36",
"bytes": 875
}src/bank18.asm#L265-L266$00 = music trackMega Man 5 (U), annotated ca65 disassembly (plasticsmoke) · src/bank18.asm#L1504-L1504song/SFX directory: 2 bytes per id (hi,lo)Mega Man 5 (U), annotated ca65 disassembly (plasticsmoke) · src/bank1A.asm#L272-L353$8FF0Mega Man 5 (U), annotated ca65 disassembly (plasticsmoke) · ENGINE.md#L238-L238ricochet: sound `$1E`Mega Man 5 (U), annotated ca65 disassembly (plasticsmoke) · ENGINE.md#L245-L245sounds `$2A` hit / `$2B` killMega Man 6 (NES) disassembly (refreshing-lemonade/megaman6-disassembly) · bank35_37.asm#L1781-L1890$36B758Mega Man 5 (USA) · 0x3500b-0x35512 — bank 26 $8FFB-$9502, sounds $1A-$3EMega Man 6 (USA) · 0x6d768-0x6dad2 — bank 54 $B758-$BAC2, sounds $23-$3CChecked by claude, 2026-10-25 — ran the probe, which reads both games' sound directories and compares each sound; read the directory and the priority and track-pointer notes in Mega Man 5's driver, and both games' data lines at the rangesProbe: probes/mega-man/sound-reuse.mjsMega Man 6's sound effects $61 and $62, at $BE99-$BEE7 of bank $36, are byte for byte Mega Man 5's $17 and $18, the first two effects after its music. mega-man-code-lineage/mm5-mm6-sound-effects-61
About: Mega Man 6 Sound effects
Value
{
"lineage": "identical",
"from": "mega-man-5/sound-data-bank1a",
"to": "mega-man-6/sound-data-bank36",
"bytes": 79
}src/bank1A.asm#L266-L271$8F90Mega Man 6 (NES) disassembly (refreshing-lemonade/megaman6-disassembly) · bank35_37.asm#L2013-L2022$36BE98Mega Man 5 (USA) · 0x34fa3-0x34ff1 — bank 26 $8F93-$8FE1Mega Man 6 (USA) · 0x6dea9-0x6def7 — bank 54 $BE99-$BEE7Checked by claude, 2026-10-25 — equal digests over the two ranges; ran the probe, which reads both games' sound directories and compares each soundProbe: probes/mega-man/sound-reuse.mjsMega Man 6's music $13, 116 bytes at $A19B-$A20E of bank $36, is Mega Man 5's music $11 moved. Only the four track pointers in its header differ, each $625 lower, as far as the song's start moved. mega-man-code-lineage/mm5-mm6-song-13
About: Mega Man 6 Music driver
Value
{
"lineage": "relocated",
"from": "mega-man-5/sound-data-bank1a",
"to": "mega-man-6/sound-data-bank36",
"bytes": 116
}src/bank18.asm#L326-L327read the 4 channel track pointersMega Man 5 (U), annotated ca65 disassembly (plasticsmoke) · src/bank1A.asm#L141-L148$87C0Mega Man 6 (NES) disassembly (refreshing-lemonade/megaman6-disassembly) · bank35_37.asm#L1085-L1099$36A198Mega Man 5 (USA) · 0x347d0-0x34843 — bank 26 $87C0-$8833Mega Man 6 (USA) · 0x6c1ab-0x6c21e — bank 54 $A19B-$A20EChecked by claude, 2026-10-25 — ran the probe, which reads both games' sound directories and compares each sound; read the track-pointer note in Mega Man 5's driver and both games' data lines at the rangesProbe: probes/mega-man/sound-reuse.mjsMega Man 6's instrument table, 71 instruments of 8 bytes at $8B0F, has as many instruments as Mega Man 5's at $8ADB, but only 27 are the same under the same number. The longest such run is nine instruments, $3D-$45 (72 bytes). One more of Mega Man 6's is in Mega Man 5's table under another number. mega-man-code-lineage/mm5-mm6-instruments
About: Mega Man 6 Music driver
Value
{
"lineage": "changed",
"from": "mega-man-5/sound-directory-and-instruments",
"to": "mega-man-6/sound-directory-and-instruments",
"bytes": 568
}src/bank18.asm#L1516-L1587instruments, 8 bytes eachMega Man 6 (NES) disassembly (refreshing-lemonade/megaman6-disassembly) · bank34.asm#L1432-L1503$348B0CMega Man 5 (USA) · 0x30aeb-0x30d22 — bank 24 $8ADB-$8D12Mega Man 6 (USA) · 0x68b1f-0x68d56 — bank 52 $8B0F-$8D46Checked by claude, 2026-10-25 — ran the probe, which compares the two tables instrument by instrument; read both disassemblies' instrument linesProbe: probes/mega-man/sound-reuse.mjs