Skip to content

Commit 9ec6824

Browse files
committed
Increase RAM size
1 parent 75b54a2 commit 9ec6824

File tree

4 files changed

+808
-806
lines changed

4 files changed

+808
-806
lines changed

scripts/emuwasm.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
#!/usr/bin/env node
22

3-
const WST_OFFSET = 0x10000;
4-
const RST_OFFSET = 0x10100;
5-
const IO_OFFSET = 0x10200;
6-
const STATE_OFFSET = 0x1020f;
7-
const MEMORY_SIZE = 0x10300;
3+
const WST_OFFSET = 0x100000;
4+
const RST_OFFSET = 0x100100;
5+
const IO_OFFSET = 0x100200;
6+
const STATE_OFFSET = 0x10020f;
7+
const MEMORY_SIZE = 0x100300;
88

99
const instructions = [
1010
[

src/cli/cli.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33

44
#include "cli_core.h"
55

6+
#define IO_OFFSET 0x100200
7+
68
typedef struct w2c_system {
79
wasm_rt_memory_t *mem;
810
} w2c_system;
@@ -17,7 +19,7 @@ void w2c_system_deo(struct w2c_system *sys, u32 port, u32 value) {
1719
}
1820

1921
u32 w2c_system_dei(struct w2c_system *sys, u32 port) {
20-
return (u32)sys->mem->data[0x10200 + port];
22+
return (u32)sys->mem->data[IO_OFFSET + port];
2123
}
2224

2325
int main(int argc, char **argv) {

src/uxn.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@ export function Uxn() {
4242
},
4343
})
4444
).instance.exports;
45-
this.ram = new Uint8Array(core.memory.buffer, 0, 0x10000);
46-
wst = new Uint8Array(core.memory.buffer, 0x10000, 0x100);
47-
rst = new Uint8Array(core.memory.buffer, 0x10100, 0x100);
48-
this.dev = new Uint8Array(core.memory.buffer, 0x10200, 0x100);
45+
this.ram = new Uint8Array(core.memory.buffer, 0, 0x100000);
46+
wst = new Uint8Array(core.memory.buffer, 0x100000, 0x100);
47+
rst = new Uint8Array(core.memory.buffer, 0x100100, 0x100);
48+
this.dev = new Uint8Array(core.memory.buffer, 0x100200, 0x100);
4949
};
5050

5151
/** @type {(rom: Uint8Array) => Uxn} */

0 commit comments

Comments
 (0)