This massive patch is based on work of NY00123, which was published on Vogons forum in 2013 and was waiting for inclusion in SVN since then: https://www.vogons.org/viewtopic.php?f=41&t=34770 Revision from December 2018 was used to kickstart this work. However, a number of changes were implemented: - Original patch preserves all SDL 1.2 code by ifdefing it; this patch completely removes all code ifdefed for several versions of SDL 1.2.* This way the code will be easier to maintain going forward and features enabled by SDL 2.0 do not need to be backported. A side-effect of this change is almost-complete removal of DirectDraw support - but users can now use Direct3D based acceleration (without any ifdefs in code). - Code ifdefed for Android was removed to make the project easier to understand and modify. Android port should still be possible, but it requires more work (mostly CI and buildsystem work). Android-related functionalities that were cross-platform were preserved. - Code ifdefed for OpenGL ES (which was only used for Android) was removed - this should not affect Android support, as hardware-accelerated 2D should still be viable via "texture" output, but it was not tested, as buildsystem does not support Android ATM. - SDL_cdrom code is not included; it was outside of scope of SDL2 changes. Inclusion of that library did not justify supporting one small usecase (playblack of CD audio from physical CDs). - Few code warning were fixed (but new sdl_mapper implementation introduces many, many new warnings). - Some formatting changes were implemented. Overall, the original patch had ~40k lines of code - here it was trimmed to +769,-972 (so more old code got removed than new code added). This implementation was extensively tested on Linux and somewhat tested on Windows 10. It fixes numerous issues (too many too list). Testing found two small regressions: - Starting game in fullscreen makes it impossible to switch back to windowed mode correctly (Windows 10) - Scaling works a bit worse, only in text mode, only in window (Linux) This implementation introduces revised user settings in sdl section - it is only partly compatible with settings from SDL 1.2; this is an issue, but it will need to be addressed in a separete commit. |
||
---|---|---|
.github | ||
contrib | ||
docs | ||
include | ||
scripts | ||
src | ||
vs | ||
.gitignore | ||
.pylint | ||
acinclude.m4 | ||
AUTHORS | ||
autogen.sh | ||
configure.ac | ||
COPYING | ||
INSTALL | ||
Makefile.am | ||
README | ||
README.md | ||
THANKS |
dosbox-staging
This repository attempts to modernize the DOSBox project by using current development practices and tools, fixing issues, adding features that better support today's systems, and sending patches upstream. Read more at Vogons thread.
Summary of differences compared to upstream:
dosbox-staging | DOSBox | |
---|---|---|
Version control | Git | SVN |
Language | C++11 | C++031 |
CI | Yes | No |
Static analysis | Yes2,3 | No |
Dynamic analysis | Yes | No |
Automated regression tests | No (planned)4 | No |
SDL | 1.2 (2.0 WIP)5 | 1.2* |
Codecs supported for CD Digital Audio emulation (loading CD music via cue sheets):
dosbox-staging† | DOSBox‡ | |
---|---|---|
Opus | Yes (libopus) | No |
OGG/Vorbis | Yes (built-in) | Yes - SDL_sound 1.2 (libvorbis)6,* |
MP3 | Yes (built-in) | Yes - SDL_sound 1.2 (libmpg123)6,*,§ |
FLAC | Yes (built-in) | No§ |
WAV | Yes (built-in) | Yes - SDL_sound 1.2 (internal)7,* |
AIFF | No | Yes - SDL_sound 1.2 (internal)7,* |
* - SDL 1.2 is not actively maintained any more.
† - 22.05 kHz, 44.1 kHz, 48 kHz; mono, stereo
‡ - 44.1 kHz stereo only
§ - SDL_sound supports it, but the feature might be broken or DOSBox does not indicate support.
Development snapshot builds
Pre-release builds can be downloaded from CI build artifacts. Go to Linux or Windows, select a build you are interested in, click "Artifacts" button (in the top right), and download the package.
Linux
Snapshots are dynamically-linked x86_64 builds, you'll need additional packages installed via your package manager. Different dependencies might be necessary for specific snapshots (check included README file).
Fedora
$ sudo dnf install SDL SDL_net opusfile
Debian, Ubuntu
$ sudo apt install libsdl1.2 sdl-net1.2 opusfile
Arch, Manjaro
$ sudo pacman -S sdl sdl_net opusfile
Windows
A dosbox.exe file in a snapshot package is not signed, therefore Windows 10 might prevent the program from starting.
If Windows displays the message "Windows Defender SmartScreen prevented an unrecognised app from starting", you have two options to dismiss it:
- Click "More info", and button "Run anyway" will appear.
- Right-click on dosbox.exe, select: Properties → General → Security → Unblock
Windows packages are built for "x86" architecture (in practice it means i686).
macOS
macOS snapshots are not available at the moment.
Build instructions
Linux, macOS, MSYS2, MinGW, other OSes
Read INSTALL file for a general summary about dependencies and configure options. Read build.md for the comprehensive compilation guide.
$ git clone https://github.com/dreamer/dosbox-staging.git
$ cd dosbox-staging
$ ./autogen.sh
$ ./configure
$ make
You can also use a helper script ./scripts/build.sh
,
that performs builds for many useful scenarios (LTO, FDO, sanitizer builds,
many others).
Visual Studio (2019 or newer)
First, you need to setup vcpkg to install build dependencies. Once vcpkg is installed and bootstrapped, open PowerShell, and run:
PS> .\vcpkg integrate install
PS> .\vcpkg install libpng sdl1 sdl1-net opusfile
These two steps will ensure that MSVC finds and links all dependencies.
Start Visual Studio, open file: vs\dosbox.sln
and build all projects
(Ctrl+Shift+B).
Interop with SVN
This repository is (deliberately) NOT git-svn compatible, this is a pure Git repo.
Commits landing in SVN upstream are imported to this repo in a timely manner,
to the branches matching
svn/*
pattern.
You can safely use those branches to rebase your changes, and prepare patches
using Git format-patch for sending
upstream (it is easier and faster, than preparing patches manually).
Other branch name patterns are also in use, e.g.
vogons/*
for various patches posted on the Vogons forum.
Git tags matching pattern svn/*
are pointing to the commits referenced by SVN
"tag" paths at the time of creation.
Additionally, we attach some optional metadata to the commits imported from SVN in the form of Git notes. To fetch them, run:
$ git fetch origin "refs/notes/*:refs/notes/*"