Starting pen mode

This commit is contained in:
Devine Lu Linvega 2024-05-29 08:58:10 -07:00
parent 6fa7d1e86c
commit f271a33518
3 changed files with 30 additions and 7 deletions

View File

@ -296,6 +296,9 @@
00ff 0000 0000 0000 0000 ffff ffff ffff 00ff 0000 0000 0000 0000 ffff ffff ffff
ffff ] $1 ffff ] $1
@mem ( placeholder ) @placeholder "Keep 20 "up 20 "to 20 "eight 20 "pages 20 "of 20 "notes 20 "in 20 "the 20 "Note 20 "Pad. 20 "Click 20 "on 20 "the 20 "dog-ear 20 "to 20 "turn 20 "to 20 "the 20 "next 20 "following 20 "page. 20 "Click 20 "in 20 "the 20 "lower 20 "left 20 "corner 20 "to 20 "turn 20 "to 20 "the 20 "next 20 "previous 20 "page. 20 $1
"Keep 20 "up 20 "to 20 "eight 20 "pages 20 "of 20 "notes 20 "in 20 "the 20 "Note 20 "Pad. 20 "Click 20 "on 20 "the 20 "dog-ear 20 "to 20 "turn 20 "to 20 "the 20 "next 20 "following 20 "page. 20 "Click 20 "in 20 "the 20 "lower 20 "left 20 "corner 20 "to 20 "turn 20 "to 20 "the 20 "next 20 "previous 20 "page. 20 $1
@mem $8000
@sketch

View File

@ -1,6 +1,6 @@
( A port of the macintosh classic notepad ) ( A port of the macintosh classic notepad )
|00 @System &vector $2 &pad $6 &r $2 &g $2 &b $2 |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 |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 |20 @Screen &vector $2 &width $2 &height $2 &auto $1 &pad $1 &x $2 &y $2 &addr $2 &pixel $1 &sprite $1
|80 @Controller &vector $2 &button $1 &key $1 |80 @Controller &vector $2 &button $1 &key $1
@ -18,9 +18,9 @@
( | meta ) ( | meta )
;meta #06 DEO2 ;meta #06 DEO2
( | theme ) ( | theme )
#f00f .System/r DEO2 #f0cf .System/r DEO2
#f00f .System/g DEO2 #f0cf .System/g DEO2
#f00f .System/b DEO2 #f0cf .System/b DEO2
load-theme load-theme
( | size ) ( | size )
#00e0 .Screen/width DEO2 #00e0 .Screen/width DEO2
@ -253,12 +253,14 @@
JMP2r JMP2r
@file-new ( -- ) @file-new ( -- )
( copy placeholder ) ;&mcpy .System/expansion DEO2
#0801 #0801
&>l ( -- ) &>l ( -- )
#00 OVR #c0 SFT2 ;mem ADD2 STH2 #00 OVR #c0 SFT2 ;mem ADD2 STH2
#20 STH2r STA #20 STH2r STA
INC GTHk ?&>l INC GTHk ?&>l
POP2 JMP2r POP2 JMP2r
&mcpy [ 01 0100 0000 =placeholder 0000 =mem ]
@file-save ( -- ) @file-save ( -- )
;notepad-path .File/name DEO2 ;notepad-path .File/name DEO2
@ -485,7 +487,7 @@
.Screen/y DEI2 #00c8 NEQ2 ?{ .Screen/y DEI2 #00c8 NEQ2 ?{
;etc-icn .Screen/addr DEO2 ;etc-icn .Screen/addr DEO2
[ LIT2 01 -Screen/sprite ] DEO [ LIT2 01 -Screen/sprite ] DEO
POP2 JMP2r } POP2 !<draw-sketch> }
( | draw char ) ( | draw char )
DUP2 #0001 SUB2 LDA2 char-addr .Screen/addr DEO2 DUP2 #0001 SUB2 LDA2 char-addr .Screen/addr DEO2
is-selected STH is-selected STH
@ -499,7 +501,25 @@
[ LIT2 05 -Screen/sprite ] DEO [ LIT2 05 -Screen/sprite ] DEO
.Screen/x DEI2k #0008 SUB2 ROT DEO2 .Screen/x DEI2k #0008 SUB2 ROT DEO2
&block walk-char POP INC2 LDAk ?&>w &block walk-char POP INC2 LDAk ?&>w
POP2
( >> )
@<draw-sketch> ( -- )
#0000 .Screen/x DEO2
#0012 .Screen/y DEO2
;sketch .Screen/addr DEO2
[ LIT2 05 -Screen/auto ] DEO
#1800
&>h ( -- )
#1c00
&>w ( -- )
[ LIT2 0a -Screen/sprite ] DEO
INC GTHk ?&>w
POP2 #0000 .Screen/x DEO2
.Screen/y DEI2k #0008 ADD2 ROT DEO2
INC GTHk ?&>h
POP2 JMP2r POP2 JMP2r
&patt [ aa55 aa55 aa55 aa55 ]
@<draw-footer> ( -- ) @<draw-footer> ( -- )
[ LIT2 00 -collapsed ] LDZ EQU ?{ JMP2r } [ LIT2 00 -collapsed ] LDZ EQU ?{ JMP2r }

Binary file not shown.