Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Interfacing

Persistant mass storage is handled by the eprom file area. It is interfaced with the :EPR device (OZ 4.7 and newer). This device follows the DOR conventions with the major type DM_Epr ($84). Internal eprom file area is accessed with :EPR.0 device name. :EPR.1, :EPR.2, :EPR.3 refer to eprom file area in slot 1, 2 or 3 if a formatted eprom or flash eprom card is available. Accessing the file requires opening with GN_Opf, followed by i/o operations (OS_Gb, OS_Pb, OS_Frm, OS_Fwm, OS_Mv...) and ended by closure with GN_Cl. All usual read and write operations are performed like standard RAM files thanks to a temporary ram files in :RAM.-. This functionality is transparent for end user, temporary files are deleted after closure of the file.

 

File Card format

The following is the format used in file Eprom and Flash Cards. Unfortunately this is not the conventions used by the DOR system. However, it is sufficient for traversing through the file contents. With this information you can program an application that can retreave previously 'deleted' (overwritten) files. The format is as follows:

$0000       File entry
...         File entry

... 

...         Latest file entry
...         $FF's until
$3FC0       $00's until
$3FF7       $01
$3FF8       4 byte random id
$3FFC       size of card in banks (2=32K, 8=128K, 16=256K)
$3FFD       sub-type, $7E for 32K cards, and $7C for 128K (or larger) cards
$3FFE       'o'
$3FFF       'z' (file eprom identifier, lower case 'oz')

A file entry has the form:

1 byte      n           length of filename
1 byte      x           '/' for latest version, $00 for old version (deleted)
n-1 bytes   'xxxx'      filename
4 bytes     m           length of file (least significant byte first)
m bytes                 body of file

When a file is saved to EPROM which has the same name as an existing file, the byte following the filename length, is set to zero, thus marking the file deleted. However, the name length and contents of the old file are all intact and so by directly reading the EPROM, old files can be recovered.

In OZ V4.2 and later, OS_Epr has been extended with new functionality to read / write File cards. A new system call, OS_Fep has also been introduced which writes and erases data on Rakewell Flash Cards. 

NOTE : The Wildcard handler does not handle eprom file area filenames (this part will be done by Mr G.)

...

Wildcards

Wildcards have been implemented for eprom filename manipulation. Supported wildcards are '*' and '?'. Thus :EPR.* or :EPR.? browses all available file areas. Filenames are automatically expanded in GN_Opf filename buffer. This feature is useful in Pipedream. After loading a file with wildcards, its filename is expanded without wildcards in <>FC or <>FS filename.