aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--roms/audio.rombin435 -> 959 bytes
-rw-r--r--roms/automata.rombin255 -> 243 bytes
-rw-r--r--roms/bifurcan.rombin583 -> 634 bytes
-rw-r--r--roms/controller.rombin958 -> 958 bytes
-rw-r--r--roms/dvd.rombin307 -> 307 bytes
-rw-r--r--roms/file.load.rombin1233 -> 1230 bytes
-rw-r--r--roms/file.save.rombin108 -> 108 bytes
-rw-r--r--roms/hover.rombin502 -> 493 bytes
-rw-r--r--roms/label.rombin1439 -> 1434 bytes
-rw-r--r--roms/multichannel.audio.rombin1228 -> 1228 bytes
-rw-r--r--roms/noodle.rombin0 -> 7274 bytes
-rw-r--r--roms/polycat.rombin793 -> 793 bytes
-rw-r--r--roms/proportional_fonts.rombin1333 -> 1330 bytes
-rw-r--r--roms/screen.rombin785 -> 785 bytes
-rw-r--r--roms/shapes.rombin1055 -> 1147 bytes
-rw-r--r--roms/theme.rombin3224 -> 3152 bytes
-rw-r--r--roms/wallpaper.rombin190 -> 181 bytes
-rw-r--r--src/main.c79
-rw-r--r--src/uxn.h1
19 files changed, 50 insertions, 30 deletions
diff --git a/roms/audio.rom b/roms/audio.rom
index 614c817..15c8f2d 100644
--- a/roms/audio.rom
+++ b/roms/audio.rom
Binary files differ
diff --git a/roms/automata.rom b/roms/automata.rom
index ec6dfb9..9c0b3f7 100644
--- a/roms/automata.rom
+++ b/roms/automata.rom
Binary files differ
diff --git a/roms/bifurcan.rom b/roms/bifurcan.rom
index 284e22a..92e613f 100644
--- a/roms/bifurcan.rom
+++ b/roms/bifurcan.rom
Binary files differ
diff --git a/roms/controller.rom b/roms/controller.rom
index 3e786fb..eb672b3 100644
--- a/roms/controller.rom
+++ b/roms/controller.rom
Binary files differ
diff --git a/roms/dvd.rom b/roms/dvd.rom
index 7ddabe9..9d47e7d 100644
--- a/roms/dvd.rom
+++ b/roms/dvd.rom
Binary files differ
diff --git a/roms/file.load.rom b/roms/file.load.rom
index e99bae3..1f486ee 100644
--- a/roms/file.load.rom
+++ b/roms/file.load.rom
Binary files differ
diff --git a/roms/file.save.rom b/roms/file.save.rom
index 8680264..6d8debb 100644
--- a/roms/file.save.rom
+++ b/roms/file.save.rom
Binary files differ
diff --git a/roms/hover.rom b/roms/hover.rom
index 9ad97a1..3c59f52 100644
--- a/roms/hover.rom
+++ b/roms/hover.rom
Binary files differ
diff --git a/roms/label.rom b/roms/label.rom
index c8fe6b8..fc5fd9c 100644
--- a/roms/label.rom
+++ b/roms/label.rom
Binary files differ
diff --git a/roms/multichannel.audio.rom b/roms/multichannel.audio.rom
index dc1d708..e737701 100644
--- a/roms/multichannel.audio.rom
+++ b/roms/multichannel.audio.rom
Binary files differ
diff --git a/roms/noodle.rom b/roms/noodle.rom
new file mode 100644
index 0000000..4776074
--- /dev/null
+++ b/roms/noodle.rom
Binary files differ
diff --git a/roms/polycat.rom b/roms/polycat.rom
index a8c3a22..cc9df69 100644
--- a/roms/polycat.rom
+++ b/roms/polycat.rom
Binary files differ
diff --git a/roms/proportional_fonts.rom b/roms/proportional_fonts.rom
index 2208d35..ff8291b 100644
--- a/roms/proportional_fonts.rom
+++ b/roms/proportional_fonts.rom
Binary files differ
diff --git a/roms/screen.rom b/roms/screen.rom
index de04425..ced1f64 100644
--- a/roms/screen.rom
+++ b/roms/screen.rom
Binary files differ
diff --git a/roms/shapes.rom b/roms/shapes.rom
index 0aeabac..9e6acfb 100644
--- a/roms/shapes.rom
+++ b/roms/shapes.rom
Binary files differ
diff --git a/roms/theme.rom b/roms/theme.rom
index b3eb1ef..58d0e41 100644
--- a/roms/theme.rom
+++ b/roms/theme.rom
Binary files differ
diff --git a/roms/wallpaper.rom b/roms/wallpaper.rom
index 81a55f0..114f465 100644
--- a/roms/wallpaper.rom
+++ b/roms/wallpaper.rom
Binary files differ
diff --git a/src/main.c b/src/main.c
index c15a9e3..60be453 100644
--- a/src/main.c
+++ b/src/main.c
@@ -129,36 +129,55 @@ system_talk(Device *d, u8 b0, u8 w) {
129IWRAM_CODE 129IWRAM_CODE
130void 130void
131screen_talk(Device *d, u8 b0, u8 w) { 131screen_talk(Device *d, u8 b0, u8 w) {
132 if(w && b0 == 0xe) { 132 if (w) {
133 u16 x = mempeek16(d->dat, 0x8); 133 switch (b0) {
134 u16 y = mempeek16(d->dat, 0xa); 134 case 0x1: {
135 u8 *addr = &d->mem[mempeek16(d->dat, 0xc)]; 135 d->vector = mempeek16(d->dat, 0x0);
136 u8 *layer = d->dat[0xe] >> 4 & 0x1 ? ppu.fg : ppu.bg; 136 } break;
137 u8 mode = d->dat[0xe] >> 5; 137 case 0xe: {
138 u8 color = d->dat[0xf] & 0xf; 138 u16 x = mempeek16(d->dat, 0x8);
139 if(!mode) { 139 u16 y = mempeek16(d->dat, 0xa);
140 ppu_pixel(layer, x, y, d->dat[0xe] & 0x3); 140 u8 *addr = &d->mem[mempeek16(d->dat, 0xc)];
141 } else if(mode-- & 0x1) { 141 u8 *layer = d->dat[0xe] >> 4 & 0x1 ? ppu.fg : ppu.bg;
142 u8 flipx = mode & 0x2; 142 u8 mode = d->dat[0xe] >> 5;
143 u8 flipy = mode & 0x4; 143 u8 color = d->dat[0xf] & 0xf;
144 ppu_1bpp(layer, x, y, addr, color, flipx, flipy); 144 if(!mode) {
145 } else { 145 ppu_pixel(layer, x, y, d->dat[0xe] & 0x3);
146 u8 flipx = mode & 0x2; 146 } else if(mode-- & 0x1) {
147 u8 flipy = mode & 0x4; 147 u8 flipx = mode & 0x2;
148 ppu_2bpp(layer, x, y, addr, color, flipx, flipy); 148 u8 flipy = mode & 0x4;
149 } 149 ppu_1bpp(layer, x, y, addr, color, flipx, flipy);
150 } else if(w && b0 == 0xf) { 150 } else {
151 u16 x = mempeek16(d->dat, 0x8); 151 u8 flipx = mode & 0x2;
152 u16 y = mempeek16(d->dat, 0xa); 152 u8 flipy = mode & 0x4;
153 u8 *addr = &d->mem[mempeek16(d->dat, 0xc)]; 153 ppu_2bpp(layer, x, y, addr, color, flipx, flipy);
154 u8 *layer = d->dat[0xf] >> 6 & 0x1 ? ppu.fg : ppu.bg; 154 }
155 u8 color = d->dat[0xf] & 0xf; 155 if(d->dat[0x6] & 0x01) { mempoke16(d->dat, 0x8, x + 1); }
156 u8 flipx = (d->dat[0xf] >> 0x4) & 0x1; 156 if(d->dat[0x6] & 0x02) { mempoke16(d->dat, 0xa, y + 1); }
157 u8 flipy = (d->dat[0xf] >> 0x5) & 0x1; 157 } break;
158 if(d->dat[0xf] >> 0x7 & 0x1) { 158 case 0xf: {
159 ppu_2bpp(layer, x, y, addr, color, flipx, flipy); 159 u16 x = mempeek16(d->dat, 0x8);
160 } else { 160 u16 y = mempeek16(d->dat, 0xa);
161 ppu_1bpp(layer, x, y, addr, color, flipx, flipy); 161 u8 *addr = &d->mem[mempeek16(d->dat, 0xc)];
162 u8 *layer = d->dat[0xf] >> 6 & 0x1 ? ppu.fg : ppu.bg;
163 u8 color = d->dat[0xf] & 0xf;
164 u8 flipx = (d->dat[0xf] >> 0x4) & 0x1;
165 u8 flipy = (d->dat[0xf] >> 0x5) & 0x1;
166 if(d->dat[0xf] >> 0x7 & 0x1) {
167 ppu_2bpp(layer, x, y, addr, color, flipx, flipy);
168 if(d->dat[0x6] & 0x04) {
169 mempoke16(d->dat, 0xc, mempeek16(d->dat, 0xc) + 16);
170 }
171 } else {
172 ppu_1bpp(layer, x, y, addr, color, flipx, flipy);
173 if(d->dat[0x6] & 0x04) {
174 mempoke16(d->dat, 0xc, mempeek16(d->dat, 0xc) + 8);
175 }
176 }
177 if(d->dat[0x6] & 0x01) { mempoke16(d->dat, 0x8, x + 8); }
178 if(d->dat[0x6] & 0x02) { mempoke16(d->dat, 0xa, y + 8); }
179 } break;
180 default: break;
162 } 181 }
163 } 182 }
164} 183}
diff --git a/src/uxn.h b/src/uxn.h
index bd9379c..6f01405 100644
--- a/src/uxn.h
+++ b/src/uxn.h
@@ -29,6 +29,7 @@ typedef struct {
29typedef struct Device { 29typedef struct Device {
30 struct Uxn *u; 30 struct Uxn *u;
31 u8 addr, dat[16], *mem; 31 u8 addr, dat[16], *mem;
32 u16 vector;
32 void (*talk)(struct Device *d, u8, u8); 33 void (*talk)(struct Device *d, u8, u8);
33} Device; 34} Device;
34 35