VOGONS

Common searches


First post, by Nazo

User metadata
Rank Newbie
Rank
Newbie

Is there any way to change these on the fly at all? For instance, I want to remap my joystick to keyboard controls for Zeliard as I don't like its default controls at all (in particular, I really want to map one of the buttons to the up arrow so the jump feels more natural and is less hard to actually do while moving.)

I realize of course that you can change the configuration file in the dosbox.conf file, but I like to run DOSBox kind of like an emulated system rather than on an individual game basis. Eg, I type "dosbox" and I'm presented with a C prompt after everything finishes starting up and then I run games as I would on a DOS machine without ever double clicking on anything or whatever. I like to keep things set somewhat on a universal basis and just change a few basics as needed via batch files (for instance, if I want to switch from using MIDI via the Windows MIDI mapper to MT-32 emulation, I use the config -set command to change the settings relevant to this via a batch file. I generally set each game that I can only get to sound decent via MT-32 emulation (I have the S-YXG50 synthesizer installed, so for the most part just about everything I can get to run through General MIDI sounds best that way to me) to switch on the fly, and when the game is done, it just switches back to the standard Windows MIDI mapping in case I run another game that's best that way. As someone who started out with computers back in the days before games really went to Windows, I've always just preferred it this way and up until now I haven't really run into anything that couldn't be either pretty universal or changed on the fly as needed in a simple batch file. This really seems to be the exception though as any changes to this on the fly appear to be ignored.

Ok, so of course I ran a search. It seems at least back in 2007 it was stated that DOSBox could not change anything from the sdl section of the configuration on the fly (I'm surprised it hasn't gotten past that in the past four years, but I guess it's just is too messy to change such a thing? I get the impression that everyone on the development team is fine with having a separate DOSBox setup for each game to just double click or whatever rather than doing it the old fashioned way really.) Assuming there is no solution in this though, isn't there any other way? After all, I don't need to switch complex keyboard keys or anything like that, merely remap the joystick buttons themselves (not even the axes.) Perhaps there might even be a more old-fashioned solution? Say a DOS program that can do this? After all, the games that should required this should generally be pretty old and probably won't crash if something is playing around with interrupts in such a manner as a TSR like this might be would probably do. Or maybe some simpler function in DOSBox itself since it doesn't need to change anything more than that?

Reply 1 of 8, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

I think the way it is now is actually closer to what happened on a real machine.
On real Dos I had to have different autoexec.bat/config.sys for whatever I wanted to run. Play Ultima 7 - disable Ems and load as few drivers as possible to keep the low memory footprint extremely small. Play Worms - enable Ems, CD-Rom ...
This all required restarting of the machine. Some stuff still needs restarting Dosbox. Mostly because some things, the SDL section stuff mostly, need to be set very early and I guess this won't change in the future. Changing that probably means rewriting Dosbox.
IMO your problem is a luxus problem, restarting Dosbox takes not much time and the SDL settings shouldn't be those settings you change often. Remapping is something I don't do at all.

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 8, by Nazo

User metadata
Rank Newbie
Rank
Newbie

Restarting doesn't take long, but we're not just talking about restarting here. I have to physically modify the configuration and restart, then modify it back. Otherwise the only way is to do what is mentioned in the older thread and keep separate copies of DOSBox for each game that needs this sort of thing. Perhaps I'm among a minority in this, but I just hate having separate copies of DOSBox configured for each individual game and having to browse to it or create start menu groups when all I normally have to do is just the usual "cd whatever" followed by "whatever" to run something. (I guess as someone who started off in the DOS days I've always been far more keyboard oriented than most people are these days -- I use a lot of shortcuts in various programs and rarely touch the mouse when I don't have to.)

Anyway, as I said, even if DOSBox itself can't do it, a DOS-based solution itself that would work on a real machine might perhaps work in the DOSBox environment?

BTW, it was possible to do menus in CONFIG.SYS and AUTOEXEC.BAT. They basically were more or less just like what you see when you get that Windows menu after an improper shutdown or whatever where it could default to a specific configuration. Back when I still used DOS a lot, I had my system setup to do this with a few basic configurations that more or less satisfied every game between them all. It would default to having CD, mouse, sound, and etc drivers loaded, but I could easily select not to load one of them during startup. I could never stand having to essentially do what you're talking about and physically switch out the files or use a bunch of bootdisks.

Reply 3 of 8, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

Even with menus in the startup files you needed to restart.

I advise you to read the documentation of dosbox. Especially the commandline functions of dosbox. You can use different config files for different usages. All easily done on the command line without clicking...

Also, as i wrote before, the SDL section stuff doesn't need to be changed that often for different games.
Also, it seems you may need to use a frontend that lets you easily switch configs for your games.

And please write more readable, don't put too much in one block...

Reply 4 of 8, by Nazo

User metadata
Rank Newbie
Rank
Newbie
Dominus wrote:

Even with menus in the startup files you needed to restart.

Yes, but you don't have to edit/replace a file back and forth every time. You merely restart and then select the appropriate option in the menu.

I advise you to read the documentation of dosbox. Especially the commandline functions of dosbox. You can use different config files for different usages. All easily done on the command line without clicking...

Well, I know about the command-line options, but ultimately it's not that different from having separate configurations for each game. You'd still have to run it separately in some manner such as another shortcut (requiring you to add it to the menu or another thing to double click.) I'm keyboard oriented, but I don't do everything in Windows in a console or something.

Also, as i wrote before, the SDL section stuff doesn't need to be changed that often for different games.

Perhaps, but, as I said, it's not necessarily such a simple thing. Firstly, is this really something that would require major changes to DOSBox? We're just talking about joystick mapping. That's even more external and simplistic than keyboard mapping. Also, I still stand by my earlier question of if there might be a DOS-based solution that may work in DOSBox. (Well, I'm aware that DOSBox is more gaming oriented than program oriented and may not be very TSR friendly, but it still seems to me like this would be something simplistic enough that it could be done.)

Actually, I'm pretty sure I used to have a gamepad that came with a DOS program that did indeed have the ability to map buttons to keys (I think to support the fact that it had a more than a mere four buttons. At least six I think.) Unfortunately, that was more than a decade ago (probably closer to a decade and a half) so I can't remember any details at all. (It wasn't a major standard gamepad from a well known manufacturer like Gravis or anything like that.)

Also, it seems you may need to use a frontend that lets you easily switch configs for your games.

I know about the frontends. I'm just not interested. I'd rather have separate copies and configurations if it came right down to it. I've just never liked using frontends at all.

And please write more readable, don't put too much in one block...

I can't help but to be verbose, whether people like it or not. It's not really something I decided I would do one day or something, it's merely how I am. It has reached the point that in most forums I have a signature reflecting this and a warning that anyone pointing this out is basically wasting their time since I can't help it. I'm afraid you'll just have to bear with it if you want to respond (and if you don't, that's fine too.)

Reply 5 of 8, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

About your writing style, write all you want but write it more readable, meaning write smaller blocks.You wrote yourself how down you are with keyboard use. But if I understand you correctly you neither want to use different start menu items nor want to use the command line, nor a frontend. Bad luck then...You could assign files with the conf ending to dosbox (and edit the function so it correctly uses it) so you can just doubleclick your config files...And again, it's apparently a luxus problem meaning normally you run dosbox and play a game. Finished.How often, besides from testing things quickly, are you running different games that NEED different keyboard/joystick layouts? If you do that often, then you should really look into using different config files and starting dosbox from the command line. Anyways there is no other way to do it and if one isn't too picky it's easily done, even for people who test different games configs more often.

Reply 6 of 8, by Nazo

User metadata
Rank Newbie
Rank
Newbie

It's really not something that I can change. Like I said, it's not something where I just sat down and made a conscious decision that I would write in a particular style. Rather, it's just the way I write and always has been.

As far as changing layouts goes, if you use it like a virtual computer, it might be more often than you think. Bear in mind that "games that need joystick mapping" could potentially mean quite a few games that don't actually support joysticks, not just those that don't support them well (like the aforementioned Zeliard.) It also can include games where there are a lot of functions that aren't/can't be configured to joystick buttons normally (Descent just for instance could feel like it didn't have quite enough at times even with a CH Flightstick Pro configuration -- which I used to use back in the DOS days since I found out that apparently it just "virtualized" having more buttons by simulating button combinations for the higher buttons, but of course even this has its own limitations.) Overall remapping itself can potentially be a pretty common thing. If you don't just use DOSBox on an individual game basis, I can see it as being something that's far more useful than you may think for far more than just testing or something. Surely I'm not the only one who prefers to use DOSBox this way rather than via shortcuts and command-line parameters?

The DOS-based solution still remains un-adressed (and frankly ignored.) Even if there's absolutely no way physically that DOSBox itself could directly do it, that doesn't mean nothing else can inside DOSBox. (I'm still not convinced that it would require a significant rewrite. It's not like changing the rendering or something.)

Reply 7 of 8, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

Well,dosboxisn'tavirtualmachine.It'stheway
itis.Ifyouarenotconvincedthatithastohandle
mappingsthiswaythengotakealookatthesource.
patchesarewelcome.onyourwritingstyle,not
makingitmorereadableisjustlazybessonyour
part.youknowthereisaproblemandyoudecide
nottodoanythingagainstitoratleastadsone
moreparagraphsafterwritingit.thatsokay,I'll
bemorelazymyselfnowwhenwritingwithyou 😉