| |
Format name
: The player 6.1A
Created by : Jarno Paananen (Guru/Sahara
Surfers) (1995)
Sources :
* Own converted MODs with the packer (sent by Gryzor !)
Note: The 'only' difference remains in the
repacking of the tracks datas
thanks :)
|
OFFSET
|
SIZE (bytes)
|
COMMENT
|
|
0
2
3
-
-
-
-
|
2
1
1
-
-
-
-
|
- (Smp_Addy) Address of the sample
data
- (NOP) number of pattern saved
- (NOS) Number of sample
(only the first 6 lower bits !)
if bit 6 is set to 1, at least one sample is packed.
if bit 7 is set to 1, ALL the samples are delta.
(both cases are possible at the same time) |
Note: if bit 6 is set to 1 (packed samples),
the 4 following bytes are the unpacked sample data size :
|
4
|
4
|
- Size of the unpacked samples datas |
Then, dont forget to add 4 to all the following offsets
The following is repeated NOS
times
with 6 bytes description for one sample
|
4
6
7
8
|
2
1
1
2
|
- Sample size (/2)
- finetune (0->F)
- volume (0->40h)
- Loop Start / 2 |
Note: The player removes what's beside
the sample loop, so, it saves only the start address. If there's no
loop, this value is $FFFF
Note: if the sample size is > $FF00
(this case is impossible under ptk !), you have to NOT this sample
size and you'll get the number of sample you have to repeat (the
datas are the same). The first possible value is 00 !
Note: if the sample is packed/delta,
the finetune byte is changed in the same way as the number of sample
upward :
if bit 6 is set to 1, the sample is packed.
if bit 7 is set to 1, the sample is delta.
And here, too, both cases are possible at the same time
|
NOS*6+4
-
-
-
|
NOP*8
-
-
-
|
- track table. Each pattern contains
4 tracks and here is the address of the four track per patterns.
The first address is $0000 |
Note: According to the documentation of
the packer, it supports the 'new' 100 patterns feature added by Noxious
in their Ptk 2.*. The doc says that if the packing of the track data is
higher than 64k, then this table is saved with DWORD (not just WORD).
I've not yet encountered the case, but I guess there's a bit, somewhere,
that states the fact because I cant see how we could know if it's saved
on DWORD or only WORD ... . Dont forget that the actual size will be (NOP*16)
for the following offsets ...
|
NOS*6+4
+NOP*8
NOS*6+4
+NOP*8
+Pat_Size
-
|
?!?
-
?!?
-
-
-
|
- Pattern table. Each value is (*2).
This table ends with $FF
- Tracks datas
(Pat_Size is the size of the pattern list) Each track contains 64
notes. The size is between 4 and 256 bytes |
Note Packing : (the same as P61A !)
* case 1 : (flag bit set to 0)
- flag bit set to 1
/
| Sample
| Number
| / \
| | |
0000-0000 0000-0000 0000-0000
| | | | | |
\/ \ / \ /
$F relative value
note
number
|
Note: 'value' is signed. if 'value' is
< 80h, then follow 'value' empty rows. if 'value' is > 7Fh, then the current
note is repeated 'value'-7Fh times
Note: When the 4 last bits of 1st bytes are
set to 1 (=$F) then there's no effect nor effect value
Note: The relative note number can NOT be
higher than $48 ... it explains the possibility of the case #2 ...
Important: It seems that if I should detail
every possible case, I'll stay here for ages !. So, I'll shorten a bit
all this. So, In this case #1, the flag bit is set to 1, meaning there's
an extra byte I called 'value'. This byte disappears when the flag bit
is set to 0 ... the case beeing still valid !.
* case 1' (note the <'>): (flag bit set to
1)
- flag bit set to 1
/
| effect
| parameter
| / \
| | |
0000-0000 0000-0000 0000-0000
| | | | | |
\/ \/ \ /
$E effect value
|
Note : When the 4 last bits of 1st bytes
are set to 1 (=$E) then there's no Sample number nor Relative note number
Important: Here, we have the same shit about
this flag bit. Refer to case #1 'IMPORTANT' line to understand what I
mean.
* case 2 : (flag bit set to 1)
- flag bit set to 1
/
|
| value
| / \
| | |
0000-0000 0000-0000 0000-0000
| | | | |
\ / 0 \ /
$FF Nbr Bytes
|
Some explanations: this case allow the
re-use of some already saved notes. To find these, we need to know where
and how many notes to read. The where is answered by the 'Nbr Bytes' byte.
To find where are the notes to re-read, you have to go back 'Nbr Bytes'
before where you are AFTER the actual position (which is after having
read these three bytes). The number of notes to re-read is answered by
'value'. BUT, you HAVE to remove $C0 to it to find the real number of
notes to read !. The reason to this is explained by the following case
:
* case 2' :
- flag bit set to 1
/
|
| value
| / \
| | |
0000-0000 0000-0000
| | |
\ / 0
$FF
|
Some explanations: And there we have the
other possible pack when the 1st byte is $FF. This case is only possible
if 'value' is < $40 !. This case is the number of empty rows to bypass
(-1). This is only possible at the beginning of a track because empty
notes are already taken care of. As an exemple : $FF01 means there's 2
empty lines
IMPORTANT: Hum ... if there's only ONE empty
note, the flag bit is set to 0 and, as explained a few times already,
the extra byte is removed. So, one empty line is $7F
IMPORTANT (again): if the last bit of 'value'
is set to 1, then, the number of bytes is coded on two bytes (following
case) :
* case 2'' : (flag bit set to 1)
- flag bit set to 1
/
|
| value
| / \
| | |
0000-0000 0000-0000 0000-0000 0000-0000
| | | | |
\ / 1 \ /
$FF Number of Bytes
|
* case 3 : (flag bit set to 1)
- flag byte set to 1
/
| Sample
| Number value
| / \ / \
| | | | |
0000-0000 0000-0000 0000-0000 0000-0000
| | | | | |
\ / \/ \ /
relative effect effect
note value
number
|
Note : 'value' is explain in a 'Note'
in case #1
IMPORTANT : Here, we have the same shit about
this flag bit. Refer to case #1 'IMPORTANT' line to understand what I
mean
For all those cases:
Effects with volume slide (5,6,A) are signed. AFF -> A10 A01 -> A01
Arpeggio effect number is 8h in this format
If the effect is a pattern break/jump, the track ends !
relative note number: (Protracker)
C-1 to B-1 : 856,808,762,720,678,640,604,570,538,508,480,453
C-2 to B-2 : 428,404,381,360,339,320,302,285,269,254,240,226
C-3 to B-3 : 214,202,190,180,170,160,151,143,135,127,120,113
|
become : (P61A)
C-1 to B-1 : 02,04,06,08,0a,0c,0e,10,12,14,16,18
C-2 to B-2 : 1a,1c,1e,20,22,24,26,28,2a,2c,2e,30
C-3 to B-3 : 32,34,36,38,3a,3c,3e,40,42,44,46,48
|
Information: When you encounter the effect
command D or B (pattern break/jump), the track data ends, as stated upward.
What's important, is that ALL the other tracks of THIS pattern have the
same number of row as the one which ends with the break/jump. As an exemple,
if track 0 has a pattern break at line 2, the 3 other tracks have ONLY
3 rows !
Follow Sample datas
Note: As described in the sample headers,
all the samples are not always saved !. Refer up there to get the point
:)
Note: If the samples are delta, use the following
formula ... heh, read carefully because it's a FAKE delta ! :
'new' and 'old' are both unsigned bytes
'Sample_Data' is a table of signed bytes
+-------------------------------------+
|old=0 |
| |
|for i=1 to Sample_Size |
| new = (100h - Sample_Data[i]) + old|
| Sample_Data[i] = new |
| old = new |
+-------------------------------------+
|
Note: If the samples are packed, don't ask
me bcoz I cant help you there !. I E-mailed Jarno a long time ago and still
wait for the answer, while Gryzor keeps beeing evasive ... not something he
cares anymore :(. Any help here would be welcomed !
|
|