If you have been building your game library in RetroPie odds that you grew interest in Dosbox could be substantial.
However although Dosbox is fairly easy to use in the late versions, you could be meeting issues with key typing especially if you are using an exotic keyboard (as in "not qwerty").
For instance an azerty keyboard like the one I have will be unable to send most of the special characters and worst of all won't be able to type in digits.
In some cases the handicap you will suffer from it will be light in other cases it will make a game unplayable.
If you check in /home/pi/.dosbox/dosbox-SVN.conf, you will notice that there is a keyboard layout entry in it. At this point it will not solve your case. Keyboard layout entry will only rearrange known keyboard keys. It will not make unknown keys known. For this, you have to use Dosbox keyboard mapper.
Happy path
- Make sure you have a valid mapper-SVN.map in that directory. You can download one there: http://dosonthepi.blogspot.com/2015/02/dosbox-configuration-for-individual.html
- Check the link above the title "In summary" in the article.
- Make sure your dosbox-SVN.conf uses that mapper:
[sdl]
ullscreen = true
fulldouble = false
...
mapperfile = /home/pi/.dosbox/mapper-SVN.map
usescancodes = false
...
- Using absolute path for mapper-SVN.map will ensure that it will keep being used if you fork your dosbox-SVN.conf to a local game directory.
- Start Dosbox from RetroPie
- If you read carefully, you will notice that Dosbox welcome screen tells you how to summon the mapper (CTRL+F1). Start it. It will look like that:
The dosbox key mapper |
- The safest way to configure your keyboard is to remove all the key bindings and redo them all. Most mapper-SVN.map are made for UK or US keyboards. Depending on how many keys in common your local keyboard has with UK/US keyboard, you will have to do more or less bindings. If you are unsure, remove all and redo all:
- To remove a key click on that key on the mapper then click on "Del" at the bottom-right of the mapper screen.
- Reclick on that key then, click on add then, press a key.
- Do a test with escape key to check if it works.
- If it works, do the same with F1, F2... until all keys are rebound.
- When remapping keys you have to remap keys according to the position on your keyboard and not according to what you see written on the key. (Examples: Q on Dosbox mapper will map to A on azerty french keyboard. Y on Dosbox mapper will map to Z on qwertz german keyboard)
- If you have an azerty keyboard you can follow my map hereafter. You will only need to rebind the keys in red squares:
Only the keys in red square must be remapped on azerty keyboard |
- Once the keys are mapped click on "Save" and then "Exit"
- exit dosbox
- Edit /home/pi/dosbox-SVN.conf
- replace keyboardlayout = auto according to your country locale
- keyboardlayout = fr
- keyboardlayout = de
- keyboardlayout = (your country locale)
Troubleshooting - unknown keys
- Try-and-error switch keyboard layouts in raspi-config
- Choose one key over the others. In the above case we will choose the key "6" and unbind Caps Lock, ² and ".
- Caps Lock is rarely needed and you can use shift.
- ² and " can be entered with ascii codes
- To type in ascii codes you will need digits so you will need 6. This is one of the reasons why it is mandatory to keep digits usable
- If you need another key in another game you can save another mapper-SVN.map file and choose for example to bind Caps Lock instead of 6
- If you have a game that needs all your unknown keys you should maybe consider using rpix86 or Wine for that specific game
After all this, your keyboard should now work much better in Dosbox. The good news is that you only have to do it once!
The pi gamer
No comments:
Post a Comment