From 1511d5c6430126d0376d79b09c7bb82cda8705d7 Mon Sep 17 00:00:00 2001 From: idle Date: Sun, 13 Jul 2025 12:21:12 -0500 Subject: [PATCH] Walljump, shot timer, and shinetune play nicer with transition times and minimap --- src/infohud.asm | 12 ++++---- src/infohudmodes.asm | 70 ++++++++++++++++++++++++++++++++---------- src/main.asm | 2 +- web/data/changelog.mdx | 1 + web/data/config.json | 2 +- 5 files changed, 62 insertions(+), 25 deletions(-) diff --git a/src/infohud.asm b/src/infohud.asm index a17c14db..c3e53fea 100644 --- a/src/infohud.asm +++ b/src/infohud.asm @@ -812,7 +812,6 @@ ih_update_hud_code: .mmTileCounter LDA !MAP_COUNTER : LDX #$0014 : JSR Draw3 - LDA !ram_print_segment_timer : BEQ .mmRoomTimer LDA !sram_lag_counter_mode : BNE .mmFullTransitionTime LDA !ram_last_door_lag_frames @@ -905,8 +904,6 @@ ih_update_hud_code: .skipToLag LDA !sram_top_display_mode : BIT !TOP_HUD_VANILLA_BIT : BNE .vanillaLagReserves LDA !ram_last_room_lag : LDX #$0080 : JSR Draw4 - ; Skip door lag and segment timer when certain HUD modes enabled - LDA !ram_print_segment_timer : BEQ .end ; Door lag / transition time LDA !sram_lag_counter_mode : BNE .fullTransitionTime @@ -916,6 +913,9 @@ ih_update_hud_code: LDA !ram_last_realtime_door .drawTransitionTime LDX #$00C2 : JSR Draw3 + + ; Skip segment timer when certain HUD modes enabled + LDA !ram_print_segment_timer : BEQ .end BRA .pickSegmentTimer .end @@ -936,9 +936,6 @@ ih_update_hud_code: .vanillaDrawLag LDA !ram_last_room_lag : LDX #$007E : JSR Draw4 - ; Skip door lag and segment timer when certain HUD modes enabled - LDA !ram_print_segment_timer : BEQ .end - ; Door lag / transition time LDA !sram_lag_counter_mode : BNE .vanillaFullTransitionTime LDA !ram_last_door_lag_frames @@ -948,6 +945,9 @@ ih_update_hud_code: .vanillaDrawTransitiontime LDX #$00C2 : JSR Draw2 + ; Skip segment timer when certain HUD modes enabled + LDA !ram_print_segment_timer : BEQ .end + .pickSegmentTimer LDA !sram_frame_counter_mode : BIT #$0001 : BNE .inGameSegmentTimer LDA.w #!ram_seg_rt_frames : STA $C1 diff --git a/src/infohudmodes.asm b/src/infohudmodes.asm index 770b6bdd..e63bbd52 100644 --- a/src/infohudmodes.asm +++ b/src/infohudmodes.asm @@ -246,12 +246,14 @@ endif ; Samus has reached fourth gear and is ready to charge the shinespark by pressing down ; When this happens, the gear resets to zero, so check for that - LDA !SAMUS_DASH_COUNTER : AND #$00FF : CMP !ram_dash_counter : BEQ .chargespark + LDA !SAMUS_DASH_COUNTER : AND #$00FF : CMP !ram_dash_counter : BNE .draw_end + JMP .chargespark .draw_end ; Skip drawing if minimap on LDA !ram_minimap : BNE .reset LDA !ram_shinetune_late_4 : LDX #$00C0 : JSR Draw3 + LDA !IH_BLANK : STA !HUD_TILEMAP+$C6 .reset TDC : STA !ram_shine_counter : STA !ram_dash_counter @@ -1026,7 +1028,7 @@ status_walljump: .clearaverage TDC : STA !ram_roomstrat_counter - BRA .checkjump + JMP .checkjump .incframecount ; Arbitrary wait of 120 frames before we stop tracking the average @@ -1058,34 +1060,51 @@ status_walljump: BRA .checkjump .resetreleasejump - LDA !ram_roomstrat_state : DEC : AND #$0003 + BNE .gotocheckleftright : STA !ram_shot_timer + LDA !ram_roomstrat_state : BEQ .gotocheckleftright + DEC : AND #$0003 ASL #2 : TAX : LDA !IH_BLANK : STA !HUD_TILEMAP+$B0,X BRA .blanksides + .incwithmap + LDA !ram_roomstrat_state : INC + BIT #$0003 : BNE .storeroomstate + + .incroomstate + INC + + .storeroomstate + STA !ram_roomstrat_state + JMP .checkleftright + .zerospeed TDC : STA !ram_momentum_sum .checkjump LDA !IH_CONTROLLER_PRI_NEW : AND !IH_INPUT_JUMP : BNE .pressedjump - LDA !IH_CONTROLLER_PRI : AND !IH_INPUT_JUMP : BNE .checkleftright + LDA !IH_CONTROLLER_PRI : AND !IH_INPUT_JUMP : BNE .gotocheckleftright ; count up to 36 frames of jump released - LDA !ram_shot_timer : CMP #$0024 : BPL .resetreleasejump - INC : STA !ram_shot_timer - ASL : TAX + LDA !ram_shot_timer : INC + CMP #$0025 : BPL .resetreleasejump + STA !ram_shot_timer : ASL : TAX LDA NumberGFXTable,X : PHA - LDA !ram_roomstrat_state : DEC : AND #$0003 + LDA !ram_roomstrat_state : BEQ .placheckleftright + DEC : AND #$0003 ASL #2 : TAX : PLA : STA !HUD_TILEMAP+$B0,X LDA !IH_BLANK .blanksides STA !HUD_TILEMAP+$AE,X : STA !HUD_TILEMAP+$B2,X + + .gotocheckleftright BRA .checkleftright .pressedjump TDC : STA !ram_shot_timer - LDA !ram_roomstrat_state : INC : STA !ram_roomstrat_state - BRA .checkleftright + LDA !ram_minimap : BNE .incwithmap + LDA !ram_roomstrat_state + BRA .incroomstate .writg LDA #$042F : STA !ram_ypos @@ -1109,6 +1128,9 @@ status_walljump: CMP.w #ROOM_MtEverest : BEQ .everest JMP .clear + .placheckleftright + PLA + .checkleftright LDA !IH_CONTROLLER_PRI_NEW : AND !IH_INPUT_LEFT : BNE .leftright LDA !IH_CONTROLLER_PRI_NEW : AND !IH_INPUT_RIGHT : BNE .leftright @@ -1420,17 +1442,25 @@ status_ypos: status_shottimer: { LDA !IH_CONTROLLER_PRI_NEW : AND !IH_INPUT_SHOT : BEQ .incShot - LDA !IH_BLANK : STA !HUD_TILEMAP+$AE - STA !HUD_TILEMAP+$B2 : STA !HUD_TILEMAP+$B6 - STA !HUD_TILEMAP+$BA : STA !HUD_TILEMAP+$BE - LDA !ram_shot_timer_past4 : BEQ .initPast + LDA !ram_shot_timer_past4 : BNE .doneInitPast + JMP .initPast + .doneInitPast - STA !HUD_TILEMAP+$BC + LDA !ram_minimap : BEQ .drawPast4 + LDA !IH_BLANK + BRA .donePast4 + .drawPast4 + LDA !ram_shot_timer_past4 : STA !HUD_TILEMAP+$BC + LDA !IH_BLANK : STA !HUD_TILEMAP+$BE + .donePast4 + STA !HUD_TILEMAP+$AE : STA !HUD_TILEMAP+$B2 + STA !HUD_TILEMAP+$B6 : STA !HUD_TILEMAP+$BA LDA !ram_shot_timer_past3 : STA !HUD_TILEMAP+$B8 : STA !ram_shot_timer_past4 LDA !ram_shot_timer_past2 : STA !HUD_TILEMAP+$B4 : STA !ram_shot_timer_past3 LDA !ram_shot_timer_past1 : STA !HUD_TILEMAP+$B0 : STA !ram_shot_timer_past2 LDA !ram_shot_timer : LDX #$0088 : JSR Draw4 - LDA !ram_shot_timer : CMP #$0042 : BPL .setX + LDA !ram_shot_timer : CMP #$0025 : BPL .setXMap + .setValue ASL : TAX : LDA NumberGFXTable,X BRA .setPast1 @@ -1446,10 +1476,16 @@ status_shottimer: LDA !ROOM_ID : CMP.w #ROOM_PhantoonRoom : BEQ .phantoon RTS + .setXMap + CMP #$0042 : BPL .setX + LDA !ram_minimap : BNE .setX + LDA !ram_shot_timer + BRA .setValue + .initPast LDA !IH_BLANK : STA !ram_shot_timer_past4 : STA !ram_shot_timer_past3 STA !ram_shot_timer_past2 : STA !ram_shot_timer_past1 - BRA .doneInitPast + JMP .doneInitPast .phantoonCheckInit LDA !ENEMY_VAR_5 diff --git a/src/main.asm b/src/main.asm index f395dab0..95de14c3 100644 --- a/src/main.asm +++ b/src/main.asm @@ -16,7 +16,7 @@ lorom !VERSION_MAJOR = 2 !VERSION_MINOR = 7 !VERSION_BUILD = 0 -!VERSION_REV = 0 +!VERSION_REV = 1 table ../resources/normal.tbl print "" diff --git a/web/data/changelog.mdx b/web/data/changelog.mdx index a707afcf..b41469f3 100644 --- a/web/data/changelog.mdx +++ b/web/data/changelog.mdx @@ -6,6 +6,7 @@ - Spore Spawn, Crocomire, and Baby cutscene more like map rando when using door portals (2.7.0) - Shot timer now displays the previous four values in place of the segment timer (2.7.0) - Various fixes and updates to presets and slowdown mode (2.7.0) +- Walljump, shot timer, and shinetune play nicer with transition times and minimap (2.7.0.1) # Version 2.6.x - Optimize kraid rock projectiles to reduce lag when Kraid rises (2.6.0) diff --git a/web/data/config.json b/web/data/config.json index 34fb9cc3..7f3c64c9 100644 --- a/web/data/config.json +++ b/web/data/config.json @@ -1,6 +1,6 @@ { "name": "Super Metroid Practice Hack", - "version": "2.7.0", + "version": "2.7.0.1", "variants": ["NTSC", "PAL"], "base": { "NTSC": {