Housekeeping

This commit is contained in:
Devine Lu Linvega 2024-07-15 11:15:21 -07:00
parent c3a54e415e
commit 0f7b483f22
2 changed files with 17 additions and 11 deletions

View File

@ -13,6 +13,8 @@ dest:
@ mkdir -p bin
run: all bin/uxnasm bin/uxncli bin/uxn11
@ bin/uxn11
debug: bin/uxnasm-debug bin/uxncli-debug bin/uxn11-debug
@ bin/uxncli-debug bin/opctest.rom
test: all
@ bin/uxnasm -v && ./bin/uxncli -v && ./bin/uxn11 -v
@ bin/uxnasm etc/opctest.tal bin/opctest.rom
@ -34,3 +36,9 @@ bin/uxncli: ${CLI_src} src/uxncli.c
@ cc ${RELEASE_flags} ${CFLAGS} ${CLI_src} src/uxncli.c -lutil -o bin/uxncli
bin/uxn11: ${EMU_src} src/uxn11.c
@ cc ${RELEASE_flags} ${CFLAGS} ${EMU_src} src/uxn11.c -lX11 -lutil -o bin/uxn11
bin/uxnasm-debug: src/uxnasm.c
@ cc ${DEBUG_flags} ${CFLAGS} src/uxnasm.c -o bin/uxnasm
bin/uxncli-debug: ${CLI_src} src/uxncli.c
@ cc ${DEBUG_flags} ${CFLAGS} ${CLI_src} src/uxncli.c -lutil -o bin/uxncli
bin/uxn11-debug: ${EMU_src} src/uxn11.c
@ cc ${DEBUG_flags} ${CFLAGS} ${EMU_src} src/uxn11.c -lX11 -lutil -o bin/uxn11

View File

@ -16,18 +16,16 @@ WITH REGARD TO THIS SOFTWARE.
*/
char *boot_rom;
Uint16 dev_vers[0x10];
static void
system_zero(int soft)
{
int i;
for(i = 0x100 * soft; i < 0x10000; i++)
for(i = soft ? 0x100 : 0; i < 0x10000; i++)
uxn.ram[i] = 0;
for(i = 0x0; i < 0x100; i++)
uxn.dev[i] = 0;
uxn.wst.ptr = 0;
uxn.rst.ptr = 0;
uxn.wst.ptr = uxn.rst.ptr = 0;
}
static int
@ -52,6 +50,13 @@ system_print(Stack *s)
fprintf(stderr, "< \n");
}
void
system_inspect(void)
{
fprintf(stderr, "WST "), system_print(&uxn.wst);
fprintf(stderr, "RST "), system_print(&uxn.rst);
}
int
system_error(char *msg, const char *err)
{
@ -60,13 +65,6 @@ system_error(char *msg, const char *err)
return 0;
}
void
system_inspect(void)
{
fprintf(stderr, "WST "), system_print(&uxn.wst);
fprintf(stderr, "RST "), system_print(&uxn.rst);
}
void
system_reboot(char *rom, int soft)
{