DOSPad Documentation

This document describes some key features in dospad. It is not yet a complete documentation, obviously.

External bluetooth keyboard

Once you have the wireless keyboard connected, you can start typing in DOSpad. However, you may notice that keys like ESC, F1, ..., F12, CTRL, ALT, are not supported. That is because we can not access key event in iOS in a traditional way. We hope apple will provide deeper keyboard API in future, so we can have a full functional keyboard then. And don't expect to use external keyboard in action games like wolf3d, it is laggy for such purposes. But it should work very well for text-based games. Fortunately, for action games, virtual gamepad/joystick will give you much better experience.

Good news is you can use arrow keys, backspace.

Tested with apple wireless keyboard.

Virtual Gamepad/Joystick

Gamepad has a D-pad and six buttons. D-pad is mapped to arrow keys, and six buttons are mapped to ordinary keys, which you can customize.

Virtual Gamepad

Joystick has a 8-direction stick and six buttons. However, only Button 0 and 1 are mapped to joystick button. The rest are mapped to ordinary keys. You will have to calibrate joystick same way as if you were using a physical one. otherwise it is not functioning.

Virtual Joystick

In fact (or I can say in code), gamepad and joystick are one thing; they are just different working modes. By default, the working mode is gamepad, and it requires zero setup. Joystick needs set up in game, so that's why we don't use it as default option. Usually you can switch mode freely, but in some games, once you use joystick as control scheme, the arrow keys may not work. So gamepad and joystick may not work at the same time. But don't call it a bug in DOSPad.

DOSPad automatically turns into fullscreen mode when you rotate to landscape. In this way, gamepad will act as transparent overlay. You can define the transparency in option settings.

gamepad-landscape-demo.jpg

Customize key mapping of gamepad buttons

You can define keymapping of gamepad in dospad.cfg. The default settings look like:

[gamepad.keybinding]
button0=CTRL,CTRL
button1=ALT,ALT
button2=SPC,SPACE
button3=ENTR,ENTER
button4=ESC,ESC
button5=F1,F1

Key Binding Format:

   button<index>=<title>,<keyname>

title is shown on the button; keyname will be mapped to scancode. Note that button0 is reserved for fire action, with special icon, so the title is not actually used.

Valid Keynames(case sensitive):

     ESC, F1, ..., F12
     `, 0, 1, ..., 9, -, =, BACKSPACE,
     TAB, A, B, ..., Z, [,],\
     CAPS, ;, ', ENTER, SHIFT, RSHIFT, COMMA, ., /
     CTRL, ALT, SPACE, LEFT, DOWN, UP, RIGHT,
     INS, HOME, PGUP, PGDN, DEL, END, RCTRL, RALT

You can include mulitple keybinding sections, for example, gamepad.keybinding.mario, gamepad.keybinding.wolf3d. Only section with the name `gamepad.keybinding' is actually used. The rest will not be used unless they are renamed to it.

Customize gamepad button positions

You can also define gamepad overlay layout in dospad.cfg. If you do not define anything, the following config will be used:

[gamepad.iphone.landscape]
frame=0,0,480,300
floating=1
dpad=15,180,130,130
button0=400,170,70,70
button1=400,240,70,70
button2=320,170,70,70
button3=320,240,70,70
button4=20,120,54,54
button5=90,120,54,54

[gamepad.ipad.landscape]
frame=0,400,1024,368
floating=1
dpad=15,80,180,180
button0=918,0,80,80
button1=918,90,80,80
button2=828,0,80,80
button3=828,90,80,80
button4=40,10,60,60
button5=110,10,60,60

frame defines the gamepad bounding box, it is relative to the iphone(480x320)/ipad screen(1024x768).

frame=x,y,width,height

dpad defines where the dpad goes, it is relative to the gamepad box.

 dpad=x,y,width,height

button0 to button5 defines the button positions. You can comment out a button using character '#' to hide it.

button<index>=x,y,width,height

A secret: you can define up to button9 actually, of course, you have to define keybinding for it, otherwise it is dumb button.

DO NOT customize portrait mode layout.

Index