•The Treasure Box


A whole bunch of stuff that I've slowly gathered over my time hacking EB.

Tools, documentation, scripts... Things by me, things by other people...

Here it all is.

(If you're less kind, then call it "The Dump".)


Original EarthBound script

The EB devs wrote the game script in a format they called "MSG" which probably stands for "Message" and not "Monosodium glutamate".

In 2021, localization development files were recovered, including an almost-complete dump of the game script!

It contains comments (mostly in Japanese) and labels which could make it a more useful script reference. Plus it's cool.

Also, Catador's list of the commands in the MSG format compared to CCScript equivalents.

BPM calculator

This Python script turns a BPM value into the tempo byte that EBMusEd takes. I don't recall who made this.

How to expand tables

JTolmar wrote this little step-by-step guide on how to expand any standard table you like via CCScript. Here it is:

  • find every reference to the table (just search its name on ebsrc) https://github.com/Herringway/ebsrc/search?q=SCREEN_TRANSITION_CONFIG_TABLE
  • find the addresses of those references to it for each address:
  • if it's a whole address in one spot (rare), do ROM[address of table reference] = { long MyExpandedTable }
  • if it's broken up into two, ROM[address of high bytes] = { short[0] MyExpandedTable } and ROM[address of low bytes] = { short[1] MyExpandedTable }
  • the usual way EB loads pointers is already a macro in asm65816 - ASMLoadAddress06() (find the start of the inevitable LDA const STA $06 LDA const STA $08 in the asm, ROM[start of that] = { ASMLoadAddress06(MyExpandedTable) }. ebsrc also has a macro for this, so you'll just see LOADPTR const instead of LDA const STA $06 LDA const STA $08

Instrument packs list

Sprite groups spreadsheet

ebsrc to listing

Coops's converter of ebsrc code to a bunch of text files. The bonus is that the address of every single line is included, which makes it a very useful reference for ASM hacks.

Debug symbol generator

Takes a CCScript-outputted summary.txt and creates a file of debug symbols that Mesen can read. Run it as the last step of your build scripts.

Unique Tile Finder

This program looks at an image and tells you how many unique tiles there are, and where they are. Use it to reduce the amount of unique tiles before running png2fts.

More to come