commit d13912b
Devine Lu Linvega
·
2026-06-14 16:29:04 +0000 UTC
parent 8970ba7
Deo only calls once per short
1 files changed,
+5,
-11
+5,
-11
1@@ -338,8 +338,8 @@ static Uint8 console_dei_childexit(void) { check_child(); return dev[CMD_EXIT];
2 static void console_deo_vector(void) { console_vector = peek2(&dev[0x10]); }
3 static void console_deo_stdout(void) { fputc(dev[0x18], stdout), fflush(stdout); }
4 static void console_deo_stderr(void) { fputc(dev[0x19], stderr), fflush(stderr); }
5-static void console_deo_hb(void) { fprintf(stderr, "%02x", dev[0x1a]); }
6-static void console_deo_lb(void) { fprintf(stderr, "%02x", dev[0x1b]); }
7+static void console_deo_debug1(void) { fprintf(stderr, "%02x", dev[0x1a]); }
8+static void console_deo_debug2(void) { fprintf(stderr, "%02x%02x", dev[0x1a], dev[0x1b]); }
9
10 /* clang-format on */
11
12@@ -944,28 +944,22 @@ static const deo_handler deo_handlers[256] = {
13 [0x03] = system_deo_expansion,
14 [0x04] = system_deo_wst,
15 [0x05] = system_deo_rst,
16- [0x08] = system_deo_colorize,
17 [0x09] = system_deo_colorize,
18- [0x0a] = system_deo_colorize,
19 [0x0b] = system_deo_colorize,
20- [0x0c] = system_deo_colorize,
21 [0x0d] = system_deo_colorize,
22 [0x0e] = system_deo_print,
23 [0x11] = console_deo_vector,
24 [0x18] = console_deo_stdout,
25 [0x19] = console_deo_stderr,
26- [0x1a] = console_deo_hb,
27- [0x1b] = console_deo_lb,
28+ [0x1a] = console_deo_debug1,
29+ [0x1b] = console_deo_debug2,
30 [0x1f] = console_deo_fork,
31 [0x21] = screen_deo_vector,
32 [0x23] = screen_deo_width,
33 [0x25] = screen_deo_height,
34 [0x26] = screen_deo_auto,
35- [0x28] = screen_deo_x,
36 [0x29] = screen_deo_x,
37- [0x2a] = screen_deo_y,
38 [0x2b] = screen_deo_y,
39- [0x2c] = screen_deo_addr,
40 [0x2d] = screen_deo_addr,
41 [0x2e] = screen_deo_pixel,
42 [0x2f] = screen_deo_sprite,
43@@ -1012,7 +1006,7 @@ emu_deo(const Uint8 port, const Uint8 value)
44 #define Lda(s,o) Pu1(r,ram[o]) if(d) Pu1(r,ram[(s)(o+1)])
45 #define Sta(s,o,u) if(d) ram[o]=u>>8, ram[(s)(o+1)]=u; else ram[o]=u;
46 #define Dei Pu1(r,emu_dei(x)) if(d) Pu1(r,dev[(x+1)&0xff])
47-#define Deo if(d) emu_deo(x,y>>8), emu_deo(x+1,y); else emu_deo(x,y);
48+#define Deo if(d) dev[x&0xff]=y>>8, emu_deo(x+1,y); else emu_deo(x,y);
49
50 #define MUTE (void)x;(void)y;(void)z;(void)r;(void)d;
51