SPCTag is a Java stand-alone command line app for reading the ID666 tags from SNES SPC-files.
SPC-files are sound files containing ripped chiptune music from Super Nintendo and Super Famicom games. They are named after the Sony SPC-700 sound chip created by Ken Kutaragi (who later became the father of the Playstation).
Not for PKCS#7 certificates who share the same filename extension.
usage: spctag <filename>
-v,--verbose verbose output
-V,--version print version
-x,--xid6 print xid6 tags
For example:
$ java -jar spctag -v "/warez/spc/dkc2/17 Stickerbrush Symphony.spc"
File header: SNES-SPC700 Sound File Data v0.30
Tag format: Text
Artist: Dave Wise
Song title: Stickerbrush Symphony
Game title: Donkey Kong Country 2
Name of dumper: Datschge
Comments: Bramble Maze
Date SPC was dumped:
Emulator used to dump SPC: Unknown
Length (seconds): 253
Fade length (milliseconds): 10000
-----------
XID6 tags:
-----------
Publisher's name: Rare, Nintendo
Copyright year: 1995
Introduction length: 25.3
Fade length: 640000
- โ๏ธ 100% Java (Java 17) โ
- โ๏ธ Supports UTF-8 encoding in the tags!
- โ๏ธ Command line. Multi-platform.
- โ๏ธ Batch processing using wildcards is possible! For example:
java -jar spctag *.spc
- โ๏ธ: xid6 support (extended tags).
- โ Edit tags (as of yet)
This is a Maven-project.
Run:
./mvnw clean install assembly:single
Run:
mvnw.cmd clean install assembly:single
to build the JAR-file.
I've included a compiled jar-file with /lib dir to simplify for end-users who can't compile stuff on their platform.
- Download spctag-bin.zip
- I wrote this because there was a lack of tools supporting the SPC-format.
- And it would be a fun project to learn binary I/O in Java.
- Lastly, spctag has the best support for parsing the "Emulator used for dumping SPC"-tag ๐
Most of the existing tools are 15-20 year old legacy Windows programs that won't run on modern computers. The source code is lost. Or it was written in C/C++ for 32-bit architecture and won't compile on modern 64-bit computers.
Java is multi-platform and you can run and compile 20-year old Java programs without any issues. So I'd figure this would be a suitable platform for posterity.
Hopefully doing it in Java makes it easy to convert to XML and JSON, as well as persisting it in databases using SQL.
The Emulator used for dumping-value is set by 1 byte-flag. In two different offset locations depending on if the SPC-file is using binary or text-format for storing the ID666-tag.
- Binary offset
0xD1
- Text offset:
0xD2
There are two different set of specifications for emulator codes available. The legacy SPC-file specification and the newer Japanese one. SPCTag supports both of them.
The following byte-values are used according to the Japanese spec:
Emulator name | Text format | Binary format |
---|---|---|
Unknown | 0x30 | 0x00 |
ZSNES | 0x31 | 0x01 |
Snes9x | 0x32 | 0x02 |
ZST2SPC | 0x33 | 0x03 |
Other | 0x34 | 0x04 |
SNEShout | 0x35 | 0x05 |
ZSNES / W | 0x36 | 0x06 |
Snes9xpp | 0x37 | 0x07 |
SNESGT | 0x38 | 0x08 |
Note: Other and Unknown are both specified with unique values (?) somehow...
Only 3 values are defined in the legacy spec (SPC File Format v.0.31 txt-file)
Emulator name | Text format | Binary format |
---|---|---|
Unknown | 0x00 | 0x00 |
ZSNES | 0x01 | 0x01 |
Snes9x | 0x02 | 0x02 |
- se.anosh.spctag.emulator.factory contains a factory method.
- Used for creating immutable Emulator-objects based on the two aforementioned tables.
Emulator emulatorUsed = EmulatorFactory.createEmulator(0x31, Type.JAPANESE) // Type.LEGACY is also available
GPL 3 only. See COPYING
- Apache Commons CLI-library - Apache Licence version 2
- tinylog - Apache Licence version 2
- S-SMP chip for SFC - made by Yaca2671 (2007). Creative Commons Attribution-Share-Alike 3.0 Unported licence.
- SPC dumped-date check (logs warning if tag pre-dates the birth of the SPC-format; 1998-04-15) used is from
SPCTool
(GPL2 or later) by Anti Resonance. Source
SPCtag is dedicated to my favourite OC remixer Avien (1986-2004). RIP ๐ถ ๐ท