... | ... |
@@ -181,6 +181,7 @@ loadtheme(Uint8 *addr) |
181 | 181 |
theme[2] = ((r + (r << 4)) << 16) + ((g + (g << 4)) << 8) + (b + (b << 4)); |
182 | 182 |
r = *(addr + 1) & 0xf, g = *(addr + 3) & 0xf, b = *(addr + 5) & 0xf; |
183 | 183 |
theme[3] = ((r + (r << 4)) << 16) + ((g + (g << 4)) << 8) + (b + (b << 4)); |
184 |
+ screen.reqdraw = 1; |
|
184 | 185 |
} |
185 | 186 |
|
186 | 187 |
void |
... | ... |
@@ -371,7 +372,7 @@ sprite_poke(Uint8 *m, Uint16 ptr, Uint8 b0, Uint8 b1) |
371 | 372 |
Uint8 |
372 | 373 |
system_poke(Uint8 *m, Uint16 ptr, Uint8 b0, Uint8 b1) |
373 | 374 |
{ |
374 |
- printf("system_poke\n"); |
|
375 |
+ loadtheme(&m[0xfff8]); |
|
375 | 376 |
return b1; |
376 | 377 |
} |
377 | 378 |
|
... | ... |
@@ -442,7 +443,7 @@ main(int argc, char **argv) |
442 | 443 |
devkey = portuxn(&u, "key", ppnil, ppnil); |
443 | 444 |
devmouse = portuxn(&u, "mouse", ppnil, ppnil); |
444 | 445 |
|
445 |
- u.devices = 7; |
|
446 |
+ u.devices = 15; /* pad to last device */ |
|
446 | 447 |
devsystem = portuxn(&u, "system", ppnil, system_poke); |
447 | 448 |
|
448 | 449 |
/* Write screen size to dev/screen */ |
... | ... |
@@ -3,6 +3,7 @@ |
3 | 3 |
&Screen { width 2 height 2 pad 4 x 2 y 2 color 1 } |
4 | 4 |
&Sprite { pad 8 x 2 y 2 addr 2 color 1 } |
5 | 5 |
|
6 |
+;timer 1 |
|
6 | 7 |
;centerx 2 ;centery 2 ;i 2 ;j 1 |
7 | 8 |
|
8 | 9 |
|0100 @RESET |
... | ... |
@@ -47,7 +48,25 @@ BRK |
47 | 48 |
|
48 | 49 |
@icon [ 3c7e e7c3 c3e7 7e3c ] |
49 | 50 |
|
50 |
-|c000 @FRAME BRK |
|
51 |
+|c000 @FRAME |
|
52 |
+ |
|
53 |
+ ( update colors every 40 frames ) |
|
54 |
+ ~timer #40 NEQ ,skip1 ROT JMP? POP2 |
|
55 |
+ #0fac =fffa #f0bb =fffc #f053 =fff8 |
|
56 |
+ @skip1 |
|
57 |
+ ~timer #80 NEQ ,skip2 ROT JMP? POP2 |
|
58 |
+ #00fc =fffc #f0bb =fff8 #f053 =fffa |
|
59 |
+ @skip2 |
|
60 |
+ ~timer #c0 NEQ ,skip3 ROT JMP? POP2 |
|
61 |
+ #000f =fff8 #0f0f =fffa #ff00 =fffc |
|
62 |
+ @skip3 |
|
63 |
+ ~timer #00 NEQ ,skip4 ROT JMP? POP2 |
|
64 |
+ #f0ac =fff8 #f0bb =fffa #f053 =fffc |
|
65 |
+ @skip4 |
|
66 |
+ ~timer #01 ADD =timer |
|
67 |
+ |
|
68 |
+BRK |
|
69 |
+ |
|
51 | 70 |
|d000 @ERROR BRK |
52 | 71 |
|
53 | 72 |
|FF10 ;dev/screen Screen |