Stefan Reinauer [Wed, 17 Jun 2026 14:30:16 +0000 (07:30 -0700)]
cfgfile: handle missing command line option values
parse_cmdline_option() keeps unknown command line options in the
all_lines list. A trailing option such as -G reaches this path without
a value, which passed NULL to my_strdup() and crashed before the GUI
could start.
Store an empty string when no value is present so argument-less
options can still be represented in the saved option list.
Stefan Reinauer [Fri, 12 Jun 2026 15:23:15 +0000 (08:23 -0700)]
cmake: probe for a system 7-Zip/LZMA SDK before fetching
Requested by the openSUSE packager: distributions ship the SDK sources
(lzma-sdk-devel), so the vendored lzma1604.7z download is unnecessary
there. Probe WINUAE_LZMA_SDK_SYSTEM_PATHS (common /usr locations,
overridable) for an installed SDK source tree before falling back to
WINUAE_LZMA_SDK_DIR and the fetch. Candidates must provide the C
sources, not just headers, since the SDK is compiled into the build.
Stefan Reinauer [Fri, 12 Jun 2026 15:11:06 +0000 (08:11 -0700)]
od-unix: ship starter filter presets
The Filter page's preset list was empty until the user saved their own
(GitHub issue #4). Add a set of bundled presets built from the portable
filter controls the Unix GLSL pipeline implements (Sharp Pixels, Soft
Bilinear, CRT Scanlines, Warm TV), installed under the shared data
directory on Linux and into the app bundle resources on macOS.
The preset combo lists user presets and bundled presets together; the
user directory wins on name collisions, saving always writes to the
user directory, and loading falls back to the bundled file when no user
preset of that name exists.
Stefan Reinauer [Fri, 12 Jun 2026 07:21:03 +0000 (00:21 -0700)]
od-unix: fix config values lost in the Qt launcher round trip
Loading a configuration file could silently change it (GitHub issue #1,
"CPU and RAM are often not the ones I set"):
- The chipset_compatible handler synced the quickstart model combo
without blocking its signals, so loading any config with a
chipset_compatible value re-applied the whole quickstart model preset
over the explicit settings (FPU, compatibility flags, floppy count).
- FpuInternal was -1, which QButtonGroup treats as auto-assign and
checkedId() returns for "no selection": the CPU-internal FPU button
could never be selected programmatically, so fpu_model vanished from
every 68040/68060 configuration on save, start, and each F12 visit.
- nr_floppies had no load handler, so drive-enable states never
followed the loaded config.
Configs without a quickstart line also no longer gain a synthesized
quickstart key: quickstart mode now turns off when loading a full
configuration and is re-enabled by an explicit quickstart setting.
Verified by a new roundtrip harness: WINUAE_QT_CONFIG_ROUNDTRIP_OUT
makes the launcher load the given config, export the merged config, and
exit; unix-smoke-config-roundtrip.sh (in winuae_unix_smoke_basic)
compares CPU/FPU/MMU/memory/floppy keys across three machine profiles.
Stefan Reinauer [Fri, 12 Jun 2026 07:03:14 +0000 (00:03 -0700)]
od-unix: persist host settings in winuae.ini
The Unix port had no equivalent of the Windows registry/winuae.ini
store: the Qt Paths page reverted to hardcoded defaults on every start
(GitHub issue #2).
Port the ini-file mode of the od-win32 registry abstraction into
od-unix/registry.cpp on top of the shared ini.cpp, with the same
registry.h API. The store resolves to winuae.ini next to the executable
when present (portable mode, matching Windows), otherwise
$XDG_CONFIG_HOME/winuae/winuae.ini on Linux and
~/Library/Application Support/WinUAE/winuae.ini on macOS; the
WINUAE_INI environment variable overrides the location.
The Qt launcher loads the Paths page directories and flags from the
store and saves them when the dialog closes, through new host-setting
hooks on the provider struct. The core path fetchers consult the stored
values between per-config unix.*_path overrides and the built-in
defaults, so the configured directories also apply outside the GUI.
Settings flush on dialog close and at gui_exit.
Covered by winuae_unix_registry_test (value types, subtrees,
enumeration, deletion, and persistence across reopen).
Stefan Reinauer [Fri, 12 Jun 2026 04:58:38 +0000 (21:58 -0700)]
od-unix: match Windows GUI button semantics in runtime (F12) UI
The runtime GUI's bottom button row behaved like the pre-start launcher:
Quit and Cancel both just closed the dialog and resumed emulation, Reset
reverted the UI to A1200 quickstart defaults, and Restart was hidden.
Mirror the Windows GUI (IDC_RESETAMIGA/IDC_QUITEMU/IDC_RESTARTEMU):
- Quit requests uae_quit() and exits the emulator.
- Reset applies the edited configuration and hard-resets the Amiga
(uae_reset(1,1)), then resumes.
- Restart is shown in runtime mode and returns to the launcher through
uae_restart().
- Start is relabeled OK while emulation is running; Cancel and closing
the window still resume without applying changes.
The launcher result carries the new quit/restart states and a hard-reset
flag through the bridge; pre-start behavior is unchanged.
Also write floppy paths and the first CD slot into the merged config
even when empty, so ejecting media in the runtime GUI reaches the
core's disk-change detection instead of silently keeping the old image.
Stefan Reinauer [Fri, 12 Jun 2026 04:38:36 +0000 (21:38 -0700)]
cmake: name the Unix binary winuae
The installed Linux command, the .desktop entries, and the WinUAE.app
bundle all use the name winuae while the build tree produced
winuae_unix. Set OUTPUT_NAME on the winuae_unix target so the binary is
winuae everywhere, drop the now-redundant install RENAME, and update
the smoke script defaults, bundling scripts, and README accordingly.
macos-bundle.sh keeps a fallback for build directories from before the
rename. The CMake target names are unchanged.
Stefan Reinauer [Fri, 12 Jun 2026 04:31:19 +0000 (21:31 -0700)]
od-unix: seed Qt launcher from default.uae at startup
The shared core loads <configurationpath>/default.uae into the prefs at
startup (main.cpp real_main), but the Qt launcher built its state from
scratch, so the default configuration had no visible effect unless the
GUI was disabled. Pass the file as the launcher's initial config path
when it exists, matching the Windows "save as default.uae" behavior.
Configs given on the command line keep precedence: the launcher's own
argument parsing decides, exposed through the bridge so gui_init does
not duplicate it. The bridge no longer infers runtime mode from "an
initial config path is present"; gui_display passes it explicitly.
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.