diff --git a/makefile b/makefile index 6d59e68..a0b9b06 100644 --- a/makefile +++ b/makefile @@ -12,11 +12,11 @@ all: dest bin/uxnasm bin/uxncli bin/uxn11 dest: @ mkdir -p bin run: all bin/uxnasm bin/uxncli bin/uxn11 - @ ./bin/uxn11 + @ bin/uxn11 test: bin/uxnasm bin/uxncli bin/uxn11 - @ ./bin/uxnasm -v && ./bin/uxncli -v && ./bin/uxn11 -v - @ ./bin/uxnasm etc/opctest.tal bin/opctest.rom - @ ./bin/uxncli bin/opctest.rom + @ bin/uxnasm -v && ./bin/uxncli -v && ./bin/uxn11 -v + @ bin/uxnasm etc/opctest.tal bin/opctest.rom + @ bin/uxncli bin/opctest.rom install: all bin/uxnasm bin/uxncli bin/uxn11 @ cp bin/uxn11 bin/uxnasm bin/uxncli ~/bin/ uninstall: diff --git a/src/devices/system.c b/src/devices/system.c index 81521ca..3912382 100644 --- a/src/devices/system.c +++ b/src/devices/system.c @@ -47,14 +47,10 @@ static void system_print(Stack *s, char *name) { Uint8 i; - fprintf(stderr, "%s ", name); - for(i = 0; i < 9; i++) { - Uint8 pos = s->ptr - 4 + i; - fprintf(stderr, !pos ? "[%02x]" : i == 4 ? "<%02x>" : - " %02x ", - s->dat[pos]); - } - fprintf(stderr, "\n"); + fprintf(stderr, "%s ", name, s->ptr); + for(i = s->ptr - 7; i != s->ptr + 1; i++) + fprintf(stderr, "%02x%c", s->dat[i], i == 0 ? '|' : ' '); + fprintf(stderr, "< \n"); } int @@ -68,8 +64,8 @@ system_error(char *msg, const char *err) void system_inspect(Uxn *u) { - system_print(&u->wst, "wst"); - system_print(&u->rst, "rst"); + system_print(&u->wst, "WST"); + system_print(&u->rst, "RST"); } int diff --git a/src/uxn11.c b/src/uxn11.c index b52a95f..b5a2d28 100644 --- a/src/uxn11.c +++ b/src/uxn11.c @@ -267,7 +267,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, 22 Feb 2023.\n"); + fprintf(stdout, "Uxn11 - Varvara Emulator, 28 Feb 2023.\n"); i++; } rom = i == argc ? "boot.rom" : argv[i++]; diff --git a/src/uxncli.c b/src/uxncli.c index 950209a..b7f8062 100644 --- a/src/uxncli.c +++ b/src/uxncli.c @@ -71,7 +71,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 system_version("Uxncli - Console Varvara Emulator", "15 Feb 2024"); + return system_version("Uxncli - Console Varvara Emulator", "28 Feb 2024"); if(!system_boot(&u, (Uint8 *)calloc(0x10000 * RAM_PAGES, sizeof(Uint8)), argv[i++])) return system_error("Init", "Failed to initialize uxn."); /* Game Loop */