diff --git a/src/uxn.h b/src/uxn.h index 9aeb72a..2359c47 100644 --- a/src/uxn.h +++ b/src/uxn.h @@ -16,6 +16,8 @@ typedef signed short Sint16; typedef unsigned int Uint32; #define PAGE_PROGRAM 0x0100 +#define PAGE_WST 0xfe00 +#define PAGE_RST 0xff00 /* clang-format off */ diff --git a/src/uxncli.c b/src/uxncli.c index d2d4605..8966ea4 100644 --- a/src/uxncli.c +++ b/src/uxncli.c @@ -143,7 +143,7 @@ main(int argc, char **argv) shadow = (Uint8 *)calloc(0xffff, sizeof(Uint8)); memory = (Uint8 *)calloc(0xffff, sizeof(Uint8)); - if(!uxn_boot(&u, (Stack *)(shadow + 0x200), (Stack *)(shadow + 0x400), memory)) + if(!uxn_boot(&u, (Stack *)(shadow + PAGE_WST), (Stack *)(shadow + PAGE_RST), memory)) return error("Boot", "Failed"); /* system */ devsystem = uxn_port(&u, 0x0, system_dei, system_deo); diff --git a/src/uxnemu.c b/src/uxnemu.c index 4a4a23c..40881d2 100644 --- a/src/uxnemu.c +++ b/src/uxnemu.c @@ -280,7 +280,7 @@ start(Uxn *u, char *rom) if(!uxn_boot(&hypervisor, (Stack *)(shadow + 0xfc00), (Stack *)(shadow + 0xfd00), shadow)) return error("Boot", "Failed to start uxn."); - if(!uxn_boot(u, (Stack *)(shadow + 0xfe00), (Stack *)(shadow + 0xff00), memory)) + if(!uxn_boot(u, (Stack *)(shadow + PAGE_WST), (Stack *)(shadow + PAGE_RST), memory)) return error("Boot", "Failed to start uxn."); if(!load(&hypervisor, "hypervisor.rom")) error("Hypervisor", "No debugger found.");