Browse code

Started channel selector

neauoire authored on 03/04/2021 03:40:53
Showing 3 changed files
... ...
@@ -22,14 +22,12 @@ To build the Uxn emulator, you must have [SDL2](https://wiki.libsdl.org/).
22 22
 Read more in the [Uxambly Guide](https://wiki.xxiivv.com/site/uxambly.html).
23 23
 
24 24
 ```
25
-( hello world )
26
-
27 25
 %RTN { JMP2r }
28 26
 
29 27
 ( devices )
30 28
 
31 29
 |0100 ;Console { pad 8 char 1 byte 1 short 2 }
32
-|0200 ,RESET JMP2
30
+|0200 ^RESET JMP
33 31
 |0204 ,ERROR JMP2
34 32
 |0208 ,FRAME JMP2
35 33
 
... ...
@@ -63,21 +61,9 @@ RTN
63 61
 
64 62
 ## TODOs
65 63
 
66
-### OS Boot Disk
67
-
68
-- Load external disk in disk2
69
-
70
-### Assembler
71
-
72
-- Includes
73
-- Defines
74
-- Jump helpers
75
-- Implement Peek/Pook to helpers
76
-- Create a theme designer application
77
-- DateTime device
78
-- Document controller.player2
79
-
80
-## Notes
64
+- Shortcut to export/import disk state
65
+- Implement Uxambly REPL
66
+- Load disks at a different place than 0x0000.
81 67
 
82 68
 ## Palettes
83 69
 
... ...
@@ -28,7 +28,7 @@ else
28 28
 fi
29 29
 
30 30
 echo "Assembling.."
31
-./bin/assembler projects/examples/dev.audio.usm bin/boot.rom
31
+./bin/assembler projects/software/noodle.usm bin/boot.rom
32 32
 
33 33
 echo "Running.."
34 34
 if [ "${2}" = '--cli' ]; 
... ...
@@ -36,7 +36,7 @@
36 36
 
37 37
 @RESET
38 38
 
39
-	( theme ) #f0fd =System.r #f0c3 =System.g #f032 =System.b
39
+	( theme ) #e0fa =System.r #30fa =System.g #30fa =System.b
40 40
 
41 41
 	~Screen.width #0002 DIV2 #0080 SUB2 =frame.x1
42 42
 	~Screen.height #0002 DIV2 #0038 SUB2 =frame.y1
... ...
@@ -48,6 +48,12 @@
48 48
 	,draw-timeline JSR2
49 49
 	,draw-controls JSR2
50 50
 
51
+
52
+	~frame.x1 #0028 SUB2 ~frame.y2 #0010 ADD2 #06 ,ch1_txt ,draw-label JSR2
53
+	~frame.x1 #0028 SUB2 ~frame.y2 #0018 ADD2 #01 ,ch2_txt ,draw-label JSR2
54
+	~frame.x1 #0028 SUB2 ~frame.y2 #0020 ADD2 #01 ,ch3_txt ,draw-label JSR2
55
+	~frame.x1 #0028 SUB2 ~frame.y2 #0028 ADD2 #01 ,ch4_txt ,draw-label JSR2
56
+
51 57
 BRK
52 58
 
53 59
 @FRAME
... ...
@@ -60,7 +66,6 @@ BRK
60 66
 		,draw-position JSR2
61 67
 	$skip
62 68
 
63
-
64 69
 	~Mouse.state #00 EQU ,$click-end JNZ2
65 70
 
66 71
 		~Mouse.x ~frame.x1 GTH2 ~Mouse.x ~frame.x2 LTH2 #0101 EQU2
... ...
@@ -98,7 +103,7 @@ BRK
98 103
 	$skip
99 104
 	#00 SWP ,notes ADD2 PEK2
100 105
 	#0c #03 MUL SUB =Audio.ch1pitch
101
-	#44 =Audio.ch1vol
106
+	#11 =Audio.ch1vol
102 107
 	
103 108
 RTN
104 109
 
... ...
@@ -148,7 +153,7 @@ RTN
148 153
 		DUP STH #00 SWP #0e SWP SUB #0008 MUL2 ~frame.y1 ADD2 =Sprite.y
149 154
 		OVR #00 SWP #0008 MUL2 ~frame.x1 ADD2 =Sprite.x
150 155
 		,note2_icn =Sprite.addr
151
-		#01 STHr #00 EQU SUB =Sprite.color
156
+		#02 STHr #00 EQU SUB =Sprite.color
152 157
 		( incr ) SWP #01 ADD SWP
153 158
 		DUP2 LTH ^$notes-loop JNZ
154 159
 	POP2
... ...
@@ -269,7 +274,6 @@ RTN
269 274
 
270 275
 @draw-controls ( -- )
271 276
 	
272
-	~frame.x1 #0000 ADD2 ~frame.y2 #0008 ADD2 #01 ,ch1_txt ,draw-label JSR2
273 277
 	~frame.x1 #0000 ADD2 ~frame.y2 #0010 ADD2 #01 ,env_txt ,draw-label JSR2
274 278
 
275 279
 	~frame.x1 #0000 ADD2 ~frame.y2 #0020 ADD2 #00 ,draw-knob JSR2
... ...
@@ -299,7 +303,7 @@ RTN
299 303
 	,cursor_icn =Sprite.addr 
300 304
 	~pointer.x =Sprite.x 
301 305
 	~pointer.y =Sprite.y 
302
-	#11 ~Mouse.state #00 NEQ ADD =Sprite.color
306
+	#12 ~Mouse.state #00 NEQ ADD =Sprite.color
303 307
 
304 308
 RTN
305 309
 
... ...
@@ -364,8 +368,11 @@ RTN
364 368
 @note2_icn [ 0000 1c3e 3e3e 1c00 ]
365 369
 @head_icn [ 0018 1818 7e3c 1800 ]
366 370
 
367
-@ch1_txt [ Channel1 00 ]
368
-@env_txt [ Enveloppe 00 ]
371
+@ch1_txt [ SQR1 00 ]
372
+@ch2_txt [ SQR2 00 ]
373
+@ch3_txt [ TRI3 00 ]
374
+@ch4_txt [ WAV4 00 ]
375
+@env_txt [ Envelope 00 ]
369 376
 @vol_txt [ Volume 00 ]
370 377
 
371 378
 @notes [