Changelog:
Update SDL wrap to 2.30.6
On modern Linux it is preferred to use the fully qualified application ID for naming the desktop, icon, and metainfo files. Add a meson option to capture this variable and set it to `org.dosbox-staging.DOSBoxStaging` which better matches that the homepage is dosbox-staging.org.
Then ensure that we’re setting the X11 `resourceclass` and the Wayland app_id to this value. Those values need to match the name of the .desktop file in order for compositors/window managers to correctly associate windows to the appropriate .desktop file (see [here](zed-industries/zed#12707 (comment)) for an explanation). Now that we’re ensuring that both X11 and Wayland should have correct window associations we can drop `StartupWMClass` from the desktop file as it is now unnecessary.
Also, since SDL3 changed how that is done some #if statements were added so that that’s ready whenever dosbox-staging is ported to SDL3.
Co-authored-by: Reilly Brogan
Keep CRLF in Windows installer related files
Reinstate creating the Windows installer package in CI
Deploy preview website from the 0.82.x branch
Improve the GUS config setting descriptions
Fix IMGMOUNT command error message
Drop legacy rgb*, scan*, and tv* DOSBox scaler recreations
Don’t use sRGB framebuffers for the advinterp and advmame upscalers
Add xbr-lv2-noblend shaderCo-authored-by: Tyrell Sassen
Co-authored-by: John Novak
Signed-off-by: John Novak
Add xbr-lv3 shaderCo-authored-by: Tyrell Sassen
Co-authored-by: John Novak
Signed-off-by: John Novak
Add xbr-lv2-3d shaderCo-authored-by: Tyrell Sassen
Co-authored-by: John Novak
Signed-off-by: John Novak
Clean up x87 64-bit memcpy trick
Add missing headers to decoder sourcesgcc 13.x on retropie flagged missing headers for these
sources when building a static executable.
They make calls to alloca and string functions, but are
missing the headers for them.
Debloat diagnostic features from glib wrap buildsWhen building dependencies from source, glib might add
useless features like dtrace, a symbolic function API,
SELinux checks, SystemTap, and system-wide profiling.
We aren’t making use glib and it looks like FluidSynth
and Slirp use it minimally. So let’s turn off as
much bloat as possible.
This also tells the pcre2 wrap to not build a custom
prce2-enabled ‘grep’ executable.
Handle SDL2 and SDL2-Net like other dependenciesThis removes the macOS-specific gate around these dependencies,
so now anyone on Linux or MSYS2 can build and link with them.
(if they don’t have system-provided SDL2 or SDL2-Net libs).
This also adds the same static handling as other dependencies.
If the user wants to link statically but their OS only provides
dynamic libs, then these will be built from sources (just like
the other dependencies).
This sets SDL2’s default options to only build the SDL2 subsystems
that are used: audio, video, joystick, events, timers, and
thread features. The rest are disabled.
Here’s a startup & exit time comparison between a static debloated
SDL build versus using the Debian-provided bloated SDL. Both are
full-featured release builds.
/usr/bin/time -p ./build-static-debloat/dosbox -c exit
real 0.42
user 0.18
sys 0.07
real 0.41
user 0.16
sys 0.09
real 0.42
user 0.16
sys 0.08
Compared to using the bloated Debian SDL libs:
/usr/bin/time -p ./build-debian-libs/dosbox -c exit
real 1.86
user 0.40
sys 0.66
real 1.87
user 0.41
sys 0.66
real 1.71
user 0.34
sys 0.81
Add SDL build dependencies to Ubuntu dev packages
Rename mixer Stereo and Reverse map constantsThese were causing shadowed variable warnings when local variables re-used these names.
Renamed from Stereo to StereoMap
Renamed from Reverse to ReverseMap
Change SDL audio format from 16-bit integer to 32-bit floatCurrently we are using floats everywhere in the mixer.
We are then clamping to 16-bit integers before the audio to SDL.
Floating-point audio should have slightly better quality.
OS-level mixers are likely to convert to float anyway.
Note that the floats must be normalized from 1.0 to -1.0 as a final step before sending to SDL.
Use std::atmoic for PIC and CPU timing global variablesAddresses a Clang thread sanitizer warning
These are written by the main thread and read by the mixer thread
Use std::vector rather than fixed size array in PC Speaker DiscreteThis small refactor is needed for threaded mixer which requires a std::vector for RWQUeue’s BulkEnqueue method.
Placing this commit beforehand on the off chance this causes an unforseen regression.
Previous code was using a nested loop over a fixed size buffer.
Removed the outer loop based on fixed array size.
Set type of requested_frames of all mixer callbacks to intThe function pointer expects an int so using anything else is either misleading and an implicit cast at best or possibly undefined behavior at worst.
In edge cases, the callbacks using uint16_t can also overflow so this change prevents that bug as well.
De-uint MIDI MT-32 and FluidsynthThreaded mixer can overflow the uint16_t in an edge case in fast-forward mode
Move mixer to seperate thread
Move temporary convert_buffer to a member variable to reduce heap allocations
Remove tempory std::vector from AddSamples functionThis was not needed. Instead, we can copy directly to audio_frames buffer, saving heap allocations.
Move more temporary mixer buffers to global scope to reduce heap allocations
Prevent allocating a useless vector in SoundBlaster callback if the queue is stopped
An oversight on my part, a SoundBlaster function was allocating a std::vector full of zeros
to playback silence even if the queue is stopped and it would be immediately discarded.
Added an early exit to prevent this heap allocation.
Avoid allocating a temporary buffer when mixer is mutedRe-use mixer.output_buffer after clearing and resizing to fill with silence
Lock the mixer thread on pause rather than mutingsdl.mute_when_inactive is now not set when sdl.pause_when_inactive is set
Pause takes priority because when we’re paused, we’re also not playing sound.
Muting still runs the mixer thread but outputs silence.
This is not ideal for some sound devices such as GUS that loop samples.
We want the audio state on resume to be the same as it was before we paused.
This also prevents CPU usage from rendering audio that we’re not going to play.
Set mixer fast-forward flag in hotkey handler rather infering based on timing
Allow the mixer to block while in fast-forward modePreviosuly, I had some special case code to not block the mixer
for devices running on the main thread while in fast-foward mode.
The reason for this is the mixer could get “stuck” in fast-forward mode
due to its reliance on timings.
This is no longer the case. Now it always gets put back in “normal” mode once the hotkey is released.
Removing this code to simplify things and also potentially prevent under-runs.
Remove DOSBox copyright attribution from PS/1 audio codeApparently this code did not come from orginal DOSBox.
It is now only marked with “Copyright (C) 2021-2024 The DOSBox Staging Team”
Reformat & simplify chorus and reverb preset definitions
Scale back the tiny reverb preset’s strength by ~25%
Update Polish (pl) translation
DYN_LOG: Fix formatting type mismatchThis is the complaint from the compiler:
In file included from ../../src/cpu/core_dyn_x86.cpp:257:
../../src/cpu/core_dyn_x86/decoder.h: In function ‘CacheBlock* CreateCacheBlock(CodePageHandler*, PhysPt, Bitu)’:
../../src/cpu/core_dyn_x86/decoder.h:2427:69: warning: format ‘%X’ expects argument of type ‘unsigned int’, but argument 2 has type ‘Bitu’ {aka ‘long unsigned int’} [-Wformat=]
2427 | LOG_MSG(“Unhandled dual opcode 0F%02X”,dual_code);
| ~~~^ ~~~~~~~~~
| | |
| | Bitu {aka long unsigned int}
| unsigned int
| %02lX
Fix shell redirection for appending to the end of a fileRegression from d4509f9
Previous code had an assumption that the output file would be at file handle 1
That assumption was broken in my refactor
We obviously want to seek to the end of the file we just opened
Update Dutch (nl) translation
Update Italian (it) translation
Trim whitespace
Fix small mistakes here and there
Update FreeDOS xcopy.exe to version 1.7https://github.com/FDOS/xcopy/releases/tag/v1.7
Co-authored-by: PerditionC
Update debug.com to version 2.50https://github.com/Baron-von-Riedesel/DOS-debug/releases/tag/v2.50
Co-authored-by: Andreas Grech
Update licensing with 3rd party binaries information
Add release notes section to the PR template
Address feedback from k4ppa971
Further refinements to the Italian (it) translation
Update German (de) translation
Make the titlebar cycles display translatable again
Update Polish (pl) translation
Fix mouse support in Descent II with a Voodoo patch
Revert “Fix mouse support in Descent II with a Voodoo patch”This reverts commit df7df95.
Remove special case for joystick axis 2 and 5 and add detection for gamepad trigger buttons
These trigger buttons are actually analogue triggers with a resting position of around -32000
Previous code had a special case for these hard-coded to axis 2 and 5
Some controllers, such as the PS5 DualSense have these axes mapped to the analogue stick
Instead, ask SDL for the gamepad mapping on init
Include DEBUG.COM license in the packages
Silence Voodoo’s debug logging with a preprocessor and wrapperExtreme Tennis makes tens of thousands of calls per second to
a local blending call which was swamping the log output with
the debug message.
This commit wraps these log calls inside a compile-time wrapper.
No changes were made to the actual logging; those that are
commented out are still replaced, but left commented out.
Fix ZMBV CompareBlock function returning a negative value for 24/32bpp types
Regression from 6892f70
Above commit changed a variable from int to auto
This resulted in a logical right shift instead of the expected arithmatic right shift
This bug caused the motion vector to always be (0, 0) resulting in more inefficient compression
Fix SoundBlaster DMA stuttering in The RocketeerRegression from d75e105
The Rocketeer runs the SoundBlaster an odd sample rate of 13,888hz
This revealed a bug where we would request too many frames inside the PIC callback
It is possible for DMA to output more frames than needed for the current tick
When this happens, we need to request less frames on the next tick
DMA outputs inside the main emulator loop, not just in the PIC callback
The fix is to remember how much we overflowed in the frames_added_this_tick counter
and not zero it out every tick
Fix thread sanitizer warnings in threaded GUS codePreviously, the main thread would aquire a mutex lock inside the RenderUpToNow() function
Move this lock up one level of the stack to WriteToPort() where RenderUpToNow() gets called
This function sets some additional state variables after it has rendered
Additionally, add a lock to ReadFromPort() to be safe
I did not see any thread sanitizer warnings from this but it modifies the irq_status variable
Add mutex lock to GUS CheckTimer() functionThis function gets called from a PIC event on the main thread
and has a data race with the mixer thread
Add mutex lock to GUS PrintStats() function
Remove PIC_IRQCheck if statement from PIC_RunQueue()This is a redunant check that is already made inside PIC_runIRQs()
This variable should be guarded by a mutex, which is done in the next commit
Add a mutex to PIC IRQ functionsGUS audio calls PIC_ActivateIRQ() and PIC_DeActivateIRQ() inside the mixer thread
These functions set some state variables that get used by the main thread
The main thread calls PIC_runIRQs() from inside PIC_RunQueue()
Make sure the main thread is not running IRQs while the mixer thread is activating them
Add mutex locks to PIC read/write handlersThese functions get called from the main thread on port reads and writes
This causes thread sanitizer warnings with GUS audio
Add mutex lock to GUS PerformDmaTransfer
Fix data race on mixer volume change
Refactor CLI delimiter scan loop into self-documenting lamda
Clang-format DOS_Shell’s DoCommand functionThis only makes whitespace changes.
Add the double-quote as a DOS shell CLI delimiterReal MS-DOS treat the first double quote as a delimiter
even without a preceeding space. For example, here’s
actual MS-DOS COMMAND.COM behavior:
C:\> echo”
C:\> echo””
”
C:\> echo “hi”
“hi”
C:\> if”%1″==”1″ goto adlib
(will compare %1 against 1 and goto to adlib label if true)
This change lets DOSBox Staging match this behaviour.
Provide application name to SDLAt least with PipeWire audio driver and KDE 6.2 this improves the volume applet display
Also useful for ‘pw-top’ and possibly other PipeWire command line tools
Prevent JEMM memory manager from detecting VMware
Add a helper function to the mapper that presses or releases a buttonThis will help when refactoring the Typer class.
Replace the Mapper’s Typer class with static PIC timer functions- Eliminates thread sanitizer warnings when using AUTOTYPE
– Removes unnecessary threading
– Avoids the need for mutex locks around the mapper’s CEvent calls
Fix CI to create Debian package on main push
Follow-up fix for Debian package on main push
Use std::atmoic for CaptureState enum
Enable SDL atomic subsystem in Meson wrapFixes a thread sanitizer warning and known data race (by SDL code comment) inside SDL Timer
This is used in DOSBox Staging for animating the title bar
The SDL atomic subsystem is enabled by default upstream
We had this disabled for some reason in our SDL Meson wrap
When this is disabled, SDL falls back to a sketchy mutex implementation for their custom spinlock
Fix ‘launchable’ in the Flathub metainfo.xml file
Implement dynamic thread allocation for Voodoo- Replaces ‘voodoo_multithreading’ with ‘voodoo_threads’ setting.
– Automatically uses up to 7 threads based on CPU cores when
enabled.
– Allows the users to set a custom number of threads.
– Refactors Voodoo structs to accept the thread count via
constructor. and in turn, dynamically sizes member vectors
based on thread count.
– This necessitated initializing the stats struct with default
values that allowed for more natural ::fill and assignment
instead of memset’ing.
Thanks to PoloniumRain (from the DOSBox Pure repo) for the
benchmarks!
Bump lukka/get-cmake from 3.30.1 to 3.30.3Bumps [lukka/get-cmake](https://github.com/lukka/get-cmake) from 3.30.1 to 3.30.3.
– [Release notes](https://github.com/lukka/get-cmake/releases)
– [Commits](lukka/[email protected]…v3.30.3)
—
updated-dependencies:
– dependency-name: lukka/get-cmake
dependency-type: direct:production
update-type: version-update:semver-patch
…
Signed-off-by: dependabot[bot]
Adjust range warning to be consistent with other othersProp_int::ValidateValue(…) uses the wording:
Value outside of the valid range %s-%s, using ‘%d’
However Prop_int::IsValidValue(…) was slightly off, and used this:
Value outside of the valid %s-%s range, using ‘%d’
Address additional feedback on Voodoo thread count PR
Fix byte calculation overflow using a pages-per-megabyte constantThe calculation from megabytes to pages results in a large peak
byte value causing an overflow of the intermediate int.
Also rename a couple other constants while we’re at it.
Update Polish (pl) translation
Revert “Set the maximum possible S3 revision/stepping level”This reverts commit b673d0b.
This commit bumped the chip’s stepping level to allow the Windows 3.1
S3 1.70.04 driver to use all available XGA calls, such as those needed
to draw the grid of squadron ship in the game ‘Alpha Squadron’,
reported in #2767.
Unfortunately this caused a regression under Windows 98 reported in #3945.
Improve INT10_LoadFont parameter names & cleanup
Further clean up of INT10_LoadFont()
Reformat
Fix INT10_ReloadFont() regression & refactorThis fixes a regression in the “Druid: Daemons of the Mind” installer
where the whitespaces of the custom VGA font appear corrupted
(introduced in be3d059).
`INT10_ReloadFont()` should trigger the loading of alternate characters
for 9-dot VGA fonts only, while `INT10_LoadFont()` should never do this.
This has regressed during a recent cleanup & refactoring job.
This change also implements this conditional alternate charset loading
mechanism more cleanly. Previously, the `font_block` argument was used
as a “side channel” for signalling this criteria via a hack (by using a
magic value of 0x80 which is not a valid value in the real BIOS call).
Fix deprecated config option log if translation is in effect
Use UTF-8 for console output on Windows
website: Update MkDocs Material to 9.5.36
website: Update Gatekeeper instructions for macOS Sequoia
website: Improve dev builds page
Fix assertion failure when voodoo_threads = 1The voodoo_state and tworker structs get created with number of additional worker threads
This will be 0 if the user sets voodoo_threads = 1
The main thread will be the only thread doing Voodoo work in that case
Everything works as expected in this case except the assertions are incorrect
Use atomic operations and busy wait for Voodoo threadsThis removes the Semaphore class
This change results in higher CPU usage but has a performance gain between 2x and 4x as measured in Descent II
Use physical CPU cores rather than logical for Voodoo auto-detectWith busy waiting, performance is lower when using logical hyperthreaded cores
Tested with taskset -c 0-7 to simulate a 4 core CPU with hyperthreading
4 threads performed best, 6 worse, and 8 worse still
This also gives more headroom for the mixer thread and any other processes that are running on the system
Let GUS use its documented IRQ and DMA addressesThe UltraSound Software Development Kit (SDK) lists the
possible IRQs and DMAs in section 2.14 under the Control
Register Select IO port (2XB):
IRQs:
0=RESERVED, DO NOT USE
1=IRQ2
2=IRQ5
3=IRQ3
4=IRQ7
5=IRQ11
6=IRQ12
7=IRQ15
DMAs:
0=NO DMA
1=DMA1
2=DMA3
3=DMA5
4=DMA6
5=DMA7
Previously some weren’t available, like IRQ 2 and 15. This
commit makes them all available as documented.
Upgrade GUS’s mix control and address select registers with bit_viewThe named bits helped clarify that one of the variables in the IRQ
handler was wrong. It was named “lines” but the bit it was checking
(0x8) is actually the mix control’s latch bit.
The address select register also made is easy to process and log the
secondary IRQ and DMA address in the 2xB IO write call. These
secondary addresses aren’t really used, but we might as well provide
that scaffolding if we want to handle them in the future.
Use the actual set of GUS base addresses
Auto switch shader when starting a Voodoo game
Fix Dutch (nl) translation
Fix CGA banner format string in Polish and French translations
Remove unneeded parameters from CGA startup banner print code
Fix percent signs in config option descriptions across several languages
Fix CONFIG help display for several languages
Get rid of TAB (0x09) characters from French (fr) translation
Convert ANSI escape sequences to DOSBox tags in French (fr) translation
Explicitly set VCPKG triplet for ARM64 platform to arm64-windowsMSBuild was automatically setting the triplet to ARM64-windows. A recent VCPKG change means that lower-case triplet names are now enforced.
Keep GUS running (and rendering) on IO port readsPort writes on the GUS are used to acknowledge the DMA
terminal count IRQ, which changes the state of the DMA
control register.
Adhere closer to the reset register’s documented behaviorThe documentation says the card is held in a reset state
so long as Bit 0 (“is_running”) is unset.
Once Bit 0 is set, the card is let loose and from there,
the DAC /might/ be running, and the IRQs /might/ be running
if either of those are also set.
So this commit does away with the concept of “Starting()” the card.
– Init values for various registers are moved into Reset()
– Rendering will skip if the card isn’t running
– Logging of the number of activate voices is moved into
the active voice setting call.
Ensure only one DMA PIC callback is runningDMA can be started from multiple register writes (the
DMA control register and the DMA sampling control
register), so if a program runs these back to back,
we could have “overlapping” (or two) DMA callbacks
registered with the PIC system.
This ensures we only have one DMA callback at any
give time.
Conditionally trigger the GUS IRQ at end of the DMA transferThe application tells the GUS if should (or shoulnd’t) generate
an IRQ at the end of the DMA transfer by setting (or clearing)
Bit 5 of the GUS’s DMA control register.
This commit adjusts the DMA logic to match: when the DMA transfer
has finished, we only trigger an IRQ if the GUS’s DMA control
regsiter’s bit 5 is set.
Previously, the code was inspecting bit 5 correctly, however it
was generating an IRQ for each mid-transfer chunk, instead of
only at the end of the transfer (terminal count).
Adjust the GUS reset register documentation commentThis makes it consistent with the others.
Upgrade the GUS DMA control register with bit_viewThis eliminates the previous hack that used a 16-bit register to store
the pending DMA terminal count IRQ status in bit 9, which the
documentation doesn’t describe (the docs say it’s an 8-bit register).
The previous code used bit twiddling to manage this divergence from the
docs – so bit 9 had to be shifted, masked, and/or inverted when the DMA
control register was written or read.
Bump lukka/get-cmake from 3.30.3 to 3.30.5Bumps [lukka/get-cmake](https://github.com/lukka/get-cmake) from 3.30.3 to 3.30.5.
– [Release notes](https://github.com/lukka/get-cmake/releases)
– [Commits](lukka/[email protected]…v3.30.5)
—
updated-dependencies:
– dependency-name: lukka/get-cmake
dependency-type: direct:production
update-type: version-update:semver-patch
…
Signed-off-by: dependabot[bot]
Refactoring
Close modem server socket before dialing
Remove obsolete Intel iGPU workaround
Fix up VS solution file
Discard incoming modem traffic from waiting clients
Adjust repackage Windows ZIP script to MSVC
Improve repackage Windows ZIP script
Bump version to 0.83.0
Fix file time handling on Windows
Make PIC_IRQCheck global variable atomicFixes a thread sanitizer warning in GUS audio
Move GUS class and constant definitions to header file
Move GUS rendering to main threadFixes a regression from d75e105
Some games like Blood heavily use DMA for digitized sound
This causes audio distortion likely due to a timing issue on memory reads
Moving GUS to the main thread resolves this issue
Will need to look for a better asynchronous solution in the future
Fix deadlock on exit in GUSVery subtle race condition here
I was taking a lock inside the destructor but that gets called after the unique_ptr gets replaced by nullptr
This results in the mixer seeing that there is no gus object and not stopping the GUS RWQueue
To fix, place a lock around the gus.reset() call
Cache the MT32 ROM info records
doco: Host release notes assets on GitHub
Allow workflow dispatch for platform buildsOtherwise, fixing problems this workflow is too difficult due to need
to wait for the daily run to see the results.
Use working distros for Platform Builds targetsAt some point, upstream run-on-arch-action deleted Fedora targets for
s390x and ppc64le, causing the to fail immediately. Change to another
still supported distro to fix this.
fix: working distro
Use fixed version of run-on-arch-actionIt seems that uraimo/run-on-arch-action does not guarantee stability,
and does not evne follow semver. Among other things, it removes (arch,
distro) pairs in minor and patch releases. Try to stabilize things by
using a fixed release.
Fix platform specific parameters for ppc64lePreviously, build script assumed that for little-endian PowerPC, Meson
would report `ppc64le` as `cpu_family`. Actually, Meson returns just
`ppc64` and endianness needs to be checked separately. Fix the Meson
build script to do that.
Without this change, compiling on `ppc64le` included 32-bit PowerPC
code from `risc_ppc.h`, causing many error about invalid casts from
pointer to 32-bit integer types.
Add missing libpng dependency to Platform buildsDebian-based targets did not have libpng, causing build to fail. Add
it.
Disable zlib-ng in Platform builds workflowAll ARM targets were failing due to compilation issues related to
zlib-ng Meson wrap. The proper course of action would be to investigate
these issues and either make the wrap work, or provide zlib-ng as a
system library. However, this workflow does not have an actual
maintainer or anybody to put in the effort right now. So apply a quick
workaround of just disabling zlib-ng in this workflow.
Move Platform builds workflow’s Ubuntu to 22.04Ubuntu 20.04 is too old. It has GCC 9 which does not support all the
C++20 features used by DOSBox Staging codebase.
Update build-windows.md
Update build-windows.md
Update build-windows.md
Print VCPKG error log on workflow failure
Update the vcpkg baseline prior to the python 3.12 updateThe latest version of vcpkg fails to build the project’s
older specified glib 2.78.4 version because python is
too new.
Use the specified VCPKG baseline in the windows workflow
Complete support for code page 59829
Fix typo in build-nix.md
Fix typo in README.md
Add Debian 12 docker apt list
Update Dockerfile for debian 12 changes* Use system meson
* Use meson env2mfile instead of debcrossgen
* Remove opusfile pkgconfig fixup hack
Update Linux workflow to use Debian 12 cross builds
Remove Debian 11 docker apt list
doco: Fix typo
doco: Upgrade MkDocs Material to 9.5.40
doco: Host images on GitHub
doco: Update Getting Started guide for 0.82.0
doco: Add Getting Started guide images
doco: Add links to our mirrored files in the Getting Started guide
doco: More Getting Started guide updates WIP
doco: Improve grammar & punctuation in the Getting Started guide
Update image links & remove “pixel-perfect” (wrong aspect ratio) image
website: Remove RetroPie & Raspberry Pi support from the front page
website: Improve front page
website: Updates for 0.82.0
website: Improve development builds page
website: Improve about page
Update Linux metainfo XML
Disable indenting preprocessor directives in clang-format
Reformat fluidsynth.cpp|h
Sort SoundFonts in ‘MIXER /LISTMIDI’ output & fix current SF2 matchingThis changes the following in the `MIXER /LISTMIDI` command’s output
only (the resolution of the SoundFont file hasn’t been changed at all):
– The list of available SoundFonts is now sorted.
– The current SoundFont is not moved to the top of the list anymore.
– The highlighting of the current SoundFont file is performed in a
case-insensitive manner on Windows and macOS (as they have
case-preserving filesystems, in contrast with the most common strictly
case-sensitive Linux filesystems).
Reformat fluidsynth.cpp|h
Reformat midi.cpp
Move find_in_case_insensitive() to string_utils.cpp
Reformat
Add flag to GetFilesInResource to allow not only regular filesDisabling the flag is handy to enumerate sub directories, for example.
Rename MIDI_SYSEX_SIZE to MaxMidiSysexSize
Clean up logging & comments in midi.cpp
Use ‘SysEx’ everywhere instead of ‘Sysex’
Refer to MT-32 “models” instead of “ROMs” in messages
Use the “best available model” concept for symbolic MT-32 model names
Remove unused functions in midi_mt32.cpp
Improve comments in midi_fluidsynth.cpp
Improve comments in midi_mt32.cpp
Fix MIDI message length assert
Fix MT-32 debug logging
Normalise casing of support.h functions & improve a few signatures
Improve MIDI_Init() API functionAlso some cleanup
Rename MidiHandler* to MidiDevice*
Rename ‘midi_handler.h’ to ‘midi_device.h’
Normalise ‘MidiDevice*’ class names
Rename MidiHandler.PlayMsg() to SendMidiMessage()
Rename MidiDevice.PlaySysEx() to SendSysExMessage()
Rename MidiDevice.GetDeviceType() to GetType()
Rename MidiDeviceType to MidiDevice::Type
Mass reformat all files in src/midi
Minor formatting & style improvements
Remove unused global MIDI device instances
Remove unimplemented global MIDI function declarations
Simplify & untangle MPU-401 & MIDI init
Rename MIDI_Available() to MIDI_IsAvailable()
Rename MIDI_ListAll() to MIDI_ListDevices()
Add const
Fix constant casings in midi.cpp
Make MidiDevice interface more abstract
Rename MidiDevice.ListAll() to ListDevices()
Move ListDevices() out of the MidiDevice interfaceIf the `ListDevices()` functions of the MIDI devices can be invoked
without an instance of that particular MIDI device existing, we can
simplify the whole MIDI device handling to follow simple RAII patterns.
There will be no need for all MIDI devices to be instantiated, even
though only one is active, just to be able to call `ListDevices()` on
them.
Incidentally, this will also allow us to introduce a second MPU-401
interface much more easier in the future if needed.
Make MidiDevice.Reset() abstract
Use RAII to (re-)init MIDI devices- Get rid of the two-stage (re-)initialisation of MIDI devices (the
extra separate `Open()` and `Close()` methods).
– Get rid of the MIDI handler list; now only a single `MidiDevice`
instance can exist if MIDI is active, and no `MidiDevice` instance if
MIDI is inactive.
– Use exceptions to signal object construction failures which is a
necessity for proper RAII.
Remove Reset() from MidiDevice to turn it into an interface
Normalise constants in fluidsynth.cpp
Allow changing the soundfont config setting on-the-fly
Allow changing the MT-32 model setting on-the-fly
Use consistent method ordering
Add comment about the MIDI constructors throwing exceptions
Remove support for the obsolete Open Sound System (OSS) MIDI on Linux
Cleanup
Cleanup
Add a file_locking config optionThis was originally implemented by commit 7d806a8
It was hard-coded to enabled and does not cause problems for the vast majority of DOS software
It did cause a regression for the Astral Blur demo so this config option is added to disable file locking if needed
Bump macOS runner to macOS-13
Add RISC-V 64 to platforms.ymlhttps://github.com/uraimo/run-on-arch-action?tab=readme-ov-file#supported-platforms
#4000 (comment)
Update platforms.yml to Debian 12To match #3950
Restore ManyMouse compilation in Windows builds
Prevent ManyMouse usage on Windows if raw mouse input is enabled
Fix DOS to UTF8 string conversion using WithControlCodes modeDue to simple bug all the special characters (like newline)
were being converted to a question mark, usually denoting
an unknown or unsupported character.
Initial clipboard sharing support
doco: Add illustration source files for the Getting Started guide
doco: Update README.md
Simplify mididevice and midiconfig settings
Cleanup
Remove support for volume param in the ‘soundfont’ setting
Add ‘soundfont_volume’ setting
Cleanup
Add ‘soundfont_dir’ setting
Sort SoundFonts by filename in the MIXER /LISTMIDI output
Refactor FluidSynth chorus & reverb setup into separate functions
Improve the fsynth_chorus and fsynth_reverb settings’ descriptions
Improve the ‘soundfont’ setting’s description
Improve the MT-32 ‘model’ setting’s description
Allow changing FluidSynth settings at runtimeChanging ‘fsynth_chorus’, ‘fsynth_reverb’, ‘soundfont_volume’ and
‘soundfont_dir’ now takes effect immediately.
The current SoundFont will also be reloaded, which could be improved in
the future but it’s not really worth the complication (these setting are
rarely changed).
doco: Update the FluidSynth section of the Getting Started guide
Use the human-readable project name in the written config
Insert new lines after the setting descriptions in the written config
Reformat dev_con.h
De-magic ASCII character constants
Ensure line feed always follows carriage return from the consoleWhen reading the MS-DOS console device, the line feed character
always follows a carriage return (the infamous Microsoft ‘CRLF’
sequence).
The source got this right when reading enough bytes at a time that
both the CRLF can fit within the requested buffer size, However,
if the read size is split or done byte-by-byte, the trailing LF
wasn’t previously read in subsequent reads.
Drop redundant break in console switch
Eliminate the internal InstantLaunch verbosity levelThe InstantLaunch verbosity level isn’t available to users,
and (in addition to being a verbosity level), it seemed to
have a second purpose to indicate if the user was launching
a DOS executable passed into the DOSBox command line.
This commit drops this verbosity level (it’s not needed),
and fixes a problem where the `quiet` verbosity level was
incorrectly used when it should be `low` per the
`startup_verbosity` conf documentation.
Indicate that memsize can only be set at the startI tried changing this at runtime, but the memory size didn’t
change. Looking at the code, the memory size is allocated and
populated early in the start up sequence with DOS data
structures including number of pages.
Making memsize changeable at runtime would require “laying
down” a fresh DOS environment. So for now, this commit just
corrects this indicator to match the actual behavior.
Let section properties be const iterable
Let section properties store a queueable valueIf a property is unchangeable at runtime (such as machine,
memsize, etc), then this internal queuable value can hold the
users desired value for future action.
Store requested unchangeable settings in the queueable slotThis commit just stores the value but doesn’t make use it yet.
Let restarts (CONFIG -r and hotkey) use queued changesThis lets users set things like machine=cga and memsize=1 on the
DOSBox command line shell followed by restarting with CONFIG -r
or via hotkey.
This will ideally let these setting be adjusted from within a
batch file launched on the DOSBox command line instead of relying on
host-specific tools like bash or powershell.
Fix configuration setting case sensitivity regressionConfiguration settings should be case insensitive, regardless of whether
they’re set from the CLI or in a config file. E.g., all the following forms
should be accepted:
cpu_cycles 1234
config -set “Cpu_CYCles 1234”
CPU_CYCLES = 1234
Fix VGA draw address calculationIn some demos by the Majic 12 group (Show and Face), the rotor
zoom effect was offset by roughly half the screen as shown in
ticket #3449.
This bisected to 5a5d8f and then further bisecting at the
line-level isolated it to this order-of-operation change.
Use a pooled memory resource for the RWQueue’s deque containerThis limits heap allocations to only when the deque needs to
grow.
Add simplified bulk interfaces to the RWQueue- “Full vector” enqueuing without the need to specify the count. This
improves the readability of the user’s code.
– Direct bulk dequeueing into a C array. This avoids the need for an
intermediate std::vector, which is less combersome on the user’s
side.
– The bulk dequeue methods now return the number of items dequeued just
like the non-blocking version. This is more consistent and still
compatible with boolean test (where 0 evals to false).
– Makes Use of the new bulk calls through the codebase.
Let the RWQueue be checked if it’s full
Move the signed 8-bit to 16-bit LUT along side the unsignedThis makes both lookup tables available to audio devices that
need to convert their samples to AudioFrames.
The long-term goal is to migrate all audio devices to sending
AudioFrame’s to the mixer. This moves whatever byte swapping
and scaling is needed as close as possible to the data source.
Let the Mixer accept vector
because it’s still using the AddSamples C-style approach.
It should allow easy migration and when all the devices are finally
using it we can change the internals and do away with the
template and C-style implementation.
Eliminate the duplicate branch warning and #pragma in the MixerPlus minor adjustments:
– Use ‘is_same_v
the need for ‘::value ‘ at the end.
– Assign the number of frames received from the
BulkDequeue calls.
– Use a static vector to hold the AudioFrames, and
add those frames using the mixer’s new AddAudioFrames
call.
Bulk dequeue directly into SDL C-arrayAlso replaces the memset-to-zero using C byte quantities with a
range fill of just the shortfall portion.
Use a static std::vector in the Mixer’s capture callbackThis avoids re-allocating a vector on the heap every tick.
Assert that the threaded mixer isn’t spinning on empty requestsNow that the mixer is threaded, we should detect when programmatic
empty requests are made and fix them to prevent runaway spinning.
The functions themselves already handle the “empty request” case,
so there’s no harm or risk with release builds. But we might as
well catch these in debug builds.
Let the Mixer’s Channel class return milliseconds per frameThis can be used to time events one a 1:1 frame basis against the
playback rate of the channel.
Check sequential differences in the Mixer’s sleep criteriaSound is only made through movement (or “change”) over time,
which the previous sleep criteria wasn’t checking. This meant
that flat-lined channels (or silent DC signals) would actually
stay awake, despite not actually making any sound.
Relocate the Sound Blaster’s minimum playback constant alongside othersThis minimum constant will be used by the DAC.
Use clamp to bound the RWQueue’s chunk size
Add a logging function to the DMA channel class
Rename DMA enum constants
Clean up the Sound Blaster’s DMA callback handler with a switch
Move the Sound Blaster’s SBLASTER class to a separate headerThis is a prerequisite to standardizing the Sound Blaster.
Manage the Sound Blaster’s callback type in a classThe class has two callback types that differ based on
timing (or frequency):
– Per tick, where N frames are generated for each tick of
the emulator. This is the default case.
– Per frame, where only one frame is generate per callback.
Although the class introduces this concept, it’s dormant
and unused in this commit.
Introducing the per-frame callback is necessary to fix
fine-grained DMA cases where the software or game sets up
a single-frame DMA transfer and writes to the DMA memory
address at the playback rate (Crystal Dream demo).
Directly process the Sound Blaster’s DAC samplesUses a simple DAC class to measure and run the Sound Blaster’s
audio channel at the DAC data rate, processing samples on a
per-frame basis.
This eliminates the mixer’s “Add Stretched” and the
AudioVector’s similar stretch-vector derived class, both of
which were only used by the Sound Blaster DAC.
Because the DAC uses the per-frame callback timing, this
commit also ensure we continue to use the per-tick callback
timing for DMA playback (at the point when the transfer is
unmasked).
Move the Mixer’s management of audio device queues behind API callsThis decreases coupling by hiding internal details, and matches the
existing module design pattern in DOSBox.
Use the Mixer’s pull pattern in the Sound BlasterThis change requires replacing the Sound Blater’s `AudioVector` queue
with a public `RWQueue` of `AudioFrame`’s used by the Mixer.
Use the Mixer’s sleep feature in the Sound Blaster
Fix typo in Sound Blater function name
Conditionally use per-frame callback timing in the Sound BlasterThis fixes playback in games and demos that setup a small single-frame
DMA transfer and write to the memory address at the playback rate.
One example is Crystal Dream by Triton, July 1992.
Separate assert conditions in Sound Blaster
Remove extra CMS state bool from Sound Blaster
Simplify MIDI state bool in Sound Blaster
Fix deadlock on exit while LPT DAC is runningRegression from 9579fb2
LPT DAC was left out of a refactor that modified the mixer lock
Added back the check to stop the LPT DAC queue
Revert “Ensure line feed always follows carriage return from the console”
This reverts commit 3983c42.
Lower PVS Studio warning limit
Lower compilation warning limits
Got rid of compiler warnings in the GCC minimal build
Add license identifiers to the mouse emulation code
Fix few spelling mistakes
Rework mouse wheel emulation to operate on floats (SDL 3 preparation)
Rework mouse absolute position to operate on floats (SDL 3 preparation)
Move some locale data to a separate file
Rework host language (messages) autodetection
Rework remaining locale settings and autodetection
Tweak mappings for Balkan and Slovak QWERTY keyboard layouts
Add keyboard layout autodetection for macOS
Replace ‘std::map’ with ‘std::unordered_map’ in few places
Use LANG variable as a fallback for LC_* on POSIX systems
Update release drafter for 0.83.0-alpha
Fix SoundBlaster DMA regressionRegression from 4f4bfa2
Conditional was accidently inverted during a refactor
This caused a clicking noise in Worms
Only trigger bind events if the event pointer existsThe constructed state of a bind object has a nullptr event member,
so this is technically safer however in practice most bind objects
are immediately assigned an event.
This is a pre-requisite to displacing conflicting bind events
for a given host button.
Let the mapper’s handler and key classes compare binds and report eventsThese common APIs will let us compare them against other binds
to see if they originate from the same host button. This is a
prerequisite to displacing prior binds for a given button.
Let the mapper drop other bound events for a given button(This function is currently unused, but will be used in subsequent
commits)
Drop other bound events when binding new events in the mapper UI
Drop other bound events when adding programmatic event handlersFor example: the PCjr, CGA, and Tandy machine types assign
various composite event actions to the F10, F11, and F12 host
buttons.
Previously, the mapper would have left the original F-key events
bound to these button in addition to binding the composite event
handlers to the buttons.
This commit now ensures that those previous F-key events are now
dropped. This fixes a problem in Where in the World is Carmen San
Diego where it would jam up when processing an ‘F10’ keystroke
while also changing video output to composite mode.
website: Add 0.82.1 release notes draft
Bump dawidd6/action-download-artifact from 6 to 7Bumps [dawidd6/action-download-artifact](https://github.com/dawidd6/action-download-artifact) from 6 to 7.
– [Release notes](https://github.com/dawidd6/action-download-artifact/releases)
– [Commits](dawidd6/action-download-artifact@v6…v7)
—
updated-dependencies:
– dependency-name: dawidd6/action-download-artifact
dependency-type: direct:production
update-type: version-update:semver-major
…
Signed-off-by: dependabot[bot]
Fix line breaking in ‘PROGRAM_CONFIG_NOT_CHANGEABLE’ English string
Update Polish (pl) translation for 0.82.1
Fix for country ‘0’ (International English) support
Fix keyboard layout detection on some KDE configsThe previous code does not work correctly if only some
configured layouts have variants specified
Change default keyboard layout value to ‘us’
Code formatting fix
Improve keyboard layout sorting algorithm- layouts can be marked as fuzzy (not matching host layouts too well),
such layouts now have the lowest priority
– if the host OS provided a keyboard layout list already sorted
by user preference, skip the sorting almost entirely
(except for fuzzy layouts deprioritization)
Only detect keyboard layout if config value is set to ‘auto’
Fix win32 MIDI exclusion/link error
Fix win32 locale exclusion/link error
Fix a couple type warnings in win32 locale
Change ‘ISO country/territory’ conversion map to unordered
Fix string retrieval from Win32 API
Add manual testing requirements on all three OSes to the PR template
Small wording tweak to the PR template
Fix missing XML tag in Visual Studio solution fileUsing Linux tools: `xmllint –noout dosbox.vcxproj.filters`:
“`
dosbox.vcxproj.filters:897: parser error : Opening and ending tag mismatch: ClCompile line 106 and ItemGroup
^
dosbox.vcxproj.filters:1715: parser error : Opening and ending tag mismatch: ItemGroup line 3 and Project
^
dosbox.vcxproj.filters:1716: parser error : Premature end of data in tag Project line 2
“`
Sync/update Visual Studio filters
Bump lukka/get-cmake from 3.30.5 to 3.31.2Bumps [lukka/get-cmake](https://github.com/lukka/get-cmake) from 3.30.5 to 3.31.2.
– [Release notes](https://github.com/lukka/get-cmake/releases)
– [Commits](lukka/[email protected]…v3.31.2)
—
updated-dependencies:
– dependency-name: lukka/get-cmake
dependency-type: direct:production
update-type: version-update:semver-minor
…
Signed-off-by: dependabot[bot]
Fix debugger keypresses not being registered on WindowsRegression from either d225c9a or 0b1f510
Latter commit would not build so I can’t confirm
One of those locale changes changed the behavior of the toupper() function
Wrote my own ascii_to_upper() function to match expectations in the debugger code
docs: Remove mirror links from the Getting Started guide
Fix failed assertion if unable to detect host keyboard layout
Prefer using ROM font if keyboard layout is autodetected
Fix crash if opening the soundfont_dir directory failed
Reformat
Improve FluidSynth error logging
Improve MT-32 error logging
Use non-throwing std_fs::canonical in cdrom_ioctl_linux.cpp
Silence false PVS Studio warning
Clarify we’re dealing with volume gains in the MIXER command
Clarify we’re dealing with volume gains in the mixer
Reformat program_mixer.cpp
Reformat mixer.cpp|h
Add explanatory comments to the reverb, chorus & crossfeed level ranges
Set the default master volume level to -6dB (50% volume)
Explain the choice of the Speex resampler quality setting
Only apply master channel gain at the end of the processing chain
Clarify the use of the reverb & chorus aux buffers
Fix punctuation in comments in mixer.cpp|h
Revert “Add an ObjectPool class”This reverts commit 8bfaf49.
Revert “Use the ObjectPool to manage the dynamic core’s invalidationmaps”
This reverts commit 7a2b1af.
Revert “Use a pooled memory resource for the RWQueue’s deque container”
This reverts commit 2315a26.
Add code page descriptions, display them when appropriate
Rework translated messages support- add format string sanitizer
– do not try to use translations incompatible with current code page
Fix excessive castings reported by PVS Studio
Add some pre-definied ANSI markups
Add CLAP audio plugin headersThis is a copy of the CLAP 1.2.2 include files from
https://github.com/free-audio/clap
CLAP stands for CLever Audio Plugin. It is an interface that provides a
stable ABI to define a standard for Digital Audio Workstations and audio
plugins (synthesizers, audio effects, etc.) to work together.
CLAP is an open standard released under the MIT license.
Signed-off-by: John Novak
Add dynamic-link library handling functions
Add flag to GetFilesInResource to allow not only regular filesDisabling the flag is handy to enumerate sub directories, for example.
Reformat midi.cpp
Reformat support.cpp
Style improvements in support.cpp
Rename GetFilesInResource() to get_files_in_resource()
Rename MaxMidiSysExSize to MaxMidiSysExBytes
Add CLAP audio plugin supportAdd a very simple CLAP host with the minimum subset of features
implemented to support stereo instrument plugins.
Only plugins with exactly one MIDI input channel and two audio output
channels (stereo) are supported. Eligible plugins are auto-discovered;
plugins not meeting these requirements are discarded.
Change MidiDevice::Type::BuiltIn to Internal
Add generic Roland Sound Canvas CLAP plugin supportThis adds support for Sound Canvas CLAP plugins in a completely decoupled,
generic, and implementation-agnostic manner. MIDI-capable instrument
plugins likely to be SC-55 emulations are auto-discovered by their
descriptions alone.
For example, the inclusion criteria for the Sound Canvas SC-55 mk2 v1.01
emulation is if the plugin’s description string contains:
– “sc55 mk2 1.01”,
– or “sc-55mk2 v1.01”,
– or “sc55-mk2 1.01”,
– or a large number of further permutations.
Due to this decoupled mechanism, licensing incompatibilities between any
3rd-party CLAP plugin we load at runtime and DOSBox Staging (which is
GPL v2 licensed) become a non-issue. This is because we require no
knowledge whatsoever of the third party plugins we load; communication
is 100% accomplished via open protocols:
– CLAP for plugin discovery and instantiation,
– MIDI for sending data to the plugin (via the CLAP protocol),
– and raw 32-bit float audio streams to receive data from the plugin
(via the CLAP protocol)
Clean up MT-32 messages & remove redundant ones
Remove redundant instance var resetting in the FluidSynth destructor
Improve MT-32 log messages
Remove redundant member var resetting in the MT-32 destructor
Normalise MIDI work FIFO sizing
Roland MT-32 config description improvements
Mass-rename all occurences of ‘CallBack’ to ‘Callback’From the Microsoft Writing Style Guide:
“Two words as a verb, one word as an adjective or a noun. In content for
developers, don’t use callback to mean callback function.”
https://learn.microsoft.com/en-us/style-guide/a-z-word-list-term-collections/c/call-back-callback
Change the MIDI synth order to MT-32, SoundCanvas, FluidSynthAlso some minor config description improvements.
Clean up MIDI config setting initialisation
Add TODO comment to support.h
Simplify GetModelAndDir() in midi_mt32.cpp
Simplify GetSoundFontPath() in midi_fluidsynth.cpp
Make the shutdown order of MIDI devices deterministic
Move Core MIDI implementation into the .cpp file
Print message if no Core MIDI ports are available in the LISTMIDI output
Print message if no SoundFonts are available in the LISTMIDI output
Refine no available MT-32/SC-55 models message in the LISTMIDI output
Introduce the SoundCanvas namespace
Fix the internal MIDI synthesiser double-init problem at startupPrior to this change, if `mididevice` was set to `mt32`, `fluidsynth`,
or `soundcanvas` in the config at startup, the MPU401 and the MIDI
device was double-initialised.
This was an unintended side effect of the recent rework of the MIDI
subsystem.
Increase MaxMidiSysExBytes to 20K
Use the term “library path” consistently for CLAP plugins
Cache available Sound Canvas models
Add proper handling of CLAP plugin librariesThis fixes the multiple library init/deinit problem when multiple
plugins (or multiple instances of a single plugin) are loaded from the
same CLAP library, a few library leaks, and makes the whole CLAP
subsystem more RAII-compliant.
Enable narrowing checks for the CLAP & Sound Canvas code
Add authentic Sound Canvas filter emulation
Add explanatory comments to the CLAP subsystem
Fix double free in TCPClientSocket destructorRegression from DOSBox SVN
Bug was triggred when using the inhsocket feature.
This inherits a native socket from a parent process. It must not be closed by SDL_net.
Shut up PVS
Add maybe_unused to unused function parameters
Use static_cast to fix implict cast warning
Remove romanization rules from our Unicode engine
Fix spelling mistake
Bump lukka/get-cmake from 3.31.2 to 3.31.3Bumps [lukka/get-cmake](https://github.com/lukka/get-cmake) from 3.31.2 to 3.31.3.
– [Release notes](https://github.com/lukka/get-cmake/releases)
– [Commits](lukka/[email protected]…v3.31.3)
—
updated-dependencies:
– dependency-name: lukka/get-cmake
dependency-type: direct:production
update-type: version-update:semver-patch
…
Signed-off-by: dependabot[bot]
Add autodetection priorities to keyboard layouts
Switch default ‘keyboard_layout’ back to ‘auto’
Synchronize invalid config setting message style
Add specialized conversion routines for national characters in file system
Fix in code page 1118 definition
Improve combining mark handling in the Unicode engine
Use the isolated form of Arabic Shadda in code page 864
Consider keyboard layout list random on GNOME
Variable renaming
Update Italian translation
Fix Italian translation
Fix version typo on the website for legacy Windows 7 support
Review auto-detection priorities(cherry picked from commit aac33ae)
Revert “Drop other bound events when adding programmatic event handlers”This reverts commit 2f7ff90.
Revert “Drop other bound events when binding new events in the mapperUI”
This reverts commit f33cc25.
Revert “Let the mapper drop other bound events for a given button”This reverts commit 1b04800.
Revert “Let the mapper’s handler and key classes compare binds and report events”
This reverts commit 1e40036.
Revert “Only trigger bind events if the event pointer exists”This reverts commit 84d50e3.
Immediately save user mapper changes to disk* remove “Save” button in mapper UI
* immediately save any completed user-initiated mapping change to disk
Add ISO/KOI/MAC/WIN code pages packs, not integrated yetCo-authored-by: Henrique Peron ([email protected])
Decompress the CPX files, add them to resources
Locale definitions for the newly added code pages
Improve ordering in ‘dosbox –list-code-pages’ output
Update code page definitions for the Unicode engine
Increase bind name display length to avoid truncation* Increase the maximum length of the display name of a bind above the maximum
that can fit on screen
* Any longer names will be clipped, which is no worse than prior situation of
arbitrary truncation at 30 chars
Change ‘language’ default to ‘auto’, to simplify the message
Minor English string improvements
Update Polish (pl) translation
Enable hotplugging joysticks* fixes #946
* remove REDUCE_JOYSTICK_POLLING hack, which prevented detection of joystick hotplug events
* re-initialize mapper when receiving following events:
* SDL_CONTROLLERDEVICEADDED
* SDL_CONTROLLERDEVICEREMOVED
* SDL_JOYDEVICEADDED
* SDL_JOYDEVICEREMOVED
Suppress redundant mapper initialization at startup* Suppress handling of joystick connection events that occur during
joystick subsystem init, which occurs in the middle of first mapper
init, which is already aware of such joysticks.
Remove reinterpret_cast for accessing SDL EventsSDL_Event is a tagged union. We can just access the relevant member rather than casting.
This fixes a PVS warning.
Revert “Remove reinterpret_cast for accessing SDL Events”This reverts commit 6885b82.
Revert “Suppress redundant mapper initialization at startup”This reverts commit edaa2d0.
Revert “Enable hotplugging joysticks”This reverts commit 9b02942.
Atualizações:
Atualizar SDL wrap para 2.30.6
No Linux moderno, é preferível usar o ID completo da aplicação para nomear os arquivos de desktop, ícones e metainfo. Adicionar uma opção no meson para capturar essa variável e configurá-la como org.dosbox-staging.DOSBoxStaging, que corresponde melhor ao fato de que o site é dosbox-staging.org.
Garantir que estamos configurando o resourceclass do X11 e o app_id do Wayland para esse valor. Esses valores precisam corresponder ao nome do arquivo .desktop para que compositores/gerenciadores de janelas possam associar corretamente as janelas ao arquivo .desktop apropriado (veja aqui para uma explicação). Agora que estamos garantindo que tanto o X11 quanto o Wayland tenham associações corretas de janelas, podemos remover o StartupWMClass do arquivo .desktop, pois agora é desnecessário.
Como o SDL3 mudou a forma como isso é feito, algumas instruções #if foram adicionadas para que isso esteja pronto quando o dosbox-staging for portado para o SDL3.
Co-autoria: Reilly Brogan [email protected]
Manter CRLF nos arquivos relacionados ao instalador do Windows
Reinstaurar a criação do pacote do instalador do Windows no CI
Implantar o site de pré-visualização da branch 0.82.x
Melhorar as descrições das configurações do GUS
Corrigir mensagem de erro do comando IMGMOUNT
Remover recriações legadas de escaladores rgb*, scan* e tv* do DOSBox
Não usar framebuffers sRGB para os escaladores advinterp e advmame
Adicionar o shader xbr-lv2-noblend
Co-autoria: Tyrell Sassen [email protected]
Co-autoria: John Novak [email protected]
Assinado por: John Novak [email protected]
Adicionar shader xbr-lv3
Co-autoria: Tyrell Sassen [email protected]
Co-autoria: John Novak [email protected]
Assinado por: John Novak [email protected]
Adicionar shader xbr-lv2-3d
Co-autoria: Tyrell Sassen [email protected]
Co-autoria: John Novak [email protected]
Assinado por: John Novak [email protected]
Limpar truque de memcpy de 64 bits no x87
Adicionar cabeçalhos ausentes nos fontes do decodificador (gcc 13.x no retropie sinalizou cabeçalhos ausentes para essas fontes ao compilar um executável estático).
Eles fazem chamadas para alloca e funções de string, mas estão sem os cabeçalhos para elas.
Remover características de diagnóstico de builds de wrap do glib
Quando compilando dependências a partir do código-fonte, o glib pode adicionar recursos inúteis como dtrace, uma API simbólica de funções, verificações do SELinux, SystemTap e profiling em nível de sistema.
Não estamos utilizando glib e parece que o FluidSynth e o Slirp o utilizam minimamente. Então, vamos desabilitar o máximo de bloat possível.
Isso também diz ao wrap do pcre2 para não construir um executável ‘grep’ personalizado com o pcre2 habilitado.
Tratar SDL2 e SDL2-Net como outras dependências
Isso remove a barreira específica para macOS em torno dessas dependências, então agora qualquer pessoa no Linux ou MSYS2 pode compilar e vincular a elas (se não tiverem bibliotecas SDL2 ou SDL2-Net fornecidas pelo sistema).
Isso também adiciona o mesmo manuseio estático que outras dependências.
Se o usuário quiser vincular estaticamente, mas o sistema operacional só fornecer bibliotecas dinâmicas, elas serão compiladas a partir do código-fonte (assim como outras dependências).
Isso define as opções padrão do SDL2 para compilar apenas os subsistemas SDL2 que são usados: áudio, vídeo, joystick, eventos, temporizadores e recursos de thread. O restante é desabilitado.
Aqui está uma comparação de tempo de inicialização e de saída entre uma construção estática e desinchada do SDL contra o uso das bibliotecas SDL fornecidas pelo Debian.
Adicionar dependências de construção do SDL aos pacotes de desenvolvedor do Ubuntu
Renomear os constantes de mapeamento de Stereo e Reverse
Isso estava causando avisos de variáveis sombreadas quando variáveis locais reutilizavam esses nomes.
Renomeado de Stereo para StereoMap
Renomeado de Reverse para ReverseMap
Alterar formato de áudio do SDL de inteiro de 16 bits para flutuante de 32 bits
Atualmente estamos usando floats em todos os lugares no mixer.
Em seguida, fazemos o clamp para inteiros de 16 bits antes de enviar o áudio para o SDL.
O áudio em ponto flutuante deve ter uma qualidade ligeiramente melhor.
Misturadores de nível de sistema provavelmente irão converter para float de qualquer forma.
Observe que os floats devem ser normalizados de 1.0 a -1.0 como etapa final antes de enviá-los ao SDL.
Usar std::atomic para variáveis globais de PIC e tempo de CPU
Resolve um aviso do sanitizador de threads do Clang
Essas variáveis são escritas pela thread principal e lidas pela thread do mixer
Usar std::vector ao invés de array de tamanho fixo em PC Speaker Discrete
Essa pequena refatoração é necessária para o mixer em threads, que requer um std::vector para o método BulkEnqueue do RWQueue.
O código anterior estava utilizando um loop aninhado sobre um buffer de array fixo.
Remover buffer temporário std::vector da função AddSamples
Isso não era necessário. Em vez disso, podemos copiar diretamente para o buffer audio_frames, economizando alocações no heap.
Mover mais buffers temporários do mixer para o escopo global para reduzir alocações no heap
Prevenir a alocação de um vetor inútil na callback do SoundBlaster caso a fila esteja parada
Uma omissão da minha parte, uma função do SoundBlaster estava alocando um std::vector cheio de zeros
Para reproduzir silêncio, mesmo que a fila esteja parada e seria descartada imediatamente.
Adicionada uma saída antecipada para prevenir essa alocação no heap.
Evitar alocar um buffer temporário quando o mixer está silenciado
Reutilizar mixer.output_buffer após limpá-lo e redimensioná-lo para preencher com silêncio
Bloquear a thread do mixer ao pausar em vez de mutar
sdl.mute_when_inactive agora não é configurado quando sdl.pause_when_inactive está configurado
A pausa tem prioridade porque, quando estamos pausados, também não estamos tocando som.
A mutação ainda executa a thread do mixer, mas gera silêncio.
Isso não é ideal para alguns dispositivos de som, como GUS, que repetem amostras.
Queremos que o estado do áudio ao retomar seja o mesmo que antes de pausarmos.
Isso também impede o uso de CPU para renderizar áudio que não vamos tocar.
Configurar a flag de avanço rápido do mixer no manipulador de hotkeys em vez de inferir com base no tempo
Permitir que o mixer bloqueie enquanto está no modo de avanço rápido
Anteriormente, eu tinha um código de caso especial para não bloquear o mixer
Para dispositivos que funcionam na thread principal durante o modo de avanço rápido.
A razão para isso era que o mixer poderia ficar “preso” no modo de avanço rápido
Devido à sua dependência de tempos.
Isso não é mais o caso. Agora ele sempre retorna ao modo “normal” assim que a tecla de atalho for liberada.
Remover código para simplificar e também evitar under-runs.
Remover atribuição de copyright do DOSBox no código de áudio PS/1
Aparentemente, esse código não veio do DOSBox original.
Agora está marcado apenas com “Copyright (C) 2021-2024 The DOSBox Staging Team”
Reformatar e simplificar definições de predefinições de chorus e reverb
Reduzir a força da predefinição tiny reverb em ~25%
Atualizar tradução em polonês (pl)
DYN_LOG: Corrigir incompatibilidade de tipo de formatação
Esse é o aviso do compilador:
No arquivo incluído de ../../src/cpu/core_dyn_x86.cpp:257:
../../src/cpu/core_dyn_x86/decoder.h: Na função ‘CacheBlock* CreateCacheBlock(CodePageHandler*, PhysPt, Bitu)’:
../../src/cpu/core_dyn_x86/decoder.h:2427:69: warning: o formato ‘%X’ espera argumento do tipo ‘unsigned int’, mas o argumento 2 tem tipo ‘Bitu’ {aka ‘long unsigned int’} [-Wformat=]
Atualizar redirecionamento de shell para adicionar ao final de um arquivo
Regressão de d4509f9
O código anterior tinha a suposição de que o arquivo de saída seria o descritor de arquivo 1
Essa suposição foi quebrada na minha refatoração
Obviamente, queremos buscar até o final do arquivo que acabamos de abrir
Atualizar tradução em holandês (nl)
Atualizar tradução em italiano (it)
Remover espaços em branco
Corrigir pequenos erros aqui e ali
Atualizar FreeDOS xcopy.exe para versão 1.7
https://github.com/FDOS/xcopy/releases/tag/v1.7
Co-autoria: PerditionC [email protected]
Atualizar debug.com para versão 2.50
https://github.com/Baron-von-Riedesel/DOS-debug/releases/tag/v2.50
Co-autoria: Andreas Grech [email protected]
Atualizar licenciamento com informações de binários de terceiros
Adicionar seção de notas de lançamento ao template do PR
Endereçar feedback de k4ppa971
Refinamentos adicionais na tradução italiana (it)
Atualizar tradução em alemão (de)
Fazer o título das exibições de ciclos ser traduzível novamente
Atualizar tradução em polonês (pl)
Corrigir suporte ao mouse no Descent II com o patch Voodoo
Reverter “Corrigir suporte ao mouse no Descent II com um patch Voodoo”
Isso reverte o commit df7df95.
Remover caso especial para os eixos do joystick 2 e 5 e adicionar detecção para os botões de gatilho do gamepad
Esses botões de gatilho são na verdade gatilhos analógicos com uma posição de repouso em torno de -32000
O código anterior tinha um caso especial para eles fixados nos eixos 2 e 5
Alguns controladores, como o PS5 DualSense, mapeiam esses eixos para o stick analógico
Em vez disso, pergunte ao SDL pelo mapeamento do gamepad na inicialização
Incluir licença do DEBUG.COM nos pacotes
Silenciar o log de depuração do Voodoo com um pré-processador e wrapper
Extreme Tennis faz dezenas de milhares de chamadas por segundo para
Uma chamada de mesclagem local que consome muito a CPU
Desabilitar script de AOB
Devido à execução crítica
Atualização dos registradores de controle de mixagem e seleção de endereço do GUS: O código agora usa uma visualização de bits para melhorar a clareza, especialmente porque um dos nomes de variáveis no manipulador de interrupção estava incorreto. A variável “lines” estava verificando o bit 0x8, que na verdade é o bit de latch no controle de mixagem.
Uso de endereços base reais para o GUS: O código agora usa os endereços base corretos para o Gravis Ultrasound.
Alternância automática de shaders ao iniciar um jogo Voodoo: Melhorias na detecção e troca automática de shaders quando um jogo da Voodoo é iniciado.
Correção de traduções: Melhorias nas traduções para o holandês (nl), polonês e francês, incluindo ajustes no formato da string do banner CGA.
Ajustes no processo de inicialização do CGA: Alguns parâmetros desnecessários foram removidos, e o comportamento do banner de inicialização foi corrigido.
Atualização da versão do VCPKG para ARM64: A tripla ARM64 foi definida explicitamente no VCPKG devido a mudanças recentes no processo de configuração automática.
Manter o GUS em funcionamento durante leituras de portas IO: Melhorias na manutenção do GUS durante leituras de portas IO, essenciais para o gerenciamento correto das interrupções.
Aderir ao comportamento documentado do registrador de reset: O GUS agora segue com mais precisão o comportamento documentado, onde o estado de reset é controlado pelo bit 0 do registrador de controle.
Garantir que apenas uma chamada de callback de DMA seja executada por vez: O código foi modificado para evitar que múltiplos callbacks de DMA se sobreponham, garantindo que somente um seja registrado no sistema de interrupções.
Gerar interrupção do GUS apenas no final da transferência DMA: A lógica do DMA foi ajustada para gerar uma interrupção somente quando a transferência estiver concluída, em conformidade com o comportamento esperado.
Refatoração do código: Várias funções e classes foram reorganizadas para melhorar a clareza e a manutenção do código.
Ajustes na inicialização do dispositivo MIDI: Houve mudanças na forma de inicializar dispositivos MIDI e na abstração da interface, permitindo um controle mais eficiente e simplificado.
Melhorias na interface do dispositivo MIDI: A interface foi simplificada, e funções obsoletas foram removidas.
Melhorias na gestão de SoundFonts e dispositivos MIDI: O código agora permite a alteração dinâmica do SoundFont e do modelo MT-32 durante a execução, além de introduzir melhores práticas de codificação, como a eliminação de métodos redundantes e a reorganização do código.
Correções de erros e limpeza do código: Foram feitas várias correções, como a remoção de funções não utilizadas, a normalização de constantes e a melhoria no manejo de erros.
Adicionar a opção de configuração file_locking: Isso foi implementado originalmente pelo commit 7d806a8. Foi codificado como ativado por padrão e não causa problemas para a grande maioria dos softwares DOS. No entanto, causou uma regressão para o demo Astral Blur, então essa opção de configuração foi adicionada para desabilitar o bloqueio de arquivos, se necessário.
Atualizar o runner do macOS para macOS-13.
Adicionar RISC-V 64 ao platforms.yml: Para mais informações, consulte suporte para plataformas.
Atualizar platforms.yml para Debian 12: Para corresponder à alteração no #3950.
Restaurar a compilação do ManyMouse nos builds do Windows.
Prevenir o uso do ManyMouse no Windows se a entrada bruta do mouse estiver ativada.
Corrigir a conversão de string DOS para UTF8 usando o modo WithControlCodes: Devido a um simples erro, todos os caracteres especiais (como a nova linha) estavam sendo convertidos para um ponto de interrogação, geralmente indicando um caractere desconhecido ou não suportado.
Suporte inicial para compartilhamento de área de transferência.
Documentação: Adicionar arquivos fonte de ilustração para o guia “Getting Started”.
Documentação: Atualizar o README.md.
Simplificar as configurações mididevice e midiconfig.
Limpeza do código.
Remover o suporte para o parâmetro volume na configuração ‘soundfont’.
Adicionar a configuração ‘soundfont_volume’.
Limpeza do código.
Adicionar a configuração ‘soundfont_dir’.
Classificar SoundFonts por nome de arquivo na saída do MIXER /LISTMIDI.
Refatorar a configuração de chorus e reverb do FluidSynth em funções separadas.
Melhorar as descrições das configurações ‘fsynth_chorus’, ‘fsynth_reverb’, ‘soundfont_volume’ e ‘soundfont_dir’.
Melhorar a descrição da configuração ‘soundfont’.
Melhorar a descrição da configuração ‘model’ do MT-32.
Permitir alterar configurações do FluidSynth em tempo de execução: Agora, alterar as configurações ‘fsynth_chorus’, ‘fsynth_reverb’, ‘soundfont_volume’ e ‘soundfont_dir’ tem efeito imediato. O SoundFont atual também será recarregado, o que poderia ser melhorado no futuro, mas no momento não vale a pena a complicação, já que essas configurações raramente são alteradas.
Documentação: Atualizar a seção do FluidSynth no guia “Getting Started”.
Usar o nome do projeto legível por humanos na configuração escrita.
Inserir novas linhas após as descrições das configurações na configuração escrita.
Reformatar dev_con.h.
Remover constantes mágicas de caracteres ASCII.
Garantir que o feed de linha sempre siga o retorno de carro do console: Ao ler o dispositivo de console MS-DOS, o caractere de feed de linha sempre segue o retorno de carro (a famosa sequência ‘CRLF’ da Microsoft). O código já tratava isso corretamente ao ler bytes suficientes, mas ao ler byte a byte ou com buffer pequeno, o LF não era lido nas leituras subsequentes.
Remover break redundante no switch do console.
Eliminar o nível de verbosidade InstantLaunch: O nível de verbosidade InstantLaunch não é acessível aos usuários, e além de ser um nível de verbosidade, parecia ter uma segunda função para indicar se o usuário estava executando um executável DOS passado pela linha de comando do DOSBox. Este commit remove esse nível de verbosidade, corrigindo também um problema onde o nível ‘quiet’ estava sendo usado incorretamente, quando deveria ser ‘low’, conforme a documentação de configuração de verbosidade.
Indicar que o memsize só pode ser configurado no início: Tentei alterar isso em tempo de execução, mas o tamanho da memória não mudou. Após revisar o código, percebi que o tamanho da memória é alocado e preenchido muito cedo no processo de inicialização com estruturas de dados do DOS, incluindo o número de páginas. Alterar o memsize em tempo de execução exigiria “reiniciar” o ambiente DOS, o que, por enquanto, não é viável.
Permitir que as propriedades da seção sejam iteráveis de forma constante.
Permitir que as propriedades da seção armazenem um valor enfileirável: Se uma propriedade não pode ser alterada em tempo de execução (como máquina, memsize, etc.), esse valor enfileirável pode armazenar a configuração desejada para ação futura.
Armazenar configurações não alteráveis em um slot enfileirável: Este commit armazena o valor, mas ainda não o utiliza.
Permitir reinicializações (CONFIG -r e hotkey) usarem mudanças enfileiradas: Isso permite que os usuários configurem coisas como machine=cga e memsize=1 na linha de comando do DOSBox, seguidos de reinicializações com CONFIG -r ou por hotkey. Isso também possibilitará ajustes dentro de arquivos em lote lançados pela linha de comando do DOSBox.
Corrigir regressão na sensibilidade a maiúsculas/minúsculas das configurações: As configurações devem ser insensíveis a maiúsculas, seja configuradas pela linha de comando ou no arquivo de configuração.
Corrigir cálculo do endereço de desenho VGA: Em algumas demos do grupo Majic 12 (Show e Face), o efeito de zoom do rotor estava desalinhado pela metade da tela, como mostrado no ticket #3449.
Usar um recurso de memória em pool para o contêiner deque do RWQueue: Isso limita as alocações de heap apenas quando o deque precisa crescer.
Adicionar interfaces simplificadas de bulk para o RWQueue: Enfileiramento “em vetor completo” sem a necessidade de especificar a contagem.
Verificar se o RWQueue está cheio.
Mover a tabela de consulta de 8 bits com sinal para 16 bits ao lado da tabela de 8 bits sem sinal: Isso torna ambas as tabelas de consulta disponíveis para dispositivos de áudio que precisam converter seus samples para AudioFrames.
Permitir que o Mixer aceite vetores de AudioFrames.
Eliminar o aviso de ramo duplicado e #pragma no Mixer.
Bulk dequeue diretamente para o array C do SDL: Substitui o memset com C byte quantities por uma operação de preenchimento de intervalo.
Usar um vetor estático no callback de captura do Mixer: Isso evita re-alocações de vetor na heap a cada tick.
Assegurar que o mixer com threads não fique girando em requisições vazias: Agora que o mixer é multithread, devemos detectar quando requisições vazias são feitas e corrigi-las para evitar loops infinitos.
Permitir que a classe Channel do Mixer retorne milissegundos por quadro.
Verificar diferenças sequenciais nos critérios de descanso do Mixer: O som só é feito por movimento (ou “mudança”) ao longo do tempo, o que não era verificado anteriormente, resultando em canais “planos” (ou sinais DC silenciosos) permanecendo acordados, apesar de não fazerem nenhum som.
Reorganizar o mínimo constante de reprodução do Sound Blaster ao lado de outros.
Usar o clamp para limitar o tamanho do chunk do RWQueue.
Adicionar uma função de registro à classe DMA channel.
Renomear constantes da enumeração DMA.
Limpar o manipulador de callback DMA do Sound Blaster com um switch.
Mover a classe SBLASTER do Sound Blaster para um cabeçalho separado.
Gerenciar o tipo de callback do Sound Blaster em uma classe.
Processar diretamente os samples DAC do Sound Blaster.
Mover a gestão de filas de dispositivos de áudio do Mixer para chamadas de API.
Usar o padrão de “pull” do Mixer no Sound Blaster.
Usar o recurso de descanso do Mixer no Sound Blaster.
Fixar um erro tipográfico no nome da função do Sound Blaster.
Usar callback de quadro condicionalmente no Sound Blaster.
Separar as condições de assert no Sound Blaster.
Remover o bool de estado extra do CMS no Sound Blaster.
Simplificar o bool de estado do MIDI no Sound Blaster.
Corrigir deadlock na saída enquanto o LPT DAC estava em execução: Erro regressivo devido à refatoração que deixou o LPT DAC fora de um bloqueio do mixer.
dosbox.vcxproj.filters:897: erro de parser: A tag de abertura e fechamento não correspondem: ClCompile linha 106 e ItemGroup
^
dosbox.vcxproj.filters:1715: erro de parser: A tag de abertura e fechamento não correspondem: ItemGroup linha 3 e Project
^
dosbox.vcxproj.filters:1716: erro de parser: Fim prematuro de dados na tag Project linha 2
Sincronizar/atualizar os filtros do Visual Studio
Atualizar lukka/get-cmake de 3.30.5 para 3.31.2
Atualiza lukka/get-cmake de 3.30.5 para 3.31.2.
Notas de versão
Commits
dependências-atualizadas:
nome-da-dependência: lukka/get-cmake
tipo-dependência: direto:produção
tipo-atualização: versão-atualização:semver-minor
Assinado por: dependabot[bot] [email protected]
Corrigir teclas de atalho do depurador não sendo registradas no Windows
Regressão de d225c9a ou 0b1f510
O último commit não compilou, então não posso confirmar
Uma das mudanças de localidade alterou o comportamento da função toupper()
Escrevi minha própria função ascii_to_upper() para corresponder às expectativas no código do depurador
docs: Remover links de espelho do guia de Introdução
Corrigir falha na asserção se não for possível detectar o layout do teclado host
Preferir usar a fonte ROM se o layout do teclado for autodetectado
Corrigir falha ao abrir o diretório soundfont_dir
Reformatação
Melhorar o registro de erros do FluidSynth
Melhorar o registro de erros do MT-32
Usar std_fs::canonical não lançador em cdrom_ioctl_linux.cpp
Silenciar alerta falso do PVS Studio
Esclarecer que estamos lidando com ganhos de volume no comando MIXER
Esclarecer que estamos lidando com ganhos de volume no mixer
Reformatação program_mixer.cpp
Reformatação mixer.cpp|h
Adicionar comentários explicativos aos intervalos de nível de reverberação, chorus e crossfeed
Definir o nível de volume mestre padrão para -6dB (50% do volume)
Explicar a escolha da configuração de qualidade do reamostrador Speex
Aplicar ganho do canal mestre apenas no final da cadeia de processamento
Esclarecer o uso dos buffers auxiliares de reverberação e chorus
Corrigir pontuação nos comentários em mixer.cpp|h
Reverter “Adicionar uma classe ObjectPool”
Isso reverte o commit 8bfaf49.
Reverter “Usar o ObjectPool para gerenciar os mapas de invalidação do núcleo dinâmico”
Isso reverte o commit 7a2b1af.
Reverter “Usar um recurso de memória em pool para o contêiner deque do RWQueue”
Isso reverte o commit 2315a26.
Comentários