From 9f7b58e656132645c038ae8e4efcb00db676f5d8 Mon Sep 17 00:00:00 2001 From: Stefan Reinauer Date: Sat, 30 May 2026 19:58:12 -0700 Subject: [PATCH] pcem: fit bridgeboard glue into UAE builds The embedded PCem sources are compiled as part of UAE's bridgeboard integration, not as a standalone PCem binary. Keep the standalone dynarec entry points behind the non-UAE build guard, leave the shared block-end flag visible to the interpreter code, and provide default device configuration values used by the bridgeboard devices. --- pcem/386_dynarec.cpp | 10 +++++++--- pcem/keyboard_at.h | 1 - pcem/pcemglue.h | 2 -- x86.cpp | 13 +++++++++++++ 4 files changed, 20 insertions(+), 6 deletions(-) diff --git a/pcem/386_dynarec.cpp b/pcem/386_dynarec.cpp index 4fabbb26..f353810d 100644 --- a/pcem/386_dynarec.cpp +++ b/pcem/386_dynarec.cpp @@ -10,7 +10,9 @@ #include "x87.h" #include "mem.h" #include "codegen.h" +#ifndef UAE #include "codegen_backend.h" +#endif #include "cpu.h" #include "fdc.h" #include "nmi.h" @@ -237,13 +239,13 @@ static void prefetch_flush() #include "386_ops.h" +int cpu_end_block_after_ins = 0; + +#ifndef UAE #define CACHE_ON() (!(cr0 & (1 << 30)) && !(cpu_state.flags & T_FLAG)) //#define CACHE_ON() 0 -int cpu_end_block_after_ins = 0; - - static inline void exec_interpreter(void) { cpu_block_end = 0; @@ -660,3 +662,5 @@ void exec386_dynarec(int cycs) cycles_main -= (cycles_start - cycles); } } + +#endif diff --git a/pcem/keyboard_at.h b/pcem/keyboard_at.h index 4c49c988..5dafaca9 100644 --- a/pcem/keyboard_at.h +++ b/pcem/keyboard_at.h @@ -5,6 +5,5 @@ void keyboard_at_poll(); void keyboard_at_set_mouse(void (*mouse_write)(uint8_t val, void *p), void *p); void keyboard_at_adddata_mouse(uint8_t val); -extern uint8_t mouse_queue[16]; extern int mouse_queue_start, mouse_queue_end; extern int mouse_scan; diff --git a/pcem/pcemglue.h b/pcem/pcemglue.h index de674a56..a5d2b9ab 100644 --- a/pcem/pcemglue.h +++ b/pcem/pcemglue.h @@ -10,8 +10,6 @@ uint32_t mem_read_romextl(uint32_t addr, void *priv); void pcem_linear_mark(int offset); extern int SOUNDBUFLEN; -extern int32_t *x86_sndbuffer[2]; -extern bool x86_sndbuffer_filled[2]; extern void *pcem_mapping_linear_priv; extern uae_u32 pcem_mapping_linear_offset; diff --git a/x86.cpp b/x86.cpp index 357d0760..eca054b3 100644 --- a/x86.cpp +++ b/x86.cpp @@ -3569,11 +3569,24 @@ int device_get_config_int(const char *s) if (!strcmp(s, "dithering")) { return 1; } + if (!strcmp(s, "dithersub")) { + return 1; + } if (!strcmp(s, "dacfilter")) { return 1; } if (!strcmp(s, "recompiler")) { +#ifdef _WIN32 return 1; +#else + return 0; +#endif + } + if (!strcmp(s, "sli") || !strcmp(s, "type")) { + return 0; + } + if (!strcmp(s, "framebuffer_memory") || !strcmp(s, "texture_memory")) { + return 2; } if (!strcmp(s, "memory")) { return pcem_getvramsize() >> 20; -- 2.47.3