VOGONS


First post, by ADDiCT

User metadata
Rank Oldbie
Rank
Oldbie

Is it possible to change the mapperfile during runtime? I've tried changing it with "config -set sdl mapperfile=mymap.txt", but DOSBox didn't pick up the changes.

If this feature is not implemented, would it be possible to implement it? That would allow us to create the maps on a per-game basis, which would be awesome for keyboard-heavy games like TIE Fighter.

Reply 1 of 7, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

aehm, I might misunderstand you, but inside dosbox you can specify a new mapperfile.
type mapperfile and dosbox tells you which file is used
type mapperfile somename.txt and Dosbox will use that file.
At least I *think* it does do that, I haven't tested that if it indeed uses the new file during running.
But if it does then you can just make a batch file and have it load a special mapperfile and then load the game.
I have made such run.bat files for my games (without mapperfile though, since I don't make use of that often).

Windows 3.1x guide for DOSBox
60 seconds guide to DOSBox
DOSBox SVN snapshot for macOS (10.4-11.x ppc/intel 32/64bit) notarized for gatekeeper

Reply 2 of 7, by ADDiCT

User metadata
Rank Oldbie
Rank
Oldbie

Nope, doesn't work with official 0.70 and latest AEP build. The filename shown when executing the "mapperfile" command will change, but DOSBox doesn't pick up the new map. I wonder what that command is supposed to do in the first place... (;

Edit: i just realized that the thread title and my problem description might be misleading. What i'm looking for is a way to change the mapping of keys or joystick functions inside DOSBox, by loading a new mapperfile.

Reply 3 of 7, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

I wonder what that command is supposed to do in the first place... (;

Displaying the name of the mapperfile.
Seriously, some configuration options are simply not enabled to be
changed on the fly for various reasons.

Reply 4 of 7, by ADDiCT

User metadata
Rank Oldbie
Rank
Oldbie

OK, i see... So it's currently not possible to change mappings during runtime, right? Would you consider making it possible to change maps on the fly? I have coded a homebrew menu system based on 4DOS batchfiles. The idea is to launch games via that menu system, without exiting DOSBox. Everything is working really fine, as the most important config options can be changed during runtime, just before starting a game. Being able to change the maps would make the system work even better.

Reply 5 of 7, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

I don't know if it's possible, the mapper init is split up and one part has
to be called at the very end of the initialization.
Maybe Qbix knows/has an idea, could possibly be split up even more.

Reply 6 of 7, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Currently the whole [sdl] section isn't handled by the runtime code.
The mapper itself is partly inited in main. To make it runtime changable will be quite an undertaking. Currently I have no desire to do that.

Water flows down the stream
How to ask questions the smart way!

Reply 7 of 7, by ADDiCT

User metadata
Rank Oldbie
Rank
Oldbie

OK, thanks for the information. I believe it would make sense to implement a changing of mapperfiles on the fly, though... (;

Currenty, nearly every "emulated machine" aspect of DOSBox is configurable during runtime. This means, the settings that are important to setup the emulated machine, like memory size and type(s), cycles, core, and so on, can be changed inside DOSBox. From a logical point of view, the mappings belong to the emulated machine, not the host (like, for example, the output or scaler settings), and thus should be configurable during runtime, too. Many games need their specific mappings, in order to make them conviently playable, so it's not sufficient to have one mapperfile for all games.

I hope you consider this functionality for a later version.