We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f61d0c8 commit b0276d9Copy full SHA for b0276d9
examples/sms/libpsgtest.c
@@ -8,15 +8,32 @@ extern unsigned char music[];
8
static const unsigned char pal0[] =
9
{ 0x00, 0x3f };
10
11
+static const unsigned char pal1[] =
12
+{ 0x00, 0x03 };
13
+
14
+static const unsigned char *pal[] =
15
+{&pal0[1], &pal1[1]};
16
17
void isr(void)
18
{
19
+ static unsigned char flashDelay = 0;
20
+ static unsigned char palette = 0;
21
22
+ // Flash the text by swapping palette index 1
23
+ if(flashDelay++ & 0x10)
24
+ {
25
+ flashDelay = 0;
26
+ palette ^= 1;
27
+ load_palette((unsigned char *) pal[palette], 1, 1);
28
+ }
29
30
// Play the next frame of music
31
PSGFrame();
32
}
33
34
void main(void)
35
- int x = 0;
36
+ unsigned char x = 0;
37
38
// Clear the video RAM
39
clear_vram();
0 commit comments