I noticed in the process conflicting comments, and then code which does different than the comments (either of them), and in fact stuff which looked like off by one errors in a few places.
So after finally working it all out, I've come up with this:
Code: Select all
00000h-00020h - File Header : SNES-SPC700 Sound File Data v0.00 (33 bytes)
00021h-00023h - 0x1a,0x1a,0x1a (3 bytes)
00024h - 10 (1 byte)
00025h - PC Register value (1 Word)
00027h - A Register Value (1 byte)
00028h - X Register Value (1 byte)
00029h - Y Register Value (1 byte)
0002Ah - Status Flags Value (1 byte)
0002Bh - Stack Register Value (1 byte)
0002Ch-0002Dh - Reserved (1 byte)
0002Eh-0004Dh - SubTitle/Song Name (32 bytes)
0004Eh-0006Dh - Title of Game (32 bytes)
0006Eh-0007Dh - Name of Dumper (32 bytes)
0007Eh-0009Dh - Comments (32 bytes)
0009Eh-000A1h - Date the SPC was Dumped (4 bytes)
000A2h-000A8h - Reserved (6 bytes)
000A9h-000ACh - Length of SPC in seconds (4 bytes)
000ADh-000AFh - Fade out length in milliseconds (3 bytes)
000B0h-000CFh - Author of Song (32 bytes)
000D0h - Default Channel Disables (0 = enable, 1 = disable) (1 byte)
000D1h - Emulator used to dump .spc file (1 byte)
(0 = UNKNOWN, 1 = ZSNES, 2 = SNES9X)
(Note : Contact the authors if you're an snes emu author with
an .spc capture in order to assign you a number)
000D2h-000FFh - Reserved (46 bytes)
00100h-100FFh - SPCRam (64 KB)
10100h-101FFh - DSPRam (256 bytes)