source: trunk/asma/Docs/Sap.txt @ 4

Last change on this file since 4 was 4, checked in by pfusik, 26 years ago

Imported ASMA 0.6

File size: 2.9 KB
Line 
1General information
2~~~~~~~~~~~~~~~~~~~
3SAP file divides into two parts. First part (in text format) describes
4player/music type. Second part (in binary format) contains player and music
5data formed into Atari Binary File Format. This format has two bytes header
6FF,FF. Next two bytes tell loader, where to load data, and next two bytes
7describes where the data end.
8Init data block ($02E2,$02E3) is not supported.
9
10
11Player Description format (first part of .sap file)
12~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
13This description (in text format) is loaded line per line. Each line contains
14command with parameters. Other lines which are not recognized are treated as
15comment lines. Right now only these commands are supported:
16
17   TYPE      - player type
18   PLAYER    - address of player part which will be executed in 1/50 sec
19               intervals
20   MUSIC     - address with data
21   INIT      - address of player part which will init player
22   SONGS     - number of songs
23   DEFSONG   - first song which will be played when .sap will be loaded
24
25commands PLAYER, MUSIC, INIT contain addresses in hexadecimal format:
26
27PLAYER A000
28PLAYER 1234
29MUSIC  F400
30
31commands SONGS, DEFSONG contain decimal numbers:
32
33SONGS 10
34DEFSONG 9
35
36command TYPE contains single character which describes player type. Right now
37only the following characters are supported:
38
39TYPE C
40TYPE B
41TYPE M
42
43TYPE C - player from CMC (Chaos Music Composer). In this case, also these
44         commands must appear: PLAYER, MUSIC, SONGS, and DEFSONG. Player will
45         be initialized as follows:
46
47         lda #$70
48         ldx #<MUSIC
49         ldy #>MUSIC
50         jsr PLAYER+6
51         lda #$00
52         ldx #DEFSONG
53         jsr PLAYER+6
54
55         in 1/50 intervals will be executed:
56
57         jsr PLAYER+3
58
59TYPE M - player from ???????? (this player was used by composers like Adam
60         Gilmore, David Whittaker, etc). In this case, also these commands
61         must appear: PLAYER, INIT, SONGS, and DEFSONG. Player will be
62         initialized as follows:
63
64         lda #DEFSONG
65         jsr INIT
66
67         in 1/50 intervals will be executed:
68
69         jsr PLAYER
70
71TYPE B - any player. In this case, also these commands must appear: PLAYER,
72         INIT, SONGS, and DEFSONG. Player will be initialized as follows:
73
74         lda #DEFSONG
75         jsr INIT
76
77         in 1/50 intervals will be executed:
78
79         jsr PLAYER
80
81         TYPE B is right now exactly the same like TYPE M but this
82         distinguish is for future SAP releases.
83
84
85How to create .SAP file
86~~~~~~~~~~~~~~~~~~~~~~~
87First of all we need to rip music from a game or a demo and save it in atari
88binary file. Next we can create text file with commands (described above),
89then we can make .sap file by linking thwse two files. We can do that using
90DOS command "copy", e.g.:
91
92copy /b music.txt+music.bin music.sap
93
94The file is done!
Note: See TracBrowser for help on using the repository browser.