commit c8b6909

Devine Lu Linvega  ·  2024-07-02 23:12:39 +0000 UTC
parent 9af4cf2
(uxn.c) Housekeeping
3 files changed,  +5, -5
+3, -3
 1@@ -26,16 +26,16 @@ WITH REGARD TO THIS SOFTWARE.
 2 #define JMI { pc += uxn.ram[pc++] << 8 | uxn.ram[pc++]; }
 3 #define JMP(x) { if(_2) pc = (x); else pc += (Sint8)(x); }
 4 #define POx(o) { if(_2) { PO2(o) } else PO1(o) }
 5-#define PUx(y) { if(_2) { PU2(y) } else PU1(y) }
 6 #define PO1(o) { o = s->dat[--*sp]; }
 7 #define PO2(o) { o = s->dat[--*sp] | (s->dat[--*sp] << 8); }
 8+#define PUx(y) { if(_2) { PU2(y) } else PU1(y) }
 9 #define PU1(y) { s->dat[s->ptr++] = (y); }
10 #define PU2(y) { tt = (y); s->dat[s->ptr++] = tt >> 0x8; s->dat[s->ptr++] = tt; }
11 #define IMM(x, y) { uxn.x.dat[uxn.x.ptr++] = (y); }
12 #define DEI(o, p) { if(_2) { o = (emu_dei(p) << 8) | emu_dei(p + 1); } else o = emu_dei(p); }
13 #define DEO(p, y) { if(_2) { emu_deo(p, y >> 8); emu_deo(p + 1, y); } else emu_deo(p, y); }
14-#define PEK(o, x, r) { if(_2) { r = (x); o = uxn.ram[r++] << 8 | uxn.ram[r]; } else o = uxn.ram[(x)]; }
15-#define POK(x, y, r) { if(_2) { r = (x); uxn.ram[r++] = y >> 8; uxn.ram[r] = y; } else uxn.ram[(x)] = (y); }
16+#define PEK(o, x, r) { if(_2) { r = (x); o = uxn.ram[r] << 8 | uxn.ram[r + 1]; } else o = uxn.ram[(x)]; }
17+#define POK(x, y, r) { if(_2) { r = (x); uxn.ram[r] = y >> 8; uxn.ram[r + 1] = y; } else uxn.ram[(x)] = (y); }
18 
19 int
20 uxn_eval(Uint16 pc)
+1, -1
1@@ -271,7 +271,7 @@ main(int argc, char **argv)
2 	int i = 1;
3 	char *rom;
4 	if(i != argc && argv[i][0] == '-' && argv[i][1] == 'v') {
5-		fprintf(stdout, "Uxn11 - Varvara Emulator, 1 Jul 2024.\n");
6+		fprintf(stdout, "Uxn11 - Varvara Emulator, 2 Jul 2024.\n");
7 		i++;
8 	}
9 	rom = i == argc ? "boot.rom" : argv[i++];
+1, -1
1@@ -51,7 +51,7 @@ main(int argc, char **argv)
2 		return system_error("usage", "uxncli [-v] file.rom [args..]");
3 	/* Read flags */
4 	if(argv[i][0] == '-' && argv[i][1] == 'v')
5-		return !printf("Uxncli - Console Varvara Emulator, 1 Jul 2024\n");
6+		return !printf("Uxncli - Console Varvara Emulator, 2 Jul 2024\n");
7 	if(!system_boot((Uint8 *)calloc(0x10000 * RAM_PAGES, sizeof(Uint8)), argv[i++]))
8 		return system_error("Init", "Failed to initialize uxn.");
9 	/* Game Loop */