(uxn.c) Housekeeping

This commit is contained in:
Devine Lu Linvega 2024-07-02 15:12:39 -08:00
parent 9af4cf2d05
commit c8b690921e
3 changed files with 5 additions and 5 deletions

View File

@ -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)

View File

@ -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++];

View File

@ -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 */