Clamped action selection

This commit is contained in:
neauoire 2023-12-15 10:04:52 -08:00
parent bec2e2b557
commit 5b27560475
2 changed files with 26 additions and 7 deletions

View File

@ -43,3 +43,18 @@ The wallpaper rom expects a file named `.wallpaper` in the [chr format](https://
uxncli ~/roms/tgachr.rom wallpaper.tga
mv wallpapera6x50.chr .wallpaper
```
## Messages
Porporo listens special console messages types:
- `0xff` run command
- `0xfe` set action type
## Potato
Potato is the menubar rom that holds some of the state of porporo in its zero-page:
- `0x00*` action vector
- `0x02` action value

View File

@ -1,4 +1,3 @@
|00 @System &vector $2 &expansion $2 &wst $1 &rst $1 &metadata $2 &r $2 &g $2 &b $2 &debug $1 &state $1
|10 @Console &vector $2 &read $1 &pad $4 &type $1 &write $1 &error $1
|20 @Screen &vector $2 &width $2 &height $2 &auto $1 &pad $1 &x $2 &y $2 &addr $2 &pixel $1 &sprite $1
@ -46,12 +45,18 @@
.Mouse/state DEI ?&on-touch
BRK
&on-touch ( -> )
#fe .Console/type DEO
.Mouse/x DEI2 #04 SFT2 NIP .Console/write DEO
#00 .Console/type DEO
#00 .Mouse/state DEO
#40 ;fill-icn <update-cursor>
BRK
.Mouse/x DEI2 #0004 SUB2 #04 SFT2 NIP
( ) DUP #02 GTH ?{ <set-action>
BRK }
POP BRK
@<set-action> ( action -- )
#fe .Console/type DEO
#03 AND .Console/write DEO
#00 .Console/type DEO
#40 ;fill-icn <update-cursor>
JMP2r
@on-control ( -> )
BRK
@ -213,7 +218,6 @@
@fill-icn [ ffff ffff ffff ffff ]
@actions-icn [
fefc f8f8 fcce 8702 ffff c3c3 c3c3 ffff
1818 18ff ff18 1818 ]