commit d5114e8
Devine Lu Linvega
·
2024-11-13 17:46:34 +0000 UTC
parent 4e606f7
Merged bios ram and boot ram
5 files changed,
+13,
-13
+9,
-10
1@@ -19,7 +19,6 @@ WITH REGARD TO THIS SOFTWARE.
2
3 Uxn bios;
4 char *boot_rom;
5-Uint8 bios_ram[0x10000];
6
7 static void
8 system_zero(Uxn *u, int soft)
9@@ -81,23 +80,23 @@ system_reboot(char *rom, int soft)
10 int
11 system_boot(Uint8 *ram, char *boot)
12 {
13- if(!system_load(&bios_ram[PAGE_PROGRAM], "bios.rom")) {
14+ if(!system_load(&ram[BIOS_PAGE + PAGE_PROGRAM], "bios.rom")) {
15 size_t i, bios_len = sizeof(bios_rom) / sizeof(bios_rom[0]);
16 for(i = 0; i < bios_len; i++)
17- bios_ram[PAGE_PROGRAM + i] = bios_rom[i];
18+ ram[BIOS_PAGE + PAGE_PROGRAM + i] = bios_rom[i];
19 }
20 /* Load rom(bios) */
21- bios.ram = bios_ram;
22- bios.dev = bios_ram + 0x8300;
23- bios.wst.dat = bios_ram + 0x8400;
24- bios.rst.dat = bios_ram + 0x8500;
25+ bios.ram = ram + BIOS_PAGE;
26+ bios.dev = ram + BIOS_PAGE + 0x8300;
27+ bios.wst.dat = ram + BIOS_PAGE + 0x8400;
28+ bios.rst.dat = ram + BIOS_PAGE + 0x8500;
29 bios.dev[0xe] = 0xff;
30 /* Load rom(main) */
31 if(system_load(&ram[PAGE_PROGRAM], boot)) {
32 uxn.ram = ram;
33- uxn.dev = bios_ram + 0x8000;
34- uxn.wst.dat = bios_ram + 0x8100;
35- uxn.rst.dat = bios_ram + 0x8200;
36+ uxn.dev = ram + BIOS_PAGE + 0x8000;
37+ uxn.wst.dat = ram + BIOS_PAGE + 0x8100;
38+ uxn.rst.dat = ram + BIOS_PAGE + 0x8200;
39 boot_rom = boot;
40 return 1;
41 }
+1,
-0
1@@ -10,6 +10,7 @@ WITH REGARD TO THIS SOFTWARE.
2 */
3
4 #define RAM_PAGES 0x10
5+#define BIOS_PAGE 0x10 * 0x10000
6
7 void system_reboot(char *rom, int soft);
8 void system_inspect(void);
+1,
-1
1@@ -14,7 +14,7 @@
2 .Screen/height DEI2 #0030 SUB2 ,on-frame/anchor-y STR2
3 BRK
4
5-@on-frame ( -> )
6+@on-frame ( -> )
7 [ LIT &f $1 ] INCk ,&f STR
8 #07 AND ?{
9 #0008 .Screen/x DEO2
+1,
-1
1@@ -18,7 +18,7 @@
2 #include "devices/datetime.h"
3
4 Uxn uxn;
5-Uint8 ram[0x10000 * RAM_PAGES];
6+Uint8 ram[0x10000 * (RAM_PAGES + 1)];
7
8 /*
9 Copyright (c) 2022 Devine Lu Linvega
+1,
-1
1@@ -19,7 +19,7 @@ WITH REGARD TO THIS SOFTWARE.
2 */
3
4 Uxn uxn;
5-Uint8 ram[0x10000 * RAM_PAGES];
6+Uint8 ram[0x10000 * (RAM_PAGES + 1)];
7
8 Uint8
9 emu_dei(Uxn *u, Uint8 addr)