dtvwiki

http://pelrun.github.io/dtvwiki

This project is maintained by pelrun

Currently this page is a playground for collaboration on finding the next generation of the DTV-fixed games repository file format, and in general, the format of files supported by dtvmkfs and DTVFSEdit.

So DO NOT consider this documentation. It is a suggestion to what we may want to do, not what we have now.

Hopefully we will come to an agreement regarding the format, and we will be able to implement this in both dtvmkfs and DTVFSEdit. And I will need to make some changes to the repository :)

/ Spaceman Spiff

Archive format

The repository will exclusively use ZIP archives according to the specifications presented here. Existing archives in the repository will be updated to conform to this standard.

The ZIP is used as a container format, because some games and programs use multiple files, and it is therefore nice to have this grouped together as one entity.

The ZIP archive must contain the file index.txt (name must be lower case), which lists the files to be included. The format of the index.txt will be described in #The index.txt.

Files listed in index.txt to be included in the flash file system image must have names conforming to these specifications:

Other files may exist in the ZIP, such as readme.txt, describing who patched the game/program, etc.

The index.txt

The ZIP-files must contain a file called index.txt (all lower-case).

The index.txt contains a list of files to be included in the flash filesystem:

filename,c64name,,sysaddr,PRG{,options}*

Special characters

The C64names field uses PETSCII URLEncoding. This means that the field is read as ASCII and can contain letters (lower-case letters are converted to PETSCII upper-case), numbers, and the following special characters. Any other characters must be escaped in “%XX” syntax where XX is the hex code if the character’s PETSCII value.

Allowed characters:

To discuss: What about just giving the decoding algorithm…

  1. ASCII $61..$7A are converted to PETSCII $41..$5A (lowercase ASCII to uppercase unshifted PETSCII).
  2. ASCII $23 (#), $2C (,), $5C give an error.
  3. ASCII $25 (%) not followed by a two-digit hex (upper- or lowercase) gives an error.
  4. Anything not in the ASCII $20..$5D range gives an error.
  5. Then all “%xx” occurrences are converted to the corresponding PETSCII value (xx in hex).
    1. The characters %00 and %FF are invalid because they will break compatibility with the flash directory.
    2. In the repository, the characters $22 (“) and $2A (*) are not allowed (not even if encoded as %22 and %2A), because these interfere with the BASIC and Kernel parsing.
    3. In the repository, the characters & (%26) and / (%2F) must be encoded if used.

The following characters are not allowed in the C64-name directly and must be encoded.

Character Replacement Reason
# %23 Interpreted as comment prefix in index.txt parsing
% %25 It escapes other characters
, (comma) %2C Interpreted as field delimiter in index.txt parsing

Examples

A few examples of the suggested line-format for index.txt:

lsmenu_dtv.prg,INTRO,,0,PRG,NOLIST
hard_dtv.prg,HARD'N'HEAVY,,2077,PRG
montezuma_dtv.prg,MONTEZUMA'S REV.,,2059,PRG
boulderdashdtv_dtv.prg,BOULDER DASH DTV 101%25,,2061,PRG