SPC File Format
SPC File Format
30
=====================
Offset Size Description
------ ----- -----------------------------------------------------------------00000h
33 File header "SNES-SPC700 Sound File Data v0.30"
00021h
2 26,26
00023h
1 26 = header contains ID666 information
27 = header contains no ID666 tag
00024h
1 Version minor (i.e. 30)
SPC700 Registers:
00025h
2 PC
00027h
1 A
00028h
1 X
00029h
1 Y
0002Ah
1 PSW
0002Bh
1 SP (lower byte)
0002Ch
2 reserved
ID666 Tag
0002Eh
0004Eh
0006Eh
0007Eh
0009Eh
000A9h
000ACh
000B1h
000D1h
000D2h
000D3h
ID666 Tag
0002Eh
0004Eh
0006Eh
0007Eh
0009Eh
000A2h
000A9h
000ACh
000B0h
000D0h
000D1h
000D2h
(text format):
32 Song title
32 Game title
16 Name of dumper
32 Comments
11 Date SPC was dumped (MM/DD/YYYY)
3 Number of seconds to play song before fading out
5 Length of fade in milliseconds
32 Artist of song
1 Default channel disables (0 = enable, 1 = disable)
1 Emulator used to dump SPC:
0 = unknown
1 = ZSNES
2 = Snes9x
45 reserved (set to all 0's)
(binary format):
32 Song title
32 Game title
16 Name of dumper
32 Comments
4 Date SPC was dumped (YYYYMMDD)
7 unused
3 Number of seconds to play song before fading out
4 Length of fade in milliseconds
32 Artist of song
1 Default channel disables (0 = enable, 1 = disable)
1 Emulator used to dump SPC:
0 = unknown
1 = ZSNES
2 = Snes9x
46 reserved (set to all 0's)
Size
---4
4
Description
-----------------------------------------------------------------Chunk type "xid6"
Chunk size, not including header
Sub-chunk Header
---------------Inside the chunk are sub-chunks. Each sub-chunk consists of a 4-byte header,
and possibly data. All data is 32-bit aligned. If the data stored doesn't
reach a 32-bit boundary, it will be padded with 0's.
Offset
-----0
1
Size
---1
1
Description
-----------------------------------------------------------------ID
- song name, length, etc.
Type - 0 means data is stored in the header
non-zero means data is stored after header
Length - if 'type' is non-zero, this contains the length of the
following data
Type: Length - 'Type' contains a 0, and the tag item is saved in the 'Length'
of the sub-chunk header.
String - 'Type' contains a 1, and the tag item is stored as a null
terminated string (max 256 characters including null).
Currently, strings saved in SNESAmp use ANSI characters.
However, support for UNICODE may be added.
Integer - 'Type' contains a 4, and the tag item is stored as an integer
following the header. Currently all integer items are four
bytes.
Size: The minimum and maximum sizes of an item
ID
--01h
02h
03h
04h
05h
06h
07h
10h
11h
12h
Type
------String
String
String
String
Integer
Length
String
String
Length
Length
Size
----4-256
4-256
4-256
4-256
4
1
4-256
4-256
1
2
Description
-----------------------------------------------------------Song name
Game name
Artist's name
Dumper's name
Date song was dumped (stored as yyyymmdd)
Emulator used
Comments
Official Soundtrack Title
OST disc
OST track (upper byte is the number 0-99, lower byte is an
13h
14h
30h
31h
32h
33h
34h
35h
36h
String
Length
Integer
Integer
Integer
Integer
Length
Length
Integer
4-256
2
4
4
4
4
1
1
4
This may seem like a messy way to implement a format, but I wanted to assure
something that would be easily expandible.
The source code to SNESAmp (available at http://www.alpha-ii.com) contains a
C++ class for reading and writing ID666 and xid6 tags.