commit a65c1cb9a8c06730a617875a57bbddb002d4e7d7
parent cfd29ac5119e5b270d5f3e3e9e29d020dadef8d3
Author: neauoire <aliceffekt@gmail.com>
Date: Fri, 1 Sep 2023 15:15:15 -0700
Removed LINK req in uxncli
Diffstat:
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/src/uxn.c b/src/uxn.c
@@ -33,7 +33,7 @@ WITH REGARD TO THIS SOFTWARE.
#define HALT(c) { return emu_halt(u, ins, c, pc - 1); }
#define FLIP { s = ins & 0x40 ? &u->wst : &u->rst; }
-#define SET(x, y) { r = s->ptr; if(x > r) HALT(1) r += (x & k) + y; if(r > 254) HALT(2) ptr = s->dat + r - 1; s->ptr = r; }
+#define SET(x, y) { r = s->ptr; if(x > r) HALT(1) r += y; if(ins & 0x80) r += x; if(r > 254) HALT(2) ptr = s->dat + r - 1; s->ptr = r; }
#define SHIFT(y) { r = s->ptr + y; if(r > 254) HALT(2) ptr = s->dat + r - 1; s->ptr = r; }
int
@@ -44,7 +44,6 @@ uxn_eval(Uxn *u, Uint16 pc)
if(!pc || u->dev[0x0f]) return 0;
for(;;) {
int ins = ram[pc++];
- int k = ins & 0x80 ? 0xff : 0;
Stack *s = ins & 0x40 ? &u->rst : &u->wst;
Uint8 *ptr = s->dat + s->ptr - 1, *rr;
switch(ins & 0x1f ? ins & 0x3f : ins << 4) {
diff --git a/src/uxncli.c b/src/uxncli.c
@@ -72,7 +72,7 @@ main(int argc, char **argv)
system_connect(0xc, DATETIME_VERSION, DATETIME_DEIMASK, DATETIME_DEOMASK);
/* Read flags */
if(argv[i][0] == '-' && argv[i][1] == 'v')
- return system_version("Uxncli - Console Varvara Emulator", "30 Aug 2023");
+ return system_version("Uxncli - Console Varvara Emulator", "29 Aug 2023");
if(!system_init(&u, (Uint8 *)calloc(0x10000 * RAM_PAGES, sizeof(Uint8)), argv[i++]))
return system_error("Init", "Failed to initialize uxn.");
/* Game Loop */