mirror of
https://github.com/a2-4am/million-perfect-letters.git
synced 2024-12-26 21:30:09 +00:00
demo [WIP]
This commit is contained in:
parent
257d0ed751
commit
108a9b2fb5
@ -40,47 +40,47 @@ MockingDuet
|
|||||||
JSR INIT
|
JSR INIT
|
||||||
JSR RESET
|
JSR RESET
|
||||||
JSR ENACHN
|
JSR ENACHN
|
||||||
JMP LOOP
|
JMP MBLOOP
|
||||||
|
|
||||||
SETVOL
|
SETVOL
|
||||||
NEXT LDA SONG
|
MBNEXT LDA SONG
|
||||||
CLC
|
CLC
|
||||||
ADC #$03
|
ADC #$03
|
||||||
STA SONG
|
STA SONG
|
||||||
BCC LOOP
|
BCC MBLOOP
|
||||||
INC SONG+1
|
INC SONG+1
|
||||||
LOOP LDY #$00
|
MBLOOP LDY #$00
|
||||||
LDA (SONG),Y
|
LDA (SONG),Y
|
||||||
CMP #$01
|
CMP #$01
|
||||||
BEQ SETVOL
|
BEQ SETVOL
|
||||||
BPL SETNOTE ;SET DURATION
|
BPL SETNOTE ;SET DURATION
|
||||||
END JSR RESET
|
MBEND JSR RESET
|
||||||
RTS
|
RTS
|
||||||
|
|
||||||
MBCHECKKEY
|
MBCHECKKEY
|
||||||
ldy #0
|
ldy #0
|
||||||
MBCHECK lda ($EE), y
|
MBCHECK lda ($EE), y
|
||||||
beq MBCONTINUE
|
beq MBCONTINUE
|
||||||
bpl END
|
bpl MBEND
|
||||||
iny
|
iny
|
||||||
cmp $C000
|
cmp $C000
|
||||||
beq END
|
beq MBEND
|
||||||
bne MBCHECK ; always branches
|
bne MBCHECK ; always branches
|
||||||
MBCONTINUE
|
MBCONTINUE
|
||||||
bit $C010
|
bit $C010
|
||||||
jmp NEXT
|
jmp MBNEXT
|
||||||
|
|
||||||
SETNOTE STA DURATION
|
SETNOTE STA DURATION
|
||||||
LDA #LEFTCHN
|
LDA #LEFTCHN
|
||||||
SEND STA CHN
|
MBSEND STA CHN
|
||||||
MBSLOT01 STA $C401
|
MBSLOT01 STA $C401
|
||||||
MBSLOT02 STA $C481
|
MBSLOT02 STA $C481
|
||||||
JSR SETREG1
|
JSR SETREG1
|
||||||
INY
|
INY
|
||||||
LDA (SONG),Y
|
LDA (SONG),Y
|
||||||
BEQ SKIP ;IF 0 KEEP LTTSA
|
BEQ MBSKIP ;IF 0 KEEP LTTSA
|
||||||
JSR CONVFREQ
|
JSR CONVFREQ
|
||||||
SKIP LDA TONE
|
MBSKIP LDA TONE
|
||||||
MBSLOT03 STA $C401
|
MBSLOT03 STA $C401
|
||||||
MBSLOT04 STA $C481
|
MBSLOT04 STA $C481
|
||||||
JSR WRDATA1
|
JSR WRDATA1
|
||||||
@ -96,7 +96,7 @@ MBSLOT08 STA $C481
|
|||||||
LDA #RIGHTCHN
|
LDA #RIGHTCHN
|
||||||
STA CHN
|
STA CHN
|
||||||
CPY #$02
|
CPY #$02
|
||||||
BNE SEND
|
BNE MBSEND
|
||||||
LDX DURATION
|
LDX DURATION
|
||||||
W1 LDY TEMPO
|
W1 LDY TEMPO
|
||||||
W2 DEC TEMP
|
W2 DEC TEMP
|
||||||
@ -108,7 +108,7 @@ W2 DEC TEMP
|
|||||||
BIT $C000
|
BIT $C000
|
||||||
MBKEYBRANCH
|
MBKEYBRANCH
|
||||||
BMI MBCHECKKEY
|
BMI MBCHECKKEY
|
||||||
JMP NEXT
|
JMP MBNEXT
|
||||||
|
|
||||||
CONVFREQ LDX OCTAVE
|
CONVFREQ LDX OCTAVE
|
||||||
INX
|
INX
|
||||||
|
108
src/ui.demo.a
108
src/ui.demo.a
@ -20,6 +20,12 @@
|
|||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
RunDemo
|
RunDemo
|
||||||
jsr Home
|
jsr Home
|
||||||
|
lda #7
|
||||||
|
sta targetVTAB
|
||||||
|
lda #10
|
||||||
|
sta minHTAB
|
||||||
|
+LDADDR sThereAre
|
||||||
|
jsr HeavySilkReveal
|
||||||
jsr LoadDemoPuzzles
|
jsr LoadDemoPuzzles
|
||||||
+LDADDR DemoCode
|
+LDADDR DemoCode
|
||||||
+ST16 GetNextDemoByte+1
|
+ST16 GetNextDemoByte+1
|
||||||
@ -100,6 +106,8 @@ DemoOnWAIT
|
|||||||
jsr GetNextDemoByte
|
jsr GetNextDemoByte
|
||||||
jmp LongWaitForKeyWithTimeout
|
jmp LongWaitForKeyWithTimeout
|
||||||
|
|
||||||
|
DemoOnNEXT=AnimatePuzzleCompleted
|
||||||
|
|
||||||
GetNextDemoByte
|
GetNextDemoByte
|
||||||
ldx $FDFD ; SMC
|
ldx $FDFD ; SMC
|
||||||
inc GetNextDemoByte+1
|
inc GetNextDemoByte+1
|
||||||
@ -117,6 +125,7 @@ DemoDispatchLo
|
|||||||
!byte <DemoOnUP
|
!byte <DemoOnUP
|
||||||
!byte <DemoOnDOWN
|
!byte <DemoOnDOWN
|
||||||
!byte <DemoOnWAIT
|
!byte <DemoOnWAIT
|
||||||
|
!byte <DemoOnNEXT
|
||||||
DemoDispatchHi
|
DemoDispatchHi
|
||||||
!byte >DemoOnEXIT
|
!byte >DemoOnEXIT
|
||||||
!byte >DemoOnLOAD
|
!byte >DemoOnLOAD
|
||||||
@ -127,6 +136,7 @@ DemoDispatchHi
|
|||||||
!byte >DemoOnUP
|
!byte >DemoOnUP
|
||||||
!byte >DemoOnDOWN
|
!byte >DemoOnDOWN
|
||||||
!byte >DemoOnWAIT
|
!byte >DemoOnWAIT
|
||||||
|
!byte >DemoOnNEXT
|
||||||
|
|
||||||
; opcodes
|
; opcodes
|
||||||
EXIT = 0
|
EXIT = 0
|
||||||
@ -138,34 +148,110 @@ RIGHT = 5
|
|||||||
UP = 6
|
UP = 6
|
||||||
DOWN = 7
|
DOWN = 7
|
||||||
WAIT = 8
|
WAIT = 8
|
||||||
|
NEXT = 9
|
||||||
|
|
||||||
demoPuzzles
|
demoPuzzles
|
||||||
!raw "AOCD,LTLE,IBUH|ABLE,ITCH,LOUD",$0A
|
!raw "AOCD,LTUE,IBLH|ABLE,ITCH,LOUD|...HIDDEN IN THIS PUZZLE",$0A
|
||||||
!raw "["
|
!raw "["
|
||||||
|
|
||||||
sDemo
|
sDemo
|
||||||
!byte 6
|
!byte 6
|
||||||
!raw "DEMO-0"
|
!raw "DEMO-0"
|
||||||
|
|
||||||
sUpDown
|
sThereAre
|
||||||
!byte 24
|
|
||||||
!raw "MOVE COLUMNS UP AND DOWN"
|
|
||||||
sColumns
|
|
||||||
!byte 20
|
!byte 20
|
||||||
!raw "MOVE BETWEEN COLUMNS"
|
!raw "THERE ARE 3 WORDS..."
|
||||||
|
sShift
|
||||||
|
!byte 28
|
||||||
|
!raw "SHIFT COLUMNS TO SPELL WORDS"
|
||||||
|
sUseAll
|
||||||
|
!byte 26
|
||||||
|
!raw "USE ALL LETTERS TO ADVANCE"
|
||||||
|
|
||||||
DemoCode
|
DemoCode
|
||||||
|
!byte SHOW ,<sThereAre,>sThereAre
|
||||||
|
!byte WAIT ,20
|
||||||
|
!byte HIDE
|
||||||
!byte LOAD ,0,0
|
!byte LOAD ,0,0
|
||||||
!byte SHOW ,<sUpDown,>sUpDown
|
!byte WAIT ,30
|
||||||
!byte WAIT ,10
|
|
||||||
!byte HIDE
|
!byte HIDE
|
||||||
!byte UP
|
!byte UP
|
||||||
!byte WAIT ,5
|
!byte WAIT ,2
|
||||||
!byte UP
|
!byte UP
|
||||||
!byte WAIT ,5
|
!byte WAIT ,5
|
||||||
!byte DOWN
|
!byte DOWN
|
||||||
|
!byte WAIT ,2
|
||||||
|
!byte DOWN
|
||||||
!byte WAIT ,5
|
!byte WAIT ,5
|
||||||
!byte SHOW ,<sColumns,>sColumns
|
!byte SHOW ,<sShift,>sShift
|
||||||
!byte WAIT ,10
|
!byte WAIT ,30
|
||||||
!byte HIDE
|
!byte HIDE
|
||||||
|
!byte UP
|
||||||
|
!byte WAIT ,2
|
||||||
|
!byte RIGHT
|
||||||
|
!byte WAIT ,2
|
||||||
|
!byte RIGHT
|
||||||
|
!byte WAIT ,2
|
||||||
|
!byte UP
|
||||||
|
; A C
|
||||||
|
; --v-
|
||||||
|
; LOUD
|
||||||
|
; ----
|
||||||
|
; ITLE
|
||||||
|
; B H
|
||||||
|
!byte WAIT ,30
|
||||||
|
!byte SHOW ,<sUseAll,>sUseAll
|
||||||
|
!byte WAIT ,30
|
||||||
|
!byte HIDE
|
||||||
|
!byte LEFT
|
||||||
|
!byte WAIT ,2
|
||||||
|
!byte LEFT
|
||||||
|
!byte WAIT ,2
|
||||||
|
!byte DOWN
|
||||||
|
!byte WAIT ,2
|
||||||
|
!byte RIGHT
|
||||||
|
!byte WAIT ,2
|
||||||
|
!byte UP
|
||||||
|
!byte WAIT ,2
|
||||||
|
!byte UP
|
||||||
|
!byte WAIT ,2
|
||||||
|
!byte RIGHT
|
||||||
|
!byte WAIT ,2
|
||||||
|
!byte UP
|
||||||
|
!byte WAIT ,2
|
||||||
|
!byte RIGHT
|
||||||
|
!byte WAIT ,2
|
||||||
|
!byte UP
|
||||||
|
; OC
|
||||||
|
; TUD
|
||||||
|
; ---v
|
||||||
|
; ABLE
|
||||||
|
; ----
|
||||||
|
; L H
|
||||||
|
; I
|
||||||
|
!byte WAIT ,30
|
||||||
|
!byte UP
|
||||||
|
!byte WAIT ,2
|
||||||
|
!byte LEFT
|
||||||
|
!byte DOWN
|
||||||
|
!byte WAIT ,2
|
||||||
|
!byte DOWN
|
||||||
|
!byte WAIT ,2
|
||||||
|
!byte LEFT
|
||||||
|
!byte WAIT ,2
|
||||||
|
!byte DOWN
|
||||||
|
!byte WAIT ,2
|
||||||
|
!byte LEFT
|
||||||
|
!byte WAIT ,2
|
||||||
|
!byte UP
|
||||||
|
!byte WAIT ,2
|
||||||
|
!byte UP
|
||||||
|
; A D
|
||||||
|
; LO E
|
||||||
|
; v---
|
||||||
|
; ITCH
|
||||||
|
; ----
|
||||||
|
; BU
|
||||||
|
; L
|
||||||
|
!byte NEXT
|
||||||
!byte EXIT
|
!byte EXIT
|
||||||
|
Loading…
Reference in New Issue
Block a user