Cite as
refreshing-lemonade/megaman6-disassembly
Original
https://github.com/refreshing-lemonade/megaman6-disassembly
Pinned
refreshing-lemonade/megaman6-disassembly @ f0763c46fad2bbcb45e4b8a2f759a10ee3c7c421
Accessed
2026-10-23
Licence
none stated
Credit
Disassembly by Raidenthequick, on GitHub as refreshing-lemonade; its commits are signed Scott W, Raiden, and Raidenthequick.
Notes
For xkas-plus. The README says it "Assembles to 100% clean ROM" of the USA release and that "not all code is documented yet". At this pin its labels are the disassembler's (code_, loc_, locret_) apart from NMI, RESET, and IRQ, and each line's comment gives its bank and address. The atlas built it with xkas-plus (scripts/rom-regions.mjs), and everything after the header matches its mega-man-6-nes-rom byte for byte.

Cited on

Claims (53)

Mega Man 6'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.assemble.asmCode notes
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.bank38_3F.asm L105–118bank38_3F.asm L919–937Verified
Computed from the ordinary take-off and gravity, outside tile types $08 and $09 (fall-limits, slow-surface), a jump with A held peaks 51.6 px above the floor on its 20th frame. Measured in Mesen from power-on, at the start of Tomahawk Man's stage, the held jump rose 51.56 px and turned to fall after frame 20.bank38_3F.asm L113–118bank38_3F.asm L919–921Verified
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).bank38_3F.asm L146–162Verified
Outside tile type $08, gravity adds $40 (0.25 px/frame) to Mega Man's vertical speed every frame before he moves. Measured in Mesen from power-on, at the start of Tomahawk Man's stage, his speed grew by 0.25 px/frame on each frame of a held jump.bank38_3F.asm L919–937Verified
In tile type $08 gravity is $18 a frame (0.09 px/frame) instead of $40. Falling, the whole-pixel byte of his speed stops at 7 while the fraction keeps growing, so under the normal gravity his top falling speed steps between 7.05 and 7.80 px/frame (computed).bank38_3F.asm L919–937Code
From standing, a held direction moves Mega Man one frame at the walking speed, $01.$4C (1.30 px/frame) from the table at $8BEA, then holds him in the step pose while a counter of 6 ($95) runs out, and walks at 1.30 px/frame from the 7th frame. That is on ordinary floor: on surface type $05 he walks at once, on $15 he carries momentum at up to 2 px/frame (momentum-surfaces), and in tile type $09 he walks at 0.5 px/frame (slow-surface). Measured in Mesen from power-on, at the start of Tomahawk Man's stage, Right moved him 1.30 px on frame 1, not at all on frames 2 to 6, and 1.30 px on each frame after.bank38_3F.asm L46–78bank38_3F.asm L1475–1485bank38_3F.asm L1550Verified
In the air the d-pad sets his horizontal speed from the same table at $8BEA each frame, 1.30 px/frame or 0, and clears any carried momentum, except when his surface ($A7) is $15: then the air loop runs the momentum routine code_388B0F instead, and the carried speed stays (momentum-surfaces). On a ladder, Up or Down moves him along it at the same 1.30 px/frame.bank38_3F.asm L1540–1548bank38_3F.asm L498–510bank38_3F.asm L1550bank38_3F.asm L124–129Code
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.bank38_3F.asm L334–340bank38_3F.asm L359–372bank38_3F.asm L6–7Verified
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.bank38_3F.asm L382–395bank38_3F.asm L423–436bank38_3F.asm L27–33bank38_3F.asm L20043–20051Verified
Down and A start the slide only with no Rush adaptor on ($9B 0); with one, the press jumps. A turn (a held direction against his facing) ends the slide early, and at its end two tile probes above him keep it going 4 frames at a time while the ceiling is low.bank38_3F.asm L95–103bank38_3F.asm L388–416Code
On the ground Mega Man 6 runs one of three loops, each ending its frame with a yield and reading the next frame's input after it. Standing, a held direction turns him and starts the step: one move at the walking speed, then 5 frames still (walk-start); after it a held direction walks on, turning to it, and none stands him. Walking, letting go stands him on the same frame, and a held direction against his facing turns him at once and walks on with no new step. A fresh A press jumps from any of the three, before that frame's move, or slides with Down held, except on the frame a walk's direction is let go: that frame goes straight to the standing loop's move, and the press is lost. Down alone does nothing.bank38_3F.asm L30–91bank38_3F.asm L689–697Code
Each frame, after a loop's checks, Mega Man 6 makes one move through code_3886CE: on ordinary floor and in the air alike, the horizontal speed comes from the d-pad's table at $8BEA, 1.30 px/frame or 0; gravity is added to the vertical speed; he moves by both speeds in 8.8 fixed point; and the tile checks run after the move (collision-order).bank38_3F.asm L1538–1550bank38_3F.asm L1498–1509bank38_3F.asm L913–968bank38_3F.asm L20142–20171Code
A Mega Man 6 falling onto a floor has his vertical speed set to 0, fraction included, by the floor push (floor-snap). The air loop reads the landing on the next frame, from the fraction being 0, and goes into the walking loop at once: that frame he turns to a held direction and walks at 1.30 px/frame with no step, or a fresh A press jumps again. A press on the touchdown frame itself is never read, since only the air loop runs then, and it reads A only as held.bank38_3F.asm L163–172bank38_3F.asm L194–195bank38_3F.asm L1365–1372Code
Walking or standing off a ledge, Mega Man 6 stays in his ground loop while the whole byte of his vertical speed is 0: gravity's 0.25 px/frame a frame moves him down 0.25, 0.5, 0.75, and 1 px on the first four frames over the gap, and through the 2nd to 4th a fresh A press still jumps. After the 4th the loop finds the whole byte at 1 and enters the air loop with the fraction set to $CC, so he falls at 2.05 px/frame the next frame. Measured in Mesen from power-on, walking right off the ledge at X 160 near the start of Tomahawk Man's stage, he fell 0.25, 0.5, 0.75, and 1 px in the walking state, then 2.05 px/frame in the air; a press of A on the 4th frame over the gap jumped at the full take-off speed, and one on the 5th didn't.bank38_3F.asm L80–84bank38_3F.asm L31–44bank38_3F.asm L116–118Verified
Mega Man 6 tests the tiles at points around his center, from the table at $9119 (X) and $912D (Y): falling or standing, his floor at 12 px below the center, at the center and 7 px to each side; rising, his head at 9 px above it, at the same three; and walls 7 px to the side he moves toward, at 7 px below the center (level with it when rising), 9 px above, and 10 px below. In a slide the high wall point and the head's two side points drop to 3 px above the center (the head's center point stays 9 above), and the low wall point to 12 below. Each point reads the 16 px tile holding it.bank38_3F.asm L2202–2207bank38_3F.asm L952–967bank38_3F.asm L347–348Code
After each move Mega Man 6 tests his points in a fixed order: the center floor or head point, then the wall point at mid height, then, if he moves sideways, the high wall point, then the two floor or head corners, and last one more wall point, the low one if he moves sideways or the high one if not. A floor or ceiling found pushes him out at once, so the points after it test from where it left him; a wall found ends the frame's tests.bank38_3F.asm L975–1058bank38_3F.asm L1129–1137bank38_3F.asm L1389–1401Code
When a floor or head point finds a solid tile, Mega Man 6 is pushed out of it by the point's depth in its 16 px tile: from the tile's top half up to the row above it, from its bottom half down to the row below it; his Y fraction stays. Falling or standing, his vertical speed is set to 0; rising, only its whole byte (ceiling-hit). After the frame's tests a push moves him 1 px back down, so a standing Mega Man's floor point lies in the floor's top row. Standing, gravity adds $40 to his speed and his Y every frame and the floor pushes him back, so his Y fraction drifts by $40 a frame while his whole Y stays. Measured in Mesen from power-on near the start of Tomahawk Man's stage, a walk, a slide, and a jump off the ledge at X 160 each landed with his floor point on the top row of the lower floor (row 160, 32 px below the start floor's top row, 128), the speed 0.bank38_3F.asm L1365–1377bank38_3F.asm L18923–18934bank38_3F.asm L1059–1062Verified
Rising into a solid tile, Mega Man 6 is pushed down below it and 1 px further, and the whole byte of his vertical speed is set to 0 while its fraction stays, so on the next frame, gravity added, he moves down 0.30 to 1.05 px (under the normal gravity). He stays in the air loop, and the jump's release cut, which needs the whole byte negative, no longer applies.bank38_3F.asm L1365–1372bank38_3F.asm L18923–18934bank38_3F.asm L146–150Code
When a wall point finds a solid tile, Mega Man 6 is pushed back out across by the point's depth in its 16 px tile, from its left half to the column left of it, from its right half to the column right of it; his X fraction stays, and the frame's other tile tests are skipped. The push also ends a slide. Measured in Mesen from power-on near the start of Tomahawk Man's stage, walking left on the lower floor into the face of the ledge at X 160 held his X at 167, his left wall points on column 160, right of the face, while he kept walking.bank38_3F.asm L1411–1419bank38_3F.asm L18903–18911bank38_3F.asm L374–376Verified
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.bank38_3F.asm L94–118Code
Mega Man 6's slide ends on a turn, a wall (wall-stop), a fresh A without Down (slide-exit), its 26th frame, or the 2nd frame over a gap, when gravity has taken his speed's fraction to $41 or more. Unless a low ceiling keeps the slide going (slide-rules), it hands over in the same frame: over a gap to the air loop, with the fraction set to $CC, and otherwise to the standing loop, which moves him a second time that frame, at the walking speed toward a held direction or not at all. So a turn out of a slide moves him 2.5 px forward and 1.30 px back in one frame, and the next frame starts a step. Measured in Mesen from power-on near the start of Tomahawk Man's stage, a slide off the ledge at X 160 slid on its first frame over the gap and fell from the second, and Left on a rightward slide's 7th frame moved him 1.20 px right that frame ($01.$34, the slide's $02.$80 less the walk's $01.$4C), then 1.30 px left as a step began.bank38_3F.asm L333–337bank38_3F.asm L382–395bank38_3F.asm L374–380bank38_3F.asm L423–436bank38_3F.asm L25–32Verified
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).bank38_3F.asm L105–118bank38_3F.asm L146–162Code
At the end of every frame Mega Man 6 holds Mega Man on the screen: his X is kept from 16 px ($A8, which his routine's start sets to $10) to 244 px right of the camera's left edge, with its fraction left as it is, and a Y of 240 or more on the screen's own rows kills him. Measured in Mesen from power-on near the start of Tomahawk Man's stage, where the camera can't scroll left, walking left stopped at X 16 while his X fraction kept changing.bank38_3F.asm L17–18bank38_3F.asm L1934–1976Verified
On tile type $09 ($064B) Mega Man moves slower: a jump starts at $FB.$CC (4.20 px/frame up), the slide at 1.5 px/frame, and walking at 0.5 px/frame, from the tables at $8009 and $8BF6.bank38_3F.asm L106–111bank38_3F.asm L367–372bank38_3F.asm L7–8bank38_3F.asm L1498–1506bank38_3F.asm L1551–1552Code
On surface types $05 and $15 his walking speed is a carried momentum ($A1.$A0). A held direction sets it to full speed at once, 1.30 px/frame on $05 and 2 px/frame on $15; with nothing held it slows by 6/256 px/frame each frame, and holding the other way slows it by 12/256 (computed), until its sign flips and it stops.bank38_3F.asm L1431–1472bank38_3F.asm L1486–1494bank38_3F.asm L1550–1553Code
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.bank38_3F.asm L640–674bank38_3F.asm L9–11Code
A hit sets Mega Man 6's invincibility timer $A2 to 60 frames ($3C), but the 30-frame knockback runs through the frame routine's entry past the countdown (code_388EB9), so the timer starts to count, and he starts to blink, only once the knockback ends: he can't be hurt for 90 frames in all (computed). The damage routine skips a hit while $A2 isn't 0.bank38_3F.asm L640–643bank38_3F.asm L671–672bank38_3F.asm L1883–1900bank38_3F.asm L1991–2001Code
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.bank38_3F.asm L818–852bank38_3F.asm L876–889bank38_3F.asm L805–814bank38_3F.asm L703bank38_3F.asm L17084–17085Code
With the Power adaptor ($9B 2) the charge counter gains 2 a frame and caps at 60 ($3C), so a half-strength punch comes from 18 frames held and a full one from 30 (computed). Each punch (shot types $0C, $0E, $0F by tier) holds him in a 12-frame pose that keeps the charge off ($9E = $FF).bank38_3F.asm L870–887bank38_3F.asm L2842bank38_3F.asm L703–704bank38_3F.asm L852–858bank38_3F.asm L546–559Code
With the Jet adaptor ($9B 1), holding A in the air while not rising and with jet energy left starts the jet. It slows his fall by 1/8 px/frame each frame until he would rise, holds him still for 10 frames, then lifts him from 2 px/frame, faster each frame, and holds him at 84 px ($54) above where he stopped; the d-pad steers him at 1 px/frame. Letting go of A, or running out of energy, drops him back into the fall.bank38_3F.asm L138–144bank38_3F.asm L208–215bank38_3F.asm L234–293bank38_3F.asm L324–329bank38_3F.asm L7–8Code
The jet's energy $9C drains by 1 every 4 frames the jet runs, and the jet stops when it goes below 0, so a full meter of 20 steps (0 to 19) lasts 80 frames (computed). It refills by 1 every other frame up to 19, from empty in 40 frames (computed), while the jet's frame counter $9D is 0, which landing sets, and the buster is the weapon in hand.bank38_3F.asm L310–321bank38_3F.asm L164–168bank38_3F.asm L17263–17282Code
Mega Man 6 runs its objects, Mega Man included, as coroutines. Each frame code_3FE41C counts the slots from 22 down to 0 and calls each live one at its resume address ($0413/$042A); a script yields by calling code_3FE468, which pops its own return address into that pointer and moves to the next slot, so the script resumes after the call the next frame. Mega Man's movement (slot 0) is written as loops around that call, each loop ending the frame through code_388E95.bank38_3F.asm L20056–20070bank38_3F.asm L20081–20095bank38_3F.asm L1976Code
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.bank34.asm L1–75bank34.asm L56–75Code
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.bank34.asm L77–171Code
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.bank34.asm L173–378bank34.asm L221–229Code
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.bank34.asm L380–571Code
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.bank34.asm L573–895Code
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).bank34.asm L897–1020Code
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.bank34.asm L1022–1238Code
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.bank34.asm L1239–1368bank34.asm L1277–1294Code
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.bank34.asm L1370–1406Code
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.bank38_3F.asm L16841–16880Code
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.bank38_3F.asm L18304–18549bank38_3F.asm L18416–18431Code
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.bank38_3F.asm L7582–7760bank38_3F.asm L7758Code
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.bank00_28.asm L16450–17477Code
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.bank00_28.asm L17478–18505Code
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.bank00_28.asm L3–49Verified
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.bank00_28.asm L17546–17565Verified
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.bank35_37.asm L1781–1890Verified
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.bank35_37.asm L2013–2022Verified
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.bank35_37.asm L1085–1099Verified
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.bank34.asm L1432–1503Verified