annagrace.blogg.se

Earthbound supercollider
Earthbound supercollider





earthbound supercollider

earthbound supercollider

Each chunk contains one of: a song, some instruments, some samples, or a sample pointer table. After the chunk of data is either another chunk with the same type of header (which may be followed by another chunk, and so on), or 0000, which marks the end of the pack. The first word of the header is the length of the data (not including this header information), and the second word is the address in SPC RAM to load the chunk into. Each pack is further divided into one or more sub-chunks with the a four-byte header. There are 169 (9A) entries the first entry is pack 00. The packs themselves are located at 4FB47. Each entry simply has three bytes indicating the pack number FF is a dummy value to mean a pack should not be loaded. Similarly, the last song is actually song C0, although it is entry BF in the table. Song 00 does not point to an actual song, and its space in the table is probably used by the preceding data chunk. The first entry in the table is song 01, not song 00 (i.e., the table is indexed as if it began at 4F908). The table showing which song is related to which pack is located at 4F90A. Each song has up to three packs associated with it. The game loads chunks, or "packs", of data from the ROM into SPC RAM.

EARTHBOUND SUPERCOLLIDER CODE

Finally, 0500-468A (loaded in from pack 1, but never swapped out) contains the music-playing code as well as a few short songs. The starting offset of a song is much more arbitrary, ranging from 2FDD-6400 depending on the song the address of a particular song in SPC RAM can be found via the Song SPC Pointer Table. Important locations here are 6C00, which is where sample pointers are loaded, 7000, where sample data is loaded, and 6E00, where instruments are loaded. SPC files are nothing more than a straightforward dump of SPC RAM with a 256-byte header attached (and a footer with state information that doesn't concern us here), so you can easily convert a RAM offset to an SPC file offset by adding 0x100 for the header. This RAM contains all the song data, the instrument data, the sample data, and even the music playback code itself. As with all SNES games, audio data must be loaded into the SPC700's RAM before it can be played.







Earthbound supercollider