1 | General information |
---|
2 | ~~~~~~~~~~~~~~~~~~~ |
---|
3 | SAP file divides into two parts. First part (in text format) describes |
---|
4 | player/music type. Second part (in binary format) contains player and music |
---|
5 | data formed into Atari Binary File Format. This format has two bytes header |
---|
6 | FF,FF. Next two bytes tell loader, where to load data, and next two bytes |
---|
7 | describes where the data end. |
---|
8 | Init data block ($02E2,$02E3) is not supported. |
---|
9 | |
---|
10 | |
---|
11 | Player Description format (first part of .sap file) |
---|
12 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
13 | This description (in text format) is loaded line per line. Each line contains |
---|
14 | command with parameters. Other lines which are not recognized are treated as |
---|
15 | comment 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 | |
---|
30 | commands PLAYER, MUSIC, INIT contain addresses in hexadecimal format: |
---|
31 | |
---|
32 | PLAYER A000 |
---|
33 | PLAYER 1234 |
---|
34 | MUSIC F400 |
---|
35 | |
---|
36 | commands SONGS, DEFSONG contain decimal numbers: |
---|
37 | |
---|
38 | SONGS 10 |
---|
39 | DEFSONG 9 |
---|
40 | |
---|
41 | command TYPE contains single character which describes player type. Right now |
---|
42 | only the following characters are supported: |
---|
43 | |
---|
44 | TYPE C |
---|
45 | TYPE B |
---|
46 | TYPE M |
---|
47 | |
---|
48 | TYPE 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 | |
---|
64 | TYPE 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 | |
---|
76 | TYPE 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 | |
---|
90 | How to create .SAP file |
---|
91 | ~~~~~~~~~~~~~~~~~~~~~~~ |
---|
92 | First of all we need to rip music from a game or a demo and save it in atari |
---|
93 | binary file. Next we can create text file with commands (described above), |
---|
94 | then we can make .sap file by linking thwse two files. We can do that using |
---|
95 | DOS command "copy", e.g.: |
---|
96 | |
---|
97 | copy /b music.txt+music.bin music.sap |
---|
98 | |
---|
99 | The file is done! |
---|