EarthBound/Audio: Difference between revisions

From Data Crystal
Jump to navigation Jump to search
Line 3: Line 3:


== Song SPC Pointer Table ==
== Song SPC Pointer Table ==
This table is located at 262B8A in the ROM and contains 192 (0xC0) entries. Not all songs are loaded at the same offset in SPC RAM, so this table is used to tell where in SPC RAM the song is located. Each entry is a two-byte pointer in little-endian (LSB first) format.
This table is located at 262B8A in the ROM and contains 192 (0xC0) entries. Not all songs are loaded into the same offset in SPC RAM, so this table is used to tell where in SPC RAM the song is located. Each entry is a two-byte pointer in little-endian (LSB first) format.


Song 00 does not point to an actual song (in fact, it points to an area in the SPC700's upper memory, where the game cannot load its song data), and its space in the table might actually be used by the preceding data chunk.
Song 00 does not point to an actual song (in fact, it points to an area in the SPC700's upper memory, where the game cannot load its song data), and its space in the table might actually be used by the preceding data chunk.

Revision as of 18:53, 16 February 2008

SPC RAM

As with all SNES games, audio data must be loaded into the SPC700's RAM before it can be played. This RAM contains all the song data, the instrument data, the sample data, and even the music playback code itself. The lower 32K of the SPC's 64KB memory (0000-7FFF) is used to hold all this data, and the upper 32K (8000-FFFF) is used by the SPC chip itself to hold internal state information. .SPC files are nothing more than a straightforward RAM dump of the SPC chip with a 256-byte header attached.

Song SPC Pointer Table

This table is located at 262B8A in the ROM and contains 192 (0xC0) entries. Not all songs are loaded into the same offset in SPC RAM, so this table is used to tell where in SPC RAM the song is located. Each entry is a two-byte pointer in little-endian (LSB first) format.

Song 00 does not point to an actual song (in fact, it points to an area in the SPC700's upper memory, where the game cannot load its song data), and its space in the table might actually be used by the preceding data chunk.