The New MOD Fileformat ------------------------------------------------------------------------------ Main structure: Pos 0 - "MOD0" = Module ID (ULONG) MOD1-MOD9 reserved. Pos 4 - modlen = Module Size (ULONG) Pos 8 - module = Normal PT "M.K." module (use a pointer to this pos) modlen holds the MODULE's size, not the MOD0's. Pos 8+modlen - "EXT0" = Extension ID (ULONG) EXT1-EXT9 reserved. ------------------------------------------------------------------------------ Extension structure: Pos 0 - "EXT0" = Extension ID (ULONG) EXT1-EXT9 reserved. Pos 4 - "AUTH" = Author ID (ULONG) Pos 8 - strlen = Author len (UCHAR) Pos 9 - string = Author string (BYTES) Not terminated, use strlen. Pos 9+authlen - "COMM" = Comment ID (ULONG) Pos 9+authlen+4 - strlen = Comment len (UCHAR) Pos 9+authlen+5 - string = Comment string (BYTES) Not terminated, use strlen. ------------------------------------------------------------------------------ MODx: All data in the MODx files are static, but they have dynamic lenght. The lenght of a string may be from 0-255 bytes. Currently PtPlay (the first player to support MOD0), will only show the first 20 bytes of a string. This is to avoid PtPlay stretching across the screen to fit all the text in it's GUI. So try to keep it at 20 bytes, but if you go 21-255 bytes, then no harm is done. PtPlay will simply not show the rest of the string. "Your" player may display strings longer than 20 bytes ;-) ------------------------------------------------------------------------------ EXTx: EXT0 only have two extensions, AUTH and COMM. If more extensions are needed, contact me. I will collect all suggestions/requests, and put them in a new EXT1. Thus you must check if there is a 0 in EXT0 or not ;-), since a improved extension will be located at the same place. ------------------------------------------------------------------------------ Compatible: When a EXT1-EXT9 is created it will also have AUTH and COMM, so compatibility will go both ways ;-) EXT1-EXT9 will get any new extensions put after the COMM. So if you wish to stay compatible, check that it's EXT0. If it's not then skip the extension, or read the AUTH and COMM, and leave the rest alone. MOD0 to MOD9 will all use the same extensions (EXT0-EXT9). MOD0 is a PT "M.K." module. ------------------------------------------------------------------------------ Future MODx: If a MOD1 is created then it may contain a normal PT, and it may not, it may simply have different positions than MOD0 etc, but as of now I doubt it will be needed. After all, there is 9 possible extensions ;-) Makes you think doesn't it? 9 more extension types on 9 more modtypes? 9x9=81 All in all a possible 100 combinations ;-) Let's hope people like it enough, so we don't end up with a dozen different combinations. Let's just go for EXT1 okay? ------------------------------------------------------------------------------ Future extension: For EXT1 I was planning "STXT", a scrolltext extension. Most likely with a lenght of UWORD (0-65535 bytes) That should be enough ;-) The text is stored with linefeed (ascii 10) that means end of line/part. The text could be scrolled in a player GUI, or printed with delay to CLI (Maybe I should include that in PtPlay?) EXT1 will be the same as EXT0 but with STXT added. For EXT2 I was planning "ILBM", a IFF-ILBM picture extension. Any ILBM with Depth 1-8 including HAM6 and HAM8. EXT2 will be the same as EXT0 but with ILBM added. For EXT3 I was planning "ANIM", a IFF-ANIM animation extension. Any ANIM5 with depth 1-8 including HAM6 and HAM8. EXT3 will be the same as EXT0 but with ANIM added. For EXT4 I was planning a ILBM and STXT. So it would be possible to use the image as background and scroll the text across it. For EXT5 I was planning a ANIM and STXT. So it would be possible to use the anim as background and scroll the text across it. For EXTx ???? Any ideas? ------------------------------------------------------------------------------ What's it for?: Well, imagine having a single unit of data. A module and picture, a module and a anim, a module and a scrolltext. ------------------------------------------------------------------------------ © Msi Software 1996-97 Email: "Msi Software " WWW: "http://home.sol.no/~msi/"