bool selector working (under pressure :P )
This commit is contained in:
parent
c0a05c150d
commit
2d12b2971a
47
src/menu.s
47
src/menu.s
|
@ -120,7 +120,29 @@ PRCARRYBIT pha
|
|||
rts
|
||||
|
||||
|
||||
Menu_DrawOptionBool rts
|
||||
Menu_DrawOptionBool iny
|
||||
lda ($F0),y ;get len
|
||||
sta _menuOptionLen
|
||||
iny
|
||||
lda ($F0),y ;get da
|
||||
sta $F2 ;storez
|
||||
iny
|
||||
lda ($F0),y ;get da
|
||||
sta $F3 ;storez
|
||||
ldy #0
|
||||
:prloop lda ($F2),y ;get our bool value
|
||||
bne :on
|
||||
:off lda #_menuBoolOffStr
|
||||
ldy #>_menuBoolOffStr
|
||||
jmp PrintString ;auto-rts
|
||||
:on lda #_menuBoolOnStr
|
||||
ldy #>_menuBoolOnStr
|
||||
jmp PrintString ;auto-rts
|
||||
|
||||
_menuBoolOnStr asc " on",00
|
||||
_menuBoolOffStr asc "off",00
|
||||
* @todo make this more configurable
|
||||
|
||||
Menu_DrawOptionInt rts
|
||||
|
||||
Menu_DrawOptionHex iny
|
||||
|
@ -340,8 +362,26 @@ Menu_HandleSelection
|
|||
pla
|
||||
jmp (Menu_TypeTable,x)
|
||||
|
||||
|
||||
* A= struct index for all of these.
|
||||
Menu_TypeChar rts
|
||||
Menu_TypeBool rts
|
||||
Menu_TypeBool tay
|
||||
iny ;skip x
|
||||
iny ;skip y
|
||||
iny ;skip length
|
||||
iny
|
||||
|
||||
lda ($F0),y
|
||||
sta $F2
|
||||
iny
|
||||
lda ($F0),y
|
||||
sta $F3
|
||||
lda #1
|
||||
eor ($f2)
|
||||
sta ($f2)
|
||||
rts
|
||||
|
||||
|
||||
Menu_TypeBin rts
|
||||
Menu_TypeInt rts
|
||||
|
||||
|
@ -384,7 +424,7 @@ Menu_TypeAction iny ;skip len byte
|
|||
sta :ACTION+1
|
||||
bcs :copy
|
||||
dec :ACTION+2
|
||||
:copy ldx #0 ;this is all so bad
|
||||
:copy ldx #0 ;this is all so bad - maybe rts is better
|
||||
:ACTION lda $ffff,x
|
||||
sta :JSR+1,x
|
||||
inx
|
||||
|
@ -485,4 +525,3 @@ HexCharForByte
|
|||
:alpha clc
|
||||
adc #"A"
|
||||
rts
|
||||
|
||||
|
|
30
src/mmt.s
30
src/mmt.s
|
@ -45,38 +45,48 @@ Main
|
|||
|
||||
ColorizeMenu
|
||||
:loop
|
||||
lda #$07
|
||||
lda #6
|
||||
jsr WaitSCB
|
||||
lda #$A0 ; green
|
||||
sta $c022
|
||||
|
||||
lda #7
|
||||
jsr WaitSCB
|
||||
lda #$c0 ; green
|
||||
sta $c022
|
||||
|
||||
lda #$09
|
||||
lda #9
|
||||
jsr WaitSCB
|
||||
lda #$d0 ; yello
|
||||
sta $c022
|
||||
|
||||
lda #$0A
|
||||
lda #10
|
||||
jsr WaitSCB
|
||||
lda #$90 ; orange
|
||||
sta $c022
|
||||
|
||||
|
||||
lda #$0B
|
||||
lda #11
|
||||
jsr WaitSCB
|
||||
lda #$10 ; red
|
||||
sta $c022
|
||||
|
||||
lda #$0C
|
||||
lda #12
|
||||
jsr WaitSCB
|
||||
lda #$30 ; purple
|
||||
sta $c022
|
||||
|
||||
lda #$0D
|
||||
lda #13
|
||||
jsr WaitSCB
|
||||
lda #$70 ; bblue
|
||||
sta $c022
|
||||
|
||||
lda #$0E
|
||||
lda #15
|
||||
jsr WaitSCB
|
||||
lda #$50 ; grey
|
||||
sta $c022
|
||||
|
||||
lda #16
|
||||
jsr WaitSCB
|
||||
lda #$f0 ; white
|
||||
sta $c022
|
||||
|
@ -715,8 +725,8 @@ MainMenuStrs
|
|||
asc $1B,'ZZ'," Hex Pattern : [ ] ",'_'," ",'Z'," ",'_'," ",'_',$18,00
|
||||
asc $1B,'ZZ'," Bin Pattern : [ ] ",'_'," ",'Z'," ",'_'," ",'_',$18,00
|
||||
asc $1B,'ZZ'," ",'_'," ",'Z'," ",'_'," ",'_',$18,00
|
||||
asc $1B,'ZZ'," Direction [up] Parallel R/W [off] ",'_'," ",'Z'," ",'_'," ",'_',$18,00
|
||||
asc $1B,'ZZ'," Adjacent Wr. [off] Refresh Pause [000] ",'_'," ",'Z'," ",'_'," ",'_',$18,00
|
||||
asc $1B,'ZZ'," Direction [ ] Parallel R/W [ ] ",'_'," ",'Z'," ",'_'," ",'_',$18,00
|
||||
asc $1B,'ZZ'," Adjacent Wr. [ ] Refresh Pause [000] ",'_'," ",'Z'," ",'_'," ",'_',$18,00
|
||||
asc $1B,'ZZ'," Read Repeat [000] Write Repeat [000] ",'_'," ",'Z'," ",'_'," ",'_',$18,00
|
||||
asc $1B,'ZZ'," Iterations [000] ",'_'," ",'Z'," ",'_'," ",'_',$18,00
|
||||
asc $1B,'ZZ'," ",'_'," ",'Z'," ",'_'," ",'_',$18,00
|
||||
|
@ -777,5 +787,3 @@ BorderColor db 0
|
|||
ds \
|
||||
_stash ds 255
|
||||
ds \
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue