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

Last change on this file since 6 was 6, checked in by pfusik, 21 years ago

Imported ASMA 0.7

File size: 3.3 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   FASTPLAY  - number of lines between each call of playing routine (312 by
25               default, which is one screen - 1/50 of sec.). For example for
26               double-speed tune put here the value 156 (312/2). 99% of tunes
27               are single-speed which means that you don't have to define the
28               FASTPLAY variable for them.
29   
30commands PLAYER, MUSIC, INIT contain addresses in hexadecimal format:
31
32PLAYER A000
33PLAYER 1234
34MUSIC  F400
35
36commands SONGS, DEFSONG contain decimal numbers:
37
38SONGS 10
39DEFSONG 9
40
41command TYPE contains single character which describes player type. Right now
42only the following characters are supported:
43
44TYPE C
45TYPE B
46TYPE M
47
48TYPE C - player from CMC (Chaos Music Composer). In this case, also these
49         commands must appear: PLAYER, MUSIC, SONGS, and DEFSONG. Player will
50         be initialized as follows:
51
52         lda #$70
53         ldx #<MUSIC
54         ldy #>MUSIC
55         jsr PLAYER+6
56         lda #$00
57         ldx #DEFSONG
58         jsr PLAYER+6
59
60         in 1/50 intervals will be executed:
61
62         jsr PLAYER+3
63
64TYPE M - player from ???????? (this player was used by composers like Adam
65         Gilmore, David Whittaker, etc). In this case, also these commands
66         must appear: PLAYER, INIT, SONGS, and DEFSONG. Player will be
67         initialized as follows:
68
69         lda #DEFSONG
70         jsr INIT
71
72         in 1/50 intervals will be executed:
73
74         jsr PLAYER
75
76TYPE B - any player. In this case, also these commands must appear: PLAYER,
77         INIT, SONGS, and DEFSONG. Player will be initialized as follows:
78
79         lda #DEFSONG
80         jsr INIT
81
82         in 1/50 intervals will be executed:
83
84         jsr PLAYER
85
86         TYPE B is right now exactly the same like TYPE M but this
87         distinguish is for future SAP releases.
88
89
90How to create .SAP file
91~~~~~~~~~~~~~~~~~~~~~~~
92First of all we need to rip music from a game or a demo and save it in atari
93binary file. Next we can create text file with commands (described above),
94then we can make .sap file by linking thwse two files. We can do that using
95DOS command "copy", e.g.:
96
97copy /b music.txt+music.bin music.sap
98
99The file is done!
Note: See TracBrowser for help on using the repository browser.