Compare commits

..

No commits in common. "e2abbe77de2ac405cae75f994a0fb4967868710f" and "707274390df596c47d2e97c55a06963ab5f66223" have entirely different histories.

19 changed files with 5024 additions and 5668 deletions

View File

@ -87,7 +87,7 @@ Lines = Lines cleared.
Level = The level before the lines were cleared. Level = The level before the lines were cleared.
Soft = Amount of frames the down button was held during this piece + double the rows the piece was sonic or hard dropped. Soft = Amount of frames the down button was held during this piece + 10 if the piece was sonic or hard dropped.
Combo = Old combo + (2 x Lines) - 2 Combo = Old combo + (2 x Lines) - 2

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

90
src/dmgfx.asm Normal file
View File

@ -0,0 +1,90 @@
; DMGTRIS
; Copyright (C) 2023 - Randy Thiemann <randy.thiemann@gmail.com>
; This program is free software: you can redistribute it and/or modify
; it under the terms of the GNU General Public License as published by
; the Free Software Foundation, either version 3 of the License, or
; (at your option) any later version.
; This program is distributed in the hope that it will be useful,
; but WITHOUT ANY WARRANTY; without even the implied warranty of
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
; GNU General Public License for more details.
; You should have received a copy of the GNU General Public License
; along with this program. If not, see <https://www.gnu.org/licenses/>.
IF !DEF(DMGFX_ASM)
DEF DMGFX_ASM EQU 1
INCLUDE "globals.asm"
SECTION "DMG Intro Effect", ROM0
; Does a small effect on boot with the nintendo logo.
DoDMGEffect::
ld a, [wInitialA]
cp a, $11
ret z
; Yeet the logo
ld c, 10
.loop0
wait_vblank
ldh a, [rSCY]
dec a
ldh [rSCY], a
wait_vblank_end
dec c
jr nz, .loop0
ld c, 45
.loop1
wait_vblank
ldh a, [rSCY]
inc a
inc a
ldh [rSCY], a
wait_vblank_end
dec c
jr nz, .loop1
; Fade
wait_vblank
ld a, PALETTE_MONO_2
ldh [rBGP], a
ld c, 20
.loop2
wait_vblank
wait_vblank_end
dec c
jr nz, .loop2
wait_vblank
ld a, PALETTE_MONO_1
ldh [rBGP], a
ld c, 20
.loop3
wait_vblank
wait_vblank_end
dec c
jr nz, .loop3
wait_vblank
ld a, PALETTE_MONO_0
ldh [rBGP], a
ld c, 20
.loop4
wait_vblank
wait_vblank_end
dec c
jr nz, .loop4
ret
ENDC

View File

@ -1559,11 +1559,6 @@ FieldProcess::
ldh a, [hCurrentPieceY] ldh a, [hCurrentPieceY]
add a, b add a, b
ldh [hCurrentPieceY], a ldh [hCurrentPieceY], a
ldh a, [hAwardDownBonus]
cp a, $FF
jr nz, .postgrav
ld a, b
ldh [hAwardDownBonus], a
jr .postgrav jr .postgrav
; No. Smaller distance. ; No. Smaller distance.
@ -1573,11 +1568,6 @@ FieldProcess::
ldh a, [hCurrentPieceY] ldh a, [hCurrentPieceY]
add a, b add a, b
ldh [hCurrentPieceY], a ldh [hCurrentPieceY], a
ldh a, [hAwardDownBonus]
cp a, $FF
jr nz, .postgrav
ld a, b
ldh [hAwardDownBonus], a
; ************************************************************** ; **************************************************************
@ -2077,13 +2067,17 @@ FieldDelay::
; Add soft drop points. ; Add soft drop points.
ldh a, [hDownFrames] ldh a, [hDownFrames]
ld c, a ld c, a
ldh a, [hAwardDownBonus]
add a, a
add a, c
ld c, a
xor a, a xor a, a
ld b, a ld b, a
; Lock bonus?
ldh a, [hAwardDownBonus]
cp a, $FF
jr nz, .premultiplier
ld a, 10
add a, c
ld c, a
; Final total pre-multipliers. ; Final total pre-multipliers.
.premultiplier .premultiplier
add hl, bc add hl, bc
@ -3813,11 +3807,6 @@ BigFieldProcess::
ldh a, [hCurrentPieceY] ldh a, [hCurrentPieceY]
add a, b add a, b
ldh [hCurrentPieceY], a ldh [hCurrentPieceY], a
ldh a, [hAwardDownBonus]
cp a, $FF
jr nz, .postgrav
ld a, b
ldh [hAwardDownBonus], a
jr .postgrav jr .postgrav
; No. Smaller distance. ; No. Smaller distance.
@ -3827,11 +3816,6 @@ BigFieldProcess::
ldh a, [hCurrentPieceY] ldh a, [hCurrentPieceY]
add a, b add a, b
ldh [hCurrentPieceY], a ldh [hCurrentPieceY], a
ldh a, [hAwardDownBonus]
cp a, $FF
jr nz, .postgrav
ld a, b
ldh [hAwardDownBonus], a
; ************************************************************** ; **************************************************************
@ -4333,13 +4317,17 @@ BigFieldDelay::
; Add soft drop points. ; Add soft drop points.
ldh a, [hDownFrames] ldh a, [hDownFrames]
ld c, a ld c, a
ldh a, [hAwardDownBonus]
add a, a
add a, c
ld c, a
xor a, a xor a, a
ld b, a ld b, a
; Lock bonus?
ldh a, [hAwardDownBonus]
cp a, $FF
jr nz, .premultiplier
ld a, 10
add a, c
ld c, a
; Final total pre-multipliers. ; Final total pre-multipliers.
.premultiplier .premultiplier
add hl, bc add hl, bc

View File

@ -73,8 +73,6 @@ INCLUDE "globals.asm"
DEF_RGB555_FROM24 BLACK_F, $20, $20, $20 DEF_RGB555_FROM24 BLACK_F, $20, $20, $20
DEF_RGB555_FROM24 GOLD_0, $36, $2C, $05 DEF_RGB555_FROM24 GOLD_0, $36, $2C, $05
DEF_RGB555_FROM24 GOLD_1, $99, $73, $16 DEF_RGB555_FROM24 GOLD_1, $99, $73, $16
DEF_RGB555_FROM24 WHITE_F, $FF, $FF, $FF
; Title Palettes. ; Title Palettes.
DEF_RGB555_FROM24 TITLE_PAL0_0, 0, 0, 0 DEF_RGB555_FROM24 TITLE_PAL0_0, 0, 0, 0
@ -103,6 +101,7 @@ INCLUDE "globals.asm"
DEF_RGB555_FROM24 TITLE_PAL4_3, 155, 173, 183 DEF_RGB555_FROM24 TITLE_PAL4_3, 155, 173, 183
SECTION "GBC Shadow Tilemap", WRAM0, ALIGN[8] SECTION "GBC Shadow Tilemap", WRAM0, ALIGN[8]
wShadowTilemap:: ds 32*32 wShadowTilemap:: ds 32*32
@ -215,19 +214,7 @@ GBCGameplayInit::
WRITEPAL_A 5, YELLOW_3_C, YELLOW_2_C, YELLOW_1_C, YELLOW_0_C WRITEPAL_A 5, YELLOW_3_C, YELLOW_2_C, YELLOW_1_C, YELLOW_0_C
WRITEPAL_A 6, CYAN_3_C, CYAN_2_C, CYAN_1_C, CYAN_0_C WRITEPAL_A 6, CYAN_3_C, CYAN_2_C, CYAN_1_C, CYAN_0_C
WRITEPAL_A 7, WHITE_C, GRAY_1_C, GRAY_0_C, BLACK_C WRITEPAL_A 7, WHITE_C, GRAY_1_C, GRAY_0_C, BLACK_C
ld a, [wBGMode]
cp a, BG_MODE_DARK
jp nz, .postpalettes
WRITEPAL_B 0, BLACK_C, RED_2_C, RED_1_C, RED_0_C
WRITEPAL_B 1, BLACK_C, GREEN_2_C, GREEN_1_C, GREEN_0_C
WRITEPAL_B 2, BLACK_C, PURPLE_2_C, PURPLE_1_C, PURPLE_0_C
WRITEPAL_B 3, BLACK_C, BLUE_2_C, BLUE_1_C, BLUE_0_C
WRITEPAL_B 4, BLACK_C, ORANGE_2_C, ORANGE_1_C, ORANGE_0_C
WRITEPAL_B 5, BLACK_C, YELLOW_2_C, YELLOW_1_C, YELLOW_0_C
WRITEPAL_B 6, BLACK_C, CYAN_2_C, CYAN_1_C, CYAN_0_C
WRITEPAL_A 7, BLACK_C, GRAY_0_C, GRAY_1_C, WHITE_C
jp .postpalettes jp .postpalettes
.agb .agb
WRITEPAL_A 0, RED_3_A, RED_2_A, RED_1_A, RED_0_A WRITEPAL_A 0, RED_3_A, RED_2_A, RED_1_A, RED_0_A
WRITEPAL_A 1, GREEN_3_A, GREEN_2_A, GREEN_1_A, GREEN_0_A WRITEPAL_A 1, GREEN_3_A, GREEN_2_A, GREEN_1_A, GREEN_0_A
@ -237,36 +224,8 @@ GBCGameplayInit::
WRITEPAL_A 5, YELLOW_3_A, YELLOW_2_A, YELLOW_1_A, YELLOW_0_A WRITEPAL_A 5, YELLOW_3_A, YELLOW_2_A, YELLOW_1_A, YELLOW_0_A
WRITEPAL_A 6, CYAN_3_A, CYAN_2_A, CYAN_1_A, CYAN_0_A WRITEPAL_A 6, CYAN_3_A, CYAN_2_A, CYAN_1_A, CYAN_0_A
WRITEPAL_A 7, WHITE_A, GRAY_1_A, GRAY_0_A, BLACK_A WRITEPAL_A 7, WHITE_A, GRAY_1_A, GRAY_0_A, BLACK_A
ld a, [wBGMode]
cp a, BG_MODE_DARK
jp nz, .postpalettes
WRITEPAL_B 0, BLACK_A, RED_2_A, RED_1_A, RED_0_A
WRITEPAL_B 1, BLACK_A, GREEN_2_A, GREEN_1_A, GREEN_0_A
WRITEPAL_B 2, BLACK_A, PURPLE_2_A, PURPLE_1_A, PURPLE_0_A
WRITEPAL_B 3, BLACK_A, BLUE_2_A, BLUE_1_A, BLUE_0_A
WRITEPAL_B 4, BLACK_A, ORANGE_2_A, ORANGE_1_A, ORANGE_0_A
WRITEPAL_B 5, BLACK_A, YELLOW_2_A, YELLOW_1_A, YELLOW_0_A
WRITEPAL_B 6, BLACK_A, CYAN_2_A, CYAN_1_A, CYAN_0_A
WRITEPAL_A 7, BLACK_A, GRAY_1_A, GRAY_0_A, WHITE_A
.postpalettes .postpalettes
ldh a, [hBState]
and a, a
jp z, .skip
WRITEPAL_B 0, BLACK_C, RED_2_C, RED_1_C, RED_0_C
WRITEPAL_B 1, BLACK_C, GREEN_2_C, GREEN_1_C, GREEN_0_C
WRITEPAL_B 2, BLACK_C, PURPLE_2_C, PURPLE_1_C, PURPLE_0_C
WRITEPAL_B 3, BLACK_C, BLUE_2_C, BLUE_1_C, BLUE_0_C
WRITEPAL_B 4, BLACK_C, ORANGE_2_C, ORANGE_1_C, ORANGE_0_C
WRITEPAL_B 5, BLACK_C, YELLOW_2_C, YELLOW_1_C, YELLOW_0_C
WRITEPAL_B 6, BLACK_C, CYAN_2_C, CYAN_1_C, CYAN_0_C
WRITEPAL_B 7, BLACK_C, GRAY_0_C, GRAY_1_C, WHITE_C
.skip
; Copy the tilemap to shadow. ; Copy the tilemap to shadow.
ld de, $9800 ld de, $9800
ld hl, wShadowTilemap ld hl, wShadowTilemap
@ -569,9 +528,6 @@ GBCGameplayProcess::
ret ret
.black .black
ld a, [wBGMode]
cp a, BG_MODE_DARK
jr z, .white
ld a, OCPSF_AUTOINC | (7*8)+(3*2) ld a, OCPSF_AUTOINC | (7*8)+(3*2)
ldh [rOCPS], a ldh [rOCPS], a
ld bc, BLACK_F_C ld bc, BLACK_F_C
@ -582,17 +538,6 @@ GBCGameplayProcess::
ldh [rOCPD], a ldh [rOCPD], a
ret ret
.white
ld a, OCPSF_AUTOINC | (7*8)+(3*2)
ldh [rOCPS], a
ld bc, WHITE_F_C
wait_vram
ld a, c
ldh [rOCPD], a
ld a, b
ldh [rOCPD], a
ret
GBCBigGameplayProcess:: GBCBigGameplayProcess::
ld a, [wInitialA] ld a, [wInitialA]

View File

@ -166,7 +166,6 @@ DEF BANK_MUSIC_3 EQU 9
; Some useful palettes. ; Some useful palettes.
DEF PALETTE_REGULAR EQU %11100100 DEF PALETTE_REGULAR EQU %11100100
DEF PALETTE_INVERTED EQU %00011011 DEF PALETTE_INVERTED EQU %00011011
DEF PALETTE_INVERTED_L EQU %01101111
DEF PALETTE_MONO_0 EQU %11111111 DEF PALETTE_MONO_0 EQU %11111111
DEF PALETTE_MONO_1 EQU %10101010 DEF PALETTE_MONO_1 EQU %10101010
DEF PALETTE_MONO_2 EQU %01010101 DEF PALETTE_MONO_2 EQU %01010101
@ -347,10 +346,6 @@ DEF FILTER_MODE_UDLR EQU 3
DEF FILTER_MODE_NONE EQU 4 DEF FILTER_MODE_NONE EQU 4
DEF FILTER_MODE_COUNT EQU 5 DEF FILTER_MODE_COUNT EQU 5
DEF BG_MODE_LITE EQU 0
DEF BG_MODE_DARK EQU 1
DEF BG_MODE_COUNT EQU 2
; VRAM Offsets for gameplay tiles ; VRAM Offsets for gameplay tiles
DEF FIELD_RNG EQU $9852 DEF FIELD_RNG EQU $9852
DEF FIELD_ROT EQU $9892 DEF FIELD_ROT EQU $9892
@ -495,19 +490,18 @@ DEF TITLE_SETTINGS_TETRY EQU $99C0
DEF TITLE_SETTINGS_SEL_BACK EQU 6 DEF TITLE_SETTINGS_SEL_BACK EQU 6
DEF TITLE_PROFILE_OPTION_BASE EQU $9840 DEF TITLE_PROFILE_OPTION_BASE EQU $9840
DEF TITLE_PROFILE_OPTIONS EQU 9 DEF TITLE_PROFILE_OPTIONS EQU 8
DEF TITLE_PROFILE_INDEX EQU $984F DEF TITLE_PROFILE_INDEX EQU $984F
DEF TITLE_PROFILE_NAME_0 EQU $986F DEF TITLE_PROFILE_NAME_0 EQU $986F
DEF TITLE_PROFILE_NAME_1 EQU $988F DEF TITLE_PROFILE_NAME_1 EQU $988F
DEF TITLE_PROFILE_NAME_2 EQU $98AF DEF TITLE_PROFILE_NAME_2 EQU $98AF
DEF TITLE_PROFILE_BUTTONS EQU $98CF DEF TITLE_PROFILE_BUTTONS EQU $98CF
DEF TITLE_PROFILE_FILTER EQU $98EF DEF TITLE_PROFILE_FILTER EQU $98EF
DEF TITLE_PROFILE_BG EQU $990F DEF TITLE_PROFILE_RESET EQU $990F
DEF TITLE_PROFILE_RESET EQU $992F DEF TITLE_PROFILE_BACK EQU $992F
DEF TITLE_PROFILE_BACK EQU $994F
DEF TITLE_PROFILE_TETRY EQU $99C0 DEF TITLE_PROFILE_TETRY EQU $99C0
DEF TITLE_PROFILE_SEL_RESET EQU 7 DEF TITLE_PROFILE_SEL_RESET EQU 6
DEF TITLE_PROFILE_SEL_BACK EQU 8 DEF TITLE_PROFILE_SEL_BACK EQU 7
DEF TITLE_RECORDS_MODE EQU $9848 DEF TITLE_RECORDS_MODE EQU $9848
DEF TITLE_RECORDS_SCORE_BASE EQU $98A2 DEF TITLE_RECORDS_SCORE_BASE EQU $98A2

View File

@ -33,12 +33,12 @@ MACRO DEF_RGB555
DEF COLOR EQUS "\1" DEF COLOR EQUS "\1"
; Uncorrected ; Uncorrected
DEF R_A EQU (\2 & $1F) DEF RED_A EQU (\2 & $1F)
DEF G_A EQU (\3 & $1F) DEF GREEN_A EQU (\3 & $1F)
DEF B_A EQU (\4 & $1F) DEF BLUE_A EQU (\4 & $1F)
DEF {COLOR} EQU (R_A << 0) | (G_A << 5) | (B_A << 10) DEF {COLOR} EQU (RED_A << 0) | (GREEN_A << 5) | (BLUE_A << 10)
DEF {COLOR}_A EQU (R_A << 0) | (G_A << 5) | (B_A << 10) DEF {COLOR}_A EQU (RED_A << 0) | (GREEN_A << 5) | (BLUE_A << 10)
; Transfer function. ; Transfer function.
DEF GAMMA EQU 2.0q25 DEF GAMMA EQU 2.0q25

View File

@ -1,192 +0,0 @@
; DMGTRIS
; Copyright (C) 2023 - Randy Thiemann <randy.thiemann@gmail.com>
; This program is free software: you can redistribute it and/or modify
; it under the terms of the GNU General Public License as published by
; the Free Software Foundation, either version 3 of the License, or
; (at your option) any later version.
; This program is distributed in the hope that it will be useful,
; but WITHOUT ANY WARRANTY; without even the implied warranty of
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
; GNU General Public License for more details.
; You should have received a copy of the GNU General Public License
; along with this program. If not, see <https://www.gnu.org/licenses/>.
IF !DEF(INTRO_ASM)
DEF INTRO_ASM EQU 1
INCLUDE "globals.asm"
DEF_RGB555 FADE_0, 31, 31, 31
DEF_RGB555 FADE_1, 30, 30, 30
DEF_RGB555 FADE_2, 29, 29, 29
DEF_RGB555 FADE_3, 28, 28, 28
DEF_RGB555 FADE_4, 27, 27, 27
DEF_RGB555 FADE_5, 26, 26, 26
DEF_RGB555 FADE_6, 25, 25, 25
DEF_RGB555 FADE_7, 24, 24, 24
DEF_RGB555 FADE_8, 23, 23, 23
DEF_RGB555 FADE_9, 22, 22, 22
DEF_RGB555 FADE_10, 21, 21, 21
DEF_RGB555 FADE_11, 20, 20, 20
DEF_RGB555 FADE_12, 19, 19, 19
DEF_RGB555 FADE_13, 18, 18, 18
DEF_RGB555 FADE_14, 17, 17, 17
DEF_RGB555 FADE_15, 16, 16, 16
DEF_RGB555 FADE_16, 15, 15, 15
DEF_RGB555 FADE_17, 14, 14, 14
DEF_RGB555 FADE_18, 13, 13, 13
DEF_RGB555 FADE_19, 12, 12, 12
DEF_RGB555 FADE_20, 11, 11, 11
DEF_RGB555 FADE_21, 10, 10, 10
DEF_RGB555 FADE_22, 9, 9, 9
DEF_RGB555 FADE_23, 8, 8, 8
DEF_RGB555 FADE_24, 7, 7, 7
DEF_RGB555 FADE_25, 6, 6, 6
DEF_RGB555 FADE_26, 5, 5, 5
DEF_RGB555 FADE_27, 4, 4, 4
DEF_RGB555 FADE_28, 3, 3, 3
DEF_RGB555 FADE_29, 2, 2, 2
DEF_RGB555 FADE_30, 1, 1, 1
DEF_RGB555 FADE_31, 0, 0, 0
SECTION "Intro Effect Trampoline", ROM0
DoIntroEffect::
ld b, BANK_TITLE
rst RSTSwitchBank
ld a, [wInitialA]
cp a, $11
call nz, DoDMGEffect
call z, DoGBCEffect
jp RSTRestoreBank
SECTION "Intro Effects Banked", ROMX, BANK[BANK_TITLE]
DoDMGEffect:
; Yeet the logo
ld c, 10
.loop0
call GetInput
ldh a, [hStartState]
ld hl, hAState
or a, [hl]
ld hl, hBState
or a, [hl]
ret nz
wait_vblank
ldh a, [rSCY]
dec a
ldh [rSCY], a
wait_vblank_end
dec c
jr nz, .loop0
ld c, 45
.loop1
call GetInput
ldh a, [hStartState]
ld hl, hAState
or a, [hl]
ld hl, hBState
or a, [hl]
ret nz
wait_vblank
ldh a, [rSCY]
inc a
inc a
ldh [rSCY], a
wait_vblank_end
dec c
jr nz, .loop1
; Fade
wait_vblank
ld a, PALETTE_MONO_2
ldh [rBGP], a
ld c, 20
.loop2
call GetInput
ldh a, [hStartState]
ld hl, hAState
or a, [hl]
ld hl, hBState
or a, [hl]
ret nz
wait_vblank
wait_vblank_end
dec c
jr nz, .loop2
wait_vblank
ld a, PALETTE_MONO_1
ldh [rBGP], a
ld c, 20
.loop3
call GetInput
ldh a, [hStartState]
ld hl, hAState
or a, [hl]
ld hl, hBState
or a, [hl]
ret nz
wait_vblank
wait_vblank_end
dec c
jr nz, .loop3
wait_vblank
ld a, PALETTE_MONO_0
ldh [rBGP], a
ld c, 20
.loop4
call GetInput
ldh a, [hStartState]
ld hl, hAState
or a, [hl]
ld hl, hBState
or a, [hl]
ret nz
wait_vblank
wait_vblank_end
dec c
jr nz, .loop4
ret
DoGBCEffect:
; Fade the screen to black.
FOR I, 31, 0, -1
wait_vblank
WRITEPAL_B 0, (I << 10 | I << 5 | I), (I << 10 | I << 5 | I), (I << 10 | I << 5 | I), (I << 10 | I << 5 | I)
wait_vblank_end
wait_vblank
wait_vblank_end
call GetInput
ldh a, [hStartState]
ld hl, hAState
or a, [hl]
ld hl, hBState
or a, [hl]
ret nz
ENDR
wait_vblank
wait_vblank_end
wait_vblank
wait_vblank_end
wait_vblank
wait_vblank_end
wait_vblank
wait_vblank_end
wait_vblank
ret
ENDC

View File

@ -34,7 +34,6 @@ wRotModeState:: ds 1
wDropModeState:: ds 1 wDropModeState:: ds 1
wSpeedCurveState:: ds 1 wSpeedCurveState:: ds 1
wAlways20GState:: ds 1 wAlways20GState:: ds 1
wBGMode:: ds 1
wInitialA:: ds 1 wInitialA:: ds 1
wInitialB:: ds 1 wInitialB:: ds 1
wInitialC:: ds 1 wInitialC:: ds 1
@ -79,10 +78,8 @@ Main::
; Harvest entropy ; Harvest entropy
call HarvestEntropy call HarvestEntropy
; Let the console have some fun with the initial screen. ; Let the DMG have some fun with the initial screen.
call InputInit call DoDMGEffect
call BankingInit
call DoIntroEffect
; Turn off LCD during initialization. ; Turn off LCD during initialization.
wait_vram wait_vram
@ -96,8 +93,8 @@ Main::
; Other initialization. ; Other initialization.
call RestoreSRAM call RestoreSRAM
call InputInit
call TimeInit call TimeInit
call InputInit
call SFXInit call SFXInit
call BankingInit call BankingInit

View File

@ -1014,8 +1014,8 @@ sTitleTiles::
DB $00,$00,$01,$00,$00,$00,$00,$00 DB $00,$00,$01,$00,$00,$00,$00,$00
DB $80,$80,$C0,$C0,$60,$60,$60,$60 DB $80,$80,$C0,$C0,$60,$60,$60,$60
DB $F0,$F0,$F0,$F0,$E0,$E0,$C0,$C0 DB $F0,$F0,$F0,$F0,$E0,$E0,$C0,$C0
DB $00,$00,$87,$00,$84,$00,$87,$00 DB $00,$00,$85,$00,$85,$00,$87,$00
DB $81,$00,$D7,$00,$00,$00,$00,$00 DB $81,$00,$D1,$00,$00,$00,$00,$00
DB $C0,$C0,$F0,$F0,$FC,$FC,$FF,$FF DB $C0,$C0,$F0,$F0,$FC,$FC,$FF,$FF
DB $FC,$FC,$F0,$F0,$C0,$C0,$00,$00 DB $FC,$FC,$F0,$F0,$C0,$C0,$00,$00
DB $C0,$00,$F0,$00,$FC,$00,$FF,$00 DB $C0,$00,$F0,$00,$FC,$00,$FF,$00

Binary file not shown.

View File

@ -70,10 +70,6 @@ sFilterMode::
db "UDLR" db "UDLR"
db "NONE" db "NONE"
sBGMode::
db "LITE"
db "DARK"
sTetryRNG:: sTetryRNG::
db "THIS OPTION WILL" db "THIS OPTION WILL"
db "CHANGE THE WAY " db "CHANGE THE WAY "
@ -144,19 +140,13 @@ sTetryButtons::
db "THIS OPTION WILL" db "THIS OPTION WILL"
db "CHANGE WHICH WAY" db "CHANGE WHICH WAY"
db "THE BUTTONS RO- " db "THE BUTTONS RO- "
db "TATE THE PIECE! " db "TATE THE PIECE "
sTetryFILTER:: sTetryFILTER::
db "THIS OPTION WILL" db "THIS OPTION WILL"
db "DETERMINE WHICH " db "DETERMINE WHICH "
db "D-PAD BUTTONS " db "D-PAD BUTTONS "
db "HAVE PRIORITY! " db "HAVE PRIORITY "
sTetryBG::
db "THIS OPTION WILL"
db "CHANGE THE BACK-"
db "GROUND COLOR IN-"
db "GAME! "
sTetryReset:: sTetryReset::
db "THIS OPTION WILL" db "THIS OPTION WILL"
@ -416,14 +406,14 @@ sTitleScreenProfileMap::
DB $00,$00,$00,$00,$5D,$01,$0F,$2A,$1B,$0C DB $00,$00,$00,$00,$5D,$01,$0F,$2A,$1B,$0C
DB $0F,$01,$11,$14,$17,$1F,$10,$1D,$28,$01 DB $0F,$01,$11,$14,$17,$1F,$10,$1D,$28,$01
DB $01,$01,$01,$29,$00,$00,$00,$00,$00,$00 DB $01,$01,$01,$29,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$5D,$01,$0D,$0C DB $00,$00,$00,$00,$00,$00,$5D,$01,$1D,$10
DB $0E,$16,$12,$1D,$1A,$20,$19,$0F,$01,$01 DB $1E,$10,$1F,$01,$1B,$1D,$1A,$11,$14,$17
DB $28,$01,$01,$01,$01,$29,$00,$00,$00,$00 DB $10,$01,$01,$01,$01,$01,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00,$5D,$01 DB $00,$00,$00,$00,$00,$00,$00,$00,$5D,$01
DB $1D,$10,$1E,$10,$1F,$01,$1B,$1D,$1A,$11 DB $0D,$0C,$0E,$16,$01,$01,$01,$01,$01,$01
DB $14,$17,$10,$01,$01,$01,$01,$01,$00,$00 DB $01,$01,$01,$01,$01,$01,$01,$01,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00,$00,$00 DB $00,$00,$00,$00,$00,$00,$00,$00,$00,$00
DB $5D,$01,$0D,$0C,$0E,$16,$01,$01,$01,$01 DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01
DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01 DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01
DB $00,$00,$00,$00,$00,$00,$00,$00,$00,$00 DB $00,$00,$00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$01,$01,$01,$01,$01,$01,$01,$01 DB $00,$00,$01,$01,$01,$01,$01,$01,$01,$01

View File

@ -35,8 +35,7 @@ rSpeedCurveState\1:: ds 1
rAlways20GState\1:: ds 1 rAlways20GState\1:: ds 1
rSelectedStartLevel\1:: ds 2 rSelectedStartLevel\1:: ds 2
rFilterMode\1:: ds 1 rFilterMode\1:: ds 1
rBGMode\1:: ds 1 rUnused\1:: ds (64-12)
rUnused\1:: ds (64-13)
ENDU ENDU
ENDM ENDM
@ -56,8 +55,7 @@ rSpeedCurveState:: ds 1
rAlways20GState:: ds 1 rAlways20GState:: ds 1
rSelectedStartLevel:: ds 2 rSelectedStartLevel:: ds 2
rFilterMode:: ds 1 rFilterMode:: ds 1
rBGMode:: ds 1 rUnused:: ds (PROFILE_SIZE - 12) ; 12 = sum of the above
rUnused:: ds (PROFILE_SIZE - 13) ; 13 = sum of the above
ENDU ENDU
PROFILE 0 PROFILE 0
PROFILE 1 PROFILE 1
@ -106,78 +104,27 @@ RestoreSRAM::
jp nz, InitializeSRAM jp nz, InitializeSRAM
; SRAM is initialized and for this build, so we can load the data. ; SRAM is initialized and for this build, so we can load the data.
; We do check for corruption and make sure all the values make sense.
TrustedLoad: TrustedLoad:
ld a, [rSwapABState] ld a, [rSwapABState]
ld [wSwapABState], a ld [wSwapABState], a
cp a, BUTTON_MODE_COUNT ld a, [rRNGModeState]
jr c, :+
xor a, a
ld [wSwapABState], a
ld [rSwapABState], a
: ld a, [rRNGModeState]
ld [wRNGModeState], a ld [wRNGModeState], a
cp a, RNG_MODE_COUNT ld a, [rRotModeState]
jr c, :+
xor a, a
ld [wRNGModeState], a
ld [rRNGModeState], a
: ld a, [rRotModeState]
ld [wRotModeState], a ld [wRotModeState], a
cp a, ROT_MODE_COUNT ld a, [rDropModeState]
jr c, :+
xor a, a
ld [wRotModeState], a
ld [rRotModeState], a
: ld a, [rDropModeState]
ld [wDropModeState], a ld [wDropModeState], a
cp a, DROP_MODE_COUNT ld a, [rSpeedCurveState]
jr c, :+
xor a, a
ld [wDropModeState], a
ld [rDropModeState], a
: ld a, [rSpeedCurveState]
ld [wSpeedCurveState], a ld [wSpeedCurveState], a
cp a, SCURVE_COUNT ld a, [rAlways20GState]
jr c, :+
xor a, a
ld [wSpeedCurveState], a
ld [rSpeedCurveState], a
: ld a, [rAlways20GState]
ld [wAlways20GState], a ld [wAlways20GState], a
cp a, HIG_MODE_COUNT ld a, [rProfileName]
jr c, :+
xor a, a
ld [wAlways20GState], a
ld [rAlways20GState], a
: ld a, [rFilterMode]
ldh [hFilterMode], a
cp a, FILTER_MODE_COUNT
jr c, :+
xor a, a
ldh [hFilterMode], a
ld [rFilterMode], a
: ld a, [rBGMode]
ld [wBGMode], a
cp a, BG_MODE_COUNT
jr c, :+
xor a, a
ld [wBGMode], a
ld [rBGMode], a
: ld a, [rProfileName]
ld [wProfileName], a ld [wProfileName], a
ld a, [rProfileName+1] ld a, [rProfileName+1]
ld [wProfileName+1], a ld [wProfileName+1], a
ld a, [rProfileName+2] ld a, [rProfileName+2]
ld [wProfileName+2], a ld [wProfileName+2], a
ld a, [rFilterMode]
ldh [hFilterMode], a
; Restore the start level. ; Restore the start level.
ld b, BANK_OTHER ld b, BANK_OTHER
@ -330,10 +277,6 @@ InitializeSRAM:
ld [rFilterMode], a ld [rFilterMode], a
ldh [hFilterMode], a ldh [hFilterMode], a
ld a, BG_MODE_LITE
ld [rBGMode], a
ld [wBGMode], a
; Set to the default start level. ; Set to the default start level.
ld hl, sDMGTSpeedCurve ld hl, sDMGTSpeedCurve
ld a, l ld a, l

View File

@ -125,22 +125,11 @@ SwitchToGameplayB:
call ApplyTells call ApplyTells
; Set up the palettes. ; Set up the palettes.
ld a, [wBGMode]
cp a, BG_MODE_DARK
jr z, .dark
ld a, PALETTE_REGULAR ld a, PALETTE_REGULAR
set_bg_palette set_bg_palette
set_obj0_palette set_obj0_palette
ld a, PALETTE_LIGHTER_1 ld a, PALETTE_LIGHTER_1
set_obj1_palette set_obj1_palette
jr .done
.dark
ld a, PALETTE_INVERTED
set_bg_palette
set_obj0_palette
ld a, PALETTE_INVERTED_L
set_obj1_palette
.done
; Initialize the RNG. ; Initialize the RNG.
call RNGInit call RNGInit
@ -942,22 +931,11 @@ SwitchToGameplayBigB:
call ApplyTells call ApplyTells
; Set up the palettes. ; Set up the palettes.
ld a, [wBGMode]
cp a, BG_MODE_DARK
jr z, .dark
ld a, PALETTE_REGULAR ld a, PALETTE_REGULAR
set_bg_palette set_bg_palette
set_obj0_palette set_obj0_palette
ld a, PALETTE_LIGHTER_1 ld a, PALETTE_LIGHTER_1
set_obj1_palette set_obj1_palette
jr .done
.dark
ld a, PALETTE_INVERTED
set_bg_palette
set_obj0_palette
ld a, PALETTE_INVERTED_L
set_obj1_palette
.done
; Initialize the RNG. ; Initialize the RNG.
call RNGInit call RNGInit

View File

@ -733,20 +733,6 @@ TitleVBlankHandlerB:
ld bc, 4 ld bc, 4
call UnsafeMemCopy call UnsafeMemCopy
.bg
ld b, 0
ld a, [wBGMode]
add a, a
add a, a
ld c, a
ld hl, sBGMode
add hl, bc
ld d, h
ld e, l
ld hl, TITLE_PROFILE_BG
ld bc, 4
call UnsafeMemCopy
; Tetry! ; Tetry!
ld a, [wSelected] ld a, [wSelected]
ld hl, sTetryProfileNumber ld hl, sTetryProfileNumber
@ -1265,7 +1251,6 @@ ProfileHandleRight:
jp .l2 jp .l2
jp .buttons jp .buttons
jp .filter jp .filter
jp .bg
no_jump no_jump
no_jump no_jump
@ -1337,19 +1322,6 @@ ProfileHandleRight:
ld [rFilterMode], a ld [rFilterMode], a
ret ret
.bg
ld a, [wBGMode]
cp a, BG_MODE_COUNT-1
jr z, :+
inc a
ld [wBGMode], a
ld [rBGMode], a
ret
: xor a, a
ld [wBGMode], a
ld [rBGMode], a
ret
ProfileHandleLeft: ProfileHandleLeft:
ld a, [wSelected] ld a, [wSelected]
@ -1374,7 +1346,6 @@ ProfileHandleLeft:
jp .l2 jp .l2
jp .buttons jp .buttons
jp .filter jp .filter
jp .bg
no_jump no_jump
no_jump no_jump
@ -1446,19 +1417,6 @@ ProfileHandleLeft:
ld [rFilterMode], a ld [rFilterMode], a
ret ret
.bg
ld a, [wBGMode]
or a, a
jr z, :+
dec a
ld [wBGMode], a
ld [rBGMode], a
ret
: ld a, BG_MODE_COUNT-1
ld [wBGMode], a
ld [rBGMode], a
ret
ProfileHandleDown: ProfileHandleDown:
ld a, [wSelected] ld a, [wSelected]