Browse code

Move DateTime to 0xc0, add second File to 0xb0.

Andrew Alderwick authored on 17/03/2022 18:57:22
Showing 14 changed files
... ...
@@ -34,8 +34,9 @@
34 34
 |60 @Audio3     &vector $2 &position $2 &output $1 &pad    $3 &adsr   $2 &length  $2 &addr    $2 &volume $1 &pitch $1
35 35
 |80 @Controller &vector $2 &button   $1 &key    $1 &func   $1
36 36
 |90 @Mouse      &vector $2 &x        $2 &y      $2 &state  $1 &pad    $3 &scrollx $2 &scrolly $2
37
-|a0 @File       &vector $2 &success  $2 &stat   $2 &delete $1 &append $1 &name    $2 &length  $2 &read   $2 &write $2
38
-|b0 @DateTime   &year   $2 &month    $1 &day    $1 &hour   $1 &minute $1 &second  $1 &dotw    $1 &doty   $2 &isdst $1
37
+|a0 @File0      &vector $2 &success  $2 &stat   $2 &delete $1 &append $1 &name    $2 &length  $2 &read   $2 &write $2
38
+|b0 @File1      &vector $2 &success  $2 &stat   $2 &delete $1 &append $1 &name    $2 &length  $2 &read   $2 &write $2
39
+|c0 @DateTime   &year   $2 &month    $1 &day    $1 &hour   $1 &minute $1 &second  $1 &dotw    $1 &doty   $2 &isdst $1
39 40
 
40 41
 ( variables )
41 42
 
... ...
@@ -3,7 +3,7 @@
3 3
 |00 @System     [ &vector $2 &pad      $6 &r      $2 &g     $2 &b      $2 ]
4 4
 |20 @Screen     [ &vector $2 &width    $2 &height $2 &pad   $2 &x      $2 &y      $2 &addr $2 &pixel $1 &sprite $1 ]
5 5
 |90 @Mouse      [ &vector $2 &x        $2 &y      $2 &state $1 &wheel  $1 ]
6
-|b0 @DateTime   [ &year   $2 &month    $1 &day    $1 &hour  $1 &minute $1 &second $1 &dotw $1 &doty $2 &isdst $1 ]
6
+|c0 @DateTime   [ &year   $2 &month    $1 &day    $1 &hour  $1 &minute $1 &second $1 &dotw $1 &doty $2 &isdst $1 ]
7 7
 |80 @Controller [ &vector $2 &button   $1 &key    $1 ] 
8 8
 
9 9
 |0000
... ...
@@ -8,7 +8,7 @@
8 8
 
9 9
 |00 @System     [ &vector $2 &wst      $1 &rst    $1 &pad   $4 &r      $2 &g      $2 &b    $2 &debug  $1 &halt $1 ]
10 10
 |20 @Screen     [ &vector $2 &width    $2 &height $2 &pad   $2 &x      $2 &y      $2 &addr $2 &pixel  $1 &sprite $1 ]
11
-|b0 @DateTime   [ &year   $2 &month    $1 &day    $1 &hour  $1 &minute $1 &second $1 &dotw $1 &doty   $2 &isdst $1 ]
11
+|c0 @DateTime   [ &year   $2 &month    $1 &day    $1 &hour  $1 &minute $1 &second $1 &dotw $1 &doty   $2 &isdst $1 ]
12 12
 
13 13
 ( variables )
14 14
 
... ...
@@ -37,7 +37,7 @@
37 37
 |80 @Controller [ &vector $2 &button   $1 &key    $1 ]
38 38
 |90 @Mouse      [ &vector $2 &x        $2 &y      $2 &state $1 &wheel  $1 ]
39 39
 |a0 @File       [ &vector $2 &success  $2 &stat   $2 &delete $1 &append $1 &name  $2 &length $2 &read $2 &write $2 ]
40
-|b0 @DateTime   [ &year   $2 &month    $1 &day    $1 &hour  $1 &minute $1 &second $1 &dotw $1 &doty   $2 &isdst $1 ]
40
+|c0 @DateTime   [ &year   $2 &month    $1 &day    $1 &hour  $1 &minute $1 &second $1 &dotw $1 &doty   $2 &isdst $1 ]
41 41
 
42 42
 ( variables )
43 43
 
... ...
@@ -22,7 +22,7 @@
22 22
 |20 @Screen     [ &vector $2 &width    $2 &height $2 &pad   $2 &x      $2 &y      $2 &addr $2 &pixel  $1 &sprite $1 ]
23 23
 |30 @Audio0     [ &vector $2 &position $2 &output $1 &pad   $3 &adsr   $2 &length $2 &addr $2 &volume $1 &pitch $1 ]
24 24
 |80 @Controller [ &vector $2 &button   $1 &key    $1 ]
25
-|b0 @DateTime   [ &year   $2 &month    $1 &day    $1 &hour  $1 &minute $1 &second $1 &dotw $1 &doty   $2 &isdst $1 ]
25
+|c0 @DateTime   [ &year   $2 &month    $1 &day    $1 &hour  $1 &minute $1 &second $1 &dotw $1 &doty   $2 &isdst $1 ]
26 26
 
27 27
 ( variables )
28 28
 
... ...
@@ -29,7 +29,7 @@
29 29
 |80 @Controller [ &vector $2 &button   $1 &key    $1 ]
30 30
 |90 @Mouse      [ &vector $2 &x        $2 &y      $2 &state $1 &wheel  $1 ]
31 31
 |a0 @File       [ &vector $2 &success  $2 &stat   $2 &delete $1 &append $1 &name  $2 &length $2 &read $2 &write $2 ]
32
-|b0 @DateTime   [ &year   $2 &month    $1 &day    $1 &hour  $1 &minute $1 &second $1 &dotw $1 &doty   $2 &isdst $1 ]
32
+|c0 @DateTime   [ &year   $2 &month    $1 &day    $1 &hour  $1 &minute $1 &second $1 &dotw $1 &doty   $2 &isdst $1 ]
33 33
 
34 34
 
35 35
 |0000
... ...
@@ -6,7 +6,7 @@
6 6
 
7 7
 |00 @System     [ &vector $2 &wst      $1 &rst    $1 &pad   $4 &r      $2 &g      $2 &b    $2 &debug  $1 &halt $1 ]
8 8
 |20 @Screen     [ &vector $2 &width    $2 &height $2 &pad   $2 &x      $2 &y      $2 &addr $2 &pixel  $1 &sprite $1 ]
9
-|b0 @DateTime   [ &year   $2 &month    $1 &day    $1 &hour  $1 &minute $1 &second $1 &dotw $1 &doty   $2 &isdst $1 ]
9
+|c0 @DateTime   [ &year   $2 &month    $1 &day    $1 &hour  $1 &minute $1 &second $1 &dotw $1 &doty   $2 &isdst $1 ]
10 10
 
11 11
 ( variables )
12 12
 
... ...
@@ -3,7 +3,7 @@
3 3
 |00 @System     [ &vector $2 &pad      $6 &r      $2 &g     $2 &b      $2 ]
4 4
 |10 @Console    [ &vector $2 &read     $1 &pad    $5 &write $1 &error  $1 ]
5 5
 |20 @Screen     [ &vector $2 &width    $2 &height $2 &auto  $1 &pad    $1 &x      $2 &y      $2 &addr $2 &pixel $1 &sprite $1 ]
6
-|b0 @DateTime   [ &year   $2 &month    $1 &day    $1 &hour  $1 &minute $1 &second $1 &dotw $1 &doty $2 &isdst $1 ]
6
+|c0 @DateTime   [ &year   $2 &month    $1 &day    $1 &hour  $1 &minute $1 &second $1 &dotw $1 &doty $2 &isdst $1 ]
7 7
 
8 8
 |0000
9 9
 
... ...
@@ -47,7 +47,7 @@
47 47
 |20 @Screen     &vector $2 &width   $2 &height $2 &auto  $1 &pad   $1 &x     $2 &y $2 &addr $2 &pixel $1 &sprite $1
48 48
 |80 @Controller &vector $2 &button $1 &key    $1
49 49
 |a0 @File       &vector $2 &success  $2 &stat   $2 &delete $1 &append $1 &name    $2 &length  $2 &read   $2 &write $2
50
-|b0 @DateTime   [ &year   $2 &month    $1 &day    $1 &hour  $1 &minute $1 &second $1 &dotw $1 &doty $2 &isdst $1 ]
50
+|c0 @DateTime   [ &year   $2 &month    $1 &day    $1 &hour  $1 &minute $1 &second $1 &dotw $1 &doty $2 &isdst $1 ]
51 51
 
52 52
 ( variables )
53 53
 
... ...
@@ -37,7 +37,7 @@
37 37
 |80 @Controller &vector $2 &button   $1 &key    $1
38 38
 |90 @Mouse      &vector $2 &x        $2 &y      $2 &state  $1 &pad    $3 &scrollx $2 &scrolly $2
39 39
 |a0 @File       &vector $2 &success  $2 &stat   $2 &delete $1 &append $1 &name $2 &length $2 &read $2 &write $2
40
-|b0 @DateTime   &year   $2 &month    $1 &day    $1 &hour   $1 &minute $1 &second $1 &dotw $1 &doty $2 &isdst $1
40
+|c0 @DateTime   &year   $2 &month    $1 &day    $1 &hour   $1 &minute $1 &second $1 &dotw $1 &doty $2 &isdst $1
41 41
 
42 42
 ( variables )
43 43
 
... ...
@@ -40,7 +40,7 @@
40 40
 |00 @System [ &vector $2 &pad $6 &r $2 &g $2 &b $2 ]
41 41
 |10 @Console    [ &vector $2 &read     $1 &pad    $5 &write $1 &error  $1 ]
42 42
 |20 @Screen [ &vector $2 &width $2 &height $2 &auto $1 &pad $1 &x $2 &y $2 &addr $2 &pixel $1 &sprite $1 ]
43
-|b0 @DateTime [ &year $2 &month $1 &day $1 &hour $1 &minute $1 &second $1 &dotw $1 &doty $2 &isdst $1 ]
43
+|c0 @DateTime [ &year $2 &month $1 &day $1 &hour $1 &minute $1 &second $1 &dotw $1 &doty $2 &isdst $1 ]
44 44
 
45 45
 ( variables )
46 46
 
... ...
@@ -10,7 +10,7 @@ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 10
 WITH REGARD TO THIS SOFTWARE.
11 11
 */
12 12
 
13
-#define POLYFILEY 1
13
+#define POLYFILEY 2
14 14
 
15 15
 void file_i_deo(int instance, Device *d, Uint8 port);
16 16
 Uint8 file_i_dei(int instance, Device *d, Uint8 port);
... ...
@@ -116,9 +116,9 @@ start(Uxn *u)
116 116
 	/* empty    */ uxn_port(u, 0x7, nil_dei, nil_deo);
117 117
 	/* empty    */ uxn_port(u, 0x8, nil_dei, nil_deo);
118 118
 	/* empty    */ uxn_port(u, 0x9, nil_dei, nil_deo);
119
-	/* file     */ devfile0 = uxn_port(u, 0xa, file_dei, file_deo);
120
-	/* datetime */ uxn_port(u, 0xb, datetime_dei, nil_deo);
121
-	/* empty    */ uxn_port(u, 0xc, nil_dei, nil_deo);
119
+	/* file0    */ devfile0 = uxn_port(u, 0xa, file_dei, file_deo);
120
+	/* file1    */ uxn_port(u, 0xb, file_dei, file_deo);
121
+	/* datetime */ uxn_port(u, 0xc, datetime_dei, nil_deo);
122 122
 	/* empty    */ uxn_port(u, 0xd, nil_dei, nil_deo);
123 123
 	/* empty    */ uxn_port(u, 0xe, nil_dei, nil_deo);
124 124
 	/* empty    */ uxn_port(u, 0xf, nil_dei, nil_deo);
... ...
@@ -265,9 +265,9 @@ start(Uxn *u, char *rom)
265 265
 	/* unused   */ uxn_port(u, 0x7, nil_dei, nil_deo);
266 266
 	/* control  */ devctrl = uxn_port(u, 0x8, nil_dei, nil_deo);
267 267
 	/* mouse    */ devmouse = uxn_port(u, 0x9, nil_dei, nil_deo);
268
-	/* file     */ devfile0 = uxn_port(u, 0xa, file_dei, file_deo);
269
-	/* datetime */ uxn_port(u, 0xb, datetime_dei, nil_deo);
270
-	/* unused   */ uxn_port(u, 0xc, nil_dei, nil_deo);
268
+	/* file0    */ devfile0 = uxn_port(u, 0xa, file_dei, file_deo);
269
+	/* file1    */ uxn_port(u, 0xb, file_dei, file_deo);
270
+	/* datetime */ uxn_port(u, 0xc, datetime_dei, nil_deo);
271 271
 	/* unused   */ uxn_port(u, 0xd, nil_dei, nil_deo);
272 272
 	/* unused   */ uxn_port(u, 0xe, nil_dei, nil_deo);
273 273
 	/* unused   */ uxn_port(u, 0xf, nil_dei, nil_deo);