commit f785d15
Devine Lu Linvega
·
2024-06-29 19:13:38 +0000 UTC
parent 07b6002
Removed indirection in system_dei
4 files changed,
+7,
-7
+4,
-4
1@@ -91,12 +91,12 @@ system_boot(Uint8 *ram, char *rom)
2 /* IO */
3
4 Uint8
5-system_dei(Uxn *u, Uint8 addr)
6+system_dei(Uint8 addr)
7 {
8 switch(addr) {
9- case 0x4: return u->wst.ptr;
10- case 0x5: return u->rst.ptr;
11- default: return u->dev[addr];
12+ case 0x4: return uxn.wst.ptr;
13+ case 0x5: return uxn.rst.ptr;
14+ default: return uxn.dev[addr];
15 }
16 }
17
+1,
-1
1@@ -17,7 +17,7 @@ void system_inspect();
2 int system_error(char *msg, const char *err);
3 int system_boot(Uint8 *ram, char *rom);
4
5-Uint8 system_dei(Uxn *u, Uint8 addr);
6+Uint8 system_dei(Uint8 addr);
7 void system_deo(Uxn *u, Uint8 *d, Uint8 port);
8
9 extern char *boot_rom;
+1,
-1
1@@ -48,7 +48,7 @@ Uint8
2 emu_dei(Uint8 addr)
3 {
4 switch(addr & 0xf0) {
5- case 0x00: return system_dei(&uxn, addr);
6+ case 0x00: return system_dei(addr);
7 case 0x10: return console_dei(&uxn, addr);
8 case 0x20: return screen_dei(addr);
9 case 0xc0: return datetime_dei(addr);
+1,
-1
1@@ -24,7 +24,7 @@ Uint8
2 emu_dei(Uint8 addr)
3 {
4 switch(addr & 0xf0) {
5- case 0x00: return system_dei(&uxn, addr);
6+ case 0x00: return system_dei(addr);
7 case 0x10: return console_dei(&uxn, addr);
8 case 0xc0: return datetime_dei(addr);
9 }