M src/uxn.c => src/uxn.c +2 -3
@@ 128,13 128,12 @@ uxn_eval(Uxn *u, Uint16 pc)
int
uxn_boot(Uxn *u, Uint8 *ram)
{
- Uint32 i;
+ int i;
char *cptr = (char *)u;
for(i = 0; i < sizeof(*u); i++)
- cptr[i] = 0x00;
+ cptr[i] = 0;
u->wst = (Stack *)(ram + 0xf0000);
u->rst = (Stack *)(ram + 0xf0100);
- u->dev = (Uint8 *)(ram + 0xf0200);
u->ram = ram;
return 1;
}
M src/uxn.h => src/uxn.h +1 -1
@@ 29,7 29,7 @@ typedef struct {
} Stack;
typedef struct Uxn {
- Uint8 *ram, *dev;
+ Uint8 *ram, dev[256];
Stack *wst, *rst;
Uint8 (*dei)(struct Uxn *u, Uint8 addr);
void (*deo)(struct Uxn *u, Uint8 addr);