destop wrote:Is there documentation for the Custom format where
the replay code is embedded?
Just from looking at the disaasembly and hex dump of the file it reminds me of a SID tune with a load address and some load rutines to initialize the tune.
But from the ones ive looked at the numbers dont make sense as far as where the replay code and music data is to be loaded
Download
the DeliTracker distribution and you'll find a file called Developer.eng. If you're not actually installing DeliTracker on an Amiga, this file is in the install archive Files/developer.lha
What it basically tells you is that a Custom tune is a normal DeliPlayer, but with the DTP_CustomPlayer tag so no "check" routine is used.
The format of a DeliPlayer / custom tune is as follows:
- normal AmigaDOS executable file format. This can include multiple hunks and relocs, and flags indicating CHIP or FAST memory requirements. The AmigaDOS executable format makes it possible to load the player/custom anywhere in memory.
- the "header" in this executable is:
moveq #-1,d0
rts
dc.b "DELIRIUM"
dc.l playertags (that's a pointer to the taglist, using an absolute address, so in the executable file format that becomes a reloc)
Now, the taglist is a standard way of Amiga programming. You have a array of {tag, data} pairs, where the tag and data are always 4 bytes long. Therefore instead of having a strictly ordered parameter list, you can have them in any order. The tags themselves are just an enumeration. There are also special tags, TAG_DONE (ends the taglist), TAG_SKIP (skip this tag and data, often used in C as {(feature_enabled) ? XYZ_Feature : TAG_SKIP, featuredata} and TAG_MORE (stop processing this tag list the data part of this is a pointer to the continuation of the taglist somewhere else in memory). TAG_USER is just 0x80000000 and is expected to be the basis of all other "normal" tags. For example, delitrackers tags start at TAG_USER+"DT", i.e. 0x80004454
I recommend looking at the assembler source code of custom tunes (and players) that Don Adan has posted on the Wanted Team site. You also should look at the include file misc/DeliPlayer.i which is included in the DeliTracker distribution.