Home Download Musics Developers
API Sources Tools File Format Technicals

Overview

This chapter describes sc68 file format. This format is based upon a chunk policy that makes it highly evolutif. The file structure is composed of a file header followed by a variable number of chunk as describe in the Structure table.
Structure table
+00 File header
+56 1st chunk
+N1 (...)
+N2 Nth chunk

File Header

sc68 file header is a simple identification string. Its length is exactly 56 bytes including the trailing '0':
"SC68 Music-file / (c) (BeN)jamin Gerard / SasHipA-Dev  "

Chunks

Chunk structure is composed of an header obviouly named Chunk-Header which is followed directly by data so named Chunk-Data.
Chunk structure table
+0 Chunk-Header. See Chunk-Header structure table below
+8 Chunk-Data. See Chunk-data structure table

Chunk-Header structure table
+0 'SCxx'Chunk-Id Identifies content of Chunk-Data
+4'nnnn' Chunk-SizeNumber of bytes in Chunk-Data

Chunk-data structure table
+0 Depends on Chunk-Id. See below the list of defined chunks
+Chunk-SizeNext chunk

Chunk-types

Chunk-types does not really exist, but have been added here for convenience. As many Chunks-Data of different Chunk-Id have been encoded in the same way, a Chunk-types defines a Chunk-Data format.
Chunk-types table
type size description
tag 0 Defines start or end of block.
integer 4 32 bit little endian encoded integer
string string length+1 0 terminated string
data variable raw data (generally music data)

Chunk definitions

The sc68 chunks table reports all kind of chunks currently used by sc68 files. Any other chunk is skipped by the sc68 file loader. Order of chunk could be important. It is the case for all tag Chunk-Type. A sc68 disk must begin by a 'SC68' chunk. Each track of this disk must begin by a 'SCMU' chunk. Obviously the first track must have a 'SCDA' chunk. Notice that loader failed if sc68 disk has no track.
sc68 chunks table
Chunk-Id Chunk-Type Default value Description
'SC68'
tag start of file
'SCFN'
string "???" disk name (file name)
'SCDF'
integer 0 default track to play
'SCMU'
tag start of music (track) section
'SCMN'
string "???" track name
'SCAN'
string "???" author name
'SCCN'
string author name ['SCAN'] composer name
'SCD0'
integer 0 68K data register D0 value at init
'SCAT'
integer 0 [PC-relatif] Run & load address (could be external replay)
'SCTI'
integer calculated from 'SCFR' track time (sec)
'SCFR'
integer 0 [unknown] number of frames to call (prior to 'SCTI')
'SCFQ'
integer 50hz [pal] frequency of music replay call
'SCLP'
integer 1 default number of loop [-1=infinite]
'SCTY'
integer 1 [Ym] hardware used bit [0:Ym 1:STE 2:Amiga]
'SCRE'
string external replay name (if any !)
'SCDA'
data inherited data for the music (track)
'SCEF'
tag end of file (could be prematured)