schellingb / dosbox-pure

DOSBox Pure is a new fork of DOSBox built for RetroArch/Libretro aiming for simplicity and ease of use.
GNU General Public License v2.0
732 stars 61 forks source link

Is including a soundfont and/or mapper data *inside* a zip (.dosz) possible? #380

Open Banjo-Oz opened 1 year ago

Banjo-Oz commented 1 year ago

I want to be able to include all needed files in the "game.dosz" to use with DOSBox Pure (regardless of platform) and that means including dosbox.conf, mapper and soundfont info, rather than relying on the frontend having the correct soundfont installed in the "system" folder.

I can override settings by including a "dosbox.conf" file in the zip, thankfully, but what about sound fonts or mapper data? I would much rather have the mapper config inside the zip, and even more so with the soundfont.

Is there any way, say, to have dosbox.conf point to a soundfont inside the .dosz alongside it, or is DOSBox Pure limited to only using soundfonts in the frontend "system" folder?

schellingb commented 1 year ago

You can move the mapper data file PADMAP.DBP from the RetroArch/saves/<GAME>.pure.zip over into <GAME>.dosz and it should still get recognized and used. But of course any modification made to the mapping will be written back into the save zip as DOSBox Pure never overwrites the loaded game.

As for sound fonts... not currently. The sound font is a system level setting that by default is global for the entire core. Would it be enough if we say a file named "DOSBOX.SF2" in the root of the loaded game will get used if it exists? Otherwise keep the current behavior (and there's no need to add a new option or anything).

Banjo-Oz commented 1 year ago

Thanks for the reply!

That behaviour is perfect for mapping; didn't know that was possible! I am fine with any changes the user makes being saved as a "save" rather than overwriting (that's what I'd want anyway).

I would very much like if what you describe happened for soundfonts (DOSBOX.SF2 in the zip or folder is read first, then current behaviour takes over if there is no such file) and am all for making it easier and not needing new options. Down the track, you could also add a "use DOSBOX.SF2 in game folder if found?" toggle like you do for DOSBOX.CONF but that would just be a nice to have and definitely not worth it if it's a ton of work.

On the same note, would it be possible to do something similar with MT-32/CM32L emulation too? For example, if MT32_CONTROL.ROM and MT32_PCM.ROM are found in the root of the zip/folder, use that music, otherwise revert to whatever the normal settings say. If that is harder than doing it for soundfonts, though, I understand skipping it.

A big part of wanting this is convenience and not needing external files (in system folders) for much easier portability (I use DOSBox-Pure on many different systems) but the other main reason is because some games are "best" with MT-32 music (such, Sierra SCI games), yet I prefer Doom with an SC-55 emulated soundfont but prefer other different soundfonts (such as emulated AWE32 banks) for other General MIDI games..

schellingb commented 6 months ago

@Banjo-Oz This is now supported since 0.9.8, it will try to load either DOSBOX.SF2 or a pair of MT32_CONTROL.ROM/MT32_PCM ROM from the mounted C: drive and use as fixed midi config. Can you give it a try?