Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
72fe19d
Re-randomize RNG now covers the enemy main loop counter
idlechild Sep 21, 2025
b9f4cb9
Commonize preset names
idlechild Sep 28, 2025
bb2278b
Move category preset names to common bank used by all presets
idlechild Sep 29, 2025
684e73f
Add KPDR 20% category and select KPDR 22% by default
idlechild Oct 2, 2025
060313e
Spikesuit infohud mode adds limited support for slopespark
idlechild Oct 2, 2025
5d082cc
Separate KDPR 22% by hjb missile and moat missile
idlechild Oct 4, 2025
461d5d9
Initial work on No Drops KPDR presets
idlechild Oct 12, 2025
3b7f6d5
Add #1 Left and #1 Right phantoon flame options
idlechild Oct 12, 2025
c386ce5
Finish No Drops KPDR presets
idlechild Oct 13, 2025
a3718ad
Merge branch 'master' of github.com:tewtal/sm_practice_hack
idlechild Oct 23, 2025
51ffabb
Merge branch 'master' of github.com:tewtal/sm_practice_hack
idlechild Nov 1, 2025
12a5bb3
Initial progress on rando preset
idlechild Nov 1, 2025
086070c
Skip category preset scoll fixes when riding an elevator
idlechild Nov 1, 2025
8a68a7f
Preset progress through upper norfair
idlechild Nov 9, 2025
b56c56c
Finish rando presets
idlechild Nov 12, 2025
0ade230
Add dash speed InfoHUD mode
blkerby Oct 23, 2025
bf90db2
Also add dash speed to super HUD and door HUD modes
idlechild Nov 12, 2025
bf0a646
Port the ZSNES splashscreen from ALTTPR
idlechild Nov 12, 2025
e1dcc11
Fix issue with first half of ZSNES tiles
idlechild Nov 13, 2025
2f8047c
ten years
NobodyNada Nov 22, 2025
ed625b5
reserve bank $FF for SpriteSomething
NobodyNada Nov 22, 2025
de61a30
Slight optimization for sprite feature math
idlechild Nov 21, 2025
c4788a6
Allow the new zsnes screen to be exited by pressing B twice
idlechild Nov 22, 2025
91a5e09
Add a second zsnes check to filter out no$sns
idlechild Nov 22, 2025
08ca851
Fix KPDR leaving phantoon presets
idlechild Nov 22, 2025
f006868
Prepare for 2.7.2 release
idlechild Nov 22, 2025
6fedb8d
Fix periodic damage routines so they can handle >= 256 damage
idlechild Nov 22, 2025
795aed7
Update help and changelog
idlechild Nov 22, 2025
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
2 changes: 2 additions & 0 deletions build_presets.bat
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@

echo Building Combined Preset Data
cd src\presets
if exist combined_preset_names.asm del combined_preset_names.asm
if exist combined_map_preset_data.asm del combined_map_preset_data.asm
if exist combined_preset_data.asm del combined_preset_data.asm
python combine_preset_names.py
python combine_map_preset_data.py
python combine_preset_data.py
cd ..\..
Expand Down
2 changes: 2 additions & 0 deletions build_presets.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@

echo "Building Combined Preset Data"
cd src/presets
rm -f combined_preset_names.asm
rm -f combined_map_preset_data.asm
rm -f combined_preset_data.asm
python3 combine_preset_names.py
python3 combine_map_preset_data.py
python3 combine_preset_data.py
cd ../..
Expand Down
Binary file added resources/10years.0.brr
Binary file not shown.
Binary file added resources/10years.1.brr
Binary file not shown.
Binary file added resources/zsnes_palette.bin
Binary file not shown.
Binary file added resources/zsnes_tilemap.bin
Binary file not shown.
Binary file added resources/zsnes_tiles.bin
Binary file not shown.
122 changes: 121 additions & 1 deletion src/BRBmenu.asm
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,12 @@ cm_brb_loop:
JSL $808F0C ; Music queue
JSL $8289EF ; Sound fx queue

if !ZSNES_SPLASHSCREEN_GRAPHICS
LDA !ram_sram_detection
CMP !SRAM_DETECTION_ZSNES : BNE .loop
JSR brb_zsnes_splashscreen
endif

.loop
; [do entertaining stuff here]
JSR cm_draw_brb
Expand Down Expand Up @@ -188,15 +194,21 @@ cm_brb_loop:

cm_draw_brb:
{
JSL cm_tilemap_bg_interior_long
LDA !ram_sram_detection : BNE .splash_screen
JSL cm_tilemap_bg_interior_long
JSR cm_tilemap_brb
JSL cm_tilemap_transfer_long
JMP cm_brb_scroll_BG3

.splash_screen
if !ZSNES_SPLASHSCREEN_GRAPHICS
CMP !SRAM_DETECTION_ZSNES : BEQ .end
endif
JSL cm_tilemap_bg_interior_long
JSR cm_tilemap_splash_screen
JSL cm_tilemap_transfer_long

.end
RTS
}

Expand Down Expand Up @@ -352,6 +364,94 @@ cm_tilemap_splash_screen:
JMP cm_draw_brb_text
}

if !ZSNES_SPLASHSCREEN_GRAPHICS
brb_zsnes_splashscreen:
{
; Set up video mode
%ai8()
LDA #$80 ; screen off
STA $2100 ; brightness + screen enable register
LDA #$03
STA $2105 ; video mode 3, 8x8 tiles, 256 color BG1, 16 color BG2
STZ $2106 ; noplanes, no mosaic, = Mosaic register
LDA #$01
STA $210B ; Set BG1 tile data offset to $2000
STZ $210D ; Plane 0 scroll x (first 8 bits)
STZ $210D ; Plane 0 scroll x (last 3 bits) #$0 - #$07ff
LDA #$01
STA $212C ; Enable BG1
LDA #$FF
STA $210E ; Set BG1 scroll register
STA $210E
STZ $212E ; Window mask for Main Screen
STZ $212F ; Window mask for Sub Screen
LDA #$30
STA $2130 ; Color addition and screen addition init setting
STZ $2131 ; Add/Sub sub designation for screen, sprite, color
LDA #$E0
STA $2132 ; color data for addition/subtraction
STZ $2133 ; Screen setting (interlace x,y/enable SFX data)

; Load tilemap and tile data
%i16()
STZ $2116
LDA #$0C
STA $2107 ; Set BG1 tilemap offset to $1800 and size to 32x32
STA $2117 ; VRAM write address $1800

LDA #$80
STA $2115 ; VRAM single word transfer, word increment
LDX #$1801
STX $4300 ; DMA destination: VMDATAL/VMDATAH, fixed source
LDX.w #ZSNES_TileMap
STX $4302 ; Low DMA source address
LDA.b #ZSNES_TileMap>>16
STA $4304 ; High DMA source address
LDX #$0800
STX $4305 ; Transfer 2048 bytes
LDA #$01
STA $420B ; Start DMA transfer

LDX.w #ZSNES_Tiles
STX $4302 ; Low DMA source address
LDA.b #ZSNES_Tiles>>16
STA $4304 ; High DMA source address
LDX #$8000
STX $4305 ; Transfer 32768 bytes
LDA #$01
STA $420B ; Start DMA transfer

LDX.w #ZSNES_Tiles
STX $4302 ; Low DMA source address
LDA.b #ZSNES_Tiles>>16
INC
STA $4304 ; High DMA source address
LDX #$6040
STX $4305 ; Transfer 24640 bytes
LDA #$01
STA $420B ; Start DMA transfer

; Load CGRAM via DMA transfer
STZ $2121 ; Start at color 0
LDX #$2200
STX $4300 ; DMA destination: CGDATA, byte increment
LDX.w #ZSNES_Palette
STX $4302 ; Low DMA source address
LDA.b #ZSNES_Palette>>16
STA $4304 ; High DMA source address
LDX #$0200
STX $4305 ; Transfer 512 bytes
LDA #$01
STA $420B ; Start DMA transfer

LDA #$0F ; screen on, full brightness
STA $2100 ; brightness + screen enable register

%a16()
RTS
}
endif ; !ZSNES_SPLASHSCREEN_GRAPHICS

brb_handle_countup_timer:
{
LDA !ram_cm_brb_frames : INC : STA !ram_cm_brb_frames
Expand Down Expand Up @@ -630,3 +730,23 @@ BRB_screen7_line2:

%endfree(A1)


if !ZSNES_SPLASHSCREEN_GRAPHICS
org $E28000
check bankcross off
print pc, " zsnes splashscreen graphics crossbank start"

ZSNES_Tiles:
incbin ../resources/zsnes_tiles.bin

ZSNES_TileMap:
incbin ../resources/zsnes_tilemap.bin

ZSNES_Palette:
incbin ../resources/zsnes_palette.bin

print pc, " zsnes splashscreen graphics crossbank end"
warnpc $E48000
check bankcross on
endif

58 changes: 35 additions & 23 deletions src/custompresets.asm
Original file line number Diff line number Diff line change
Expand Up @@ -549,6 +549,11 @@ preset_scroll_fixes:
.category_presets
; organized by room ID for efficiency
PEA $7E7E : PLB : PLB
; if riding an elevator then skip straight to specialized start
LDA !ELEVATOR_STATUS : BEQ .category_start
JMP .specialized_start

.category_start
%a8()
LDA #$01 : LDX !ROOM_ID ; X = room ID
CPX.w #ROOM_BowlingAlley : BMI .tophalf
Expand Down Expand Up @@ -603,6 +608,8 @@ preset_scroll_fixes:

.climb
STA $CD39
JMP .specialized_climb

.topdone
PLB
PLP
Expand Down Expand Up @@ -725,7 +732,6 @@ preset_scroll_fixes:
CPX.w #ROOM_BatCave : BEQ .bat_cave
CPX.w #ROOM_AcidStatueRoom : BEQ .acid_chozo_room
CPX.w #ROOM_GoldenTorizoRoom : BEQ .golden_torizo
CPX.w #ROOM_FastPillarsSetupRoom : BEQ .fast_pillars_setup
CPX.w #ROOM_WorstRoomInTheGame : BEQ .worst_room
CPX.w #ROOM_RedKihunterShaft : BEQ .kihunter_stairs
CPX.w #ROOM_Wasteland : BEQ .wasteland
Expand Down Expand Up @@ -771,16 +777,6 @@ preset_scroll_fixes:
INC : STA $CD20 : STA $CD21
BRA .norfairdone

.fast_pillars_setup
LDY !SAMUS_Y : CPY #$0199 ; fix varies depending on Y position
BMI .above_pillars
STA $CD24 : INC : STA $CD22
STZ $CD21
BRA .norfairdone
.above_pillars
INC : STA $CD21
BRA .norfairdone

.worst_room
INC : STA $CD20
BRA .norfairdone
Expand Down Expand Up @@ -889,7 +885,7 @@ preset_scroll_fixes:
BRA .halfwaydone

.pants_room
STA $CD21 : STZ $CD22
STA $CD21
BRA .halfwaydone

.precious
Expand Down Expand Up @@ -966,6 +962,7 @@ endif
MVP $707E ; srcBank, destBank
TDC : STA !ram_load_preset_low_word

.specialized_start
%a8()
; X = room ID
LDX !ROOM_ID : CPX.w #ROOM_CeresElevatorRoom : BMI .specialized_fixes
Expand All @@ -976,29 +973,34 @@ endif
; -----------------------------------------------
.specialized_parlor
LDY !SAMUS_Y : CPY #$00D0 ; no fix if Ypos >= 208
BPL .specialdone
BPL .specialized_parlor_done
LDY !SAMUS_X : CPY #$0175 ; no fix if Xpos >= 373
BPL .specialdone
BPL .specialized_parlor_done
%a16() : LDA #$00FF
STA $7F05C0 : STA $7F05C2
LDY !SAMUS_PBS_MAX ; only clear bottom row if no power bombs
BEQ .specialdone
BEQ .specialized_parlor_done
STA $7F0520 : STA $7F0522
STA $7F0480 : STA $7F0482
.specialized_parlor_done
BRA .specialdone

.specialized_big_pink
LDY !SAMUS_Y : CPY #$02C0 ; no fix if Ypos < 704
BMI .specialdone
CPY #$03C9 ; no fix if Ypos >= 969
.specialized_climb
LDY !SAMUS_X : CPY #$0125 ; no fix if Xpos >= 285
BPL .specialdone
%a16() : LDA #$00FF
STA $7F2208 : STA $7F220A : STA $7F22A8 : STA $7F22AA
STA $7F2348 : STA $7F234A : STA $7F23E8 : STA $7F23EA
LDA #$01 : STA $CD38
CPY #$0095 ; only clear wall if Xpos >= 149
BPL .specialized_climb_wall
TDC : STA $CD39
.specialized_climb_wall
%a16() : LDA #$00FF : STA $7F3262 : STA $7F3264
STA $7F32C2 : STA $7F32C4 : STA $7F3322
STA $7F3324 : STA $7F3382 : STA $7F3384
BRA .specialdone

.specialized_fixes
CPX.w #ROOM_ParlorAndAlcatraz : BEQ .specialized_parlor
CPX.w #ROOM_Climb : BEQ .specialized_climb
CPX.w #ROOM_BigPink : BEQ .specialized_big_pink
CPX.w #ROOM_BlueBrinstarETank : BEQ .specialized_taco_tank_room
CPX.w #ROOM_HiJumpBootsRoom : BEQ .specialized_hjb_room
Expand All @@ -1008,6 +1010,16 @@ endif
PLP
RTL

.specialized_big_pink
LDY !SAMUS_Y : CPY #$02C0 ; no fix if Ypos < 704
BMI .specialdone
CPY #$03C9 ; no fix if Ypos >= 969
BPL .specialdone
%a16() : LDA #$00FF
STA $7F2208 : STA $7F220A : STA $7F22A8 : STA $7F22AA
STA $7F2348 : STA $7F234A : STA $7F23E8 : STA $7F23EA
BRA .specialdone

.specialized_taco_tank_room
LDY !SAMUS_X : CPY #$022B ; no fix if Xpos < 555
BMI .specialdone
Expand All @@ -1033,7 +1045,7 @@ endif
%a16() : LDA #$00FF
STA $7F036E : STA $7F0370 : STA $7F0374 : STA $7F0376
STA $7F03D4 : STA $7F0610 : STA $7F0612
BRA .specialdone
JMP .specialdone
}

LoadRandomPreset:
Expand Down
Loading