Skip to content

RetroSub Format

eadmaster edited this page Nov 24, 2025 · 15 revisions

Only the tables inside the markdown files are parsed, all the rest is ignored and can be used for comments.

You can use headers to organize the document in sections (e.g. title screen, options screen, dialogues, etc.).

The tables are only required to have these columns, in any order:

  • region (string) : name of the memory region to hash (game-dependent)
  • start (hex string) : start address of the memory region to hash (game-dependent)
  • len (hex string) : length of the memory region to hash (game-dependent)
  • hash (hex string) : SHA-1 hash of the memory region associated with the text to render
  • text (string) : text to render. Supported tags:
    • <br> = newline
    • <clear> = forced text clear (useful for stuck text)
    • <sleep> = sleep after current line for 1s (useful for fast-scrolling text)

Tip

To speedup the lua script, try to reuse the same (region, start, len) tuple in multiple rows.

Tip

Use the RetroSubs_maker script for easier tables creation.

Optional

Textbox customization

Columns to customize the text appearence:

  • x_pos (int) : X coord of rendered textbox position
  • y_pos (int) : Y coord of rendered textbox position
  • width_box (int) : width of the rendered text box (default to 0 = invisible if missing)
  • height_box (int) : height of the rendered text box (default to 0 = invisible if missing)
  • font_size : font size in pixels (default to 12 if missing)
  • fg_color (hex string, format AARRGGBB) : foreground color (default to FF000000 = black if missing)
  • bg_color (hex string, format AARRGGBB) : background color (default to FFFFFFFF = white if missing)

Embedded scripts

Embedded lua scripts can be used to patch the memory or the ROM at loading time (executed only once). Example:

```lua
-- comment
memory.write_bytes_as_array(0x000197FB, {string.byte('ITEMS',1,5)}, "ROM")
memory.write_bytes_as_array(0x00019802, {string.byte('SKIL',1,4)}, "ROM")
```

All BizHawk API can be used inside this block.

Clone this wiki locally