Cite as
plasticsmoke/megaman5-disassembly-ca65
Original
https://github.com/plasticsmoke/megaman5-disassembly-ca65
Pinned
plasticsmoke/megaman5-disassembly-ca65 @ 7fd6512fadb69fdf10ac36a55d2c53ea4248066f
Accessed
2026-10-21
Licence
MIT
Credit
Disassembly and annotations by plasticsmoke.
Notes
Builds the USA release. The atlas built it and everything after the header matches its mega-man-5-nes-rom byte for byte. The README says its labels and line comments were written with Claude Code from raw da65 output, so the atlas reads the instructions and data, not the comments.

Cited on

Claims (79)

Mega Man 5's cartridge ROM, counted by part of the game: each stretch of code or data goes to the part the disassembly's labels and comments say it serves, and the value sums the bytes of each part.MakefileCode notes
Mega Man 5 keeps Mega Man 4's jump. Both write 5 px/frame ($05.$00) into the vertical speed at $03F0/$03D8 on a jump, and set it to 0 on any rising frame without A.src/bank1B.asm L122–128src/bank1B.asm L335–343Code
Mega Man 5 keeps Mega Man 4's slide, 2.5 px/frame for 26 frames ($1A), with a jump out of it on any slide frame a fresh A press comes without Down and there is headroom. The earliest is the slide's 3rd frame, counting the set-up frame (Down and A) as the 1st: a fresh press needs A let go on the 2nd.src/bank1B.asm L161–168src/bank1B.asm L377–393Code
One routine, entity_gravity_collide, moves Mega Man vertically in the ground, air, and slide states, before their horizontal move. By the sign of his speed's whole byte (8.8 fixed point, positive up) it moves him down or up by the speed, takes gravity off the speed, and only then tests the floor points under a fall or the ceiling points over a rise. The ground state runs the whole air routine first and reads A and the d-pad only if that routine found him standing and he was already on the ground.src/bank1B.asm L109–115src/bank1B.asm L304–305src/fixed_bank.asm L4792–4794src/fixed_bank.asm L4827–4828src/fixed_bank.asm L4846–4847src/fixed_bank.asm L4862–4863Code
Gravity takes 0.25 px/frame ($40/256) off Mega Man's upward speed every frame, after the move: the reset code writes $40 to $A1, and the gravity routine subtracts $A1 from the speed's fraction byte with the borrow into its whole byte.src/fixed_bank.asm L3642–3643src/fixed_bank.asm L5036–5046src/bank1C.asm L2953–2967src/bank0C.asm L275–276Code
When gravity takes Mega Man's speed below −7 px/frame (its whole byte under $F9), the gravity routine sets it to exactly $F9.$00, so he falls at most 7 px a frame.src/fixed_bank.asm L5047–5054Code
On the ground Mega Man's vertical speed rests at −1 px/frame ($FF.$00): a floor found under a fall snaps him onto it and entity_stop_y sets that speed. So each grounded frame moves him 1 px down, takes gravity, and tests his floor points; ground there puts him back with the same speed, and none leaves him in the air falling at 1.25 px/frame.src/fixed_bank.asm L4836–4843src/fixed_bank.asm L5088–5092Code
When a falling Mega Man's floor points find a solid tile, LEEF7 subtracts the tested row's depth into its 16 px tile from his Y pixel, which puts the points on the tile's top row and his feet on its top, and keeps the Y fraction. A fall of up to 7 px a frame always ends on the top of the tile it reaches.src/fixed_bank.asm L5674–5681Code
Mega Man's position is his center. Standing, walking, and in the air his floor points are 12 px below it at x−7, x, and x+7; his ceiling points 10 px above it at x−7 and x+7; and his wall points 8 px to the side he moves toward, at 9 px above, level with, and 11 px below his center. Tiles are 16 px.src/fixed_bank.asm L1250–1259src/fixed_bank.asm L1270–1279Code
When the horizontal move puts a wall point in a solid tile, the move routine pushes Mega Man back by the point's depth into that 16 px tile, so x+8 ends on the wall's first column moving right and x−8 on the first column past it moving left. The X fraction, his speed, and his pose stay, so he walks in place against it.src/fixed_bank.asm L4668–4675src/fixed_bank.asm L5635–5641src/fixed_bank.asm L5648–5653Code
Because the ground state runs the air routine before it moves him, Mega Man walks one frame past the edge before he falls: the frame whose move takes all three floor points off a ledge still counts as grounded, and on the next the floor test finds nothing after a 1 px drop, so the air routine puts him in the air state falling at 1.25 px/frame and moves him by the air's rules that frame. A press on that frame or any later one in the fall doesn't jump, since only the ground state reads A, after the air routine reports him standing.src/bank1B.asm L320–329Code
When a rising Mega Man's move puts a ceiling point, x−7 or x+7 at 10 px above his center, in a solid tile, LEEDD adds 15 minus the point's depth into the tile to his Y pixel, which leaves the point on the tile's bottom row, and entity_stop_y sets his speed to −1 px/frame; he stays in the air and falls from the next frame.src/fixed_bank.asm L4862–4871src/fixed_bank.asm L5660–5665Code
Nothing tests the ceiling before a jump starts: a fresh A press on the ground sets the jump speed and runs the air routine again, whose rise is the first test. So under a block two tiles over the floor, the lowest he can walk under, the jump still starts, and its 3rd frame meets the block: his ceiling points must rise 11 px to reach its bottom row, and the rise is 5, then 4.75, then 4.5 px (9.75 px after two frames, 14.25 after three).src/bank1B.asm L122–128Code
Mega Man walks and moves through the air at the speed held in his X speed ($03C0.$03A8), 1.30 px/frame ($01.$4C) on ordinary floor; no walking or air code sets it. The slide writes 2.5 px/frame there, and its end and the jump out of it write $01.$4C back. Measured in Mesen from power-on at the start of Stone Man's stage ($26 = 2), the X speed read $01.$4C and each walking frame moved him 332/256 px.src/bank1B.asm L429–434src/fixed_bank.asm L4936–4942Verified
On the ground Mega Man's sprite sub-type decides whether he moves. Standing ($01), a held direction sets the step pose ($0D) and moves him one frame; in the step pose he doesn't move, whatever the d-pad does, until its animation leaves its first frame, and then walks ($04) toward a held direction or stands with none. Walking, the same direction keeps him moving; letting go puts him in the step pose without a move, and the other direction puts him in it with one move that way.src/bank1B.asm L230–273src/bank1B.asm L276–279Code
The step pose lasts 6 frames: its animation (sub-type $0D, descriptor $01,$05 at $BB28 in bank $13) holds its first frame until its tick count, reset with the sub-type, reaches 5. So from standing, or on a turn, a held direction moves Mega Man on the first frame, holds him still on the next 5, and walks from the 7th; letting go of a walk holds him 6 frames, whatever the d-pad does, before he stands or walks on. Measured in Mesen from power-on at the start of Stone Man's stage.src/fixed_bank.asm L4015–4024src/fixed_bank.asm L5173–5176src/bank13.asm L449Verified
Every frame in the air the d-pad alone sets where Mega Man moves: the air routine copies the held Left or Right into his direction and moves him by his X speed that way, 1.30 px/frame, and with neither held he doesn't move. He turns at once, and nothing carries over from the ground.src/bank1B.asm L354–359src/fixed_bank.asm L5112–5119Code
The frame a falling Mega Man's floor test finds ground puts him in the ground state with the walking pose ($04) and still moves him by the air's rules. On the next frame he walks on at once if he holds the direction he held on landing; any other direction, or none, starts the step pose. The air state reads no A press, so a press on the landing frame is lost, and the next frame's press jumps.src/bank1B.asm L344–354Code
Measured in Mesen from power-on, at the start of Stone Man's stage, Mega Man stood with his Y fraction at $80 once the teleport landed him. The floor snap keeps the fraction (floor-snap), so it stays with him on flat ground until a slide's end adds to it.src/fixed_bank.asm L5674–5681Verified
Down and a fresh A press start a slide only if the slide's start point, 15 px ahead of his center and 4 px below it, isn't in a wall; with a wall there the press does nothing, neither slide nor jump. The slide moves his Y pixel 2 px down and tests a lower, wider box: floor points 10 px below the new center at x−14, x, and x+14; ceiling points 8 px above it at the same three; and wall points 15 px ahead, 5 px above it and 9 px below. Its stand-up and jump-out test his headroom at three points 14 px above the slide's center (12 px above his standing one) at x−14, x, and x+14.src/bank1B.asm L149–157src/bank1B.asm L182–186src/bank1B.asm L2039–2040src/bank1B.asm L372–374src/fixed_bank.asm L1259–1260src/fixed_bank.asm L1279–1281Code
A slide ends at the standing test, which a wall, the timer's end, or a turn sends it to. A turn (a held direction against the slide's) zeroes the timer and still moves him 2.5 px the new way on that frame. The test checks his headroom (slide-box): a solid tile there keeps him sliding at 2.5 px/frame, tested again every frame; a clear one raises him the 2 px back, puts him in the ground state with the walking pose and walking speed, and sets his vertical speed to −0.25 px/frame ($FF.$C0), so the next frame's fall moves his Y fraction $40 down before the floor snap. A slide off a ledge ends at once in the ground state without the 2 px back, at the same −0.25.src/bank1B.asm L375–376src/bank1B.asm L396–441src/bank1B.asm L2042–2045Code
Mega Man 5's ordinary-floor movement differs from Mega Man 4's, though the walk, the step pose, the jump, gravity, the fall cap, air control, and the slide's speed, length, and start are the same. The first difference on flat ground: on a slide's last frame Mega Man 5 raises his center the 2 px the slide lowered it and sets −0.25 px/frame, where Mega Man 4 leaves it 2 px low at −1 px/frame, so for that frame Mega Man 5 stands 2 px higher, and each of its slides adds $40 to his Y fraction. Against blocks, Mega Man 5's ceiling points are 10 px above his center (Mega Man 4's 9) and his wall points 9 px above it (Mega Man 4's 8); its slide's wall points are 5 px above and 9 px below the slide's center (Mega Man 4's level and 9 below), and its slide's ceiling points 8 px above it (Mega Man 4's level with it).src/bank1B.asm L424–428src/bank1B.asm L2039–2045src/fixed_bank.asm L1259–1260src/fixed_bank.asm L1279–1280Code
Mega Man 5 moves Mega Man 4's charge thresholds. On release its counter $38 fires a normal shot from 16 ($10), a half-charged one from 40 ($28), and a full one from 80 ($50), and nothing under 16; Mega Man 4's counter, which starts at 1 on the press, fires nothing under 32, a half charge from 32, and a full one from 92. So the full charge needs a lower count and the half charge a higher one.src/bank1B.asm L2291–2311src/bank1B.asm L2314–2319src/bank1B.asm L2891src/bank1B.asm L2892Code
Mega Man 5 keeps the 0.5 px/frame knockback, always against the way Mega Man faces, but lets the player resist it: with the direction he faces held, the push drops to 0.25 px/frame ($40).src/bank1B.asm L615–637src/bank1B.asm L138–144Code
On a fresh A press with no slide, on ordinary floor, Mega Man 6's standing loop sets his vertical speed to $FA.$CC, 5.20 px/frame up, where Mega Man 5 writes 5 px/frame ($05.$00); in tile type $09 it writes the slower $FB.$CC instead (slow-surface). The air loop adds gravity before each move, so the first frame lifts him 0.25 less, 4.95 px. Measured in Mesen from power-on, standing where he lands at the start of Tomahawk Man's stage, the first frame of a jump moves him up at that 4.95 px/frame.src/bank1B.asm L122–128Verified
On a rising frame without A, Mega Man 6 sets the whole-pixel byte of his vertical speed to 0 and keeps its fraction, so he starts down at once at under 1 px/frame; Mega Man 5 sets both bytes to 0. Outside tile type $08 the cut waits until the rise is no faster than 5 px/frame ($05C8 at $FB or above), and it needs bits $0C of the fraction set, which they always are under the normal gravity, since the jump's $CC gains $40 a frame. Measured in Mesen from power-on at the start of Tomahawk Man's stage, with A let go after 3 frames, the 4th frame left him falling at 0.80 px/frame ($00.$CC).src/bank1B.asm L335–343Verified
Mega Man 6 keeps Mega Man 5's slide speed and length, 2.5 px/frame for 26 frames ($1A), set from the table at $8003, outside tile type $09, where the table at $8009 gives 1.5 px/frame (slow-surface). Measured in Mesen from power-on, at the start of Tomahawk Man's stage, a slide from Down and A moved him 2.5 px on each of 26 frames, 65 px in all.src/bank1B.asm L161–168Verified
A press of A without Down ends Mega Man 6's slide but doesn't jump: the slide hands over to the standing loop, which looks for a jump only in a later frame's fresh press ($9A). In Mega Man 5 the same press jumps out of the slide when there is headroom. Measured in Mesen from power-on, at the start of Tomahawk Man's stage, an A press on a slide's 8th frame with Down let go ended the slide that frame, and A held for the next 6 frames left him on the floor.src/bank1B.asm L377–393Verified
Nothing in Mega Man 6's ground loops tests the ceiling before a jump or a slide: a fresh A press sets the take-off speed or starts the slide outright, and a jump under a low ceiling meets it on its first move (ceiling-hit). Mega Man 5 tests a point over his head before a slide starts.src/bank1B.asm L149–157Code
Mega Man 6's ordinary-floor movement isn't Mega Man 5's: the first difference is a jump's take-off. Mega Man 6 sets his vertical speed to $FA.$CC, 5.20 px/frame up; Mega Man 5 sets its whole byte $03F0 to $05 and its fraction $03D8 to $00, 5 px/frame (jump-speed). Letting go of A sets only the whole byte to 0 in Mega Man 6 and both bytes in Mega Man 5 (release-cut), and Mega Man 5 tests for headroom before a slide where Mega Man 6 doesn't (jump-under-ceiling). The two run different code: Mega Man 5's player is a state machine dispatched each frame from $30, Mega Man 6's a coroutine of loops (coroutine-scheduler).src/bank1B.asm L122–128src/bank0A.asm L612–618src/bank1B.asm L335–343src/bank1B.asm L149–157src/bank1B.asm L77–84Code
Mega Man 6 keeps Mega Man 5's knockback: 0.5 px/frame against his facing, or 0.25 px/frame ($40) with the direction he faces held, here for 30 frames ($1E), with Up, Down, Start, and Select masked out of the held buttons.src/bank1B.asm L615–637Code
Mega Man 6's buster fires a normal shot on the press of B, which sets the charge counter $9E to 0; each later frame with B held adds 1, and on release the counter fires a half-charged shot from 36 ($24) and a full one from 90 ($5A, kept in $06AB), and nothing under 36. Between games these are counts, not frames: Mega Man 5's counter, whose start isn't traced, fires its half charge from 40 and its full one from 80, and Mega Man 4's, which starts at 1 on the press, from 32 and 92.src/bank1B.asm L2891Code
Mega 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.src/bank18.asm L1–153src/bank18.asm L136–153Code
Mega Man 5's per-frame sound tick is Mega Man 4's, byte for byte at the same address.src/bank18.asm L155–252Code
Mega 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.src/bank18.asm L254–466Code
Mega Man 5's sound effect reader is Mega Man 4's, byte for byte at the same address.src/bank18.asm L468–659Code
Mega Man 5's music track reader is Mega Man 4's, byte for byte at the same address.src/bank18.asm L661–1014Code
Mega Man 5's note-to-pitch routines is Mega Man 4's, byte for byte at the same address.src/bank18.asm L1016–1140Code
Mega Man 5's volume envelope and fade code is Mega Man 4's, byte for byte at the same address.src/bank18.asm L1142–1352Code
Mega 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.src/bank18.asm L1353–1471Code
Mega 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.src/bank18.asm L1473–1499src/bank18.asm L1497–1499Code
Mega 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.src/fixed_bank.asm L5323–5339Code
Mega 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.src/fixed_bank.asm L5635–5746Code
Mega 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.src/fixed_bank.asm L4641–4775Code
Mega 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.src/fixed_bank.asm L4936–5108Code
Mega 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.src/fixed_bank.asm L5340–5447Code
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.src/fixed_bank.asm L5482–5634Code
Mega 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.src/bank1B.asm L3280–3352Code
Mega 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.src/bank1B.asm L3433–3513Code
Mega 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.src/fixed_bank.asm L6771–6881Code
Mega 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).src/fixed_bank.asm L423–479Code
Mega 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).src/fixed_bank.asm L481–537Code
Mega 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.src/fixed_bank.asm L540–580Code
Mega 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.src/fixed_bank.asm L6883–6911Code
Mega 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.src/fixed_bank.asm L6064–6131Code
Mega 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.src/fixed_bank.asm L6679–6737Code
Mega 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.src/chr.asm L9Code
Mega 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.src/chr.asm L9Code
52 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).src/chr.asm L9Code
Mega 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.src/bank18.asm L1–153src/bank18.asm L136–153Code
Mega 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.src/bank18.asm L155–252Code
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.src/bank18.asm L254–466src/bank18.asm L307–313Code
Mega 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.src/bank18.asm L468–659Code
Mega 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.src/bank18.asm L661–1014Code
Mega 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).src/bank18.asm L1016–1140Code
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.src/bank18.asm L1142–1352Code
Mega 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.src/bank18.asm L1353–1471src/bank18.asm L1387–1399Code
Mega 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.src/bank18.asm L1473–1499Code
Mega 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.src/fixed_bank.asm L6092–6128Code
Both 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.src/fixed_bank.asm L1733–2116src/fixed_bank.asm L1767–1772src/fixed_bank.asm L1944–1973Code
Both 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.src/bank1B.asm L3278–3431src/bank1B.asm L3364–3367Code
Mega 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.src/chr.asm L9Code
Mega 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.src/chr.asm L9Code
116 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.src/chr.asm L9Verified
Mega 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.src/chr.asm L9Verified
Mega 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.src/bank18.asm L265–266src/bank18.asm L1504src/bank1A.asm L272–353ENGINE.md L238ENGINE.md L245Verified
Mega 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.src/bank1A.asm L266–271Verified
Mega 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.src/bank18.asm L326–327src/bank1A.asm L141–148Verified
Mega 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.src/bank18.asm L1516–1587Verified