commit cbc4de7
Devine Lu Linvega
·
2024-11-13 02:11:22 +0000 UTC
parent ecfecbb
Hooked bios to screen vector
2 files changed,
+9,
-2
M
makefile
M
makefile
+5,
-1
1@@ -11,7 +11,7 @@ PREFIX=${HOME}/.local
2
3 all: bin/uxnasm bin/uxncli bin/uxn11
4
5-run: all bin/uxnasm bin/uxncli bin/uxn11
6+run: all bin/uxnasm bin/uxncli bin/uxn11 bin/mouse
7 @ bin/uxn11
8 debug: bin/uxnasm-debug bin/uxncli-debug bin/uxn11-debug
9 @ bin/uxncli-debug bin/opctest.rom
10@@ -40,6 +40,10 @@ archive:
11 clean:
12 @ rm -fr bin
13
14+bin/mouse: etc/mouse.tal
15+ @ bin/uxnasm etc/mouse.tal bin/mouse.rom
16+ @ bin/uxn11 bin/mouse.rom
17+
18 bin/uxnasm: src/uxnasm.c
19 @ mkdir -p bin
20 @ cc ${RELEASE_flags} ${CFLAGS} src/uxnasm.c -o bin/uxnasm
+4,
-1
1@@ -237,7 +237,10 @@ emu_run(void)
2 emu_event();
3 if(poll(&fds[1], 1, 0)) {
4 read(fds[1].fd, expirations, 8);
5- uxn_eval(&uxn, uxn.dev[0x20] << 8 | uxn.dev[0x21]);
6+ if(uxn.dev[0x20])
7+ uxn_eval(&uxn, uxn.dev[0x20] << 8 | uxn.dev[0x21]);
8+ if(uxn.dev[0xe] && bios.dev[0x20])
9+ uxn_eval(&bios, bios.dev[0x20] << 8 | bios.dev[0x21]);
10 if(screen_changed()) {
11 int x = uxn_screen.x1 * uxn_screen.scale, y = uxn_screen.y1 * uxn_screen.scale;
12 int w = uxn_screen.x2 * uxn_screen.scale - x, h = uxn_screen.y2 * uxn_screen.scale - y;