Dosbox Conf


D4damage

Member
Joined
Dec 3, 2008
Messages
189
Where is the dosbox conf file stored and can it be modified manually like in windows. I want to add some things to the autoexec section.


Thanks.
 
Look into your appdatafolder. Also you can write custom configuration in the dosboxfe.
 
When I write or modify custom.conf files and use them with dosboxfe, dosboxfe overwrites them...


Is there a generic way to start dosbox on a pandora with a certain .conf?
 
I have to correct that, it's not dosboxfe: The run scripts in the Dosbox74.pnd overwrite all subdirectories in appdata/dosbox. Among these files the .dboxfe/profile/profile.xml. This again obliterates added .confs which would have to be in the profile.xml. That's how it *seems*, but there are still inconsistencies. *sigh*.
 
He should. :)


Also, I truly believe every single pnd run_script should per default provide for giving parameters to the app. There are far too many pnds deaf to their callers.
 
You are right. Sorry for having wronged you. I still have to find out who is messing up my conf files... so many possibilities...


(But I'd still kindly ask you to include parameters given in the runxy.sh files.)
 
There have been times that the profile.xml has been corrupted for me, but i assumed it was something to do with standby or an improper shutdown. Also dosboxfe will override the conf if you made changes outside that dont match some of its values and you click save.
 
Oh, sorry Pickle, didn't want to accuse you of using wrong commands, was just the first thing that came to my mind ;)
 
Thats a relief for me. I thought you jumped from a bridge or something...
 
Last edited by a moderator:
Oh I feel so wrong. Glad your tight schedule prevented a truly severe loss. :)


Well, since I didn't find much to that effect, now here's my tutorial for starting dosbox with a defined conf.


1. Make a script in a convenient place, call it runmydosbox.sh or what you like. This'll be the starter script.


contents:



Code:
#!/bin/sh

/usr/pandora/scripts/pnd_run.sh -p /media/[NAME-OF-SD]/pandora/apps/Dosbox74.pnd -b "dosbox" -e "rundosbox.sh" -a "$@"

You will have to find the path to the Dosbox74.pnd where it is on your system and replace the "/media/NAME-OF-SD/pandora/apps/Dosbox74.pnd" with that, of course.



Now run that script in a shell:



Code:
/media/[NAME-OF-SD]/convenient/place/runmydosbox.sh "-conf nc.conf"

(You can, of course, put [-a "-conf nc.conf"] in the .sh instead of [-a "$@"] and run it without params. Even more convenient, but less flexible.)



The reasons you're running this: There is some output helping you to decide if this script is working so far. It should run dosbox, but no conf. You can exit out of dosbox.

But, even more important: The appdata directory gets created now. There exists an appdata directory of the "normal" runs, but alas, the script pnd_run.sh does not respect the appdata path in the PXML.xml, and it also doesn't care about the "-d"-Parameter, afaik.

(I consider this a bug, but will try to delve deeper into this before I file it.) This is SuperZaxxonFinal 1.5.1 behaviour, it might change. One day pnd_run.sh might respect the xml or the -d param, and then some cleanup is due.

So atm pnd_run.sh creates a directory with the app-id, nothing else. In this case it's



Code:
/media/[NAME-OF-SD]/pandora/appdata/pickle.dosbox




There was a misunderstanding about the parameters for pnd_run.sh, therefore above part is stricken. You should have an appdata directory:



Code:
/media/[NAME-OF-SD]/pandora/appdata/dosbox



2. So you go there now and create a conf. My conf example is one for the Norton Commander and named nc.conf.

Just take one conf and modify it to your liking. Interesting lines are:





Code:
[sdl]

...

mapperfile=pandora_basemap.txt

usescancodes=false

...

[dos]

...

keyboardlayout=none

...

[autoexec]

doskey /insert

mount C DOS_C

C:

NC\nc.exe



3. This conf refers to a file pandora_basemap.txt, which I also create here.

What I'm doing with the mapperfile is mapping the Pandora keyboard with the Dosbox keyboard (so if you use an external keyboard with the Pandora, you should definitely delete that line).

I didn't find a very usable mapper.txt for Pandora on the internet (with the one from the wiki I have to switch keyboard layout to get a colon or a backslash), so I made my own.

It's not perfect and I might continue work on this, but it's in my not very humble opinion already far better than anything available, so here she comes:




Code:
#!/bin/bash

./runbase.sh

./dosbox $*



If I haven't forgotten anything (besides the obvious: you have to adapt [NAME-OF-SD] to the the name (or label) of the SD you're having dosbox on, and of course the autoexec part of your .conf, but that's beyond the scope of this tutorial) you should be able to run your program directly now with a determined conf. Again:





Code:
/media/[NAME-OF-SD]/convenient/place/runmydosbox.sh "-conf nc.conf"


Yay! Norton commander! (And this one understands F10!)


Copy this tutorial as as you like if you keep it intact and my pandora handle (bukkit) attached to this.


If you strip my name and claim it as your work, your pandora nubs will bleed and your life will become even more miserable.


I personally owe a lot to the mentioned Pandora wiki, Pickles' Dosbox74 package, and the dosbox docs.


Other than that, hth, have fun, and play.


Edited 4.09.2012, changed the pandora_basemap. One minor error and A/B/X/Y to the defaults given by xmodmap, Home/End/Page up/Page down, which should be easier to find and modify.


Edited 05.09.2012, corrected usage of pnd_run.sh.

Code:
hand_shutdown "key 290 mod1"

hand_capmouse "key 291 mod1"

hand_fullscr "key 13 mod2"

hand_noclick "key 282 mod1"

hand_leftclick "key 283 mod1"

hand_rightclick "key 284 mod1"

hand_pause "key 19 mod2"

hand_mapper "key 282 mod1"

hand_speedlock "key 293 mod2"

hand_recwave "key 287 mod1"

hand_caprawmidi "key 289 mod1 mod2"

hand_scrshot "key 286 mod1"

hand_video "key 286 mod1 mod2"

hand_decfskip "key 288 mod1"

hand_incfskip "key 289 mod1"

hand_cycledown "key 292 mod1"

hand_cycleup "key 293 mod1"

hand_caprawopl "key 288 mod1 mod2"

hand_swapimg "key 285 mod1"

key_esc "key 27"

key_f1 "key 282"

key_f2 "key 283"

key_f3 "key 284"

key_f4 "key 285"

key_f5 "key 286"

key_f6 "key 287"

key_f7 "key 288"

key_f8 "key 289"

key_f9 "key 290"

key_f10 "key 291"

key_f11 "key 292"

key_f12 "key 293"

key_grave "key 96"

key_1 "key 49" "key 33"

key_2 "key 50" "key 64"

key_3 "key 51" "key 35"

key_4 "key 52" "key 36"

key_5 "key 53"

key_6 "key 54"

key_7 "key 55"

key_8 "key 56"

key_9 "key 57" "key 40"

key_0 "key 48" "key 41"

key_minus "key 45" "key 95"

key_equals "key 61" "key 43"

key_bspace "key 8"

key_tab "key 9"

key_q "key 113"

key_w "key 119"

key_e "key 101"

key_r "key 114"

key_t "key 116"

key_y "key 121"

key_u "key 117"

key_i "key 105"

key_o "key 111"

key_p "key 112"

key_lbracket "key 40"

key_rbracket "key 41"

key_enter "key 13"

key_capslock "key 301"

key_a "key 97"

key_s "key 115"

key_d "key 100"

key_f "key 102"

key_g "key 103"

key_h "key 104"

key_j "key 106"

key_k "key 107"

key_l "key 108"

key_semicolon "key 59" "key 58"

key_quote "key 39" "key 34"

key_backslash "key 92" "key 124"

key_lshift "key 304"

key_lessthan

key_z "key 122"

key_x "key 120"

key_c "key 99"

key_v "key 118"

key_b "key 98"

key_n "key 110"

key_m "key 109"

key_comma "key 44"

key_period "key 46"

key_slash "key 47" "key 63"

key_rshift "key 303"

key_lctrl "key 306"

key_lalt "key 308"

key_space "key 32"

key_ralt "key 307"

key_rctrl "key 305"

key_printscreen "key 316"

key_scrolllock "key 302"

key_pause "key 19"

key_insert "key 277"

key_home "key 278"

key_pageup "key 280"

key_delete "key 127"

key_end "key 279"

key_pagedown "key 281"

key_up "key 273"

key_left "key 276"

key_down "key 274"

key_right "key 275"

key_numlock "key 300"

key_kp_divide "key 267"

key_kp_multiply "key 268"

key_kp_minus "key 269"

key_kp_7 "key 263"

key_kp_8 "key 264"

key_kp_9 "key 265"

key_kp_plus "key 270"

key_kp_4 "key 260"

key_kp_5 "key 261"

key_kp_6 "key 262"

key_kp_1 "key 257"

key_kp_2 "key 258"

key_kp_3 "key 259"

key_kp_enter "key 271"

key_kp_0 "key 256"

key_kp_period "key 266"

jbutton_0_0 "stick_0 button 0"

jbutton_0_1 "stick_0 button 1"

jaxis_0_1- "stick_0 axis 1 0"

jaxis_0_1+ "stick_0 axis 1 1"

jaxis_0_0- "stick_0 axis 0 0"

jaxis_0_0+ "stick_0 axis 0 1"

jbutton_0_2 "stick_0 button 2"

jbutton_0_3 "stick_0 button 3"

jbutton_1_0

jbutton_1_1

jaxis_0_2- "stick_0 axis 2 0"

jaxis_0_2+ "stick_0 axis 2 1"

jaxis_0_3- "stick_0 axis 3 0"

jaxis_0_3+ "stick_0 axis 3 1"

jaxis_1_0-

jaxis_1_0+

jaxis_1_1-

jaxis_1_1+

jbutton_0_4 "stick_0 button 4"

jbutton_0_5 "stick_0 button 5"

jhat_0_0_0 "stick_0 hat 0 1"

jhat_0_0_3 "stick_0 hat 0 8"

jhat_0_0_2 "stick_0 hat 0 4"

jhat_0_0_1 "stick_0 hat 0 2"

mod_1 "key 305" "key 306"

mod_2 "key 307" "key 308"

mod_3

One can argue about several decisions. For example, one cannot change the shift values independent of the normal values. And I don't know who of the developers decided what the shift values of the number keys were (if anyone knows if that Pandora layout is copied from an existing layout, please tell me).

The only way would be writing a dos keyboard layout for that. Interesting, but I probably won't have time for that.

So only some of the values above the numbers will work. You will find most of the Fn-values, though (if Fn-key doesn't work, try Shift + Fn, key). I give you an example:

You need a semicolon in the DOSbox. You type Fn, comma. Fantastic, a semicolon. Now you need a colon. You type Fn, period. Well, again a semicolon. You remember trying shift: You type Shift + Fn, period. Done: A colon.

Yes, both Fn keys are mapped to the same dosbox key. I wanted you to find the value without you having to know that the colon is the shifted semicolon on a standard US keyboard.

Some keys are admittedly hard to find. Tilde, for example, is Fn-shifted on the H (shifted backtick). If you find an elegant solution to that, tell me.

And the brackets are quite mixed up. You find brackets on 9/0, but they're the round ones. So I put the curly and the rectangular brackets on the Fn-E and Fn-R. *Both*. You'll have to delete what disturbs you. Again, if you find a more elegant solution to that, tell me.

And you'll probably want change the A/B/X/Y keys often. (My setup is A-shift, B-Ctrl, Y-up, X-down, I believe.) For this, I refer you to http://pandorawiki.o...o_A.2FB.2FX.2FY .



Alright, enough of that. Try it out and make it better.




4. Still in the appdata directory (/media/[NAME-OF-SD]/pandora/appdata/pickle.dosbox) we need a file rundosbox.sh.

Here you have no choice about name or location. It's the file overlayed over the one in the .pnd, which doesn't transport parameters to the executable.

Looks like this:
 
Last edited by a moderator:
well seems like a lot of work to run a specific conf.


My typical usage goes like so, there are 2 ways to run dosbox. The first is direct using the shortcut only labeled as dosbox. In the appdata folder once the pnd is run once there will be a folder .dosbox. It will have a default conf in it. If i need to do some manual work like an install or any one time job I use this conf.


If I want to run anything on a regular basis with the same conf I use the dosbox with dboxfe. The gui itself isnt the greatest for conf configuration, but it works well as a launcher. For creating a new conf one can either start one with the gui or manually create one. The manual way requires the profile.xml to be manually editied with the conf name so that it shows in the list.


Once i have a conf ready and showing in the gui I usually edit it outside in mousepad. I make any changes and save. In the gui click on another entry and then back on the one changed to refresh the changes. Then just launch


But be careful not to save the conf in the gui, cause if changes are made that are not recognized by dboxfe it will overwrite them with 'valid' ones. One example is the mapper, anything other then mapper.txt will be replaced.
 
well seems like a lot of work to run a specific conf.

Maybe, yes. And I had definitely preferred not to have needed to work that either. It looks like the only way to me, however.

My typical usage goes like so, there are 2 ways to run dosbox. The first is direct using the shortcut only labeled as dosbox. In the appdata folder once the pnd is run once there will be a folder .dosbox. It will have a default conf in it. If i need to do some manual work like an install or any one time job I use this conf.

Mine had two from the start, and I never found out which one was used. And there's a second directory, .dboxfe, which gets used with dboxfe. Another default conf there. If I want to put in a fourth conf, my conf, and have that being used, that's already too many possibilities and modes of fail for my taste.

If I want to run anything on a regular basis with the same conf I use the dosbox with dboxfe. The gui itself isnt the greatest for conf configuration, but it works well as a launcher. For creating a new conf one can either start one with the gui or manually create one. The manual way requires the profile.xml to be manually editied with the conf name so that it shows in the list.
Once i have a conf ready and showing in the gui I usually edit it outside in mousepad. I make any changes and save. In the gui click on another entry and then back on the one changed to refresh the changes. Then just launch


But be careful not to save the conf in the gui, cause if changes are made that are not recognized by dboxfe it will overwrite them with 'valid' ones. One example is the mapper, anything other then mapper.txt will be replaced.

That was the way I tried first, but I found that dboxfe was clobbering my conf everytime I used it. And I wasn't saving, I used it purely as a launcher. That made me wish to have dboxfe as far out of the way as possible. And I'll probably never touch it again. (An application is entitled to complain, but never to destroy my work. It's a principle.) With dboxfe out of the picture, I was unable to launch a specific conf. And that got me here.


I think your remark about the mapper.txt (didn't know that blunder) is another reason I'll continue to need this. I'll definitely want to start dosboxes with different pad, joystick and keyboard configurations without having to remap keys on every start.


In conclusion: I won't need much of this once


- a. dosbox pnd transfers parameters


- b. run_pnd.sh respects application directories


- c. dboxfe respects conf files and parameters


but even then, there might be helpful background info in this howto which is transferrable to other parts of Pandora work, knowledge I had to earn the hard way, and a decent mapper.txt solving 90% of the problems with the Pandora keyboard in Dosbox posted in these forums. So, yeah, much work, but it definitely paid in my opinion.
 
well if you think you have a mapper.txt that fixes problems with the default and enables the most key presses for the pandora I will use it in the pnd for the next update.


I had planned for an update since i added the sdl hw scaling and it does help
 
You're of course very welcome to do so. I'd just like if you gave it a try first and see if you could live with the explained compromises. I also offer to implement changes, if you couldn't. If you'd also modify the rundosbox.sh with "./dosbox $*", that would moot quite a lot of my points.


(I'm also experimenting with an alternative keyboard driver. I'd really love the keyboard mapping to be as good as can be.)
 
Back
Top