uxn

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

commit 6c068b777472802177aeb213176d5e46b3a2e180
parent bdd071cab4773449d0e319604255e04072d02f7e
Author: Devine Lu Linvega <aliceffekt@gmail.com>
Date:   Sun, 12 Mar 2023 14:56:44 -0700

Removed device page from addressable memory

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

diff --git a/src/uxn.c b/src/uxn.c @@ -128,13 +128,12 @@ uxn_eval(Uxn *u, Uint16 pc) int uxn_boot(Uxn *u, Uint8 *ram) { - Uint32 i; + int i; char *cptr = (char *)u; for(i = 0; i < sizeof(*u); i++) - cptr[i] = 0x00; + cptr[i] = 0; u->wst = (Stack *)(ram + 0xf0000); u->rst = (Stack *)(ram + 0xf0100); - u->dev = (Uint8 *)(ram + 0xf0200); u->ram = ram; return 1; } diff --git a/src/uxn.h b/src/uxn.h @@ -29,7 +29,7 @@ typedef struct { } Stack; typedef struct Uxn { - Uint8 *ram, *dev; + Uint8 *ram, dev[256]; Stack *wst, *rst; Uint8 (*dei)(struct Uxn *u, Uint8 addr); void (*deo)(struct Uxn *u, Uint8 addr);