
*** N64 (64NET container files)
*** Document revision: 1.3
*** Last updated: March 11, 2004
*** Compiler/Editor: Peter Schepers
*** Contributors/sources: Markus Mehring

  64NET links your C64  and  PC  together  through  a  special  cable,  and
provides the C64 access to many image and native files stored  on  your  PC
hard disk. Early versions only provided access to 64NET's  custom  filetype
"N64", which is explained here, but newer versions also support many of the
common files (LNX, T64, D64, etc).

The following is a dump of an N64 file:

    00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F        ASCII
    -----------------------------------------------   ----------------
00: 43 36 34 01 82 01 08 C4 0C 00 00 00 00 00 00 00   C64ת‚תתִתתתתתתתת
10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 31   תתתתתתתתתתתתתתת1
20: 35 58 58 20 2D 3E 20 36 34 4E 45 54 00 00 00 00   5XXת->ת64NETתתתת
30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   תתתתתתתתתתתתתתתת
40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   תתתתתתתתתתתתתתתת
50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   תתתתתתתתתתתתתתתת
60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   תתתתתתתתתתתתתתתת
70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   תתתתתתתתתתתתתתתת
80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   תתתתתתתתתתתתתתתת
90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   תתתתתתתתתתתתתתתת
A0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   תתתתתתתתתתתתתתתת
B0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   תתתתתתתתתתתתתתתת
C0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   תתתתתתתתתתתתתתתת
D0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   תתתתתתתתתתתתתתתת
E0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   תתתתתתתתתתתתתתתת
F0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 .. ..   תתתתתתתתתתתתתת..

   Bytes:  $00-02: 64NET file signature ("C64")
               03: File version ($01)
               04: C64 filetype. Valid types are:
                    $x0=DEL
                    $x1=SEQ
                    $x2=PRG
                    $x3=SEQ
                    $x4=REL
                    $x5=DIR (not really implemented)
                    $x6=VOL (not really implemented)
                   Bit 0-3: The actual filetype
                            000 (0) - DEL
                            001 (1) - SEQ
                            010 (2) - PRG
                            011 (3) - USR
                            100 (4) - REL
                            Values 5-15  are  illegal,  but  if  used  will
                            produce  very  strange  results.  The  1541  is
                            inconsistent in how it treats these bits.  Some
                            routines use all 4 bits, others ignore  bit  3,
                            resulting in values from 0-7.
                     Bit 4: Not used
                     Bit 5: Used only during SAVE-@ replacement
                     Bit 6: Locked flag (Set produces ">" locked files)
                     Bit 7: Closed flag (Not set produces "*",  or  "splat"
                            files)
            05-06: Load address of contained file in low/high format.  Some
                   versions do not contain this address, so use the one  at
                   the beginning of the file data.
            07-0A: File size (in bytes,  low/med1/med2/high  format).  This
                   provides  access  to  *very*  large  files,  up   to   2
                   Gigabytes!
               0B: Network security level
                    $00 - None
                     01 - Visitor
                     02 - Low
                     03 - High
                     04 - Master
            0C-1E: Reserved for future use
            1F-2E: 16-byte C64 filename in PETASCII, padded with $00
               2F: Set to $00
            30-FD: Reserved for future use
              FE-: Start of file data (including original load address)

  Some versions of these files are longer than what  the  header  and  file
size total up to. It is safe to ignore this inconsistency and only read the
amount of data dictated by the "file size".

