diff options
author | Bad Diode <bd@badd10de.dev> | 2022-10-19 09:29:12 +0200 |
---|---|---|
committer | Bad Diode <bd@badd10de.dev> | 2022-10-19 09:29:31 +0200 |
commit | 219029f317e20a5248735d7f7bf6bb88ecb95d28 (patch) | |
tree | 7a4812f815d0a36972e693478a85ccf29de8abc9 /src | |
parent | 9322f2c413b4ea22c386d3725ffa79bc54d5596c (diff) | |
download | uxn64-219029f317e20a5248735d7f7bf6bb88ecb95d28.tar.gz uxn64-219029f317e20a5248735d7f7bf6bb88ecb95d28.zip |
Cleanup unused code
Diffstat (limited to 'src')
-rw-r--r-- | src/main.c | 12 | ||||
-rw-r--r-- | src/ppu.c | 201 | ||||
-rw-r--r-- | src/spec | 4 | ||||
-rw-r--r-- | src/uxn_controller_rom.c | 56 | ||||
-rw-r--r-- | src/uxn_dvd_rom.c | 19 | ||||
-rw-r--r-- | src/uxn_polycat_rom.c | 47 |
6 files changed, 137 insertions, 202 deletions
@@ -22,6 +22,7 @@ u64 boot_stack[STACK_SIZE / sizeof(u64)] __attribute__((aligned(8))); | |||
22 | 22 | ||
23 | #define NUM_PI_MSGS 8 | 23 | #define NUM_PI_MSGS 8 |
24 | static OSMesg pi_msg[NUM_PI_MSGS]; | 24 | static OSMesg pi_msg[NUM_PI_MSGS]; |
25 | static OSMesgQueue pi_msg_queue; | ||
25 | 26 | ||
26 | // Handle for rom memory. | 27 | // Handle for rom memory. |
27 | OSPiHandle *rom_handle; | 28 | OSPiHandle *rom_handle; |
@@ -33,6 +34,8 @@ OSPiHandle *rom_handle; | |||
33 | #include "ppu.c" | 34 | #include "ppu.c" |
34 | #include "uxn/src/uxn.c" | 35 | #include "uxn/src/uxn.c" |
35 | 36 | ||
37 | #include "uxn_controller_rom.c" | ||
38 | |||
36 | #define CLAMP(X, MIN, MAX) ((X) <= (MIN) ? (MIN) : (X) > (MAX) ? (MAX): (X)) | 39 | #define CLAMP(X, MIN, MAX) ((X) <= (MIN) ? (MIN) : (X) > (MAX) ? (MAX): (X)) |
37 | 40 | ||
38 | static Uxn u; | 41 | static Uxn u; |
@@ -183,6 +186,13 @@ screen_deo(Device *d, u8 port) { | |||
183 | 186 | ||
184 | void | 187 | void |
185 | poll_input() { | 188 | poll_input() { |
189 | // NOTE: | ||
190 | // - Analog can act as a mouse and/or dissapear if it was not moved in | ||
191 | // X seconds. L/R buttons act as the mouse buttons. | ||
192 | // - DPAD + A/B are the regular controller. (Start/select?) | ||
193 | // - MAYBE: The C buttons can control the keyboard somehow? A virtual | ||
194 | // keyboard that is? With Z to confirm keypresses? | ||
195 | // - Start can just pause the application if no other use is in place. | ||
186 | // STUB... | 196 | // STUB... |
187 | } | 197 | } |
188 | 198 | ||
@@ -193,8 +203,6 @@ handle_input() { | |||
193 | 203 | ||
194 | static u8 uxn_ram[0x10000]; | 204 | static u8 uxn_ram[0x10000]; |
195 | 205 | ||
196 | #include "uxn_screen_rom.c" | ||
197 | |||
198 | void | 206 | void |
199 | init_uxn(Uxn *u) { | 207 | init_uxn(Uxn *u) { |
200 | // Setup UXN memory. | 208 | // Setup UXN memory. |
@@ -2,9 +2,7 @@ | |||
2 | #define SCREEN_WIDTH 320 | 2 | #define SCREEN_WIDTH 320 |
3 | #define SCREEN_HEIGHT 240 | 3 | #define SCREEN_HEIGHT 240 |
4 | 4 | ||
5 | static OSMesg rdp_msg_buf, retrace_msg_buf; | 5 | static OSMesg retrace_msg_buf; |
6 | static OSMesgQueue pi_msg_queue; | ||
7 | static OSMesgQueue rdp_msg_queue; | ||
8 | static OSMesgQueue retrace_msg_queue; | 6 | static OSMesgQueue retrace_msg_queue; |
9 | 7 | ||
10 | // | 8 | // |
@@ -17,10 +15,8 @@ u16 framebuffers[2][SCREEN_WIDTH * SCREEN_HEIGHT] __attribute__((aligned(16))); | |||
17 | // Statics. | 15 | // Statics. |
18 | // | 16 | // |
19 | 17 | ||
20 | static u64 dram_stack[SP_DRAM_STACK_SIZE64] __attribute__((aligned(16))); | ||
21 | static u16 pixels[SCREEN_WIDTH * SCREEN_HEIGHT] __attribute__((aligned(16))); | 18 | static u16 pixels[SCREEN_WIDTH * SCREEN_HEIGHT] __attribute__((aligned(16))); |
22 | static int current_fb = 0; | 19 | static int current_fb = 0; |
23 | static Gfx glist[2048 * 8]; | ||
24 | 20 | ||
25 | static size_t screen_width = SCREEN_WIDTH; | 21 | static size_t screen_width = SCREEN_WIDTH; |
26 | static size_t screen_height = SCREEN_HEIGHT; | 22 | static size_t screen_height = SCREEN_HEIGHT; |
@@ -99,18 +95,6 @@ ppu_2bpp(u8 *layer, u16 x, u16 y, u8 *sprite, u8 color, u8 flipx, u8 flipy) { | |||
99 | } | 95 | } |
100 | 96 | ||
101 | void | 97 | void |
102 | fb_write_test(void) { | ||
103 | for (size_t j = 0; j < SCREEN_HEIGHT; j++) { | ||
104 | for (size_t i = 0; i < SCREEN_WIDTH; i++) { | ||
105 | u16 shade_x = (float)i / (float)SCREEN_WIDTH * 255; | ||
106 | u16 shade_y = (float)j / (float)SCREEN_HEIGHT * 255; | ||
107 | u16 color = GPACK_RGBA5551(shade_x, 0, shade_y, 1); | ||
108 | framebuffers[current_fb][i + j * SCREEN_WIDTH] = color; | ||
109 | } | ||
110 | } | ||
111 | } | ||
112 | |||
113 | void | ||
114 | fb_copy_test(void) { | 98 | fb_copy_test(void) { |
115 | for (size_t i = 0; i < SCREEN_HEIGHT * SCREEN_WIDTH; i++) { | 99 | for (size_t i = 0; i < SCREEN_HEIGHT * SCREEN_WIDTH; i++) { |
116 | framebuffers[current_fb][i] = pixels[i]; | 100 | framebuffers[current_fb][i] = pixels[i]; |
@@ -118,178 +102,6 @@ fb_copy_test(void) { | |||
118 | } | 102 | } |
119 | 103 | ||
120 | void | 104 | void |
121 | rdp_init(void) { | ||
122 | Gfx *glistp = glist; | ||
123 | |||
124 | static const Vp viewport = {{ | ||
125 | .vscale = {SCREEN_WIDTH * 2, SCREEN_HEIGHT * 2, G_MAXZ / 2, 0}, | ||
126 | .vtrans = {SCREEN_WIDTH * 2, SCREEN_HEIGHT * 2, G_MAXZ / 2, 0}, | ||
127 | }}; | ||
128 | |||
129 | // Initialize the RSP. | ||
130 | Gfx rspinit_dl[] = { | ||
131 | gsSPViewport(&viewport), | ||
132 | gsSPClearGeometryMode(G_SHADE | G_SHADING_SMOOTH | G_CULL_BOTH | | ||
133 | G_FOG | G_LIGHTING | G_TEXTURE_GEN | | ||
134 | G_TEXTURE_GEN_LINEAR | G_LOD), | ||
135 | gsSPTexture(0, 0, 0, 0, G_OFF), | ||
136 | }; | ||
137 | |||
138 | // Initialize the RDP. | ||
139 | Gfx rdpinit_dl[] = { | ||
140 | gsDPSetCycleType(G_CYC_1CYCLE), | ||
141 | gsDPSetScissor(G_SC_NON_INTERLACE, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT), | ||
142 | gsDPSetCombineKey(G_CK_NONE), | ||
143 | gsDPSetAlphaCompare(G_AC_NONE), | ||
144 | gsDPSetRenderMode(G_RM_NOOP, G_RM_NOOP2), | ||
145 | gsDPSetColorDither(G_CD_DISABLE), | ||
146 | gsDPPipeSync(), | ||
147 | }; | ||
148 | |||
149 | gSPDisplayList(glistp++, rspinit_dl); | ||
150 | gSPDisplayList(glistp++, rdpinit_dl); | ||
151 | gDPFullSync(glistp++); | ||
152 | gSPEndDisplayList(glistp++); | ||
153 | |||
154 | // Start up the task list. | ||
155 | OSTask tlist = (OSTask){ | ||
156 | { | ||
157 | .type = M_GFXTASK, | ||
158 | .flags = OS_TASK_DP_WAIT, | ||
159 | .ucode_boot = (u64*)rspbootTextStart, | ||
160 | .ucode_boot_size = (u32)rspbootTextEnd - (u32)rspbootTextStart, | ||
161 | .ucode = (u64*)gspF3DEX2_xbusTextStart, | ||
162 | .ucode_size = SP_UCODE_SIZE, | ||
163 | .ucode_data = (u64*)gspF3DEX2_xbusDataStart, | ||
164 | .ucode_data_size = SP_UCODE_DATA_SIZE, | ||
165 | .data_ptr = (u64*)glist, | ||
166 | .data_size = (u32)((glistp - glist) * sizeof(Gfx)), | ||
167 | .dram_stack = dram_stack, | ||
168 | .dram_stack_size = SP_DRAM_STACK_SIZE8, | ||
169 | }, | ||
170 | }; | ||
171 | osSpTaskStart(&tlist); | ||
172 | |||
173 | // Wait for RDP completion. | ||
174 | osRecvMesg(&rdp_msg_queue, NULL, OS_MESG_BLOCK); | ||
175 | } | ||
176 | |||
177 | void | ||
178 | rdp_clearfb(u8 r, u8 g, u8 b) { | ||
179 | Gfx *glistp = glist; | ||
180 | Gfx clearcfb_dl[] = { | ||
181 | gsDPSetCycleType(G_CYC_FILL), | ||
182 | gsDPSetColorImage( | ||
183 | G_IM_FMT_RGBA, G_IM_SIZ_16b, SCREEN_WIDTH, framebuffers[current_fb]), | ||
184 | gsDPSetFillColor( | ||
185 | GPACK_RGBA5551(r, g, b, 1) << 16 | GPACK_RGBA5551(r, g, b, 1)), | ||
186 | gsDPFillRectangle(0, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1), | ||
187 | gsDPPipeSync(), | ||
188 | }; | ||
189 | gSPDisplayList(glistp++, clearcfb_dl); | ||
190 | gDPFullSync(glistp++); | ||
191 | gSPEndDisplayList(glistp++); | ||
192 | |||
193 | // Start up the task list. | ||
194 | OSTask tlist = (OSTask){ | ||
195 | { | ||
196 | .type = M_GFXTASK, | ||
197 | .flags = OS_TASK_DP_WAIT, | ||
198 | .ucode_boot = (u64*)rspbootTextStart, | ||
199 | .ucode_boot_size = (u32)rspbootTextEnd - (u32)rspbootTextStart, | ||
200 | .ucode = (u64*)gspF3DEX2_xbusTextStart, | ||
201 | .ucode_size = SP_UCODE_SIZE, | ||
202 | .ucode_data = (u64*)gspF3DEX2_xbusDataStart, | ||
203 | .ucode_data_size = SP_UCODE_DATA_SIZE, | ||
204 | .data_ptr = (u64*)glist, | ||
205 | .data_size = (u32)((glistp - glist) * sizeof(Gfx)), | ||
206 | .dram_stack = dram_stack, | ||
207 | .dram_stack_size = SP_DRAM_STACK_SIZE8, | ||
208 | }, | ||
209 | }; | ||
210 | osSpTaskStart(&tlist); | ||
211 | |||
212 | // Wait for RDP completion. | ||
213 | osRecvMesg(&rdp_msg_queue, NULL, OS_MESG_BLOCK); | ||
214 | } | ||
215 | |||
216 | void | ||
217 | rdp_texture_copy(void) { | ||
218 | Gfx *glistp = glist; | ||
219 | // gSPSegment(glistp++, 0, 0x0); /* Physical address segment */ | ||
220 | // gSPSegment(glistp++, 1, OS_K0_TO_PHYSICAL(framebuffers[current_fb])); | ||
221 | |||
222 | Gfx dl[] = { | ||
223 | gsDPSetColorImage( | ||
224 | G_IM_FMT_RGBA, G_IM_SIZ_16b, SCREEN_WIDTH, framebuffers[current_fb]), | ||
225 | gsDPSetFillColor(0), | ||
226 | gsDPFillRectangle(0, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1), | ||
227 | gsDPPipeSync(), | ||
228 | gsDPSetTexturePersp(G_TP_NONE), | ||
229 | gsDPSetCycleType(G_CYC_COPY), | ||
230 | gsDPSetRenderMode(G_RM_NOOP, G_RM_NOOP2), | ||
231 | gsSPClearGeometryMode(G_SHADE | G_SHADING_SMOOTH), | ||
232 | gsSPTexture(0x2000, 0x2000, 0, G_TX_RENDERTILE, G_ON), | ||
233 | gsDPSetCombineMode(G_CC_DECALRGB, G_CC_DECALRGB), | ||
234 | gsDPSetTexturePersp(G_TP_NONE), | ||
235 | gsDPSetTextureFilter(G_TF_POINT), | ||
236 | }; | ||
237 | gSPDisplayList(glistp++, dl); | ||
238 | for (size_t i = 0; i < 240; i++) { | ||
239 | gDPLoadTextureBlock( | ||
240 | glistp++, | ||
241 | &pixels[320 * 1 * i], // Texture data. | ||
242 | G_IM_FMT_RGBA, // Image format. | ||
243 | G_IM_SIZ_16b, // Pixel component size. | ||
244 | 320, // Width. | ||
245 | 1, // Height. | ||
246 | 0, // Palette location. | ||
247 | G_TX_CLAMP, // S-axis mirror/wrap/clamp. | ||
248 | G_TX_CLAMP, // T-axis mirror/wrap/clamp. | ||
249 | 0, // S-axis mask. | ||
250 | 0, // T-axis mask. | ||
251 | G_TX_NOLOD, // S-axis shift. | ||
252 | G_TX_NOLOD); // T-axis shift. | ||
253 | gSPTextureRectangle( | ||
254 | glistp++, | ||
255 | 0, // ulx | ||
256 | (1 * i) << 2, // uly | ||
257 | (320 * (i + 1)) << 2, // lrx | ||
258 | (1 * (i + 1)) << 2, // lry | ||
259 | 0, | ||
260 | 0, | ||
261 | 0, | ||
262 | 4 << 10, | ||
263 | 1 << 10); | ||
264 | } | ||
265 | gDPFullSync(glistp++); | ||
266 | gSPEndDisplayList(glistp++); | ||
267 | osWritebackDCache(&glist, sizeof(glist)); | ||
268 | |||
269 | // Start up the task list. | ||
270 | OSTask tlist = (OSTask){ | ||
271 | { | ||
272 | .type = M_GFXTASK, | ||
273 | .flags = OS_TASK_DP_WAIT, | ||
274 | .ucode_boot = (u64*)rspbootTextStart, | ||
275 | .ucode_boot_size = (u32)rspbootTextEnd - (u32)rspbootTextStart, | ||
276 | .ucode = (u64*)gspF3DEX2_xbusTextStart, | ||
277 | .ucode_size = SP_UCODE_SIZE, | ||
278 | .ucode_data = (u64*)gspF3DEX2_xbusDataStart, | ||
279 | .ucode_data_size = SP_UCODE_DATA_SIZE, | ||
280 | .data_ptr = (u64*)glist, | ||
281 | .data_size = (u32)((glistp - glist) * sizeof(Gfx)), | ||
282 | .dram_stack = dram_stack, | ||
283 | .dram_stack_size = SP_DRAM_STACK_SIZE8, | ||
284 | }, | ||
285 | }; | ||
286 | osSpTaskStart(&tlist); | ||
287 | |||
288 | // Wait for RDP completion. | ||
289 | osRecvMesg(&rdp_msg_queue, NULL, OS_MESG_BLOCK); | ||
290 | } | ||
291 | |||
292 | void | ||
293 | init_ppu(void) { | 105 | init_ppu(void) { |
294 | // NOTE: Test image. | 106 | // NOTE: Test image. |
295 | for (size_t j = 0; j < SCREEN_HEIGHT; j++) { | 107 | for (size_t j = 0; j < SCREEN_HEIGHT; j++) { |
@@ -303,8 +115,6 @@ init_ppu(void) { | |||
303 | // TODO: clear pixel buffers and dirty lines | 115 | // TODO: clear pixel buffers and dirty lines |
304 | 116 | ||
305 | // Setup the message queues | 117 | // Setup the message queues |
306 | osCreateMesgQueue(&rdp_msg_queue, &rdp_msg_buf, 1); | ||
307 | osSetEventMesg(OS_EVENT_DP, &rdp_msg_queue, NULL); | ||
308 | osCreateMesgQueue(&retrace_msg_queue, &retrace_msg_buf, 1); | 118 | osCreateMesgQueue(&retrace_msg_queue, &retrace_msg_buf, 1); |
309 | osViSetEvent(&retrace_msg_queue, NULL, 1); | 119 | osViSetEvent(&retrace_msg_queue, NULL, 1); |
310 | } | 120 | } |
@@ -333,17 +143,12 @@ blit_framebuffer(void) { | |||
333 | for (size_t i = 0; i < screen_width; i++) { | 143 | for (size_t i = 0; i < screen_width; i++) { |
334 | size_t idx = i + j * screen_width; | 144 | size_t idx = i + j * screen_width; |
335 | pixels[idx] = palette[pixels_fg[idx] << 2 | pixels_bg[idx]]; | 145 | pixels[idx] = palette[pixels_fg[idx] << 2 | pixels_bg[idx]]; |
146 | // TODO: write pixels directly? It may cause flickering. | ||
147 | // framebuffers[current_fb][idx] = palette[pixels_fg[idx] << 2 | pixels_bg[idx]]; | ||
336 | } | 148 | } |
337 | } | 149 | } |
338 | dirty_lines[j] = 0; | 150 | dirty_lines[j] = 0; |
339 | } | 151 | } |
340 | |||
341 | // TODO: Find out how to properly draw to the framebuffer using either the | ||
342 | // RDP or DMA. Maybe just drawing directly with the CPU is fine for our | ||
343 | // purposes though. | ||
344 | // rdp_clearfb(t, t, t); | ||
345 | // fb_write_test(); | ||
346 | fb_copy_test(); // CPU blit | 152 | fb_copy_test(); // CPU blit |
347 | // rdp_texture_copy(); // RDP texture blit | ||
348 | reqdraw = 0; | 153 | reqdraw = 0; |
349 | } | 154 | } |
@@ -3,13 +3,13 @@ beginseg | |||
3 | flags BOOT OBJECT | 3 | flags BOOT OBJECT |
4 | entry boot | 4 | entry boot |
5 | stack boot_stack + STACK_SIZE | 5 | stack boot_stack + STACK_SIZE |
6 | include "build/blank.elf" | 6 | include "build/uxn64.elf" |
7 | include "/opt/n64sdk/libultra/usr/lib/PR/rspboot.o" | 7 | include "/opt/n64sdk/libultra/usr/lib/PR/rspboot.o" |
8 | include "/opt/n64sdk/libultra/usr/lib/PR/gspF3DEX2.xbus.o" | 8 | include "/opt/n64sdk/libultra/usr/lib/PR/gspF3DEX2.xbus.o" |
9 | include "/opt/n64sdk/libultra/usr/lib/PR/gspF3DEX2.fifo.o" | 9 | include "/opt/n64sdk/libultra/usr/lib/PR/gspF3DEX2.fifo.o" |
10 | endseg | 10 | endseg |
11 | 11 | ||
12 | beginwave | 12 | beginwave |
13 | name "build/blank" | 13 | name "build/uxn64" |
14 | include "code" | 14 | include "code" |
15 | endwave | 15 | endwave |
diff --git a/src/uxn_controller_rom.c b/src/uxn_controller_rom.c new file mode 100644 index 0000000..a302c70 --- /dev/null +++ b/src/uxn_controller_rom.c | |||
@@ -0,0 +1,56 @@ | |||
1 | const u16 uxn_rom[] = { | ||
2 | 0xa00f, 0xf780, 0x0837, 0xa00f, 0x0780, 0x0a37, 0xa00f, 0x0780, | ||
3 | 0x0c37, 0x8022, 0x3680, 0x013f, 0x8000, 0x3180, 0x2436, 0x8001, | ||
4 | 0x3f80, 0x0231, 0xa000, 0x6880, 0x0431, 0xa000, 0x3080, 0x0631, | ||
5 | 0x8000, 0x3080, 0x0430, 0x8001, 0x3f39, 0x8008, 0x3180, 0x0230, | ||
6 | 0x8006, 0x3080, 0x013f, 0x3980, 0x0a31, 0x8008, 0x3080, 0x0430, | ||
7 | 0x3880, 0x0c31, 0x800a, 0x3080, 0x0630, 0x3880, 0x0e31, 0xa001, | ||
8 | 0x7a80, 0x8037, 0x8008, 0x3080, 0x0a30, 0x800c, 0x3080, 0x0e30, | ||
9 | 0x8003, 0xa003, 0x3e2e, 0x8011, 0x0e00, 0x800d, 0x0e80, 0x8216, | ||
10 | 0x8008, 0x080c, 0x00a0, 0x010e, 0x1700, 0x8082, 0x160f, 0x8008, | ||
11 | 0x30a0, 0x0010, 0x3880, 0x2837, 0x800a, 0x30a0, 0x0010, 0x3880, | ||
12 | 0x2a37, 0xa003, 0xaa80, 0x2c37, 0x8003, 0xcf80, 0x041f, 0x8001, | ||
13 | 0x1c06, 0x1819, 0x802f, 0x1780, 0x2a36, 0xa000, 0x1038, 0x802a, | ||
14 | 0x37a0, 0x03b2, 0x802c, 0x3780, 0x03cf, 0x8005, 0x1f80, 0x011c, | ||
15 | 0x0618, 0x1980, 0x2f17, 0x802a, 0x36a0, 0x0008, 0x3980, 0x2a37, | ||
16 | 0x8028, 0x36a0, 0x0008, 0x3980, 0x2837, 0xa003, 0xba80, 0x2c37, | ||
17 | 0x8003, 0xcf80, 0x061f, 0x8001, 0x1c06, 0x1819, 0x802f, 0x1780, | ||
18 | 0x2836, 0xa000, 0x1038, 0x8028, 0x37a0, 0x03c2, 0x802c, 0x3780, | ||
19 | 0x03cf, 0x8007, 0x1f80, 0x011c, 0x0618, 0x1980, 0x2f17, 0x8028, | ||
20 | 0x36a0, 0x0008, 0x3980, 0x2837, 0xa003, 0xa280, 0x2c37, 0xa003, | ||
21 | 0x2f17, 0x8002, 0x30a0, 0x0009, 0x3880, 0x2a37, 0x8000, 0x30a0, | ||
22 | 0x0009, 0x3980, 0x2837, 0xa003, 0xca80, 0x2c37, 0x8003, 0xcf80, | ||
23 | 0x021f, 0x8001, 0x1c06, 0x1819, 0x802f, 0x1780, 0x0030, 0xa000, | ||
24 | 0x0438, 0x8028, 0x37a0, 0x03ca, 0x802c, 0x3780, 0x03cf, 0x8003, | ||
25 | 0x1f80, 0x011c, 0x0618, 0x1980, 0x2f17, 0x8002, 0x30a0, 0x0000, | ||
26 | 0x3880, 0x2a37, 0x8000, 0x30a0, 0x0018, 0x3880, 0x2837, 0xa003, | ||
27 | 0xd280, 0x2c37, 0x8003, 0xcf80, 0x011f, 0x8001, 0x1c19, 0x802f, | ||
28 | 0x1780, 0x2a36, 0xa000, 0x0a38, 0x802a, 0x37a0, 0x03da, 0xa000, | ||
29 | 0x0b80, 0x303f, 0x3880, 0x2c37, 0xa003, 0x2f17, 0x8002, 0x30a0, | ||
30 | 0x0000, 0x3880, 0x2a37, 0x8000, 0x30a0, 0x0024, 0x3880, 0x2837, | ||
31 | 0xa003, 0xd280, 0x2c37, 0x8003, 0x4f80, 0x011c, 0x1980, 0x2f17, | ||
32 | 0x802a, 0x36a0, 0x000a, 0x3880, 0x2a37, 0xa003, 0xdaa0, 0x000a, | ||
33 | 0x8030, 0x3f38, 0x802c, 0x37a0, 0x032f, 0x1780, 0x0030, 0xa000, | ||
34 | 0x1039, 0x8028, 0x3780, 0x0230, 0xa000, 0x1039, 0x802a, 0x37a0, | ||
35 | 0x0126, 0x1780, 0x8236, 0x8005, 0x0ea0, 0x0026, 0x176c, 0x0480, | ||
36 | 0x000e, 0x0680, 0x041f, 0x8000, 0x0e80, 0x0004, 0x800f, 0x1c80, | ||
37 | 0x303f, 0xa003, 0xda38, 0x802c, 0x37a0, 0x032f, 0x176c, 0x0f26, | ||
38 | 0x803c, 0x3380, 0x2b33, 0x2680, 0x4933, 0x800f, 0x3326, 0x8031, | ||
39 | 0x3380, 0x1333, 0x2680, 0x3133, 0x8005, 0x33a0, 0x0000, 0x21a0, | ||
40 | 0x0000, 0x2680, 0x2837, 0xa000, 0x0080, 0x2a37, 0xcf80, 0x2e97, | ||
41 | 0xa000, 0x0080, 0x2a37, 0x1721, 0xaa80, 0xe60d, 0x2222, 0xa000, | ||
42 | 0x00a0, 0x0000, 0x2680, 0x2a37, 0xa000, 0x0080, 0x2837, 0xcf80, | ||
43 | 0x2e97, 0xa000, 0x0080, 0x2837, 0x1721, 0xaa80, 0xe60d, 0x2222, | ||
44 | 0x426c, 0xffff, 0xffff, 0xffff, 0xffff, 0x7eff, 0xe7c3, 0xffff, | ||
45 | 0xffff, 0xffff, 0xffff, 0xc3e7, 0xff7e, 0x7fff, 0xefcf, 0xcfef, | ||
46 | 0xff7f, 0xfeff, 0xf7f3, 0xf3f7, 0xfffe, 0x0000, 0x7eff, 0xff7e, | ||
47 | 0x0000, 0x3c7e, 0xffff, 0xffff, 0x7e3c, 0x007c, 0x8282, 0x8282, | ||
48 | 0x827c, 0x0030, 0x1010, 0x1010, 0x1010, 0x007c, 0x8202, 0x7c80, | ||
49 | 0x80fe, 0x007c, 0x8202, 0x1c02, 0x827c, 0x000c, 0x1424, 0x4484, | ||
50 | 0xfe04, 0x00fe, 0x8080, 0x7c02, 0x827c, 0x007c, 0x8280, 0xfc82, | ||
51 | 0x827c, 0x00fe, 0x0202, 0x0408, 0x1010, 0x007c, 0x8282, 0x7c82, | ||
52 | 0x827c, 0x007c, 0x8282, 0x7e02, 0x827c, 0x007c, 0x8202, 0x7e82, | ||
53 | 0x827e, 0x00fc, 0x8282, 0xfc82, 0x82fc, 0x007c, 0x8280, 0x8080, | ||
54 | 0x827c, 0x00fc, 0x8282, 0x8282, 0x82fc, 0x00fe, 0x8080, 0xfe80, | ||
55 | 0x80fe, 0x00fe, 0x8080, 0xf080, 0x8080, 0x8080, | ||
56 | }; | ||
diff --git a/src/uxn_dvd_rom.c b/src/uxn_dvd_rom.c new file mode 100644 index 0000000..006f877 --- /dev/null +++ b/src/uxn_dvd_rom.c | |||
@@ -0,0 +1,19 @@ | |||
1 | const u16 uxn_rom[] = { | ||
2 | 0xa04c, 0xfd80, 0x0837, 0xa04c, 0xf380, 0x0a37, 0xa0dc, 0xf280, | ||
3 | 0x0c37, 0xa001, 0x4980, 0x2037, 0x8022, 0x3680, 0x013f, 0x8000, | ||
4 | 0x3180, 0x2436, 0x8001, 0x3f80, 0x0231, 0x8022, 0x36a0, 0x0020, | ||
5 | 0x39a0, 0x015a, 0x3580, 0x2436, 0xa000, 0x1039, 0xa001, 0x7d35, | ||
6 | 0xa036, 0x2617, 0xa001, 0x660e, 0x00a0, 0x0061, 0x0e80, 0x0030, | ||
7 | 0xafa0, 0x0000, 0x2880, 0x400d, 0xefa0, 0x0000, 0x2880, 0x380d, | ||
8 | 0x6fa0, 0x0004, 0x1080, 0x103f, 0x38a0, 0xffff, 0x3880, 0x0031, | ||
9 | 0x8002, 0x30af, 0xa000, 0x0028, 0x8028, 0x0def, 0xa000, 0x0028, | ||
10 | 0x8020, 0x0d6f, 0xa000, 0x0510, 0x8010, 0x3f38, 0xa0ff, 0xff38, | ||
11 | 0x8002, 0x31a0, 0x0117, 0x0e00, 0x8004, 0x9080, 0x0008, 0x0411, | ||
12 | 0x80bd, 0x0c80, 0x0590, 0x8000, 0x0804, 0x1180, 0xd50c, 0xa001, | ||
13 | 0xc580, 0x2c37, 0x8000, 0x3080, 0x2837, 0x8002, 0x3080, 0x2a37, | ||
14 | 0x802f, 0x9717, 0x6c00, 0x1f3f, 0x3838, 0x3878, 0x7f00, 0xfefe, | ||
15 | 0x7e77, 0x77e3, 0xc300, 0x0f1f, 0x3b7b, 0x77e7, 0xc700, 0xfcfe, | ||
16 | 0x8f87, 0x070e, 0xfc7f, 0x0000, 0x0fff, 0x7f07, 0x0003, 0x0100, | ||
17 | 0xfff0, 0xf8ff, 0x0087, 0x0000, 0xff7f, 0x7fff, 0x00f0, 0x0000, | ||
18 | 0xe0fc, 0xfc80, 0x0080, | ||
19 | }; | ||
diff --git a/src/uxn_polycat_rom.c b/src/uxn_polycat_rom.c new file mode 100644 index 0000000..77d2032 --- /dev/null +++ b/src/uxn_polycat_rom.c | |||
@@ -0,0 +1,47 @@ | |||
1 | const u16 uxn_rom[] = { | ||
2 | 0xa00a, 0x3f80, 0x0837, 0xa005, 0xdf80, 0x0a37, 0xa00c, 0xaf80, | ||
3 | 0x0c37, 0xa001, 0x4080, 0x2237, 0xa000, 0xc880, 0x2437, 0xa001, | ||
4 | 0xae80, 0x9037, 0x8022, 0x3680, 0x013f, 0x8000, 0x3180, 0x2436, | ||
5 | 0x8001, 0x3f80, 0x0231, 0xa0f6, 0x2617, 0x8002, 0x30a0, 0x0018, | ||
6 | 0x3880, 0x2a37, 0x8000, 0x30a0, 0x0010, 0x3980, 0x2837, 0xa003, | ||
7 | 0xa780, 0x2c37, 0xa001, 0x2f17, 0x80ff, 0xa002, 0x0a15, 0x80ff, | ||
8 | 0xa002, 0x4315, 0xa005, 0x2617, 0x8001, 0x0e00, 0x8002, 0x3080, | ||
9 | 0x2a37, 0x8000, 0x30a0, 0x0008, 0x3980, 0x2837, 0xa002, 0x9780, | ||
10 | 0x2c37, 0xa081, 0x2f97, 0x1780, 0x0230, 0xa000, 0x1038, 0x802a, | ||
11 | 0x3780, 0x0030, 0xa000, 0x0839, 0x8028, 0x37a0, 0x0337, 0x802c, | ||
12 | 0x37a0, 0x812f, 0x17a0, 0x002f, 0x0ea0, 0x005e, 0x0e6c, 0x8092, | ||
13 | 0x3680, 0x0030, 0x2a80, 0x501f, 0x8094, 0x3680, 0x0230, 0x2a80, | ||
14 | 0x601f, 0x1880, 0x120e, 0x8004, 0x1001, 0x0680, 0x0411, 0x8004, | ||
15 | 0x1f80, 0x370e, 0x806d, 0x0e00, 0x0680, 0x2e12, 0x0980, 0x020d, | ||
16 | 0x026c, 0x0680, 0x0004, 0xa002, 0xb738, 0x802c, 0x3780, 0x0230, | ||
17 | 0xa000, 0x0838, 0x802a, 0x3780, 0x0030, 0xa000, 0x0839, 0x8028, | ||
18 | 0x37a0, 0x812f, 0x9717, 0x8001, 0x136c, 0x008f, 0x8034, 0x1209, | ||
19 | 0x8002, 0x0d42, 0x6c4f, 0x8000, 0x07a0, 0x0287, 0x3814, 0x8000, | ||
20 | 0x0480, 0x403f, 0xa003, 0x4738, 0x802c, 0x3780, 0x0030, 0x8028, | ||
21 | 0x3780, 0x0230, 0xa000, 0x1038, 0x802a, 0x37a0, 0x812f, 0x1780, | ||
22 | 0x0113, 0x6c00, 0xa002, 0x7faf, 0x802c, 0x3780, 0x0530, 0x8028, | ||
23 | 0x3780, 0x0730, 0x802a, 0x37a0, 0x402f, 0x176f, 0x802c, 0x3780, | ||
24 | 0x9236, 0x2680, 0x0531, 0x8028, 0x3780, 0x9436, 0x2680, 0x0731, | ||
25 | 0x802a, 0x37a0, 0x4196, 0x1680, 0x0009, 0x1880, 0x2f17, 0x6c80, | ||
26 | 0xc0e0, 0xf0f8, 0xe010, 0x0000, 0x0102, 0x0302, 0x0100, 0x0000, | ||
27 | 0x0000, 0x0000, 0x0000, 0x0008, 0x1c3e, 0x3e7f, 0x7fff, 0xff08, | ||
28 | 0x1c3e, 0x3e7f, 0x7fff, 0xfc08, 0x1c3c, 0x3e7e, 0x7eff, 0xff08, | ||
29 | 0x1c3c, 0x3e7e, 0x7eff, 0x1fff, 0xffff, 0xffff, 0x7f3f, 0x0ff7, | ||
30 | 0xefcf, 0xe7f0, 0x7c3f, 0x0fff, 0xffff, 0xffff, 0xfefc, 0xf087, | ||
31 | 0xc3c1, 0x8307, 0x1efc, 0xf0ff, 0xffff, 0xffff, 0x7f3f, 0x0ff0, | ||
32 | 0xe1c1, 0xe0f0, 0x7c3f, 0x0fff, 0xffff, 0xffff, 0xfefc, 0xf0f7, | ||
33 | 0xfbf9, 0xf307, 0x1efc, 0xf0ff, 0xffff, 0xffff, 0x7f3f, 0x0ff0, | ||
34 | 0xe7cf, 0xeff7, 0x7c3f, 0x0fff, 0xffff, 0xffff, 0xfefc, 0xf007, | ||
35 | 0x83c1, 0xc387, 0x1efc, 0xf0ff, 0xffff, 0xffff, 0x7f3f, 0x0ff0, | ||
36 | 0xe0c1, 0xe1f0, 0x7c3f, 0x0fff, 0xffff, 0xffff, 0xfefc, 0xf007, | ||
37 | 0xf3f9, 0xfbf7, 0x1efc, 0xf007, 0x0707, 0x0703, 0x0202, 0x0001, | ||
38 | 0x0707, 0x0703, 0x0000, 0x00e0, 0xf0f0, 0xe0e0, 0x8080, 0x00c0, | ||
39 | 0xf2f9, 0xf9fe, 0xf8b0, 0x00e0, 0xf0f0, 0xe0e0, 0x8080, 0x00c0, | ||
40 | 0xf2f9, 0xf9fe, 0xf8b0, 0x00e0, 0xf0f0, 0xe0e0, 0x8080, 0x00c0, | ||
41 | 0xf2fa, 0xf9fe, 0xf8b0, 0x00e0, 0xf0f0, 0xe0e0, 0x8080, 0x00c0, | ||
42 | 0xf1fa, 0xf9fe, 0xf8b0, 0x0007, 0x0707, 0x070f, 0x0810, 0x0003, | ||
43 | 0x0707, 0x070f, 0x0000, 0x00e0, 0xe0e0, 0xe0e0, 0x8080, 0x00f2, | ||
44 | 0xf9f9, 0xfeb8, 0x8484, 0x00bf, 0x005c, 0x0202, 0x0202, 0x0cef, | ||
45 | 0x106f, 0x9080, 0x8080, 0x74ff, 0x00fe, 0x0101, 0x0001, 0x16fd, | ||
46 | 0x003c, 0x4040, 0x4040, 0x2840, | ||
47 | }; | ||