Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions src/infohud.asm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
70 changes: 53 additions & 17 deletions src/infohudmodes.asm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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

Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/main.asm
Original file line number Diff line number Diff line change
Expand Up @@ -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 ""
Expand Down
1 change: 1 addition & 0 deletions web/data/changelog.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion web/data/config.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Super Metroid Practice Hack",
"version": "2.7.0",
"version": "2.7.0.1",
"variants": ["NTSC", "PAL"],
"base": {
"NTSC": {
Expand Down