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 | |
---|
25 | commands PLAYER, MUSIC, INIT contain addresses in hexadecimal format: |
---|
26 | |
---|
27 | PLAYER A000 |
---|
28 | PLAYER 1234 |
---|
29 | MUSIC F400 |
---|
30 | |
---|
31 | commands SONGS, DEFSONG contain decimal numbers: |
---|
32 | |
---|
33 | SONGS 10 |
---|
34 | DEFSONG 9 |
---|
35 | |
---|
36 | command TYPE contains single character which describes player type. Right now |
---|
37 | only the following characters are supported: |
---|
38 | |
---|
39 | TYPE C |
---|
40 | TYPE B |
---|
41 | TYPE M |
---|
42 | |
---|
43 | TYPE 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 | |
---|
59 | TYPE 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 | |
---|
71 | TYPE 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 | |
---|
85 | How to create .SAP file |
---|
86 | ~~~~~~~~~~~~~~~~~~~~~~~ |
---|
87 | First of all we need to rip music from a game or a demo and save it in atari |
---|
88 | binary file. Next we can create text file with commands (described above), |
---|
89 | then we can make .sap file by linking thwse two files. We can do that using |
---|
90 | DOS command "copy", e.g.: |
---|
91 | |
---|
92 | copy /b music.txt+music.bin music.sap |
---|
93 | |
---|
94 | The file is done! |
---|