# Red Planet 4.12.7 — Handbook

Fly
  Num 8 2 4 6stick · 7/9 pedals · 0 fires
Throttle
  Shift / Ctrlwalks up or down, holds where you leave it
Reverse
  Altthe throttle button on the pod stick
Abort
  Alt + Qends your mission, score banked

## Gamepad

An Xbox-compatible pad drives all five axes and the grip buttons. Hover or tap a control for its RIO address.

Select a control Hover the diagram to read its binding.

## Keyboard

Colour is the bank each key drives: green flies the pod, red is an MFD button bank, amber is a column beside the map. Dark keys are unbound and free to take.

flight & stick MFD button banks secondary / screen columns unbound
Select a key Hover a key to read what it drives.

ALT + Q aborts the mission on the spot — score banked, back to the menu or lobby. It is the only chord the engine listens for; the arrow keys are safe.

## Where the keys live on the panel

Each MFD carries eight buttons: a four-wide top row and a four-wide row beneath it. The keyboard rows run left to right across the upper MFDs, then the lower pair — the same order your hand finds them in the pod.

1234
Upper Left 0x2F – 0x2C
0x2B – 0x28
QWER
5678
Upper Middle 0x27 – 0x24
0x23 – 0x20
TYUI
90-=
Upper Right 0x37 – 0x34
0x33 – 0x30
OP[]
ASDF
Lower Left 0x0F – 0x0C
0x0B – 0x08
ZXCV
F1F2F3F4F5F6
Map · radar Secondary 0x10 – 0x15
Screen 0x18 – 0x1D
F7F8F9F10F11F12
HJKL
Lower Right 0x07 – 0x04
0x03 – 0x00
NM,.

G and B stay unbound on purpose: they are the physical gap between the lower clusters. Every button here is also a mouse target on screen — see The mouse below — and lights when the game commands its lamp.

## The pod stick

What the gamepad stands in for. This is the cockpit's own TRIGGER STATUS readout — four buttons on the grip, drawn the way the upper-right MFD draws them. Hover one for its address and its stand-ins.

Trigger Status

Grip buttons
Upper | 0x47 | Y
Main | 0x40 | A · Space · Num 0
Middle | 0x46 | B
Pinky | 0x45 | X
Throttle | 0x3F | RB · Alt
Panic | 0x3D | LB
Hat | 0x41–44 | D-pad · arrows
Config 1 · 2 | 0x37 · 0x36 | unbound — yours to map

The throttle button is reverse thrust; the hat looks around. Both live off the grip on the real stick.

Select a button Hover a circle on the grip.
Stick — attitude Pitch, roll and yaw. Left stick on the pad, Num 8 2 4 6 on the keyboard.
Throttle — travel Forward and reverse. Right stick Y on the pad, Shift / Ctrl on the keyboard; it holds where you leave it.

Both plates are the pod's own instruction art, lifted from the shipped gauge assets.

## The mouse

The third input. Every button on every display is clickable and lights when the game commands its lamp — and each one reaches in under the glass beside it, so the picture is the press target. The lit strip at the edge is only the lamp.

press — top row press — bottom row
One MFD. Four buttons above the glass and four below, each 240px deep against a 480px pane — so the two banks meet in the middle and the whole face answers the mouse. Only 10px of each clears the edge to show its lamp.

### Arranging the glass

The pod bolted its displays down at one size. On a desktop panel there is room to trade viewscreen for instrument, so all six are yours to size — and the radar to place. Set these in `environ.ini` beside the exe; they are read once at startup.

CENTERas the pod had it
LEFTbottom corner; the MFD slides inboard
RIGHTthe same, other side
MIDLEFThalfway up; leaves the bottom row alone
MIDRIGHThalfway up, right

environ.ini — display layout
L4MFDSCALE | All five MFDs, as a percentage of pod size. 25–200, default 100
L4MFDSCALE_xx | Any one on its own — UL UC UR LL LR. Unset inherits the line above.
L4RADARSCALE | The radar alone. It already sits at 1.35× the MFDs.
L4RADARPOS | CENTER · LEFT · RIGHT · MIDLEFT · MIDRIGHT

Ask for too much and the layout wins. Panes are clamped against their actual neighbours and shrink evenly, so nothing overlaps and nothing comes out stretched. Scale the MFDs beside the radar and it is the radar that gives way — halfway up a side it has one above and one below, and it grows from the middle both ways.

### Filling the screen

The cockpit fits itself to whatever window it gets and keeps 16:9, so a wide panel letterboxes rather than stretching. Launch with `-fit` — `start-fullscreen.bat` — and it goes borderless over the whole monitor and picks the render size to land on the viewscreen 1:1, instead of you guessing at `-res`.

## Bring your own stick

A gamepad speaks XInput, and the game reads it without being asked. Everything else — a flight stick, a HOTAS throttle, a twist grip, rudder pedals, a wheel — speaks DirectInput, which names its axes X Y Z RX RY RZ SL0 SL1 and says nothing about what they are for. Somebody has to decide that your twist grip is the rudder and that pushing it right means right. That is what `joyconfig.bat` is.

Run it once
  joyconfig.batbeside the exe; re-run any time
It asks
  Move that onesteer · pitch · pedals · throttle · buttons
It watches
  Which waythe direction you moved sets the sign
Then
  Straight inthe game carries on to the setup screen

The direction is the whole point. A stick that reads positive pushed right and one that reads negative are equally common, and nothing printed on the box tells you which you own. So the wizard does not ask you to know — it asks you to move, and reads the answer off the movement. Skip a prompt with `SPACE` if you have no such control, `ESC` to abort without writing.

It writes only its own section of `bindings.txt`, between two marker lines, so anything you have written yourself is kept — including a deadzone you tuned by hand after trying it. Before it starts it prints every axis at rest: a stick whose driver reports an odd range shows up there as X +1.00 on an untouched stick, rather than as a mystery later. Xbox-class pads are excluded from all of this, so nothing ever counts twice.

    # what it writes
    joydev 0 Logitech Extreme 3D
    joyaxis X   axis JoystickX invert deadzone 0.08
    joyaxis Y   axis JoystickY deadzone 0.08
    joyaxis RZ  axis Pedals deadzone 0.08
    joyaxis SL0 axis Throttle invert deadzone 0
    joybutton 0 button 0x40
    joyhat 0 up button 0x42

    # grammar
    joydev <slot>    [product-name substring]
    joyaxis <src>   axis <axis> [invert]
                        [deadzone <d>] [rate <n>]
    joybutton <n>   button <addr> [toggle]
    joyhat <n> <up|down|left|right>
                        button <addr>

    # a named slot binds that product; a bare
    # one binds the Nth stick Windows lists

Two rules the pod's shape asks for
Pedals | A signed axis that works the pedal pair — positive for the right pedal, negative for the left. The pod has one under each foot; a twist grip or rudder bar is a single control that presses one or the other and never both, which is exactly what this says. It is a channel name like any other, so a gamepad stick can drive the turn with it too.
Throttle | A joyaxis on the throttle with no rate is treated as a real lever and owns the channel: its full travel is the throttle range. Spring-centred sticks have to nudge a position instead, which is what rate does — a lever that stays where you put it needs none of that.

A twist grip is usually RZ; a HOTAS throttle is usually Z or SL0. Set `RP412JOYLOG=1` to log devices as they attach and drop away.

## Rebinding

`bindings.txt` sits beside the exe, written with the full default layout on first run. Change a line, restart. Delete the file to restore these defaults — worth doing after an update, since an existing file is never overwritten.

    # grammar
    key <name>      button <addr> [toggle]
    key <name>      axis <axis> deflect <n>
    key <name>      axis <axis> rate <n>
    pad <button>    button <addr> [toggle]
    padaxis <src>   axis <axis> [invert]
                        [deadzone <d>] [rate <n>]
    joydev joyaxis joybutton joyhat
                        see above

    # deflect springs back, rate sticks where
    # you leave it (that is the throttle)

    # examples
    key J        button 0x40      # trigger on J too
    pad X        button 0x40      # trigger on X

    key NumPadAdd      axis Throttle rate 0.75
    key NumPadSubtract axis Throttle rate -0.75

    # drop 'invert' to flip the stick
    padaxis LeftStickX axis JoystickX deadzone 0.2

Reference — axes, address space, key names
Axes | Throttle · LeftPedal · RightPedal · JoystickX · JoystickY · Pedals
Buttons | 0x00 – 0x47
Keypads | 0x50 – 0x6F — unbound by default; the game never reads them
Key names | A–Z · D0–D9 · F1–F12 · NumPad0–9 · Up Down Left Right · Space · Return · Shift · Ctrl · Alt · OemMinus · Oemplus · Oemcomma · OemPeriod
Pad | A B X Y · DPadUp/Down/Left/Right · Start · Back · LeftShoulder · RightShoulder · LeftThumb · RightThumb
Pad axes | LeftStickX/Y · RightStickX/Y · LeftTrigger · RightTrigger
Joystick axes | X · Y · Z · RX · RY · RZ · SL0 · SL1 — DirectInput's own names

## Files beside the exe

Four files in the game folder are yours. None of them ship. The game writes each one the first time it needs it and then never touches it again, so a new build dropped over this folder keeps everything you have set — and deleting any of them simply starts that part over with the current defaults.

Yours to edit
environ.ini | Every engine option, commented in place — displays, renderer, Steam, the podium, the lot. The one to read first. Written on first run; without it the MFDs do not come up at all, so the game will always put one back.
bindings.txt | Every key, pad button, axis and joystick row. Written with the full documented default layout the first time the game runs.
pilot.cfg | Your callsign and loadout, saved on the way out of the setup screen so they are there next time.
mfd_layout.cfg | Where you dragged the windows, and the `,noframe` flag. Only written when `RP412MFDLAYOUT=save`.

Two that catch people out. `environ.ini` is applied over the environment, so a variable you set in a shell loses to an uncommented line in the file — comment the line out rather than fighting it. And nothing here is ever overwritten once it exists, which is exactly what lets you keep a folder across builds — but it means a file carried through several updates stops being offered new options. The game names any it has not heard of in `rpl4.log`; delete the file to get the fully documented current one back.

### The rest of the folder

Shipped data the engine reads. Nothing here is meant to be edited, but it is worth knowing what is what.

Engine data
RPDPL.INI | Renderer and scene configuration. Named by `L4DPLCFG=`, so it can be swapped.
GAUGE\L4GAUGE.INI | Gauge canvas pages. `L4GAUGE=` picks one by name — a name that is not in here switches the MFDs off entirely.
GAUGE\L4GAUGE.CFG | The gauge layout data that page points at.
AUDIO\AUDIO.INI | Sound banks. AUDIOMR.INI is the mission-review twin.
JOYSTICK.INI | The 1995 single-stick calibration, for the legacy `L4CONTROLS=DIJOYSTICK` path only. Modern sticks are configured in `bindings.txt` — see above.
*.CFG in AUDIO\ | Pod audio-hardware mixer tables. Dead weight on a desktop; kept because the arcade path still reads them.
RPL4.RES | Resource blob, not text.
steam_appid.txt | Steam runs under Spacewar (480) until Red Planet has its own AppID.