(tgachr) Added dither

This commit is contained in:
neauoire 2023-12-20 11:28:37 -08:00
parent 9a4634c02b
commit 124109101f
2 changed files with 8 additions and 4 deletions

BIN
cli/tgachr/pict320x20.chr Normal file

Binary file not shown.

View File

@ -158,15 +158,19 @@
( save ) ROT ROT STA
JMP2r
@pixel-raw-true ( pixel* -- color )
@pixel-raw-true ( x* y* addr* -- x* y* color )
LDAk ,&b STR
INC2 LDAk ,&g STR
INC2 LDAk ,&r STR
INC2 LDA ,&a STR
[ LIT2 00 &r $1 ] [ LIT2 00 &g $1 ] [ LIT2 00 &b $1 ] ADD2 ADD2
( ) #0003 DIV2 NIP [ LIT &a $1 ] POP #06 SFT JMP2r
EOR2k NIP #01 AND STH
[ LIT2 00 &r $1 ] [ LIT2 00 &g $1 ] ADD2 [ LIT2 00 &b $1 ] ADD2
( ) #0003 DIV2 NIP [ LIT &a $1 ] POP #05 SFT
( dither ) STHr ADD #01 SFT
( max ) #03 LTHk [ JMP SWP POP ]
JMP2r
@pixel-raw-bw ( pixel* -- color )
@pixel-raw-bw ( x* y* addr* -- x* y* color )
( res ) LDA JMP2r
(