uxn

Varvara Ordinator, written in ANSI C(SDL2)
git clone https://git.eamoncaddigan.net/uxn.git
Log | Files | Refs | README | LICENSE

commit a82f7d79f8a23d29505d15f018cde3733f7299e4
parent 4c6821189e639e38b3e4121bba17514753ab413b
Author: neauoire <aliceffekt@gmail.com>
Date:   Thu,  6 Jan 2022 17:29:34 -0800

Defined the location of stacks in shadow memory

Diffstat:
Msrc/uxn.h | 2++
Msrc/uxncli.c | 2+-
Msrc/uxnemu.c | 2+-
3 files changed, 4 insertions(+), 2 deletions(-)

diff --git 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 @@ -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 @@ -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.");