@@ 60,7 60,6 @@ btnqueue .dsb 1
rate .dsb 1
timer .dsb 1
seed .dsb 1
-temp .dsb 1
.ende
;; reset
@@ 143,6 142,8 @@ SetupVariables:
STA rate ; default rate = 08
LDA #$20
STA note ; default note = C
+ LDA #$05
+ STA marker
SetupAudio:
LDY #$0f ; init $4000-4013
@@ 157,12 158,14 @@ SetupAudio:
STA $4017
SetupInterface:
+@cursor:
LDA #$88
STA $0200 ; set tile.y pos
LDA #$02
STA $0201 ; set tile.id
LDA #$00
STA $0202 ; set tile.attribute
+@marker:
LDA #$88
STA $0204 ; set tile.y pos
LDA #$03
@@ 291,7 294,43 @@ RedrawTimeline:
RedrawInterface:
LDA PPUSTATUS
-@sprite:
+@selection:
+ LDA cursor
+ CLC
+ ADC #$20
+ LDX #$40
+ LDY #$22
+ STY PPUADDR
+ STX PPUADDR
+ STA PPUDATA
+@marker:
+ LDA marker
+ CLC
+ ADC #$20
+ LDX #$41
+ LDY #$22
+ STY PPUADDR
+ STX PPUADDR
+ STA PPUDATA
+@position:
+ LDA position
+ CLC
+ ADC #$20
+ LDX #$42
+ LDY #$22
+ STY PPUADDR
+ STX PPUADDR
+ STA PPUDATA
+@rate:
+ LDA rate
+ CLC
+ ADC #$20
+ LDX #$43
+ LDY #$22
+ STY PPUADDR
+ STX PPUADDR
+ STA PPUDATA
+@sprites:
LDA position
ASL
ASL
@@ 299,7 338,6 @@ RedrawInterface:
CLC
ADC #$40
STA $0203 ; set tile.x pos
-@marker:
LDA marker
ASL
ASL
@@ 436,7 474,9 @@ DoSound:
STA APUCH1LEN
LDA NotesLo,x
STA APUCH1FRQ
- LDY seed
+ LDY position
+ ASY
+
STY APUCH1SWP
@ch2:
LDA NotesHi,x