commit b328a4e87da8275d14ab3b29530b727a2acc975d
parent 38334a633b6480000c4bc8d5633c18a642c7ae08
Author: neauoire <aliceffekt@gmail.com>
Date: Fri, 7 Jan 2022 11:36:04 -0800
Commented the fkey controls temporarily
Diffstat:
3 files changed, 45 insertions(+), 3 deletions(-)
diff --git a/projects/software/supervisor.tal b/projects/software/supervisor.tal
@@ -67,7 +67,14 @@ BRK
@on-button ( -> )
- .Controller/func DEI DEBUG
+ .Controller/func DEI
+ DUP #02 ! ,&no-f2 JCN
+ ;toggle-debugger JSR2
+ &no-f2
+ DUP #08 ! ,&no-f4 JCN
+ ;reboot JSR2
+ &no-f4
+ POP
BRK
@@ -115,6 +122,20 @@ BRK
BRK
+@toggle-debugger ( -- )
+
+ ( toggle debug ) #fd0e STH2k LDA #00 = STH2r STA
+
+RTN
+
+@reboot ( -- )
+
+ ( clear devices/stacks )
+ #fd00 #0300 ;mclr JSR2
+
+RTN
+ &boot-path "boot.rom $1
+
@draw-stacks ( -- )
AUTO-YADDR
@@ -200,6 +221,16 @@ RTN
JMP2r
+@mclr ( addr* len* -- )
+
+ OVR2 ++ SWP2
+ &loop
+ STH2k #00 STH2r STA
+ INC2 GTH2k ,&loop JCN
+ POP2 POP2
+
+JMP2r
+
@print-hex ( value* -- )
SWP ,&byte JSR
@@ -212,6 +243,15 @@ JMP2r
JMP2r
+@print-str ( string* -- )
+
+ #0001 SUB2
+ &while
+ INC2 LDAk DUP #18 DEO ,&while JCN
+ POP2
+
+JMP2r
+
@error-txts
&0 "Working-stack 20 "underflow $1
&1 "Return-stack 20 "underflow $1
diff --git a/src/devices/screen.c b/src/devices/screen.c
@@ -117,6 +117,8 @@ screen_dei(Device *d, Uint8 port)
case 0x3: return uxn_screen.width;
case 0x4: return uxn_screen.height >> 8;
case 0x5: return uxn_screen.height;
+ case 0x6:
+
default: return d->dat[port];
}
}
diff --git a/src/uxnemu.c b/src/uxnemu.c
@@ -459,8 +459,8 @@ run(Uxn *u)
controller_key(devctrl, get_key(&event));
else if(get_button(&event))
controller_down(devctrl, get_button(&event));
- else if(get_fkey(&event))
- controller_special(&supervisor.dev[0x8], get_fkey(&event));
+ /* else if(get_fkey(&event))
+ controller_special(&supervisor.dev[0x8], get_fkey(&event)); */
else
do_shortcut(u, &event);
ksym = event.key.keysym.sym;