Welcome to Data Crystal's new home! Data Crystal is now part of the TCRF family (sort of).
The wiki has recently moved; please report any issues in Discord. Pardon the dust.

EarthBound/Audio: Difference between revisions

From Data Crystal
Jump to navigation Jump to search
(start page with SPC Pointer Table and a bit of info about SPC RAM)
 
Line 5: Line 5:
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 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.


Song 00 does not point to an actual song (in fact, it points to an area outside the region where the game can to load its audio 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:50, 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 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.

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.