commit 0f7b483
Devine Lu Linvega
·
2024-07-15 18:15:21 +0000 UTC
parent c3a54e4
Housekeeping
2 files changed,
+17,
-11
M
makefile
+8,
-0
1@@ -13,6 +13,8 @@ dest:
2 @ mkdir -p bin
3 run: all bin/uxnasm bin/uxncli bin/uxn11
4 @ bin/uxn11
5+debug: bin/uxnasm-debug bin/uxncli-debug bin/uxn11-debug
6+ @ bin/uxncli-debug bin/opctest.rom
7 test: all
8 @ bin/uxnasm -v && ./bin/uxncli -v && ./bin/uxn11 -v
9 @ bin/uxnasm etc/opctest.tal bin/opctest.rom
10@@ -34,3 +36,9 @@ bin/uxncli: ${CLI_src} src/uxncli.c
11 @ cc ${RELEASE_flags} ${CFLAGS} ${CLI_src} src/uxncli.c -lutil -o bin/uxncli
12 bin/uxn11: ${EMU_src} src/uxn11.c
13 @ cc ${RELEASE_flags} ${CFLAGS} ${EMU_src} src/uxn11.c -lX11 -lutil -o bin/uxn11
14+bin/uxnasm-debug: src/uxnasm.c
15+ @ cc ${DEBUG_flags} ${CFLAGS} src/uxnasm.c -o bin/uxnasm
16+bin/uxncli-debug: ${CLI_src} src/uxncli.c
17+ @ cc ${DEBUG_flags} ${CFLAGS} ${CLI_src} src/uxncli.c -lutil -o bin/uxncli
18+bin/uxn11-debug: ${EMU_src} src/uxn11.c
19+ @ cc ${DEBUG_flags} ${CFLAGS} ${EMU_src} src/uxn11.c -lX11 -lutil -o bin/uxn11
+9,
-11
1@@ -16,18 +16,16 @@ WITH REGARD TO THIS SOFTWARE.
2 */
3
4 char *boot_rom;
5-Uint16 dev_vers[0x10];
6
7 static void
8 system_zero(int soft)
9 {
10 int i;
11- for(i = 0x100 * soft; i < 0x10000; i++)
12+ for(i = soft ? 0x100 : 0; i < 0x10000; i++)
13 uxn.ram[i] = 0;
14 for(i = 0x0; i < 0x100; i++)
15 uxn.dev[i] = 0;
16- uxn.wst.ptr = 0;
17- uxn.rst.ptr = 0;
18+ uxn.wst.ptr = uxn.rst.ptr = 0;
19 }
20
21 static int
22@@ -52,6 +50,13 @@ system_print(Stack *s)
23 fprintf(stderr, "< \n");
24 }
25
26+void
27+system_inspect(void)
28+{
29+ fprintf(stderr, "WST "), system_print(&uxn.wst);
30+ fprintf(stderr, "RST "), system_print(&uxn.rst);
31+}
32+
33 int
34 system_error(char *msg, const char *err)
35 {
36@@ -60,13 +65,6 @@ system_error(char *msg, const char *err)
37 return 0;
38 }
39
40-void
41-system_inspect(void)
42-{
43- fprintf(stderr, "WST "), system_print(&uxn.wst);
44- fprintf(stderr, "RST "), system_print(&uxn.rst);
45-}
46-
47 void
48 system_reboot(char *rom, int soft)
49 {