data/claims/mega-man-2.yamlMega Man 2 (lsmmega/mm2, and measured in Mesen)
Game: Mega Man 2.
lsmmega's disassembly builds this exact ROM; with the iNES header its header.asm writes in place of the NES 2.0 one, the ROM's SHA-1 is the build's. mega-man-2/rom-is-disassembly
header.asm#L8-L19prg_rom = 256
chr_rom = 0
mapper = 1
mirroring = verticalmm2: Mega Man 2 disassembly (lsmmega/mm2) · README.md#L5It builds on `Megaman II (U) [!].nes` `SHA1: 6B5B9235C3F630486ED8F07A133B044EAA2E22B2`Checked by claude, 2026-10-20 — read header.asm and the README at the pinned commit; the probe swaps the ROM's 16-byte header for that one and gets the README's SHA-1Probe: probes/jump-physics/emu-jumps.mjsSo every line cited from the disassembly is code in the ROM the probes measure.
Cited by: Mega Man 2, Variable jump height
In the standing, walking, running, and landing states, a fresh A press (zjoy1_pressed_bits) copies zjump_speed into Mega Man's vertical speed after the frame's move, so the press frame doesn't lift him. mega-man-2/jump-start
About: Mega Man 2 Jump
Codemm2: Mega Man 2 disassembly (lsmmega/mm2) ·engine/run_megaman.asm#L94-L103_run_megaman_landing_common_1:
LDA z:zjoy1_pressed_bits
AND #a_button
BEQ @not_pressed
LDA z:zjump_speed_fraction
STA aobject_ycoord_speed_fraction
LDA z:zjump_speed
STA aobject_ycoord_speed
LDA #$06
STA z:zmegaman_statusmm2: Mega Man 2 disassembly (lsmmega/mm2) · engine/run_megaman.asm#L84-L88 — the standing state moves him, then checks for a jumpJSR _megaman_status_parameter
JSR _check_object_horizontal_move
JSR _check_object_vertical_move
LDA z:z00
BNE _run_megaman_landing_common_1mm2: Mega Man 2 disassembly (lsmmega/mm2) · home/nmi_wait.asm#L13-L17 — pressed_bits holds the buttons that went down this frameJSR _joy
LDA z:zjoy1_pressed
EOR z:zjoy1_pressed_frame
AND z:zjoy1_pressed
STA z:zjoy1_pressed_bitsChecked by claude, 2026-10-20 — read _run_megaman_landing_common_1 and every state that reaches it (standing, walking, running, landing) at the pinned commit, and _nmi_wait_0eThe check also switches him to the jumping state, which takes the first step on the next frame (the probe measures 0 px on the press frame, then 5). Walking off a ledge sets the jumping state without a jump (L87-L90; no-coyote-time).
Cited by: Jump, Mega Man 2, Variable jump height
Mega Man's jump speed is $04.$DF, 4.87 px/frame upward, out of water ($05.$80 in water). mega-man-2/jump-speed
About: Mega Man 2 Jump
Value: 1247 1/256 px/frame
Codemm2: Mega Man 2 disassembly (lsmmega/mm2) ·engine/check_object_horizontal_move.asm#L181-L185tsa_regular_water_jump_speed_table:
.BYTE $04, $05
…
tsa_regular_water_jump_speed_fraction_table:
.BYTE $DF, $80mm2: Mega Man 2 disassembly (lsmmega/mm2) · engine/tsa.asm#L82-L85 — index 0 out of water, 1 in itLDA tsa_regular_water_jump_speed_table, X
STA z:zjump_speed
LDA tsa_regular_water_jump_speed_fraction_table, X
STA z:zjump_speed_fractionChecked by claude, 2026-10-20 — read both tables and the water check in _tsa at the pinned commit1247/256 = 4.87109375 px/frame. The stage start sets the same value (engine/main.asm L199-L202).
Cited by: Jump, Mega Man 2, Mega Man 3, Variable jump height
Gravity takes $40/256 = 0.25 px/frame from Mega Man's upward speed each frame out of water ($1E/256 in water). mega-man-2/gravity
About: Mega Man 2 Gravity
Value: 64 1/256 px/frame²
Codemm2: Mega Man 2 disassembly (lsmmega/mm2) ·engine/check_object_horizontal_move.asm#L175-L176tsa_ycoord_speed_accelerate_fraction_table:
.BYTE $40, $1Emm2: Mega Man 2 disassembly (lsmmega/mm2) · engine/check_object_vertical_move.asm#L73-L80@air:
SEC
LDA aobject_ycoord_speed_fraction
SBC z:zobject_ycoord_speed_accelerate_fraction
STA aobject_ycoord_speed_fraction
LDA aobject_ycoord_speed
SBC z:zobject_ycoord_speed_accelerate
STA aobject_ycoord_speedChecked by claude, 2026-10-20 — read the table, _tsa, and _check_object_vertical_move at the pinned commitCited by: Gravity, Mega Man 2, Variable jump height
_check_object_vertical_move first moves Mega Man by his 8.8 fixed-point speed, positive up, and then subtracts gravity. mega-man-2/motion-order
About: Mega Man 2 Gravity
Codemm2: Mega Man 2 disassembly (lsmmega/mm2) ·engine/check_object_vertical_move.asm#L12-L19SEC
LDA aobject_ycoord_fraction
SBC aobject_ycoord_speed_fraction
STA aobject_ycoord_fraction
LDA aobject_ycoord
SBC aobject_ycoord_speed
STA aobject_ycoordmm2: Mega Man 2 disassembly (lsmmega/mm2) · engine/check_object_vertical_move.asm#L73-L80 — gravity, after the moveChecked by claude, 2026-10-20 — read _check_object_vertical_move at the pinned commitSubtracting the speed from screen Y moves him up. On landing the routine zeroes the position's fraction (L107-L109), so every jump leaves from a whole pixel.
Cited by: Gravity, Mega Man 2
Falling speed is capped at 12 px/frame ($F4). mega-man-2/max-fall
About: Mega Man 2 Gravity
Value: -12 px/frame
Codemm2: Mega Man 2 disassembly (lsmmega/mm2) ·engine/check_object_vertical_move.asm#L81-L87BPL @skip
CMP #$F4
BCS @skip
LDA #$00
STA aobject_ycoord_speed_fraction
LDA #$F4
STA aobject_ycoord_speedChecked by claude, 2026-10-20 — read _check_object_vertical_move at the pinned commitCited by: Gravity, Mega Man 2, Variable jump height
In the jumping state, with A not held, _run_megaman_jumping drops an upward speed of 2 px/frame or more to exactly 1 px/frame. mega-man-2/release-cap
About: Mega Man 2 Variable jump height
Value: 256 1/256 px/frame
Codemm2: Mega Man 2 disassembly (lsmmega/mm2) ·engine/run_megaman.asm#L208-L219LDA z:zjoy1_pressed
AND #a_button
BNE @skip
LDA aobject_ycoord_speed
BMI @skip
CMP #$01
BCC @skip
BEQ @skip
LDA #$01
STA aobject_ycoord_speed
LDA #$00
STA aobject_ycoord_speed_fractionChecked by claude, 2026-10-20 — read _run_megaman_jumping at the pinned commitThe test reads only the speed's whole byte, so 1.00-1.99 px/frame passes untouched. It runs on every rising frame without A, not only the release frame.
Cited by: Mega Man 2, Variable jump height
The release cut tests only the speed's whole byte, so it applies at 2 px/frame or more and leaves a slower rise alone. mega-man-2/release-threshold
About: Mega Man 2 Variable jump height
Value: 512 1/256 px/frame
Codemm2: Mega Man 2 disassembly (lsmmega/mm2) ·engine/run_megaman.asm#L211-L215LDA aobject_ycoord_speed
BMI @skip
CMP #$01
BCC @skip
BEQ @skipChecked by claude, 2026-10-20 — read _run_megaman_jumping at the pinned commitCited by: Mega Man 2, Variable jump height
_run_megaman_jumping checks the release after the frame's move and gravity, so the capped speed first moves Mega Man on the next frame. mega-man-2/release-order
About: Mega Man 2 Variable jump height
Codemm2: Mega Man 2 disassembly (lsmmega/mm2) ·engine/run_megaman.asm#L203-L210LDA aobject_ycoord_speed
BMI @jump_down
JSR _check_object_vertical_move
LDA z:z00
BNE @landing
LDA z:zjoy1_pressed
AND #a_button
BNE @skipChecked by claude, 2026-10-20 — read _run_megaman_jumping at the pinned commitCited by: Mega Man 2, Variable jump height
Gravity brings the 4.87 px/frame take-off under 2 px/frame on frame 13, so letting go of A after 12 frames changes nothing. mega-man-2/release-window
About: Mega Man 2 Variable jump height
Value: 12 frames
Verifiedmm2: Mega Man 2 disassembly (lsmmega/mm2) ·engine/run_megaman.asm#L208-L219 — the release capLDA z:zjoy1_pressed
AND #a_button
BNE @skip
LDA aobject_ycoord_speed
BMI @skip
CMP #$01
BCC @skip
BEQ @skip
LDA #$01
STA aobject_ycoord_speedChecked by claude-agent, 2026-10-25 — Read the release cap (run_megaman.asm L208-219) at the pinned commit: with A not held and a rising speed of 2 px/frame or more, the speed drops to 1 px/frame, so once gravity has taken it under 2 the cap does nothing; the arcs for each hold are the probe's run in the game.Probe: probes/jump-physics/emu-jumps.mjsFrame 1 is the press frame.
Cited by: Mega Man 2, Variable jump height
Measured in the game, Mega Man's jump peaks at 8 px on frame 5 when A is tapped and at 50 px on frame 19 when it is held 12 frames or more, landing on frames 15 and 41. mega-man-2/apex-by-hold
About: Mega Man 2 Variable jump height
Value
{
"tap": {
"apex": 8,
"apexAt": 5,
"airtime": 15
},
"full": {
"apex": 50,
"apexAt": 19,
"airtime": 41
},
"byHold": {
"1": {
"apex": 8,
"apexAt": 5,
"airtime": 15
},
"2": {
"apex": 12,
"apexAt": 5,
"airtime": 18
},
"3": {
"apex": 17,
"apexAt": 7,
"airtime": 20
},
"4": {
"apex": 21,
"apexAt": 8,
"airtime": 23
},
"6": {
"apex": 28,
"apexAt": 9,
"airtime": 27
},
"8": {
"apex": 35,
"apexAt": 12,
"airtime": 31
},
"10": {
"apex": 40,
"apexAt": 13,
"airtime": 34
},
"12": {
"apex": 50,
"apexAt": 19,
"airtime": 41
}
}
}engine/run_megaman.asm#L160-L223 — the jumping stateJSR _check_object_vertical_move
…
LDA z:zjoy1_pressed
AND #a_button
BNE @skip
LDA aobject_ycoord_speed
BMI @skip
CMP #$01
BCC @skip
BEQ @skip
LDA #$01
STA aobject_ycoord_speedmm2: Mega Man 2 disassembly (lsmmega/mm2) · engine/check_object_vertical_move.asm#L1-L90 — motion and gravitySEC
LDA aobject_ycoord_speed_fraction
SBC z:zobject_ycoord_speed_accelerate_fraction
STA aobject_ycoord_speed_fraction
LDA aobject_ycoord_speed
SBC z:zobject_ycoord_speed_accelerate
STA aobject_ycoord_speedChecked by claude-agent, 2026-10-25 — Read the jumping state (run_megaman.asm L160-223: the vertical move, then the release cap) and the vertical move (check_object_vertical_move.asm L1-90: position minus speed, then gravity subtracted from the speed) at the pinned commit; the heights and frames are the probe's run in the game.Probe: probes/jump-physics/emu-jumps.mjsHeights are whole pixels of aobject_ycoord above the take-off row; frame 1 is the press frame. Holds of 12 frames or more give the same arc.
Cited by: Mega Man 2, Variable jump height
Each airborne frame, _run_megaman_jumping zeroes Mega Man's horizontal speed, then sets it to the jumping state's 1.3125 px/frame ($01.$50) toward a held Left or Right. mega-man-2/air-speed
About: Mega Man 2 Air control
Value: 336 1/256 px/frame
Codemm2: Mega Man 2 disassembly (lsmmega/mm2) ·engine/run_megaman.asm#L160-L167_run_megaman_jumping:
JSR _check_shoot_on_ladder
LDA #$00
STA aobject_xcoord_speed_fraction
STA aobject_xcoord_speed
LDA z:zjoy1_pressed
AND #left_button | right_button
BNE @horizontal_jumpingmm2: Mega Man 2 disassembly (lsmmega/mm2) · engine/run_megaman.asm#L197-L199@horizontal_jumping:
JSR _turn_megaman
JSR _megaman_status_parametermm2: Mega Man 2 disassembly (lsmmega/mm2) · engine/turn_megaman.asm#L222-L246 — rows 5 (running) and 6 (jumping)megaman_status_xcoord_speed_table:
…
.BYTE $01
.BYTE $01
…
megaman_status_xcoord_speed_fraction_table:
…
.BYTE $60
.BYTE $50Checked by claude, 2026-10-20 — read _run_megaman_jumping, _turn_megaman, _megaman_status_parameter, and the speed tables at the pinned commitWith neither direction held, the speed stays zero unless he carries a slide from ice (zslip_speed, L168-L195). Running on the ground is row 5, 1.375 px/frame.
Cited by: Mega Man 2
Measured in the game, Mega Man moves 1.3125 px/frame in the air, turns around on the frame the other direction is pressed, and stops on the frame the d-pad is let go. mega-man-2/air-control-measured
About: Mega Man 2 Air control
Value
{
"air": 336,
"run": 352
}engine/run_megaman.asm#L160-L202 — the jumping state's horizontal speedLDA #$00
STA aobject_xcoord_speed_fraction
STA aobject_xcoord_speed
LDA z:zjoy1_pressed
AND #left_button | right_button
BNE @horizontal_jumping
…
@horizontal_jumping:
JSR _turn_megaman
JSR _megaman_status_parametermm2: Mega Man 2 disassembly (lsmmega/mm2) · engine/turn_megaman.asm#L72-L77 — the speed comes from the status tables_megaman_status_parameter:
LDX z:zmegaman_status
LDA megaman_status_xcoord_speed_table, X
STA aobject_xcoord_speed
LDA megaman_status_xcoord_speed_fraction_table, X
STA aobject_xcoord_speed_fractionmm2: Mega Man 2 disassembly (lsmmega/mm2) · engine/turn_megaman.asm#L222-L246 — row 6, jumping: $01.$50, 1.3125 px/framemegaman_status_xcoord_speed_table:
…
.BYTE $01
.BYTE $01
…
megaman_status_xcoord_speed_fraction_table:
…
.BYTE $60
.BYTE $50Checked by claude-agent, 2026-10-25 — Read the jumping state's horizontal part (run_megaman.asm L160-202), _megaman_status_parameter (turn_megaman.asm L72-77), and the status speed tables (L222-246: row 6 is $01.$50, 1.3125 px/frame) at the pinned commit: the speed is zeroed every frame and set from the tables only while Left or Right is held, so he stops on release and turns on the press; the probe's measurement in the game matches.Probe: probes/jump-physics/emu-jumps.mjsOn the normal floor of Heat Man's stage.
Cited by: Mega Man 2, Variable jump height
Measured in the game, Mega Man first steps 0.125 px/frame for 7 frames, then runs at 1.375 px/frame. mega-man-2/walk-start
About: Mega Man 2 Running
Value
{
"step": 32,
"stepFrames": 7,
"run": 352
}engine/turn_megaman.asm#L222-L246 — rows 4 (the first step, `$00`.`$20`) and 5 (running, `$01`.`$60`)megaman_status_xcoord_speed_table:
…
.BYTE $00
.BYTE $01
…
megaman_status_xcoord_speed_fraction_table:
…
.BYTE $20
.BYTE $60Checked by claude-agent, 2026-10-25 — Read the status speed tables (turn_megaman.asm L222-246) at the pinned commit: row 4 is $00.$20 (0.125 px/frame) and row 5 is $01.$60 (1.375 px/frame); the 7-frame first step is the probe's measurement in the game.Probe: probes/jump-physics/emu-jumps.mjsCited by: Mega Man 2
Mega Man gets no grace window after leaving a ledge; a grounded state that finds no floor switches to the jumping state, which looks for a press only on the frame it lands. mega-man-2/no-coyote-time
About: Mega Man 2 Coyote time
Verifiedmm2: Mega Man 2 disassembly (lsmmega/mm2) ·engine/run_megaman.asm#L86-L92JSR _check_object_vertical_move
LDA z:z00
BNE _run_megaman_landing_common_1
LDA #$06
STA z:zmegaman_statusmm2: Mega Man 2 disassembly (lsmmega/mm2) · engine/run_megaman.asm#L160-L242 — the jumping state reads held A for the release cap and checks for a new press only on landing (L236-L238)Checked by claude, 2026-10-22 — read every state in _run_megaman at the pinned commit; in the probe, A pressed on the walk-off frame at the start of Heat Man's stage, or two frames after it, leaves the fall exactly as it is without a pressProbe: probes/lab/mega-man-2-stage.mjsA press on the frame he lands does jump, as from any landing (landing).
Cited by: Coyote time, Jump, Mega Man 2, Variable jump height
Mega Man's X is 8.8 fixed point, and his horizontal speed is an 8.8 magnitude that _check_object_horizontal_move adds or subtracts according to the right bit of ztoward. mega-man-2/x-motion-format
About: Mega Man 2 Running
Codemm2: Mega Man 2 disassembly (lsmmega/mm2) ·engine/check_object_horizontal_move.asm#L10-L31LDA z:ztoward
AND #objects_right
BEQ @left
…
CLC
LDA aobject_xcoord_fraction
ADC aobject_xcoord_speed_fraction
STA aobject_xcoord_fraction
LDA aobject_xcoord
ADC aobject_xcoord_speed
STA aobject_xcoord
LDA aobject_screen
…mm2: Mega Man 2 disassembly (lsmmega/mm2) · engine/check_object_horizontal_move.asm#L74-L81@not_arrived_2:
SEC
LDA aobject_xcoord_fraction
SBC aobject_xcoord_speed_fraction
STA aobject_xcoord_fraction
LDA aobject_xcoord
SBC aobject_xcoord_speedChecked by claude, 2026-10-21 — read _check_object_horizontal_move at the pinned commitThe position is aobject_screen (page), aobject_xcoord (pixel), and aobject_xcoord_fraction (1/256 px), Mega Man's center. A wall hit zeroes the fraction and pushes him out (terrain-box).
Mega Man never accelerates; each frame his state's row of megaman_status_xcoord_speed_table sets the speed outright, 0 standing, 0.125 px/frame on the first step, 1.375 running, 1.3125 jumping, and 0.5 sliding to a stop. mega-man-2/state-speeds
About: Mega Man 2 Running
Value
{
"standing": 0,
"step": 32,
"running": 352,
"jumping": 336,
"slide": 128,
"landingStop": 0,
"hit": 144
}engine/turn_megaman.asm#L72-L77_megaman_status_parameter:
LDX z:zmegaman_status
LDA megaman_status_xcoord_speed_table, X
STA aobject_xcoord_speed
LDA megaman_status_xcoord_speed_fraction_table, X
STA aobject_xcoord_speed_fractionmm2: Mega Man 2 disassembly (lsmmega/mm2) · engine/turn_megaman.asm#L222-L243megaman_status_xcoord_speed_table:
.BYTE $00
.BYTE $00
.BYTE $00
.BYTE $00
.BYTE $00
.BYTE $01
.BYTE $01
.BYTE $00
…
megaman_status_xcoord_speed_fraction_table:
.BYTE $00
…mm2: Mega Man 2 disassembly (lsmmega/mm2) · engine/run_megaman.asm#L401-L412run_megaman_lo_jumptable:
.LOBYTES _run_megaman_teleport_out
.LOBYTES _run_megaman_nothing
.LOBYTES _run_megaman_megaman_hit
.LOBYTES _run_megaman_standing
.LOBYTES _run_megaman_walk_slow
.LOBYTES _run_megaman_running
.LOBYTES _run_megaman_jumping
.LOBYTES _run_megaman_landing
.LOBYTES _run_megaman_landingChecked by claude, 2026-10-21 — read _megaman_status_parameter, the two tables, and the state jump table at the pinned commit; the probe's traces show exactly these speeds in `aobject_xcoord_speed` and steps of 32, 352, 336, and 128 subpixelsProbe: probes/jump-physics/movement.mjsStates (zmegaman_status): 2 hit, 3 standing, 4 first step, 5 running, 6 jumping, 7 sliding (landing after a run), 8 landing stop. Ice and conveyors add to or replace the speed after the table (_check_conveyor_ice), and a heavy hit zeroes it outside the jumping state; neither is measured here.
A held direction moves standing Mega Man into the first-step state on the same frame; the step becomes a run when its animation reaches frame 1, a released run becomes a slide, and the slide stops at its animation's frame 2 or restarts the first step if a direction is pressed. mega-man-2/ground-states
About: Mega Man 2 Running
Codemm2: Mega Man 2 disassembly (lsmmega/mm2) ·engine/run_megaman.asm#L74-L88_run_megaman_standing:
JSR _check_shoot_on_ladder
LDA z:zjoy1_pressed
AND #left_button | right_button
BEQ @not_pressed
LDA #$04
STA z:zmegaman_status
JSR _turn_megaman
…
JSR _megaman_status_parameter
JSR _check_object_horizontal_move
JSR _check_object_vertical_movemm2: Mega Man 2 disassembly (lsmmega/mm2) · engine/run_megaman.asm#L109-L133_run_megaman_walk_slow:
…
LDA z:zjoy1_pressed
AND #left_button | right_button
BNE @pressed
LDA #$03
STA z:zmegaman_status
…
@pressed:
LDA aobject_frameset_upper_timer
CMP #$01
BNE @nz
…mm2: Mega Man 2 disassembly (lsmmega/mm2) · engine/run_megaman.asm#L150-L155_run_megaman_landing_common_2:
LDA z:zjoy1_pressed
AND #left_button | right_button
BNE @horizontal_running
LDA #$07
STA z:zmegaman_statusmm2: Mega Man 2 disassembly (lsmmega/mm2) · engine/run_megaman.asm#L244-L267_run_megaman_landing:
…
LDA z:zjoy1_pressed
AND #left_button | right_button
BNE @horizontal_landing
LDA aobject_frameset_upper_timer
CMP #$02
BNE @nz
LDA #$03
STA z:zmegaman_status
…
@horizontal_landing:
…Checked by claude, 2026-10-21 — read the standing, first-step, running, and landing states at the pinned commit; the probe's traces step through states 3, 4, 5, 7, and 3 in that order, and a press during the slide goes back to 4Probe: probes/jump-physics/movement.mjsEvery grounded state runs, in order, the turn, the speed from its table, the horizontal move, the vertical move, and only then its state change and the jump check, so a new state's speed first applies on the next frame, except that standing switches to the first step before setting the speed. zjoy1_pressed is the d-pad held this frame. The slide and the landing stop share _run_megaman_landing; they differ only in speed.
_turn_megaman faces Mega Man toward a held Left or Right at the start of every moving state's frame, and the move direction follows the facing that same frame, so he reverses at full speed with no skid. mega-man-2/turn-instant
About: Mega Man 2 Running
Verifiedmm2: Mega Man 2 disassembly (lsmmega/mm2) ·engine/turn_megaman.asm#L56-L70_turn_megaman:
LDA z:zjoy1_pressed
AND #left_button | right_button
BEQ @not_pressed
LDA aobject_flag
AND #~objects_right
STA aobject_flag
LDA z:zjoy1_pressed
AND #objects_right
EOR #objects_right
ORA aobject_flag
STA aobject_flagmm2: Mega Man 2 disassembly (lsmmega/mm2) · engine/turn_megaman.asm#L213-L216@not_set:
LDA aobject_flag
AND #objects_right
STA z:ztowardChecked by claude, 2026-10-21 — read _turn_megaman and _check_conveyor_ice's end at the pinned commit; in the probe, Left pressed during a run to the right moves him −352 subpixels on that very frameProbe: probes/jump-physics/movement.mjsobjects_right is bit 6 of the flag byte and of the controller byte, where bit 6 is Left, so the EOR makes the right bit "Left not held". _megaman_status_parameter copies the facing into ztoward on ordinary ground. The jumping state turns him the same way while a direction is held (air-speed).
Measured from a standstill in Heat Man's stage, Mega Man's first step lasts 7 frames, and a released run slides 8 frames at 0.5 px/frame, 4 px in all, before he stands. mega-man-2/ground-measured
About: Mega Man 2 Running
Value
{
"stepFrames": 7,
"slideFrames": 8,
"slide": 128,
"tapFrames": 3,
"tapMoves": 4,
"landingStopFrames": 4,
"restepFrames": 6
}engine/run_megaman.asm#L125-L129 — the step ends at animation frame 1LDA aobject_frameset_upper_timer
CMP #$01
BNE @nz
LDA #$05
STA z:zmegaman_statusmm2: Mega Man 2 disassembly (lsmmega/mm2) · engine/run_megaman.asm#L258-L262 — the slide ends at animation frame 2LDA aobject_frameset_upper_timer
CMP #$02
BNE @nz
LDA #$03
STA z:zmegaman_statusmm2: Mega Man 2 disassembly (lsmmega/mm2) · engine/turn_megaman.asm#L222-L246 — row 7: $00.$80, 128 subpixels a framemegaman_status_xcoord_speed_fraction_table:
…
.BYTE $50
.BYTE $80mm2: Mega Man 2 disassembly (lsmmega/mm2) · engine/run_megaman.asm#L401-L410 — statuses 7 and 8 run _run_megaman_landingrun_megaman_lo_jumptable:
…
.LOBYTES _run_megaman_jumping
.LOBYTES _run_megaman_landing
.LOBYTES _run_megaman_landingmm2: Mega Man 2 disassembly (lsmmega/mm2) · engine/run_megaman.asm#L244-L248 — which takes its speed from the status tables_run_megaman_landing:
JSR _check_shoot_on_ladder
JSR _turn_megaman
JSR _megaman_status_parametermm2: Mega Man 2 disassembly (lsmmega/mm2) · engine/run_megaman.asm#L150-L155 — a run with the d-pad let go becomes status 7_run_megaman_landing_common_2:
LDA z:zjoy1_pressed
AND #left_button | right_button
BNE @horizontal_running
LDA #$07
STA z:zmegaman_statusChecked by claude-agent, 2026-10-25 — Read the two state changes (run_megaman.asm L125-129: the step becomes state 5 at animation frame 1; L258-262: the slide becomes state 3 at animation frame 2), the status jump table (L401-410: status 7 runs _run_megaman_landing, which loads the status speed at L244-248), and the speed tables (turn_megaman.asm L222-246: row 7 is $00.$80, 128 subpixels) at the pinned commit; the 7 and 8 frames come from the animation timings, which the probe measures in the game.Probe: probes/jump-physics/movement.mjsThe step and slide lengths come from the animation's frame timings, which the probe measures and the movement code only reads (ground-states). The release frame and the frame after a press still use the old state's speed, since the state changes after the move.
Down changes nothing on open ground; of the walking states only _check_shoot_on_ladder reads Up and Down, and only when a ladder is at hand. mega-man-2/down-on-ground
About: Mega Man 2 Running
Verifiedmm2: Mega Man 2 disassembly (lsmmega/mm2) ·engine/turn_megaman.asm#L13-L22LDA z:zladder_flag
BNE @on_ladder
…
@on_ladder:
LDA z:zjoy1_pressed
AND #up_button | down_buttonChecked by claude, 2026-10-21 — read the standing, first-step, running, jumping, and landing states (run_megaman.asm L74-L271) at the pinned commit; none reads Down; in the probe, Down held with Right keeps the run at 352, and Down alone slides like a plain releaseProbe: probes/jump-physics/movement.mjsMega Man 2 has no crouch or slide move; the slide here is the landing state after a run.
The jump check runs after the frame's move, so the press frame moves at the ground state's speed, and from the next frame the jumping state's 1.3125 px/frame (or nothing, with no direction held) replaces any run. mega-man-2/takeoff-x
About: Mega Man 2 Jump
Verifiedmm2: Mega Man 2 disassembly (lsmmega/mm2) ·engine/run_megaman.asm#L135-L142_run_megaman_running:
JSR _check_shoot_on_ladder
JSR _turn_megaman
JSR _megaman_status_parameter
JSR _check_object_horizontal_move
JSR _check_object_vertical_move
LDA z:z00
BNE _run_megaman_landing_common_2mm2: Mega Man 2 disassembly (lsmmega/mm2) · engine/run_megaman.asm#L94-L103_run_megaman_landing_common_1:
LDA z:zjoy1_pressed_bits
AND #a_button
BEQ @not_pressed
LDA z:zjump_speed_fraction
STA aobject_ycoord_speed_fraction
LDA z:zjump_speed
STA aobject_ycoord_speed
LDA #$06
STA z:zmegaman_statusChecked by claude, 2026-10-21 — read the running state and _run_megaman_landing_common_1 at the pinned commit; in the probe a running jump moves 352 on the press frame and 336 after, and one with the d-pad released after the press moves 0 from the second frameProbe: probes/jump-physics/movement.mjsNothing carries over from the run except the facing; a jump from the first step moves 0.125 on the press frame.
Mega Man lands into the running state if Left or Right was held on the frame before landing, at 1.375 px/frame from the next frame with no first step, and into the landing-stop state otherwise. mega-man-2/landing
About: Mega Man 2 Jump
Verifiedmm2: Mega Man 2 disassembly (lsmmega/mm2) ·engine/run_megaman.asm#L225-L238@jump_down:
JSR _check_object_vertical_move
LDA z:z00
BEQ @not_landing
track_queue track_landing
LDX #$05
LDA z:zjoy1_pressed_frame
AND #left_button | right_button
BNE @horizontal_jump_down
LDX #$08
…
@horizontal_jump_down:
…mm2: Mega Man 2 disassembly (lsmmega/mm2) · home/nmi_wait.asm#L1-L3_nmi_wait_0e:
LDA z:zjoy1_pressed
STA z:zjoy1_pressed_frameChecked by claude, 2026-10-21 — read the jumping state's landing and _nmi_wait at the pinned commit; `zjoy1_pressed_frame` is the previous frame's held buttons; in the probe, Right held to the frame before landing and let go on it lands running, and Right pressed only on the landing frame lands stoppedProbe: probes/jump-physics/movement.mjsThe landing frame itself moves at the air speed. From the landing-stop state a held direction starts the first step; with none, he stands at its animation's frame 2 (4 frames in the probe). The landing frame also runs the jump check, which needs a fresh press of A (zjoy1_pressed_bits), so a held A doesn't jump again.
Cited by: Running
Mega Man's position is his center; the floor and ceiling are tested at x−7 and x+7, 12 px below or above it, and walls at x+8 or x−8 at 12 px and 4 px above and 11 px below it. mega-man-2/terrain-box
About: Mega Man 2 Hitbox
Value
{
"floor": {
"x": [
-7,
7
],
"y": 12
},
"ceiling": {
"x": [
-7,
7
],
"y": -12
},
"wall": {
"x": 8,
"y": [
-12,
-4,
11
]
}
}engine/check_object_vertical_move.asm#L47-L56LDA aobject_ycoord_speed
BMI @down
SEC
LDA aobject_ycoord
SBC #$0C
STA z:z0A
LDA z:zout_of_screen
SBC #$00
STA z:z0B
JSR _check_vertical_collisionmm2: Mega Man 2 disassembly (lsmmega/mm2) · engine/check_object_vertical_move.asm#L92-L100@down:
CLC
LDA aobject_ycoord
ADC #$0Cmm2: Mega Man 2 disassembly (lsmmega/mm2) · engine/check_object_vertical_move.asm#L212-L213check_vertical_collision_xcoord_offset:
.BYTE +7, -7mm2: Mega Man 2 disassembly (lsmmega/mm2) · engine/check_object_horizontal_move.asm#L32-L35CLC
LDA aobject_xcoord
ADC #$08
STA z:z08mm2: Mega Man 2 disassembly (lsmmega/mm2) · engine/check_object_horizontal_move.asm#L198-L199check_horizontal_collision_ycoord_offset:
.BYTE -12, -4, +11Checked by claude, 2026-10-21 — read _check_object_vertical_move, _check_vertical_collision, _check_object_horizontal_move, and _check_horizontal_collision with their offset tables at the pinned commit; the wall test uses x+8 moving right and x−8 moving left (L85-L88)Y grows downward; aobject_ycoord is the center. These points are Mega Man's box against the level. Enemies and items test their own per-object distance tables against his center (_object_hit), so he has no separate box of his own for them.
Cited by: Hitbox, Mega Man 2
_tsa_collision turns a test point into a tile: X / 32 and Y / 32 pick a 32 px block of the stage map, bit 4 of X and of Y pick one of its four 16 px tiles, and the tile's top two bits give its kind, background, block, or one of a per-stage pair such as ladder and spike. mega-man-2/tile-lookup
About: Mega Man 2 Hitbox
Value: 16 px
Codemm2: Mega Man 2 disassembly (lsmmega/mm2) ·home/tsa_collision.asm#L16-L29 — z08 and z0A are the point's X and Y on its screen@check:
LDA z:z08
LSR
LSR
AND #%00111000
STA z:z00
LDA z:z0A
ASL
ROL
ROL
ROL
AND #%00000111
…mm2: Mega Man 2 disassembly (lsmmega/mm2) · home/tsa_collision.asm#L49-L70LDY #$00
LDA z:z08
AND #%00010000
BEQ @even_1
INY
INY
…
LDA z:z0A
AND #%00010000
BEQ @even_2
INY
…
…mm2: Mega Man 2 disassembly (lsmmega/mm2) · constants/tsa.asm#L1-L11 — kinds 2 and 3 index `tsa_blockset_table`'s pair for the stage (L71-L80);tsa type
.ENUM
background
block
ladder
spikemm2: Mega Man 2 disassembly (lsmmega/mm2) · engine/check_object_vertical_move.asm#L188-L190 — the floor test counts a point as ground when its kind is odd (block)LDA z:ztsa_blockset_pointers
ORA z:ztsa_blockset_pointers + 1
AND #%00000001Checked by claude, 2026-10-22 — read _tsa_collision, the tile kinds, and both collision tests' use of them (_check_vertical_collision, _check_horizontal_collision with tsa_horizontal_blockset_flags_table) at the pinned commitEvery collision point Mega Man tests goes through _appearing_block_collision, which checks the appearing blocks of some stages first and otherwise calls _tsa_collision. A point below the screen reads as background. For walls, blocks, conveyors, and ice count as solid (tsa_horizontal_blockset_flags_table); a spike kills unless he is invincible.
Each of Mega Man's grounded and jumping states moves him horizontally first, testing for a wall, then vertically, testing the floor under a fall or the ceiling over a rise, and only then changes state or checks for a jump, so a frame's floor test uses that frame's new X. mega-man-2/collision-order
About: Mega Man 2 Hitbox
Codemm2: Mega Man 2 disassembly (lsmmega/mm2) ·engine/run_megaman.asm#L135-L142_run_megaman_running:
JSR _check_shoot_on_ladder
JSR _turn_megaman
JSR _megaman_status_parameter
JSR _check_object_horizontal_move
JSR _check_object_vertical_move
LDA z:z00
BNE _run_megaman_landing_common_2mm2: Mega Man 2 disassembly (lsmmega/mm2) · engine/run_megaman.asm#L201-L205@continue:
JSR _check_object_horizontal_move
LDA aobject_ycoord_speed
BMI @jump_down
JSR _check_object_vertical_movemm2: Mega Man 2 disassembly (lsmmega/mm2) · engine/check_object_vertical_move.asm#L45-L56 — rising, the test is 12 px above his center; falling (`@down`, L92-L100), 12 px below@on_screen_2:
@continue:
LDA aobject_ycoord_speed
BMI @down
SEC
LDA aobject_ycoord
SBC #$0CChecked by claude, 2026-10-22 — read the standing, first-step, running, jumping, and landing states (run_megaman.asm L74-L271) and both move routines at the pinned commitEvery grounded state runs the same pair in the same order. In the jumping state the speed's sign before the move picks the branch, so a rising Mega Man never tests the floor.
Cited by: Coyote time
On the ground Mega Man keeps a vertical speed of −0.25 px/frame, the gravity applied after each landing's reset, so every grounded frame's vertical move takes him 0.25 px down and tests x − 7 and x + 7 on the row under his feet; ground there puts him back on it with the Y fraction zeroed, and none sends him to the jumping state. mega-man-2/ground-check
About: Mega Man 2 Coyote time
Value: -64 1/256 px/frame
Verifiedmm2: Mega Man 2 disassembly (lsmmega/mm2) ·engine/check_object_vertical_move.asm#L92-L109@down:
CLC
LDA aobject_ycoord
ADC #$0C
STA z:z0A
LDA z:zout_of_screen
ADC #$00
STA z:z0B
JSR _check_vertical_collision
JSR _check_stand_object
LDA z:z00
BNE @not_air
…mm2: Mega Man 2 disassembly (lsmmega/mm2) · engine/check_object_vertical_move.asm#L68-L80 — on ground the speed is zeroed, then gravity is taken from it@mainloop:
LDA #$00
STA aobject_ycoord_speed_fraction
STA aobject_ycoord_speed
…
LDA aobject_ycoord_speed
SBC z:zobject_ycoord_speed_accelerate
STA aobject_ycoord_speedmm2: Mega Man 2 disassembly (lsmmega/mm2) · engine/run_megaman.asm#L84-L90JSR _megaman_status_parameter
JSR _check_object_horizontal_move
JSR _check_object_vertical_move
LDA z:z00
BNE _run_megaman_landing_common_1
LDA #$06
STA z:zmegaman_statusChecked by claude, 2026-10-22 — read _check_object_vertical_move and the grounded states at the pinned commit; in the probe the vertical speed after every standing and running frame is $FF.$C0 and the Y fraction 0Probe: probes/lab/mega-man-2-stage.mjsThe snap subtracts (Y + 12) mod 16 from Y, which is 0 while he stands on a tile's top, so on flat ground he never moves. The first step, running, and landing states go to the jumping state the same way (_run_megaman_not_landing_common, L144-L148).
Mega Man first counts as airborne on the frame whose move takes both floor points off the ledge; that frame still moves him at the ground state's speed, drops him 0.25 px, and leaves him in the jumping state falling at 0.5 px/frame, so his feet are 0, 0, 1, 2, 3, 5, and 7 px below the ledge on the walk-off frame and the six after. mega-man-2/walk-off
About: Mega Man 2 Coyote time
Value
{
"drop": 64,
"v": -128,
"heights": [
0,
0,
-1,
-2,
-3,
-5,
-7,
-9,
-11,
-13,
-16,
-19,
-22,
-26,
-30
]
}engine/run_megaman.asm#L139-L148 — the running state; standing, the first step, and landing do the sameJSR _check_object_horizontal_move
JSR _check_object_vertical_move
LDA z:z00
BNE _run_megaman_landing_common_2
…
_run_megaman_not_landing_common:
LDA #$06
STA z:zmegaman_statusmm2: Mega Man 2 disassembly (lsmmega/mm2) · engine/check_object_vertical_move.asm#L100-L105 — no ground and no object to stand on, so gravity is taken and z00 stays 0JSR _check_vertical_collision
JSR _check_stand_object
LDA z:z00
BNE @not_air
BCS @stand_item
BCC @airChecked by claude, 2026-10-22 — read the grounded states and _check_object_vertical_move at the pinned commit; ran the probe, which runs right off the ledge at the start of Heat Man's stage, and the lab's model on a stage with the same ledge, which matches every frameProbe: probes/lab/mega-man-2-stage.mjsRunning right off an edge at X = e, the walk-off frame is the first whose move brings his center's pixel to e + 7, so one column of his 16 px box still overhangs the ledge; walking left, the first to bring it to e − 8 for an edge whose first column is e. At Heat Man's start (e = 256) he runs from X 262.25 to 263.625 on frame 105, Y's fraction goes to $40, and the speed to $FF.$80. From the next frame the jumping state's d-pad rules apply (air-speed), and its fall gains 0.25 px/frame each frame (gravity). Heights are whole pixels, rounded up.
When the horizontal move puts the wall point ahead in a solid tile, _check_object_horizontal_move zeroes Mega Man's X fraction and pushes him back by the point's depth into the tile, so x + 8 ends on the wall's first column moving right and x − 8 on the first column past it moving left; his speed and state are untouched, so he runs in place. mega-man-2/wall-stop
About: Mega Man 2 Hitbox
Verifiedmm2: Mega Man 2 disassembly (lsmmega/mm2) ·engine/check_object_horizontal_move.asm#L39-L53JSR _check_horizontal_collision
LDA z:z00
BEQ @air_1
LDA #$00
STA aobject_xcoord_fraction
LDA z:z08
AND #%00001111
STA z:z00
SEC
LDA aobject_xcoord
SBC z:z00
STA aobject_xcoordmm2: Mega Man 2 disassembly (lsmmega/mm2) · engine/check_object_horizontal_move.asm#L92-L102JSR _check_horizontal_collision
LDA z:z00
BEQ @air_2
LDA #$00
STA aobject_xcoord_fraction
LDA z:z08
AND #%00001111
EOR #%00001111
SEC
ADC aobject_xcoord
STA aobject_xcoordmm2: Mega Man 2 disassembly (lsmmega/mm2) · engine/check_object_horizontal_move.asm#L187-L196 — background, block, ladder, spike; conveyors and ice (5-7) are also $01tsa_horizontal_blockset_flags_table:
.BYTE $00
.BYTE $01
.BYTE $00
.BYTE $03Checked by claude, 2026-10-22 — read _check_object_horizontal_move and _check_horizontal_collision at the pinned commit; in the probe, running left at 1.375 px/frame into the face of a ledge whose last column is 383 takes him from X 393.0 to 391.625 and back out to 392.0, where he stays with speed 352 and the running stateProbe: probes/lab/mega-man-2-stage.mjsThe wall point is x + 8 or x − 8 at 12 and 4 px above his center and 11 below it (terrain-box), tested toward his facing (ztoward) on every frame, at whatever speed. A ledge 16 px or more above his feet is a wall. Nothing zeroes his speed: each state sets it from its row every frame (state-speeds), so the push repeats while the d-pad is held.
When a falling Mega Man's floor points find a block, _check_object_vertical_move subtracts (Y + 12) mod 16 from his Y, which puts his feet on that 16 px tile's top, zeroes the Y fraction and the vertical speed, then takes one step of gravity from the speed; so a fall of up to 12 px a frame always ends on the top of the tile it meets. mega-man-2/floor-snap
About: Mega Man 2 Jump
Verifiedmm2: Mega Man 2 disassembly (lsmmega/mm2) ·engine/check_object_vertical_move.asm#L107-L122@not_air:
LDA #$00
STA aobject_ycoord_fraction
LDA aobject_ycoord
PHA
LDA z:z0A
AND #%00001111
STA aobject_ycoord
PLA
SEC
SBC aobject_ycoord
STA aobject_ycoord
…Checked by claude, 2026-10-22 — read _check_object_vertical_move at the pinned commit; in the probe a jump over the pit at Heat Man's start lands at Y 164 and a walk off the next ledge, 32 px down, falls to Y 198 and is put back to 196, both with Y + 12 on a 16 px row, the fraction 0, and the speed $FF.$C0Probe: probes/lab/mega-man-2-stage.mjsA fall is capped at 12 px a frame (max-fall), less than a tile, so the floor point is always in the top tile of the ground it meets. A rising Mega Man doesn't test the floor (collision-order).
A pit has no floor of its own; once Mega Man's Y passes $E8 on the screen, _check_object_vertical_move asks for a downward scroll, and _check_scroll kills him where the stage doesn't scroll down. mega-man-2/pit-death
About: Mega Man 2 Hitbox
Codemm2: Mega Man 2 disassembly (lsmmega/mm2) ·engine/check_object_vertical_move.asm#L37-L43@on_screen_1:
CPX #$E8
BCC @on_screen_2
LDA z:zout_of_screen
BMI @on_screen_2
LDA #$03
STA z:zscroll_directionmm2: Mega Man 2 disassembly (lsmmega/mm2) · engine/check_scroll.asm#L37-L43@check_vertical:
LDA z:zscroll_direction
CMP #$03
BNE @continue
LDA #$01
STA z:zmegaman_status
JMP _megaman_deathChecked by claude, 2026-10-22 — read _check_object_vertical_move and _check_scroll at the pinned commitThe first pit of Heat Man's stage has spikes at the bottom, which kill him on touch (status 0, _check_vertical_collision L176-L183) before he reaches the screen's edge.
When a rising Mega Man's move puts a ceiling point, x − 7 or x + 7 at 12 px above his center, in a block, _check_object_vertical_move zeroes his Y fraction and adds 16 − ((Y − 12) mod 16) to Y, which puts that point on the first row under the block's 16 px tile, then zeroes his speed and takes one step of gravity from it; he stays in the jumping state and falls from the next frame, starting at 0.25 px/frame. mega-man-2/ceiling-hit
About: Mega Man 2 Hitbox
Value: -64 1/256 px/frame
Verifiedmm2: Mega Man 2 disassembly (lsmmega/mm2) ·engine/check_object_vertical_move.asm#L47-L71 — then gravity (`@air`, L73-L80); z00 is still nonzero on returnLDA aobject_ycoord_speed
BMI @down
SEC
LDA aobject_ycoord
SBC #$0C
STA z:z0A
…
JSR _check_vertical_collision
LDA z:z00
BEQ @air
LDA #$00
STA aobject_ycoord_fraction
…mm2: Mega Man 2 disassembly (lsmmega/mm2) · engine/check_object_vertical_move.asm#L129-L142 — the same routine as the floor test: both points at the row in z0A, each looked up as a tile, and z00 set when either is solid (L188-L193)_check_vertical_collision:
LDA #$01
STA z:z01
@loop_1:
LDX z:z01
CLC
LDA aobject_xcoord
ADC check_vertical_collision_xcoord_offset, X
STA z:z08
LDA aobject_screen
ADC check_vertical_collision_screen_offset, X
…mm2: Mega Man 2 disassembly (lsmmega/mm2) · engine/check_object_vertical_move.asm#L212-L213 — the points' x offsets (mega-man-2/terrain-box)check_vertical_collision_xcoord_offset:
.BYTE +7, -7mm2: Mega Man 2 disassembly (lsmmega/mm2) · engine/run_megaman.asm#L205-L223 — the jumping state returns at once, past the release cut, with its status unchangedJSR _check_object_vertical_move
LDA z:z00
BNE @landing
LDA z:zjoy1_pressed
AND #a_button
BNE @skip
…
@landing:
@skip:
RTSChecked by claude, 2026-10-22 — read _check_object_vertical_move, _check_vertical_collision, and _run_megaman_jumping at the pinned commit; the probe adds 16 px blocks over Mega Man at the start of Heat Man's stage (8, 24, and 40 px over his head; over x − 7 alone, x + 7 alone, or both; and at a corner during a running jump) and every hit leaves Y − 12 on the row under the block, the Y fraction 0, the speed $FF.$C0, and the status 6; the lab's model matches every frameProbe: probes/lab/mega-man-2-ceiling.mjsThe test runs after the frame's horizontal move, which tested walls at the old Y, so a running jump whose x + 7 rises into a block's corner is knocked down and keeps its air speed rather than being pushed aside (measured: X 156, a block at X 160-175). The release cut is skipped on the hit frame, which changes nothing, since the speed is already falling; a rise already cut to 1 px/frame still meets a block it reaches (measured at 0.5 px/frame). The ceiling points read tile kinds as the floor points do (_check_vertical_collision), so a spike overhead kills him unless he is invincible.
No grounded state tests the ceiling, since each grounded frame leaves Mega Man's vertical speed at −0.25 px/frame (ground-check) and the vertical move tests only the floor at a negative speed; the jump press then sets the jump speed and the jumping state without a test, so a jump always starts under a ceiling, and the rise first meets it on a later frame. mega-man-2/jump-under-ceiling
About: Mega Man 2 Jump
Verifiedmm2: Mega Man 2 disassembly (lsmmega/mm2) ·engine/check_object_vertical_move.asm#L68-L80 — every frame that finds ground (`@not_air`, L107-L122) ends here, so a grounded Mega Man enters each frame at 0 less gravity, `$FF`.`$C0` (mega-man-2/ground-check)@mainloop:
LDA #$00
STA aobject_ycoord_speed_fraction
STA aobject_ycoord_speed
@air:
SEC
LDA aobject_ycoord_speed_fraction
SBC z:zobject_ycoord_speed_accelerate_fraction
STA aobject_ycoord_speed_fraction
LDA aobject_ycoord_speed
SBC z:zobject_ycoord_speed_accelerate
…mm2: Mega Man 2 disassembly (lsmmega/mm2) · engine/check_object_vertical_move.asm#L47-L48 — a negative speed takes the floor branch (`@down`, L92-L105), which never reads the ceiling pointsLDA aobject_ycoord_speed
BMI @downmm2: Mega Man 2 disassembly (lsmmega/mm2) · engine/run_megaman.asm#L84-L88 — standing; the first step, running, and landing states run the same pair and reach the same jump check (L113-L133, L139-L158, L248-L271)JSR _megaman_status_parameter
JSR _check_object_horizontal_move
JSR _check_object_vertical_move
LDA z:z00
BNE _run_megaman_landing_common_1mm2: Mega Man 2 disassembly (lsmmega/mm2) · engine/run_megaman.asm#L94-L103_run_megaman_landing_common_1:
LDA z:zjoy1_pressed_bits
AND #a_button
BEQ @not_pressed
LDA z:zjump_speed_fraction
STA aobject_ycoord_speed_fraction
LDA z:zjump_speed
STA aobject_ycoord_speed
LDA #$06
STA z:zmegaman_statusChecked by claude, 2026-10-22 — read _check_object_vertical_move and the standing, first-step, running, and landing states at the pinned commit; in the probe, under a block 8 px over his head, a standing press and a press while running both leave status 6 and speed $04.$DF on the press frame and meet the block two frames later (ceiling-hit)Probe: probes/lab/mega-man-2-ceiling.mjsThe press frame doesn't move him up (jump-start). A block 16 px above the floor holds his wall points (terrain-box), so he can't stand under one: 32 px is the lowest ceiling he fits under.
Under a block 32 px above the floor, 8 px over his head, a standing jump meets the block on its second rising frame and lands on frame 11, with his feet 0, 5, 8, 8, 8, 7, 6, 5, 3, 1, and 0 px up on frames 1-11. mega-man-2/low-ceiling-hop
About: Mega Man 2 Jump
Value
{
"heights": [
0,
0,
5,
8,
8,
8,
7,
6,
5,
3,
1,
0
]
}engine/check_object_vertical_move.asm#L57-L66 — the hit (mega-man-2/ceiling-hit)LDA z:z00
BEQ @air
LDA #$00
STA aobject_ycoord_fraction
LDA z:z0A
AND #%00001111
EOR #%00001111
SEC
ADC aobject_ycoord
STA aobject_ycoordChecked by claude-agent, 2026-10-25 — Read the hit in the vertical move (check_object_vertical_move.asm L57-66: on a collision the fraction is cleared and Y is pushed out of the block) at the pinned commit; the per-frame heights are the probe's measurement in the game under a placed block.Probe: probes/lab/mega-man-2-ceiling.mjsHeights are whole pixels, rounded up, from frame 0 (before the press): 4.87 px up on frame 2 leaves 3.13 px of headroom, and frame 3's 4.62 px takes his top row into the block.