data/claims/mm2-line.yamlMega Man 2 across the line (lsmmega/mm2)
Game: Mega Man 2.
A hit sets zmegaman_invincibility_time to 111 ($6F); contact damage is skipped while it is nonzero, and it counts down by 1 each time Mega Man's sprite is processed, hiding him on alternate pairs of frames. mm2-line/i-frames
About: Mega Man 2 Invincibility frames
Value: 111 frames
Codemm2: Mega Man 2 disassembly (lsmmega/mm2) ·home/megaman_hit.asm#L11-L12LDA #$6F
STA z:zmegaman_invincibility_timemm2: Mega Man 2 disassembly (lsmmega/mm2) · home/object_hit.asm#L34-L35LDA z:zmegaman_invincibility_time
BNE @skip_1mm2: Mega Man 2 disassembly (lsmmega/mm2) · home/sprites.asm#L277-L289_is_megaman_object:
TAY
CPX #1
BCS @not_megaman_object
LDA z:zmegaman_invincibility_time
BEQ @skip
DEC z:zmegaman_invincibility_time
LDA z:znmi_frame
AND #%00000010
BEQ @skip
…
@is_out_of_screen:
…Checked by claude, 2026-10-21 — read _megaman_hit, the contact test in _object_hit, and _is_megaman_object at the pinned commitBosses test the same timer before their contact damage (engine/bosses_hit.asm L31).
Cited by: Mega Man 2
_megaman_hit sets Mega Man's upward speed to 1.25 px/frame ($01.$40) and his horizontal speed to 0.5625 ($90) once; the hit state then moves him against his facing under the usual gravity until his animation's upper timer returns to 0, and leaves to the jumping or standing state. mm2-line/knockback
About: Mega Man 2 Knockback
Value
{
"up": 320,
"back": 144
}home/megaman_hit.asm#L5-L20LDA #$02
STA z:zmegaman_status
JSR _check_megaman_hit_status
LDA #$01
STA aobject_frameset_upper_timer
LDA #$6F
STA z:zmegaman_invincibility_time
LDA #$01
STA aobject_ycoord_speed
LDA #$40
STA aobject_ycoord_speed_fraction
LDA #$00
…mm2: Mega Man 2 disassembly (lsmmega/mm2) · engine/run_megaman.asm#L52-L72_run_megaman_megaman_hit:
LDA aobject_flag
AND #objects_right
EOR #objects_right
STA z:ztoward
JSR _check_object_horizontal_move
JSR _check_object_vertical_move
LDA aobject_frameset_upper_timer
BEQ @knock_back_done
JSR _check_megaman_hit_status
RTS
…
…Checked by claude, 2026-10-21 — read _megaman_hit and _run_megaman_megaman_hit at the pinned commit; the hit state (2) never calls _megaman_status_parameter, so the speed set at the hit holdsThe hit's row in the state speed table is also $90 (mega-man-2/state-speeds). The atlas hasn't measured how many frames the animation takes to wrap.
Cited by: Mega Man 2
Each weapon has its own energy byte, filled to 28 ($1C) before a Robot Master stage or the first Wily stage but not before the later Wily stages; each weapon's routine takes its own cost, such as 2 per Air Shooter shot, 4 per Crash Bomber, and 1 per 4 Metal Blades counted on a shared counter. mm2-line/weapon-energy
About: Mega Man 2 Weapon energy
Value
{
"max": 28,
"airShooter": 2,
"crashBomber": 4,
"metalBladeShotsPerUnit": 4
}engine/main.asm#L73-L89_bosses_defeated_to_continue_stage:
LDA z:zcurrent_stage
CMP #stage_wily1
BCC _game_over_to_continue_stage
JSR _home_wily_castle
LDA z:zcurrent_stage
CMP #stage_wily2
BCS _dont_refill_energy_on_wily_stage
…
_game_over_to_continue_stage:
LDX #$0A
LDA #$1C
…mm2: Mega Man 2 disassembly (lsmmega/mm2) · home/weapons.asm#L94-L97 — Air ShooterSEC
LDA z:zweapon_energy + $01
SBC #$02
STA z:zweapon_energy + $01mm2: Mega Man 2 disassembly (lsmmega/mm2) · home/weapons.asm#L205-L215@crash_bomber:
…
LDA z:zweapon_energy + $07
SBC #$04
BCC @skip_8
STA z:zweapon_energy + $07mm2: Mega Man 2 disassembly (lsmmega/mm2) · home/weapons.asm#L240-L250@not_exist_4:
LDY #$07
JSR _create_weapon
track_queue track_metal_blade
INC z:zweapon_consume_fraction
LDA z:zweapon_consume_fraction
CMP #$04
BNE @not_max_3
LDA #$00
STA z:zweapon_consume_fraction
DEC z:zweapon_energy + $06Checked by claude, 2026-10-21 — read the refill loop in main.asm and the Air Shooter, Crash Bomber, and Metal Blade routines in _use_weapons at the pinned commit. Bubble Lead (L148-L153) and Quick Boomerang (L188-L194) use the same shared counter, 1 per 2 and 1 per 8Continuing after a game over also refills it: the death that takes the last life runs the game-over screen and then jumps to the refill (home/megaman_death.asm L88-L96). The Crash Bomber checks its cost before firing (BCC @skip_8).
Cited by: Mega Man 2, Weapon energy
Each weapon has a 14-byte table with one damage value per boss, in the order of zcurrent_boss: 0 makes the boss immune, a negative value refills its health, and other values are subtracted, doubled when zdifficulty is 0. Metal Blade's byte for Metal Man is 14 ($0E), so 14 damage, or 28 when doubled, and 0 for Air Man and Quick Man; the Mega Buster's bytes for the Robot Masters are 1 or 2; Atomic Fire refills Heat Man. mm2-line/boss-weakness
About: Mega Man 2 Boss weakness
Value
{
"metalBladeBytes": {
"heatman": 1,
"airman": 0,
"woodman": 2,
"bubbleman": 4,
"quickman": 0,
"flashman": 4,
"metalman": 14,
"crashman": 0
}
}data/weapons_bosses_damage_table.asm#L1-L9@mega_buster_damage_table:
.BYTE $02 ;heatman
.BYTE $02 ;airman
.BYTE $01 ;woodman
.BYTE $01 ;bubbleman
.BYTE $02 ;quickman
.BYTE $02 ;flashman
.BYTE $01 ;metalman
.BYTE $01 ;crashmanmm2: Mega Man 2 disassembly (lsmmega/mm2) · data/weapons_bosses_damage_table.asm#L113-L121@metal_blade_damage_table:
.BYTE $01 ;heatman
.BYTE $00 ;airman
.BYTE $02 ;woodman
.BYTE $04 ;bubbleman
.BYTE $00 ;quickman
.BYTE $04 ;flashman
.BYTE $0E ;metalman
.BYTE $00 ;crashmanmm2: Mega Man 2 disassembly (lsmmega/mm2) · engine/weapons_bosses_damage.asm#L388-L399LDA aobject_flag + 1
AND #objects_can_recoiled
BNE @immune_8
LDY z:zcurrent_boss
LDA @metal_blade_damage_table, Y
STA z:z00
BEQ @immune_8
BPL @not_refilled_8
JMP @refill_boss
…
@not_refilled_8:
JSR @calc_difficultymm2: Mega Man 2 disassembly (lsmmega/mm2) · engine/weapons_bosses_damage.asm#L452-L458@calc_difficulty:
LDA z:zdifficulty
BNE @difficult
ASL z:z00
…
@difficult:
RTSmm2: Mega Man 2 disassembly (lsmmega/mm2) · engine/weapons_bosses_damage.asm#L60-L64@atomic_fire:
LDA z:zcurrent_boss
CMP #$00
BNE @not_heatman
JMP @refill_bossChecked by claude, 2026-10-21 — read the Mega Buster and Metal Blade rows of the table, the Metal Blade and Atomic Fire damage routines, and @calc_difficulty at the pinned commit; the Mega Buster routine (L11-L26) reads its row the same way. The boss names are lsmmega's comments, in the order of the stage selectRegular enemies use separate tables (home/weapons_enemies_damage_table.asm), not these.
Cited by: Boss weakness, Mega Man 2
Mega Man 2 has no slide. A fresh A press in a grounded state always starts a jump; that code tests no other button. mm2-line/no-slide
About: Mega Man 2 Ground slide
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_statusChecked by claude, 2026-10-21 — read _run_megaman_landing_common_1 and the state jump table at the pinned commit; no state sets Mega Man moving at a slide speed (mega-man-2/state-speeds)The state named landing here (7) is the short skid after a run, at 0.5 px/frame, not a slide move.
Cited by: Ground slide, Mega Man 2
Mega Man 2's Mega Buster has no charge. It fires only on the frame B goes down, with a free shot slot. mm2-line/no-charge-shot
About: Mega Man 2 Charge shot
Codemm2: Mega Man 2 disassembly (lsmmega/mm2) ·home/weapons.asm#L20-L30@mega_buster:
LDA z:zjoy1_pressed_bits
AND #b_button
BEQ @skip_2
LDX #$04
…
@loop_1:
LDA aobject_flag, X
BPL @not_exist_1
DEX
CPX #$01Checked by claude, 2026-10-21 — read the @mega_buster routine at the pinned commit through @skip_2; it reads only zjoy1_pressed_bits, never the held buttonsCited by: Charge shot, Mega Man 2