Skip to content

Branch test 78.1 - #80

Merged
MaddTheSane merged 7 commits into
MaddTheSane:maddsV2from
dtseto:branch-test-78.1
Aug 30, 2026
Merged

Branch test 78.1#80
MaddTheSane merged 7 commits into
MaddTheSane:maddsV2from
dtseto:branch-test-78.1

Conversation

@dtseto

@dtseto dtseto commented Aug 29, 2026

Copy link
Copy Markdown

Overview
This pull request updates Boxer to be compatible with DOSBox Staging 78.1. The changes primarily involve updating the DOSBox Staging submodule, incorporating new source files required by the newer version, adjusting build settings, and updating the emulator integration code.

Key Changes

Updated DOSBox Staging Submodule — The core emulator has been upgraded to version 78.1, which brings numerous upstream improvements and bug fixes.

Added New Source Files — Several new C++ files have been added to support the updated DOSBox Staging codebase:

ide.cpp

program_serial.cpp and program_serial.h

program_placeholder.cpp and program_placeholder.h

ethernet.cpp

fs_std_impl.cpp

whereami.c and whereami.h

GHC filesystem library headers (filesystem.hpp, fs_*.hpp)

Updated Xcode Project Settings — The project configuration has been adjusted to accommodate the new DOSBox Staging version:

C++ language standard updated to gnu++17

Library search paths now include DOSBox-Staging/src/libs/loguru and DOSBox-Staging/src/libs/ghc

New library groups (ghc, whereami) added to the project

Marketing version updated to 2.0.2-alpha

Bundle identifier and code signing identity changed to the contributor's own for testing purposes

Emulator Integration Updates — Key parts of the Boxer–DOSBox bridge have been modified for compatibility:

MIDI mixer channel handling (_renderMIDIOutput, _MIDIMixerChannel, _addMIDIMixerChannelWithSampleRate, _removeMIDIMixerChannel)

Joystick support enumeration

DOSBox startup and exception handling (_startDOSBox)

Improved Error Reporting — Enhanced crash dump and error report generation:

Added fallback crash dump writing in BXApplication.m

Expanded error reporting methods in BXBaseAppController

Compatibility
These changes ensure that Boxer builds and runs successfully with DOSBox Staging 78.1. The two branches can be automatically merged.

Testing
Please verify that Boxer launches, runs DOS games, and handles errors as expected with the updated DOSBox Staging core.

dtseto and others added 7 commits August 16, 2026 13:34
Update DOSBox-Staging core toward v0.78.1 for Boxer

Merge official DOSBox-Staging v0.78.1 into Boxer’s boxer-compat core while
preserving Boxer’s Cocoa/Metal frontend and host integration hooks.

Core merge:
- Merged upstream DOSBox-Staging v0.78.1 into the existing MaddTheSane
  boxer-compat submodule instead of replacing the source tree wholesale.
- Resolved conflicts in integration-sensitive DOSBox files:
  - include/dosbox.h
  - src/dos/dos.cpp
  - src/dos/dos_devices.cpp
  - src/dos/dos_keyboard_layout.cpp
  - src/hardware/joystick.cpp
  - src/hardware/keyboard.cpp
  - src/hardware/mixer.cpp
  - src/hardware/ne2000.cpp
  - src/libs/decoders/stb_vorbis.h
- Kept upstream emulator behavior and API changes while reapplying Boxer-specific
  hooks where needed.

Preserved Boxer integrations:
- Kept Boxer’s BXCoalface/BXCoalfaceAudio hooks available to DOSBox core code.
- Preserved Boxer joystick/gameport integration:
  - gameport timing can still be toggled by Boxer at runtime
  - Boxer is still notified when DOS software probes joystick port 0x201
  - upstream 0.78.1 joystick visibility model is retained
- Preserved Boxer keyboard layout integration:
  - Boxer can still provide the preferred host keyboard layout for DOSBox auto
    keyboard layout selection
  - upstream code-page parsing safety checks are retained
- Preserved Boxer mixer integration:
  - DOSBox mixer volume calculations use Boxer’s master volume callbacks
  - Boxer’s volume update hook now iterates upstream’s map/shared_ptr mixer
    channel storage
  - added a name-based MIXER_DelChannel helper for Boxer’s MIDI channel cleanup
- Preserved Boxer MIDI/MT-32 routing:
  - updated BXMIDIMT32_AddConfigSection to match upstream’s config_ptr_t API
  - did not modify Boxer-MT32Emu.xcodeproj
- Preserved Boxer DOS filesystem integration:
  - updated FAT image mounting for the new fatDrive read-only flag
  - retained writable behavior for Boxer-created floppy image drives

Boxer app integration fixes:
- Updated BXEmulator to work with upstream’s std::unique_ptr-owned global
  Config object.
- Updated joystick support detection for upstream’s renamed/split joystick enum:
  JOY_DISABLED, JOY_NONE_FOUND, and JOY_ONLY_FOR_MAPPING.
- Updated BXEmulator+BXAudio for upstream mixer_channel_t shared_ptr ownership.
- Updated BXEmulator+BXDOSFileSystem for the new fatDrive constructor.
- Updated BXMIDIConfig callback signatures for upstream config ownership.

Xcode project updates:
- Added new DOSBox-Staging 0.78.1 source files to both Boxer source build phases:
  - DOSBox-Staging/src/hardware/ide.cpp
  - DOSBox-Staging/src/dos/program_serial.cpp
  - DOSBox-Staging/src/dos/program_placeholder.cpp
  - DOSBox-Staging/src/libs/ghc/fs_std_impl.cpp
  - DOSBox-Staging/src/misc/ethernet.cpp
  - DOSBox-Staging/src/libs/whereami/whereami.c
- Added upstream GHC filesystem and whereami groups/files to the project.
- Added upstream license files for the new vendored libraries to resources.

Compatibility/build fixes:
- Adjusted new upstream includes for Boxer’s Xcode/header-map layout.
- Added GHC filesystem forwarding headers under DOSBox-Staging/include/ghc.
- Replaced a few C++17-only conveniences with forms compatible with the current
  Boxer build setup where needed:
  - std::is_same_v / std::is_unsigned_v -> ::value
  - std::pair CTAD -> std::make_pair
  - lock_guard/unique_lock CTAD -> explicit std::mutex template arguments
  - atomic copy-style initialization -> brace initialization
  - structured bindings in mixer loops -> explicit map iteration

Validation:
- Built Boxer for arm64 after adding the missing upstream source files and
  header paths.
- Build now compiles with the updated DOSBox-Staging v0.78.1 core integrated
  into Boxer’s existing macOS frontend.

Notes:
- Vendor/DDHidLib, Vendor/MT32Emu, and Vendor/OpenEmuShaders already had
  unrelated modified submodule state and were not part of this DOSBox merge.
- Boxer-MT32Emu.xcodeproj was intentionally left unchanged.
partial fixes to accessability spam
The 0.78.1 DOSBox-Staging merge accidentally left both the old Boxer
early-install block and the new upstream is_visible block in the
JOYSTICK constructor, causing ReadHandler.Install(0x201) to fire twice.
The second call hits the already-installed guard and E_Exit()s with:
  io_read_f already installed port 513

Update submodule to remove the now-redundant early install block.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
ObjC exceptions don't trigger C++ stack unwinding, so _startDOSBox's
cleanup block (SDL_Quit, control.reset, etc.) was skipped whenever a
boxer_emulatorException or char* error was re-raised as an ObjC
exception. This left the old Config and its IO state alive, which could
interfere with the next session's initialization.

Run the cleanup explicitly inside each error catch block before raising.

Also null the JOYSTICK test pointer after delete in JOYSTICK_Destroy,
and guard JOYSTICK_Init against double-init, as complementary hardening.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
logging fixes and thread check Improve emulator crash reporting and gamebox launch compatibility

Save unrecoverable emulator reports locally instead of opening the legacy
boxerapp.com report URL, including session details, mounted drives, running
DOS processes, exception metadata, and stack traces. Intercept old report
URLs and convert them into local report files.

Run multithreaded emulator startup through BXSession so unrecoverable
emulator exceptions are caught on the background thread and reported back on
the main thread.

Add a legacy gamebox fallback for packages without a detected explicit C
drive, using the default launcher’s top-level folder or the single visible
top-level folder before falling back to the package root.

Update project signing/version settings for the alpha build.
@MaddTheSane
MaddTheSane merged commit 995fbb6 into MaddTheSane:maddsV2 Aug 30, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants