Browser-based timeline editor for creating and editing .DAT recording files
used by the RP2040 SNES Controller Man-in-the-Middle Replay Device.
Open index.html in any modern browser. No server, no installation, no
dependencies — everything runs locally in a single HTML file.
index.html in your browser..DAT file, or start editing the default 5-second blank recording..DAT file..DAT recording file from disk..DAT file and are invisible to the RP2040 firmware..DAT file. The filename can be edited in the text field next to the Save button.A visual SNES controller that shows the button state at the current playhead position in real time. Pressed buttons are highlighted with a red overlay.
A horizontally scrollable canvas showing all 12 SNES buttons as rows. Each colored block represents a frame where that button is pressed.
Legend (left side) — Displays the button names in the order they appear on the timeline. Click a legend item to lock/unlock that button.
Canvas (right side) — The main editing area. Shows button data, selection highlights, the playhead, and second markers.
| Action | Effect |
|---|---|
| Left-click | Move playhead to that frame |
| Left-drag | Scrub playhead across frames |
| Shift+click | Extend selection to clicked frame |
| Right-click / Ctrl+click | Paint: toggle button state under cursor |
| Right-drag / Ctrl+drag | Paint across multiple frames |
| Middle-click+drag | Pan the timeline horizontally |
| Scroll wheel | Zoom in/out centered on the mouse position |
| Key | Action |
|---|---|
| Space | Play / Pause |
| Ctrl+C | Copy |
| Ctrl+X | Cut |
| Ctrl+V | Paste |
| Escape | Close overlays (About / Notes) |
Keyboard shortcuts are disabled while typing in the filename input field or the notes textarea.
Click any button name in the timeline legend to lock it. Locked buttons display a padlock icon and a reddish background in both the legend and the timeline row.
When locks are active:
Locks are reset automatically when a new file is loaded.
Click the Notes button in the toolbar to open an overlay with a text area where you can write free-form notes about the recording (game title, level, required setup, etc.).
Notes are stored as trailing metadata in the .DAT file, appended after the event data. The RP2040 firmware never reads past the event data, so the metadata is completely invisible to the device.
.DAT file containing metadata is opened.The RP2040 firmware supports a maximum of 25,000 RLE events per recording buffer. The editor enforces this limit on all operations:
The current event count is always visible in the transport bar status display.
A frame is one 16.67 ms poll cycle (1/60th of a second). An event is one RLE entry that stores a 16-bit button state and a duration (number of consecutive frames with that exact state). Holding the same combination of buttons for 120 frames produces just 1 event. Rapidly alternating states produces many events. The event count determines file size and device compatibility, not the frame count.
All .DAT files use the same binary format as the RP2040 firmware:
| Offset | Size | Content |
|---|---|---|
| 0 | 4 bytes | Magic ID: 0x53454E53 (ASCII "SNES" on little-endian) |
| 4 | 4 bytes | uint32_t event count |
| 8+ | 4 bytes each | RLE event array |
Each RLE event is 4 bytes:
uint16_t state — 16-bit SNES button state (active-low: 0 = pressed)uint16_t duration — consecutive frame count (1–65535)| Bit | Button |
|---|---|
| 0 | B |
| 1 | Y |
| 2 | Select |
| 3 | Start |
| 4 | Up |
| 5 | Down |
| 6 | Left |
| 7 | Right |
| 8 | A |
| 9 | X |
| 10 | L |
| 11 | R |
| 12–15 | Always 1 (unused) |
0xFFFF = all buttons released (idle frame).
The editor optionally appends a metadata block after the last RLE event. This block is only present when the user has entered notes.
| Offset | Size | Content |
|---|---|---|
| end of events | 4 bytes | Metadata magic: 0x4D455441 ("META" on little-endian) |
| +4 | 4 bytes | uint32_t byte length of UTF-8 text |
| +8 | N bytes | UTF-8 encoded notes string |
All values are little-endian. The firmware never reads past the declared event count, so this block is invisible to the RP2040.
Tested in modern Chromium-based browsers (Chrome, Edge) and Firefox. Requires JavaScript enabled. No external network requests are made — the tool works entirely offline.
This project is licensed under the Mozilla Public License 2.0.