data/claims/mega-man-5.yamlMega Man 5 (plasticsmoke ca65 disassembly)
Game: Mega Man 5.
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. mega-man-5/jump-kept
About: Mega Man 5 Variable jump height
Value
{
"takeoff": 1280,
"afterRelease": 0
}src/bank1B.asm#L122-L128L80A4: lda $AF
bne L80B5
lda #$00
sta $03D8
lda #$05
sta $03F0
jmp player_st_airMega Man 5 (U), annotated ca65 disassembly (plasticsmoke) · src/bank1B.asm#L335-L343L8259: lda $03F0
bmi L8283
L825E: lda $16
and #$80
bne L8283
lda #$00
sta $03D8
sta $03F0
beq L8283Mega Man 4 (U), annotated ca65 disassembly (plasticsmoke) · src/bank3C.asm#L186-L189LDA #$00 ; zero sub-velocity
STA ent_yvel_sub ; Y velocity sub = 0
LDA #$05 ; jump speed 5 px/frame
STA ent_yvel ; Y velocity = +5 (up)Mega Man 4 (U), annotated ca65 disassembly (plasticsmoke) · src/bank3C.asm#L425-L430LDA joy1_held ; held buttons
AND #$80 ; A still held?
BNE L_8338 ; held: full jump
LDA #$00 ; zero
STA ent_yvel_sub ; cut jump: Y vel sub = 0
STA ent_yvel ; cut jump: Y vel = 0Checked by claude, 2026-10-21 — read Mega Man 5's ground state jump (L80A4) and the shared air state (player_st_air) at the pinned commit, and Mega Man 4's (mega-man-4/jump-line); Mega Man 4's bytes at $8149 (A9 00 8D D8 03 A9 05 8D F0 03) store to the same `$03D8`/`$03F0` its labels call ent_yvel_sub and ent_yvelIn Gravity Man's stage, with $AF set, the jump is $FB (5 px/frame the other way, at $80B5) and the cut tests the opposite sign (L330-L334).
Cited by: Jump, Mega Man 5, Variable jump height
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. mega-man-5/slide-kept
About: Mega Man 5 Ground slide
Value
{
"speed": 640,
"frames": 26,
"jumpFromFrame": 3
}src/bank1B.asm#L161-L168lda #$1A
sta $35
lda #$02
sta $30
lda #$80
sta $03A8
lda #$02
sta $03C0Mega Man 5 (U), annotated ca65 disassembly (plasticsmoke) · src/bank1B.asm#L377-L393lda $14
and #$80
beq L82C8
lda $16
and #$04
bne L82C8
…
jsr probe_horiz
lda L0010
bne L82C8
lda #$4C
sta $03A8
…Mega Man 4 (U), annotated ca65 disassembly (plasticsmoke) · src/bank3C.asm#L217-L226LDA #$1A ; slide duration 26 frames
STA $34 ; set slide timer
LDA #$02 ; state $02 = slide
STA player_state ; enter slide state
LDA #$80 ; slide speed 2.5 px/frameMega Man 4 (U), annotated ca65 disassembly (plasticsmoke) · src/bank3C.asm#L474-L479LDA joy1_press ; newly pressed
AND #$80 ; A button?
BEQ L_839D ; no jump: steering
LDA joy1_held ; held buttons
AND #$04 ; Down held?
BNE L_839D ; Down+A: stay slidingChecked by claude, 2026-10-26 — read Mega Man 5's slide set-up in the ground state and the slide state (player_st_slide) from its A test to the jump at the pinned commit, and Mega Man 4's (mega-man-4/slide-line). `$03A8` and `$03C0` are the horizontal speed the hurt state also writes; the jump sets them to the walking speed, `$01`.`$4C`. The set-up frame goes straight to the slide's move (`jmp L82C8`), so the A test runs from the 2nd frame on; the conformance run (`node probes/lab/conformance.mjs mega-man-5`) and the movement probe trace A held into the 2nd frame without a jump and a fresh press on the 3rd jumpingThis set once gave the jump-out from frame 1 and Mega Man 4's from frame 2: the same rule counted from different frames. Mega Man 4's set-up runs its A test too, but Down is held then, so in both games the earliest jump-out is the 3rd frame (mega-man-4/slide-line). Mega Man 5 also starts the Charge Kick from this set-up when that weapon is selected ($8102-$811A), spending 1 unit of its energy per slide.
Cited by: Ground slide, Mega Man 5
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. mega-man-5/motion-order
About: Mega Man 5 Gravity
CodeMega Man 5 (U), annotated ca65 disassembly (plasticsmoke) ·src/bank1B.asm#L109-L115player_st_ground:
jsr player_st_air
bcc L8044
lda $14
and #$80
bne L809B
jmp L814AMega Man 5 (U), annotated ca65 disassembly (plasticsmoke) · src/bank1B.asm#L304-L305player_st_air: ldy #$00
jsr entity_gravity_collideMega Man 5 (U), annotated ca65 disassembly (plasticsmoke) · src/fixed_bank.asm#L4792-L4794LE7CF: lda $03F0,x
bpl LE840
jsr LE979Mega Man 5 (U), annotated ca65 disassembly (plasticsmoke) · src/fixed_bank.asm#L4827-L4828LE81C: jsr LE9B7
jsr tile_collide_horizMega Man 5 (U), annotated ca65 disassembly (plasticsmoke) · src/fixed_bank.asm#L4846-L4847LE840: iny
jsr entity_apply_yvel_upMega Man 5 (U), annotated ca65 disassembly (plasticsmoke) · src/fixed_bank.asm#L4862-L4863LE85C: jsr LE9B7
jsr tile_collide_horizChecked by claude, 2026-10-26 — read the ground state's head and the air state's call at the pinned commit, and in entity_gravity_collide the fall (LE979 moves him, LE9B7 is gravity, then the floor test) and the rise (entity_apply_yvel_up, LE9B7, then the ceiling test); `$03F0` is the speed's whole byte. The paths between (LED8F) handle platforms the player stands on, which the model leaves outWith $AF set (Gravity Man's flipped gravity) the routine takes another path (LE872), which the model leaves out. The game's Y runs down the screen, so a move by an upward speed subtracts it.
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. mega-man-5/gravity
About: Mega Man 5 Gravity
Value: 64 1/256 px/frame²
CodeMega Man 5 (U), annotated ca65 disassembly (plasticsmoke) ·src/fixed_bank.asm#L3642-L3643lda #$40
sta $A1Mega Man 5 (U), annotated ca65 disassembly (plasticsmoke) · src/fixed_bank.asm#L5036-L5046LE9B7: lda $52
beq LE9BF
cpx #$00
beq LE9E0
LE9BF: lda $03D8,x
sec
sbc $A1
sta $03D8,x
lda $03F0,x
sbc #$00
sta $03F0,xMega Man 5 (U), annotated ca65 disassembly (plasticsmoke) · src/bank1C.asm#L2953-L2967L9B17: lda #$15
sta $A1
ldy #$23
jsr entity_gravity_collide
…
L9B2F: plp
lda #$40
sta $A1
rtsMega Man 5 (U), annotated ca65 disassembly (plasticsmoke) · src/bank0C.asm#L275-L276.byte $4C
LA1A0: dec $A1Checked by claude, 2026-10-26 — read the reset code's write to `$A1` and the gravity routine LE9B7 at the pinned commit, and the other writes to `$A1`: an enemy routine (src/bank1C.asm L9B17, lines 2953-2967) sets `$15` for its own entity_gravity_collide call and writes `$40` back before it returns, so the player's frame always reads `$40`; the `dec $A1` at src/bank0C.asm line 276 is the operand of the `.byte $4C` before it (`JMP $A1C6`), data disassembled as code, as are the matches in the sound bank$52 skips gravity for the player (slot 0) while it is set; the water splash sets it, so in water gravity runs on fewer frames. The model leaves water out.
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. mega-man-5/fall-cap
About: Mega Man 5 Gravity
Value: 7 px/frame
CodeMega Man 5 (U), annotated ca65 disassembly (plasticsmoke) ·src/fixed_bank.asm#L5047-L5054bpl LE9E0
cmp #$F9
bcs LE9E0
lda #$F9
sta $03F0,x
lda #$00
sta $03D8,x
LE9E0: rtsChecked by claude, 2026-10-26 — read the end of the gravity routine LE9B7 at the pinned commitOn 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. mega-man-5/ground-check
About: Mega Man 5 Gravity
Value: -256 1/256 px/frame
CodeMega Man 5 (U), annotated ca65 disassembly (plasticsmoke) ·src/fixed_bank.asm#L4836-L4843LE830: lda $10
and #$10
beq LE870
LE836: jsr LEEF7
jsr entity_stop_y
LE83C: lda #$00
sec
rtsMega Man 5 (U), annotated ca65 disassembly (plasticsmoke) · src/fixed_bank.asm#L5088-L5092entity_stop_y: lda #$00
sta $03D8,x
lda #$FF
sta $03F0,x
rtsChecked by claude, 2026-10-26 — read the fall path's floor test (bit `$10` of the tile result is solid) and entity_stop_y at the pinned commit; the conformance run (`node probes/lab/conformance.mjs mega-man-5`) reads the speed at −1 px/frame on every standing and walking frameWhen 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. mega-man-5/floor-snap
About: Mega Man 5 Gravity
CodeMega Man 5 (U), annotated ca65 disassembly (plasticsmoke) ·src/fixed_bank.asm#L5674-L5681LEEF7: lda $11
pha
and #$0F
sta $11
lda $0378,x
sec
sbc $11
sta $0378,xChecked by claude, 2026-10-26 — read LEEF7 at the pinned commit: `$11` holds the tested row, `$0378` his Y pixel; the fraction `$0360` isn't touchedThe kept fraction carries a stage start's into every landing (start-fraction), and a slide's end adds $40 to it (slide-exit).
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. mega-man-5/terrain-box
About: Mega Man 5 Hitbox
Value
{
"tile": 16,
"floor": {
"dy": 12,
"dx": [
-7,
0,
7
]
},
"ceiling": {
"dy": -10,
"dx": [
-7,
7
]
},
"wall": {
"dx": 8,
"dy": [
-9,
0,
11
]
}
}src/fixed_bank.asm#L1250-L1259shape_row_h:
.byte $00,$05,$09,$0E,$13,$18,$1D,$20,$24,$28,$2D,$32,$36,$3A,$3F,$44
…
probe_rec_h:
.byte $02
probe_rec_h1:
.byte $0C
probe_rec_h2:
.byte $F9,$07,$07,$01,$F6,$F9,$0E,$02,$F2,$F2,$0E,$0E,$02,$0C,$F2,$0EMega Man 5 (U), annotated ca65 disassembly (plasticsmoke) · src/fixed_bank.asm#L1270-L1279shape_row_v:
.byte $00,$05,$0A,$0F,$14,$18,$1C,$20,$24,$27,$2A,$2F,$34,$38,$3C,$40
…
probe_rec_v:
.byte $02
probe_rec_v1:
.byte $08
probe_rec_v2:
.byte $F7,$09,$0B,$02,$F8,$F7,$09,$0B,$02,$00,$F5,$0B,$05,$02,$00,$FBChecked by claude, 2026-10-26 — read the probe tables at the pinned commit. A record is the point count less one, the offset, and steps between points; the player's falls use shape 0 (`$02`,`$0C`,`$F9`,`$07`,`$07`: three points 12 px down, at −7, then 0, then +7), his rises shape 1 (`$01`,`$F6`,`$F9`,`$0E`: two points 10 px up at −7 and +7), and his moves wall shapes 0 and 1 (`$02`,`$08`,`$F7`,`$09`,`$0B`: 8 px ahead at −9, 0, and +11). The tile is the tile test's (`and #$0F` in LEEF7 and the push routines)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. mega-man-5/wall-stop
About: Mega Man 5 Hitbox
CodeMega Man 5 (U), annotated ca65 disassembly (plasticsmoke) ·src/fixed_bank.asm#L4668-L4675LE6F9: jsr tile_collide_vert
clc
lda $10
and #$10
beq LE707
jsr LEEAF
sec
LE707: rtsMega Man 5 (U), annotated ca65 disassembly (plasticsmoke) · src/fixed_bank.asm#L5635-L5641LEEAF: lda $12
and #$0F
sta $12
lda $0330,x
sec
sbc $12
sta $0330,xMega Man 5 (U), annotated ca65 disassembly (plasticsmoke) · src/fixed_bank.asm#L5648-L5653LEEC7: lda $12
and #$0F
eor #$0F
sec
adc $0330,x
sta $0330,xChecked by claude, 2026-10-26 — read entity_move_right's tile test and the two push routines at the pinned commit: `$12` is the tested column, `$0330` his X pixel; LEEAF subtracts the column's depth, LEEC7 adds 15 minus it plus the set carry, so 16 minus it; `$0318` (the fraction) isn't touchedBecause 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. mega-man-5/walk-off
About: Mega Man 5 Coyote time
CodeMega Man 5 (U), annotated ca65 disassembly (plasticsmoke) ·src/bank1B.asm#L320-L329L823A: plp
bcs L826E
lda #$07
cmp $0558
beq L824E
clc
adc $34
jsr entity_set_subtype
lda #$01
sta $30Checked by claude, 2026-10-26 — read the air routine's no-floor branch at the pinned commit (sub-type `$07`, state 1), with the ground state's head (motion-order) and the rest speed (ground-check)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. mega-man-5/ceiling-hit
About: Mega Man 5 Hitbox
Value: -256 1/256 px/frame
CodeMega Man 5 (U), annotated ca65 disassembly (plasticsmoke) ·src/fixed_bank.asm#L4862-L4871LE85C: jsr LE9B7
jsr tile_collide_horiz
lda $10
and #$10
beq LE870
jsr LEEDD
LE86B: jsr entity_stop_y
lda #$FF
LE870: clc
rtsMega Man 5 (U), annotated ca65 disassembly (plasticsmoke) · src/fixed_bank.asm#L5660-L5665LEEDD: lda $11
and #$0F
eor #$0F
clc
adc $0378,x
sta $0378,xChecked by claude, 2026-10-26 — read the rise path's ceiling test and LEEDD at the pinned commit; `eor #$0F` with the carry clear adds 15 minus the depth, so the point lands on row 15 of its tile, the block's own bottom rowMega Man 4's snap sets the carry (one more pixel), but its ceiling points are 9 px above his center, not 10 (movement-differs-from-mega-man-4), so his center ends at the same height in both.
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). mega-man-5/jump-under-ceiling
About: Mega Man 5 Jump
CodeMega Man 5 (U), annotated ca65 disassembly (plasticsmoke) ·src/bank1B.asm#L122-L128L80A4: lda $AF
bne L80B5
lda #$00
sta $03D8
lda #$05
sta $03F0
jmp player_st_airChecked by claude, 2026-10-26 — read the ground state's jump at the pinned commit, from the A test (L809B, which goes to the slide only with Down) to the jump into the air routine; no tile test comes between. Counting pixel rows up from the first row over the floor as row 0: his floor points, 12 px below his center, stand on the floor's top row, so his center is on row 11 and his ceiling points, 10 px above it, on row 21 (terrain-box); the block two tiles up starts at row 32, 11 rows higher. The rise is the take-off speed less gravity after each move (jump-kept, gravity, motion-order); mega-man-5.ceiling.test.ts runs it in the modelMega 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. mega-man-5/walk-speed
About: Mega Man 5 Running
Value: 332 1/256 px/frame
VerifiedMega Man 5 (U), annotated ca65 disassembly (plasticsmoke) ·src/bank1B.asm#L429-L434L830C: lda #$00
sta $30
lda #$4C
sta $03A8
lda #$01
sta $03C0Mega Man 5 (U), annotated ca65 disassembly (plasticsmoke) · src/fixed_bank.asm#L4936-L4942entity_move_right_collide: lda $0318,x
clc
adc $03A8,x
sta $0318,x
lda $0330,x
adc $03C0,x
sta $0330,xChecked by claude, 2026-10-26 — read the slide's end and the right mover at the pinned commit; ran the movement probe, which reads this valueProbe: probes/jump-physics/movement.mjsMega Man 4 walks at the same speed, from the same $01.$4C (mega-man-4/walk-speed).
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. mega-man-5/ground-states
About: Mega Man 5 Running
CodeMega Man 5 (U), annotated ca65 disassembly (plasticsmoke) ·src/bank1B.asm#L230-L273L8186: lda $0558
cmp #$04
beq L81B5
…
L819D: lda $0540
beq L820E
lda $16
and #$03
beq L81E8
sta $31
lda #$04
…
…Mega Man 5 (U), annotated ca65 disassembly (plasticsmoke) · src/bank1B.asm#L276-L279L81E1: lda #$0D
clc
adc $34
bne L820BChecked by claude, 2026-10-26 — read the ground state's walk logic at the pinned commit: `$0558` is the sub-type (`$0D`-`$0F` the step pose, `$04`/`$05` walking), `$0540` its animation frame, `$16` the held buttons, `$31` the walk direction, and `$34` the shooting pose's offset; `$04C8` is set only on a platformThe model leaves out the shooting poses (B) and platforms.
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. mega-man-5/ground-measured
About: Mega Man 5 Running
Value
{
"pauseFrames": 6
}src/fixed_bank.asm#L4015-L4024lda $0570,x
inc $0570,x
ldy #$01
cmp (L0000),y
bne LE0F0
lda #$00
sta $0570,x
lda $0540,x
and #$7F
inc $0540,xMega Man 5 (U), annotated ca65 disassembly (plasticsmoke) · src/fixed_bank.asm#L5173-L5176entity_set_subtype: sta $0558,x
lda #$00
sta $0540,x
sta $0570,xMega Man 5 (U), annotated ca65 disassembly (plasticsmoke) · src/bank13.asm#L449.byte $19,$01,$08,$1B,$1B,$00,$08,$1C,$01,$05,$03,$01Checked by claude, 2026-10-26 — read the animation step in entity_render_visible and entity_set_subtype at the pinned commit, and the player's descriptor pointer for sub-type `$0D` (`$28` and `$BB` at index 13 of the tables at `$8600` and `$8700` in bank `$12`, src/bank12.asm lines 116 and 132); ran the movement probe, which reads this valueProbe: probes/jump-physics/movement.mjsMega Man 4's pause is the same 6 frames (mega-man-4/ground-measured).
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. mega-man-5/air-speed
About: Mega Man 5 Air control
CodeMega Man 5 (U), annotated ca65 disassembly (plasticsmoke) ·src/bank1B.asm#L354-L359L8283: lda $16
and #$03
sta $0420
sta $31
ldy #$00
jsr entity_horiz_dispatchMega Man 5 (U), annotated ca65 disassembly (plasticsmoke) · src/fixed_bank.asm#L5112-L5119entity_horiz_dispatch:
lda $0420,x
clc
and #$03
beq LEA97
and #$01
beq LEA4E
jmp entity_move_rightChecked by claude, 2026-10-26 — read the air routine's horizontal move and entity_horiz_dispatch at the pinned commitThe 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. mega-man-5/landing
About: Mega Man 5 Jump
CodeMega Man 5 (U), annotated ca65 disassembly (plasticsmoke) ·src/bank1B.asm#L344-L354L826E: lda $30
beq L8298
lda #$00
sta $30
lda #$04
clc
adc $34
jsr entity_set_subtype
lda #$1B
jsr queue_sound
L8283: lda $16Checked by claude, 2026-10-26 — read the air routine's landing branch at the pinned commit: from the air state it sets state 0 and the walking sub-type and falls through to the horizontal move (air-speed); called by the ground state (`$30` = 0) it returns at once. The walk direction it stores is the d-pad's, 0 with none, which the next frame's walk logic compares (ground-states)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. mega-man-5/start-fraction
About: Mega Man 5 Gravity
Value: 128 1/256 px
VerifiedMega Man 5 (U), annotated ca65 disassembly (plasticsmoke) ·src/fixed_bank.asm#L5674-L5681LEEF7: lda $11
pha
and #$0F
sta $11
lda $0378,x
sec
sbc $11
sta $0378,xChecked by claude, 2026-10-26 — ran the movement probe, which reads this value at Stone Man's stage start, after it walks him 31 px left (a walk on flat floor leaves the fraction alone)Probe: probes/jump-physics/movement.mjsThe lab's model starts with this fraction, so its floor snaps and a slide's end match the cartridge's pixel for pixel. Scratch runs at the other seven Robot Master stage starts also read $80; no probe keeps those.
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. mega-man-5/slide-box
About: Mega Man 5 Ground slide
Value
{
"lower": 2,
"floor": {
"dy": 10,
"dx": [
-14,
0,
14
]
},
"ceiling": {
"dy": -8,
"dx": [
-14,
0,
14
]
},
"wall": {
"dx": 15,
"dy": [
-5,
9
]
},
"start": {
"dx": 15,
"dy": 4
},
"headroom": {
"dy": -14,
"dx": [
-14,
0,
14
]
}
}src/bank1B.asm#L149-L157L80D9: lda $08
lsr a
clc
adc #$08
tay
jsr probe_vert
lda L0010
and #$10
bne L814AMega Man 5 (U), annotated ca65 disassembly (plasticsmoke) · src/bank1B.asm#L182-L186ldy $AF
lda $0378
clc
adc ynudge_tbl,y
sta $0378Mega Man 5 (U), annotated ca65 disassembly (plasticsmoke) · src/bank1B.asm#L2039-L2040ynudge_tbl:
.byte $02,$FEMega Man 5 (U), annotated ca65 disassembly (plasticsmoke) · src/bank1B.asm#L372-L374player_st_slide:
ldy #$04
jsr entity_gravity_collideMega Man 5 (U), annotated ca65 disassembly (plasticsmoke) · src/fixed_bank.asm#L1259-L1260.byte $F9,$07,$07,$01,$F6,$F9,$0E,$02,$F2,$F2,$0E,$0E,$02,$0C,$F2,$0E
.byte $0E,$02,$0A,$F2,$0E,$0E,$02,$F8,$F2,$0E,$0E,$00,$00,$00,$01,$06Mega Man 5 (U), annotated ca65 disassembly (plasticsmoke) · src/fixed_bank.asm#L1279-L1281.byte $F7,$09,$0B,$02,$F8,$F7,$09,$0B,$02,$00,$F5,$0B,$05,$02,$00,$FB
.byte $05,$0B,$01,$0F,$FB,$0E,$01,$F1,$FB,$0E,$01,$0F,$F9,$00,$01,$F1
.byte $F9,$00,$00,$0F,$04,$00,$F1,$04,$02,$0C,$F1,$0F,$0F,$02,$F4,$F1Checked by claude, 2026-10-26 — read the slide set-up's wall test (shapes 8 and 9 by direction), its Y nudge, the slide state's call with shapes 4 and 5, and the probe tables at the pinned commit. Horizontal shape 2 (`$02`,`$F2`,`$F2`,`$0E`,`$0E`) is the headroom, 4 (`$02`,`$0A`, …) the floor, 5 (`$02`,`$F8`, …) the ceiling; vertical shape 4 (`$01`,`$0F`,`$FB`,`$0E`: 15 px ahead at −5, then +9) the walls and 8 (`$00`,`$0F`,`$04`) the start point. The record offsets are in shape_row_h and shape_row_v (terrain-box)Mega Man 4's slide has the same start point, floor, and headroom, but its wall points are level with his center and 9 px below, and its ceiling points level with it (movement-differs-from-mega-man-4).
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. mega-man-5/slide-exit
About: Mega Man 5 Ground slide
Value
{
"endSpeed": -64
}src/bank1B.asm#L375-L376jsr player_env_effects
bcc L830CMega Man 5 (U), annotated ca65 disassembly (plasticsmoke) · src/bank1B.asm#L396-L441L82C8: lda $16
and #$03
beq L82DF
sta L0000
and $31
bne L82DF
lda L0000
sta $31
sta $0420
lda #$00
sta $35
L82DF: lda $AF
…Mega Man 5 (U), annotated ca65 disassembly (plasticsmoke) · src/bank1B.asm#L2042-L2045slide_yvel_sub:
.byte $C0,$40
slide_yvel_px:
.byte $FF,$00Checked by claude, 2026-10-26 — read the slide state from its floor test to the end at the pinned commit; the conformance run (`node probes/lab/conformance.mjs mega-man-5`) traces the stand-up, the turn, and the fractionMega Man 4's stand-up leaves his center 2 px low and sets −1 px/frame, so the next frame's floor snap raises him (movement-differs-from-mega-man-4); its slide off a ledge keeps sliding while something is overhead.
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). mega-man-5/movement-differs-from-mega-man-4
About: Mega Man 5 Ground slide
CodeMega Man 5 (U), annotated ca65 disassembly (plasticsmoke) ·src/bank1B.asm#L424-L428ldy $AF
lda $0378
sec
sbc ynudge_tbl,y
sta $0378Mega Man 4 (U), annotated ca65 disassembly (plasticsmoke) · src/bank3C.asm#L525-L539L_83D3:
LDA #$00
STA player_state
…
LDA #$04
JSR entity_set_subtype
JSR entity_stop_yMega Man 4 (U), annotated ca65 disassembly (plasticsmoke) · src/fixed/fixed_entity_physics.asm#L648-L654L_F324:
LDA #$00
STA ent_yvel_sub,X
LDA #$FF
STA ent_yvel,X
L_F32E:
RTSMega Man 5 (U), annotated ca65 disassembly (plasticsmoke) · src/bank1B.asm#L2039-L2045ynudge_tbl:
.byte $02,$FE
…
slide_yvel_sub:
.byte $C0,$40
…
slide_yvel_px:
.byte $FF,$00Mega Man 4 (U), annotated ca65 disassembly (plasticsmoke) · src/fixed/fixed_tile_collision.asm#L1426-L1430.byte $02
.byte $0C
.byte $F9,$07,$07
.byte $01,$F7
.byte $F9,$0E,$00Mega Man 4 (U), annotated ca65 disassembly (plasticsmoke) · src/fixed/fixed_tile_collision.asm#L1699-L1702.byte $D9,$02,$08
.byte $F8
.byte $08
.byte $0BMega Man 4 (U), annotated ca65 disassembly (plasticsmoke) · src/fixed/fixed_tile_collision.asm#L1301-L1304.byte $1E,$23,$27
.byte $2A
.byte $2F
.byte $34Mega Man 4 (U), annotated ca65 disassembly (plasticsmoke) · src/fixed/fixed_tile_collision.asm#L1439-L1442.byte $0E,$0E,$02
.byte $00
.byte $F2
.byte $0E,$0E,$02Mega Man 4 (U), annotated ca65 disassembly (plasticsmoke) · src/fixed/fixed_tile_collision.asm#L1592-L1595.byte $88
.byte $8D,$92,$92
.byte $97
.byte $9BMega Man 4 (U), annotated ca65 disassembly (plasticsmoke) · src/fixed/fixed_tile_collision.asm#L1711-L1714.byte $05,$01
.byte $0F
.byte $00
.byte $09,$01Mega Man 5 (U), annotated ca65 disassembly (plasticsmoke) · src/fixed_bank.asm#L1259-L1260.byte $F9,$07,$07,$01,$F6,$F9,$0E,$02,$F2,$F2,$0E,$0E,$02,$0C,$F2,$0E
.byte $0E,$02,$0A,$F2,$0E,$0E,$02,$F8,$F2,$0E,$0EMega Man 5 (U), annotated ca65 disassembly (plasticsmoke) · src/fixed_bank.asm#L1279-L1280.byte $F7,$09,$0B
.byte $05,$0B,$01,$0F,$FB,$0EChecked by claude, 2026-10-26 — read Mega Man 4's slide end (L_83D3: state, speed, sub-type, no Y change) and its entity_stop_y (`$F324`, −1 px/frame), and Mega Man 5's stand-up (Y less ynudge_tbl's 2, speed slide_yvel's `$FF`.`$C0`, slide-exit) at the pinned commits. Probe records are the point count less one, the offset, then steps. Mega Man 4's ceiling record is `$01`,`$F7` (9 px up) where Mega Man 5's is `$01`,`$F6`, and its wall record `$02`,`$08`,`$F8` (8 px up) where Mega Man 5's is `$02`,`$08`,`$F7`. Mega Man 4's floor/ceiling pointers (low bytes at `$D69E`, high bytes `$D7`) give shape 5, the slide's ceiling, at `$D734`: the 23rd byte of the records from `$D71E`, which is `$02`,`$00`,`$F2`,`$0E`,`$0E` (three points level with the center). Its wall pointers (low bytes at `$D808`, high bytes `$D8`) give shape 4, the slide's wall, at `$D897`: the 16th byte of the records from `$D888` (after the `$D9` closing the high-byte table), which is `$01`,`$0F`,`$00`,`$09` (15 px ahead, level and 9 px below). Mega Man 5's are shape 5 `$02`,`$F8`,`$F2`,`$0E`,`$0E` and shape 4 `$01`,`$0F`,`$FB`,`$0E` (slide-box); the slide states use shapes 4 and 5 in both (mega-man-4/slide-box). The rest compares the two claim sets (jump-kept, slide-kept, walk-speed, ground-measured, and Mega Man 4's gravity, fall-cap, and air-speed). Stepping both lab models (Mega Man 4's from agent/lab-mm4 at 9bc8185) on the same scripts, from the same Y fraction, gave the same views until a slide's 26th frame on flat ground, and a jump's ceiling hit a frame sooner in Mega Man 5 under a block 48 px over the floorMega Man 4's ceiling snap adds one more pixel than Mega Man 5's (mega-man-code-lineage), which its ceiling points' extra pixel cancels: after a bump both centers rest at the same height, but Mega Man 5 meets a block one pixel sooner. Mega Man 4's slide also probes overhead when it runs off a ledge, and keeps sliding under a ceiling.
Cited by: Mega Man (classic series)
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. mega-man-5/charge-line
About: Mega Man 5 Charge shot
Value
{
"normal": 16,
"half": 40,
"full": 80
}src/bank1B.asm#L2291-L2311buster_charge_ctl: lda $32
bne L910F
lda $30
cmp #$04
beq L910F
lda $16
and #$40
bne buster_charge_tick
lda $38
cmp #$10
bcc L910F
cmp #$50
…Mega Man 5 (U), annotated ca65 disassembly (plasticsmoke) · src/bank1B.asm#L2314-L2319buster_charge_tick: lda $38
cmp #$20
bne L9148
…
L9148: inc $38Mega Man 5 (U), annotated ca65 disassembly (plasticsmoke) · src/bank1B.asm#L2891buster_tier_threshold:.byte $28,$50,$FFMega Man 5 (U), annotated ca65 disassembly (plasticsmoke) · src/bank1B.asm#L2892 — tier 0 is the normal shot's preset, `$18`buster_tier_preset:.byte $18,$A8,$A9Mega Man 4 (U), annotated ca65 disassembly (plasticsmoke) · src/bank3C.asm#L1751STY $35 ; minimum charge (tap)Mega Man 4 (U), annotated ca65 disassembly (plasticsmoke) · src/bank3C.asm#L1710-L1716CMP #$20 ; level 1 threshold ($20)
BCC L_8D59 ; tap shot: normal spawn
INC $36 ; flash phase 8
CMP #$40 ; level 2 threshold ($40)
BCC L_8D0C ; small charge
INC $36 ; flash phase 9
CMP #$5C ; full charge threshold ($5C)Checked by claude, 2026-10-21 — read buster_charge_ctl, buster_charge_tick, and buster_shoot's tier loop (`$91C5`-`$91CF` compares `$38` against buster_tier_threshold) in Mega Man 5, and Mega Man 4's release (mega-man-4/charge-shot), at their pinned commits. A full charge fires only with no shot of Mega Man's on screen in slots 1-3; otherwise the counter resetsThe atlas hasn't traced where Mega Man 5's counter starts, so the thresholds compare counts, not measured frames.
Cited by: Charge shot, Mega Man 5
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). mega-man-5/knockback
About: Mega Man 5 Knockback
Value
{
"back": 128,
"resisted": 64
}src/bank1B.asm#L615-L637player_st_hurt:
ldy $04B0
jsr entity_gravity_collide
lda #$80
sta $03A8
lda #$00
sta $03C0
lda $16
and #$03
beq L848D
eor #$03
asl a
…Mega Man 5 (U), annotated ca65 disassembly (plasticsmoke) · src/bank1B.asm#L138-L144 — the slide set-up reads bit `$20` of `$0528` as facing right (1) or left (2)L80C2: lda #$02
sta $08
lda $0528
and #$20
beq L80D1
lda #$01
sta $08Mega Man 4 (U), annotated ca65 disassembly (plasticsmoke) · src/bank3C.asm#L803-L806LDA #$80 ; knockback speed 0.5 px/frame
STA ent_xvel_sub ; X velocity sub
LDA #$00 ; zero
STA ent_xvel ; X velocity pxChecked by claude, 2026-10-21 — read player_st_hurt at the pinned commit. Right (1) becomes `$20` and left (2) becomes 0 after the EOR, shifts, and mask, so the test passes when the held direction is the one bit `$20` of `$0528` faces; the push then moves him against that facing (`$848D`-`$84A2`). Compared with Mega Man 4's hurt state (mega-man-4/knockback)Cited by: Knockback, Mega Man 5