Skip to content

feat(dos): add DOSBox Pure to NextUI extras - #911

Open
pvaibhav wants to merge 4 commits into
LoveRetro:mainfrom
pvaibhav:upstream/dosbox-pure-integration
Open

pvaibhav wants to merge 4 commits into
LoveRetro:mainfrom
pvaibhav:upstream/dosbox-pure-integration

Conversation

@pvaibhav

@pvaibhav pvaibhav commented Nov 19, 2026 •

Copy link
Copy Markdown

This PR adds DOSBox Pure 1.0-preview8 to NextUI -extras so players can run MS-DOS games out of the box with working save states and live settings changes. It is bundled here rather than as a standalone Pak Store pak because DOSBox Pure relies on minarch fixes for live option/timing updates and a small core patch for save-state sizing—and keeping it in -extras matches how NextUI builds and ships other libretro cores across platforms.

Changes

  • DOSBox Pure in -extras (makefile, skeleton/EXTRAS/Emus/{h700,tg5040,tg5050}/DOS.pak/): Adds DOSBox Pure 1.0-preview8 for H700, TG5040, and TG5050 with 4:3 scaling, 60 FPS conversion handled by the core, and L3 mapped to the DOSBox menu.
  • Reliable save states (workspace/all/cores/patches/dosbox_pure/001-stabilize-save-state-size.patch): DOSBox Pure save states can grow beyond their initial reported size, causing minarch to truncate reads and fail to resume. Reporting the maximum state size lets save states load reliably while staying compatible with stock DOSBox Pure.
  • Live FPS/timing and option updates in minarch (ma_menu.c, ma_environment.c, ma_audio.c, ma_options.c, ma_config.c): Changing FPS or core options in the pause menu previously lagged behind by a menu cycle, left audio on the old rate, or reset user selections when the core refreshed its option list. Applying option changes on resume, queueing a single audio reset on rate changes, and preserving matching selections across option refreshes makes live settings work cleanly for DOSBox Pure and any other core that updates options or timing at runtime.

Blast Radius

  • Affected areas: -extras packaging (DOS.pak on h700, tg5040, tg5050) and minarch's core option/timing refresh path (all platforms).
  • Risk: Low. Geometry-only updates leave audio untouched, and the minarch changes are general libretro fixes that only trigger when a core updates options or AV timing.

Testing and Verification

  • Played One Must Fall 2097, Prince of Persia, and Grand Theft Auto on hardware, verifying save states in both directions between stock and patched DOSBox Pure.
  • Verified live 60 FPS ↔ native VGA rate switches and option refreshes in Docker (every switch applied on the first resumed frame with one audio reset; geometry-only updates left audio alone).
  • Cross-built minarch and -extras for h700, tg5040, and tg5050.
  • Caught and fixed an edge case where refreshing options on cores with no options could try to free() the static empty option list.

Notify the core of changed options after the menu releases its option
list. DOSBox Pure reads the new settings in the option display callback.

Queue an audio reset when the core reports a new frame rate or sample
rate. Consume pending resets in the main loop so timing and audio sink
changes can share one device reopen.

Clear freed config pointers because the option display callback can
register a new list and cause minarch to read options again.
@pvaibhav
pvaibhav force-pushed the upstream/dosbox-pure-integration branch from e74e12a to c55c1d1 Compare November 21, 2026 17:43

This branch has not been deployed

No deployments
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.

1 participant