You are on page 1of 3

SPC File Format v0.

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)

00100h 65536 64KB RAM


10100h 128 DSP Registers
10180h
64 unused
101C0h
64 Extra RAM (Memory region used when the IPL ROM region is set
to read-only)

Extended ID666 Format


=====================
Extended information is stored at the end of the SPC file as an IFF chunk
with an ID of "xid6". Items that can be stored in the ID666 tag without any
loss of data should not be stored in the extended area.
Offset
-----0
4

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

Extended ID666 Items


-------------------ID:

00-0F - Items from original ID666 tag


10-1F - Extended items
30-3F - Items related to playback

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

optional ASCII character)


Publisher's name
Copyright year
Introduction length (Lengths are stored in ticks. A tick is
Loop length
1/64000th of a second. The maximum
End length
length is 383999999 ticks. The End can
Fade length
contain a negative value.)
Muted channels (a bit is set for each channel that's muted)
Number of times to loop the loop section of the song
Amplification value to apply to output (65536 = Normal SNES)

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.

You might also like