Cross-posting this from elsewhere.
gizaha wrote:Why we use 8659 and 00F5?
8659 and 00F5 combine to form the SNES HiROM pointer $F5:8659 (PC address 358659, which points to a custom-made blank music track. There is normally blank space at this address in an unedited ROM. Here is the structure of the block:
- Code: Select all
ROM $F5:8659: 00 13 16 00 //upload 0x16 times two (0x2C) bytes to $1300 in SPC700 RAM
SPC700 RAM $1300: 1E 13 2B 13 2B 13 2B 13 2B 13 2B 13 2B 13 2B 13
//pointer to each channel in music tracks 01-06
SPC700 RAM $1310: 80 FF
//If I recall correctly, these bytes are the base tempo of the music and sound effects, respectively.
SPC700 RAM $1312: 00 13 00 13 00 13 00 13 00 13 00 13
//Pointer to channel pointer table for each music track. In this case, they all point to $1300.
SPC700 RAM $131E: 15 37 23 23 18 7F 0A 01 01 01 01 01 01
//Music data; channel 00. There isn't anything audible here--command 15 sets the echo for sound effects, while command 18 sets the FIR filter.
SPC700 RAM $132B: 00
//Music data; channels 01-07. 00 = end of music data, so these also play nothing.
gizaha wrote:What is scratch RAM?
Scratch RAM is general-purpose RAM. For DKC2, one block of scratch RAM is located between $32 and $4A. It can have different uses depending on the code currently being executed. For example, the subroutine responsible for loading the music data stores the address of the data block to be loaded at addresses $32-$34 in RAM.