Removed POKDEV/PEKDEV macros

This commit is contained in:
Devine Lu Linvega 2023-04-10 10:53:30 -07:00
parent 7e1ac70dc2
commit 8260d9496f
3 changed files with 2 additions and 8 deletions

View File

@ -186,4 +186,3 @@ screen_deo(Uint8 *ram, Uint8 *d, Uint8 port)
}
}
}

View File

@ -71,14 +71,12 @@ system_load(Uxn *u, char *filename)
void
system_deo(Uxn *u, Uint8 *d, Uint8 port)
{
Uint16 a;
switch(port) {
case 0x3:
PEKDEV(a, 0x2);
system_cmd(u->ram, a);
system_cmd(u->ram, PEEK2(d + 2));
break;
case 0xe:
if(u->wst->ptr || u->rst->ptr) system_inspect(u);
system_inspect(u);
break;
}
}

View File

@ -22,9 +22,6 @@ typedef unsigned int Uint32;
#define POKE2(d, v) { (d)[0] = (v) >> 8; (d)[1] = (v); }
#define PEEK2(d) ((d)[0] << 8 | (d)[1])
#define POKDEV(x, y) { d[(x)] = (y) >> 8; d[(x) + 1] = (y); }
#define PEKDEV(o, x) { (o) = (d[(x)] << 8) + d[(x) + 1]; }
/* clang-format on */
typedef struct {