From 582b9405aa086a6cd1ab56936c1981943e72e2b5 Mon Sep 17 00:00:00 2001 From: idle Date: Sun, 25 Feb 2024 07:45:07 -0600 Subject: [PATCH 01/18] Update and fix build_docker scripts --- build.sh | 3 +++ build_PAL.bat | 9 +++++++++ build_PAL.sh | 3 +++ build_dev.sh | 12 +++++++++--- build_docker.bat | 8 +++++++- build_docker.sh | 9 +++++++-- 6 files changed, 38 insertions(+), 6 deletions(-) diff --git a/build.sh b/build.sh index e6c222a49..ceac7033b 100755 --- a/build.sh +++ b/build.sh @@ -14,6 +14,7 @@ python3 create_ram_symbols.py ../src/defines.asm ../src/symbols.asm python3 create_dummies.py 00.sfc ff.sfc echo "Building saveless version" +rm -f ../build/smhack20.ips cp *.sfc ../build ../tools/asar --no-title-check --symbols=wla --symbols-path=../build/symbols.sym -DFEATURE_SD2SNES=0 -DFEATURE_PAL=0 -DFEATURE_TINYSTATES=0 "$@" ../src/main.asm ../build/00.sfc ../tools/asar --no-title-check --symbols=wla --symbols-path=../build/symbols.sym -DFEATURE_SD2SNES=0 -DFEATURE_PAL=0 -DFEATURE_TINYSTATES=0 "$@" ../src/main.asm ../build/ff.sfc @@ -21,6 +22,7 @@ python3 sort_debug_symbols.py ../build/symbols.sym x x python3 create_ips.py ../build/00.sfc ../build/ff.sfc ../build/smhack20.ips echo "Building SD2SNES version" +rm -f ../build/smhack20_sd2snes.ips cp *.sfc ../build ../tools/asar --no-title-check --symbols=wla --symbols-path=../build/symbols.sym -DFEATURE_SD2SNES=1 -DFEATURE_PAL=0 -DFEATURE_TINYSTATES=0 "$@" ../src/main.asm ../build/00.sfc ../tools/asar --no-title-check --symbols=wla --symbols-path=../build/symbols.sym -DFEATURE_SD2SNES=1 -DFEATURE_PAL=0 -DFEATURE_TINYSTATES=0 "$@" ../src/main.asm ../build/ff.sfc @@ -28,6 +30,7 @@ python3 sort_debug_symbols.py ../build/symbols.sym x x python3 create_ips.py ../build/00.sfc ../build/ff.sfc ../build/smhack20_sd2snes.ips echo "Building TinyStates version" +rm -f ../build/smhack20_tinystates.ips cp *.sfc ../build ../tools/asar --no-title-check --symbols=wla --symbols-path=../build/symbols.sym -DFEATURE_SD2SNES=0 -DFEATURE_PAL=0 -DFEATURE_TINYSTATES=1 "$@" ../src/main.asm ../build/00.sfc ../tools/asar --no-title-check --symbols=wla --symbols-path=../build/symbols.sym -DFEATURE_SD2SNES=0 -DFEATURE_PAL=0 -DFEATURE_TINYSTATES=1 "$@" ../src/main.asm ../build/ff.sfc diff --git a/build_PAL.bat b/build_PAL.bat index f1141ca27..8d56bd12d 100644 --- a/build_PAL.bat +++ b/build_PAL.bat @@ -10,25 +10,34 @@ python create_ram_symbols.py ..\src\defines.asm ..\src\symbols.asm python create_dummies.py 00.sfc ff.sfc echo Building saveless version +if exist ..\build\smpalhack20.ips del ..\build\smpalhack20.ips copy *.sfc ..\build ..\tools\asar --no-title-check --symbols=wla --symbols-path=..\build\symbols.sym -DFEATURE_SD2SNES=0 -DFEATURE_PAL=1 -DFEATURE_TINYSTATES=0 ..\src\main.asm ..\build\00.sfc +if ERRORLEVEL 1 goto end_build_saveless ..\tools\asar --no-title-check --symbols=wla --symbols-path=..\build\symbols.sym -DFEATURE_SD2SNES=0 -DFEATURE_PAL=1 -DFEATURE_TINYSTATES=0 ..\src\main.asm ..\build\ff.sfc python sort_debug_symbols.py ..\build\symbols.sym x x python create_ips.py ..\build\00.sfc ..\build\ff.sfc ..\build\smpalhack20.ips +:end_build_saveless echo Building SD2SNES version +if exist ..\build\smpalhack20_sd2snes.ips del ..\build\smpalhack20_sd2snes.ips copy *.sfc ..\build ..\tools\asar --no-title-check --symbols=wla --symbols-path=..\build\symbols.sym -DFEATURE_SD2SNES=1 -DFEATURE_PAL=1 -DFEATURE_TINYSTATES=0 ..\src\main.asm ..\build\00.sfc +if ERRORLEVEL 1 goto end_build_sd2snes ..\tools\asar --no-title-check --symbols=wla --symbols-path=..\build\symbols.sym -DFEATURE_SD2SNES=1 -DFEATURE_PAL=1 -DFEATURE_TINYSTATES=0 ..\src\main.asm ..\build\ff.sfc python sort_debug_symbols.py ..\build\symbols.sym x x python create_ips.py ..\build\00.sfc ..\build\ff.sfc ..\build\smpalhack20_sd2snes.ips +:end_build_sd2snes echo Building TinyStates version +if exist ..\build\smpalhack20_tinystates.ips del ..\build\smpalhack20_tinystates.ips copy *.sfc ..\build ..\tools\asar --no-title-check --symbols=wla --symbols-path=..\build\symbols.sym -DFEATURE_SD2SNES=0 -DFEATURE_PAL=1 -DFEATURE_TINYSTATES=1 ..\src\main.asm ..\build\00.sfc +if ERRORLEVEL 1 goto end_build_tinystates ..\tools\asar --no-title-check --symbols=wla --symbols-path=..\build\symbols.sym -DFEATURE_SD2SNES=0 -DFEATURE_PAL=1 -DFEATURE_TINYSTATES=1 ..\src\main.asm ..\build\ff.sfc python sort_debug_symbols.py ..\build\symbols.sym x x python create_ips.py ..\build\00.sfc ..\build\ff.sfc ..\build\smpalhack20_tinystates.ips +:end_build_tinystates del 00.sfc ff.sfc ..\build\00.sfc ..\build\ff.sfc ..\build\symbols.sym cd .. diff --git a/build_PAL.sh b/build_PAL.sh index 32ab231e8..6efeed95b 100755 --- a/build_PAL.sh +++ b/build_PAL.sh @@ -14,6 +14,7 @@ python3 create_ram_symbols.py ../src/defines.asm ../src/symbols.asm python3 create_dummies.py 00.sfc ff.sfc echo "Building saveless version" +rm -f ../build/smpalhack20.ips cp *.sfc ../build ../tools/asar --no-title-check --symbols=wla --symbols-path=../build/symbols.sym -DFEATURE_SD2SNES=0 -DFEATURE_PAL=1 -DFEATURE_TINYSTATES=0 "$@" ../src/main.asm ../build/00.sfc ../tools/asar --no-title-check --symbols=wla --symbols-path=../build/symbols.sym -DFEATURE_SD2SNES=0 -DFEATURE_PAL=1 -DFEATURE_TINYSTATES=0 "$@" ../src/main.asm ../build/ff.sfc @@ -21,6 +22,7 @@ python3 sort_debug_symbols.py ../build/symbols.sym x x python3 create_ips.py ../build/00.sfc ../build/ff.sfc ../build/smpalhack20.ips echo "Building SD2SNES version" +rm -f ../build/smpalhack20_sd2snes.ips cp *.sfc ../build ../tools/asar --no-title-check --symbols=wla --symbols-path=../build/symbols.sym -DFEATURE_SD2SNES=1 -DFEATURE_PAL=1 -DFEATURE_TINYSTATES=0 "$@" ../src/main.asm ../build/00.sfc ../tools/asar --no-title-check --symbols=wla --symbols-path=../build/symbols.sym -DFEATURE_SD2SNES=1 -DFEATURE_PAL=1 -DFEATURE_TINYSTATES=0 "$@" ../src/main.asm ../build/ff.sfc @@ -28,6 +30,7 @@ python3 sort_debug_symbols.py ../build/symbols.sym x x python3 create_ips.py ../build/00.sfc ../build/ff.sfc ../build/smpalhack20_sd2snes.ips echo "Building TinyStates version" +rm -f ../build/smpalhack20_tinystates.ips cp *.sfc ../build ../tools/asar --no-title-check --symbols=wla --symbols-path=../build/symbols.sym -DFEATURE_SD2SNES=0 -DFEATURE_PAL=1 -DFEATURE_TINYSTATES=1 "$@" ../src/main.asm ../build/00.sfc ../tools/asar --no-title-check --symbols=wla --symbols-path=../build/symbols.sym -DFEATURE_SD2SNES=0 -DFEATURE_PAL=1 -DFEATURE_TINYSTATES=1 "$@" ../src/main.asm ../build/ff.sfc diff --git a/build_dev.sh b/build_dev.sh index 373c45348..038d1c9e7 100755 --- a/build_dev.sh +++ b/build_dev.sh @@ -14,10 +14,16 @@ python3 create_ram_symbols.py ../src/defines.asm ../src/symbols.asm python3 create_dummies.py 00.sfc ff.sfc echo "Building tinystates Dev version" -PRERELEASE=$(git rev-parse --short HEAD) +rm -f ../build/smhack20_tinystates_dev.ips cp *.sfc ../build -../tools/asar --no-title-check --symbols=wla --symbols-path=../build/Debugging_Symbols.sym -DFEATURE_SD2SNES=0 -DFEATURE_DEV=1 -DFEATURE_PAL=0 -DFEATURE_TINYSTATES=1 -DPRERELEASE=$PRERELEASE "$@" ../src/main.asm ../build/00.sfc -../tools/asar --no-title-check --symbols=wla --symbols-path=../build/Debugging_Symbols.sym -DFEATURE_SD2SNES=0 -DFEATURE_DEV=1 -DFEATURE_PAL=0 -DFEATURE_TINYSTATES=1 -DPRERELEASE=$PRERELEASE "$@" ../src/main.asm ../build/ff.sfc +if git --version &>/dev/null; then + PRERELEASE=$(git rev-parse --short HEAD) + ../tools/asar --no-title-check --symbols=wla --symbols-path=../build/Debugging_Symbols.sym -DFEATURE_SD2SNES=0 -DFEATURE_DEV=1 -DFEATURE_PAL=0 -DFEATURE_TINYSTATES=1 -DPRERELEASE=$PRERELEASE "$@" ../src/main.asm ../build/00.sfc + ../tools/asar --no-title-check --symbols=wla --symbols-path=../build/Debugging_Symbols.sym -DFEATURE_SD2SNES=0 -DFEATURE_DEV=1 -DFEATURE_PAL=0 -DFEATURE_TINYSTATES=1 -DPRERELEASE=$PRERELEASE "$@" ../src/main.asm ../build/ff.sfc +else + ../tools/asar --no-title-check --symbols=wla --symbols-path=../build/Debugging_Symbols.sym -DFEATURE_SD2SNES=0 -DFEATURE_DEV=1 -DFEATURE_PAL=0 -DFEATURE_TINYSTATES=1 "$@" ../src/main.asm ../build/00.sfc + ../tools/asar --no-title-check --symbols=wla --symbols-path=../build/Debugging_Symbols.sym -DFEATURE_SD2SNES=0 -DFEATURE_DEV=1 -DFEATURE_PAL=0 -DFEATURE_TINYSTATES=1 "$@" ../src/main.asm ../build/ff.sfc +fi python3 sort_debug_symbols.py ../build/Debugging_Symbols.sym ../build/Debugging_Sorted.sym ../build/Debugging_Combined.sym python3 create_ips.py ../build/00.sfc ../build/ff.sfc ../build/smhack20_tinystates_dev.ips diff --git a/build_docker.bat b/build_docker.bat index 932f723db..382846655 100644 --- a/build_docker.bat +++ b/build_docker.bat @@ -1,4 +1,10 @@ @echo off for /f "tokens=2-4 delims=/ " %%a in ('DATE /T') do (set mydate=%%c-%%a-%%b) +if exist build\smhack20.ips del build\smhack20.ips +if exist build\smhack20_sd2snes.ips del build\smhack20_sd2snes.ips +if exist build\smhack20_tinystates.ips del build\smhack20_tinystates.ips +if exist build\smhack20_tinystates_dev.ips del build\smhack20_tinystates_dev.ips +if exist build\smpalhack20.ips del build\smpalhack20.ips +if exist build\smpalhack20_sd2snes.ips del build\smpalhack20_sd2snes.ips +if exist build\smpalhack20_tinystates.ips del build\smpalhack20_tinystates.ips docker build --tag sm_practice_hack --build-arg now="%mydate%_%TIME%" --output build . - diff --git a/build_docker.sh b/build_docker.sh index 5f5351040..6cf2bc84a 100644 --- a/build_docker.sh +++ b/build_docker.sh @@ -1,4 +1,9 @@ #!/bin/bash - +rm -f build/smhack20.ips +rm -f build/smhack20_sd2snes.ips +rm -f build/smhack20_tinystates.ips +rm -f build/smhack20_tinystates_dev.ips +rm -f build/smpalhack20.ips +rm -f build/smpalhack20_sd2snes.ips +rm -f build/smpalhack20_tinystates.ips docker build --tag sm_practice_hack --build-arg now="$(date +%s)" --output build . - From a63915e6ee8a2176ad200b6d566f7637b0f07d50 Mon Sep 17 00:00:00 2001 From: idle Date: Sun, 25 Feb 2024 13:07:56 -0600 Subject: [PATCH 02/18] Specify asar minimum version --- src/main.asm | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main.asm b/src/main.asm index 9c77a7389..32ce58952 100644 --- a/src/main.asm +++ b/src/main.asm @@ -1,3 +1,4 @@ +asar 1.81 lorom !FEATURE_SD2SNES ?= 1 From 16b5c839557bb63426bc0d66317e324058dc7adf Mon Sep 17 00:00:00 2001 From: idle Date: Thu, 29 Feb 2024 00:12:57 -0600 Subject: [PATCH 03/18] Optimize kraid rock projectiles to reduce lag when Kraid rises --- .../ntsc_to_pal_abridged_pseudo_patch.txt | 9 ++-- resources/ntsc_to_pal_raw_pseudo_patch.txt | 4 +- src/defines.asm | 4 ++ src/main.asm | 2 +- src/misc.asm | 47 +++++++++++++++++++ 5 files changed, 58 insertions(+), 8 deletions(-) diff --git a/resources/ntsc_to_pal_abridged_pseudo_patch.txt b/resources/ntsc_to_pal_abridged_pseudo_patch.txt index 8197ab5ab..fbff7b445 100644 --- a/resources/ntsc_to_pal_abridged_pseudo_patch.txt +++ b/resources/ntsc_to_pal_abridged_pseudo_patch.txt @@ -3234,17 +3234,16 @@ org $A7B6A2 <-- org $A7B67A LDA $A932 ; org $A7B6AB <-- org $A7B67A -org $A7B6C7 <-- org $A7B692 +org $A7B6C7 <-- org $A7B696 BNE $13 ; previously BNE $10 -;======== Insert 9 bytes ======== +;======== Insert 3 bytes ======== ; Kraid X position org $A7B6CC <-- org $A7B69B LDA $A938 ; previously STZ $12 STA $12 ; previously LDA $A922 - LDA $A936 ; previously STA $14 - STA $14 -org $A7B6D6 <-- org $A7B6A2 + LDA $A936 ; +org $A7B6D4 <-- org $A7B6A0 ; Kraid projectile velocities org $A7BC99 <-- org $A7BC65 diff --git a/resources/ntsc_to_pal_raw_pseudo_patch.txt b/resources/ntsc_to_pal_raw_pseudo_patch.txt index 6d8022fc8..a3eaaf399 100644 --- a/resources/ntsc_to_pal_raw_pseudo_patch.txt +++ b/resources/ntsc_to_pal_raw_pseudo_patch.txt @@ -17362,8 +17362,8 @@ A7B695,replace,2,2ca9 ; bank A0, originally 1ca9 A7B69F,replace,1,34 A7B6A2,insert,9,6d7c0f8d7c0fad32a9 A7B6C8,replace,1,13 -A7B6CC,replace,7,ad38a98512ad36 -A7B6D3,insert,3,a98514 +A7B6CC,replace,5,ad38a98512 +A7B6D1,insert,3,ad36a9 A7B6D7,replace,2,bbc6 ; bank A0, originally abc6 A7B6F4,replace,2,faae ; bank A7, originally e4ae A7B6FA,replace,2,0bb7 ; bank A7, originally d7b6 diff --git a/src/defines.asm b/src/defines.asm index 338048b3e..e1925740a 100644 --- a/src/defines.asm +++ b/src/defines.asm @@ -603,8 +603,12 @@ !SAMUS_IFRAME_TIMER = $18A8 !SAMUS_KNOCKBACK_TIMER = $18AA !ENEMY_PROJ_ID = $1997 +!ENEMY_PROJ_X_SUBPX = $1A27 !ENEMY_PROJ_X = $1A4B +!ENEMY_PROJ_Y_SUBPX = $1A6F !ENEMY_PROJ_Y = $1A93 +!ENEMY_PROJ_X_VELOCITY = $1AB7 +!ENEMY_PROJ_Y_VELOCITY = $1ADB !ENEMY_PROJ_RADIUS = $1BB3 !ENEMY_PROJ_PROPERTIES = $1BD7 !MESSAGE_BOX_INDEX = $1C1F diff --git a/src/main.asm b/src/main.asm index 32ce58952..8503137b4 100644 --- a/src/main.asm +++ b/src/main.asm @@ -13,7 +13,7 @@ lorom !VERSION_MAJOR = 2 !VERSION_MINOR = 5 !VERSION_BUILD = 12 -!VERSION_REV = 1 +!VERSION_REV = 2 table ../resources/normal.tbl print "" diff --git a/src/misc.asm b/src/misc.asm index 10e3563e7..9f351755f 100644 --- a/src/misc.asm +++ b/src/misc.asm @@ -163,6 +163,53 @@ endif JSL lock_samus_bowling +org $869D59 + JSR move_kraid_rocks_horizontally + + +org $86F500 +print pc, " misc bank86 start" + +; Copied from $8688B6 but optimized for Kraid rocks using a hard-coded radius +; This is intended to offset extra practice rom lag in Kraid's room +move_kraid_rocks_horizontally: +{ + PHX + STZ $12 : STZ $14 + LDA !ENEMY_PROJ_X_VELOCITY,X : BPL .storeVelocity + DEC $14 + .storeVelocity + STA $13 + LDA #$0004 : STA $1C + LDA !ENEMY_PROJ_Y,X : SEC : SBC #$0004 + AND #$FFF0 : STA $1A + LDA !ENEMY_PROJ_Y,X : CLC : ADC #$0003 + SEC : SBC $1A + LSR : LSR : LSR : LSR + STA $1A : STA $20 + LDA !ENEMY_PROJ_Y,X : SEC : SBC #$0004 + LSR : LSR : LSR : LSR + %a8() : STA $4202 + LDA !ROOM_WIDTH_BLOCKS : STA $4203 + %a16() : LDA !ENEMY_PROJ_X_SUBPX,X + CLC : ADC $12 : STA $16 + LDA !ENEMY_PROJ_X,X : ADC $14 : STA $18 + BIT $14 : BMI .subtract + CLC : ADC #$0003 + BRA .store + .subtract + SEC : SBC #$0004 + .store + STA $22 + LSR : LSR : LSR : LSR + CLC : ADC $4216 + ASL : TAX + JMP $8930 +} + +print pc, " misc bank86 end" + + org $90F800 print pc, " misc bank90 start" From e4331e98d6d9f6eed5b4a782ef3ccbce8e33b4db Mon Sep 17 00:00:00 2001 From: idle Date: Mon, 4 Mar 2024 23:44:55 -0600 Subject: [PATCH 04/18] Use enemy ID to determine which enemies are cleared on preset load --- Dockerfile | 3 + build.bat | 1 + build.sh | 1 + build_PAL.bat | 1 + build_PAL.sh | 1 + build_dev.bat | 1 + build_dev.sh | 1 + enemies/clear_enemies.txt | 164 ++++ enemies/create_clear_enemies_data.py | 48 ++ src/clearenemies.asm | 1160 ++++++++++++++++++++++++++ src/fanfare.asm | 6 +- src/main.asm | 2 + src/menu.asm | 1 - src/presets.asm | 10 +- 14 files changed, 1392 insertions(+), 8 deletions(-) create mode 100644 enemies/clear_enemies.txt create mode 100644 enemies/create_clear_enemies_data.py create mode 100644 src/clearenemies.asm diff --git a/Dockerfile b/Dockerfile index 7852732b3..af2a27954 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,6 +18,7 @@ RUN wget https://github.com/RPGHacker/asar/archive/v1.81.tar.gz \ && cp asar/asar-standalone /app/tools/asar RUN mkdir -p /app/build \ + && mkdir -p /app/enemies \ && mkdir -p /app/layout \ && mkdir -p /app/names \ && mkdir -p /app/resources \ @@ -32,6 +33,8 @@ ARG now WORKDIR /app RUN rm -rf build RUN mkdir -p build +RUN rm -rf enemies +COPY enemies/ enemies/ RUN rm -rf layout COPY layout/ layout/ RUN rm -rf names diff --git a/build.bat b/build.bat index ad68a19d3..f884c5358 100644 --- a/build.bat +++ b/build.bat @@ -3,6 +3,7 @@ if not exist build mkdir build echo Building SM NTSC Practice Hack +python enemies\create_clear_enemies_data.py ..\src\clearenemies.asm clear_enemies.txt python layout\create_layout.py portals.txt layoutmenutemplate.asm ..\src\layoutmenu.asm ..\src\layoutportaltables.asm python names\create_names.py ..\src\roomnames.asm default_names.txt custom_names.txt cd resources diff --git a/build.sh b/build.sh index ceac7033b..32d037173 100755 --- a/build.sh +++ b/build.sh @@ -7,6 +7,7 @@ trap success=1 ERR mkdir -p build echo "Building SM NTSC Practice Hack" +python3 enemies/create_clear_enemies_data.py ../src/clearenemies.asm clear_enemies.txt python3 layout/create_layout.py portals.txt layoutmenutemplate.asm ../src/layoutmenu.asm ../src/layoutportaltables.asm python3 names/create_names.py ../src/roomnames.asm default_names.txt custom_names.txt cd resources diff --git a/build_PAL.bat b/build_PAL.bat index 8d56bd12d..b9a61e16e 100644 --- a/build_PAL.bat +++ b/build_PAL.bat @@ -3,6 +3,7 @@ if not exist build mkdir build echo Building SM PAL Practice Hack +python enemies\create_clear_enemies_data.py ..\src\clearenemies.asm clear_enemies.txt python layout\create_layout.py portals.txt layoutmenutemplate.asm ..\src\layoutmenu.asm ..\src\layoutportaltables.asm python names\create_names.py ..\src\roomnames.asm default_names.txt custom_names.txt cd resources diff --git a/build_PAL.sh b/build_PAL.sh index 6efeed95b..e66ee2833 100755 --- a/build_PAL.sh +++ b/build_PAL.sh @@ -7,6 +7,7 @@ trap success=1 ERR mkdir -p build echo "Building SM PAL Practice Hack" +python3 enemies/create_clear_enemies_data.py ../src/clearenemies.asm clear_enemies.txt python3 layout/create_layout.py portals.txt layoutmenutemplate.asm ../src/layoutmenu.asm ../src/layoutportaltables.asm python3 names/create_names.py ../src/roomnames.asm default_names.txt custom_names.txt cd resources diff --git a/build_dev.bat b/build_dev.bat index b1c7564e3..05f0d78d4 100644 --- a/build_dev.bat +++ b/build_dev.bat @@ -4,6 +4,7 @@ cls if not exist build mkdir build echo Building SM NTSC Dev Practice Hack +python enemies\create_clear_enemies_data.py ..\src\clearenemies.asm clear_enemies.txt python layout\create_layout.py portals.txt layoutmenutemplate.asm ..\src\layoutmenu.asm ..\src\layoutportaltables.asm python names\create_names.py ..\src\roomnames.asm default_names.txt custom_names.txt cd resources diff --git a/build_dev.sh b/build_dev.sh index 038d1c9e7..e5370108d 100755 --- a/build_dev.sh +++ b/build_dev.sh @@ -7,6 +7,7 @@ trap success=1 ERR mkdir -p build echo "Building SM NTSC Dev Practice Hack" +python3 enemies/create_clear_enemies_data.py ../src/clearenemies.asm clear_enemies.txt python3 layout/create_layout.py portals.txt layoutmenutemplate.asm ../src/layoutmenu.asm ../src/layoutportaltables.asm python3 names/create_names.py ../src/roomnames.asm default_names.txt custom_names.txt cd resources diff --git a/enemies/clear_enemies.txt b/enemies/clear_enemies.txt new file mode 100644 index 000000000..a3c7b20e2 --- /dev/null +++ b/enemies/clear_enemies.txt @@ -0,0 +1,164 @@ +CEBF=1 ; BOYON (boyon, bouncing gooball) +CEFF=1 ; STOKE (mini-Crocomire) +CF3F=1 ; kame is Japanese for turtle) +CF7F=1 ; (mini-tatori) +CFBF=1 ; PUYO (puyo, thin hopping blobs) +CFFF=1 ; saboten is Japanese for cactus) +D03F=1 ; toge is Japanese for thorn) +D07F=0 ; (gunship top) +D0BF=0 ; (gunship bottom / entrance pad) +D0FF=1 ; MERO (mellow, pre-Bomb Torizo fly) +D13F=1 ; MELLA (mella, under ice beam fly) +D17F=1 ; MEMU (memu, pre-spring ball fly) +D1BF=1 ; MULTI (multiviola, Norfair erratic fireball) +D1FF=1 ; POLYP (lavaquake rocks) +D23F=1 ; rinko is Japanese for outline) +D27F=1 ; RIO (rio, Brinstar flying enemy) +D2BF=1 ; SQUEEWPT (squeept, Norfair lava-jumping enemy) +D2FF=1 ; GERUDA (geruta, Norfair rio) +D33F=1 ; HOLTZ (holtz, Lower Norfair rio) +D37F=1 ; OUM (oum, Maridia large indestructible snails) +D3BF=1 ; hiru is Japanese for leech) +D3FF=1 ; RIPPER2 (gripper, grapplable jet powered ripper) +D43F=1 ; RIPPER2 (ripper ii, jet powered ripper) +D47F=1 ; RIPPER (ripper) +D4BF=1 ; DRAGON (dragon, lava seahorse) +D4FF=0 ; SHUTTER (timed shutter) +D53F=0 ; SHUTTER2 (shootable shutter) +D57F=0 ; SHUTTER2 (horizontal shootable shutter) +D5BF=0 ; SHUTTER2 (destroyable timed shutter) +D5FF=0 ; SHUTTER2 (rising and falling platform) +D63F=1 ; WAVER (waver, wave-like path travelling enemy) +D67F=1 ; METALEE (metaree, metal skree) +D6BF=1 ; hotaru is Japanese for firefly) +D6FF=1 ; FISH (skultera, Maridia fish) +D73F=0 ; (elevator) +D77F=1 ; kani is Japanese for crab) +D7BF=1 ; OUMU (zero, slug) +D7FF=0 ; KAMER (tripper, fast-moving slowly-sinking platform) +D83F=0 ; KAMER (platform that falls with Samus' weight) +D87F=1 ; SBUG (roach, flies away from Samus) +D8BF=1 ; SBUG (roach, unused/broken) +D8FF=1 ; METMOD (mochtroid, pre-Botwoon fake metroids) +D93F=1 ; SSIDE (sidehopper) +D97F=1 ; SDEATH (desgeega) +D9BF=1 ; SIDE (super-sidehopper) +D9FF=1 ; SIDE (Tourian super-sidehopper) +DA3F=1 ; DESSGEEGA (super-desgeega) +DA7F=1 ; ZOA (zoa, Maridia refill candy) +DABF=1 ; VIOLA (viola, Norfair slow fireball) +DAFF=1 ; (respawning enemy placeholder) +DB3F=1 ; BANG (bang) +DB7F=1 ; SKREE (skree) +DBBF=1 ; YARD (yard, Maridia snail) +DBFF=1 ; REFLEC (reflec) +DC3F=0 ; HZOOMER (Wrecked Ship orange zoomer) +DC7F=1 ; ZEELA (zeela, big eye bugs) +DCBF=1 ; NOVA (sova, fire zoomer) +DCFF=1 ; ZOOMER (zoomer) +DD3F=1 ; MZOOMER (stone zoomer) +DD7F=1 ; METROID (metroid) +DDBF=0 ; (Crocomire) +DDFF=0 ; (Crocomire's tongue) +DE3F=0 ; (Draygon body) +DE7F=0 ; (Draygon eye) +DEBF=0 ; (Draygon tail) +DEFF=0 ; (Draygon arms) +DF3F=0 ; (Spore Spawn) +DF7F=0 ; (Spore Spawn) +DFBF=1 ; RSTONE (boulder) +DFFF=1 ; KZAN (spikey platform top) +E03F=1 ; (spikey platform bottom) +E07F=1 ; HIBASHI (fire geyser) +E0BF=1 ; PUROMI (nuclear waffle) +E0FF=1 ; SCLAYD (mini-Kraid) +E13F=0 ; (Ceres Ridley) +E17F=0 ; (Ridley) +E1BF=0 ; (Ridley's explosion) +E1FF=1 ; (Ceres steam) +E23F=0 ; (Ceres door) +E27F=0 ; (zebetites) +E2BF=0 ; (Kraid) +E2FF=0 ; (Kraid's arm) +E33F=0 ; (Kraid top lint) +E37F=0 ; (Kraid middle lint) +E3BF=0 ; (Kraid bottom lint) +E3FF=0 ; (Kraid's foot) +E43F=0 ; (Kraid good fingernail) +E47F=0 ; (Kraid bad fingernail) +E4BF=0 ; (Phantoon body) +E4FF=0 ; (Phantoon eye) +E53F=0 ; (Phantoon tentacles) +E57F=0 ; (Phantoon mouth) +E5BF=0 ; (etecoon) +E5FF=0 ; (dachora) +E63F=1 ; ebi is Japanese for prawn) +E67F=1 ; (evir projectile) +E6BF=0 ; EYE (morph ball eye) +E6FF=1 ; fune is Japanese for boat) +E73F=0 ; nami is Japanese for wave) +E77F=1 ; GAI (coven, Wrecked Ship ghost) +E7BF=1 ; HAND (yapping maw) +E7FF=1 ; kago is Japanese for cage) +E83F=1 ; LAVAMAN (magdollite, Norfair lava creature) +E87F=1 ; nomi is Japanese for flea) +E8BF=1 ; PUU (powamp, Maridia floater) +E8FF=1 ; ROBO (Wrecked Ship robot) +E93F=0 ; ROBO2 (Wrecked Ship robot, deactivated) +E97F=1 ; PIPE (bull, Maridia puffer) +E9BF=1 ; NDRA (alcoon, walking lava seahorse) +E9FF=1 ; ATOMIC (atomic, Wrecked Ship orbs) +EA3F=0 ; SPA (Wrecked Ship spark) +EA7F=0 ; KOMA (blue Brinstar face block) +EABF=1 ; hachi is Japanese for bee) +EAFF=1 ; (green ki-hunter wings) +EB3F=1 ; HACHI2 (yellow ki-hunter) +EB7F=1 ; (yellow ki-hunter wings) +EBBF=1 ; HACHI3 (red ki-hunter) +EBFF=1 ; (red ki-hunter wings) +EC3F=0 ; (Mother Brain's brain) +EC7F=0 ; (Mother Brain's body) +ECBF=0 ; (Shitroid in cutscene) +ECFF=0 ; (Mother Brain's tubes falling) +ED3F=0 ; (dead Torizo) +ED7F=0 ; (dead sidehopper) +EDBF=0 ; (dead sidehopper, part 2). Used only to load more tiles +EDFF=0 ; (dead zoomer) +EE3F=0 ; (dead ripper) +EE7F=0 ; (dead skree) +EEBF=0 ; (Shitroid) +EEFF=0 ; (Bomb Torizo) +EF3F=0 ; (Bomb Torizo orb) +EF7F=0 ; (Gold Torizo) +EFBF=0 ; (Gold Torizo orb) +EFFF=0 ; (Tourian entrance statue) +F03F=0 ; (Tourian entrance statue ghost) +F07F=0 ; doriyuku is Japanese for effort) +F0BF=0 ; (n00b tube cracks) +F0FF=0 ; (Chozo statue) +F153=0 ; (unused spinning turtle eye: just runs a graphics instruction loop) +F193=1 ; ZEB (zeb, Brinstar red pipe bug) +F1D3=1 ; ZEBBO (zebbo, Brinstar green pipe bug) +F213=1 ; GAMET (gamet, Norfair pipe bug) +F253=1 ; GEEGA (geega, Brinstar yellow pipe bug) +F293=0 ; BOTOON (Botwoon) +F2D3=0 ; (escape etecoon) +F313=0 ; (escape dachora) +F353=1 ; BATTA1 (old Tourian grey wall space pirate) +F393=1 ; BATTA1Br (Kraid green wall space pirate) +F3D3=1 ; BATTA1No (Norfair red wall space pirate) +F413=1 ; BATTA1Na (lower Norfair gold wall space pirate) +F453=1 ; BATTA1Ma (Maridia wall space pirate) +F493=1 ; BATTA1Tu (escape silver wall space pirate) +F4D3=1 ; BATTA2 (grey ninja space pirate) +F513=1 ; BATTA2Br (green ninja space pirate) +F553=1 ; BATTA2No (red ninja space pirate) +F593=1 ; BATTA2Na (gold ninja space pirate) +F5D3=1 ; BATTA2Ma (magenta ninja space pirate) +F613=1 ; BATTA2Tu (escape silver ninja space pirate) +F653=1 ; BATTA3 (grey walking space pirate) +F693=1 ; BATTA3Br (green walking space pirate) +F6D3=1 ; BATTA3No (red walking space pirate) +F713=1 ; BATTA3Na (gold walking space pirate) +F753=1 ; BATTA3Ma (magenta walking space pirate) +F793=1 ; BATTA3Tu (escape silver walking space pirate) diff --git a/enemies/create_clear_enemies_data.py b/enemies/create_clear_enemies_data.py new file mode 100644 index 000000000..8e3da15be --- /dev/null +++ b/enemies/create_clear_enemies_data.py @@ -0,0 +1,48 @@ +#!/usr/bin/env python +import io +import os +import sys + +if len(sys.argv) != 3: + print("create_clear_enemies_data.py ") + sys.exit() + +output_asm = sys.argv[1] +input_txt = sys.argv[2] + +f_input = io.open(os.path.join(os.path.dirname(os.path.realpath(__file__)), input_txt), "r") +input_lines = f_input.readlines() +f_input.close() + +enemies = {} + +for line in input_lines: + parts = line.split('=') + if len(parts) == 2: + enemy_id = parts[0].strip() + if len(enemy_id) == 4: + shifted_enemy_id = (int(enemy_id, 16) + 196605) >> 2 + enemies[shifted_enemy_id] = parts[1].rstrip() + +f_output = io.open(os.path.join(os.path.dirname(os.path.realpath(__file__)), output_asm), "w", newline='\n') +f_output.write("\n; ---------------") +f_output.write("\n; Clear Enemies") +f_output.write("\n; (autogenerated)") +f_output.write("\n; ---------------") + +last_enemy_id = None +for enemy_id in sorted(enemies): + if not last_enemy_id: + f_output.write("\n\norg $E7F000\n") + f_output.write("print pc, \" clearenemies start\"\n") + f_output.write("ClearEnemiesTable:\n\n") + enemy_id_pal = enemy_id + 8 + f_output.write("") + f_output.write(f'if !FEATURE_PAL\norg $E7{enemy_id_pal:04X}\n') + f_output.write(f'else\norg $E7{enemy_id:04X}\nendif\n') + f_output.write("dw $000" + enemies[enemy_id] + "\n\n") + last_enemy_id = enemy_id + +f_output.write("print pc, \" clearenemies end\"\n\n") +f_output.close() + diff --git a/src/clearenemies.asm b/src/clearenemies.asm new file mode 100644 index 000000000..51226b483 --- /dev/null +++ b/src/clearenemies.asm @@ -0,0 +1,1160 @@ + +; --------------- +; Clear Enemies +; (autogenerated) +; --------------- + +org $E7F000 +print pc, " clearenemies start" +ClearEnemiesTable: + +if !FEATURE_PAL +org $E7F3B7 +else +org $E7F3AF +endif +dw $0001 ; BOYON (boyon, bouncing gooball) + +if !FEATURE_PAL +org $E7F3C7 +else +org $E7F3BF +endif +dw $0001 ; STOKE (mini-Crocomire) + +if !FEATURE_PAL +org $E7F3D7 +else +org $E7F3CF +endif +dw $0001 ; kame is Japanese for turtle) + +if !FEATURE_PAL +org $E7F3E7 +else +org $E7F3DF +endif +dw $0001 ; (mini-tatori) + +if !FEATURE_PAL +org $E7F3F7 +else +org $E7F3EF +endif +dw $0001 ; PUYO (puyo, thin hopping blobs) + +if !FEATURE_PAL +org $E7F407 +else +org $E7F3FF +endif +dw $0001 ; saboten is Japanese for cactus) + +if !FEATURE_PAL +org $E7F417 +else +org $E7F40F +endif +dw $0001 ; toge is Japanese for thorn) + +if !FEATURE_PAL +org $E7F427 +else +org $E7F41F +endif +dw $0000 ; (gunship top) + +if !FEATURE_PAL +org $E7F437 +else +org $E7F42F +endif +dw $0000 ; (gunship bottom / entrance pad) + +if !FEATURE_PAL +org $E7F447 +else +org $E7F43F +endif +dw $0001 ; MERO (mellow, pre-Bomb Torizo fly) + +if !FEATURE_PAL +org $E7F457 +else +org $E7F44F +endif +dw $0001 ; MELLA (mella, under ice beam fly) + +if !FEATURE_PAL +org $E7F467 +else +org $E7F45F +endif +dw $0001 ; MEMU (memu, pre-spring ball fly) + +if !FEATURE_PAL +org $E7F477 +else +org $E7F46F +endif +dw $0001 ; MULTI (multiviola, Norfair erratic fireball) + +if !FEATURE_PAL +org $E7F487 +else +org $E7F47F +endif +dw $0001 ; POLYP (lavaquake rocks) + +if !FEATURE_PAL +org $E7F497 +else +org $E7F48F +endif +dw $0001 ; rinko is Japanese for outline) + +if !FEATURE_PAL +org $E7F4A7 +else +org $E7F49F +endif +dw $0001 ; RIO (rio, Brinstar flying enemy) + +if !FEATURE_PAL +org $E7F4B7 +else +org $E7F4AF +endif +dw $0001 ; SQUEEWPT (squeept, Norfair lava-jumping enemy) + +if !FEATURE_PAL +org $E7F4C7 +else +org $E7F4BF +endif +dw $0001 ; GERUDA (geruta, Norfair rio) + +if !FEATURE_PAL +org $E7F4D7 +else +org $E7F4CF +endif +dw $0001 ; HOLTZ (holtz, Lower Norfair rio) + +if !FEATURE_PAL +org $E7F4E7 +else +org $E7F4DF +endif +dw $0001 ; OUM (oum, Maridia large indestructible snails) + +if !FEATURE_PAL +org $E7F4F7 +else +org $E7F4EF +endif +dw $0001 ; hiru is Japanese for leech) + +if !FEATURE_PAL +org $E7F507 +else +org $E7F4FF +endif +dw $0001 ; RIPPER2 (gripper, grapplable jet powered ripper) + +if !FEATURE_PAL +org $E7F517 +else +org $E7F50F +endif +dw $0001 ; RIPPER2 (ripper ii, jet powered ripper) + +if !FEATURE_PAL +org $E7F527 +else +org $E7F51F +endif +dw $0001 ; RIPPER (ripper) + +if !FEATURE_PAL +org $E7F537 +else +org $E7F52F +endif +dw $0001 ; DRAGON (dragon, lava seahorse) + +if !FEATURE_PAL +org $E7F547 +else +org $E7F53F +endif +dw $0000 ; SHUTTER (timed shutter) + +if !FEATURE_PAL +org $E7F557 +else +org $E7F54F +endif +dw $0000 ; SHUTTER2 (shootable shutter) + +if !FEATURE_PAL +org $E7F567 +else +org $E7F55F +endif +dw $0000 ; SHUTTER2 (horizontal shootable shutter) + +if !FEATURE_PAL +org $E7F577 +else +org $E7F56F +endif +dw $0000 ; SHUTTER2 (destroyable timed shutter) + +if !FEATURE_PAL +org $E7F587 +else +org $E7F57F +endif +dw $0000 ; SHUTTER2 (rising and falling platform) + +if !FEATURE_PAL +org $E7F597 +else +org $E7F58F +endif +dw $0001 ; WAVER (waver, wave-like path travelling enemy) + +if !FEATURE_PAL +org $E7F5A7 +else +org $E7F59F +endif +dw $0001 ; METALEE (metaree, metal skree) + +if !FEATURE_PAL +org $E7F5B7 +else +org $E7F5AF +endif +dw $0001 ; hotaru is Japanese for firefly) + +if !FEATURE_PAL +org $E7F5C7 +else +org $E7F5BF +endif +dw $0001 ; FISH (skultera, Maridia fish) + +if !FEATURE_PAL +org $E7F5D7 +else +org $E7F5CF +endif +dw $0000 ; (elevator) + +if !FEATURE_PAL +org $E7F5E7 +else +org $E7F5DF +endif +dw $0001 ; kani is Japanese for crab) + +if !FEATURE_PAL +org $E7F5F7 +else +org $E7F5EF +endif +dw $0001 ; OUMU (zero, slug) + +if !FEATURE_PAL +org $E7F607 +else +org $E7F5FF +endif +dw $0000 ; KAMER (tripper, fast-moving slowly-sinking platform) + +if !FEATURE_PAL +org $E7F617 +else +org $E7F60F +endif +dw $0000 ; KAMER (platform that falls with Samus' weight) + +if !FEATURE_PAL +org $E7F627 +else +org $E7F61F +endif +dw $0001 ; SBUG (roach, flies away from Samus) + +if !FEATURE_PAL +org $E7F637 +else +org $E7F62F +endif +dw $0001 ; SBUG (roach, unused/broken) + +if !FEATURE_PAL +org $E7F647 +else +org $E7F63F +endif +dw $0001 ; METMOD (mochtroid, pre-Botwoon fake metroids) + +if !FEATURE_PAL +org $E7F657 +else +org $E7F64F +endif +dw $0001 ; SSIDE (sidehopper) + +if !FEATURE_PAL +org $E7F667 +else +org $E7F65F +endif +dw $0001 ; SDEATH (desgeega) + +if !FEATURE_PAL +org $E7F677 +else +org $E7F66F +endif +dw $0001 ; SIDE (super-sidehopper) + +if !FEATURE_PAL +org $E7F687 +else +org $E7F67F +endif +dw $0001 ; SIDE (Tourian super-sidehopper) + +if !FEATURE_PAL +org $E7F697 +else +org $E7F68F +endif +dw $0001 ; DESSGEEGA (super-desgeega) + +if !FEATURE_PAL +org $E7F6A7 +else +org $E7F69F +endif +dw $0001 ; ZOA (zoa, Maridia refill candy) + +if !FEATURE_PAL +org $E7F6B7 +else +org $E7F6AF +endif +dw $0001 ; VIOLA (viola, Norfair slow fireball) + +if !FEATURE_PAL +org $E7F6C7 +else +org $E7F6BF +endif +dw $0001 ; (respawning enemy placeholder) + +if !FEATURE_PAL +org $E7F6D7 +else +org $E7F6CF +endif +dw $0001 ; BANG (bang) + +if !FEATURE_PAL +org $E7F6E7 +else +org $E7F6DF +endif +dw $0001 ; SKREE (skree) + +if !FEATURE_PAL +org $E7F6F7 +else +org $E7F6EF +endif +dw $0001 ; YARD (yard, Maridia snail) + +if !FEATURE_PAL +org $E7F707 +else +org $E7F6FF +endif +dw $0001 ; REFLEC (reflec) + +if !FEATURE_PAL +org $E7F717 +else +org $E7F70F +endif +dw $0000 ; HZOOMER (Wrecked Ship orange zoomer) + +if !FEATURE_PAL +org $E7F727 +else +org $E7F71F +endif +dw $0001 ; ZEELA (zeela, big eye bugs) + +if !FEATURE_PAL +org $E7F737 +else +org $E7F72F +endif +dw $0001 ; NOVA (sova, fire zoomer) + +if !FEATURE_PAL +org $E7F747 +else +org $E7F73F +endif +dw $0001 ; ZOOMER (zoomer) + +if !FEATURE_PAL +org $E7F757 +else +org $E7F74F +endif +dw $0001 ; MZOOMER (stone zoomer) + +if !FEATURE_PAL +org $E7F767 +else +org $E7F75F +endif +dw $0001 ; METROID (metroid) + +if !FEATURE_PAL +org $E7F777 +else +org $E7F76F +endif +dw $0000 ; (Crocomire) + +if !FEATURE_PAL +org $E7F787 +else +org $E7F77F +endif +dw $0000 ; (Crocomire's tongue) + +if !FEATURE_PAL +org $E7F797 +else +org $E7F78F +endif +dw $0000 ; (Draygon body) + +if !FEATURE_PAL +org $E7F7A7 +else +org $E7F79F +endif +dw $0000 ; (Draygon eye) + +if !FEATURE_PAL +org $E7F7B7 +else +org $E7F7AF +endif +dw $0000 ; (Draygon tail) + +if !FEATURE_PAL +org $E7F7C7 +else +org $E7F7BF +endif +dw $0000 ; (Draygon arms) + +if !FEATURE_PAL +org $E7F7D7 +else +org $E7F7CF +endif +dw $0000 ; (Spore Spawn) + +if !FEATURE_PAL +org $E7F7E7 +else +org $E7F7DF +endif +dw $0000 ; (Spore Spawn) + +if !FEATURE_PAL +org $E7F7F7 +else +org $E7F7EF +endif +dw $0001 ; RSTONE (boulder) + +if !FEATURE_PAL +org $E7F807 +else +org $E7F7FF +endif +dw $0001 ; KZAN (spikey platform top) + +if !FEATURE_PAL +org $E7F817 +else +org $E7F80F +endif +dw $0001 ; (spikey platform bottom) + +if !FEATURE_PAL +org $E7F827 +else +org $E7F81F +endif +dw $0001 ; HIBASHI (fire geyser) + +if !FEATURE_PAL +org $E7F837 +else +org $E7F82F +endif +dw $0001 ; PUROMI (nuclear waffle) + +if !FEATURE_PAL +org $E7F847 +else +org $E7F83F +endif +dw $0001 ; SCLAYD (mini-Kraid) + +if !FEATURE_PAL +org $E7F857 +else +org $E7F84F +endif +dw $0000 ; (Ceres Ridley) + +if !FEATURE_PAL +org $E7F867 +else +org $E7F85F +endif +dw $0000 ; (Ridley) + +if !FEATURE_PAL +org $E7F877 +else +org $E7F86F +endif +dw $0000 ; (Ridley's explosion) + +if !FEATURE_PAL +org $E7F887 +else +org $E7F87F +endif +dw $0001 ; (Ceres steam) + +if !FEATURE_PAL +org $E7F897 +else +org $E7F88F +endif +dw $0000 ; (Ceres door) + +if !FEATURE_PAL +org $E7F8A7 +else +org $E7F89F +endif +dw $0000 ; (zebetites) + +if !FEATURE_PAL +org $E7F8B7 +else +org $E7F8AF +endif +dw $0000 ; (Kraid) + +if !FEATURE_PAL +org $E7F8C7 +else +org $E7F8BF +endif +dw $0000 ; (Kraid's arm) + +if !FEATURE_PAL +org $E7F8D7 +else +org $E7F8CF +endif +dw $0000 ; (Kraid top lint) + +if !FEATURE_PAL +org $E7F8E7 +else +org $E7F8DF +endif +dw $0000 ; (Kraid middle lint) + +if !FEATURE_PAL +org $E7F8F7 +else +org $E7F8EF +endif +dw $0000 ; (Kraid bottom lint) + +if !FEATURE_PAL +org $E7F907 +else +org $E7F8FF +endif +dw $0000 ; (Kraid's foot) + +if !FEATURE_PAL +org $E7F917 +else +org $E7F90F +endif +dw $0000 ; (Kraid good fingernail) + +if !FEATURE_PAL +org $E7F927 +else +org $E7F91F +endif +dw $0000 ; (Kraid bad fingernail) + +if !FEATURE_PAL +org $E7F937 +else +org $E7F92F +endif +dw $0000 ; (Phantoon body) + +if !FEATURE_PAL +org $E7F947 +else +org $E7F93F +endif +dw $0000 ; (Phantoon eye) + +if !FEATURE_PAL +org $E7F957 +else +org $E7F94F +endif +dw $0000 ; (Phantoon tentacles) + +if !FEATURE_PAL +org $E7F967 +else +org $E7F95F +endif +dw $0000 ; (Phantoon mouth) + +if !FEATURE_PAL +org $E7F977 +else +org $E7F96F +endif +dw $0000 ; (etecoon) + +if !FEATURE_PAL +org $E7F987 +else +org $E7F97F +endif +dw $0000 ; (dachora) + +if !FEATURE_PAL +org $E7F997 +else +org $E7F98F +endif +dw $0001 ; ebi is Japanese for prawn) + +if !FEATURE_PAL +org $E7F9A7 +else +org $E7F99F +endif +dw $0001 ; (evir projectile) + +if !FEATURE_PAL +org $E7F9B7 +else +org $E7F9AF +endif +dw $0000 ; EYE (morph ball eye) + +if !FEATURE_PAL +org $E7F9C7 +else +org $E7F9BF +endif +dw $0001 ; fune is Japanese for boat) + +if !FEATURE_PAL +org $E7F9D7 +else +org $E7F9CF +endif +dw $0000 ; nami is Japanese for wave) + +if !FEATURE_PAL +org $E7F9E7 +else +org $E7F9DF +endif +dw $0001 ; GAI (coven, Wrecked Ship ghost) + +if !FEATURE_PAL +org $E7F9F7 +else +org $E7F9EF +endif +dw $0001 ; HAND (yapping maw) + +if !FEATURE_PAL +org $E7FA07 +else +org $E7F9FF +endif +dw $0001 ; kago is Japanese for cage) + +if !FEATURE_PAL +org $E7FA17 +else +org $E7FA0F +endif +dw $0001 ; LAVAMAN (magdollite, Norfair lava creature) + +if !FEATURE_PAL +org $E7FA27 +else +org $E7FA1F +endif +dw $0001 ; nomi is Japanese for flea) + +if !FEATURE_PAL +org $E7FA37 +else +org $E7FA2F +endif +dw $0001 ; PUU (powamp, Maridia floater) + +if !FEATURE_PAL +org $E7FA47 +else +org $E7FA3F +endif +dw $0001 ; ROBO (Wrecked Ship robot) + +if !FEATURE_PAL +org $E7FA57 +else +org $E7FA4F +endif +dw $0000 ; ROBO2 (Wrecked Ship robot, deactivated) + +if !FEATURE_PAL +org $E7FA67 +else +org $E7FA5F +endif +dw $0001 ; PIPE (bull, Maridia puffer) + +if !FEATURE_PAL +org $E7FA77 +else +org $E7FA6F +endif +dw $0001 ; NDRA (alcoon, walking lava seahorse) + +if !FEATURE_PAL +org $E7FA87 +else +org $E7FA7F +endif +dw $0001 ; ATOMIC (atomic, Wrecked Ship orbs) + +if !FEATURE_PAL +org $E7FA97 +else +org $E7FA8F +endif +dw $0000 ; SPA (Wrecked Ship spark) + +if !FEATURE_PAL +org $E7FAA7 +else +org $E7FA9F +endif +dw $0000 ; KOMA (blue Brinstar face block) + +if !FEATURE_PAL +org $E7FAB7 +else +org $E7FAAF +endif +dw $0001 ; hachi is Japanese for bee) + +if !FEATURE_PAL +org $E7FAC7 +else +org $E7FABF +endif +dw $0001 ; (green ki-hunter wings) + +if !FEATURE_PAL +org $E7FAD7 +else +org $E7FACF +endif +dw $0001 ; HACHI2 (yellow ki-hunter) + +if !FEATURE_PAL +org $E7FAE7 +else +org $E7FADF +endif +dw $0001 ; (yellow ki-hunter wings) + +if !FEATURE_PAL +org $E7FAF7 +else +org $E7FAEF +endif +dw $0001 ; HACHI3 (red ki-hunter) + +if !FEATURE_PAL +org $E7FB07 +else +org $E7FAFF +endif +dw $0001 ; (red ki-hunter wings) + +if !FEATURE_PAL +org $E7FB17 +else +org $E7FB0F +endif +dw $0000 ; (Mother Brain's brain) + +if !FEATURE_PAL +org $E7FB27 +else +org $E7FB1F +endif +dw $0000 ; (Mother Brain's body) + +if !FEATURE_PAL +org $E7FB37 +else +org $E7FB2F +endif +dw $0000 ; (Shitroid in cutscene) + +if !FEATURE_PAL +org $E7FB47 +else +org $E7FB3F +endif +dw $0000 ; (Mother Brain's tubes falling) + +if !FEATURE_PAL +org $E7FB57 +else +org $E7FB4F +endif +dw $0000 ; (dead Torizo) + +if !FEATURE_PAL +org $E7FB67 +else +org $E7FB5F +endif +dw $0000 ; (dead sidehopper) + +if !FEATURE_PAL +org $E7FB77 +else +org $E7FB6F +endif +dw $0000 ; (dead sidehopper, part 2). Used only to load more tiles + +if !FEATURE_PAL +org $E7FB87 +else +org $E7FB7F +endif +dw $0000 ; (dead zoomer) + +if !FEATURE_PAL +org $E7FB97 +else +org $E7FB8F +endif +dw $0000 ; (dead ripper) + +if !FEATURE_PAL +org $E7FBA7 +else +org $E7FB9F +endif +dw $0000 ; (dead skree) + +if !FEATURE_PAL +org $E7FBB7 +else +org $E7FBAF +endif +dw $0000 ; (Shitroid) + +if !FEATURE_PAL +org $E7FBC7 +else +org $E7FBBF +endif +dw $0000 ; (Bomb Torizo) + +if !FEATURE_PAL +org $E7FBD7 +else +org $E7FBCF +endif +dw $0000 ; (Bomb Torizo orb) + +if !FEATURE_PAL +org $E7FBE7 +else +org $E7FBDF +endif +dw $0000 ; (Gold Torizo) + +if !FEATURE_PAL +org $E7FBF7 +else +org $E7FBEF +endif +dw $0000 ; (Gold Torizo orb) + +if !FEATURE_PAL +org $E7FC07 +else +org $E7FBFF +endif +dw $0000 ; (Tourian entrance statue) + +if !FEATURE_PAL +org $E7FC17 +else +org $E7FC0F +endif +dw $0000 ; (Tourian entrance statue ghost) + +if !FEATURE_PAL +org $E7FC27 +else +org $E7FC1F +endif +dw $0000 ; doriyuku is Japanese for effort) + +if !FEATURE_PAL +org $E7FC37 +else +org $E7FC2F +endif +dw $0000 ; (n00b tube cracks) + +if !FEATURE_PAL +org $E7FC47 +else +org $E7FC3F +endif +dw $0000 ; (Chozo statue) + +if !FEATURE_PAL +org $E7FC5C +else +org $E7FC54 +endif +dw $0000 ; (unused spinning turtle eye: just runs a graphics instruction loop) + +if !FEATURE_PAL +org $E7FC6C +else +org $E7FC64 +endif +dw $0001 ; ZEB (zeb, Brinstar red pipe bug) + +if !FEATURE_PAL +org $E7FC7C +else +org $E7FC74 +endif +dw $0001 ; ZEBBO (zebbo, Brinstar green pipe bug) + +if !FEATURE_PAL +org $E7FC8C +else +org $E7FC84 +endif +dw $0001 ; GAMET (gamet, Norfair pipe bug) + +if !FEATURE_PAL +org $E7FC9C +else +org $E7FC94 +endif +dw $0001 ; GEEGA (geega, Brinstar yellow pipe bug) + +if !FEATURE_PAL +org $E7FCAC +else +org $E7FCA4 +endif +dw $0000 ; BOTOON (Botwoon) + +if !FEATURE_PAL +org $E7FCBC +else +org $E7FCB4 +endif +dw $0000 ; (escape etecoon) + +if !FEATURE_PAL +org $E7FCCC +else +org $E7FCC4 +endif +dw $0000 ; (escape dachora) + +if !FEATURE_PAL +org $E7FCDC +else +org $E7FCD4 +endif +dw $0001 ; BATTA1 (old Tourian grey wall space pirate) + +if !FEATURE_PAL +org $E7FCEC +else +org $E7FCE4 +endif +dw $0001 ; BATTA1Br (Kraid green wall space pirate) + +if !FEATURE_PAL +org $E7FCFC +else +org $E7FCF4 +endif +dw $0001 ; BATTA1No (Norfair red wall space pirate) + +if !FEATURE_PAL +org $E7FD0C +else +org $E7FD04 +endif +dw $0001 ; BATTA1Na (lower Norfair gold wall space pirate) + +if !FEATURE_PAL +org $E7FD1C +else +org $E7FD14 +endif +dw $0001 ; BATTA1Ma (Maridia wall space pirate) + +if !FEATURE_PAL +org $E7FD2C +else +org $E7FD24 +endif +dw $0001 ; BATTA1Tu (escape silver wall space pirate) + +if !FEATURE_PAL +org $E7FD3C +else +org $E7FD34 +endif +dw $0001 ; BATTA2 (grey ninja space pirate) + +if !FEATURE_PAL +org $E7FD4C +else +org $E7FD44 +endif +dw $0001 ; BATTA2Br (green ninja space pirate) + +if !FEATURE_PAL +org $E7FD5C +else +org $E7FD54 +endif +dw $0001 ; BATTA2No (red ninja space pirate) + +if !FEATURE_PAL +org $E7FD6C +else +org $E7FD64 +endif +dw $0001 ; BATTA2Na (gold ninja space pirate) + +if !FEATURE_PAL +org $E7FD7C +else +org $E7FD74 +endif +dw $0001 ; BATTA2Ma (magenta ninja space pirate) + +if !FEATURE_PAL +org $E7FD8C +else +org $E7FD84 +endif +dw $0001 ; BATTA2Tu (escape silver ninja space pirate) + +if !FEATURE_PAL +org $E7FD9C +else +org $E7FD94 +endif +dw $0001 ; BATTA3 (grey walking space pirate) + +if !FEATURE_PAL +org $E7FDAC +else +org $E7FDA4 +endif +dw $0001 ; BATTA3Br (green walking space pirate) + +if !FEATURE_PAL +org $E7FDBC +else +org $E7FDB4 +endif +dw $0001 ; BATTA3No (red walking space pirate) + +if !FEATURE_PAL +org $E7FDCC +else +org $E7FDC4 +endif +dw $0001 ; BATTA3Na (gold walking space pirate) + +if !FEATURE_PAL +org $E7FDDC +else +org $E7FDD4 +endif +dw $0001 ; BATTA3Ma (magenta walking space pirate) + +if !FEATURE_PAL +org $E7FDEC +else +org $E7FDE4 +endif +dw $0001 ; BATTA3Tu (escape silver walking space pirate) + +print pc, " clearenemies end" + diff --git a/src/fanfare.asm b/src/fanfare.asm index 33f8122fe..c0245d47b 100644 --- a/src/fanfare.asm +++ b/src/fanfare.asm @@ -146,10 +146,10 @@ prepare_fanfare_from_non_plm: kill_enemies: { - LDA #$0000 + TDC .kill_loop - TAX : LDA $0F86,X : ORA #$0200 : STA $0F86,X - TXA : CLC : ADC #$0040 : CMP #$0400 : BNE .kill_loop + TAX : LDA !ENEMY_PROPERTIES,X : ORA #$0200 : STA !ENEMY_PROPERTIES,X + TXA : CLC : ADC #$0040 : CMP #$0800 : BNE .kill_loop if !ORIGINAL_MESSAGE_TEXT RTL diff --git a/src/main.asm b/src/main.asm index 8503137b4..97f41187c 100644 --- a/src/main.asm +++ b/src/main.asm @@ -41,6 +41,8 @@ endif incsrc gamemode.asm incsrc minimap.asm incsrc menu.asm +incsrc roomnames.asm +incsrc clearenemies.asm incsrc infohud.asm incsrc rng.asm incsrc custompresets.asm diff --git a/src/menu.asm b/src/menu.asm index e54f2247a..c390d1caa 100644 --- a/src/menu.asm +++ b/src/menu.asm @@ -3496,5 +3496,4 @@ print pc, " mainmenu end" incsrc customizemenu.asm incsrc layoutmenu.asm -incsrc roomnames.asm diff --git a/src/presets.asm b/src/presets.asm index 39aa14334..ee54dd523 100644 --- a/src/presets.asm +++ b/src/presets.asm @@ -122,13 +122,15 @@ endif clear_all_enemies: { - ; Clear enemies (8000 = solid to Samus, 0400 = Ignore Samus projectiles, 0100 = Invisible) + LDA.w #ClearEnemiesTable>>16 : STA $C3 TDC .loop - TAX : LDA $0F86,X : BIT #$8500 : BNE .done_clearing - ORA #$0200 : STA $0F86,X + TAX : LDA !ENEMY_ID,X + SEC : ROR : ROR : STA $C1 + LDA [$C1] : BEQ .done_clearing + LDA !ENEMY_PROPERTIES : ORA #$0200 : STA !ENEMY_PROPERTIES,X .done_clearing - TXA : CLC : ADC #$0040 : CMP #$0400 : BNE .loop + TXA : CLC : ADC #$0040 : CMP #$0800 : BNE .loop STZ $0E52 ; unlock grey doors that require killing enemies RTS } From 54c9e4eca69152d44a594e2ff221eaba0d73b389 Mon Sep 17 00:00:00 2001 From: InsaneFirebat Date: Wed, 6 Mar 2024 19:20:35 -0500 Subject: [PATCH 05/18] Custom title menu demos Co-Authored-By: DarkXoa <37259435+DarkXoa@users.noreply.github.com> --- src/cutscenes.asm | 6 +- src/demos.asm | 3464 +++++++++++++++++++++++++++++++++++++++++++++ src/layout.asm | 6 +- src/macros.asm | 8 + src/main.asm | 1 + src/rng.asm | 6 +- 6 files changed, 3476 insertions(+), 15 deletions(-) create mode 100644 src/demos.asm diff --git a/src/cutscenes.asm b/src/cutscenes.asm index 6b977cf7d..684c5c6cc 100644 --- a/src/cutscenes.asm +++ b/src/cutscenes.asm @@ -833,11 +833,7 @@ endif LDA !sram_cutscenes : BIT !CUTSCENE_FAST_MB : BNE .fast_mb JMP cutscenes_mb_normal_init } -if !FEATURE_PAL -warnpc $A98824 -else -warnpc $A98814 -endif +%warnpc($A98814, $A98824) if !FEATURE_PAL org $A9882D diff --git a/src/demos.asm b/src/demos.asm new file mode 100644 index 000000000..7f9c1abaf --- /dev/null +++ b/src/demos.asm @@ -0,0 +1,3464 @@ + +; Allow input instruction lists to be repointed outside bank $91 +org $9183C0 +DemoInputObjectHandler: +{ + PHB + ; set DB to match input data + PEA.w DemoInputInstructionLists>>8 : PLB : PLB + + ; check if demo input enabled + BIT $0A88 : BPL .return + ; check if instruction pointer = 0 + LDA $0A7E : BEQ .return + + JSR $83F2 ; Process Demo Input Object + + ; update previous demo inputs + LDA $0A8C : STA $0DFE + LDA $0A8E : STA $0E00 + + ; update current demo inputs + LDA $0A84 : STA !IH_CONTROLLER_PRI : STA $0A8C + LDA $0A86 : STA !IH_CONTROLLER_PRI_NEW : STA $0A8E + + .return + PLB + RTL +} + +NoCodeRTS: + RTS +warnpc $9183F2 + + +; adds lava damage to demos, replaces dead debug code +if !FEATURE_PAL +org $90E814 + JSR $E9CB ; Handle periodic damage to Samus +else +org $90E817 + JSR $E9CE ; Handle periodic damage to Samus +endif +warnpc $90E81A + +if !FEATURE_PAL +org $919DAA +else +org $919E52 +endif +DemoObject: +;;; $9E52: Demo input objects - title ;;; +{ +; Order does not matter +; _________________ Initialisation (RTS) +; | __________ Pre-instruction (ends demo controller input) +; | | ___ Pointer to input instruction list +; | | | +if !FEATURE_PAL + .IceBeam + dw NoCodeRTS, EndDemo, DemoInput_IceBeam + .LowerNorfairEntrance + dw NoCodeRTS, EndDemo, DemoInput_LowerNorfairEntrance + .FireFleaRoom + dw NoCodeRTS, EndDemo, DemoInput_FireFleaRoom + .BrinstarDiagonalRoom + dw NoCodeRTS, EndDemo, DemoInput_BrinstarDiagonalRoom + .WreckedShipBasement + dw NoCodeRTS, EndDemo, DemoInput_WreckedShipBasement + .Kraid + dw NoCodeRTS, EndDemo, DemoInput_Kraid + .AdvancedGrappleBeam + dw NoCodeRTS, EndDemo, DemoInput_AdvancedGrappleBeam + .IBJ + dw NoCodeRTS, EndDemo, DemoInput_IBJ + .CrystalFlash + dw NoCodeRTS, EndDemo, DemoInput_CrystalFlash + .ScrewAttack + dw NoCodeRTS, EndDemo, DemoInput_ScrewAttack + .Dachora + dw NoCodeRTS, EndDemo, DemoInput_Dachora + .RedBrinstarElevator + dw NoCodeRTS, EndDemo, DemoInput_RedBrinstarElevator + .EyeDoor + dw NoCodeRTS, EndDemo, DemoInput_EyeDoor + .Shinespark + dw NoCodeRTS, EndDemo_Shinespark, DemoInput_Shinespark + .GauntletEntrance + dw NoCodeRTS, EndDemo, DemoInput_GauntletEntrance + .TourianEntrance + dw NoCodeRTS, EndDemo, DemoInput_TourianEntrance + .SBA + dw NoCodeRTS, EndDemo, DemoInput_SBA +endif + +; custom demos below, first 6 shared between NTSC and PAL + .mockball + dw NoCodeRTS, EndDemo, DemoInput_mockball + .lavadive + dw NoCodeRTS, EndDemo, DemoInput_lavadive + .redtower + dw NoCodeRTS, EndDemo, DemoInput_redtower + .ggg + dw NoCodeRTS, EndDemo, DemoInput_ggg + .landingsite + dw NoCodeRTS, EndDemo, DemoInput_landingsite + .babyskip + dw NoCodeRTS, EndDemo, DemoInput_babyskip +if !FEATURE_PAL +else + .metroid3 + dw NoCodeRTS, EndDemo, DemoInput_metroid3 + .moat + dw NoCodeRTS, EndDemo, DemoInput_moat + .frogspeedway + dw NoCodeRTS, EndDemo, DemoInput_frogspeedway + .wraparound + dw NoCodeRTS, EndDemo, DemoInput_wraparound + .speedball + dw NoCodeRTS, EndDemo, DemoInput_speedball + .kqk + dw NoCodeRTS, EndDemo, DemoInput_kqk + .grapplejump + dw NoCodeRTS, EndDemo, DemoInput_grapplejump + .bombjump + dw NoCodeRTS, EndDemo, DemoInput_bombjump + .crystalflash + dw NoCodeRTS, EndDemo, DemoInput_crystalflash + .flyway + dw NoCodeRTS, EndDemo, DemoInput_flyway + .alcatraz + dw NoCodeRTS, EndDemo, DemoInput_alcatraz + .tunneljump + dw NoCodeRTS, EndDemo, DemoInput_tunneljump + .climb + dw NoCodeRTS, EndDemo, DemoInput_climb + .ocean + dw NoCodeRTS, EndDemo, DemoInput_ocean + .pseudo + dw NoCodeRTS, EndDemo, DemoInput_pseudo + .everest + dw NoCodeRTS, EndDemo, DemoInput_everest + .alphapb + dw NoCodeRTS, EndDemo, DemoInput_alphapb +endif +} +%warnpc($919EE2, $919E3A) + + +org $9189FD +;;; $89FD: Demo Samus setup function pointers ;;; +{ +DemoSamusSetup: + dw DemoSamusSetup_set1, DemoSamusSetup_set2, DemoSamusSetup_set3, DemoSamusSetup_set4 + + .set1 + dw DSS_LandingSite ; landingsite + dw DSS_FacingRight ; mockball + dw DSS_FacingRight ; redtower + dw DSS_FacingLeft ; lavadive + dw DSS_FacingLeft ; ggg + dw DSS_FacingLeft ; babyskip + + .set2 +if !FEATURE_PAL + dw DSS_FacingLeft ; Ice Beam + dw DSS_FacingLeft ; FireFlea Room + dw DSS_FacingRight ; Brinstar Diagonal Room + dw DSS_FacingLeft ; Lower Norfair Entrance + dw DSS_FacingRight ; Screw Attack + dw DSS_FallingFacingLeft ; Dachora +else + dw DSS_FacingRight ; moat + dw DSS_FacingLeft ; alcatraz + dw DSS_FacingRight ; pseudo + dw DSS_FacingRight ; kqk + dw DSS_FacingRight ; speedball + dw DSS_FacingLeft ; wraparound +endif + + .set3 +if !FEATURE_PAL + dw DSS_FacingLeft ; Pre Phantoon Hall + dw DSS_Shinespark ; Shinespark + dw DSS_FacingRight ; Eye Door + dw DSS_FacingRight ; Red Brinstar Elevator + dw DSS_FacingRight ; Kraid + dw DSS_FacingRight ; Tourian Entrance +else + dw DSS_FacingRight ; everest + dw DSS_FacingLeft ; alphapb + dw DSS_FacingLeft ; bombjump + dw DSS_FacingLeft ; tunneljump + dw DSS_FacingLeft ; climb + dw DSS_FacingLeft ; ocean +endif + + .set4 +if !FEATURE_PAL + dw DSS_GauntletSpark ; Gauntlet Entrance + dw DSS_FacingLeft ; Advanced Grapple Beam + dw DSS_FacingLeft ; IBJ + dw DSS_FacingRight ; SBA + dw DSS_LowEnergyFacingLeft ; Crystal Flash +else + dw DSS_FacingRight ; metroid3 + dw DSS_FacingRight ; flyway + dw DSS_FacingLeft ; frogspeedway + dw DSS_FacingLeft ; grapplejump + dw DSS_LowEnergyFacingLeft ; crystalflash +endif + +DSS_LandingSite: +;;; $8A33: Demo Samus setup - landing site ;;; +{ +if !FEATURE_PAL + JSL $91E35B ; Make Samus face forward + ; Samus drawing handler = default + LDA #$EB4F : STA $0A5C +else + JSL $91E3F6 ; Make Samus face forward + ; Samus drawing handler = default + LDA #$EB52 : STA $0A5C +endif + RTS +} + +DSS_LowEnergyFacingLeft: +;;; $8A43: Demo Samus setup - standing facing left - low health ;;; +{ +if !FEATURE_PAL + LDA #$0014 : STA !SAMUS_HP ; Samus health = 20 +else + LDA #$0040 : STA !SAMUS_HP ; Samus health = 64 +endif + ; fallthrough to DSS_FacingLeft +} + +DSS_FacingLeft: +;;; $8A49: Demo Samus setup - standing facing left ;;; +{ + LDA #$0002 ; pose = facing left - normal + BRA DSS_InitPose +} + +DSS_FacingRight: +;;; $8A53: Demo Samus setup - standing facing right ;;; +{ + LDA #$0001 ; pose = facing right - normal + ; fallthrough to DSS_InitPose +} + +DSS_InitPose: +;;; $8A56: Initialise Samus with pose = [A] ;;; +{ + STA !SAMUS_POSE +if !FEATURE_PAL + JSL $91F398 ; Initialise Samus pose + JSL $91FA6D ; Set Samus animation frame if pose changed + LDA #$EB4F : STA $0A5C ; Samus drawing handler = default +else + JSL $91F433 ; Initialise Samus pose + JSL $91FB08 ; Set Samus animation frame if pose changed + LDA #$EB52 : STA $0A5C ; Samus drawing handler = default +endif + RTS +} + +if !FEATURE_PAL +DSS_FallingFacingLeft: +;;; $8A4E: Demo Samus setup - falling facing left ;;; +{ + LDA #$002A ; pose = facing left - falling + BRA DSS_InitPose +} + +DSS_Shinespark: +;;; $8A68: Demo Samus setup - shinespark ;;; +{ + LDA #$EB4F : STA $0A5C ; Samus drawing handler = default + JSL $90CFFA ; Trigger shinespark windup + LDA #$00CD : STA !SAMUS_POSE ; facing right - shinespark - diagonal + JSL $91F398 ; Initialise Samus pose + JSL $91FA6D ; Set Samus animation frame if pose changed + RTS +} + +DSS_GauntletSpark: +;;; $8A81: Demo Samus setup - gauntlet entrance ;;; +{ + LDA #$EB4F : STA $0A5C ; Samus drawing handler = default + JSL $90CFFA ; Trigger shinespark windup + LDA #$00CA : STA !SAMUS_POSE ; facing right - shinespark - diagonal + JSL $91F398 ; Initialise Samus pose + JSL $91FA6D ; Set Samus animation frame if pose changed + RTS +} + +EndDemo_Shinespark: +; why does this routine exist? +{ +; LDA !SAMUS_MOVEMENT_TYPE : AND #$00FF : CMP #$001A : BEQ .return + + LDA.w #EndDemo : STA $0A7A + LDA.w #DemoInput_Shinespark_unseen : STA $0A7E + LDA #$0001 : STA $0A7C + + .return + RTS +} +endif + +EndDemo: +{ + ; check if transitioning from demo + LDA !GAMEMODE : CMP #$002C : BNE .return + + ; instruction list pointer = delete + LDA #$0001 : STA $0A7C + LDA #$8776 : STA $0A7E + + .return + RTS +} + +DemoRoomReset: +; set event bits in time for room state checks +{ + LDX #$0008 + LDA #$FFFF + + .loop + INC ; $0000 + STA $7ED8B0,X : STA $7ED820,X : STA $7ED828,X + + DEC ; $FFFF + STA $7ED830,X : STA $7ED870,X : STA $7ED8F0,X + STA $7ED908,X : STA $7ED8F8,X : STA $7ED900,X + + DEX #2 : BPL .loop + + ; set Zebes Awake bit for climb demo + LDA #$0001 : STA $7ED820 + JML $82872D +} +%warnpc($919E52, $919DAA) ; space freed up from repointing input data + +; hijack event bit loop for climb demo +org $8286F9 + JML DemoRoomReset + + +org $82876C +DemoRoomData: +{ + dw DemoRoomData_set1, DemoRoomData_set2, DemoRoomData_set3, DemoRoomData_set4 + +; _____________________________________________________________ Room pointer +; | ______________________________________________________ Door pointer +; | | _______________________________________________ Door slot (useless?) +; | | | ________________________________________ Screen X position +; | | | | _________________________________ Screen Y position +; | | | | | __________________________ Samus Y offset from top of screen +; | | | | | | ___________________ Samus X offset from centre of screen +; | | | | | | | ____________ Length of demo +; | | | | | | | | _____ Pointer to code +; | | | | | | | | | + .set1 +if !FEATURE_PAL + dw $91F8, $896A, $0001, $0400, $0400, $0040, $0000, $01E3, DRC_LandingSite ; PAL landingsite + dw $9BC8, $8CD6, $0001, $0000, $0100, $005B, $FFCC, $00C4, DRC_RTS ; PAL mockball + dw $A253, $8F0A, $0001, $0000, $0400, $008B, $FFAD, $023A, DRC_RTS ; PAL redtower + dw $AF14, $967E, $0001, $0300, $0000, $008B, $0052, $02FA, DRC_RTS ; PAL lavadive + dw $B2DA, $9906, $0001, $0300, $0000, $008B, $0051, $0100, DRC_RTS ; PAL ggg + dw $DCB1, $AA2C, $0001, $0300, $0000, $00BB, $003B, $0615, DRC_RTS ; PAL babyskip +else + dw $91F8, $896A, $0001, $0400, $0400, $0040, $0001, $02C3, DRC_LandingSite ; landingsite + dw $9BC8, $8CD6, $0001, $0000, $0100, $005B, $FFCC, $00F6, DRC_RTS ; mockball + dw $A253, $8F0A, $0001, $0000, $0400, $008B, $FFA5, $027F, DRC_RTS ; redtower + dw $AF14, $967E, $0001, $0300, $0000, $008B, $005B, $03BC, DRC_RTS ; lavadive + dw $B2DA, $9906, $0001, $0300, $0000, $008B, $0051, $0100, DRC_RTS ; ggg + dw $DCB1, $AA2C, $0001, $0300, $0000, $00BB, $003B, $0659, DRC_RTS ; babyskip +endif + dw $FFFF + + .set2 +if !FEATURE_PAL + dw $A408, $A36C, $0000, $0100, $0100, $008B, $0056, $01FD, DRC_RTS ; Ice Beam + dw $9C5E, $8CCA, $0003, $0200, $0000, $008B, $0049, $019A, DRC_RTS ; FireFlea Room + dw $9E52, $8DEA, $0003, $0500, $0300, $00AB, $FFE2, $0117, DRC_RTS ; Brinstar Diagonal Room + dw $AF14, $967E, $0002, $0300, $0000, $008B, $004B, $03CA, DRC_RTS ; Lower Norfair Entrance + dw $9879, $8982, $0003, $0000, $0000, $00BB, $FFF1, $00D5, DRC_RTS ; Screw Attack + dw $9CB3, $8DD2, $0001, $0400, $0200, $0080, $0005, $0317, DRC_RTS ; Dachora +else + dw $95FF, $8A36, $0000, $0000, $0000, $008B, $FFAA, $0199, DRC_RTS ; moat + dw $92FD, $8BB6, $0001, $0300, $0200, $008B, $0055, $0144, DRC_RTS ; alcatraz + dw $D0B9, $A3F0, $0001, $0100, $0300, $00BB, $FFE5, $01DA, DRC_RTS ; pseudo + dw $A59F, $91B6, $0001, $0000, $0100, $008B, $FFCB, $02B4, DRC_Kraid ; kqk + dw $CC6F, $A21C, $0001, $0200, $0000, $005B, $FFFB, $01D7, DRC_RTS ; speedball + dw $91F8, $89B2, $0001, $0800, $0100, $008B, $0055, $02F8, DRC_RTS ; wraparound +endif + dw $FFFF + + .set3 +if !FEATURE_PAL + dw $CC6F, $A21C, $0003, $0200, $0000, $0060, $0004, $02EF, DRC_RTS ; Pre Phantoon Hall + dw $91F8, $896A, $0001, $0300, $0400, $00B0, $0000, $00C7, DRC_LandingSite ; Shinespark + dw $A56B, $919E, $0001, $0000, $0100, $008B, $FFD2, $02D3, DRC_RTS ; Eye Door + dw $A322, $90EA, $0000, $0000, $0700, $008B, $FFAA, $0149, DRC_RTS ; Red Brinstar Elevator + dw $A59F, $91B6, $0001, $0000, $0100, $008B, $FFBF, $013F, DRC_Kraid ; Kraid + dw $A66A, $91F2, $0001, $0000, $0000, $008B, $FFB1, $0197, DRC_G4 ; Tourian Entrance +else + dw $D0B9, $A3F0, $0001, $0100, $0300, $00BB, $FFE5, $015C, DRC_RTS ; everest + dw $A3AE, $9096, $0001, $0200, $0000, $008B, $0053, $015F, DRC_RTS ; alphapb + dw $91F8, $896A, $0001, $0600, $0200, $007B, $0026, $032C, DRC_RTS ; bombjump + dw $A322, $A480, $0001, $0200, $0300, $008B, $0035, $0127, DRC_RTS ; tunneljump + dw $96BA, $8B7A, $0001, $0100, $0800, $008B, $0052, $0311, DRC_RTS ; climb + dw $93FE, $A1B0, $0001, $0700, $0400, $008B, $0054, $019B, DRC_LandingSite ; ocean +endif + dw $FFFF + + .set4 +if !FEATURE_PAL + dw $91F8, $890A, $0000, $0600, $0200, $0080, $0030, $0100, DRC_LandingSite ; Gauntlet Entrance + dw $D0B9, $A474, $0000, $0200, $0000, $00AB, $0000, $0332, DRC_RTS ; Advanced Grapple Beam + dw $91F8, $890A, $0000, $0600, $0200, $007B, $0020, $0185, DRC_LandingSite ; IBJ + dw $9AD9, $8D42, $0001, $0000, $0400, $008B, $FFB7, $018A, DRC_RTS ; SBA + dw $91F8, $890A, $0000, $0600, $0200, $008B, $0004, $0200, DRC_LandingSite ; Crystal Flash +else + dw $DB7D, $A9CC, $0000, $0000, $0000, $008B, $FFAC, $0188, DRC_RTS ; metroid3 + dw $9879, $8982, $0001, $0000, $0000, $008B, $FFAE, $011B, DRC_RTS ; flyway + dw $B106, $970E, $0001, $0700, $0000, $008B, $0051, $0312, DRC_RTS ; frogspeedway + dw $D5A7, $A828, $0001, $0000, $0200, $008B, $FFA7, $0485, DRC_RTS ; grapplejump + dw $9D19, $8F8E, $0000, $0200, $0600, $008B, $001C, $040A, DRC_BigPink ; crystalflash +endif + dw $FFFF +} + +; Demo Room Code +DRC_BigPink: +{ + %a8() + ; scroll $21 = red + LDA #$00 : STA $7ECD41 + %a16() + +DRC_RTS: + RTS +} + +DRC_LandingSite: +{ + ; BG2 tilemap address/size + LDA #$004A : STA $59 + RTS +} + +DRC_Kraid: +{ + ; suspense timer = 60 frames + LDA #$003C : STA $0FB2 + RTS +} + +if !FEATURE_PAL +DRC_G4: +{ + %a8() + LDA #$01 : STA $7ED829 + %a16() + RTS +} +endif +warnpc $82893D + +org $918885 +DemoSamusData: +{ + dw DemoSamusData_set1, DemoSamusData_set2, DemoSamusData_set3, DemoSamusData_set4 + +; ______________________________________________________ Equipment +; | _______________________________________________ Missiles +; | | ________________________________________ Super missiles +; | | | _________________________________ Power bombs +; | | | | __________________________ Health +; | | | | | ___________________ Collected beams +; | | | | | | ____________ Equipped beams +; | | | | | | | _____ Demo input object pointer +; | | | | | | | | + .set1 +if !FEATURE_PAL + dw $2000, $0000, $0000, $0000, $0063, $0000, $0000, DemoObject_landingsite ; PAL + dw $1004, $0001, $0000, $0000, $00C7, $0000, $0000, DemoObject_mockball ; PAL + dw $1004, $0002, $0004, $0000, $00C7, $0000, $0000, DemoObject_redtower ; PAL + dw $1005, $0002, $0002, $0002, $00C7, $0000, $0000, DemoObject_lavadive ; PAL + dw $1005, $0002, $0002, $0003, $0021, $0000, $0000, DemoObject_ggg ; PAL + dw $F33F, $0064, $0014, $0014, $02BC, $100F, $100B, DemoObject_babyskip ; PAL +else + dw $2000, $0000, $0000, $0000, $0063, $0000, $0000, DemoObject_landingsite + dw $1004, $0001, $0000, $0000, $00C7, $0000, $0000, DemoObject_mockball + dw $1004, $0002, $0004, $0000, $00C7, $0000, $0000, DemoObject_redtower + dw $1005, $0002, $0002, $0002, $012B, $0000, $0000, DemoObject_lavadive + dw $1005, $0002, $0002, $0003, $001D, $0000, $0000, DemoObject_ggg + dw $F33F, $0064, $0014, $0014, $02BC, $100F, $100B, DemoObject_babyskip +endif + + .set2 +if !FEATURE_PAL + dw $2105, $001E, $0005, $0000, $012B, $1006, $1006, DemoObject_IceBeam + dw $0004, $000A, $0000, $0000, $00C7, $0000, $0000, DemoObject_FireFleaRoom + dw $0004, $0019, $0005, $0000, $00C7, $1000, $1000, DemoObject_BrinstarDiagonalRoom + dw $E325, $004B, $000F, $000A, $0383, $1000, $1000, DemoObject_LowerNorfairEntrance + dw $E32D, $0055, $000F, $000A, $03E7, $0000, $0000, DemoObject_ScrewAttack + dw $E105, $002D, $0005, $0005, $018F, $1000, $1000, DemoObject_Dachora +else + dw $1004, $0006, $0004, $0001, $0081, $0000, $0000, DemoObject_moat + dw $1004, $0005, $0000, $0000, $0063, $0000, $0000, DemoObject_alcatraz + dw $3125, $0014, $000A, $0004, $012B, $1001, $1001, DemoObject_pseudo + dw $1004, $0002, $0004, $0002, $0045, $0000, $0000, DemoObject_kqk + dw $F33F, $005B, $000F, $000D, $01C1, $100F, $100B, DemoObject_speedball + dw $2000, $000A, $0005, $0005, $012B, $1001, $1001, DemoObject_wraparound +endif + + .set3 +if !FEATURE_PAL + dw $E105, $0037, $0005, $0005, $018F, $1000, $1000, DemoObject_WreckedShipBasement + dw $F33F, $0055, $000F, $000A, $03E7, $100F, $1000, DemoObject_Shinespark + dw $2105, $001E, $0005, $0000, $012B, $0000, $0000, DemoObject_RedBrinstarElevator + dw $0104, $0019, $0005, $0000, $012B, $0000, $0000, DemoObject_Kraid + dw $2105, $001E, $0005, $0005, $012B, $1008, $1008, DemoObject_TourianEntrance +else + dw $F33F, $005E, $0014, $000F, $0239, $100F, $100B, DemoObject_everest + dw $1004, $0004, $0003, $0005, $0095, $0000, $0000, DemoObject_alphapb + dw $1004, $0000, $0000, $0000, $0063, $0000, $0000, DemoObject_bombjump + dw $332F, $005B, $000E, $000F, $01C6, $100F, $100B, DemoObject_tunneljump + dw $0004, $0005, $0000, $0000, $0063, $0000, $0000, DemoObject_climb + dw $F33F, $005B, $0010, $000E, $01B7, $100F, $100B, DemoObject_ocean +endif + + .set4 +if !FEATURE_PAL + dw $F32D, $0055, $000F, $000A, $03E7, $1000, $1000, DemoObject_GauntletEntrance + dw $F32D, $0055, $000F, $000A, $03E7, $0000, $0000, DemoObject_AdvancedGrappleBeam + dw $F32D, $0055, $000F, $000A, $03E7, $0000, $0000, DemoObject_IBJ + dw $F32D, $0055, $000F, $000A, $03E7, $1008, $1008, DemoObject_SBA + dw $F32D, $0055, $0014, $0014, $03E7, $1000, $1000, DemoObject_CrystalFlash +else + dw $F33F, $0064, $0014, $0014, $02BC, $100F, $100B, DemoObject_metroid3 + dw $0004, $0005, $0000, $0000, $0063, $0000, $0000, DemoObject_flyway + dw $1005, $000A, $0005, $0000, $012B, $0005, $0005, DemoObject_frogspeedway + dw $7114, $000F, $0002, $0002, $018F, $0000, $0000, DemoObject_grapplejump + dw $1004, $000A, $000B, $000C, $0063, $0000, $0000, DemoObject_crystalflash +endif +} + + +org $87D000 ; $918ACE ; repoint to any bank with WRAM access +print pc, " demos start" +DemoInputInstructionLists: +; Order does not matter + +if !FEATURE_PAL +DemoInput_Dachora: +{ + dw $0006, $0000, $0000 + dw $0001, $0200, $0200 + dw $0001, $0200, $0000 + dw $00D5, $0000, $0000 + dw $0001, $0100, $0100 + dw $0003, $0100, $0000 + dw $000E, $0000, $0000 + dw $0001, $0200, $0200 + dw $0003, $0200, $0000 + dw $002D, $0000, $0000 + dw $0001, $0200, $0200 + dw $0130, $0200, $0000 + dw $00E5, $0000, $0000 + dw $8427 ; Delete +} + +DemoInput_RedBrinstarElevator: +{ + dw $0048, $0000, $0000 + dw $0001, $0100, $0100 + dw $0008, $0100, $0000 + dw $0001, $0180, $0080 + dw $0005, $0180, $0000 + dw $000E, $0100, $0000 + dw $001A, $0000, $0000 + dw $0001, $0200, $0200 + dw $0001, $0200, $0000 + dw $0001, $0280, $0080 + dw $0010, $0280, $0000 + dw $0002, $0200, $0000 + dw $0010, $0000, $0000 + dw $0001, $0100, $0100 + dw $0003, $0100, $0000 + dw $003A, $0000, $0000 + dw $0001, $0080, $0080 + dw $000E, $0080, $0000 + dw $0001, $0180, $0100 + dw $0008, $0180, $0000 + dw $0012, $0100, $0000 + dw $019A, $0000, $0000 + dw $8427 ; Delete +} + +DemoInput_WreckedShipBasement: +{ + dw $0031, $0000, $0000 + dw $0001, $0100, $0100 + dw $0004, $0100, $0000 + dw $000C, $0000, $0000 + dw $0001, $0200, $0200 + dw $0004, $0200, $0000 + dw $001F, $0000, $0000 + dw $0001, $0200, $0200 + dw $0052, $0200, $0000 + dw $0001, $8200, $8000 + dw $0006, $8200, $0000 + dw $003F, $0200, $0000 + dw $0046, $0000, $0000 + dw $0001, $0100, $0100 + dw $0002, $0100, $0000 + dw $0050, $0000, $0000 + dw $0001, $0100, $0100 + dw $003E, $0100, $0000 + dw $0001, $8100, $8000 + dw $0012, $8100, $0000 + dw $0005, $0100, $0000 + dw $0001, $8100, $8000 + dw $0002, $8100, $0000 + dw $0001, $0100, $0000 + dw $0001, $8100, $8000 + dw $0002, $8100, $0000 + dw $002A, $0100, $0000 + dw $0087, $0000, $0000 + dw $8427 ; Delete +} + +DemoInput_LowerNorfairEntrance: +{ + dw $000F, $0000, $0000 + dw $0001, $0200, $0200 + dw $001E, $0200, $0000 + dw $0011, $0000, $0000 + dw $0001, $0200, $0200 + dw $0151, $0200, $0000 + dw $0001, $0280, $0080 + dw $0008, $0280, $0000 + dw $0003, $0080, $0000 + dw $0005, $0000, $0000 + dw $0001, $0100, $0100 + dw $000E, $0100, $0000 + dw $0001, $0180, $0080 + dw $000C, $0180, $0000 + dw $0005, $0080, $0000 + dw $0001, $0280, $0200 + dw $0008, $0280, $0000 + dw $0002, $0200, $0000 + dw $0011, $0000, $0000 + dw $0001, $0080, $0080 + dw $000C, $0080, $0000 + dw $0001, $0180, $0100 + dw $000B, $0180, $0000 + dw $0002, $0100, $0000 + dw $0013, $0000, $0000 + dw $0001, $0080, $0080 + dw $0009, $0080, $0000 + dw $0001, $0280, $0200 + dw $000B, $0280, $0000 + dw $0012, $0000, $0000 + dw $0001, $0100, $0100 + dw $0009, $0100, $0000 + dw $0001, $0180, $0080 + dw $000F, $0180, $0000 + dw $0005, $0100, $0000 + dw $0005, $0000, $0000 + dw $0001, $0200, $0200 + dw $000C, $0200, $0000 + dw $0001, $0280, $0080 + dw $001A, $0280, $0000 + dw $002A, $0200, $0000 + dw $0001, $0280, $0080 + dw $001A, $0280, $0000 + dw $0080, $0200, $0000 + dw $8427 ; Delete +} + +DemoInput_EyeDoor: +{ + dw $0009, $0100, $0000 + dw $0012, $0000, $0000 + dw $0001, $0040, $0040 + dw $0006, $0040, $0000 + dw $0003, $0000, $0000 + dw $0001, $0100, $0100 + dw $0002, $0100, $0000 + dw $000A, $0000, $0000 + dw $0001, $2000, $2000 + dw $0005, $2000, $0000 + dw $000A, $0000, $0000 + dw $0001, $0100, $0100 + dw $0008, $0100, $0000 + dw $0001, $0180, $0080 + dw $0005, $0180, $0000 + dw $000B, $0100, $0000 + dw $000D, $0000, $0000 + dw $0001, $0100, $0100 + dw $0002, $0100, $0000 + dw $0001, $0180, $0080 + dw $0005, $0180, $0000 + dw $000A, $0100, $0000 + dw $000D, $0000, $0000 + dw $0001, $0100, $0100 + dw $0002, $0100, $0000 + dw $0001, $0180, $0080 + dw $0006, $0180, $0000 + dw $0016, $0100, $0000 + dw $001A, $0000, $0000 + dw $0001, $0100, $0100 + dw $0001, $0180, $0080 + dw $0009, $0180, $0000 + dw $000E, $0100, $0000 + dw $0012, $0000, $0000 + dw $0001, $0100, $0100 + dw $0005, $0100, $0000 + dw $0020, $0000, $0000 + dw $0001, $0100, $0100 + dw $0005, $0100, $0000 + dw $0001, $0180, $0080 + dw $0006, $0180, $0000 + dw $0012, $0100, $0000 + dw $000C, $0000, $0000 + dw $0001, $0080, $0080 + dw $0005, $0080, $0000 + dw $0008, $0000, $0000 + dw $0001, $0040, $0040 + dw $0005, $0040, $0000 + dw $001E, $0000, $0000 + dw $0001, $0200, $0200 + dw $0006, $0200, $0000 + dw $0006, $0000, $0000 + dw $0001, $0100, $0100 + dw $0006, $0100, $0000 + dw $0042, $0000, $0000 + dw $0001, $0080, $0080 + dw $0006, $0080, $0000 + dw $000E, $0000, $0000 + dw $0001, $0040, $0040 + dw $0003, $0040, $0000 + dw $000A, $0000, $0000 + dw $0001, $0080, $0080 + dw $0009, $0080, $0000 + dw $0018, $0000, $0000 + dw $0001, $0040, $0040 + dw $0005, $0040, $0000 + dw $000A, $0000, $0000 + dw $0001, $0080, $0080 + dw $0004, $0080, $0000 + dw $000A, $0000, $0000 + dw $0001, $0040, $0040 + dw $0005, $0040, $0000 + dw $0063, $0000, $0000 + dw $0001, $0200, $0200 + dw $0006, $0200, $0000 + dw $000E, $0000, $0000 + dw $0001, $0100, $0100 + dw $0007, $0100, $0000 + dw $0001, $0140, $0040 + dw $0002, $0140, $0000 + dw $0003, $0100, $0000 + dw $8427 ; Delete +} + +DemoInput_Shinespark: +{ + dw $00A5, $0000, $0000 + dw $8448, DemoInput_Shinespark ; Go to DemoInput_Shinespark + + .unseen + ; The demo timer expires before these inputs are used + dw $0078, $0000, $0000 + dw $0001, $0200, $0200 + dw $00A3, $0200, $0000 + dw $0001, $8200, $8000 + dw $005E, $8200, $0000 + dw $0002, $8000, $0000 + dw $0001, $8100, $0100 + dw $0092, $8100, $0000 + dw $000A, $0100, $0000 + dw $0001, $0180, $0080 + dw $0005, $0180, $0000 + dw $000B, $0100, $0000 + dw $001D, $0000, $0000 + dw $0001, $2000, $2000 + dw $0004, $2000, $0000 + dw $0009, $0000, $0000 + dw $0001, $2000, $2000 + dw $0003, $2000, $0000 + dw $000B, $0000, $0000 + dw $0001, $0040, $0040 + dw $0006, $0040, $0000 + dw $00C0, $0000, $0000 + dw $8427 ; Delete +} + +DemoInput_Kraid: +{ + dw $019A, $0000, $0000 + dw $8427 ; Delete +} + +DemoInput_FireFleaRoom: +{ + dw $0009, $0000, $0000 + dw $0001, $0200, $0200 + dw $003F, $0200, $0000 + dw $0028, $0000, $0000 + dw $0001, $0200, $0200 + dw $000A, $0200, $0000 + dw $0001, $0280, $0080 + dw $000B, $0280, $0000 + dw $000E, $0200, $0000 + dw $0001, $0240, $0040 + dw $0008, $0240, $0000 + dw $0013, $0200, $0000 + dw $0001, $0280, $0080 + dw $0009, $0280, $0000 + dw $000E, $0200, $0000 + dw $000B, $0000, $0000 + dw $0001, $0200, $0200 + dw $0008, $0200, $0000 + dw $0001, $0280, $0080 + dw $000B, $0280, $0000 + dw $0005, $0200, $0000 + dw $0012, $0000, $0000 + dw $0001, $0200, $0200 + dw $0005, $0200, $0000 + dw $0001, $0280, $0080 + dw $0004, $0280, $0000 + dw $0010, $0200, $0000 + dw $000E, $0000, $0000 + dw $0001, $0400, $0400 + dw $000A, $0400, $0000 + dw $0001, $0420, $0020 + dw $008A, $0420, $0000 + dw $8427 ; Delete +} + +DemoInput_ScrewAttack: +{ + dw $0030, $0000, $0000 + dw $0001, $8100, $8100 + dw $001E, $8100, $0000 + dw $0001, $8180, $0080 + dw $000C, $8180, $0000 + dw $001C, $8100, $0000 + dw $0001, $8180, $0080 + dw $0017, $8180, $0000 + dw $002B, $8100, $0000 + dw $0001, $0400, $0400 + dw $0003, $0000, $0000 + dw $0001, $0200, $0200 + dw $0001, $0210, $0010 + dw $009D, $0010, $0000 + dw $8427 ; Delete +} + +DemoInput_BrinstarDiagonalRoom: +{ + dw $0021, $0000, $0000 + dw $0001, $0100, $0100 + dw $000E, $0100, $0000 + dw $0001, $0180, $0080 + dw $0012, $0180, $0000 + dw $0034, $0100, $0000 + dw $0010, $0000, $0000 + dw $0001, $0010, $0010 + dw $0008, $0010, $0000 + dw $0001, $0050, $0040 + dw $0017, $0050, $0000 + dw $0004, $0040, $0000 + dw $0001, $0440, $0400 + dw $002C, $0440, $0000 + dw $00AF, $0000, $0000 + dw $8427 ; Delete +} + +DemoInput_IceBeam: +{ + dw $0021, $0000, $0000 + dw $0001, $0040, $0040 + dw $0005, $0040, $0000 + dw $0006, $0000, $0000 + dw $0001, $0040, $0040 + dw $0005, $0040, $0000 + dw $0012, $0000, $0000 + dw $0001, $0200, $0200 + dw $0017, $0200, $0000 + dw $001C, $0000, $0000 + dw $0001, $0080, $0080 + dw $000E, $0080, $0000 + dw $0001, $0480, $0400 + dw $0005, $0480, $0000 + dw $000B, $0400, $0000 + dw $0001, $0440, $0040 + dw $0006, $0440, $0000 + dw $0008, $0400, $0000 + dw $0007, $0000, $0000 + dw $0001, $0200, $0200 + dw $001D, $0200, $0000 + dw $0009, $0000, $0000 + dw $0001, $0200, $0200 + dw $000E, $0200, $0000 + dw $0001, $0280, $0080 + dw $001D, $0280, $0000 + dw $0038, $0200, $0000 + dw $0001, $0280, $0080 + dw $0016, $0280, $0000 + dw $002B, $0200, $0000 + dw $0001, $0080, $0080 + dw $0010, $0080, $0000 + dw $0001, $0480, $0400 + dw $0008, $0480, $0000 + dw $0005, $0400, $0000 + dw $0001, $0440, $0040 + dw $0008, $0440, $0000 + dw $0008, $0400, $0000 + dw $0008, $0000, $0000 + dw $0001, $0200, $0200 + dw $002B, $0200, $0000 + dw $0001, $0280, $0080 + dw $0010, $0280, $0000 + dw $0012, $0200, $0000 + dw $005D, $0000, $0000 + dw $8427 ; Delete +} + +DemoInput_GauntletEntrance: +{ + dw $0012, $0000, $0000 + dw $0001, $0100, $0100 + dw $0004, $0100, $0000 + dw $00CD, $0000, $0000 + dw $8427 ; Delete +} + +DemoInput_AdvancedGrappleBeam: +{ + dw $0032, $0000, $0000 + dw $0001, $2000, $2000 + dw $0007, $2000, $0000 + dw $0006, $0000, $0000 + dw $0001, $2000, $2000 + dw $0004, $2000, $0000 + dw $0008, $0000, $0000 + dw $0001, $2000, $2000 + dw $0007, $2000, $0000 + dw $0005, $0000, $0000 + dw $0001, $2000, $2000 + dw $0005, $2000, $0000 + dw $0010, $0000, $0000 + dw $0001, $0200, $0200 + dw $0015, $0200, $0000 + dw $0001, $0000, $0000 + dw $0001, $0100, $0100 + dw $0005, $0100, $0000 + dw $0003, $0000, $0000 + dw $0001, $0040, $0040 + dw $0013, $0040, $0000 + dw $0001, $0440, $0400 + dw $0011, $0440, $0000 + dw $0022, $0040, $0000 + dw $0001, $0240, $0200 + dw $0013, $0240, $0000 + dw $001F, $0040, $0000 + dw $0001, $0140, $0100 + dw $009F, $0140, $0000 + dw $0070, $0100, $0000 + dw $001E, $0000, $0000 + dw $8427 ; Delete +} + +DemoInput_IBJ: +{ + dw $0014, $0000, $0000 + dw $0001, $0100, $0100 + dw $001B, $0100, $0000 + dw $0013, $0000, $0000 + dw $0001, $0080, $0080 + dw $0009, $0080, $0000 + dw $0001, $0480, $0400 + dw $0006, $0480, $0000 + dw $0002, $0080, $0000 + dw $0001, $0480, $0400 + dw $0006, $0480, $0000 + dw $0001, $04C0, $0040 + dw $0002, $04C0, $0000 + dw $0008, $00C0, $0000 + dw $0002, $0080, $0000 + dw $001A, $0000, $0000 + dw $0001, $0040, $0040 + dw $0009, $0040, $0000 + dw $0022, $0000, $0000 + dw $0001, $0040, $0040 + dw $0007, $0040, $0000 + dw $001E, $0000, $0000 + dw $0001, $0040, $0040 + dw $0007, $0040, $0000 + dw $0024, $0000, $0000 + dw $0001, $0040, $0040 + dw $0006, $0040, $0000 + dw $0021, $0000, $0000 + dw $0001, $0040, $0040 + dw $0007, $0040, $0000 + dw $0023, $0000, $0000 + dw $0001, $0040, $0040 + dw $0006, $0040, $0000 + dw $0020, $0000, $0000 + dw $0001, $0040, $0040 + dw $0007, $0040, $0000 + dw $001E, $0000, $0000 + dw $0001, $0040, $0040 + dw $0006, $0040, $0000 + dw $0020, $0000, $0000 + dw $0001, $0040, $0040 + dw $0006, $0040, $0000 + dw $0021, $0000, $0000 + dw $0001, $0040, $0040 + dw $0006, $0040, $0000 + dw $0021, $0000, $0000 + dw $0001, $0040, $0040 + dw $0006, $0040, $0000 + dw $0020, $0000, $0000 + dw $0001, $0040, $0040 + dw $0006, $0040, $0000 + dw $001F, $0000, $0000 + dw $0001, $0040, $0040 + dw $0006, $0040, $0000 + dw $0022, $0000, $0000 + dw $0001, $0040, $0040 + dw $0006, $0040, $0000 + dw $0022, $0000, $0000 + dw $0001, $0040, $0040 + dw $0006, $0040, $0000 + dw $0020, $0000, $0000 + dw $0001, $0040, $0040 + dw $0006, $0040, $0000 + dw $0020, $0000, $0000 + dw $0001, $0040, $0040 + dw $0006, $0040, $0000 + dw $000D, $0000, $0000 + dw $0001, $0100, $0100 + dw $0018, $0100, $0000 + dw $0012, $0000, $0000 + dw $0001, $0800, $0800 + dw $0007, $0800, $0000 + dw $0006, $0000, $0000 + dw $0001, $0800, $0800 + dw $0004, $0800, $0000 + dw $0001, $0000, $0000 + dw $0001, $0800, $0800 + dw $0007, $0000, $0000 + dw $0001, $0200, $0200 + dw $0003, $0200, $0000 + dw $009D, $0000, $0000 + dw $8427 ; Delete +} + +DemoInput_SBA: +{ + dw $001A, $0000, $0000 + dw $0001, $2000, $2000 + dw $0008, $2000, $0000 + dw $0006, $0000, $0000 + dw $0001, $2000, $2000 + dw $0006, $2000, $0000 + dw $0006, $0000, $0000 + dw $0001, $2000, $2000 + dw $0006, $2000, $0000 + dw $0008, $0000, $0000 + dw $0001, $0080, $0080 + dw $0003, $0080, $0000 + dw $0001, $0180, $0100 + dw $0023, $0180, $0000 + dw $0007, $0100, $0000 + dw $0010, $0000, $0000 + dw $0001, $0080, $0080 + dw $0010, $0080, $0000 + dw $0001, $0280, $0200 + dw $0007, $0280, $0000 + dw $0001, $02C0, $0040 + dw $0004, $02C0, $0000 + dw $000E, $0240, $0000 + dw $0010, $0040, $0000 + dw $0001, $00C0, $0080 + dw $0008, $00C0, $0000 + dw $0001, $01C0, $0100 + dw $000B, $01C0, $0000 + dw $0014, $0140, $0000 + dw $0015, $0040, $0000 + dw $0001, $0440, $0400 + dw $0006, $0440, $0000 + dw $0040, $0040, $0000 + dw $0034, $0000, $0000 + dw $8427 ; Delete +} + +DemoInput_TourianEntrance: +{ + dw $0144, $0000, $0000 + dw $8427 ; Delete +} + +DemoInput_CrystalFlash: +{ + dw $0016, $0000, $0000 + dw $0001, $0400, $0400 + dw $0004, $0400, $0000 + dw $0004, $0000, $0000 + dw $0001, $0400, $0400 + dw $0006, $0400, $0000 + dw $0007, $0000, $0000 + dw $0001, $2000, $2000 + dw $0005, $2000, $0000 + dw $0005, $0000, $0000 + dw $0001, $2000, $2000 + dw $0004, $2000, $0000 + dw $0006, $0000, $0000 + dw $0001, $2000, $2000 + dw $0006, $2000, $0000 + dw $0027, $0000, $0000 + dw $0001, $0430, $0430 + dw $0007, $0430, $0000 + dw $0001, $0470, $0040 + dw $000D, $0470, $0000 + dw $0018, $0430, $0000 + dw $0001, $0470, $0040 + dw $0098, $0470, $0000 + dw $0002, $0070, $0000 + dw $0001, $0030, $0000 + dw $0001, $0010, $0000 + dw $00FD, $0000, $0000 + dw $8427 +} + +DemoInput_landingsite: +{ + dw $0106, $0000, $0000 + dw $0001, $8000, $8000 + dw $001F, $8200, $0000 + dw $0001, $0280, $0080 + dw $0001, $0280, $0000 + dw $0001, $0000, $0000 + dw $0001, $0100, $0100 + dw $0026, $0000, $0000 + dw $0001, $0100, $0100 + dw $0001, $0100, $0000 + dw $0001, $0000, $0000 + dw $0001, $0100, $0100 + dw $0008, $0100, $0000 + dw $0002, $0000, $0000 + dw $0001, $0100, $0100 + dw $0004, $0100, $0000 + dw $0001, $8100, $8000 + dw $0002, $8100, $0000 + dw $0011, $0100, $0000 + dw $0001, $8100, $8000 + dw $0002, $8100, $0000 + dw $0011, $0100, $0000 + dw $0001, $8100, $8000 + dw $0004, $8100, $0000 + dw $0006, $0100, $0000 + dw $0001, $8100, $8000 + dw $0001, $8100, $0000 + dw $0001, $8500, $0400 + dw $0001, $8500, $0000 + dw $0002, $0400, $0000 + dw $000F, $0000, $0000 + dw $8427 ; Delete +} ; PAL landingsite + +DemoInput_mockball: +{ + dw $003B, $0000, $0000 + dw $0001, $8000, $8000 + dw $0004, $8000, $0000 + dw $0001, $8100, $0100 + dw $0007, $8100, $0000 + dw $0001, $8120, $0020 + dw $0003, $8120, $0000 + dw $0001, $8130, $0010 + dw $0002, $8130, $0000 + dw $0001, $8120, $0000 + dw $0004, $8100, $0000 + dw $0001, $8130, $0030 + dw $0002, $8130, $0000 + dw $0003, $8120, $0000 + dw $0001, $8100, $0000 + dw $0001, $8110, $0010 + dw $0003, $8110, $0000 + dw $0001, $8120, $0020 + dw $0003, $8120, $0000 + dw $0001, $8110, $0010 + dw $0004, $8110, $0000 + dw $0003, $8100, $0000 + dw $0001, $8120, $0020 + dw $0002, $8120, $0000 + dw $0003, $8100, $0000 + dw $0001, $8190, $0090 + dw $0001, $0190, $0000 + dw $0002, $0180, $0000 + dw $0003, $0100, $0000 + dw $0001, $0180, $0080 + dw $0002, $0180, $0000 + dw $0001, $0580, $0400 + dw $0001, $0580, $0000 + dw $0002, $0480, $0000 + dw $0005, $0080, $0000 + dw $0001, $0480, $0400 + dw $0003, $0580, $0000 + dw $0004, $0180, $0000 + dw $0027, $0100, $0000 + dw $0001, $0900, $0800 + dw $0006, $0810, $0000 + dw $0013, $0010, $0000 + dw $0033, $0000, $0000 + dw $8427 ; Delete +} ; PAL mockball + +DemoInput_redtower: +{ + dw $002C, $0000, $0000 + dw $0001, $8000, $8000 + dw $000C, $8000, $0000 + dw $0001, $8200, $0200 + dw $0015, $8200, $0000 + dw $0001, $8000, $0000 + dw $0001, $8100, $0100 + dw $0010, $8100, $0000 + dw $0001, $8180, $0080 + dw $001E, $8180, $0000 + dw $0001, $8280, $0200 + dw $0002, $0200, $0000 + dw $0001, $0280, $0080 + dw $0002, $0280, $0000 + dw $0001, $0180, $0100 + dw $0016, $0180, $0000 + dw $0001, $0080, $0000 + dw $0001, $0280, $0200 + dw $0002, $0200, $0000 + dw $0001, $0280, $0080 + dw $000D, $0280, $0000 + dw $0001, $8280, $8000 + dw $0002, $82C0, $0000 + dw $0001, $C6C0, $4400 + dw $0001, $C4C0, $0000 + dw $0002, $84C0, $0000 + dw $0002, $8400, $0000 + dw $0001, $8600, $0200 + dw $000B, $8200, $0000 + dw $0001, $8280, $0080 + dw $0010, $8280, $0000 + dw $0001, $0280, $0000 + dw $0001, $0180, $0100 + dw $0002, $0100, $0000 + dw $0001, $0180, $0080 + dw $000C, $0180, $0000 + dw $0005, $0100, $0000 + dw $0001, $0120, $0020 + dw $0003, $0120, $0000 + dw $0001, $01A0, $0080 + dw $0003, $01A0, $0000 + dw $0007, $0180, $0000 + dw $0001, $0080, $0000 + dw $0001, $0280, $0200 + dw $000F, $0280, $0000 + dw $0001, $0080, $0000 + dw $0001, $0180, $0100 + dw $0001, $0100, $0000 + dw $0001, $0180, $0080 + dw $0001, $0180, $0000 + dw $0001, $0080, $0000 + dw $0001, $0280, $0200 + dw $0004, $0280, $0000 + dw $0003, $0200, $0000 + dw $0001, $0800, $0800 + dw $0008, $0800, $0000 + dw $0001, $8800, $8000 + dw $0009, $8880, $0000 + dw $0021, $8800, $0000 + dw $0001, $8840, $0040 + dw $0001, $8840, $0000 + dw $0001, $8240, $0200 + dw $0001, $8240, $0000 + dw $0001, $8200, $0000 + dw $0001, $0280, $0080 + dw $000C, $0280, $0000 + dw $0001, $0180, $0100 + dw $0002, $0180, $0000 + dw $0002, $0100, $0000 + dw $0001, $0180, $0080 + dw $0009, $0280, $0000 + dw $0001, $0180, $0100 + dw $0001, $0180, $0000 + dw $0003, $0100, $0000 + dw $0001, $0180, $0080 + dw $0001, $0180, $0000 + dw $0001, $0280, $0200 + dw $0007, $0280, $0000 + dw $0001, $0080, $0000 + dw $0001, $0180, $0100 + dw $0001, $0180, $0000 + dw $0001, $0100, $0000 + dw $0001, $0180, $0080 + dw $0002, $0180, $0000 + dw $0001, $0280, $0200 + dw $0009, $0280, $0000 + dw $000E, $0200, $0000 + dw $0001, $0000, $0000 + dw $0001, $0100, $0100 + dw $0003, $0100, $0000 + dw $0001, $0180, $0080 + dw $0001, $0180, $0000 + dw $0001, $0080, $0000 + dw $0001, $0280, $0200 + dw $0002, $0280, $0000 + dw $0006, $0200, $0000 + dw $0001, $0100, $0100 + dw $0002, $0100, $0000 + dw $0001, $0180, $0080 + dw $0003, $0180, $0000 + dw $0001, $0280, $0200 + dw $000C, $0280, $0000 + dw $0001, $0180, $0100 + dw $0002, $0180, $0000 + dw $0002, $0100, $0000 + dw $0001, $0180, $0080 + dw $001D, $0180, $0000 + dw $0001, $0280, $0200 + dw $0001, $0280, $0000 + dw $0002, $0200, $0000 + dw $0001, $0280, $0080 + dw $0001, $0280, $0000 + dw $0001, $0180, $0100 + dw $0006, $0180, $0000 + dw $0001, $0100, $0000 + dw $0001, $0140, $0040 + dw $0004, $0140, $0000 + dw $0001, $8040, $8000 + dw $0003, $8000, $0000 + dw $003F, $0000, $0000 + dw $8427 ; Delete +} ; PAL redtower + +DemoInput_lavadive: +{ + dw $0026, $0000, $0000 + dw $0001, $8000, $8000 + dw $0002, $8000, $0000 + dw $0001, $8100, $0100 + dw $001D, $8100, $0000 + dw $0003, $8000, $0000 + dw $0001, $8200, $0200 + dw $0012, $8200, $0000 + dw $0001, $0280, $0080 + dw $0001, $0280, $0000 + dw $0002, $0200, $0000 + dw $0001, $0600, $0400 + dw $0002, $0600, $0000 + dw $0001, $0480, $0080 + dw $0001, $0480, $0000 + dw $0005, $0080, $0000 + dw $0001, $0480, $0400 + dw $0001, $0480, $0000 + dw $0001, $0680, $0200 + dw $0002, $0680, $0000 + dw $00B5, $0200, $0000 + dw $0001, $0280, $0080 + dw $0006, $0280, $0000 + dw $000A, $0200, $0000 + dw $0001, $8200, $8000 + dw $000C, $8200, $0000 + dw $0001, $8220, $0020 + dw $0005, $8220, $0000 + dw $0009, $8200, $0000 + dw $0003, $8000, $0000 + dw $0001, $0000, $0000 + dw $0001, $8000, $8000 + dw $0001, $0000, $0000 + dw $0001, $0200, $0200 + dw $0005, $8200, $0000 + dw $0001, $8280, $0080 + dw $0003, $8280, $0000 + dw $0006, $8200, $0000 + dw $0001, $8220, $0020 + dw $0005, $8220, $0000 + dw $0001, $82A0, $0080 + dw $002C, $8280, $0000 + dw $0007, $8200, $0000 + dw $0001, $8220, $0020 + dw $0004, $8220, $0000 + dw $0004, $8020, $0000 + dw $0001, $8120, $0100 + dw $0003, $8120, $0000 + dw $0009, $8100, $0000 + dw $0001, $8180, $0080 + dw $000A, $0180, $0000 + dw $0001, $0080, $0000 + dw $0001, $0280, $0200 + dw $001B, $0280, $0000 + dw $0001, $0180, $0100 + dw $0001, $0180, $0000 + dw $0001, $0100, $0000 + dw $0001, $0180, $0080 + dw $0068, $0180, $0000 + dw $0004, $0100, $0000 + dw $0001, $0200, $0200 + dw $0002, $0200, $0000 + dw $0001, $0280, $0080 + dw $0002, $0280, $0000 + dw $0001, $0180, $0100 + dw $0008, $0100, $0000 + dw $0001, $0000, $0000 + dw $0001, $0200, $0200 + dw $0002, $0200, $0000 + dw $0001, $0280, $0080 + dw $000B, $0280, $0000 + dw $0001, $0080, $0000 + dw $0001, $0180, $0100 + dw $000A, $0180, $0000 + dw $0001, $0080, $0000 + dw $0001, $0200, $0200 + dw $0001, $0200, $0000 + dw $0001, $0280, $0080 + dw $0026, $0280, $0000 + dw $000E, $0200, $0000 + dw $0001, $0100, $0100 + dw $0001, $0100, $0000 + dw $0001, $0180, $0080 + dw $0002, $0180, $0000 + dw $0001, $0280, $0200 + dw $000A, $0280, $0000 + dw $0004, $0200, $0000 + dw $0001, $0220, $0020 + dw $0002, $0220, $0000 + dw $0002, $0020, $0000 + dw $002E, $0000, $0000 + dw $8427 ; Delete +} ; PAL lavadive + +DemoInput_ggg: +{ + dw $002C, $0000, $0000 + dw $0001, $2000, $2000 + dw $0004, $2000, $0000 + dw $0003, $0000, $0000 + dw $0001, $2000, $2000 + dw $0002, $2000, $0000 + dw $0001, $A000, $8000 + dw $0003, $A000, $0000 + dw $000A, $8000, $0000 + dw $0001, $8010, $0010 + dw $001A, $8110, $0000 + dw $0001, $8010, $0000 + dw $0001, $8210, $0200 + dw $001B, $8210, $0000 + dw $0001, $8290, $0080 + dw $0005, $8290, $0000 + dw $000E, $8210, $0000 + dw $0001, $8250, $0040 + dw $0003, $8250, $0000 + dw $0001, $8150, $0100 + dw $0001, $8150, $0000 + dw $000C, $8110, $0000 + dw $0001, $8100, $0000 + dw $0006, $8000, $0000 + dw $0007, $0000, $0000 + dw $0001, $0200, $0200 + dw $0003, $0200, $0000 + dw $0001, $4200, $4000 + dw $0005, $4000, $0000 + dw $0045, $0000, $0000 + dw $8427 ; Delete +} ; PAL ggg + +DemoInput_babyskip: +{ + dw $001F, $0000, $0000 + dw $0001, $0040, $0040 + dw $0004, $0040, $0000 + dw $0005, $0000, $0000 + dw $0001, $8000, $8000 + dw $0011, $8000, $0000 + dw $0001, $8200, $0200 + dw $001F, $8200, $0000 + dw $0001, $8280, $0080 + dw $001A, $8280, $0000 + dw $0011, $8200, $0000 + dw $0001, $8280, $0080 + dw $0005, $8280, $0000 + dw $0001, $0100, $0100 + dw $0002, $0100, $0000 + dw $0001, $0180, $0080 + dw $0010, $0180, $0000 + dw $0003, $0100, $0000 + dw $0001, $8100, $8000 + dw $0001, $8100, $0000 + dw $0001, $8000, $0000 + dw $0001, $8200, $0200 + dw $0003, $8200, $0000 + dw $0001, $8600, $0400 + dw $000B, $8400, $0000 + dw $0001, $8100, $0100 + dw $0003, $8100, $0000 + dw $0001, $8800, $0800 + dw $0001, $8200, $0200 + dw $0002, $8200, $0000 + dw $0001, $8600, $0400 + dw $0001, $8000, $0000 + dw $0001, $8100, $0100 + dw $0003, $8100, $0000 + dw $0001, $8400, $0400 + dw $0001, $8200, $0200 + dw $0004, $8200, $0000 + dw $0001, $8100, $0100 + dw $0006, $8100, $0000 + dw $0001, $8400, $0400 + dw $0007, $8400, $0000 + dw $0007, $8000, $0000 + dw $0001, $8400, $0400 + dw $0004, $8400, $0000 + dw $0004, $8000, $0000 + dw $0001, $8400, $0400 + dw $0005, $8400, $0000 + dw $0001, $8500, $0100 + dw $0004, $8100, $0000 + dw $000E, $0100, $0000 + dw $0001, $0140, $0040 + dw $0001, $0140, $0000 + dw $0001, $0040, $0000 + dw $0001, $4000, $4000 + dw $0001, $4000, $0000 + dw $0002, $0000, $0000 + dw $0001, $0800, $0800 + dw $0005, $0800, $0000 + dw $0007, $0000, $0000 + dw $0001, $0200, $0200 + dw $0008, $0200, $0000 + dw $0062, $0000, $0000 + dw $0001, $8000, $8000 + dw $0001, $8200, $0200 + dw $000B, $8200, $0000 + dw $0001, $8000, $0000 + dw $0001, $8100, $0100 + dw $0010, $8100, $0000 + dw $0001, $0180, $0080 + dw $0001, $0180, $0000 + dw $0001, $0100, $0000 + dw $0001, $0200, $0200 + dw $0001, $0200, $0000 + dw $0024, $0000, $0000 + dw $0001, $8000, $8000 + dw $0011, $8000, $0000 + dw $0001, $8100, $0100 + dw $0021, $8100, $0000 + dw $0002, $0100, $0000 + dw $0089, $0000, $0000 + dw $0001, $0200, $0200 + dw $0001, $0200, $0000 + dw $0178, $0000, $0000 + dw $0001, $0040, $0040 + dw $0003, $0040, $0000 + dw $0024, $0000, $0000 + dw $0001, $8000, $8000 + dw $002E, $8000, $0000 + dw $0001, $8200, $0200 + dw $0022, $8200, $0000 + dw $0001, $8280, $0080 + dw $0018, $8280, $0000 + dw $0005, $8200, $0000 + dw $000A, $0200, $0000 + dw $0001, $8200, $8000 + dw $0001, $8280, $0080 + dw $0001, $8280, $0000 + dw $0001, $82C0, $0040 + dw $0002, $82C0, $0000 + dw $0001, $84C0, $0400 + dw $0001, $84C0, $0000 + dw $0003, $0400, $0000 + dw $0001, $8480, $8080 + dw $000B, $8480, $0000 + dw $0007, $8400, $0000 + dw $0001, $8200, $0200 + dw $0005, $8200, $0000 + dw $0001, $8220, $0020 + dw $0007, $8220, $0000 + dw $0001, $8260, $0040 + dw $0002, $8260, $0000 + dw $0002, $8220, $0000 + dw $0002, $8020, $0000 + dw $0001, $8120, $0100 + dw $0001, $8120, $0000 + dw $000A, $8100, $0000 + dw $0001, $8000, $0000 + dw $0001, $8200, $0200 + dw $0006, $8200, $0000 + dw $0001, $8280, $0080 + dw $0014, $8280, $0000 + dw $0003, $8200, $0000 + dw $0002, $0200, $0000 + dw $0001, $8200, $8000 + dw $0014, $8200, $0000 + dw $0001, $8240, $0040 + dw $0006, $8240, $0000 + dw $0008, $8200, $0000 + dw $0001, $8000, $0000 + dw $0001, $8100, $0100 + dw $000F, $8100, $0000 + dw $0001, $8180, $0080 + dw $0002, $8180, $0000 + dw $0001, $8080, $0000 + dw $0001, $8280, $0200 + dw $0011, $8280, $0000 + dw $0003, $8200, $0000 + dw $0001, $0200, $0000 + dw $0001, $8200, $8000 + dw $0005, $8200, $0000 + dw $0001, $8220, $0020 + dw $0009, $8220, $0000 + dw $0001, $8260, $0040 + dw $0006, $8260, $0000 + dw $000D, $8220, $0000 + dw $0001, $8200, $0000 + dw $0001, $8000, $0000 + dw $0001, $8100, $0100 + dw $0012, $8100, $0000 + dw $0002, $8000, $0000 + dw $0001, $8200, $0200 + dw $0001, $8200, $0000 + dw $0001, $8280, $0080 + dw $0012, $8280, $0000 + dw $0001, $8240, $0040 + dw $0005, $8240, $0000 + dw $0013, $8200, $0000 + dw $0001, $8600, $0400 + dw $0005, $8400, $0000 + dw $0001, $8440, $0040 + dw $0005, $8440, $0000 + dw $0004, $8400, $0000 + dw $0001, $8100, $0100 + dw $0004, $8100, $0000 + dw $0007, $8000, $0000 + dw $0001, $8100, $0100 + dw $0004, $8100, $0000 + dw $0001, $8180, $0080 + dw $0002, $8180, $0000 + dw $0001, $8280, $0200 + dw $0018, $8280, $0000 + dw $000A, $8200, $0000 + dw $0010, $0200, $0000 + dw $8427 ; Delete +} ; PAL babyskip +else ; END OF PAL DEMOS ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +DemoInput_mockball: +{ + dw $0018, $0000, $0000 + dw $0001, $8000, $8000 + dw $0006, $8000, $0000 + dw $0001, $8100, $0100 + dw $003D, $8100, $0000 + dw $0001, $8180, $0080 + dw $0003, $0180, $0000 + dw $0003, $0100, $0000 + dw $0001, $0500, $0400 + dw $0001, $0500, $0000 + dw $0001, $0580, $0080 + dw $0003, $0480, $0000 + dw $0006, $0080, $0000 + dw $0001, $0480, $0400 + dw $0002, $0580, $0000 + dw $0008, $0180, $0000 + dw $0030, $0100, $0000 + dw $0001, $0000, $0000 + dw $0001, $0800, $0800 + dw $0008, $0800, $0000 + dw $0041, $0000, $0000 + dw $8427 ; Delete +} + +DemoInput_lavadive: +{ + dw $0041, $0000, $0000 + dw $0001, $8000, $8000 + dw $0003, $8000, $0000 + dw $0001, $8100, $0100 + dw $0012, $8100, $0000 + dw $0003, $8000, $0000 + dw $0001, $8200, $0200 + dw $0014, $8200, $0000 + dw $0001, $8280, $0080 + dw $0002, $0280, $0000 + dw $0001, $0200, $0000 + dw $0001, $0600, $0400 + dw $0002, $0600, $0000 + dw $0001, $0400, $0000 + dw $0001, $0480, $0080 + dw $0001, $0480, $0000 + dw $0004, $0080, $0000 + dw $0001, $0480, $0400 + dw $0002, $0480, $0000 + dw $0001, $0680, $0200 + dw $0001, $0680, $0000 + dw $0002, $0280, $0000 + dw $00CA, $0200, $0000 + dw $0001, $0280, $0080 + dw $0005, $0280, $0000 + dw $000B, $0200, $0000 + dw $0001, $8200, $8000 + dw $001D, $8200, $0000 + dw $0001, $8220, $0020 + dw $0007, $8220, $0000 + dw $0001, $8200, $0000 + dw $0001, $8280, $0080 + dw $0006, $8280, $0000 + dw $000C, $8200, $0000 + dw $0001, $8220, $0020 + dw $0006, $8220, $0000 + dw $0001, $82A0, $0080 + dw $0037, $8280, $0000 + dw $0006, $8200, $0000 + dw $0001, $8220, $0020 + dw $000B, $8020, $0000 + dw $0001, $8120, $0100 + dw $0006, $8120, $0000 + dw $0009, $8100, $0000 + dw $0001, $0100, $0000 + dw $0001, $0180, $0080 + dw $000D, $0180, $0000 + dw $0001, $0280, $0200 + dw $000D, $0280, $0000 + dw $0001, $0080, $0000 + dw $0001, $0180, $0100 + dw $0003, $0100, $0000 + dw $0001, $0180, $0080 + dw $0002, $0180, $0000 + dw $0001, $0280, $0200 + dw $000C, $0280, $0000 + dw $0001, $0080, $0000 + dw $0001, $0180, $0100 + dw $0002, $0100, $0000 + dw $0001, $0180, $0080 + dw $0003, $0180, $0000 + dw $0001, $0080, $0000 + dw $0001, $0280, $0200 + dw $0010, $0280, $0000 + dw $0001, $0180, $0100 + dw $0001, $0180, $0000 + dw $0003, $0100, $0000 + dw $0001, $0180, $0080 + dw $005C, $0180, $0000 + dw $0022, $0100, $0000 + dw $0001, $0200, $0200 + dw $0004, $0200, $0000 + dw $0001, $0280, $0080 + dw $0002, $0280, $0000 + dw $0001, $0180, $0100 + dw $0001, $0180, $0000 + dw $000A, $0100, $0000 + dw $0001, $0000, $0000 + dw $0001, $0200, $0200 + dw $0001, $0200, $0000 + dw $0001, $0280, $0080 + dw $0010, $0280, $0000 + dw $0001, $0080, $0000 + dw $0001, $0180, $0100 + dw $000A, $0180, $0000 + dw $0001, $0080, $0000 + dw $0001, $0280, $0200 + dw $0002, $0280, $0000 + dw $0002, $0200, $0000 + dw $0001, $0280, $0080 + dw $002A, $0280, $0000 + dw $0010, $0200, $0000 + dw $0001, $0000, $0000 + dw $0001, $0100, $0100 + dw $0002, $0100, $0000 + dw $0001, $0180, $0080 + dw $0002, $0180, $0000 + dw $0001, $0080, $0000 + dw $0001, $0280, $0200 + dw $000B, $0280, $0000 + dw $0001, $8200, $8000 + dw $0005, $C200, $0000 + dw $0002, $8200, $0000 + dw $0001, $0200, $0000 + dw $0006, $0000, $0000 + dw $8427 ; Delete +} ; lavadive + +DemoInput_redtower: +{ + dw $002A, $0000, $0000 + dw $0001, $8200, $8200 + dw $0015, $8200, $0000 + dw $0004, $8000, $0000 + dw $0001, $8100, $0100 + dw $000D, $8100, $0000 + dw $0001, $8180, $0080 + dw $002D, $8180, $0000 + dw $0001, $0000, $0000 + dw $0001, $0200, $0200 + dw $0002, $0200, $0000 + dw $0001, $0280, $0080 + dw $0003, $0280, $0000 + dw $0001, $0180, $0100 + dw $001B, $0180, $0000 + dw $0001, $0080, $0000 + dw $0001, $0200, $0200 + dw $0002, $0200, $0000 + dw $0001, $0280, $0080 + dw $000E, $0280, $0000 + dw $0001, $02C0, $0040 + dw $0003, $02C0, $0000 + dw $0001, $04C0, $0400 + dw $0004, $04C0, $0000 + dw $0001, $0480, $0000 + dw $0002, $0400, $0000 + dw $0001, $0600, $0200 + dw $0001, $0200, $0000 + dw $0001, $8200, $8000 + dw $000A, $8200, $0000 + dw $0001, $8280, $0080 + dw $0014, $8280, $0000 + dw $0001, $0080, $0000 + dw $0001, $0100, $0100 + dw $0001, $0100, $0000 + dw $0001, $0180, $0080 + dw $0010, $0180, $0000 + dw $0006, $0100, $0000 + dw $0001, $0120, $0020 + dw $0005, $0120, $0000 + dw $0001, $01A0, $0080 + dw $0002, $01A0, $0000 + dw $000B, $0180, $0000 + dw $0002, $0080, $0000 + dw $0001, $0280, $0200 + dw $0013, $0280, $0000 + dw $0001, $0080, $0000 + dw $0001, $0100, $0100 + dw $0002, $0100, $0000 + dw $0001, $0180, $0080 + dw $0002, $0180, $0000 + dw $0001, $0080, $0000 + dw $0001, $0280, $0200 + dw $0008, $0280, $0000 + dw $0001, $0A00, $0800 + dw $0001, $0A00, $0000 + dw $0013, $0800, $0000 + dw $0001, $0880, $0080 + dw $0009, $0880, $0000 + dw $001D, $0800, $0000 + dw $0001, $0840, $0040 + dw $0002, $0840, $0000 + dw $0001, $0240, $0200 + dw $0001, $0200, $0000 + dw $0001, $0280, $0080 + dw $000F, $0280, $0000 + dw $0001, $0080, $0000 + dw $0001, $0180, $0100 + dw $0002, $0180, $0000 + dw $0002, $0100, $0000 + dw $0001, $0180, $0080 + dw $0001, $0180, $0000 + dw $0001, $0080, $0000 + dw $0001, $0280, $0200 + dw $0008, $0280, $0000 + dw $0001, $0180, $0100 + dw $0001, $0180, $0000 + dw $0002, $0100, $0000 + dw $0001, $0180, $0080 + dw $0003, $0180, $0000 + dw $0001, $0080, $0000 + dw $0001, $0280, $0200 + dw $0009, $0280, $0000 + dw $0001, $0180, $0100 + dw $0002, $0100, $0000 + dw $0001, $0180, $0080 + dw $0004, $0180, $0000 + dw $0001, $0280, $0200 + dw $000A, $0280, $0000 + dw $0013, $0200, $0000 + dw $0001, $0000, $0000 + dw $0001, $0100, $0100 + dw $0004, $0100, $0000 + dw $0001, $0180, $0080 + dw $0001, $0180, $0000 + dw $0001, $0080, $0000 + dw $0001, $0280, $0200 + dw $0004, $0280, $0000 + dw $0006, $0200, $0000 + dw $0001, $0100, $0100 + dw $0002, $0100, $0000 + dw $0001, $0180, $0080 + dw $0004, $0180, $0000 + dw $0001, $0080, $0000 + dw $0001, $0280, $0200 + dw $000B, $0280, $0000 + dw $0001, $0080, $0000 + dw $0001, $0180, $0100 + dw $0002, $0180, $0000 + dw $0002, $0100, $0000 + dw $0001, $0180, $0080 + dw $0024, $0180, $0000 + dw $0001, $0280, $0200 + dw $0004, $0200, $0000 + dw $0001, $0280, $0080 + dw $0002, $0280, $0000 + dw $0001, $0180, $0100 + dw $0008, $0180, $0000 + dw $0005, $0100, $0000 + dw $0001, $0120, $0020 + dw $0001, $0120, $0000 + dw $0004, $0020, $0000 + dw $0039, $0000, $0000 + dw $8427 ; Delete +} ; redtower + +DemoInput_ggg: +{ + dw $002B, $0000, $0000 + dw $0001, $2000, $2000 + dw $000F, $2000, $0000 + dw $000B, $0000, $0000 + dw $0001, $2000, $2000 + dw $0001, $2000, $0000 + dw $0001, $A000, $8000 + dw $0004, $A000, $0000 + dw $0007, $8000, $0000 + dw $0001, $8010, $0010 + dw $0007, $8010, $0000 + dw $0001, $8110, $0100 + dw $001D, $8110, $0000 + dw $0004, $8010, $0000 + dw $0001, $8210, $0200 + dw $001F, $8210, $0000 + dw $0001, $8290, $0080 + dw $0006, $8290, $0000 + dw $000F, $8210, $0000 + dw $0001, $8250, $0040 + dw $0004, $8250, $0000 + dw $0001, $8050, $0000 + dw $0001, $8110, $0100 + dw $0015, $8110, $0000 + dw $0003, $8100, $0000 + dw $0003, $8000, $0000 + dw $0001, $8200, $0200 + dw $0006, $8200, $0000 + dw $0023, $0000, $0000 + dw $8427 ; Delete +} + +DemoInput_landingsite: +{ + dw $016D, $0000, $0000 + dw $0001, $8000, $8000 + dw $0020, $8000, $0000 + dw $0001, $8200, $0200 + dw $0020, $8200, $0000 + dw $0001, $0280, $0080 + dw $0001, $0280, $0000 + dw $0001, $0200, $0000 + dw $0001, $0000, $0000 + dw $0001, $0100, $0100 + dw $0002, $0100, $0000 + dw $0023, $0000, $0000 + dw $0001, $8000, $8000 + dw $0002, $8000, $0000 + dw $0001, $8200, $0200 + dw $0003, $8200, $0000 + dw $0001, $0280, $0080 + dw $0001, $0200, $0000 + dw $0002, $0000, $0000 + dw $0001, $0100, $0100 + dw $0001, $0100, $0000 + dw $0038, $0000, $0000 + dw $0001, $0100, $0100 + dw $0002, $0100, $0000 + dw $0002, $0000, $0000 + dw $0001, $0100, $0100 + dw $0005, $0100, $0000 + dw $0002, $0000, $0000 + dw $0001, $0100, $0100 + dw $0009, $0100, $0000 + dw $0001, $8100, $8000 + dw $0002, $8100, $0000 + dw $0016, $0100, $0000 + dw $0001, $8100, $8000 + dw $0002, $8100, $0000 + dw $0012, $0100, $0000 + dw $0001, $8100, $8000 + dw $0002, $8100, $0000 + dw $000D, $0100, $0000 + dw $0001, $8100, $8000 + dw $0002, $8100, $0000 + dw $0001, $8500, $0400 + dw $0001, $8500, $0000 + dw $0003, $8400, $0000 + dw $0048, $0000, $0000 + dw $8427 ; Delete +} ; landingsite + +DemoInput_babyskip: +{ + dw $0030, $0000, $0000 + dw $0001, $8040, $8040 + dw $0003, $8040, $0000 + dw $0025, $8000, $0000 + dw $0001, $8200, $0200 + dw $0023, $8200, $0000 + dw $0001, $8280, $0080 + dw $0017, $8280, $0000 + dw $0019, $8200, $0000 + dw $0001, $8280, $0080 + dw $0002, $8280, $0000 + dw $0002, $0280, $0000 + dw $0002, $0000, $0000 + dw $0001, $0100, $0100 + dw $0004, $0100, $0000 + dw $0001, $0180, $0080 + dw $001C, $0180, $0000 + dw $0008, $0100, $0000 + dw $0001, $0000, $0000 + dw $0001, $0200, $0200 + dw $000A, $8200, $0000 + dw $000F, $8000, $0000 + dw $0001, $8200, $0200 + dw $001B, $8200, $0000 + dw $0001, $8000, $0000 + dw $0001, $8100, $0100 + dw $002E, $8100, $0000 + dw $0001, $8000, $0000 + dw $0001, $8200, $0200 + dw $0002, $8200, $0000 + dw $003D, $8000, $0000 + dw $01B4, $0000, $0000 + dw $0001, $0400, $0400 + dw $0004, $0400, $0000 + dw $00CB, $0000, $0000 + dw $0001, $8800, $8800 + dw $0003, $8800, $0000 + dw $0020, $8000, $0000 + dw $0001, $8040, $0040 + dw $0006, $8040, $0000 + dw $0046, $8000, $0000 + dw $0001, $8200, $0200 + dw $0025, $8200, $0000 + dw $0001, $8280, $0080 + dw $0003, $8280, $0000 + dw $0001, $8480, $0400 + dw $004A, $8480, $0000 + dw $0002, $8400, $0000 + dw $0006, $8000, $0000 + dw $0001, $8200, $0200 + dw $000A, $8200, $0000 + dw $0001, $8280, $0080 + dw $0011, $8280, $0000 + dw $0024, $8200, $0000 + dw $0001, $8600, $0400 + dw $0005, $8400, $0000 + dw $0001, $8440, $0040 + dw $0003, $8440, $0000 + dw $0001, $8540, $0100 + dw $0001, $8140, $0000 + dw $000D, $8100, $0000 + dw $0001, $8000, $0000 + dw $0001, $8200, $0200 + dw $0002, $8200, $0000 + dw $0001, $8280, $0080 + dw $0013, $8280, $0000 + dw $001B, $8200, $0000 + dw $0001, $8240, $0040 + dw $0007, $8240, $0000 + dw $0006, $8200, $0000 + dw $0002, $8000, $0000 + dw $0001, $8100, $0100 + dw $0014, $8100, $0000 + dw $0002, $8000, $0000 + dw $0001, $8280, $0280 + dw $0010, $8280, $0000 + dw $0012, $8200, $0000 + dw $0001, $8210, $0010 + dw $0006, $8210, $0000 + dw $0001, $8250, $0040 + dw $0006, $8250, $0000 + dw $0001, $8210, $0000 + dw $0011, $8200, $0000 + dw $0001, $8000, $0000 + dw $0001, $8800, $0800 + dw $0004, $8800, $0000 + dw $0001, $8840, $0040 + dw $0001, $8840, $0000 + dw $0001, $80C0, $0080 + dw $0003, $8080, $0000 + dw $0001, $8480, $0400 + dw $0006, $8480, $0000 + dw $0002, $8080, $0000 + dw $0001, $8480, $0400 + dw $0002, $8480, $0000 + dw $0001, $8680, $0200 + dw $0002, $8280, $0000 + dw $0005, $0280, $0000 + dw $003A, $0200, $0000 + dw $000F, $0000, $0000 + dw $8427 ; Delete +} ; babyskip + +DemoInput_metroid3: +{ + dw $0019, $0000, $0000 + dw $0001, $0100, $0100 + dw $000C, $0100, $0000 + dw $0001, $8100, $8000 + dw $0001, $8100, $0000 + dw $0002, $8000, $0000 + dw $0001, $8200, $0200 + dw $000D, $8200, $0000 + dw $0006, $8000, $0000 + dw $0001, $8040, $0040 + dw $0003, $8040, $0000 + dw $0001, $8140, $0100 + dw $0002, $8140, $0000 + dw $0009, $8100, $0000 + dw $0001, $8140, $0040 + dw $0006, $8140, $0000 + dw $000C, $8100, $0000 + dw $0001, $8180, $0080 + dw $0004, $8180, $0000 + dw $0001, $8580, $0400 + dw $0003, $8480, $0000 + dw $000C, $8400, $0000 + dw $0002, $8000, $0000 + dw $0013, $0000, $0000 + dw $0001, $8000, $8000 + dw $001C, $8000, $0000 + dw $000A, $0000, $0000 + dw $0001, $8140, $8140 + dw $0005, $8140, $0000 + dw $0001, $A140, $2000 + dw $0006, $A100, $0000 + dw $0006, $8100, $0000 + dw $0001, $A100, $2000 + dw $0008, $A100, $0000 + dw $0001, $8140, $0040 + dw $0006, $8140, $0000 + dw $0030, $8100, $0000 + dw $0001, $8140, $0040 + dw $0001, $81C0, $0080 + dw $0002, $8180, $0000 + dw $0004, $0180, $0000 + dw $0008, $0100, $0000 + dw $0001, $8100, $8000 + dw $000C, $8100, $0000 + dw $0001, $4100, $4000 + dw $0003, $4100, $0000 + dw $0007, $0100, $0000 + dw $0001, $8180, $8080 + dw $0001, $81C0, $0040 + dw $0002, $81C0, $0000 + dw $0001, $A1C0, $2000 + dw $0003, $A1C0, $0000 + dw $0002, $A180, $0000 + dw $0004, $8180, $0000 + dw $0001, $A1A0, $2020 + dw $0003, $A120, $0000 + dw $0001, $8160, $0040 + dw $0007, $8160, $0000 + dw $0001, $C140, $4000 + dw $0002, $C140, $0000 + dw $000E, $8100, $0000 + dw $0001, $81C0, $00C0 + dw $0004, $81C0, $0000 + dw $0001, $8580, $0400 + dw $0001, $8580, $0000 + dw $0002, $8480, $0000 + dw $0004, $8080, $0000 + dw $0001, $8580, $0500 + dw $0002, $8580, $0000 + dw $0006, $8100, $0000 + dw $0001, $8180, $0080 + dw $000B, $8180, $0000 + dw $000E, $0100, $0000 + dw $8427 ; Delete +} ; metroid3 + +DemoInput_moat: +{ + dw $0021, $0000, $0000 + dw $0001, $8000, $8000 + dw $0006, $8000, $0000 + dw $0001, $8200, $0200 + dw $000E, $8200, $0000 + dw $0001, $8240, $0040 + dw $000B, $8240, $0000 + dw $0005, $8200, $0000 + dw $0004, $8000, $0000 + dw $0001, $8010, $0010 + dw $000E, $8010, $0000 + dw $0001, $8210, $0200 + dw $0009, $8210, $0000 + dw $0021, $8010, $0000 + dw $0009, $8000, $0000 + dw $0001, $8400, $0400 + dw $0002, $8400, $0000 + dw $0001, $8000, $0000 + dw $0001, $0000, $0000 + dw $0001, $8000, $8000 + dw $0001, $8000, $0000 + dw $0002, $0000, $0000 + dw $0001, $0400, $0400 + dw $0004, $0400, $0000 + dw $000C, $0000, $0000 + dw $0001, $0100, $0100 + dw $000E, $0000, $0000 + dw $0001, $0800, $0800 + dw $0003, $0800, $0000 + dw $0006, $0000, $0000 + dw $0001, $0800, $0800 + dw $0004, $0800, $0000 + dw $0018, $0000, $0000 + dw $0001, $8000, $8000 + dw $0011, $8000, $0000 + dw $0001, $8100, $0100 + dw $0012, $8100, $0000 + dw $0001, $8180, $0080 + dw $0020, $8180, $0000 + dw $0006, $0180, $0000 + dw $0022, $0100, $0000 + dw $0001, $0180, $0080 + dw $003C, $0180, $0000 + dw $0009, $0100, $0000 + dw $0001, $8100, $8000 + dw $0022, $8100, $0000 + dw $0005, $8000, $0000 + dw $0001, $8010, $0010 + dw $000C, $8010, $0000 + dw $0001, $8050, $0040 + dw $0007, $8050, $0000 + dw $000C, $8010, $0000 + dw $0001, $8110, $0100 + dw $0006, $8110, $0000 + dw $0007, $8010, $0000 + dw $0001, $8110, $0100 + dw $0004, $8110, $0000 + dw $0008, $8010, $0000 + dw $0001, $8210, $0200 + dw $0005, $8210, $0000 + dw $0004, $8010, $0000 + dw $0016, $8000, $0000 + dw $0001, $8200, $0200 + dw $0017, $8200, $0000 + dw $0001, $8280, $0080 + dw $0006, $8280, $0000 + dw $0001, $8680, $0400 + dw $0002, $8480, $0000 + dw $0005, $8080, $0000 + dw $0001, $8480, $0400 + dw $0001, $8680, $0200 + dw $0008, $8680, $0000 + dw $0006, $8280, $0000 + dw $0023, $8200, $0000 + dw $0003, $8000, $0000 + dw $0001, $8100, $0100 + dw $0001, $8100, $0000 + dw $0003, $0100, $0000 + dw $0001, $8100, $8000 + dw $0002, $8100, $0000 + dw $0009, $8000, $0000 + dw $0025, $0000, $0000 + dw $0001, $0040, $0040 + dw $0005, $0040, $0000 + dw $0006, $0000, $0000 + dw $0001, $0100, $0100 + dw $0001, $0100, $0000 + dw $0029, $0000, $0000 + dw $0001, $0040, $0040 + dw $0005, $0040, $0000 + dw $0002, $0000, $0000 + dw $0001, $0200, $0200 + dw $000E, $0200, $0000 + dw $0001, $0240, $0040 + dw $0006, $0240, $0000 + dw $0012, $0200, $0000 + dw $0001, $0100, $0100 + dw $0001, $0100, $0000 + dw $0002, $0000, $0000 + dw $0001, $0040, $0040 + dw $0005, $0040, $0000 + dw $000F, $0000, $0000 + dw $0001, $0040, $0040 + dw $0005, $0040, $0000 + dw $0012, $0000, $0000 + dw $0001, $0100, $0100 + dw $0016, $0100, $0000 + dw $0001, $0900, $0800 + dw $0001, $0900, $0000 + dw $0002, $0100, $0000 + dw $0001, $0900, $0800 + dw $000C, $0900, $0000 + dw $0012, $0100, $0000 + dw $0039, $0000, $0000 + dw $0001, $8000, $8000 + dw $000D, $8000, $0000 + dw $0001, $8100, $0100 + dw $0002, $8100, $0000 + dw $0012, $0100, $0000 + dw $8427 ; Delete +} ; moat + +DemoInput_frogspeedway: +{ + dw $002C, $0000, $0000 + dw $0001, $8200, $8200 + dw $00AA, $8200, $0000 + dw $0002, $8000, $0000 + dw $0001, $8010, $0010 + dw $000F, $8010, $0000 + dw $0001, $8050, $0040 + dw $0007, $8050, $0000 + dw $0008, $8010, $0000 + dw $0001, $8050, $0040 + dw $0008, $8050, $0000 + dw $0007, $8010, $0000 + dw $0001, $8050, $0040 + dw $0008, $8050, $0000 + dw $0007, $8010, $0000 + dw $0001, $8050, $0040 + dw $0007, $8050, $0000 + dw $0007, $8010, $0000 + dw $0001, $8050, $0040 + dw $0007, $8050, $0000 + dw $0007, $8010, $0000 + dw $0001, $8050, $0040 + dw $0005, $8050, $0000 + dw $0001, $8250, $0200 + dw $0002, $8250, $0000 + dw $0008, $8210, $0000 + dw $0001, $8250, $0040 + dw $0007, $8250, $0000 + dw $0006, $8210, $0000 + dw $0001, $8250, $0040 + dw $0007, $8250, $0000 + dw $0008, $8210, $0000 + dw $0001, $8250, $0040 + dw $0007, $8250, $0000 + dw $0005, $8210, $0000 + dw $0001, $8250, $0040 + dw $0007, $8250, $0000 + dw $0007, $8210, $0000 + dw $0001, $8250, $0040 + dw $0007, $8250, $0000 + dw $0007, $8210, $0000 + dw $0001, $8250, $0040 + dw $0006, $8250, $0000 + dw $0007, $8210, $0000 + dw $0001, $8250, $0040 + dw $0006, $8250, $0000 + dw $0007, $8210, $0000 + dw $0001, $8250, $0040 + dw $0007, $8250, $0000 + dw $0007, $8210, $0000 + dw $0001, $8250, $0040 + dw $0007, $8250, $0000 + dw $0006, $8210, $0000 + dw $0001, $8250, $0040 + dw $0007, $8250, $0000 + dw $0007, $8210, $0000 + dw $0001, $8250, $0040 + dw $0007, $8250, $0000 + dw $0006, $8210, $0000 + dw $0001, $8250, $0040 + dw $0007, $8250, $0000 + dw $0006, $8210, $0000 + dw $0001, $8250, $0040 + dw $0006, $8250, $0000 + dw $0004, $8210, $0000 + dw $0033, $8200, $0000 + dw $0001, $A200, $2000 + dw $0007, $A200, $0000 + dw $002A, $8200, $0000 + dw $0001, $8000, $0000 + dw $0001, $8030, $0030 + dw $0006, $8030, $0000 + dw $0001, $8070, $0040 + dw $0005, $8070, $0000 + dw $0001, $8030, $0000 + dw $000A, $8020, $0000 + dw $0004, $8000, $0000 + dw $0001, $0200, $0200 + dw $0001, $0200, $0000 + dw $0001, $4200, $4000 + dw $0004, $4200, $0000 + dw $0001, $8200, $8000 + dw $004C, $8200, $0000 + dw $0001, $8240, $0040 + dw $0006, $8240, $0000 + dw $0035, $8200, $0000 + dw $8427 ; Delete +} ; frogspeedway + +DemoInput_wraparound: +{ + dw $0031, $0000, $0000 + dw $0001, $8000, $8000 + dw $0003, $8000, $0000 + dw $0001, $8040, $0040 + dw $001A, $8040, $0000 + dw $0001, $8140, $0100 + dw $001E, $8140, $0000 + dw $0002, $8040, $0000 + dw $0001, $8240, $0200 + dw $003C, $8240, $0000 + dw $0001, $8040, $0000 + dw $0001, $8140, $0100 + dw $0005, $8140, $0000 + dw $0001, $8060, $0020 + dw $000F, $8060, $0000 + dw $0001, $8260, $0200 + dw $000D, $8260, $0000 + dw $0001, $8060, $0000 + dw $0001, $8160, $0100 + dw $0005, $8160, $0000 + dw $0019, $8060, $0000 + dw $0001, $8160, $0100 + dw $0002, $8160, $0000 + dw $0010, $8060, $0000 + dw $0001, $8160, $0100 + dw $0001, $8160, $0000 + dw $0048, $8060, $0000 + dw $0004, $8020, $0000 + dw $0001, $8120, $0100 + dw $0001, $8120, $0000 + dw $003C, $8100, $0000 + dw $0001, $8000, $0000 + dw $0001, $8200, $0200 + dw $0002, $8200, $0000 + dw $0001, $0200, $0000 + dw $0008, $0000, $0000 + dw $0001, $0200, $0200 + dw $0012, $0200, $0000 + dw $0001, $8200, $8000 + dw $0055, $8200, $0000 + dw $0001, $8400, $0400 + dw $006A, $8400, $0000 + dw $0001, $8480, $0080 + dw $0001, $0280, $0200 + dw $0001, $0280, $0000 + dw $0001, $0800, $0800 + dw $0004, $0800, $0000 + dw $0001, $0A00, $0200 + dw $0002, $0A00, $0000 + dw $0003, $0200, $0000 + dw $0001, $4280, $4080 + dw $0009, $4280, $0000 + dw $0004, $0200, $0000 + dw $006B, $0000, $0000 + dw $8427 ; Delete +} ; wraparound + +DemoInput_speedball: +{ + dw $002A, $0000, $0000 + dw $0001, $2000, $2000 + dw $0005, $2000, $0000 + dw $0003, $0000, $0000 + dw $0001, $2000, $2000 + dw $0006, $2000, $0000 + dw $0006, $0000, $0000 + dw $0001, $8000, $8000 + dw $0002, $8000, $0000 + dw $0001, $8200, $0200 + dw $001E, $8200, $0000 + dw $0001, $0280, $0080 + dw $0001, $0280, $0000 + dw $0011, $0200, $0000 + dw $0001, $0000, $0000 + dw $0001, $0010, $0010 + dw $0001, $0110, $0100 + dw $0004, $0110, $0000 + dw $0003, $0010, $0000 + dw $0010, $0000, $0000 + dw $0001, $0100, $0100 + dw $0017, $0100, $0000 + dw $0001, $8100, $8000 + dw $0007, $8100, $0000 + dw $0011, $0100, $0000 + dw $0001, $8100, $8000 + dw $0007, $8100, $0000 + dw $0009, $0100, $0000 + dw $0001, $8100, $8000 + dw $0017, $8100, $0000 + dw $0001, $8180, $0080 + dw $0008, $8180, $0000 + dw $0001, $0180, $0000 + dw $0004, $0100, $0000 + dw $0001, $8180, $8080 + dw $0001, $8580, $0400 + dw $0004, $8580, $0000 + dw $0004, $8480, $0000 + dw $0013, $8080, $0000 + dw $0001, $8480, $0400 + dw $0001, $8480, $0000 + dw $0001, $8580, $0100 + dw $0001, $8500, $0000 + dw $0001, $0500, $0000 + dw $0021, $0100, $0000 + dw $0001, $0180, $0080 + dw $0003, $0180, $0000 + dw $0001, $0980, $0800 + dw $0002, $0980, $0000 + dw $0003, $0880, $0000 + dw $0001, $0980, $0100 + dw $0001, $0980, $0000 + dw $0001, $0900, $0000 + dw $0001, $8100, $8000 + dw $0001, $8140, $0040 + dw $0007, $8140, $0000 + dw $001E, $8100, $0000 + dw $0004, $8000, $0000 + dw $0004, $0000, $0000 + dw $0001, $4000, $4000 + dw $0005, $4000, $0000 + dw $000A, $0000, $0000 + dw $0001, $8000, $8000 + dw $0013, $8000, $0000 + dw $0001, $8010, $0010 + dw $0005, $8010, $0000 + dw $0001, $8050, $0040 + dw $0004, $8050, $0000 + dw $0001, $8010, $0000 + dw $0007, $8000, $0000 + dw $0027, $0000, $0000 + dw $8427 ; Delete +} ; speedball + +DemoInput_kqk: +{ + dw $0222, $0000, $0000 + dw $0001, $2000, $2000 + dw $0003, $2000, $0000 + dw $0001, $A000, $8000 + dw $000F, $8000, $0000 + dw $0001, $8080, $0080 + dw $0007, $8080, $0000 + dw $0001, $80C0, $0040 + dw $0002, $80C0, $0000 + dw $0004, $8040, $0000 + dw $0008, $8000, $0000 + dw $0001, $8040, $0040 + dw $0005, $8040, $0000 + dw $000C, $8000, $0000 + dw $0001, $A000, $2000 + dw $0007, $A000, $0000 + dw $0005, $8000, $0000 + dw $0001, $8080, $0080 + dw $0008, $8080, $0000 + dw $0001, $80C0, $0040 + dw $0001, $80C0, $0000 + dw $0005, $8040, $0000 + dw $000F, $8000, $0000 + dw $0001, $8040, $0040 + dw $0006, $8040, $0000 + dw $000A, $8000, $0000 + dw $0001, $8080, $0080 + dw $0007, $8080, $0000 + dw $0001, $80C0, $0040 + dw $0002, $80C0, $0000 + dw $0003, $8040, $0000 + dw $000C, $8000, $0000 + dw $8427 ; Delete +} ; kqk + +DemoInput_grapplejump: +{ + dw $0014, $0000, $0000 + dw $0001, $0200, $0200 + dw $0009, $0200, $0000 + dw $0001, $8200, $8000 + dw $0016, $8200, $0000 + dw $0001, $8000, $0000 + dw $0001, $8100, $0100 + dw $003D, $8100, $0000 + dw $0001, $A100, $2000 + dw $0004, $A100, $0000 + dw $0007, $8100, $0000 + dw $0001, $A100, $2000 + dw $0002, $A100, $0000 + dw $0006, $8100, $0000 + dw $0001, $A100, $2000 + dw $0005, $A100, $0000 + dw $0064, $8100, $0000 + dw $0001, $8180, $0080 + dw $001F, $8180, $0000 + dw $0001, $8580, $0400 + dw $0001, $8500, $0000 + dw $0004, $8400, $0000 + dw $0005, $8000, $0000 + dw $0001, $8400, $0400 + dw $0005, $8400, $0000 + dw $0001, $8500, $0100 + dw $000B, $8500, $0000 + dw $0001, $8540, $0040 + dw $0002, $8540, $0000 + dw $0002, $8140, $0000 + dw $0001, $8940, $0800 + dw $0001, $8940, $0000 + dw $0001, $8800, $0000 + dw $0001, $8900, $0100 + dw $0002, $8900, $0000 + dw $0070, $8100, $0000 + dw $0001, $A100, $2000 + dw $0004, $A100, $0000 + dw $0045, $8100, $0000 + dw $0001, $8180, $0080 + dw $0016, $8180, $0000 + dw $0007, $8080, $0000 + dw $0001, $8280, $0200 + dw $0004, $8280, $0000 + dw $0017, $8080, $0000 + dw $0001, $80C0, $0040 + dw $000D, $80C0, $0000 + dw $0001, $84C0, $0400 + dw $001E, $84C0, $0000 + dw $0001, $86C0, $0200 + dw $0006, $86C0, $0000 + dw $0020, $82C0, $0000 + dw $0002, $8280, $0000 + dw $0004, $8200, $0000 + dw $0005, $0200, $0000 + dw $0001, $0600, $0400 + dw $0006, $0400, $0000 + dw $0004, $0000, $0000 + dw $0001, $0400, $0400 + dw $0007, $0400, $0000 + dw $0007, $0000, $0000 + dw $0001, $0080, $0080 + dw $0006, $0080, $0000 + dw $0004, $0000, $0000 + dw $0001, $0080, $0080 + dw $0005, $0080, $0000 + dw $0004, $0000, $0000 + dw $0001, $0080, $0080 + dw $0007, $0080, $0000 + dw $0007, $0000, $0000 + dw $0001, $0400, $0400 + dw $0006, $0400, $0000 + dw $0003, $0000, $0000 + dw $0001, $0400, $0400 + dw $0005, $0400, $0000 + dw $0005, $0000, $0000 + dw $0001, $0080, $0080 + dw $0005, $0080, $0000 + dw $0004, $0000, $0000 + dw $0001, $0080, $0080 + dw $0005, $0080, $0000 + dw $0004, $0000, $0000 + dw $0001, $0080, $0080 + dw $0005, $0080, $0000 + dw $0003, $0000, $0000 + dw $0001, $0080, $0080 + dw $0007, $0080, $0000 + dw $0004, $0000, $0000 + dw $0001, $0400, $0400 + dw $0006, $0400, $0000 + dw $0002, $0000, $0000 + dw $0001, $0400, $0400 + dw $0007, $0400, $0000 + dw $0005, $0000, $0000 + dw $0001, $0080, $0080 + dw $0006, $0080, $0000 + dw $0005, $0000, $0000 + dw $0001, $0080, $0080 + dw $0005, $0080, $0000 + dw $0005, $0000, $0000 + dw $0001, $0080, $0080 + dw $0004, $0080, $0000 + dw $0005, $0000, $0000 + dw $0001, $0080, $0080 + dw $0006, $0080, $0000 + dw $0001, $0400, $0400 + dw $0005, $0400, $0000 + dw $0004, $0000, $0000 + dw $0001, $0400, $0400 + dw $0006, $0400, $0000 + dw $0002, $0000, $0000 + dw $0001, $0080, $0080 + dw $0006, $0080, $0000 + dw $0005, $0000, $0000 + dw $0001, $0080, $0080 + dw $0005, $0080, $0000 + dw $0005, $0000, $0000 + dw $0001, $0080, $0080 + dw $0006, $0080, $0000 + dw $0004, $0000, $0000 + dw $0001, $0080, $0080 + dw $0002, $0080, $0000 + dw $0001, $0280, $0200 + dw $0010, $0280, $0000 + dw $000C, $0200, $0000 + dw $0001, $8200, $8000 + dw $0002, $8200, $0000 + dw $0001, $8240, $0040 + dw $000A, $8240, $0000 + dw $002D, $8200, $0000 + dw $0001, $8280, $0080 + dw $0008, $8280, $0000 + dw $002E, $8200, $0000 + dw $0001, $8280, $0080 + dw $001C, $8280, $0000 + dw $0012, $8200, $0000 + dw $0001, $8000, $0000 + dw $0001, $8800, $0800 + dw $0006, $8800, $0000 + dw $0001, $8840, $0040 + dw $000F, $8840, $0000 + dw $0002, $8800, $0000 + dw $0002, $8000, $0000 + dw $0014, $0000, $0000 + dw $0001, $0080, $0080 + dw $0015, $0080, $0000 + dw $8427 ; Delete +} ; grapplejump + +DemoInput_bombjump: +{ + dw $0030, $0000, $0000 + dw $0001, $0100, $0100 + dw $0023, $0100, $0000 + dw $0017, $0000, $0000 + dw $0001, $0100, $0100 + dw $0002, $0100, $0000 + dw $0013, $0000, $0000 + dw $0001, $0080, $0080 + dw $0002, $0080, $0000 + dw $0001, $0480, $0400 + dw $0004, $0480, $0000 + dw $0004, $0080, $0000 + dw $0001, $0480, $0400 + dw $0004, $0400, $0000 + dw $0004, $0000, $0000 + dw $0001, $0040, $0040 + dw $0004, $0040, $0000 + dw $000C, $0000, $0000 + dw $0001, $0040, $0040 + dw $0003, $0040, $0000 + dw $0032, $0000, $0000 + dw $0001, $0040, $0040 + dw $0004, $0040, $0000 + dw $000D, $0000, $0000 + dw $0001, $0040, $0040 + dw $0004, $0040, $0000 + dw $0030, $0000, $0000 + dw $0001, $0040, $0040 + dw $0003, $0040, $0000 + dw $000F, $0000, $0000 + dw $0001, $0040, $0040 + dw $0003, $0040, $0000 + dw $0031, $0000, $0000 + dw $0001, $0040, $0040 + dw $0004, $0040, $0000 + dw $000E, $0000, $0000 + dw $0001, $0040, $0040 + dw $0005, $0040, $0000 + dw $002F, $0000, $0000 + dw $0001, $0040, $0040 + dw $0005, $0040, $0000 + dw $000E, $0000, $0000 + dw $0001, $0040, $0040 + dw $0005, $0040, $0000 + dw $002F, $0000, $0000 + dw $0001, $0040, $0040 + dw $0005, $0040, $0000 + dw $000E, $0000, $0000 + dw $0001, $0040, $0040 + dw $0004, $0040, $0000 + dw $002F, $0000, $0000 + dw $0001, $0040, $0040 + dw $0004, $0040, $0000 + dw $0011, $0000, $0000 + dw $0001, $0040, $0040 + dw $0004, $0040, $0000 + dw $0030, $0000, $0000 + dw $0001, $0040, $0040 + dw $0003, $0040, $0000 + dw $0010, $0000, $0000 + dw $0001, $0040, $0040 + dw $0003, $0040, $0000 + dw $003E, $0000, $0000 + dw $0001, $0100, $0100 + dw $0016, $0100, $0000 + dw $0001, $0800, $0800 + dw $0007, $0800, $0000 + dw $0027, $0000, $0000 + dw $8427 ; Delete +} ; bombjump + +DemoInput_crystalflash: +{ + dw $001B, $0000, $0000 + dw $0001, $8000, $8000 + dw $0004, $8000, $0000 + dw $0001, $8200, $0200 + dw $001B, $8200, $0000 + dw $0001, $8080, $0080 + dw $0001, $8480, $0400 + dw $0002, $8480, $0000 + dw $0003, $8400, $0000 + dw $0001, $8200, $0200 + dw $000E, $8200, $0000 + dw $0001, $8000, $0000 + dw $0001, $8100, $0100 + dw $000D, $8100, $0000 + dw $0001, $8180, $0080 + dw $0004, $8180, $0000 + dw $0001, $8080, $0000 + dw $0001, $8280, $0200 + dw $001D, $8280, $0000 + dw $0001, $8200, $0000 + dw $0001, $8220, $0020 + dw $0009, $8220, $0000 + dw $0005, $8200, $0000 + dw $0001, $8000, $0000 + dw $0001, $8100, $0100 + dw $0012, $8100, $0000 + dw $0001, $8180, $0080 + dw $001C, $8180, $0000 + dw $0001, $81A0, $0020 + dw $0007, $8120, $0000 + dw $0013, $8100, $0000 + dw $0001, $A100, $2000 + dw $0006, $A100, $0000 + dw $0004, $8100, $0000 + dw $0001, $A100, $2000 + dw $0004, $A100, $0000 + dw $0004, $8100, $0000 + dw $0001, $A100, $2000 + dw $0008, $A100, $0000 + dw $0033, $8100, $0000 + dw $0001, $8180, $0080 + dw $0003, $8180, $0000 + dw $0001, $8580, $0400 + dw $0002, $8580, $0000 + dw $0002, $8480, $0000 + dw $0005, $8080, $0000 + dw $0001, $8480, $0400 + dw $0004, $8480, $0000 + dw $0004, $8400, $0000 + dw $0001, $8500, $0100 + dw $0002, $8500, $0000 + dw $0001, $8100, $0000 + dw $0001, $8140, $0040 + dw $0006, $8140, $0000 + dw $0031, $8000, $0000 + dw $0001, $8800, $0800 + dw $0001, $8800, $0000 + dw $0005, $0800, $0000 + dw $000D, $0000, $0000 + dw $0001, $0080, $0080 + dw $0001, $4080, $4000 + dw $0011, $4080, $0000 + dw $0001, $0400, $0400 + dw $0002, $0400, $0000 + dw $0001, $0000, $0000 + dw $0001, $8000, $8000 + dw $0001, $8400, $0400 + dw $0001, $8400, $0000 + dw $0001, $8500, $0100 + dw $0003, $8100, $0000 + dw $0001, $8140, $0040 + dw $0003, $8140, $0000 + dw $0008, $8100, $0000 + dw $0010, $0100, $0000 + dw $0001, $2100, $2000 + dw $0001, $2100, $0000 + dw $0005, $0100, $0000 + dw $0001, $2100, $2000 + dw $0001, $2100, $0000 + dw $0004, $0100, $0000 + dw $0001, $2100, $2000 + dw $0004, $2100, $0000 + dw $0002, $0100, $0000 + dw $0006, $0000, $0000 + dw $0001, $0040, $0040 + dw $0005, $0040, $0000 + dw $0001, $0050, $0010 + dw $0005, $0050, $0000 + dw $0001, $0040, $0000 + dw $0023, $0000, $0000 + dw $0001, $4000, $4000 + dw $0005, $4000, $0000 + dw $001B, $0000, $0000 + dw $0001, $0430, $0430 + dw $0001, $0470, $0040 + dw $0075, $0470, $0000 + dw $0001, $0030, $0000 + dw $0001, $0020, $0000 + dw $0010, $0000, $0000 + dw $0001, $4000, $4000 + dw $0008, $4000, $0000 + dw $0001, $6000, $2000 + dw $0006, $6000, $0000 + dw $0002, $4000, $0000 + dw $0001, $6000, $2000 + dw $0005, $6000, $0000 + dw $000C, $4000, $0000 + dw $0025, $0000, $0000 + dw $0001, $8000, $8000 + dw $0037, $8000, $0000 + dw $0059, $0000, $0000 + dw $0001, $0040, $0040 + dw $0007, $0040, $0000 + dw $0001, $0000, $0000 + dw $0001, $0400, $0400 + dw $0006, $0400, $0000 + dw $0001, $0500, $0100 + dw $0001, $0500, $0000 + dw $001A, $0100, $0000 + dw $0001, $4100, $4000 + dw $0002, $4100, $0000 + dw $0001, $4900, $0800 + dw $0003, $4800, $0000 + dw $0003, $0800, $0000 + dw $0005, $0000, $0000 + dw $0001, $0040, $0040 + dw $0005, $0040, $0000 + dw $000F, $0000, $0000 + dw $0001, $0100, $0100 + dw $0003, $0100, $0000 + dw $0001, $8100, $8000 + dw $0018, $8100, $0000 + dw $8427 ; Delete +} ; crystalflash + +DemoInput_flyway: +{ + dw $003C, $0000, $0000 + dw $0001, $8100, $8100 + dw $001A, $8100, $0000 + dw $0001, $8200, $0200 + dw $000E, $8200, $0000 + dw $0001, $8100, $0100 + dw $004D, $8100, $0000 + dw $0001, $A100, $2000 + dw $0004, $A100, $0000 + dw $0002, $8100, $0000 + dw $0001, $8180, $0080 + dw $0004, $8180, $0000 + dw $0001, $81C0, $0040 + dw $0002, $81C0, $0000 + dw $0001, $8180, $0000 + dw $0006, $8100, $0000 + dw $0001, $8140, $0040 + dw $0002, $8140, $0000 + dw $0008, $8100, $0000 + dw $0001, $8140, $0040 + dw $0002, $8140, $0000 + dw $001A, $8100, $0000 + dw $0001, $8110, $0010 + dw $0001, $8110, $0000 + dw $0001, $8150, $0040 + dw $0002, $8150, $0000 + dw $0007, $8110, $0000 + dw $0001, $8150, $0040 + dw $0002, $8150, $0000 + dw $0003, $8110, $0000 + dw $0001, $8190, $0080 + dw $0002, $8190, $0000 + dw $000D, $8180, $0000 + dw $0009, $8100, $0000 + dw $8427 ; Delete +} ; flyway + +DemoInput_alcatraz: +{ + dw $002B, $0000, $0000 + dw $0001, $8000, $8000 + dw $0004, $8000, $0000 + dw $0001, $8100, $0100 + dw $0025, $8100, $0000 + dw $0003, $8000, $0000 + dw $0001, $8200, $0200 + dw $0024, $8200, $0000 + dw $0001, $8280, $0080 + dw $0004, $8280, $0000 + dw $0001, $8080, $0000 + dw $0001, $8180, $0100 + dw $0011, $8180, $0000 + dw $0001, $81A0, $0020 + dw $0001, $81A0, $0000 + dw $0003, $8120, $0000 + dw $0002, $0120, $0000 + dw $0001, $8120, $8000 + dw $0001, $8120, $0000 + dw $0001, $8100, $0000 + dw $0001, $8280, $0280 + dw $0012, $8280, $0000 + dw $0002, $8200, $0000 + dw $0001, $8220, $0020 + dw $0006, $8220, $0000 + dw $0006, $8200, $0000 + dw $0001, $8280, $0080 + dw $0013, $8280, $0000 + dw $0001, $8180, $0100 + dw $0001, $8180, $0000 + dw $0003, $0100, $0000 + dw $0001, $0180, $0080 + dw $000E, $0180, $0000 + dw $0001, $0080, $0000 + dw $0001, $0280, $0200 + dw $000A, $0280, $0000 + dw $0001, $0180, $0100 + dw $0001, $0180, $0000 + dw $0004, $0100, $0000 + dw $0001, $0180, $0080 + dw $000E, $0180, $0000 + dw $0001, $0280, $0200 + dw $0001, $0280, $0000 + dw $0002, $0200, $0000 + dw $0001, $0280, $0080 + dw $0002, $0280, $0000 + dw $0001, $4680, $4400 + dw $0004, $4480, $0000 + dw $0001, $4680, $0200 + dw $0006, $4680, $0000 + dw $0006, $0680, $0000 + dw $0006, $0600, $0000 + dw $0006, $0200, $0000 + dw $0001, $8200, $8000 + dw $0004, $8200, $0000 + dw $0001, $8A00, $0800 + dw $0003, $8800, $0000 + dw $0005, $0800, $0000 + dw $0006, $0000, $0000 + dw $8427 ; Delete +} ; alcatraz + +DemoInput_tunneljump: +{ + dw $0032, $0000, $0000 + dw $0001, $2000, $2000 + dw $0002, $2000, $0000 + dw $0002, $0000, $0000 + dw $0001, $2000, $2000 + dw $0002, $2000, $0000 + dw $0001, $0010, $0010 + dw $0006, $0010, $0000 + dw $0001, $0050, $0040 + dw $0002, $0050, $0000 + dw $0001, $8100, $8100 + dw $0032, $8100, $0000 + dw $0001, $8200, $0200 + dw $003B, $8200, $0000 + dw $0001, $8280, $0080 + dw $0003, $8280, $0000 + dw $0001, $8480, $0400 + dw $0002, $8400, $0000 + dw $0001, $8480, $0080 + dw $0003, $8080, $0000 + dw $0001, $8680, $0600 + dw $000A, $8680, $0000 + dw $001E, $8200, $0000 + dw $0001, $8280, $0080 + dw $0007, $8280, $0000 + dw $0001, $A280, $2000 + dw $0003, $A280, $0000 + dw $0019, $8280, $0000 + dw $0001, $8200, $0000 + dw $0001, $8A00, $0800 + dw $0002, $8A00, $0000 + dw $0001, $8220, $0020 + dw $0012, $8220, $0000 + dw $0003, $8020, $0000 + dw $8427 ; Delete +} ; tunneljump + +DemoInput_climb: +{ + dw $0009, $0000, $0000 + dw $0001, $8000, $8000 + dw $0001, $8000, $0000 + dw $0001, $8100, $0100 + dw $0026, $8100, $0000 + dw $0001, $8200, $0200 + dw $0002, $8200, $0000 + dw $0001, $8280, $0080 + dw $0003, $8280, $0000 + dw $0002, $8080, $0000 + dw $0001, $8180, $0100 + dw $000F, $8180, $0000 + dw $0001, $8280, $0200 + dw $0016, $8280, $0000 + dw $0001, $8800, $0800 + dw $0001, $8840, $0040 + dw $0002, $8840, $0000 + dw $0001, $8200, $0200 + dw $0005, $8200, $0000 + dw $0001, $8280, $0080 + dw $000E, $8280, $0000 + dw $0001, $82C0, $0040 + dw $000E, $82C0, $0000 + dw $0001, $84C0, $0400 + dw $0002, $8480, $0000 + dw $0001, $8200, $0200 + dw $0005, $8200, $0000 + dw $0001, $8280, $0080 + dw $0001, $8280, $0000 + dw $0001, $8180, $0100 + dw $000A, $8180, $0000 + dw $0001, $8120, $0020 + dw $0002, $8120, $0000 + dw $0003, $8100, $0000 + dw $0001, $8180, $0080 + dw $0003, $8180, $0000 + dw $0001, $8280, $0200 + dw $0011, $8280, $0000 + dw $0001, $82A0, $0020 + dw $0003, $82A0, $0000 + dw $0001, $8220, $0000 + dw $0002, $8200, $0000 + dw $0001, $8100, $0100 + dw $0001, $8180, $0080 + dw $0007, $8180, $0000 + dw $0001, $8280, $0200 + dw $0009, $8280, $0000 + dw $0001, $82C0, $0040 + dw $0003, $82C0, $0000 + dw $0001, $84C0, $0400 + dw $0005, $84C0, $0000 + dw $0001, $8200, $0200 + dw $0003, $8200, $0000 + dw $0001, $8280, $0080 + dw $0002, $8280, $0000 + dw $0001, $8180, $0100 + dw $0009, $8180, $0000 + dw $0001, $8120, $0020 + dw $0003, $8120, $0000 + dw $0001, $8180, $0080 + dw $0005, $8180, $0000 + dw $0001, $8280, $0200 + dw $0013, $8280, $0000 + dw $0001, $82A0, $0020 + dw $0004, $8220, $0000 + dw $0003, $8200, $0000 + dw $0001, $8280, $0080 + dw $000E, $8280, $0000 + dw $0001, $8180, $0100 + dw $0002, $8180, $0000 + dw $0001, $81C0, $0040 + dw $0005, $81C0, $0000 + dw $0001, $8580, $0400 + dw $0003, $8480, $0000 + dw $0001, $8100, $0100 + dw $0005, $8100, $0000 + dw $0001, $8180, $0080 + dw $000B, $8180, $0000 + dw $0001, $81A0, $0020 + dw $0004, $8120, $0000 + dw $0001, $8180, $0080 + dw $0005, $8180, $0000 + dw $0001, $8280, $0200 + dw $000F, $8280, $0000 + dw $0001, $8290, $0010 + dw $0003, $8290, $0000 + dw $0001, $8210, $0000 + dw $0001, $8250, $0040 + dw $0002, $8250, $0000 + dw $0003, $8200, $0000 + dw $0001, $8280, $0080 + dw $0010, $8280, $0000 + dw $0001, $8180, $0100 + dw $0001, $8280, $0200 + dw $0001, $8200, $0000 + dw $0001, $8280, $0080 + dw $0011, $8280, $0000 + dw $0001, $8200, $0000 + dw $0001, $8400, $0400 + dw $0002, $8400, $0000 + dw $0001, $8200, $0200 + dw $0005, $8200, $0000 + dw $0001, $8280, $0080 + dw $000C, $8280, $0000 + dw $0001, $8220, $0020 + dw $0002, $8220, $0000 + dw $0001, $8280, $0080 + dw $0004, $8280, $0000 + dw $0001, $8180, $0100 + dw $000F, $8180, $0000 + dw $0001, $81C0, $0040 + dw $0005, $81C0, $0000 + dw $0001, $8480, $0400 + dw $0001, $8480, $0000 + dw $0001, $8400, $0000 + dw $0001, $8100, $0100 + dw $0009, $8100, $0000 + dw $0001, $8180, $0080 + dw $0022, $8180, $0000 + dw $0001, $8120, $0020 + dw $0002, $8120, $0000 + dw $0002, $8100, $0000 + dw $0001, $8180, $0080 + dw $0003, $8180, $0000 + dw $0001, $8280, $0200 + dw $0007, $8280, $0000 + dw $0001, $82C0, $0040 + dw $0006, $82C0, $0000 + dw $0001, $84C0, $0400 + dw $0005, $8480, $0000 + dw $0001, $8200, $0200 + dw $0006, $8200, $0000 + dw $0001, $8280, $0080 + dw $0010, $8280, $0000 + dw $0001, $8180, $0100 + dw $000B, $8180, $0000 + dw $0001, $8140, $0040 + dw $0002, $8140, $0000 + dw $0002, $8100, $0000 + dw $0001, $8180, $0080 + dw $000C, $8180, $0000 + dw $0001, $8120, $0020 + dw $0004, $8120, $0000 + dw $0001, $8180, $0080 + dw $0007, $8180, $0000 + dw $0002, $8080, $0000 + dw $0001, $8280, $0200 + dw $000F, $8280, $0000 + dw $0001, $8200, $0000 + dw $0001, $8240, $0040 + dw $0004, $8240, $0000 + dw $0001, $8200, $0000 + dw $0001, $8280, $0080 + dw $000E, $8280, $0000 + dw $0001, $8180, $0100 + dw $000B, $8180, $0000 + dw $0001, $81A0, $0020 + dw $0001, $81A0, $0000 + dw $0003, $8120, $0000 + dw $0001, $8100, $0000 + dw $0001, $8180, $0080 + dw $0022, $8180, $0000 + dw $0001, $8140, $0040 + dw $0002, $8140, $0000 + dw $0001, $8180, $0080 + dw $0006, $8180, $0000 + dw $0001, $8280, $0200 + dw $0007, $8280, $0000 + dw $0001, $82C0, $0040 + dw $0004, $82C0, $0000 + dw $0001, $84C0, $0400 + dw $0004, $84C0, $0000 + dw $0001, $8200, $0200 + dw $0003, $8200, $0000 + dw $0001, $8280, $0080 + dw $0007, $8280, $0000 + dw $0001, $8880, $0800 + dw $0007, $8880, $0000 + dw $0001, $88C0, $0040 + dw $0009, $88C0, $0000 + dw $0001, $8480, $0400 + dw $000E, $8480, $0000 + dw $0001, $8200, $0200 + dw $0001, $8200, $0000 + dw $0001, $8220, $0020 + dw $0001, $8220, $0000 + dw $0008, $8020, $0000 + dw $8427 ; Delete +} ; climb + +DemoInput_ocean: +{ + dw $0016, $0000, $0000 + dw $0001, $8000, $8000 + dw $0015, $8000, $0000 + dw $0001, $8200, $0200 + dw $0021, $8200, $0000 + dw $0001, $8280, $0080 + dw $0012, $8280, $0000 + dw $000F, $8200, $0000 + dw $0058, $0200, $0000 + dw $0001, $8200, $8000 + dw $0068, $8200, $0000 + dw $0001, $8280, $0080 + dw $000B, $8280, $0000 + dw $0005, $8200, $0000 + dw $0001, $8280, $0080 + dw $001B, $8280, $0000 + dw $0001, $82C0, $0040 + dw $0002, $82C0, $0000 + dw $0001, $8240, $0000 + dw $0001, $8200, $0000 + dw $0002, $0200, $0000 + dw $0001, $0280, $0080 + dw $0001, $0280, $0000 + dw $0001, $8280, $8000 + dw $0004, $8280, $0000 + dw $0001, $8680, $0400 + dw $0002, $8680, $0000 + dw $0005, $8480, $0000 + dw $0004, $8080, $0000 + dw $0001, $8480, $0400 + dw $0001, $8480, $0000 + dw $0001, $8680, $0200 + dw $0001, $8680, $0000 + dw $0002, $8280, $0000 + dw $0008, $8200, $0000 + dw $0015, $0200, $0000 + dw $8427 ; Delete +} ; ocean + +DemoInput_pseudo: +{ + dw $000F, $0000, $0000 + dw $0001, $8000, $8000 + dw $0001, $8040, $0040 + dw $0029, $8040, $0000 + dw $0001, $8140, $0100 + dw $0039, $8140, $0000 + dw $0001, $81C0, $0080 + dw $001A, $81C0, $0000 + dw $0001, $85C0, $0400 + dw $0002, $84C0, $0000 + dw $0003, $8440, $0000 + dw $0001, $8540, $0100 + dw $0030, $8140, $0000 + dw $0001, $81C0, $0080 + dw $0004, $81C0, $0000 + dw $000E, $8180, $0000 + dw $003E, $0180, $0000 + dw $0001, $0080, $0000 + dw $0001, $0280, $0200 + dw $0003, $0200, $0000 + dw $0001, $0280, $0080 + dw $0002, $0280, $0000 + dw $0001, $0180, $0100 + dw $0003, $0180, $0000 + dw $0005, $0100, $0000 + dw $0001, $0120, $0020 + dw $0001, $0120, $0000 + dw $0001, $8120, $8000 + dw $0007, $8120, $0000 + dw $002C, $8100, $0000 + dw $0001, $8180, $0080 + dw $0006, $8180, $0000 + dw $0001, $8280, $0200 + dw $001A, $8280, $0000 + dw $0001, $8080, $0000 + dw $0001, $8180, $0100 + dw $001A, $8180, $0000 + dw $0001, $8580, $0400 + dw $0001, $8580, $0000 + dw $0002, $8480, $0000 + dw $0001, $8580, $0100 + dw $0002, $8500, $0000 + dw $000A, $8100, $0000 + dw $0001, $8180, $0080 + dw $0004, $8180, $0000 + dw $0002, $8100, $0000 + dw $0001, $8140, $0040 + dw $0004, $8140, $0000 + dw $0009, $8100, $0000 + dw $0007, $8000, $0000 + dw $0001, $8100, $0100 + dw $0010, $8100, $0000 + dw $8427 ; Delete +} ; pseudo + +DemoInput_everest: +{ + dw $0028, $0000, $0000 + dw $0001, $8000, $8000 + dw $000B, $8000, $0000 + dw $0001, $8100, $0100 + dw $003B, $8100, $0000 + dw $0001, $8180, $0080 + dw $0019, $8180, $0000 + dw $0001, $8580, $0400 + dw $0001, $8580, $0000 + dw $0001, $8480, $0000 + dw $0004, $8400, $0000 + dw $0001, $8500, $0100 + dw $0001, $8500, $0000 + dw $0032, $8100, $0000 + dw $0001, $8180, $0080 + dw $0018, $8180, $0000 + dw $0003, $8100, $0000 + dw $0001, $0100, $0000 + dw $0001, $8000, $8000 + dw $0002, $8000, $0000 + dw $0001, $8080, $0080 + dw $0014, $8080, $0000 + dw $0002, $8000, $0000 + dw $0003, $0000, $0000 + dw $0001, $8000, $8000 + dw $0002, $8000, $0000 + dw $0001, $8080, $0080 + dw $0015, $8080, $0000 + dw $0003, $8000, $0000 + dw $0002, $0000, $0000 + dw $0001, $8000, $8000 + dw $0002, $8000, $0000 + dw $0001, $8080, $0080 + dw $0003, $8080, $0000 + dw $0001, $8090, $0010 + dw $000E, $8090, $0000 + dw $0001, $80D0, $0040 + dw $0001, $C0D0, $4000 + dw $0004, $C0D0, $0000 + dw $0001, $80D0, $0000 + dw $000F, $8090, $0000 + dw $0001, $8490, $0400 + dw $0011, $8490, $0000 + dw $0001, $8480, $0000 + dw $8427 ; Delete +} ; everest + +DemoInput_alphapb: +{ + dw $0018, $0000, $0000 + dw $0001, $8000, $8000 + dw $000C, $8000, $0000 + dw $0001, $8100, $0100 + dw $0020, $8100, $0000 + dw $0001, $8000, $0000 + dw $0001, $8200, $0200 + dw $0016, $8200, $0000 + dw $0001, $8280, $0080 + dw $0023, $8280, $0000 + dw $0001, $8180, $0100 + dw $0005, $8180, $0000 + dw $0001, $8280, $0200 + dw $0031, $8280, $0000 + dw $0023, $8200, $0000 + dw $0002, $8000, $0000 + dw $0001, $8100, $0100 + dw $001B, $8100, $0000 + dw $0001, $8180, $0080 + dw $0006, $8180, $0000 + dw $0001, $8580, $0400 + dw $0001, $85C0, $0040 + dw $0001, $C5C0, $4000 + dw $0005, $C4C0, $0000 + dw $001F, $8480, $0000 + dw $0001, $8680, $0200 + dw $0006, $8280, $0000 + dw $0001, $8480, $0400 + dw $0001, $8480, $0000 + dw $0001, $8180, $0100 + dw $0022, $8180, $0000 + dw $0006, $0180, $0000 + dw $0001, $8100, $8000 + dw $0003, $8100, $0000 + dw $8427 ; Delete +} ; alphapb +endif +print pc, " demos end" diff --git a/src/layout.asm b/src/layout.asm index d552c4d23..69117d9a6 100644 --- a/src/layout.asm +++ b/src/layout.asm @@ -1517,11 +1517,7 @@ layout_prepare_gravity_animation: LDA #$49 : STA $0DF1 JMP layout_gravity_animation -if !FEATURE_PAL -warnpc $91EC35 -else -warnpc $91ECD0 -endif +%warnpc($91ECD0, $91EC35) org $94937D diff --git a/src/macros.asm b/src/macros.asm index 9b63e1ad6..ccd90dd22 100644 --- a/src/macros.asm +++ b/src/macros.asm @@ -55,6 +55,14 @@ macro setupRGB(addr) RTS endmacro +macro warnpc(NTSC, PAL) +if !FEATURE_PAL +warnpc +else +warnpc +endif +endmacro + ; ------------- ; Sound Effects diff --git a/src/main.asm b/src/main.asm index 97f41187c..a89976609 100644 --- a/src/main.asm +++ b/src/main.asm @@ -43,6 +43,7 @@ incsrc minimap.asm incsrc menu.asm incsrc roomnames.asm incsrc clearenemies.asm +incsrc demos.asm incsrc infohud.asm incsrc rng.asm incsrc custompresets.asm diff --git a/src/rng.asm b/src/rng.asm index d35da66bb..fb33491ea 100644 --- a/src/rng.asm +++ b/src/rng.asm @@ -164,11 +164,7 @@ endif LDA !CACHED_RANDOM_NUMBER : AND #$0007 kraid_wait_load_delay: ASL : TAX : LDA.w KraidWaitTable,X -if !FEATURE_PAL -warnpc $A7AE34 -else -warnpc $A7AE1E -endif +%warnpc($A7AE1E, $A7AE34) if !FEATURE_PAL org $A7B381 From 473a54a640cdadafbb2ed342d3a35cae1a02aecf Mon Sep 17 00:00:00 2001 From: Jonathan Keller <19418817+NobodyNada@users.noreply.github.com> Date: Tue, 27 Feb 2024 13:27:09 -0800 Subject: [PATCH 06/18] add "tools/asar" to gitignore on non-Windows platforms, this isn't caught by tools/*.exe --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index a6351deb0..1985ae963 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ *.sw[op] build/ tools/*.exe +tools/asar .vscode/launch.json .vscode/tasks.json /names/custom_names.txt From 62ba8dce8faa887af8dfb79c17aa82a8cf7738b2 Mon Sep 17 00:00:00 2001 From: Jonathan Keller <19418817+NobodyNada@users.noreply.github.com> Date: Tue, 27 Feb 2024 13:29:40 -0800 Subject: [PATCH 07/18] Add boot-to-menu functionality Add an option to boot directly to the InfoHUD menu instead of the Nintendo splash. The sound engine is also loaded asynchronously in the menu, elimiating the delay for it to initialize. This reduces the time from power-on to practice menu to about half a second. The option is under the Cutscenes menu. --- src/cutscenes.asm | 24 ++++++ src/defines.asm | 5 +- src/init.asm | 15 ++++ src/mainmenu.asm | 6 +- src/menu.asm | 190 ++++++++++++++++++++++++++++++++++++++++++++-- src/symbols.asm | 2 + 6 files changed, 233 insertions(+), 9 deletions(-) diff --git a/src/cutscenes.asm b/src/cutscenes.asm index 684c5c6cc..dd753c45f 100644 --- a/src/cutscenes.asm +++ b/src/cutscenes.asm @@ -6,6 +6,14 @@ org $8BB240 endif JSR cutscenes_load_ceres_arrival +if !FEATURE_PAL +org $8B9287 +else +org $8B92DE +endif + JSR cutscenes_quickboot_hijack + NOP + if !FEATURE_PAL org $8B92B5 else @@ -108,6 +116,22 @@ endif org $8BF800 print pc, " cutscenes start" +cutscenes_quickboot_hijack: +{ + JSL $80834B ; hijacked code + + LDA !sram_cutscenes : AND !CUTSCENE_QUICKBOOT : BNE .quickboot + RTS + +.quickboot + PLA ; pop return address + PLB + PLA ; saved processor status and 1 byte of next return address + PLA ; remainder of next return address + + JML $808482 ; finish boot code; another hijack will launch the menu +} + cutscenes_nintendo_splash: { LDX #$0078 diff --git a/src/defines.asm b/src/defines.asm index e1925740a..05160f0cf 100644 --- a/src/defines.asm +++ b/src/defines.asm @@ -93,7 +93,9 @@ !ram_lag_counter = !WRAM_START+$7E !ram_kraid_adjust_timer = !WRAM_START+$80 -!WRAM_PERSIST_START = !ram_kraid_adjust_timer+$02 +!ram_quickboot_spc_state = !WRAM_START+$82 + +!WRAM_PERSIST_START = !ram_quickboot_spc_state+$02 ; ---------------------------------------------------------- ; Variables below this point are PERSISTENT -- they maintain ; their value across savestates. Use this section for @@ -709,6 +711,7 @@ endif !CUTSCENE_SKIP_GAMEOVER = #$1000 !CUTSCENE_FAST_BOWLING = #$2000 !CUTSCENE_KRAID_DEATH_CAMERA = #$4000 +!CUTSCENE_QUICKBOOT = #$8000 !SUPPRESS_CRATERIA_LIGHTNING = #$0001 !SUPPRESS_ESCAPE_FLASHING = #$0002 diff --git a/src/init.asm b/src/init.asm index 847b907d0..21290a167 100644 --- a/src/init.asm +++ b/src/init.asm @@ -24,6 +24,9 @@ warnpc $8084AF org $8084AF .end_clear_bank +org $80856E + JML init_post_boot + org $81F000 print pc, " init start" @@ -243,5 +246,17 @@ init_controller_bindings: RTL } +init_post_boot: +{ + ; Is quickboot enabled? + LDA !sram_cutscenes : AND !CUTSCENE_QUICKBOOT : BEQ .done + + ; Boot to the infohud menu + JML cm_boot + + .done + JML $82893D ; hijacked code: start main game loop +} + print pc, " init end" warnpc $81FF00 ; Special thanks diff --git a/src/mainmenu.asm b/src/mainmenu.asm index 341732914..d18c1b992 100644 --- a/src/mainmenu.asm +++ b/src/mainmenu.asm @@ -2934,6 +2934,7 @@ game_debugfixscrolloffsets: ; --------------- CutscenesMenu: + dw #cutscenes_quickboot dw #cutscenes_skip_splash dw #cutscenes_skip_intro dw #cutscenes_skip_ceres_arrival @@ -2955,8 +2956,11 @@ CutscenesMenu: dw #$0000 %cm_header("CUTSCENES AND EFFECTS") +cutscenes_quickboot: + %cm_toggle_bit("Boot to Menu", !sram_cutscenes, !CUTSCENE_QUICKBOOT, #0) + cutscenes_skip_splash: - %cm_toggle_bit("Fast Nintendo splash", !sram_cutscenes, !CUTSCENE_SKIP_SPLASH, #0) + %cm_toggle_bit("Fast Nintendo Splash", !sram_cutscenes, !CUTSCENE_SKIP_SPLASH, #0) cutscenes_skip_intro: %cm_toggle_bit("Skip Intro", !sram_cutscenes, !CUTSCENE_SKIP_INTRO, #0) diff --git a/src/menu.asm b/src/menu.asm index c390d1caa..b0fe7e6af 100644 --- a/src/menu.asm +++ b/src/menu.asm @@ -2,10 +2,6 @@ org $85FD00 print pc, " menu bank85 start" -wait_for_lag_frame_long: - JSR $8136 - RTL - initialize_ppu_long: PHP : %a16() LDA $7E33EA : STA !ram_cgram_cache+$2E @@ -41,6 +37,8 @@ cm_start: PHB : PHX : PHY PHK : PLB + LDA #$0000 : STA !ram_quickboot_spc_state + ; Ensure sound is enabled when menu is open LDA !DISABLE_SOUNDS : PHA STZ !DISABLE_SOUNDS @@ -94,6 +92,36 @@ cm_start: RTL } +cm_boot: +{ + PHK : PLB + LDA #cm_spc_init : STA !ram_quickboot_spc_state + + %a8() + LDA #$5A : STA $2109 ; BG3 tilemap base address + LDA #$04 : STA $212C ; Enable BG3; disable all else + %a16() + JSR cm_init + JSL cm_draw + JSR cm_loop + + .spc_loop + JSR cm_wait_for_lag_frame + LDA !ram_quickboot_spc_state : BNE .spc_loop + + .done + LDA !ram_custom_preset : BNE .preset_load + LDA !ram_load_preset : BEQ .main_game_loop + + .preset_load + JSL preset_load + + .main_game_loop + PEA $8282 : PLB : PLB + %a8() + JML $828944 +} + cm_init: { ; Setup registers @@ -134,6 +162,28 @@ cm_set_etanks_and_reserve: RTL } +cm_wait_for_lag_frame: +{ + PHP : %ai16() + LDA !ram_quickboot_spc_state : TAX + + LDA $05B8 ; lag frame counter + ; (it's only 8 bits, but it's OK if we mix it up with the variable after) + .loop + CMP $05B8 + BNE .done + + CPX #$0000 : BEQ .loop + PHA : PHP : PHB : JSR cm_jump_x : PLB : PLP + LDA !ram_quickboot_spc_state : TAX : PLA + BRA .loop + + .done + PLP : RTS +} + +cm_jump_x: + DEX : PHX : RTS ; ---------- ; Drawing @@ -507,7 +557,7 @@ cm_tilemap_menu: cm_tilemap_transfer: { - JSL wait_for_lag_frame_long ; Wait for lag frame + JSR cm_wait_for_lag_frame ; Wait for lag frame %a16() LDA #$5800 : STA $2116 ; VRAM addr @@ -1560,7 +1610,7 @@ menu_ctrl_clear_input_display: cm_loop: { %ai16() - JSL wait_for_lag_frame_long + JSR cm_wait_for_lag_frame JSL $808F0C ; Music queue JSL $8289EF ; Sound fx queue JSL MenuRNG @@ -2021,7 +2071,7 @@ kb_main_loop: RTL .new_input - JSL wait_for_lag_frame_long + JSR cm_wait_for_lag_frame JSL $808F0C ; Music queue JSL $8289EF ; Sound fx queue JSR kb_handle_inputs @@ -3461,6 +3511,132 @@ MenuRNG2: RTL } +!cm_spc_db = $30 +!cm_spc_data = $31 +!cm_spc_index = $33 +!cm_spc_len = $34 + +cm_spc_init: { + ; wait for SPC to be ready + LDA #$BBAA : CMP $2140 : BNE .return + + %a8() + LDA #$CC + STA !cm_spc_index + + %a16() + LDA #$CFCF + STA !cm_spc_db + LDA #$8000 + STA !cm_spc_data + + LDA #cm_spc_next_block + STA !ram_quickboot_spc_state + +.return +RTS +} + +cm_spc_next_block: { + %a8() + PHB : LDA !cm_spc_db : PHA : PLB + LDY !cm_spc_data + + ; Get block size + LDA #$01 + LDX $0000, y + BNE .not_last : LDA #$00 + .not_last + INY : BNE + : JSR cm_spc_inc_bank + + INY : BNE + : JSR cm_spc_inc_bank + + STX !cm_spc_len + + ; Get block address + LDX $0000, y + INY : BNE + : JSR cm_spc_inc_bank + + INY : BNE + : JSR cm_spc_inc_bank + + PLB : STX $2142 + + STA $2141 + + %a16() + LDA #cm_spc_next_block_wait + STA !ram_quickboot_spc_state + + RTS +} + +cm_spc_inc_bank: { + PHA : LDA !cm_spc_db : INC A : STA !cm_spc_db + PHA : PLB : PLA + LDY #$8000 + RTS +} + +cm_spc_next_block_wait: { + %a8() + LDA !cm_spc_index : STA $2140 : CMP $2140 : BNE .return + + STZ !cm_spc_index + %a16() + LDA !cm_spc_len : BEQ .eof + LDA #cm_spc_transfer + STA !ram_quickboot_spc_state + STY !cm_spc_data + RTS + + .eof + LDA #$0000 + STA !ram_quickboot_spc_state + + .return + RTS +} + +cm_spc_transfer: { + ; Determine how many bytes to transfer + LDA !cm_spc_len : TAX + SBC #$0040 : BCC .last + LDX #$0040 : STA !cm_spc_len + BRA .setup + .last + STZ !cm_spc_len + + .setup + %a8() + PHB : LDA !cm_spc_db : PHA : PLB + LDY !cm_spc_data + + LDA !cm_spc_index + + %a8() + .transfer_loop + XBA : LDA $0000, y : XBA + + %a16() : STA $002140 : %a8() + + .wait_loop + CMP $002140 : BNE .wait_loop + + INC A + INY : BNE + : JSR cm_spc_inc_bank + + + DEX : BNE .transfer_loop + + LDX !cm_spc_len : BNE .timeout + ; Done with the transfer! + CLC : ADC #$03 : STA !cm_spc_index : STY !cm_spc_data + %a16() : LDA #cm_spc_next_block : STA !ram_quickboot_spc_state + + PLB + RTS + + .timeout + STA !cm_spc_index : STY !cm_spc_data + + PLB + RTS +} ; ---------- ; Resources diff --git a/src/symbols.asm b/src/symbols.asm index 61c05c723..3fca29622 100644 --- a/src/symbols.asm +++ b/src/symbols.asm @@ -94,6 +94,8 @@ ram_auto_save_state = !ram_auto_save_state ; !WRAM_START+$7C ram_lag_counter = !ram_lag_counter ; !WRAM_START+$7E ram_kraid_adjust_timer = !ram_kraid_adjust_timer ; !WRAM_START+$80 +ram_quickboot_spc_state = !ram_quickboot_spc_state ; !WRAM_START+$82 + ; ---------------------------------------------------------- ; Variables below this point are PERSISTENT -- they maintain ; their value across savestates. Use this section for From 91dc62b9ab4f96f1ad236c5acf8bb2ddb9ee36c4 Mon Sep 17 00:00:00 2001 From: Jonathan Keller <19418817+NobodyNada@users.noreply.github.com> Date: Tue, 27 Feb 2024 13:38:48 -0800 Subject: [PATCH 08/18] Use last selected save file to determine initial controller bindings --- src/init.asm | 40 ++++++++++++++-------------------------- src/mainmenu.asm | 1 - src/presets.asm | 1 - 3 files changed, 14 insertions(+), 28 deletions(-) diff --git a/src/init.asm b/src/init.asm index 21290a167..ab8ff6e81 100644 --- a/src/init.asm +++ b/src/init.asm @@ -220,34 +220,22 @@ init_menu_customization: RTL } -init_controller_bindings: -{ - ; check if any non-dpad bindings are set - LDX #$000A - LDA.w !IH_INPUT_SHOT+$0C - .loopBindings - ORA.w !IH_INPUT_SHOT,X - DEX #2 : BPL .loopBindings - AND #$FFF0 : BNE .done - - ; load default dpad bindings - LDA #$0800 : STA.w !INPUT_BIND_UP - LSR : STA.w !INPUT_BIND_DOWN - LSR : STA.w !INPUT_BIND_LEFT - LSR : STA.w !INPUT_BIND_RIGHT - - ; load default non-dpad bindings - LDX #$000C - .loopTable - LDA.l ControllerLayoutTable,X : STA.w !IH_INPUT_SHOT,X - DEX #2 : BPL .loopTable - - .done - RTL -} - init_post_boot: { + ; Load the last selected file slot (so that the user's controller + ; bindings will apply if they load a preset without loading a save file) + LDA $701FEC ; Selected save slot + STA !CURRENT_SAVE_FILE + CMP #$0003 : BCC .valid_index + LDA #$0000 + .valid_index + JSL $818085 ; Load save file + BCC .check_quickboot + + ; No valid save; load a new file (for default controller bindings) + JSR $B2CB + + .check_quickboot ; Is quickboot enabled? LDA !sram_cutscenes : AND !CUTSCENE_QUICKBOOT : BEQ .done diff --git a/src/mainmenu.asm b/src/mainmenu.asm index d18c1b992..c5fb7e267 100644 --- a/src/mainmenu.asm +++ b/src/mainmenu.asm @@ -1817,7 +1817,6 @@ action_teleport: STZ $0E18 ; Set elevator to inactive STZ $1C1F ; Clear message box index - JSL init_controller_bindings LDA !SAMUS_HP_MAX : BNE .branch LDA #$001F : STA !SAMUS_HP diff --git a/src/presets.asm b/src/presets.asm index ee54dd523..411206069 100644 --- a/src/presets.asm +++ b/src/presets.asm @@ -571,7 +571,6 @@ endif TDC : STA !ram_transition_flag JSL init_heat_damage_ram JSL init_physics_ram - JSL init_controller_bindings LDA #$E737 : STA $099C ; Pointer to next frame's room transition code = $82:E737 From 85e410bff619ce66b4b3fba9a290346503cbcea6 Mon Sep 17 00:00:00 2001 From: Jonathan Keller <19418817+NobodyNada@users.noreply.github.com> Date: Thu, 29 Feb 2024 11:15:53 -0800 Subject: [PATCH 09/18] Disable sounds while SPC is booting ...to prevent conflicting SPC register writes. I don't think this could cause any problems, but it's best to be safe. --- src/menu.asm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/menu.asm b/src/menu.asm index b0fe7e6af..b09beec9d 100644 --- a/src/menu.asm +++ b/src/menu.asm @@ -97,6 +97,9 @@ cm_boot: PHK : PLB LDA #cm_spc_init : STA !ram_quickboot_spc_state + ; Disable sounds until we boot the SPC + LDA #$0001 : STA !DISABLE_SOUNDS + %a8() LDA #$5A : STA $2109 ; BG3 tilemap base address LDA #$04 : STA $212C ; Enable BG3; disable all else @@ -3586,8 +3589,8 @@ cm_spc_next_block_wait: { RTS .eof - LDA #$0000 - STA !ram_quickboot_spc_state + LDA #$0000 : STA !ram_quickboot_spc_state + STZ !DISABLE_SOUNDS .return RTS From 9bb720f5709ce5f6300c8a42bf73f311bf843384 Mon Sep 17 00:00:00 2001 From: Jonathan Keller <19418817+NobodyNada@users.noreply.github.com> Date: Sat, 2 Mar 2024 00:22:28 -0800 Subject: [PATCH 10/18] remove "Skip Nintendo Splash" option --- src/cutscenes.asm | 20 -------------------- src/defines.asm | 2 +- src/mainmenu.asm | 4 ---- 3 files changed, 1 insertion(+), 25 deletions(-) diff --git a/src/cutscenes.asm b/src/cutscenes.asm index dd753c45f..b5286143e 100644 --- a/src/cutscenes.asm +++ b/src/cutscenes.asm @@ -14,14 +14,6 @@ endif JSR cutscenes_quickboot_hijack NOP -if !FEATURE_PAL -org $8B92B5 -else -org $8B930C -endif - JSL cutscenes_nintendo_splash - NOP : NOP - org $80AE5C JSR cutscenes_door_transition @@ -132,18 +124,6 @@ cutscenes_quickboot_hijack: JML $808482 ; finish boot code; another hijack will launch the menu } -cutscenes_nintendo_splash: -{ - LDX #$0078 - LDA !sram_cutscenes - AND !CUTSCENE_SKIP_SPLASH - BEQ .done - LDX #$0001 - .done - STX $0DE2 - RTL -} - cutscenes_add_elevator_speed: { LDA !sram_fast_elevators : BEQ .slow diff --git a/src/defines.asm b/src/defines.asm index 05160f0cf..46c727249 100644 --- a/src/defines.asm +++ b/src/defines.asm @@ -708,10 +708,10 @@ endif !CUTSCENE_FAST_PHANTOON = #$0200 !CUTSCENE_FAST_KRAID = #$0400 !CUTSCENE_SKIP_SPLASH = #$0800 +!CUTSCENE_QUICKBOOT = #$0800 !CUTSCENE_SKIP_GAMEOVER = #$1000 !CUTSCENE_FAST_BOWLING = #$2000 !CUTSCENE_KRAID_DEATH_CAMERA = #$4000 -!CUTSCENE_QUICKBOOT = #$8000 !SUPPRESS_CRATERIA_LIGHTNING = #$0001 !SUPPRESS_ESCAPE_FLASHING = #$0002 diff --git a/src/mainmenu.asm b/src/mainmenu.asm index c5fb7e267..288216513 100644 --- a/src/mainmenu.asm +++ b/src/mainmenu.asm @@ -2934,7 +2934,6 @@ game_debugfixscrolloffsets: CutscenesMenu: dw #cutscenes_quickboot - dw #cutscenes_skip_splash dw #cutscenes_skip_intro dw #cutscenes_skip_ceres_arrival dw #cutscenes_skip_g4 @@ -2958,9 +2957,6 @@ CutscenesMenu: cutscenes_quickboot: %cm_toggle_bit("Boot to Menu", !sram_cutscenes, !CUTSCENE_QUICKBOOT, #0) -cutscenes_skip_splash: - %cm_toggle_bit("Fast Nintendo Splash", !sram_cutscenes, !CUTSCENE_SKIP_SPLASH, #0) - cutscenes_skip_intro: %cm_toggle_bit("Skip Intro", !sram_cutscenes, !CUTSCENE_SKIP_INTRO, #0) From 0b4dfc5af7089540d098ea8d577513a40e861805 Mon Sep 17 00:00:00 2001 From: Jonathan Keller <19418817+NobodyNada@users.noreply.github.com> Date: Sat, 2 Mar 2024 00:25:23 -0800 Subject: [PATCH 11/18] enable quickboot by default for dev builds --- src/init.asm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/init.asm b/src/init.asm index ab8ff6e81..85227f4b7 100644 --- a/src/init.asm +++ b/src/init.asm @@ -97,7 +97,12 @@ init_sram: TDC : STA !sram_top_display_mode STA !sram_room_layout INC : STA !sram_healthalarm - LDA #$0003 : STA !sram_cutscenes + +if !FEATURE_DEV + LDA !CUTSCENE_QUICKBOOT : STA !sram_cutscenes +else + LDA !CUTSCENE_QUICKBOOT|$0003 : STA !sram_cutscenes +endif .sram_upgrade_CtoD TDC : STA !sram_preset_options From cc14280bdbe86256d884cadda665dc471a5a2b0e Mon Sep 17 00:00:00 2001 From: Jonathan Keller <19418817+NobodyNada@users.noreply.github.com> Date: Sat, 2 Mar 2024 22:43:57 -0800 Subject: [PATCH 12/18] fix broken logic this is what i get for committing at 1am --- src/init.asm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/init.asm b/src/init.asm index 85227f4b7..a271a7d95 100644 --- a/src/init.asm +++ b/src/init.asm @@ -99,9 +99,9 @@ init_sram: INC : STA !sram_healthalarm if !FEATURE_DEV - LDA !CUTSCENE_QUICKBOOT : STA !sram_cutscenes -else LDA !CUTSCENE_QUICKBOOT|$0003 : STA !sram_cutscenes +else + LDA #$0003 : STA !sram_cutscenes endif .sram_upgrade_CtoD From af2d7234d8581f6120cde8d89671efd1147d66b3 Mon Sep 17 00:00:00 2001 From: Jonathan Keller <19418817+NobodyNada@users.noreply.github.com> Date: Mon, 4 Mar 2024 01:35:07 -0800 Subject: [PATCH 13/18] Don't try to load SPC again after a soft reset --- src/cutscenes.asm | 7 +++++-- src/defines.asm | 9 ++++++--- src/init.asm | 7 +++++-- src/menu.asm | 9 +++++++-- src/symbols.asm | 4 ++-- 5 files changed, 25 insertions(+), 11 deletions(-) diff --git a/src/cutscenes.asm b/src/cutscenes.asm index b5286143e..bcc0ba3ec 100644 --- a/src/cutscenes.asm +++ b/src/cutscenes.asm @@ -11,7 +11,7 @@ org $8B9287 else org $8B92DE endif - JSR cutscenes_quickboot_hijack + JSR cutscenes_nintendo_logo_hijack NOP @@ -108,11 +108,12 @@ endif org $8BF800 print pc, " cutscenes start" -cutscenes_quickboot_hijack: +cutscenes_nintendo_logo_hijack: { JSL $80834B ; hijacked code LDA !sram_cutscenes : AND !CUTSCENE_QUICKBOOT : BNE .quickboot + STA !ram_quickboot_spc_state ; A is 0 RTS .quickboot @@ -121,6 +122,8 @@ cutscenes_quickboot_hijack: PLA ; saved processor status and 1 byte of next return address PLA ; remainder of next return address + LDA #$0001 : STA !ram_quickboot_spc_state + JML $808482 ; finish boot code; another hijack will launch the menu } diff --git a/src/defines.asm b/src/defines.asm index 46c727249..2c05c7c38 100644 --- a/src/defines.asm +++ b/src/defines.asm @@ -93,9 +93,7 @@ !ram_lag_counter = !WRAM_START+$7E !ram_kraid_adjust_timer = !WRAM_START+$80 -!ram_quickboot_spc_state = !WRAM_START+$82 - -!WRAM_PERSIST_START = !ram_quickboot_spc_state+$02 +!WRAM_PERSIST_START = !ram_kraid_adjust_timer+$02 ; ---------------------------------------------------------- ; Variables below this point are PERSISTENT -- they maintain ; their value across savestates. Use this section for @@ -159,6 +157,11 @@ !ram_itempickups_hidden = !WRAM_PERSIST_START+$62 !ram_frames_held = !WRAM_PERSIST_START+$64 +!ram_quickboot_spc_state = !WRAM_PERSIST_START+$66 + ; 0: SPC load completed/not requested + ; 1: SPC load requested + ; ROM address: routine to perform next initialization step + ; ^ FREE SPACE ^ up to +$7A (!WRAM_START+$FC - !WRAM_PERSIST_START) ; ----------------------- diff --git a/src/init.asm b/src/init.asm index a271a7d95..e6eece9c7 100644 --- a/src/init.asm +++ b/src/init.asm @@ -6,7 +6,8 @@ org $808455 ; hijack when clearing bank 7E org $808490 - PHA + ; Save quickboot state since it needs to distinguish between a soft and hard reset + LDY.w !ram_quickboot_spc_state LDX #$3FFE .clear_bank_loop STZ $0000,X @@ -16,9 +17,11 @@ org $808490 DEX : DEX BPL .clear_bank_loop JSL init_nonzero_wram - PLA + + STY.w !ram_quickboot_spc_state BRA .end_clear_bank + warnpc $8084AF org $8084AF diff --git a/src/menu.asm b/src/menu.asm index b09beec9d..27a93b759 100644 --- a/src/menu.asm +++ b/src/menu.asm @@ -95,10 +95,12 @@ cm_start: cm_boot: { PHK : PLB + LDA !ram_quickboot_spc_state : BEQ .skip_spc LDA #cm_spc_init : STA !ram_quickboot_spc_state ; Disable sounds until we boot the SPC LDA #$0001 : STA !DISABLE_SOUNDS +.skip_spc %a8() LDA #$5A : STA $2109 ; BG3 tilemap base address @@ -110,7 +112,7 @@ cm_boot: .spc_loop JSR cm_wait_for_lag_frame - LDA !ram_quickboot_spc_state : BNE .spc_loop + LDA !ram_quickboot_spc_state : BMI .spc_loop .done LDA !ram_custom_preset : BNE .preset_load @@ -176,7 +178,7 @@ cm_wait_for_lag_frame: CMP $05B8 BNE .done - CPX #$0000 : BEQ .loop + CPX #$0000 : BPL .loop PHA : PHP : PHB : JSR cm_jump_x : PLB : PLP LDA !ram_quickboot_spc_state : TAX : PLA BRA .loop @@ -3523,6 +3525,8 @@ cm_spc_init: { ; wait for SPC to be ready LDA #$BBAA : CMP $2140 : BNE .return + LDA #$FFFF : STA $0617 ; disable soft rest + %a8() LDA #$CC STA !cm_spc_index @@ -3591,6 +3595,7 @@ cm_spc_next_block_wait: { .eof LDA #$0000 : STA !ram_quickboot_spc_state STZ !DISABLE_SOUNDS + STZ $0617 .return RTS diff --git a/src/symbols.asm b/src/symbols.asm index 3fca29622..aedfcdb8b 100644 --- a/src/symbols.asm +++ b/src/symbols.asm @@ -94,8 +94,6 @@ ram_auto_save_state = !ram_auto_save_state ; !WRAM_START+$7C ram_lag_counter = !ram_lag_counter ; !WRAM_START+$7E ram_kraid_adjust_timer = !ram_kraid_adjust_timer ; !WRAM_START+$80 -ram_quickboot_spc_state = !ram_quickboot_spc_state ; !WRAM_START+$82 - ; ---------------------------------------------------------- ; Variables below this point are PERSISTENT -- they maintain ; their value across savestates. Use this section for @@ -159,6 +157,8 @@ ram_itempickups_chozo = !ram_itempickups_chozo ; !WRAM_PERSIST_START+$60 ram_itempickups_hidden = !ram_itempickups_hidden ; !WRAM_PERSIST_START+$62 ram_frames_held = !ram_frames_held ; !WRAM_PERSIST_START+$64 +ram_quickboot_spc_state = !ram_quickboot_spc_state ; !WRAM_PERSIST_START+$66 + ; ^ FREE SPACE ^ up to +$7A (!WRAM_START+$FC - !WRAM_PERSIST_START) ; ----------------------- From 92d8185cb80b399f7b1e73421b13b9b003bd6825 Mon Sep 17 00:00:00 2001 From: Jonathan Keller <19418817+NobodyNada@users.noreply.github.com> Date: Sat, 2 Mar 2024 22:46:12 -0800 Subject: [PATCH 14/18] Use correct VRAM transfer mode for savestates We set the high bit of $2115 to 0, which instructs the PPU to increment the VRAM word address after writing the low data byte. However, the DMA transfer writes low bytes first, then high bytes. This means the high byte of the first word of a transfer was being skipped, leading to an occasional glitchy tile. Setting the mode bit to 1 instead fixes the issue. --- src/save.asm | 8 ++++---- src/tinystates.asm | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/save.asm b/src/save.asm index c55077f5e..007b59910 100644 --- a/src/save.asm +++ b/src/save.asm @@ -234,17 +234,17 @@ save_write_table: dw $1000|$420B, $02 ; Trigger DMA on channel 1 ; Address pair, B bus -> A bus. B address = VRAM read ($2139). dw $0000|$4310, $3981 ; direction = B->A, word reg, B addr = $2139 - dw $1000|$2115, $0000 ; VRAM address increment mode. + dw $1000|$2115, $0080 ; VRAM address increment mode. ; Copy VRAM 0000-7FFF to SRAM 750000-757FFF. dw $0000|$2116, $0000 ; VRAM address >> 1. - dw $9000|$2139, $0000 ; VRAM dummy read. + dw $9000|$213A, $0000 ; VRAM dummy read. dw $0000|$4312, $0000 ; A addr = $xx0000 dw $0000|$4314, $0075 ; A addr = $75xxxx, size = $xx00 dw $0000|$4316, $0080 ; size = $80xx ($0000), unused bank reg = $00. dw $1000|$420B, $02 ; Trigger DMA on channel 1 ; Copy VRAM 8000-7FFF to SRAM 760000-767FFF. dw $0000|$2116, $4000 ; VRAM address >> 1. - dw $9000|$2139, $0000 ; VRAM dummy read. + dw $9000|$213A, $0000 ; VRAM dummy read. dw $0000|$4312, $0000 ; A addr = $xx0000 dw $0000|$4314, $0076 ; A addr = $76xxxx, size = $xx00 dw $0000|$4316, $0080 ; size = $80xx ($0000), unused bank reg = $00. @@ -326,7 +326,7 @@ load_write_table: dw $1000|$420B, $02 ; Trigger DMA on channel 1 ; Address pair, A bus -> B bus. B address = VRAM write ($2118). dw $0000|$4310, $1801 ; direction = A->B, B addr = $2118 - dw $1000|$2115, $0000 ; VRAM address increment mode. + dw $1000|$2115, $0080 ; VRAM address increment mode. ; Copy SRAM 750000-757FFF to VRAM 0000-7FFF. dw $0000|$2116, $0000 ; VRAM address >> 1. dw $0000|$4312, $0000 ; A addr = $xx0000 diff --git a/src/tinystates.asm b/src/tinystates.asm index 5f23b4dee..ec854d28c 100644 --- a/src/tinystates.asm +++ b/src/tinystates.asm @@ -264,7 +264,7 @@ endmacro macro vram_to_sram(vram_addr, size, sram_addr) dw $0000|$2116, &$FFFF ; VRAM address >> 1. - dw $9000|$2139, $0000 ; VRAM dummy read. + dw $9000|$213A, $0000 ; VRAM dummy read. dw $0000|$4312, &$FFFF ; A addr = $xx0000 dw $0000|$4314, ((>>16)&$FF)|((&$FF)<<8) ; A addr = $75xxxx, size = $xx00 dw $0000|$4316, (>>8)&$FF ; size = $80xx ($0000), unused bank reg = $00. @@ -292,7 +292,7 @@ save_write_table: ; Address pair, B bus -> A bus. B address = VRAM read ($2139). dw $0000|$4310, $3981 ; direction = B->A, word reg, B addr = $2139 - dw $1000|$2115, $0000 ; VRAM address increment mode. + dw $1000|$2115, $0080 ; VRAM address increment mode. ; Copy VRAM segments %vram_to_sram($3E00, $400, $726C00) @@ -380,7 +380,7 @@ load_write_table: ; Address pair, A bus -> B bus. B address = VRAM write ($2118). dw $0000|$4310, $1801 ; direction = A->B, B addr = $2118 - dw $1000|$2115, $0000 ; VRAM address increment mode. + dw $1000|$2115, $0080 ; VRAM address increment mode. ; Copy VRAM segments, uses $724C00-$735000 %sram_to_vram($3E00, $400, $726C00) From 92145ed8297559ea9401e8cfc6de159a990cf12d Mon Sep 17 00:00:00 2001 From: idle Date: Wed, 6 Mar 2024 19:53:39 -0600 Subject: [PATCH 15/18] Name all labels --- src/menu.asm | 42 ++++++++++++++++++++++++++++-------------- 1 file changed, 28 insertions(+), 14 deletions(-) diff --git a/src/menu.asm b/src/menu.asm index 27a93b759..3a1b06328 100644 --- a/src/menu.asm +++ b/src/menu.asm @@ -3521,7 +3521,8 @@ MenuRNG2: !cm_spc_index = $33 !cm_spc_len = $34 -cm_spc_init: { +cm_spc_init: +{ ; wait for SPC to be ready LDA #$BBAA : CMP $2140 : BNE .return @@ -3541,10 +3542,11 @@ cm_spc_init: { STA !ram_quickboot_spc_state .return -RTS + RTS } -cm_spc_next_block: { +cm_spc_next_block: +{ %a8() PHB : LDA !cm_spc_db : PHA : PLB LDY !cm_spc_data @@ -3554,15 +3556,23 @@ cm_spc_next_block: { LDX $0000, y BNE .not_last : LDA #$00 .not_last - INY : BNE + : JSR cm_spc_inc_bank - + INY : BNE + : JSR cm_spc_inc_bank - + STX !cm_spc_len + INY : BNE .done_inc_bank_1 + JSR cm_spc_inc_bank + .done_inc_bank_1 + INY : BNE .done_inc_bank_2 + JSR cm_spc_inc_bank + .done_inc_bank_2 + STX !cm_spc_len ; Get block address LDX $0000, y - INY : BNE + : JSR cm_spc_inc_bank - + INY : BNE + : JSR cm_spc_inc_bank - + PLB : STX $2142 + INY : BNE .done_inc_bank_3 + JSR cm_spc_inc_bank + .done_inc_bank_3 + INY : BNE .done_inc_bank_4 + JSR cm_spc_inc_bank + .done_inc_bank_4 + PLB : STX $2142 STA $2141 @@ -3573,14 +3583,16 @@ cm_spc_next_block: { RTS } -cm_spc_inc_bank: { +cm_spc_inc_bank: +{ PHA : LDA !cm_spc_db : INC A : STA !cm_spc_db PHA : PLB : PLA LDY #$8000 RTS } -cm_spc_next_block_wait: { +cm_spc_next_block_wait: +{ %a8() LDA !cm_spc_index : STA $2140 : CMP $2140 : BNE .return @@ -3601,7 +3613,8 @@ cm_spc_next_block_wait: { RTS } -cm_spc_transfer: { +cm_spc_transfer: +{ ; Determine how many bytes to transfer LDA !cm_spc_len : TAX SBC #$0040 : BCC .last @@ -3627,8 +3640,9 @@ cm_spc_transfer: { CMP $002140 : BNE .wait_loop INC A - INY : BNE + : JSR cm_spc_inc_bank - + + INY : BNE .done_inc_bank + JSR cm_spc_inc_bank + .done_inc_bank DEX : BNE .transfer_loop LDX !cm_spc_len : BNE .timeout From 3f54e1f48db8133e2a8b7a7d3d6443b0b9b4ecde Mon Sep 17 00:00:00 2001 From: idle Date: Wed, 6 Mar 2024 19:58:18 -0600 Subject: [PATCH 16/18] Update version --- src/main.asm | 6 +++--- web/data/changelog.mdx | 3 +++ web/data/config.json | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/main.asm b/src/main.asm index a89976609..1e24b1037 100644 --- a/src/main.asm +++ b/src/main.asm @@ -11,9 +11,9 @@ lorom !RAW_TILE_GRAPHICS ?= 1 !VERSION_MAJOR = 2 -!VERSION_MINOR = 5 -!VERSION_BUILD = 12 -!VERSION_REV = 2 +!VERSION_MINOR = 6 +!VERSION_BUILD = 0 +!VERSION_REV = 0 table ../resources/normal.tbl print "" diff --git a/web/data/changelog.mdx b/web/data/changelog.mdx index c121eed17..db6b593ff 100644 --- a/web/data/changelog.mdx +++ b/web/data/changelog.mdx @@ -1,3 +1,6 @@ +# Version 2.6.x +- TODO put meme vague release notes here (2.6.0) + # Version 2.5.x - Added a separate version of savestates for MiSTer, Everdrives, and most modern emulators (not SNES Classic/VC) (2.5.0) - Added an option for fast doors/elevators, similar to randomizer (2.5.0) diff --git a/web/data/config.json b/web/data/config.json index f1041e1b7..42b36436c 100644 --- a/web/data/config.json +++ b/web/data/config.json @@ -1,6 +1,6 @@ { "name": "Super Metroid Practice Hack", - "version": "2.5.12.1", + "version": "2.6.0", "variants": ["NTSC", "PAL"], "base": { "NTSC": { From 3ba72f92ab48f06281150242a4c2c9543bedc0bd Mon Sep 17 00:00:00 2001 From: Jonathan Keller <19418817+NobodyNada@users.noreply.github.com> Date: Wed, 6 Mar 2024 19:33:13 -0800 Subject: [PATCH 17/18] ad title screen watermark for NTSC/PAL/SD2SNES/tinystates/emu build --- src/misc.asm | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/misc.asm b/src/misc.asm index 9f351755f..b680f046c 100644 --- a/src/misc.asm +++ b/src/misc.asm @@ -22,10 +22,22 @@ org $8B8697 NOP org $8B871D - LDA #$0590 +if !FEATURE_PAL + LDA #$39DF ; P +else + LDA #$39DD ; N +endif org $8B8731 - LDA #$0590 +if !FEATURE_SD2SNES +if !FEATURE_TINYSTATES + LDA #$39E3 ; T +else + LDA #$39E2 ; S +endif +else + LDA #$0000 ; blank +endif if !FEATURE_PAL org $8BF6DC From b68e80df38472372da4cd3348b2975604c25c707 Mon Sep 17 00:00:00 2001 From: idle Date: Wed, 6 Mar 2024 22:52:07 -0600 Subject: [PATCH 18/18] Release notes --- web/data/changelog.mdx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/web/data/changelog.mdx b/web/data/changelog.mdx index db6b593ff..9408317aa 100644 --- a/web/data/changelog.mdx +++ b/web/data/changelog.mdx @@ -1,5 +1,9 @@ # Version 2.6.x -- TODO put meme vague release notes here (2.6.0) +- Optimize kraid rock projectiles to reduce lag when Kraid rises (2.6.0) +- Use enemy ID to determine which enemies are cleared on preset load (2.6.0) +- Add boot-to-menu functionality (2.6.0) +- Use correct VRAM transfer mode for savestates (2.6.0) +- General system improvements to enhance the user's experience (2.6.0) # Version 2.5.x - Added a separate version of savestates for MiSTer, Everdrives, and most modern emulators (not SNES Classic/VC) (2.5.0)