Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
3268ea3
thanks hydrantdude
zohassadar Aug 29, 2025
07b1275
menu
zohassadar Jan 5, 2026
d8bb69a
Merge branch 'master' into menu
zohassadar Jan 24, 2026
d20ff7c
update menu
zohassadar Jan 24, 2026
9e34230
das meter
zohassadar Apr 22, 2026
c7ebab9
Merge remote-tracking branch 'origin/trt' into dasmeter
zohassadar Apr 22, 2026
33bbee0
todo: remove meter after topout
zohassadar Apr 24, 2026
cd135bc
Merge remote-tracking branch 'origin/menu' into combomenu
zohassadar May 20, 2026
6217df1
formatting
zohassadar May 31, 2026
9cb061e
pace & hz
zohassadar May 31, 2026
e50966b
input display & dark mode & flash
zohassadar May 31, 2026
d86bbea
add pride & white palettes
zohassadar May 31, 2026
5999e68
seed works mostly
zohassadar May 31, 2026
dbeac60
broken hard drop features
zohassadar May 31, 2026
c6f182e
Revert "broken hard drop features"
zohassadar Jun 1, 2026
236baae
ghost piece toggle
zohassadar Jun 1, 2026
7e09324
really broken hard drop & ghost
zohassadar Jun 1, 2026
64a7b97
Revert "really broken hard drop & ghost"
zohassadar Jun 1, 2026
15f66d2
invisible
zohassadar Jun 1, 2026
1da7db3
linecap mostly
zohassadar Jun 1, 2026
f4999d5
practiseType populated
zohassadar Jun 2, 2026
a070518
setups
zohassadar Jun 2, 2026
c66f9aa
most things work
zohassadar Jun 2, 2026
bedee1f
Merge remote-tracking branch 'upstream/master' into combomenu
zohassadar Jun 2, 2026
e8ed04c
gamemodestatefix
kirjavascript Jun 3, 2026
7c6f5bf
gamemodestatefix
kirjavascript Jun 3, 2026
af89a93
another mode
zohassadar Jun 3, 2026
9a2ab7a
Merge remote-tracking branch 'upstream/gamemodestatefix' into combomenu
zohassadar Jun 3, 2026
6c5bd34
mirror vert & horiz
zohassadar Jun 3, 2026
b03a92d
no scrolltris
zohassadar Jun 3, 2026
5636edf
tmp fix for strings
zohassadar Jun 3, 2026
645cc25
ghost & harddrop flags work
zohassadar Jun 10, 2026
2491f36
Merge remote-tracking branch 'upstream/master' into combomenu
zohassadar Jun 10, 2026
66e44d7
restore correct harddrop button
zohassadar Jun 10, 2026
d6a7081
mods
zohassadar Jun 10, 2026
d8f7ade
add anydas build flag
zohassadar Jun 10, 2026
9f30e80
anydas is option
zohassadar Jun 10, 2026
1c16f35
add anydas flag
zohassadar Jun 10, 2026
41176bb
Merge remote-tracking branch 'origin/trt' into combomenu
zohassadar Jun 10, 2026
3117674
trt controlled by flag
zohassadar Jun 10, 2026
f6136cc
das meter
zohassadar Jun 10, 2026
8f8c486
das meter flag
zohassadar Jun 10, 2026
7fedc4b
linecap renders good
zohassadar Jun 10, 2026
7dc586a
restore SXTOKL
zohassadar Jun 11, 2026
abf28fd
add todo
zohassadar Jun 11, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions TODO.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Pending
* lowstack should be option instead of mode
* pressing b on multi page should go to top of page
* rework tests to fit multi mode
* add animation to cursor arrows
* menu options stored in sram
* option to default all
* multiple scoreboards
* clear scoreboard individually
* lowstack & crunch compatibility


# Bugs
* abss from game renders part of playfield in menu
* lowstack line doesn't respond to vert mirror flag
* lowstack nope gets mirrored with horiz mirror flag
* ghost piece briefly flashes at the bottom of the board during entry delay
* harddrop current piece sprite glitchy during lineclears
8 changes: 8 additions & 0 deletions build.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ if (args.includes('-h')) {

-m mapper
-a faster aeppoz + press select to end game
-A build anydas
-s disable highscores/SRAM
-k Famicom Keyboard support
-w force WASM compiler
Expand Down Expand Up @@ -97,6 +98,13 @@ if (args.includes('--')) {

console.log();

// build menu
if (!args.includes('-M')) {
console.time('menu');
require('./src/gamemode/gametypemenu/menu');
console.timeEnd('menu');
}

// build / compress nametables

console.time('nametables');
Expand Down
17 changes: 11 additions & 6 deletions src/boot.asm
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,24 @@
; cpx #0 ; dex sets z flag
bne @loop

; default pace to A
lda #$A
lda #$FF
sta paceModifier
sta floorModifier

lda #$10
lda #NTSC_DAS
sta dasModifier
lda #NTSC_ARR
sta arrModifier

lda #MODE_TETRIS
sta practiseType

lda #INITIAL_LINECAP_LEVEL
sta linecapLevel
lda #INITIAL_LINECAP_LINES
sta linecapLines
lda #INITIAL_LINECAP_LINES_1
lda #INITIAL_LINECAP_LINES_LO
sta linecapLines+1
lda #INITIAL_LINECAP_LINES_HI
sta linecapLines

jsr resetScores

Expand Down
Binary file modified src/chr/game_tileset.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
192 changes: 80 additions & 112 deletions src/constants.asm
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,12 @@ SWAP_DUTY_CYCLES := 0 ; counters the duty cycle swap present in some clone conso

INITIAL_CUSTOM_LEVEL := 29
INITIAL_LINECAP_LEVEL := 39
INITIAL_LINECAP_LINES := $30 ; bcd
INITIAL_LINECAP_LINES_1 := 3 ; hex (lol)

; these bytes are currently 2 byte bcd in the menu
; they are swapped and will not work
INITIAL_LINECAP_LINES_LO := $30 ; bcd
INITIAL_LINECAP_LINES_HI := $03 ; bcd (tbd)

BTYPE_START_LINES := $25 ; bcd
MENU_HIGHLIGHT_COLOR := $12 ; $12 in gym, $16 in original
BLOCK_TILES := $7B
Expand All @@ -56,152 +60,116 @@ BUTTON_SELECT := $20
BUTTON_START := $10
BUTTON_DPAD := BUTTON_UP | BUTTON_DOWN | BUTTON_LEFT | BUTTON_RIGHT

RENDER_LINES = $01
RENDER_LEVEL = $02
RENDER_SCORE = $04
RENDER_DEBUG = $08
RENDER_HZ = $10
RENDER_STATS = $40
RENDER_HIGH_SCORE_LETTER = $80
RENDER_LINES := $01
RENDER_LEVEL := $02
RENDER_SCORE := $04
RENDER_DEBUG := $08
RENDER_HZ := $10
RENDER_STATS := $40
RENDER_HIGH_SCORE_LETTER := $80

.enum
MODE_DEFAULT
MODE_TETRIS
MODE_TSPINS
MODE_SEED
MODE_PARITY
MODE_PACE
MODE_PRESETS
MODE_STACKING
MODE_TYPEB
MODE_FLOOR
MODE_CRUNCH
MODE_TAP
MODE_TAPQTY
MODE_TRANSITION
MODE_MARATHON
MODE_TAPQTY
MODE_DROUGHT
MODE_CHECKERBOARD
MODE_GARBAGE
MODE_DROUGHT
MODE_DAS
MODE_LOWSTACK
MODE_KILLX2
MODE_INVISIBLE
MODE_HARDDROP
MODE_SPEED_TEST
MODE_SCORE_DISPLAY
MODE_CRASH
MODE_STRICT
MODE_HZ_DISPLAY
MODE_INPUT_DISPLAY
MODE_DISABLE_FLASH
MODE_DISABLE_PAUSE
MODE_DARK
MODE_GOOFY
MODE_DEBUG
MODE_LINECAP
MODE_DASONLY
MODE_QUAL
MODE_PAL
.if KEYBOARD = 1
MODE_KEYBOARD
.endif
MODE_ANYDAS
.endenum

.if KEYBOARD = 1
MODE_QUANTITY = MODE_KEYBOARD + 1
.else
MODE_QUANTITY = MODE_PAL + 1
.endif
; .endum
; MODE_FLOOR
; MODE_CRUNCH
; MODE_DAS
; MODE_KILLX2
; MODE_INVISIBLE
; MODE_HARDDROP
; MODE_SCORE_DISPLAY
; MODE_CRASH
; MODE_STRICT
; MODE_HZ_DISPLAY
; MODE_INPUT_DISPLAY
; MODE_DISABLE_FLASH
; MODE_DISABLE_PAUSE
; MODE_DARK
; MODE_GOOFY
; MODE_DEBUG
; MODE_LINECAP
; MODE_DASONLY
; MODE_QUAL
; MODE_PAL
; .if KEYBOARD = 1
; MODE_KEYBOARD
; .endif
; .endenum

MODE_GAME_QUANTITY = MODE_HARDDROP + 1
.enum
SCORING_CLASSIC
SCORING_LETTERS
SCORING_SEVENDIGIT
SCORING_FLOAT
SCORING_SCORECAP
SCORING_HIDDEN
.endenum

SCORING_CLASSIC := 0 ; for scoringModifier
SCORING_LETTERS := 1
SCORING_SEVENDIGIT := 2
SCORING_FLOAT := 3
SCORING_SCORECAP := 4
SCORING_HIDDEN := 5
.enum
LINECAP_INACTIVE
LINECAP_KILLX2
LINECAP_FLOOR
LINECAP_INVISIBLE
LINECAP_HALT
.endenum

LINECAP_KILLX2 := 1
LINECAP_FLOOR := 2
LINECAP_INVISIBLE := 3
LINECAP_HALT := 4
.enum
LINECAP_OFF
LINECAP_LEVEL
LINECAP_LINES
.endenum

CRASH_OFF := 0
CRASH_SHOW := 1
CRASH_TOPOUT := 2
CRASH_CRASH := 3
.enum
CRASH_OFF
CRASH_SHOW
CRASH_TOPOUT
CRASH_CRASH
.endenum

LINECAP_WHEN_STRING_OFFSET := $10
LINECAP_HOW_STRING_OFFSET := $12
LINECAP_WHEN_STRING_OFFSET := $FF
LINECAP_HOW_STRING_OFFSET := $2

MENU_SPRITE_Y_BASE := $46
MENU_MAX_Y_SCROLL := $A0
MENU_TOP_MARGIN_SCROLL := 7 ; in blocks

; menuConfigSizeLookup
; menu ram is defined at menuRAM in ./ram.asm
.macro MENUSIZES
.byte $0 ; MODE_TETRIS
.byte $0 ; MODE_TSPINS
.byte $0 ; MODE_SEED
.byte $0 ; MODE_PARITY
.byte $F ; MODE_PACE
.byte $7 ; MODE_PRESETS
.byte $8 ; MODE_TYPEB
.byte $C ; MODE_FLOOR
.byte $F ; MODE_CRUNCH
.byte $20 ; MODE_TAP
.byte $10 ; MODE_TRANSITION
.byte $4 ; MODE_MARATHON
.byte $1F ; MODE_TAPQTY
.byte $8 ; MODE_CHECKERBOARD
.byte $4 ; MODE_GARBAGE
.byte $12 ; MODE_DROUGHT
.byte $10 ; MODE_DAS
.byte $12 ; MODE_LOWSTACK
.byte $0 ; MODE_KILLX2
.byte $0 ; MODE_INVISIBLE
.byte $0 ; MODE_HARDDROP
.byte $0 ; MODE_SPEED_TEST
.byte $5 ; MODE_SCORE_DISPLAY
.byte $3 ; MODE_CRASH
.byte $1 ; MODE_STRICT
.byte $1 ; MODE_HZ_DISPLAY
.byte $1 ; MODE_INPUT_DISPLAY
.byte $1 ; MODE_DISABLE_FLASH
.byte $1 ; MODE_DISABLE_PAUSE
.byte $5 ; MODE_DARK
.byte $1 ; MODE_GOOFY
.byte $1 ; MODE_DEBUG
.byte $1 ; MODE_LINECAP
.byte $1 ; MODE_DASONLY
.byte $1 ; MODE_QUAL
.byte $1 ; MODE_PAL
.if KEYBOARD = 1
.byte $1 ; MODE_KEYBOARD
.endif
.endmacro
NTSC_DAS = 16
NTSC_ARR = 6

PAL_DAS = 12
PAL_ARR = 4

.macro MODENAMES
.byte "TETRIS"
.byte "TSPINS"
.byte " SEED "
.byte "STACKN"
.byte " PACE "
.byte "SETUPS"
.byte "STACKN"
.byte "B-TYPE"
.byte "FLOOR "
.byte "CRUNCH"
.byte "QCKTAP"
.byte "TAPQTY"
.byte "TRNSTN"
.byte "MARTHN"
.byte "TAPQTY"
.byte "LOBARS"
.byte "CKRBRD"
.byte "GARBGE"
.byte "LOBARS"
.byte "DASDLY"
.byte "LOWSTK"
.byte "KILLX2"
.byte "INVZBL"
.byte "HRDDRP"
.byte "ANYDAS"
.endmacro
2 changes: 2 additions & 0 deletions src/gamemode/gametypemenu/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
menudata.asm
menuram.asm
Loading