diff --git a/src/uxn.c b/src/uxn.c index 49fadcf..b234790 100644 --- a/src/uxn.c +++ b/src/uxn.c @@ -26,16 +26,16 @@ WITH REGARD TO THIS SOFTWARE. #define JMI { pc += uxn.ram[pc++] << 8 | uxn.ram[pc++]; } #define JMP(x) { if(_2) pc = (x); else pc += (Sint8)(x); } #define POx(o) { if(_2) { PO2(o) } else PO1(o) } -#define PUx(y) { if(_2) { PU2(y) } else PU1(y) } #define PO1(o) { o = s->dat[--*sp]; } #define PO2(o) { o = s->dat[--*sp] | (s->dat[--*sp] << 8); } +#define PUx(y) { if(_2) { PU2(y) } else PU1(y) } #define PU1(y) { s->dat[s->ptr++] = (y); } #define PU2(y) { tt = (y); s->dat[s->ptr++] = tt >> 0x8; s->dat[s->ptr++] = tt; } #define IMM(x, y) { uxn.x.dat[uxn.x.ptr++] = (y); } #define DEI(o, p) { if(_2) { o = (emu_dei(p) << 8) | emu_dei(p + 1); } else o = emu_dei(p); } #define DEO(p, y) { if(_2) { emu_deo(p, y >> 8); emu_deo(p + 1, y); } else emu_deo(p, y); } -#define PEK(o, x, r) { if(_2) { r = (x); o = uxn.ram[r++] << 8 | uxn.ram[r]; } else o = uxn.ram[(x)]; } -#define POK(x, y, r) { if(_2) { r = (x); uxn.ram[r++] = y >> 8; uxn.ram[r] = y; } else uxn.ram[(x)] = (y); } +#define PEK(o, x, r) { if(_2) { r = (x); o = uxn.ram[r] << 8 | uxn.ram[r + 1]; } else o = uxn.ram[(x)]; } +#define POK(x, y, r) { if(_2) { r = (x); uxn.ram[r] = y >> 8; uxn.ram[r + 1] = y; } else uxn.ram[(x)] = (y); } int uxn_eval(Uint16 pc) diff --git a/src/uxn11.c b/src/uxn11.c index 594b3ea..c39b424 100644 --- a/src/uxn11.c +++ b/src/uxn11.c @@ -271,7 +271,7 @@ main(int argc, char **argv) int i = 1; char *rom; if(i != argc && argv[i][0] == '-' && argv[i][1] == 'v') { - fprintf(stdout, "Uxn11 - Varvara Emulator, 1 Jul 2024.\n"); + fprintf(stdout, "Uxn11 - Varvara Emulator, 2 Jul 2024.\n"); i++; } rom = i == argc ? "boot.rom" : argv[i++]; diff --git a/src/uxncli.c b/src/uxncli.c index fd451ac..f31da65 100644 --- a/src/uxncli.c +++ b/src/uxncli.c @@ -51,7 +51,7 @@ main(int argc, char **argv) return system_error("usage", "uxncli [-v] file.rom [args..]"); /* Read flags */ if(argv[i][0] == '-' && argv[i][1] == 'v') - return !printf("Uxncli - Console Varvara Emulator, 1 Jul 2024\n"); + return !printf("Uxncli - Console Varvara Emulator, 2 Jul 2024\n"); if(!system_boot((Uint8 *)calloc(0x10000 * RAM_PAGES, sizeof(Uint8)), argv[i++])) return system_error("Init", "Failed to initialize uxn."); /* Game Loop */