Stefan Reinauer [Wed, 17 Jun 2026 20:21:35 +0000 (13:21 -0700)]
prowizard: update integrated ripper to 1.70a
Refresh the bundled ProWizard sources from the standalone 1.70a
tree and add the new ripper modules to the Unix and Visual Studio
build lists.
Keep the WinUAE entry point, module-ripper file hooks, logging,
and byte-order compatibility shims while updating the visible Pro
Wizard version labels.
Drop duplicate upstream source aliases from the integrated build lists
so the imported ripper objects link without duplicate definitions.
Stefan Reinauer [Fri, 5 Jun 2026 04:41:33 +0000 (21:41 -0700)]
bsdsocket: preserve Unix trap context for host calls
The Unix shutdown and setsockopt paths need the active TrapContext when
they resolve guest socket descriptors and copy guest option data. Store
the current context in the socket base before dispatching those host
calls and when the deferred WaitSelect worker is armed.
Stefan Reinauer [Fri, 5 Jun 2026 04:41:16 +0000 (21:41 -0700)]
target: share WinUAE build date with Unix
The Unix target date was copied as a separate literal and had already
drifted from the date used by the Windows version macros. Move the
date macros to a small shared header and have both targets read the
same value.
Stefan Reinauer [Thu, 4 Jun 2026 14:55:29 +0000 (07:55 -0700)]
clipboard: expose host text polling hook
Declare the host-side text polling entry point in the shared header.
This lets target backends report clipboard text changes without private
header dependencies.
- Apply writes to the current sample set volume register immediately.
The stream volume was only loaded when a sample set was (re)loaded,
so volume changes during playback (e.g. AHI volume fades on a
looping sound) were silently ignored, even though current-set
register writes are documented to take effect on the next sample
period.
- Scale samples by the set volume and board channel volume
multiplicatively. The previous averaging formula had a 0.5 gain
floor, so volume 0 still played at half loudness.
- Initialize the board channel volumes for all stream channels, not
just the first two.
jit: split x86 compiler files into platform directory
Keep the root JIT files as dispatchers and move the x86 compiler
implementation under jit/x86. This mirrors the Amiberry split and keeps
platform-specific JIT code out of the shared wrapper files.
Update the x86 generator paths so regenerated x86 tables do not
overwrite the root dispatchers.
Stefan Reinauer [Thu, 4 Jun 2026 03:36:51 +0000 (20:36 -0700)]
prowizard: use C++ linkage for host callbacks
Pro-Wizard is built as C++ on Windows, so its host callback
declarations should use normal C++ linkage.
Drop the C-linkage guard around those callback declarations. Unix
builds should match Windows by compiling Pro-Wizard as C++ instead of
changing callback linkage.
Stefan Reinauer [Wed, 27 May 2026 16:06:10 +0000 (09:06 -0700)]
slirp: harden backend reinitialization
Ariadne can close and reopen the selected Ethernet backend while
guest software probes or retries card configuration. The SLIRP
backend destroyed callback state before the receive thread was known
to be stopped, and ignored initialization or thread start failures.
Join the receive thread before teardown, keep callback state alive
until shutdown completes, report SLIRP startup failures, and reset or
reuse BOOTP leases across backend restarts.
Stefan Reinauer [Thu, 4 Jun 2026 02:07:22 +0000 (19:07 -0700)]
sndboard: keep addrbank tables file-local
The sound-board addrbank tables are static, but earlier forward
declarations used external linkage. That breaks C++ builds when the
Unix port enables the shared sound-board sources.
Declare the memory callbacks first and move the static bank tables
before the accessors that reference them. This keeps the symbols
file-local without conflicting declarations.
Stefan Reinauer [Sat, 30 May 2026 06:45:21 +0000 (23:45 -0700)]
ethernet: defer NIC receive injection to hsync
A2065/Ariadne injected packets directly from the host network
callback. With SLIRP or pcap this callback can run on a helper
thread, so receive DMA and interrupt updates could race PPC I/O
callbacks.
Queue received frames and drain them from the device hsync
handler, where the rest of the emulated card state is updated. Also
stop the NE2000 host callback from draining its queue, leaving that
work to the existing hsync path.
Stefan Reinauer [Thu, 28 May 2026 15:08:36 +0000 (08:08 -0700)]
slirp: avoid Unix thread sentinel in shared code
Track whether the builtin slirp helper thread was started. Do not
write BAD_THREAD into uae_thread_id from common code because Windows
uses HANDLE thread IDs and does not define that Unix sentinel.
Stefan Reinauer [Thu, 28 May 2026 00:38:28 +0000 (17:38 -0700)]
slirp: check TCP connect completion with SO_ERROR
The nonblocking connect path treated a writable socket as connected
and then used a zero-length send as the failure probe. That is not a
reliable completion check and can mis-handle failed or pending guest
TCP connects.
Use getsockopt(SO_ERROR) when select reports the socket writable. Keep
pending connects pending, and only clear SS_ISFCONNECTING after the
host socket has no pending error.
Stefan Reinauer [Thu, 28 May 2026 00:21:35 +0000 (17:21 -0700)]
slirp: forward ICMP through datagram sockets
Enable datagram ICMP forwarding, keep the host sockets nonblocking,
and strip host IP headers before delivering ICMP replies back to the
emulated Ethernet device.
Stefan Reinauer [Sun, 31 May 2026 04:25:47 +0000 (21:25 -0700)]
pcem: hide unused CPU catalog declarations
The embedded bridgeboard glue provides its own file-local CPU tables
and model_init() helper. The public PCem header declarations are not
used by the UAE integration, and some of the names collide with those
local definitions when compiled as C++.
Disable the unused declarations in the imported headers instead of
removing individual entries. This avoids mixed-linkage conflicts while
leaving the original declarations visible in the source for reference.
The PCI bridge code maps the config, I/O, memory, and bridge banks
before their definitions later in pci.cpp. Clang requires declarations
before those uses.
Keep the declarations and definitions in an anonymous namespace. The
objects remain private to pci.cpp even though the forward declarations
use extern syntax.
Stefan Reinauer [Sun, 31 May 2026 04:15:01 +0000 (21:15 -0700)]
pcem: pass MIDI parser a byte buffer
Midi_Parse() takes a BYTE pointer. Store the uint8_t input in a local
BYTE before passing it on so the call does not depend on uint8_t and
BYTE being the same typedef on every host.
Stefan Reinauer [Mon, 1 Jun 2026 21:17:14 +0000 (14:17 -0700)]
pcem: select Voodoo codegen by host capability
The imported Voodoo code only enabled its x86 code generators through
Windows-oriented preprocessor checks. That left Unix x86 builds with
the recompiler disabled even when the matching generator was compiled.
Derive explicit PCEM_VOODOO_CODEGEN macros from the host CPU and use
those macros for init, close, rendering, and the default recompiler
configuration.
Stefan Reinauer [Mon, 1 Jun 2026 21:15:51 +0000 (14:15 -0700)]
pcem: avoid dynamic offsetof in Voodoo codegen
The Voodoo x86 code generators compute offsets into array members
with offsetof(type, field[index]). Some compilers reject that
expression form.
Add helpers that derive the offset from field[0] plus an element
stride. That preserves the generated offsets without relying on a
runtime-indexed offsetof expression. This matches the same cleanup
merged upstream in 86Box.
Stefan Reinauer [Sun, 31 May 2026 02:58:12 +0000 (19:58 -0700)]
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.
Stefan Reinauer [Mon, 1 Jun 2026 20:39:20 +0000 (13:39 -0700)]
pcem: fit graphics sources into C++ builds
WinUAE builds the imported PCem graphics sources as C++ files.
The MGA source includes C atomics directly, and the BT482 RAMDAC
source uses C allocation declarations through C++ headers.
Use C++ atomics when compiling MGA as C++, and include the C++
cstdlib wrapper where the BT482 RAMDAC needs those declarations.
Stefan Reinauer [Mon, 1 Jun 2026 20:38:59 +0000 (13:38 -0700)]
pcem: make MGA high-bit masks unsigned
MGA defines several bit-31 masks from a signed int literal.
Shifting a signed 1 into the sign bit is undefined behavior in C.
Use UINT32_C(1) so the masks are built in unsigned arithmetic.
This matches the same cleanup merged upstream in 86Box, with the
extra OPTION_POWERPC mask that exists in this imported copy.
Stefan Reinauer [Tue, 26 May 2026 07:19:35 +0000 (00:19 -0700)]
pcem: fix helper thread handles
The PCem compatibility layer returned a raw uae_thread_id as a
thread_t pointer and then waited on that value through the semaphore
API. That was pointer-shaped on some targets, but it was not a valid
wrapper around UAE's thread API.
Store the uae_thread_id in an explicit PCem handle object, join it
with uae_wait_thread(), and free the wrapper after wait or close. Reset
and signal PCem events through the existing semaphore object instead of
passing the address of a local pointer copy.