Removed indirection in system_dei

This commit is contained in:
Devine Lu Linvega 2024-06-29 11:13:38 -08:00
parent 07b60021af
commit f785d15d65
4 changed files with 7 additions and 7 deletions

View File

@ -91,12 +91,12 @@ system_boot(Uint8 *ram, char *rom)
/* IO */
Uint8
system_dei(Uxn *u, Uint8 addr)
system_dei(Uint8 addr)
{
switch(addr) {
case 0x4: return u->wst.ptr;
case 0x5: return u->rst.ptr;
default: return u->dev[addr];
case 0x4: return uxn.wst.ptr;
case 0x5: return uxn.rst.ptr;
default: return uxn.dev[addr];
}
}

View File

@ -17,7 +17,7 @@ void system_inspect();
int system_error(char *msg, const char *err);
int system_boot(Uint8 *ram, char *rom);
Uint8 system_dei(Uxn *u, Uint8 addr);
Uint8 system_dei(Uint8 addr);
void system_deo(Uxn *u, Uint8 *d, Uint8 port);
extern char *boot_rom;

View File

@ -48,7 +48,7 @@ Uint8
emu_dei(Uint8 addr)
{
switch(addr & 0xf0) {
case 0x00: return system_dei(&uxn, addr);
case 0x00: return system_dei(addr);
case 0x10: return console_dei(&uxn, addr);
case 0x20: return screen_dei(addr);
case 0xc0: return datetime_dei(addr);

View File

@ -24,7 +24,7 @@ Uint8
emu_dei(Uint8 addr)
{
switch(addr & 0xf0) {
case 0x00: return system_dei(&uxn, addr);
case 0x00: return system_dei(addr);
case 0x10: return console_dei(&uxn, addr);
case 0xc0: return datetime_dei(addr);
}