Browse code

Removed device page from addressable memory

Devine Lu Linvega authored on 12/03/2023 21:56:44
Showing 2 changed files
... ...
@@ -128,13 +128,12 @@ uxn_eval(Uxn *u, Uint16 pc)
128 128
 int
129 129
 uxn_boot(Uxn *u, Uint8 *ram)
130 130
 {
131
-	Uint32 i;
131
+	int i;
132 132
 	char *cptr = (char *)u;
133 133
 	for(i = 0; i < sizeof(*u); i++)
134
-		cptr[i] = 0x00;
134
+		cptr[i] = 0;
135 135
 	u->wst = (Stack *)(ram + 0xf0000);
136 136
 	u->rst = (Stack *)(ram + 0xf0100);
137
-	u->dev = (Uint8 *)(ram + 0xf0200);
138 137
 	u->ram = ram;
139 138
 	return 1;
140 139
 }
... ...
@@ -29,7 +29,7 @@ typedef struct {
29 29
 } Stack;
30 30
 
31 31
 typedef struct Uxn {
32
-	Uint8 *ram, *dev;
32
+	Uint8 *ram, dev[256];
33 33
 	Stack *wst, *rst;
34 34
 	Uint8 (*dei)(struct Uxn *u, Uint8 addr);
35 35
 	void (*deo)(struct Uxn *u, Uint8 addr);