aboutsummaryrefslogtreecommitdiffstats
path: root/src/uxn
diff options
context:
space:
mode:
authorBad Diode <bd@badd10de.dev>2021-05-19 14:26:30 +0200
committerBad Diode <bd@badd10de.dev>2021-05-19 14:26:30 +0200
commit60684bb15f5c68eb8248673da48cc4469537ffc9 (patch)
treefd6901719ab8121b9bf8e0c98700a43eff198652 /src/uxn
parentfd5dede600bcaf8d5c16963544512b2e0ba68586 (diff)
downloaduxngba-60684bb15f5c68eb8248673da48cc4469537ffc9.tar.gz
uxngba-60684bb15f5c68eb8248673da48cc4469537ffc9.zip
Add a new console drawing mode
Diffstat (limited to 'src/uxn')
-rw-r--r--src/uxn/devices/ppu.c6
-rw-r--r--src/uxn/uxn.c2
2 files changed, 7 insertions, 1 deletions
diff --git a/src/uxn/devices/ppu.c b/src/uxn/devices/ppu.c
index 5894352..836b7f0 100644
--- a/src/uxn/devices/ppu.c
+++ b/src/uxn/devices/ppu.c
@@ -114,6 +114,12 @@ initppu(Ppu *p, Uint8 hor, Uint8 ver, Uint8 pad) {
114 p->bg[i] = 0; 114 p->bg[i] = 0;
115 } 115 }
116 116
117 // Initialize default palette.
118 PAL_BUFFER_BG[0] = COLOR_BLACK;
119 PAL_BUFFER_BG[1] = COLOR_WHITE;
120 PAL_BUFFER_BG[2] = COLOR_RED;
121 PAL_BUFFER_BG[3] = COLOR_BLUE;
122
117 // Initialize memory map. 123 // Initialize memory map.
118 u16 *fg_mem = SCREENBLOCK_MEM[sb_fg]; 124 u16 *fg_mem = SCREENBLOCK_MEM[sb_fg];
119 u16 *bg_mem = SCREENBLOCK_MEM[sb_bg]; 125 u16 *bg_mem = SCREENBLOCK_MEM[sb_bg];
diff --git a/src/uxn/uxn.c b/src/uxn/uxn.c
index 08b3b9b..54d56d0 100644
--- a/src/uxn/uxn.c
+++ b/src/uxn/uxn.c
@@ -151,6 +151,6 @@ portuxn(Uxn *u, Uint8 id, char *name, void (*talkfn)(Device *d, Uint8 b0, Uint8
151 d->u = u; 151 d->u = u;
152 d->mem = u->ram.dat; 152 d->mem = u->ram.dat;
153 d->talk = talkfn; 153 d->talk = talkfn;
154 txt_printf("Device added #%02x: %s, at 0x%04x \n", id, name, d->addr); 154 txt_printf("Dev:#%02x:0x%04x:%s \n", id, d->addr, name);
155 return d; 155 return d;
156} 156}