Defined the location of stacks in shadow memory
This commit is contained in:
parent
4c6821189e
commit
a82f7d79f8
|
@ -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 */
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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.");
|
||||
|
|
Loading…
Reference in New Issue