Jump to content
LaunchBox Community Forums

Key bindings in DosBox games


ThomasOEM

Recommended Posts

Hi everybody

I have been avoiding this problem for years, but now I want to try and figure it out. 🙂

I would like to play Commander Keen on my arcade machine. But with all the old games you have to push Y when it asks if you are sure you want to quit the game etc.

What is the best way to make these games playable on my arcade setup where the buttons are preconfigured to my keyboard encoder to "other" keys on the keyboard?

 hope you understand my question.

/Thomas

Link to comment
Share on other sites

  • 3 months later...

Disclaimer.  I'm new to LaunchBox, RetroArch, DOSBox, DOSBox Pure and Number Munchers.  There's a LOT I don't know about all of these systems, so there's a good chance I got something wrong or am unaware of something that would be much better than my solution.  However, since you haven't gotten any other replies yet I'll describe how I solved this problem.

If I understand your post correctly, I think I had the same challenge as you.  I have an arcade cabinet that uses an Ultimarc I-PAC to run its control panel.  The end result is that my control panel (joysticks, buttons, etc.) appear as a keyboard to Windows.  With my specific setup my player 1 controls look like this:
    Joystick = up/down/left/right arrows
    Button 1 = 7
    Button 2 = h
I.e. when I press button 1 Windows sees "7", when I press button 2 Windows sees "h".

My goal is to impress my wife by getting her favorite childhood DOS edutainment game "Number Munchers" to work on my arcade cabinet.

Based on this video it looks like using RetroArch with DOSBox Pure is the easiest/best way to run DOS games in LaunchBox, so this is how I first got Number Munchers running.  After following the video's DOSBox Pure set up instructions, however, I did have one problem, I got an "EXE not found" error when I tried to run "Number Munchers".  This was easily resolved based on the tip here:

  1.   Go to "Tools->Manage->Emulators"
  2.   Edit "RetroArch"
  3.   In "Associated Platforms" go down to "MS-DOS", uncheck "Extract ROMs" then click the "OK" button

After making that change when when launching Number Munchers the first time I selected "NM.EXE" then pressed the right arrow to make NM.EXE run automatically when I launch Number Munchers.

At this point, life is pretty good.  I'm munching numbers with the best of them by using my real keyboard.  However, I wanted to use my arcade control panel to play, not my real keyboard.  With Number Munchers you use the arrow keys to move (which already matches my joystick), so movement wasn't a problem.  However, you also need to use SPACE as your action button to munch numbers and ENTER to make menu selections and pause the game.  Therefore, when playing Number Munchers I want to map 7 (button 1) to SPACE and h (button 2) to ENTER.  I could not find a way to do this with DOSBox Pure/RetroArch, so I ended up removing Number Munchers from LaunchBox and going back to using LaunchBox's native MS-DOS importer (which uses old school DOSBox 0.74).  The older/legacy version of DOSBox contains virtual keyboard that makes it easy (although I wouldn't call it intuitive) to remap one keyboard key to another.

Without further ado, below are my notes on getting Number Munchers working in LaunchBox with DOSBox 0.74 with remapped keyboard controls.  Hopefully they can help someone else solve their keyboard remapping challenge (or better yet someone will reply with a better way to solve this :).

[My legacy DOSBox Number Munchers install instructions with LaunchBox 12.10]
Extract the Number Munchers zip file to:
    C:\LaunchBox\Games\MS-DOS\NumbMunc
    //Having a space in the path name might cause an issue (I'm sure I could solve it, but it's just easier to avoid the problem)
-In LaunchBox go to "Tools->Import->MS-DOS"
-Select as your games directory:
    C:\LaunchBox\Games\MS-DOS\
-Use the files in their current location
-On the last screen before you import, change the game name to "Number Munchers" (if it's not set correctly already)
    -I.e. double click on its name and type in "Number Munchers"
-Continue on with my [My instructions to create custom key mappings (mapper file) for Number Muncher] section below

 

[My instructions to create custom key mappings (mapper file) for Number Muncher]
//Follow these instructions to create a custom mapper file so I can use my control panel to play Number Munchers
-Make a backup of the default DOSBox mapper file (not required)
    -Go to:    C:\LaunchBox\ThirdParty\DOSBox
    -Copy:    mapper-0.74.map
    -to:    mapper-0.74.map.default.txt
-Within LaunchBox right click on a DOSBox game and select "Open DOSBox"
    -You could also just run the game, but this allows you to get to a command prompt to test out your changes
-Press CTRL+F1 to bring up the virtual keyboard
-Configure 7 to send SPACE:
    //Add the SPACE binding
    -Click on the virtual SPACE key
    -Click "Add" button
    -Press 7 on your real keyboard
    //At this point pressing 7 on your real keyboard will send both SPACE and 7, so we need to delete 7's binding to 7 (so it only sends SPACE)
    -Click on the virtual 7 key
    -Click the "Del" button
-Configure H to send ENTER:
    //Add the ENTER binding
    -Click on the virtual ENTER key
    -Click "Add" button
    -Press H on your real keyboard
    //At this point pressing H on your real keyboard will send both ENTER and H, so we need to delete H's binding to H (so it only sends ENTER)
    -Click on the virtual H key
    -Click the "Del" button
-Click the "Save" button
-Click the "Exit" button
-Back at the command prompt test pressing your 7 and H keys, they should send SPACE and ENTER respectively
-Type 'exit' to exit DOSBox
-Move the custom mapper file
    -Move:    C:\LaunchBox\ThirdParty\DOSBox\mapper-0.74.map
    -To:    C:\LaunchBox\Games\MS-DOS\NumbMunc
    -Rename it to:    mapper-0.74.nm.map
//Note you don't need to restore the default DOSBox mapper file, you can always recreate it by CTRL-F1 to bring up the virtual keyboard and just click the "Save" button
-Create a custom DOXBox    config file that calls our new mapper file:
    -In LaunchBox edit Number Munchers, go to "Launching->DOSBox"
    -To the right of "Custom DOSBox Configuration File" click the "Create" button
    -Name the file "dosbox.nm.conf"
    -Click the "OK" button
    -Edit:    C:\LaunchBox\Games\MS-DOS\NumbMunc\dosbox.nm.conf
    -Change: mapperfile=mapper-0.74.map
    -To:     mapperfile=mapper-0.74.nm.map


That's it.  When I play Number Munchers it uses my custom dosbox.nm.conf and mapperfile to remap my buttons 1 and 2 to the correct keys.  I'm now living the dream of playing Number Munchers on a full size arcade cabinet control panel.

So other pages that I found helpful:

[Mapper - DOSBoxWiki]
https://www.dosbox.com/wiki/Mapper

[LaunchBox Tutorials - DOSBox Configuration and Imports - YouTube]
https://www.youtube.com/watch?v=sy5dFLqlmp8

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...