Magic Pockets Configuration Format
Magic Pockets stores hardware and control settings in pockets.ini. It is an uncompressed positional text file, despite its INI extension. There are no bracketed sections or key/value assignments.
File format
The supplied file has ten CR LF-terminated lines:
| Line | Example | Meaning |
|---|---|---|
| 1 | Beeper | Sound selector |
| 2 | Colour VGA | Graphics selector |
| 3 | Keyboard | Control method |
| 4 | D | Not established; matches the installer script's id value |
| 5 | 5 | Not established |
| 6 | 18,432 Up Arrow | Up: DOS key code 18432 (0x4800) |
| 7 | 20,480 Down Arrow | Down: DOS key code 20480 (0x5000) |
| 8 | 19,200 Left Arrow | Left: DOS key code 19200 (0x4B00) |
| 9 | 19,712 Right Arrow | Right: DOS key code 19712 (0x4D00) |
| 10 | 14,624 Space | Fire: DOS key code 14624 (0x3920) |
The final five lines are control bindings, in Up, Down, Left, Right, Fire order. In the checked sample the decimal code is displayed with a thousands comma and a readable key name. A DOS key code combines the scan code in the high byte and the ASCII code in the low byte. The example arrow bindings have a zero ASCII byte; the space binding has ASCII 0x20.
The precise grammar accepted by the original text reader, and the meanings of lines 4 and 5, are not fully specified by the current RE notes. Preserve those lines when editing an existing installation. The older memory-map note locating key bindings on lines 4-8 does not match the checked ten-line file.
Sound devices
The consumer uses the first character of the sound-name line:
| First character | Device | Known relationship |
|---|---|---|
| A | AdLib | player.pin with adlib.pin on the verified GAMEU path |
| R | Roland | Roland sound path and banks |
| S | Sound Blaster-compatible | GAMEU reaches the same AdLib bank loading path analysed in pin-sound.md |
| B | Beeper | PC speaker driver |
| T | Tandy | Tandy driver |
Graphics modes
The game stores the first character of line 2 as its video selector. The M selector is converted to C by GAMEU's configuration parser. The supplied value Colour VGA therefore selects C. The launcher has its own mapping from selector letters to the logo program's mode digits; it is separate from this INI file's text layout.
Controls
Line 3 selects joystick mode for J, otherwise the keyboard path. Key bindings initialise the executable's scancode-to-action table at CS:1E27. Demo tapes store the resulting action bits rather than DOS key codes.
Source code
From re-magicpockets, the open-source browser port and reverse-engineering project:
- docs/memory-map.md – configuration consumer and keyboard ISR; earlier line numbering needs the correction above
- docs/formats/pin-sound.md – verified sound-loading path
- docs/launcher.md – launcher selector mapping
- web/verify/checks.js – checks against the original configuration and executable
Credits
This file format was reverse engineered by VorticonCmdr. Please credit this work in projects that use it; a link back to this wiki is appreciated.