uxn

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

commit a2370ed4e3896d377fc1236042b9a04b3948c2c4
parent 2783e2945f2bb3a9d4205fd01a02d98ff040e1bd
Author: neauoire <aliceffekt@gmail.com>
Date:   Sun, 28 Mar 2021 11:06:36 -0700

Disks are now loaded at 0x0200

Diffstat:
Mprojects/software/left.usm | 8++++----
Msrc/assembler.c | 4+++-
Msrc/uxn.c | 2+-
3 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/projects/software/left.usm b/projects/software/left.usm @@ -713,7 +713,7 @@ RTN @filepath1 [ projects/examples/gui.hover.usm 00 ] @filepath [ projects/software/noodle.usm 00 ] -|3000 ;document { eof 2 body 8000 } -|c000 ;clip { len 2 body 256 } +@ERROR BRK -|d000 @ERROR BRK -\ No newline at end of file +;clip { len 2 body 256 } +;document { eof 2 body 2 } +\ No newline at end of file diff --git a/src/assembler.c b/src/assembler.c @@ -11,6 +11,8 @@ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE. */ +#define OFFSET 0x0200 + typedef unsigned char Uint8; typedef signed char Sint8; typedef unsigned short Uint16; @@ -462,7 +464,7 @@ main(int argc, char *argv[]) error("Assembly", "Failed"); return 1; } - fwrite(p.data, p.ptr, 1, fopen(argv[2], "wb")); + fwrite(p.data + OFFSET, p.ptr - OFFSET, 1, fopen(argv[2], "wb")); fclose(f); cleanup(argv[2]); return 0; diff --git a/src/uxn.c b/src/uxn.c @@ -187,7 +187,7 @@ loaduxn(Uxn *u, char *filepath) FILE *f; if(!(f = fopen(filepath, "rb"))) return haltuxn(u, "Missing input rom.", 0); - fread(u->ram.dat, sizeof(u->ram.dat), 1, f); + fread(u->ram.dat + PAGE_VECTORS, sizeof(u->ram.dat) - PAGE_VECTORS, 1, f); printf("Uxn loaded[%s].\n", filepath); return 1; }