commit 77a00f7a7e6c1e60631a42daea8cc59afa402bb7
parent ff3d5e340e2a02a9306ddb7741429777694a515b
Author: neauoire <aliceffekt@gmail.com>
Date: Sun, 28 Feb 2021 20:52:41 -0800
Starting hex editor in usm
Diffstat:
5 files changed, 50 insertions(+), 1040 deletions(-)
diff --git a/build.sh b/build.sh
@@ -20,5 +20,5 @@ cc -std=c89 -DDEBUG -Wall -Wno-unknown-pragmas -Wpedantic -Wshadow -Wextra -Werr
# cc uxn.c emulator.c -std=c89 -Os -DNDEBUG -g0 -s -Wall -Wno-unknown-pragmas -L/usr/local/lib -lSDL2 -o bin/emulator
# run
-./bin/assembler examples/gui.hover.usm bin/boot.rom
+./bin/assembler examples/dev.mouse.usm bin/boot.rom
./bin/emulator bin/boot.rom
diff --git a/examples/app.hex.usm b/examples/app.hex.usm
@@ -0,0 +1,45 @@
+( app/hex )
+
+&Sprite { pad 8 x 2 y 2 addr 2 color 1 }
+
+;color 1 ;addr 2 ;i 1
+
+|0100 @RESET
+
+ @loop
+ #00 ~i #0018 MUL2 #0008 ADD2 #0040 #01 ,font #00 ~i ADD2 ,draw-byte JSR
+ ( incr ) ~i #01 ADD =i
+ ,loop ~i #08 LTH JMP? POP2
+
+BRK
+
+|0200 @FRAME BRK
+
+@draw-byte ( x y color addr )
+
+ ( load ) =addr =color =dev/sprite.y =dev/sprite.x
+ ,font #00 ~addr LDR #f0 AND #04 ROR #08 MUL ADD2 =dev/sprite.addr #01 =dev/sprite.color
+ ~dev/sprite.x #0008 ADD2 =dev/sprite.x
+ ,font #00 ~addr LDR #0f AND #08 MUL ADD2 =dev/sprite.addr #01 =dev/sprite.color
+
+RTS
+
+@font ( 0-F )
+[
+ 7c82 8282 8282 7c00 3010 1010 1010 1000
+ 7c82 027c 8080 fe00 7c82 027c 0282 7c00
+ 4282 82fe 0202 0200 fc82 807c 0282 7c00
+ 7c82 80fc 8282 7c00 7c82 021e 0202 0200
+ 7c82 827c 8282 7c00 7c82 827e 0202 0400
+ 7c82 027e 8282 7e00 fc82 82fc 8282 fc00
+ 7c82 8080 8082 7c00 fc82 8282 8282 fc00
+ 7c82 80f0 8082 7c00 7c82 80f0 8080 8000
+]
+
+
+|d000 @ERROR BRK
+
+|FF20 ;dev/sprite Sprite
+
+|FFF0 .RESET .FRAME .ERROR ( vectors )
+|FFF8 [ 13fd 1ef3 1bf2 ] ( palette )
+\ No newline at end of file
diff --git a/examples/dev.console.usm b/examples/dev.console.usm
@@ -26,4 +26,4 @@ RTS
|FF00 ;dev/console Console
|FFF0 .RESET .FRAME .ERROR ( vectors )
-|FFF8 [ f3f0 f30b f30a ] ( palette )
-\ No newline at end of file
+|FFF8 [ 13fd 1ef3 1bf2 ] ( palette )
+\ No newline at end of file
diff --git a/examples/old.window.usm b/examples/old.window.usm
@@ -1,1036 +0,0 @@
-( sprite )
-
-:dev/r fff8 ( std read port )
-:dev/w fff9 ( std write port )
-
-&Point2d { x 2 y 2 }
-&Icon { text 2 sprite 2 x 2 y 2 }
-
-;mouse Point2d
-;pos Point2d
-
-;icon Icon
-
-( window ) ;wx1 2 ;wy1 2 ;wx2 2 ;wy2 2
-( drawing ) ;color 1 ;x1 2 ;x2 2 ;y1 2 ;y2 2 ;i 2
-( mouse ) ;state 1 ;wname 2
-
-|0100 @RESET
-
- #01 =dev/r ( read screen for size )
- #02 =dev/w ( write to sprite )
-
- ,paint-image JSR
-
- #01 =dev/r ( set read screen )
-
- ,icon_name1 ,icon_icn1 #00 IOR2 #0040 SUB2 #0000 ,paint-icon JSR
- ,icon_name2 ,icon_icn2 #00 IOR2 #0040 SUB2 #0030 ,paint-icon JSR
- ,icon_name3 ,icon_icn3 #00 IOR2 #0040 SUB2 #0090 ,paint-icon JSR
-
- #02 =dev/w ( set dev/write sprite )
-
- ,window_name1 #0010 #0058 #0080 #0070 ,paint-window JSR
- ( ,window_name2 #0040 #0040 #00f0 #0070 ,paint-window JSR )
- ( ,window_name3 #0060 #004c #00c0 #007a ,paint-window JSR )
-
- #05 =dev/r ( set dev/read mouse )
-
-BRK
-
-@paint-image ( nil )
-
- #01 =dev/r ( read screen for size )
- #02 =dev/w ( write to sprite )
-
- #0000
- @paint-image-loop-hor
- #0000
- @paint-image-loop
- ( draw ) OVR2 IOW2 DUP2 IOW2 ,image ~i ADD2 IOW2 #01 IOW
- ( incr ) #0008 ADD2 DUP2
- ( incr ) ~i #0008 ADD2 =i
- #00 IOR2 LTH2 ,paint-image-loop ROT JMP? POP2
- POP2
- ( incr ) #0008 ADD2 DUP2
- #02 IOR2 LTH2 ,paint-image-loop-hor ROT JMP? POP2
- POP2
-
-RTS
-
-@paint-pattern ( nil )
-
- #01 =dev/r ( read screen for size )
- #02 =dev/w ( write to sprite )
-
- #0000
- @paint-pattern-loop-hor
- #0000
- @paint-pattern-loop
- ( draw ) OVR2 IOW2 DUP2 IOW2 ,texture IOW2 #01 IOW
- ( incr ) #0008 ADD2 DUP2
- #00 IOR2 LTH2 ,paint-pattern-loop ROT JMP? POP2
- POP2
- ( incr ) #0008 ADD2 DUP2
- #02 IOR2 LTH2 ,paint-pattern-loop-hor ROT JMP? POP2
- POP2
-
-RTS
-
-@paint-window ( name wx1 wy1 wx2 wy2 )
-
- =wy2 =wx2 =wy1 =wx1 =wname
-
- #01 =dev/r ( read screen for size )
- #01 =dev/w ( write to screen )
-
- ( Draw background )
- #00 =color
- ~wx1 #0003 ADD2 ~wy1 #0003 ADD2 ~wx2 #0003 ADD2 ~wy2 #0003 ADD2 ,fill-rect JSR
- #02 =color
- ~wx1 ~wy1 ~wx2 ~wy2 ,fill-rect JSR
- ( draw outline )
- #00 =color
- ~wx1 ~wy1 ~wx2 ~wy2 ,line-rect JSR
- #00 =color
- ~wx1 #0002 ADD2 ~wy1 #0002 ADD2 ~wx2 #0002 SUB2 ~wy2 #0002 SUB2 ,line-rect JSR
-
- #02 =dev/w
- #0b =color
- ~wname ~wx1 #0008 ADD2 ~wy1 #0008 ADD2 ,draw-label JSR
-
-RTS
-
-@paint-icon ( x y )
-
- =icon.y =icon.x =icon.sprite =icon.text
-
- #01 =dev/w ( write to screen )
- #02 =dev/w ( write to sprite )
-
- #01 =color
- ~icon.text ~icon.x #0008 ADD2 ~icon.y #0020 ADD2 ,draw-label JSR
- #07 ~icon.sprite ~icon.x #0018 ADD2 ~icon.y #0008 ADD2
- IOW2 IOW2 IOW2 IOW
- #07 ~icon.sprite #0008 ADD2 ~icon.x #0020 ADD2 ~icon.y #0008 ADD2
- IOW2 IOW2 IOW2 IOW
- #07 ~icon.sprite #0010 ADD2 ~icon.x #0018 ADD2 ~icon.y #0010 ADD2
- IOW2 IOW2 IOW2 IOW
- #07 ~icon.sprite #0018 ADD2 ~icon.x #0020 ADD2 ~icon.y #0010 ADD2
- IOW2 IOW2 IOW2 IOW
-
-RTS
-
-@on-touch
-
-RTS
-
-@fill-rect ( x1 y1 x2 y2 )
- =y2 =x2 ( stash x1 y1 ) =y1 DUP2 WSR2 =x1
- @fill-rect-ver
- RSW2 DUP2 =x1 WSR2
- @fill-rect-hor
- ( draw ) ~x1 ~y1 IOW2 IOW2 ~color IOW
- ( incr ) ~x1 #0001 ADD2 DUP2 =x1
- ~x2 LTH2 ,fill-rect-hor ROT JMP? POP2
- ~y1 #0001 ADD2 DUP2 =y1
- ~y2 LTH2 ,fill-rect-ver ROT JMP? POP2
- RSW2 POP2
-RTS
-
-@line-rect ( x1 y1 x2 y2 )
- =y2 =x2 ( stash x1 y1 ) DUP2 WSR2 =y1 DUP2 WSR2 =x1
- @line-rect-hor
- ( draw ) ~x1 ~y1 IOW2 IOW2 ~color IOW
- ( draw ) ~x1 ~y2 IOW2 IOW2 ~color IOW
- ( incr ) ~x1 #0001 ADD2 DUP2 =x1
- ~x2 #0001 ADD2 LTH2 ,line-rect-hor ROT JMP? POP2
- ( restore x1 y1 ) RSW2 =x1 RSW2 =y1
- @line-rect-ver
- ( incr ) ~y1 #0001 ADD2 DUP2 =y1
- ( draw ) ~x1 ~y1 IOW2 IOW2 ~color IOW
- ( draw ) ~x2 ~y1 IOW2 IOW2 ~color IOW
- ~y2 #0001 SUB2 LTH2 ,line-rect-ver ROT JMP? POP2
-RTS
-
-@draw-sprite
- IOW2 ( y byte )
- IOW2 ( x byte )
- IOW2 ( sprite address )
- IOW ( layer-color )
-RTS
-
-@draw-label ( text x1 y1 )
- =y1 =x1
- @draw-label-loop
- ( draw ) ~x1 ~y1 IOW2 IOW2 DUP2 LDR #00 SWP #0008 MUL2 ,font ADD2 IOW2 ~color IOW
- ( incr ) #0001 ADD2
- ( incr ) ~x1 #0008 ADD2 =x1
- DUP2 LDR #00 NEQ ,draw-label-loop ROT JMP? POP2
- POP2
-RTS
-
-@texture [ aa55 aa55 aa55 aa55 ]
-@clear_icn [ 0000 0000 0000 0000 ]
-@cursor_icn [ 80c0 e0f0 f8e0 1000 ]
-@checkoff_icn [ 7e81 8181 8181 817e ]
-@checkon_icn [ 7e81 99bd bd99 817e ]
-
-@window_name1 [ To Jupiter ] <1 .00
-@window_name2 [ To Neptune ] <1 .00
-@window_name3 [ To Nereid ] <1 .00
-@icon_name1 [ Disk 1 ] <1 .00
-@icon_name2 [ Text 1 ] <1 .00
-@icon_name3 [ Trash ] <1 .00
-
-@font ( spectrum-zx font )
-[
- 0000 0000 0000 0000 0000 2400 7e3c 0000 0000 2400 3c42 0000 0000 6c7c 7c38 1000
- 0010 387c 7c38 1000 0038 387c 6c10 3800 0010 387c 7c10 3800 0000 0018 1800 0000
- 007e 4242 4242 7e00 0000 1824 2418 0000 0018 2442 4224 1800 001e 063a 4a48 3000
- 0038 446c 107c 1000 000c 0808 0838 3800 003e 2222 2266 6600 0000 0822 0022 0800
- 0000 1018 1c18 1000 0000 0818 3818 0800 0008 1c00 001c 0800 0028 2828 2800 2800
- 003e 4a4a 3a0a 0a00 000c 3046 620c 3000 0000 0000 0000 ffff 0010 3800 3810 0038
- 0008 1c2a 0808 0800 0008 0808 2a1c 0800 0000 0804 7e04 0800 0000 1020 7e20 1000
- 0000 4040 7e00 0000 0000 0024 6624 0000 0000 1038 7c00 0000 0000 007c 3810 0000
- 0000 0000 0000 0000 0008 0808 0800 0800 0014 1400 0000 0000 0024 7e24 247e 2400
- 0008 1e28 1c0a 3c08 0042 0408 1020 4200 0030 4832 4c44 3a00 0008 1000 0000 0000
- 0004 0808 0808 0400 0010 0808 0808 1000 0000 1408 3e08 1400 0000 0808 3e08 0800
- 0000 0000 0008 0810 0000 0000 3c00 0000 0000 0000 0000 0800 0000 0204 0810 2000
- 003c 464a 5262 3c00 0018 2808 0808 3e00 003c 4202 3c40 7e00 003c 421c 0242 3c00
- 0008 1828 487e 0800 007e 407c 0242 3c00 003c 407c 4242 3c00 007e 0204 0810 1000
- 003c 423c 4242 3c00 003c 4242 3e02 3c00 0000 0008 0000 0800 0000 0800 0008 0810
- 0000 0810 2010 0800 0000 003e 003e 0000 0000 1008 0408 1000 003c 4202 0c00 0800
- 003c 425a 5442 3c00 0018 2442 7e42 4200 007c 427c 4242 7c00 003c 4240 4042 3c00
- 0078 4442 4244 7800 007e 407c 4040 7e00 003e 4040 7c40 4000 003c 4240 4e42 3c00
- 0042 427e 4242 4200 003e 0808 0808 3e00 0002 0202 4242 3c00 0044 4870 4844 4200
- 0040 4040 4040 7e00 0042 665a 4242 4200 0042 6252 4a46 4200 003c 4242 4242 3c00
- 007c 4242 7c40 4000 003c 4242 524a 3c00 007c 4242 7c44 4200 003c 403c 0242 3c00
- 00fe 1010 1010 1000 0042 4242 4242 3c00 0042 4242 4224 1800 0042 4242 5a66 4200
- 0042 2418 1824 4200 0082 4428 1010 1000 007e 0408 1020 7e00 000c 0808 0808 0c00
- 0040 2010 0804 0200 0018 0808 0808 1800 0008 1422 0000 0000 0000 0000 0000 7e00
- 0008 0400 0000 0000 0000 1c02 1e22 1e00 0020 203c 2222 3c00 0000 1e20 2020 1e00
- 0002 021e 2222 1e00 0000 1c22 3c20 1e00 000c 101c 1010 1000 0000 1c22 221e 021c
- 0020 202c 3222 2200 0008 0018 0808 0400 0008 0008 0808 4830 0020 2428 3028 2400
- 0010 1010 1010 0c00 0000 6854 5454 5400 0000 5864 4444 4400 0000 3844 4444 3800
- 0000 7844 4478 4040 0000 3c44 443c 0406 0000 2c30 2020 2000 0000 3840 3804 7800
- 0010 103c 1010 0c00 0000 4444 4444 3800 0000 4444 2828 1000 0000 4454 5454 2800
- 0000 4428 1028 4400 0000 4444 443c 0438 0000 7c08 1020 7c00 000c 0810 1008 0c00
- 0008 0808 0808 0800 0030 1008 0810 3000 0000 0032 4c00 0000 3c42 99a1 a199 423c
-]
-
-@icon_icn1 [
- 0000 030f 1f1e 3c38
- 0000 c0f0 f878 3c1c
- 383c 1e1f 0f03 0000
- 1c3c 78f8 f0c0 0000
-]
-
-@icon_icn2 [
- ffff fdc2 fdc0 ffc0
- ffff ffff ff03 ff03
- ffc0 ffc0 ffff ffff
- ff03 ff02 fdf9 f1ef
-]
-
-@icon_icn3 [
- 0001 0307 0f1f 3e7c
- 0080 c0e0 f0f8 7c3e
- 7c3e 1f0f 0703 0100
- 3e7c f8f0 e4ca 8400
-]
-
-@image [
-
-0000 0802 1001 0410
-0095 0055 0024 0154
-114a 2114 a209 5005
-2552 09a5 540a a114
-5548 2651 aa4a 25a8
-5592 4955 aa44 2aa9
-5555 554a aaaa 5555
-556d abaa b5d6 555b
-b65b 6aad b6d5 5b6c
-db6d b6d5 bb56 bbd5
-6db6 db6d b6db 6ab7
-b6db 6db6 db6a af74
-db6d b6db 6db6 dbad
-6db6 db6d b6db 6cb5
-bbd7 6e9f bf7e fcf8
-ff7c f0e0 8080 0000
-0000 0101 0101 0301
-f0e0 e0e1 c2d2 c385
-375a ef55 faaf 55fa
-77da 6fb5 da6f b5da
-77da 6fb5 da6f b5da
-77da 6eb5 db6d b6db
-bbd6 edb6 5bed b7ba
-deb5 dbb6 dd6d b7db
-dfbe 7cf8 f0e1 e4c1
-070a 1d36 5b6d b66d
-77da b7dd 6bbd ebb6
-77da b76d b66d b6db
-77da 6fb5 dab7 dd6b
-77da 6fb5 da6f b56e
-77da 6db6 db6d b6db
-76da adf6 5bad f75a
-0002 1000 0421 0004
-0190 0540 1500 5401
-500a 4114 4210 8a21
-a214 4229 9442 9520
-924a a924 9255 49a5
-9549 55a4 552a 4955
-5555 2aaa 55aa 5555
-6aad abad 6aab b556
-ab55 6e55 da6d 56ab
-6eb5 aeb5 db6d b6ab
-da6d b6db 6d56 fb4d
-dbad d67b add6 7baa
-f65b adea 5ae5 57be
-ab6f aa9f f6bf eaf9
-e35e fff6 dfa8 57ba
-fadd f7be ef10 efb5
-0383 ebbb f75f a75b
-8a8f 8916 910a 5538
-af55 f6ab 5dea 5f6a
-6fb5 da6f b5da 6db7
-6fb5 da6f b5d6 6db7
-6db7 da6d b6db 6db6
-57fa adb6 db6d b6db
-6fdf bede 7cf8 f8f0
-8203 0d0b 162d 365b
-db6d b66f dab7 da6f
-5bed b65b ed76 adf6
-6db7 dd6b bdeb b6db
-bd6b b66d b66d db6d
-b56f dab5 dfb5 6db6
-6db6 db6d b65b edb6
-adf6 5bad f65b adf6
-1000 0520 0210 0124
-9441 1401 5401 4812
-1442 1442 114a 208a
-9522 9442 1449 9224
-14aa 45a9 144a a42a
-aa55 4a2a aaaa aa55
-aa55 ab55 aaab ad55
-da55 566a ad56 6aad
-da55 b7da 55af d56a
-dd6a 5bed 566b bdd6
-b6db 6db6 db6d b6da
-ac73 af9b 7e6b bff4
-dbff 54fd d2cd 36aa
-a69b 6aad b6db aadb
-d55b ed56 db6d b556
-55ba 57ea 5d6b b6db
-b6d7 76ae de6e b65c
-0e23 3c2b 2d36 2b35
-5b2d b65b aacd 6bb5
-da6d b7da adf7 2add
-da6d b7da 6db7 aadd
-db6d b6db 6db6 db6d
-6db7 d77f afdf 7fbf
-e0e8 e181 c285 9305
-adf6 5bad d268 934e
-b5dd 6bad bfe9 965b
-5b44 ffbd 4751 ef5a
-6db6 cbfd 774d 74db
-b6db 6d36 d5fd b75f
-db6d b6db 6d56 e9bf
-5bed b65b edb6 55aa
-5bad f655 bbd6 5baa
-0012 4002 0821 0009
-802a 0148 2500 5402
-4429 4491 2492 4492
-8924 9225 914a a412
-49a5 2a52 29a5 9555
-4a55 aa55 5555 5555
-aa55 ab55 5a55 566a
-b556 5a6a abad b5aa
-adab d5ad 556b 55ad
-5bad 75ae 6bb5 5eab
-6db5 5aeb 5bea b156
-bae5 abd5 2e55 b5ae
-db6d 55b6 db55 b6db
-6d56 b5db 556e b5db
-ebbd 55aa 77a8 d450
-556d b4c0 0000 0000
-ac0e 0c0c 0c0c 0c04
-0e02 0201 0000 0000
-d6ab f555 db69 5d69
-b66b bd56 eb5d 6ab7
-b76a bdd7 6abd d76a
-b6db 6db6 da6d b6db
-ff7d 5fde 9e9e 9c0e
-0e4a 141b 223d 2b5d
-33cd 36db b5de 6bb5
-ad76 db6d b6da 6880
-b7da 6fb5 da4b 0000
-6db6 db6d b6db 6d16
-a1fe 55bb d66d b6db
-7eab aa76 dbad f65b
-fffb afd5 6abd d66b
-fdef 7ddf 6da7 d96e
-2002 0821 0410 4208
-2984 2214 4229 8452
-2492 4992 4924 924a
-aa52 4a29 a555 9552
-a9a5 5555 2955 55aa
-552a 5556 5a55 55aa
-55ad 55d5 ad55 6aad
-55b6 555a ab6d aab5
-b5aa 55aa 6bb5 aedb
-75ae dbb5 6eb6 d96f
-e5aa 55ae f5d5 adb6
-6ab5 add6 5a6b adb5
-aa6d b6ab da6d 4535
-6dab dd6a adb5 5000
-4050 b4db 6daa 2d02
-0000 0000 c0a0 b8d4
-0c0c 080c 0808 0808
-0000 0000 0000 0000
-2d29 1d15 1516 050a
-5aef 55ba 6fd5 bad7
-dd6b bdd7 6abd d66b
-6db4 5aec b5ac ec59
-3c0c 7c5c 6cac f554
-6a37 ad76 ad76 5868
-de68 a0c0 0000 0000
-0000 0000 0000 0000
-0000 0000 0000 0000
-0b00 0000 0000 0000
-6db6 5b15 0601 0000
-d5be d56f b55b 6d16
-bdd6 6bbd 6ab7 5aed
-b5df 69b6 db6d b6db
-0251 0410 4200 1401
-0954 2289 2492 4914
-2592 544a a52a 5295
-4aaa aa95 55aa 5555
-a5aa aa55 5aab 556a
-55aa b655 ab6d 55aa
-b6aa db55 6d56 b5ab
-d6ab 6d5a afd5 765b
-b55d abf6 5a6f b5d6
-b756 ee9d fd3a 75f6
-55b5 d65a aaa9 6ca4
-55aa a0c4 a000 8000
-48a0 4000 0209 2650
-0000 04b2 4abf dd03
-0200 8050 aa54 eaf5
-aada 552d 160a 0b05
-0808 0808 8888 4848
-0000 0000 0001 0102
-1f12 3b55 b65b adf6
-6db6 db6d b6db 55de
-bdd6 6bb5 de6b adb6
-b9d9 53ba b375 a5e6
-b66c b6d6 6e56 fea7
-50a0 6040 6020 a020
-0000 0000 0000 0000
-0000 0000 0000 0001
-0000 0002 0d36 db6d
-0000 2fd5 bbd5 7eab
-0000 fe55 6eb5 da6f
-0502 a1dc b7da ad77
-b6db 6d56 bbd5 6eb5
-ad76 abdd 6ab7 da6d
-4802 1005 4015 0054
-4295 4924 520a a94a
-554a 2aa9 aaaa 2aaa
-55aa aa55 abad aaaa
-55ab d55a 5556 b5d5
-6d56 6bad b5aa 6db6
-6db5 566b b5de 53dd
-6aad db6d b6ab 7dab
-bbab 76af ef5e bf7e
-f5e9 ecd4 d4ab a9a8
-5050 a020 0800 00a0
-0101 040a 132a 1656
-0040 8504 1008 1408
-0000 6804 0804 040a
-ba7e 3b3f 1f3b 3f3f
-8542 4241 a1c0 60d0
-88e8 8868 a8a0 d8a0
-0506 0b15 2e2a 5bad
-55ae 75ad d6bb 55dd
-6ab7 da6d b6aa 6db7
-db6d b5db adeb 5dab
-6b6d 4a5b 565b 556e
-5bef b75b eb5b b7db
-2020 40a0 2080 2020
-0000 0000 0000 0001
-0305 0c13 354a 9440
-565b ad6a b680 0000
-da6f b5da ab00 0000
-d57d aadf 6956 0b00
-aadd b76a bdd7 6abb
-db6d b6db 6a5d eb5d
-b65b ed55 db6d b65b
-0228 0251 0422 1442
-a412 aa24 924a a915
-aaa5 9aa5 aaaa 2a55
-b555 ab55 aaad aa55
-565a 6b55 aa6d aa56
-abd5 5b6d aab6 dbaa
-6a57 6db5 dbad 76ab
-dd6a b75b b76e df5f
-7bfd faee b4f6 d9ac
-2854 54aa aa28 8040
-0000 0001 8001 0001
-5eae 5f7b bf7d efff
-0a05 00c0 d0ff 76ff
-5440 0103 1ffd efba
-77fd bff7 7efb dfb7
-e8e0 b0f0 f0d2 eac5
-524a 452a abca ad56
-d5bb d5ae 6ab5 afd5
-6a57 baab da6d 56b5
-da55 dd6a aeb5 da6d
-dd6a b6db aab6 da6b
-35db 566b 5daa 6d57
-6eb6 de6c acec 58b8
-20a0 3050 516d b6db
-0003 057a 4cb0 d050
-4000 0002 0a17 5b5f
-0015 aaaf f8a0 e080
-0055 fadf 0700 0090
-0000 a0d0 eafc 7f1b
-5516 0b01 0000 4000
-abf5 5b4d 72ab 5509
-ed56 6bbd d556 6b5d
-114a 0154 0229 0452
-4955 2495 524a aa25
-552a aa55 aaa5 5555
-56aa b555 aa56 5a6a
-b5d6 555a abd5 add5
-6db6 abda 576a b75a
-ddb6 6abd d56b b7af
-bdff f6dd fef5 f6ab
-d569 adb2 aa65 aa4a
-b450 55a0 ad50 aeb2
-0002 0000 00a0 08a5
-dbff fdaa 0000 026d
-b7f8 8000 022d d556
-c000 0015 d65a 6aab
-0000 00bf c9b5 a040
-150a 0dd5 165a 2b2d
-95db 2aad b6ab 555a
-6a5d d66b b55a add7
-db6d aab7 5aeb 5a6d
-ab6d b65b ea5b add5
-ad75 ae6a b7da 556e
-6a5d abf6 5aad d7ba
-d971 b1a1 e243 62c5
-5576 ad56 fa4a f44a
-4081 8102 0503 0507
-be77 ffde fffa bfff
-820a 0808 140c 0505
-4804 0201 0002 056a
-1f0f 8607 8707 0587
-d0a0 d8e8 f4fa bafd
-0d05 0000 0000 8000
-aa17 3a4d 162a 0b15
-0944 2215 4015 4a21
-5492 4a2a a94a 2a49
-aa95 aa52 55aa aa55
-ab55 adb5 55aa ad56
-5a6b 55ad 56eb 5aad
-aa6d b65b ea5d abb6
-dfbf bd7f feee fdfd
-f5ad b5aa d5ac 55b4
-55aa 2a55 55aa 55aa
-55aa d556 55aa 55aa
-55aa b6aa 55aa 56b5
-55aa b6d5 55ab ad55
-6aad d556 6a55 5b6a
-adb4 50a0 956a 55ad
-0000 022a a9aa 54aa
-34ab 555d 66b5 9aeb
-ad6b ad55 b6aa b65a
-6a5b ad6a b6d5 add6
-b655 b6db aa6d aab6
-bb55 db6d aab6 aadb
-b556 6bb5 add6 ba55
-55ee 556b b5d9 a9b1
-83c5 8682 8685 8586
-60a0 b8d6 aa8b 0180
-0203 0328 d45b 6daa
-f7ff bdf7 3f8f 45f1
-01c0 e0b0 fcff b7ff
-aa00 0000 05ff fff7
-0f1e 377f fdef bffd
-f6df fffd dfff 76ff
-8040 40a0 a8d0 d0e8
-0a00 0100 0300 0000
-4a12 4904 5209 5402
-a52a 548a 524a aa12
-2aaa aaaa a5aa 55aa
-b5aa aaad 55b6 55aa
-b5d6 ab6d b5aa 5bd5
-57ef 5d5f b7bf 7e7b
-daf6 faaa eab5 d6aa
-a9a5 d5a5 aa44 95aa
-5555 5555 aa95 55aa
-5555 5555 aa55 55aa
-55aa 5556 aa55 55aa
-6aaa adaa ab55 55aa
-aaad 55ab 6d55 55aa
-d55a 6b55 555a 6baa
-6a8a 5536 5552 59a2
-2dd5 55b6 5ad5 56aa
-6baa 55b6 d55b aad5
-6ab5 aeaa 555b 8a45
-d55b add5 6a5b adb5
-556d 56b5 d65a 55ad
-ae72 adab b5d6 5aab
-d3a9 51a1 7181 e151
-8285 8682 8583 c582
-c040 a0d0 685e abb5
-5b2d 0b05 0201 4050
-5c55 6bb5 ae6a b655
-6e1f 45a1 b8d6 aab6
-deff ffb6 7f0d 83a0
-f7ff bff7 fffd b77f
-ffdb 7fff f6bf ffed
-ea74 f4da f9f5 baf4
-0000 0000 0000 8000
-5402 5409 520a 4529
-ca29 aa55 9552 4a2a
-aa55 aa55 55aa aaab
-b556 aa55 55aa d62a
-5aad d55b 67af addf
-ffef fefe b5fe fab5
-b555 aad4 55a8 a255
-2a55 4aa9 2aaa a554
-aa55 aa55 aa92 55aa
-aa55 aa55 aaaa 55aa
-b555 aa55 aaaa 55aa
-565a aa55 aaaa 55aa
-dbaa aa55 aaad 55aa
-54b5 d554 aa52 aab2
-a151 4181 8181 8182
-6d55 566a 555a 55ab
-5b6d aaab b5aa 566a
-4502 8141 0080 8080
-55da 565a aa55 6d2a
-6aad d5b6 d555 adb5
-b55b aad6 5a6b ad55
-4361 82c2 a344 4642
-c282 c2c2 e1e2 e1e2
-daad d6b5 56db 6aad
-d65a eb55 b65b d55a
-5aad 564b ea35 d65b
-da6b ad6a b7aa db6d
-d054 6bb5 5bd5 5b6c
-0e01 2048 5368 adb6
-ff77 0400 0075 02a8
-f040 0000 027a 954a
-0000 0000 80a0 7897
-0452 1542 294a 114a
-aaa9 4a29 55a5 2a92
-aa55 5555 5555 aa55
-d52a 6d55 5556 aa55
-5bbf af7d 7fef fdbf
-faea 6aea dad5 aaaa
-a5a9 8aa5 942a 492a
-2a52 aa2a a595 54aa
-aa95 55aa 5552 aaaa
-554a 55aa 55aa a595
-55aa 55aa 554a 5555
-55aa 55aa 55aa 5555
-55aa 6daa 55aa 5555
-55aa 55aa 55aa 555a
-0182 0202 0585 0a8a
-55b6 aaaa 555b aaaa
-55ad b5d5 5555 aab5
-0000 8000 0080 0080
-2b15 160a 0b05 0a05
-566a add5 565a aa6a
-b5d6 5aaa b5d6 aab5
-95a6 8aa5 4aa5 9625
-e2e2 e262 f262 b263
-d5b6 aadb aab5 d65a
-adb5 d65a abb5 d5ad
-aa6d b5d6 556b ad55
-aa56 b5db 555a 6aad
-abd5 6d56 b5ab da6b
-55b6 55da 566a ad6a
-6bad b5d5 aab6 abb5
-106e a956 b5d6 5a6a
-ea2a 5baa b5ad d6aa
-2412 4924 1249 2412
-55aa 2495 aa49 a52a
-4aa9 aa2a aa55 25aa
-ab5a aba7 b74f 5d9f
-f7ff ddfe 76de 7dfa
-5454 a9a9 a2a9 45a9
-a5aa 5229 954a 2955
-25aa 524a 5452 4a2a
-554a a9a5 95aa a554
-55aa 552a 52aa 2aa4
-54aa 4a55 aaa9 aa95
-aaaa aa55 9555 aa55
-aaaa aa55 5555 aa55
-aaaa aa55 5555 aa55
-95d5 aa55 5555 aa55
-556a ab55 5555 aa55
-56aa 556a 5556 aa55
-80c0 20d0 50a8 a856
-0a05 0a05 0a05 0a0b
-ad55 d65a aa55 d65a
-56aa b5ad aa6b adaa
-aaab 25aa 2556 25aa
-b252 52a5 92d5 52a5
-aaab d55b aab5 ad55
-b556 6a55 b6aa 5a6b
-b6aa b5ad b5d5 aa56
-abb5 aa5b ad6a abd5
-555a d65a 6baa 556d
-adb5 d6aa 5baa 6daa
-ad55 daab 55b5 56da
-ab55 ad6a 555a d5ab
-5a6b 55aa b6aa 556d
-4912 4412 4914 4215
-548a 52a9 15a4 522a
-aa95 5255 5594 aa55
-b75e bf7a 6ffd fddd
-6dfa fad5 f5b4 eaea
-4495 8924 2a92 4925
-9249 2aa9 a554 2552
-a94a 5552 29a5 5592
-4aaa 29a5 2a55 24aa
-aa95 5452 4a55 aa94
-aa52 aa95 a955 95a5
-49aa aa55 2955 4a55
-2aaa aa55 552a a555
-aaaa aa55 55aa 552a
-aaaa aa55 55aa 55aa
-aaaa aa55 55aa 55aa
-aaaa aa55 55aa 55aa
-a9ad d555 55aa 55aa
-144b 5555 55aa 55aa
-aa55 5555 56aa 55aa
-b555 55aa adaa 55aa
-25aa 55aa 56aa 55da
-55a5 aaaa a5a2 55a5
-6aad aaab 55b5 565a
-aaad b555 566a abad
-b556 aa75 96ea 2b5a
-5aab d55a add5 55b6
-aa56 b5ab 5aaa 56b5
-b5d6 5555 b6d5 aa56
-55aa 6dab ad55 b5d6
-5ad5 565a 6a55 55aa
-aa55 aadb aa55 aab6
-4015 0944 1224 0944
-9249 2a92 49a5 14aa
-a52b ab4a 574b ae4f
-f77b daf3 f6a3 ede5
-55e8 a554 d451 a84a
-544a 2592 5548 a512
-9453 4954 2594 524a
-4a55 24aa 49a5 548a
-524a a94a 5425 94aa
-52aa 5592 aa49 a555
-aa55 49aa 5549 2a55
-5452 2aaa 492a aa52
-aa95 aaa4 2aaa a554
-aa55 a995 aaa5 2aa9
-aa55 2a55 aa52 4a55
-aa55 aa55 aa55 aa52
-aa55 aa55 aa55 aa55
-aa55 aa55 aa55 aa55
-aa55 aa55 aa55 aa55
-b555 aa55 aa55 aa55
-5556 aa55 aa55 aa55
-55aa ab55 aa55 aa5a
-52a5 5552 a555 a5aa
-aa55 aab5 5555 55aa
-b255 aaad 5555 55aa
-aaaa b556 5555 55aa
-aaaa b5aa 565a 6aaa
-d5aa 56aa d5aa adb5
-b5aa adb5 55d5 5556
-55aa 55ad 5555 6aaa
-6daa 55aa 565a aad5
-55aa 55da aaab aa55
-1221 0a44 1104 5104
-2249 2a90 4a25 520a
-ad1f ad9f bb2f bd77
-add5 c555 a985 24a5
-5141 5220 4521 8442
-5524 9249 5522 9449
-2994 4a51 2a89 544a
-52a9 4a24 aa25 a994
-4955 92a9 4534 4aa4
-4a29 a42a 5592 a994
-a42a a5aa 5229 9552
-9555 5295 5452 2aa5
-522a aa49 aa95 402d
-a595 aa55 492a 04f0
-5552 aa2a 5295 a00a
-2aaa a995 5554 02d8
-aa95 5255 55aa 95a9
-aa55 aa55 2aa5 5555
-aa55 aa55 4a55 5455
-aa55 aa55 aa55 aa55
-aa55 aa55 aa55 aa55
-aa55 aa55 aa55 aa55
-a555 a54a aa4a aa4a
-5556 55aa aaaa abaa
-55aa 56aa b5aa 55aa
-55b6 d5aa 55aa 55aa
-55aa 55aa 55b6 55aa
-55aa 55aa 55ab 55aa
-55b5 55aa 556a 56aa
-555a 55aa 55d5 aaaa
-55aa 55ab 55aa aaaa
-6aaa 5555 56aa b5aa
-2208 4510 0452 0128
-a94a 2592 4825 4a21
-5f7d 76de fabd ecba
-244a 45a2 4924 8aa5
-8144 0249 0284 010a
-2592 492a 904a 2548
-2154 2a85 a855 02b4
-425a 8452 5512 a885
-528a a94a 2492 5549
-a552 2a92 a944 2a52
-4aa9 5492 4aa9 4aa5
-9452 a992 4556 a50a
-6ab7 aadd 6aaa 8000
-af5a edb6 dbaa 1501
-edb7 5aff 55aa 6a10
-6eb5 db7e abd5 2d02
-558a 65a4 d279 acd6
-55aa 25aa a955 9552
-55aa 25aa 552a 52aa
-4aa9 5555 4aaa a955
-aa55 2a55 aaa4 552a
-aa55 aa55 aaaa 55aa
-a54a aa4a a58a 55aa
-55aa aaaa 55aa 55aa
-55aa aaaa 55aa 55aa
-55aa aaaa 55aa 55aa
-55aa aaaa 55aa 55aa
-55aa adaa 55aa 55aa
-55aa 55aa 55aa 55aa
-55aa 55aa 55aa 55aa
-55aa 55aa 55aa 55aa
-55aa 55aa 55aa 55aa
-0550 0520 0a40 1500
-4a29 452b 8356 13a6
-f9da f259 f2d5 f2a5
-4885 5409 9248 1224
-810a 010a 0108 0510
-2548 2249 14a2 09a4
-09a4 5209 a429 4422
-5522 9449 2452 8954
-2492 4a29 a492 2984
-8954 a512 a994 4529
-14aa 4552 2994 4a25
-9b54 28b4 50d0 a040
-0000 0010 0000 0000
-0000 0000 4200 0000
-0000 0041 0000 0000
-0000 4002 0000 0000
-ba55 2f15 0b0a 0502
-4a35 8a54 4aa5 d2a5
-4a55 aa92 aa55 4955
-aa49 55aa aa49 2a55
-aa55 52aa 9555 aa49
-9554 aa55 524a aa55
-55aa a955 aa95 5255
-24aa 5555 aa49 aa55
-95aa 5452 aa55 9552
-55aa aaa5 9555 55aa
-55aa aa55 552a 54a5
-55aa aa55 54aa a555
-55aa aa55 aaa4 5555
-55aa aa55 a495 5555
-55aa aa55 aa52 4a2a
-54a9 ab52 aa46 aca8
-5500 2a00 4a01 2802
-1745 9746 2b47 0da7
-e8a5 62c8 ca45 908a
-9208 2490 0a20 5408
-0409 0211 0412 000a
-114a 214a 208a 5184
-5402 5422 914a 218a
-8254 8952 0950 2548
-528a 2550 0aa5 10aa
-a452 09aa 4528 9249
-9255 4a25 5595 4a2a
-c040 8000 0000 0001
-0000 0001 154b 5a20
-0000 0055 6d5a 2c00
-0000 0120 a8de 6b00
-0002 0000 0090 403a
-0221 0100 0000 0000
-d269 5aa8 b65a 2b55
-aa24 95aa a552 2a49
-a995 524a 55a9 4a2a
-2a55 aa49 552a a495
-4a55 a955 25aa a94a
-aa55 2955 4aa9 2aa5
-9452 4a2a aa54 9255
-aaaa 95a9 a595 aa55
-55a9 4a2a 5554 aa49
-552a a9a5 5595 aa54
-55aa 492a 5555 aa92
-55a5 2aa9 552a a594
-542a aa52 4aaa 2aa5
-aaa9 a5aa 54a5 9455
-9850 30a0 61c1 c285
-4802 2802 2108 4208
-169b 571d 572b ae2b
-918a 4014 4210 8805
-5004 5088 2090 4820
-0015 000a 0114 0208
-2842 11a4 0944 2194
-2194 2248 0550 0aa1
-1244 9249 1288 5204
-05a8 4429 04a9 4492
-2492 4924 9224 9224
-9456 2894 54a8 50a8
-4102 0000 0000 0000
-0000 0000 0000 0000
-0000 0000 0000 0000
-0000 0000 0000 0000
-0c00 0000 0000 0000
-0004 8040 4020 0000
-2d15 160b 150a 0505
-554a a855 4aa5 a954
-52aa 924a 5524 5295
-52aa 9552 4aa9 5549
-aa49 2aa5 544a 2955
-5452 9554 a555 4925
-aa92 4aaa 5229 4a2a
-a94a a995 544a a955
-2aaa 522a a495 5552
-a555 aa92 aa52 2a94
-5455 4aa9 5492 aa95
-aa55 a42a a594 aa52
-aa55 92aa 49aa 9552
-5356 974c 5cb0 3061
-820a 1509 252a 5522
-2104 2108 2200 2500
-366e 2b6e 6a6e 6ab6
-a011 0882 2881 1082
-4810 a008 a010 8050
-0211 0805 1002 0802
-4210 4a01 5402 a804
-1481 5402 5108 a510
-5108 a510 4510 4a20
-0852 09a4 1144 9249
-9249 2288 2548 2249
-5050 4184 4000 2400
-2400 1100 4400 1082
-a500 1044 a84a 1240
-5200 0980 2682 0982
-4009 2004 a194 552a
-0000 2008 2200 49a0
-0000 0000 4000 2004
-0502 0201 0101 0000
-a5a9 aa64 525a a5b4
-4925 9452 9549 2492
-2455 9249 5524 9552
-924a 5549 24aa 2495
-aa52 492a a495 a42a
-a552 2994 a552 9549
-24aa 2592 5549 2a52
-944a 524a 542a 9249
-a594 52aa 924a a955
-52a9 954a a452 4a2a
-4a55 2492 aa55 9249
-a84b a957 865c 1870
-c284 8805 1029 49a2
-5592 4a29 a554 12aa
-2400 2401 2401 1105
-daee b56a eeb5 6ab6
-1184 0124 0208 2281
-0050 00a8 00a0 1040
-1004 0210 0500 1200
-a210 8a41 1441 1481
-8550 0a40 2a00 5500
-4a01 aa01 aa00 5402
-2248 1244 1188 4492
-12a4 11a4 09a2 1481
-02a0 0049 0050 8420
-0024 0002 2004 8011
-0210 8004 2001 4400
-2004 8010 4200 0820
-0188 2100 4400 9100
-2a49 0411 4004 0120
-4009 8054 0154 0104
-0000 0040 0800 4420
-525a 542a 2914 158a
-5592 49a4 12a9 0aa0
-4954 2592 a924 9249
-5249 2a92 4924 aa25
-924a 5294 4a25 a825
-a554 92aa 4924 9552
-29a5 9452 49a4 15a4
-5524 92aa 49a5 14aa
-2492 aa49 2554 9249
-a594 524a 29a5 944a
-55aa 914b 5224 9448
-62c1 0a84 122a 4924
-510a a1a5 5284 49a5
-4925 5425 9255 4825
-2105 1101 0521 0000
-6dd6 75b6 d576 0000
-0802 0805 1005 0000
-2088 4020 1040 0000
-0401 0802 0800 0000
-2409 4014 8025 0000
-5500 2580 2a00 0000
-500a 4015 4092 0000
-208a 2015 802a 0000
-5482 2904 a902 0000
-4a10 4010 4000 0000
-0000 1200 0000 0000
-0820 0104 2000 0000
-8200 0801 2000 0000
-0440 1002 0048 0000
-8400 2200 4400 0000
-2082 0800 4108 0000
-8800 2400 1201 0000
-0402 900a 500a 0000
-558a 4095 4992 0000
-2492 4924 5209 0000
-904a 2492 4924 0000
-92a4 4992 2492 0000
-2885 5229 8452 0000
-924a 2944 9249 0000
-a254 12a9 442a 0000
-a495 5229 8455 0000
-219a 442a a412 0000
-1081 4182 0500 0000
-aa25 512a 44aa 0000
-0254 0992 4984 0000
-9452 4925 5289 0000
-
-]
-
-|c000 @FRAME
-
- ( clear last cursor )
- #10 ,clear_icn ~mouse.x ~mouse.y ,draw-sprite JSR
- ( record mouse positions )
- #00 IOR2 =mouse.x #02 IOR2 =mouse.y
- ( record mouse state )
- #04 IOR #11 ADD =state
-
- #04 IOR #01 NEQ ,no-touch ROT JMP? POP2
- ,on-touch JSR
- @no-touch
-
- ( draw mouse )
- ~state ,cursor_icn ~mouse.x ~mouse.y ,draw-sprite JSR
-
-BRK
-
-|d000 @ERROR BRK
-|FFF0 [ 13fd 1ef3 1bf2 ] ( palette )
-|FFFA .RESET .FRAME .ERROR
diff --git a/uxn.c b/uxn.c
@@ -108,7 +108,7 @@ Uint8 opr[][2] = {
/* 16-bit */
{0,0}, {0,0}, {0,0}, {0,0}, {0,0}, {0,0}, {2,2}, {4,0}, /* TODO */
{0,0}, {0,0}, {0,0}, {0,0}, {0,0}, {0,0}, {0,0}, {0,0}, /* TODO */
- {0,0}, {0,0}, {0,0}, {0,0}, {0,0}, {1,0}, {0,1}, {0,0}, /* TODO */
+ {0,0}, {0,0}, {0,0}, {0,0}, {0,0}, {2,0}, {0,2}, {0,0}, /* TODO */
{4,2}, {4,2}, {4,2}, {4,2}, {4,2}, {4,2}, {4,2}, {4,2}
};