Browse code

Started porting examples to new vectors

neauoire authored on 05/04/2021 18:58:26
Showing 5 changed files
... ...
@@ -28,7 +28,7 @@ else
28 28
 fi
29 29
 
30 30
 echo "Assembling.."
31
-./bin/assembler projects/software/left.usm bin/boot.rom
31
+./bin/assembler projects/examples/dev.controller.usm bin/boot.rom
32 32
 
33 33
 echo "Running.."
34 34
 if [ "${2}" = '--cli' ]; 
... ...
@@ -22,25 +22,22 @@
22 22
 
23 23
 ( devices )
24 24
 
25
-|0100 ;Console { pad 8 char 1 byte 1 short 2 string 2 }
26
-|0110 ;Screen { width 2 height 2 pad 4 x 2 y 2 color 1 }
27
-|0120 ;Sprite { pad 8 x 2 y 2 addr 2 color 1 }
28
-|0130 ;Controller { p1 1 }
29
-|0140 ;Keys { key 1 }
30
-|0150 ;Mouse { x 2 y 2 state 1 chord 1 }
31
-|0160 ;File { pad 8 name 2 length 2 load 2 save 2 }
32
-|0170 ;Audio { ch1adsr 2 ch2adsr 2 ch3adsr 2 ch4adsr 2 ch1vol 1 ch1pitch 1 ch2vol 1 ch2pitch 1 ch3vol 1 ch3pitch 1 ch4vol 1 ch4pitch 1 }
33
-|01F0 ;System { pad 8 r 2 g 2 b 2 }
25
+|0100 ;System { vector 2 pad 6 r 2 g 2 b 2 }
26
+|0110 ;Console { pad 8 char 1 byte 1 short 2 }
27
+|0120 ;Screen { vector 2 width 2 height 2 pad 2 x 2 y 2 color 1 }
28
+|0130 ;Sprite { pad 8 x 2 y 2 addr 2 color 1 }
29
+|0140 ;Controller { buttons 1 }
30
+|0150 ;Keys { key 1 }
31
+|0160 ;Mouse { x 2 y 2 state 1 chord 1 change 1 }
32
+|0170 ;File { pad 8 name 2 length 2 load 2 save 2 }
33
+|0180 ;Audio { ch1adsr 2 ch2adsr 2 ch3adsr 2 ch4adsr 2 ch1vol 1 ch1pitch 1 ch2vol 1 ch2pitch 1 ch3vol 1 ch3pitch 1 ch4vol 1 ch4pitch 1 }
34 34
 
35 35
 ( vectors )
36 36
 
37
-|0200 ^RESET JMP
38
-|0204 ,ERROR JMP2
39
-|0208 ,FRAME JMP2
40
-
41
-@RESET
37
+|0200 @RESET
42 38
 
43 39
 	( theme ) #e0fa =System.r #30fa =System.g #30fa =System.b
40
+	( vectors ) ,FRAME =Screen.vector
44 41
 
45 42
 	~Screen.width #0002 DIV2 DUP2 #0080 SUB2 =trkframe.x1
46 43
 	 #0080 ADD2 =trkframe.x2
... ...
@@ -4,14 +4,12 @@
4 4
 
5 5
 ( devices )
6 6
 
7
-|0100 ;Console { pad 8 char 1 byte 1 short 2 }
8
-|0200 ^RESET JMP
9
-|0204 ,ERROR JMP2
10
-|0208 ,FRAME JMP2
7
+|0100 ;System { vector 2 pad 6 r 2 g 2 b 2 }
8
+|0110 ;Console { vector 2 pad 6 char 1 byte 1 short 2 }
11 9
 
12 10
 ( program )
13 11
 
14
-@RESET 
12
+|0200 @RESET 
15 13
 	
16 14
 	,text1 ,print-label JSR2
17 15
 	,text2 ,print-label JSR2
... ...
@@ -10,18 +10,20 @@
10 10
 
11 11
 ( devices )
12 12
 
13
-|0100 ;Console { pad 8 char 1 byte 1 short 2 }
14
-|0110 ;Screen { width 2 height 2 pad 4 y 2 x 2 color 1 }
15
-|0120 ;Sprite { pad 8 x 2 y 2 addr 2 color 1 }
16
-|0130 ;Controller { p1 1 }
17
-|01F0 ;System { pad 8 r 2 g 2 b 2 }
18
-|0200 ^RESET JMP
19
-|0204 ,ERROR JMP2
20
-|0208 ,FRAME JMP2
21
-
22
-@RESET 
13
+|0100 ;System { vector 2 pad 6 r 2 g 2 b 2 }
14
+|0110 ;Console { pad 8 char 1 byte 1 short 2 }
15
+|0120 ;Screen { vector 2 width 2 height 2 pad 2 x 2 y 2 color 1 }
16
+|0130 ;Sprite { pad 8 x 2 y 2 addr 2 color 1 }
17
+|0140 ;Controller { p1 1 }
18
+|0150 ;Keys { key 1 }
19
+|0160 ;Mouse { x 2 y 2 state 1 chord 1 change 1 }
20
+|0170 ;File { pad 8 name 2 length 2 load 2 save 2 }
21
+|0180 ;Audio { ch1adsr 2 ch2adsr 2 ch3adsr 2 ch4adsr 2 ch1vol 1 ch1pitch 1 ch2vol 1 ch2pitch 1 ch3vol 1 ch3pitch 1 ch4vol 1 ch4pitch 1 }
22
+
23
+|0200 @RESET 
23 24
 
24 25
 	( theme ) #0daf =System.r #02ff =System.g #035f =System.b
26
+	( vectors ) ,FRAME =Screen.vector
25 27
 	
26 28
 	( set origin )
27 29
 	~Screen.width 2/ =Sprite.x 
... ...
@@ -45,6 +45,7 @@
45 45
 |0200 @RESET
46 46
 
47 47
 	( theme ) #e0fc =System.r #30cc =System.g #30ac =System.b
48
+	( vectors ) ,FRAME =Screen.vector
48 49
 
49 50
 	,FRAME =Screen.vector
50 51