Re-order configure code to avoid nested if statement and use case/esac for setting vars for dosbox/dosbox-sdl2
Only run setBackend configuration for dosbox
* allow modules to still use libpng12-dev but show a message for them to be updated
* change libpng-dev dependency to libpng12-dev for Jessie and older
Add experimental DOSBox port with SDL2 & FluidSynth support
Thanks to: https://github.com/duganchen/dosbox
Preliminary findings:
* Performance is roughly equal to vanilla build (~11fps with Quake +timedemo demo1 on both)
* Graphical tearing no longer appears to be present (or is greatly reduced)
* Better scaling of the display to the entire screen
* The blue colour bug when opening the mapper via Ctrl+F1 is no longer present.
Disadvantages:
* CD-ROM emulation is not available due to lack of support in SDL2 (does not affect IMGMOUNT,
so won't be a problem on Raspberry Pi)
* Mapper and windowed mode does not scale to full screen (but the port is configured to
use fullscreen by default to mitigate the problem).
Changes:
* Update to SVN r4006
* Fetch original source via subversion repository directly
* Clean up functions to allow support for dosbox variants,
ensure launcher script is removed and prevent config file from
being generated during uninstall phase.
* Ensure .sh scripts have timidity daemon running when needed
This allows users to override the default dosbox configuration,
but the most likely use is to configure the autoexec, such as:
[autoexec]
MOUNT C /home/pi/RetroPie/roms/pc
C:
CD PROGRAM/
LAUNCH.EXE
EXIT
This is the recommend way to configure content, and should also
work with lr-dosbox.
* Configure DOSbox to use TiMidity/FluidSynth ALSA port for MIDI if a running
service is detected during installation or if the target is a Pi.
* On Pi, explicitly spawn/kill a TiMidity daemon - but only if an existing
TiMidity/FluidSynth instance is not already running.
Using timidity is safe on the Pi, as the bcm2835 audio codec supports hardware
mixing on up to 8 substreams. It may be usable on other targets, but we
need to ensure that either hardware mixing or dmix (ALSA software mixer)
is available to avoid sound blocking.
* replace many of the existing wget | tar commands with the new function
* include error logging in the function via runCmd, to trap download/unpacking issues
When launching DOSBox, the mount of the C drive is visible which looks messy, and it doesn't change to C: drive automatically which is inconvenient.
Use @ to hide the commands from the user, and automatically change to the mounted C: drive.
The MOUNT command message displays the mounted path so there is no loss of information about where DOSBox has gotten the C drive from.
* basic remove support for modules - uses the existing configure function but sets md_mode to remove, which is used by
addSystem to remove systems and moveConfigFile/moveConfigDir to remove symlinks. Will not remove any configs from $configdir
* rp_module_menus is no more - instead use rp_module_section with one of
- core (core packages)
- main (main packages - which will be installed by default in the image)
- opt (optional packages)
- exp (experimental packages)
- driver (driver packages)
- config (configuration packages / tools)
* The setup menu organises the data based on the above sections. more could be added in the future if needed. Packages (internally modules), can be added / configured / removed individually, or as entire sections.
* The setup menu will automatically detect if a binary is available to be installed. the nobin flag is no longer needed. modules that install directly from binary via aptInstall or via a prebuilt binary need to use an install_bin_ function instead of install_
* rp_module_section of type "config" will have the "gui_" function called first if it's available, otherwise a standard depends/sources/build/install/configure will be called
* configure is no longer used for "gui" configuration function - use gui_ instead. Had already started to move to this before, but now it is required.