Dino Dini File System

From Kick Off Wiki
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

The Dino Dini File System is a very simple file system used on the amiga floppies of a number of games created by Dino Dini

The File-Table

An Amiga DD floppy consists of 80 cylinders of 2 tracks of 11 sectors of 512 bytes each. Cylinder 0 track 0 sector 0 constains the bootblock. The file-table starts at cylinder 0 track 0 sector 2 (position 0x400 when an adf-image is opened in a hexeditor). The file-table contains a number of file-entries of 16 bytes each. The first 12 bytes contains the filename ('\0' terminated if shorter than 12 bytes). The next 1.5 bytes (12 bits) contains the file-offset (in units of 512 bytes (= 1 block)) and the last 2.5 bytes (20 bits) contains the file-size (in bytes). End-of-filetable has been reached when the first "filename" starting with '\0' is met.

Example from 'kickoff2_v14e.adf':

In this case the file-table has 11 file-entries and the 'end-of-filetable' is reached at position 0x04b0.

Files within Files

Some files can include other files, for example pitches.dat and sprites.dat in Kick off 2. Again, there is a file table that specifies where the included files are. This file table though is a little different than the main one. The first 4 bytes show the length of the file table. These 4 bytes are not included, so if you want to calculate the offset, add 4 to the value of the first 4 bytes. (Because each file-entry is 16 bytes, if you divide the first 4 bytes with &h10 or just ommit the last zero and then convert the hexadecimal number to decimal, you will have the number of the file-entries that follow. In the following example, E0 --> E --> 14).

Afterwards, there is a number of file-entries of 16 bytes each (like in the main file table). The first 12 bytes contain the filename ('\0' terminated if shorter than 12 bytes). The next 4 bytes are the relative offset (starting from the end of the file table) for the beginning of the included file. The end of each file is the beginning of the next (except the last one, which ends at the end of the main file).

Example from 'kickoff2_v14e.adf', file 'sprites.dat':

The 4 bytes that show the length of the file table are highlighted. Notice that the first file starts at offset E4.

Dino Dini File System Tools

A number of small programs to manipulate adf-images which use the Dino Dini File System have been developed.

  • The program readdisk takes as input an adf-image and writes the individual files plus the bootblock to a directory.
  • The program writedisk takes as input a directory created by readdisk and outputs an adf-image.
  • The program readfiles takes as input a file and writes to a directory the files contained within this file.
  • The program writefiles takes as input a directory created by readfiles and output a single file containing the files.

By first applying readdisk and then writedisk to an adf-image, a working adf-image should be obtained. If not, it means that the original adf-image did not follow the Dino Dini File System "specifications". An example of this is the Oracle cracked version of Player Manager. In this image the the code of the cracker intro screen exceeds the bootblock, and the resulting adf-image will not load (note: this can be fixed by modifying the image to skip the intro screen). The resulting adf-image of a readdisk - writedisk sequence can be said to be "clean". This is because "garbage" bytes which are not the part of any legal file are replaced by zeroes by the writedisk operation.

Download

  • ddfs-1.1.0.tgz (Source code) Compiles under both linux and Windows. See README for more information.

Games which use the Dino Dini File System

Games which do not use the Dino Dini File System

Links