Technical Reference Manual
The driver software comes as a bootable device on every standard Flash Datapack and on the Flash Formatter packs.
If you have more than one Flash Datapack, they may have different driver versions.
You must install whichever version is the latest.
You see the version number when you select the 'Flash' option. (On XPs, the number is on the end of the menu.)
Note that the original flash pack driver did not display a version number.
The flashpack driver is is permanent, i.e. it does not get removed when On/Clear is pressed, even if the pack is no longer present.
In order to achieve this it has priority $F8 and assumes that it is the first item booted in. Anything else already booted in will be therefore removed from the device list.
To make the device permanent two alternative strategies are followed depending on whether the code is booted in the low 7K or in the PERMCELL. If it is booted in the low 7K then 'dva_bot' is set to the same as 'dva_top'. If it is booted in the PERMCELL then the base value (at $2000) is made equal to the value at $2002. To ensure that the flash driver is not booted in more than once bit 2 in 'dvt_spar' is set.
Every time the Organiser is rebooted 'FLASH' is re- inserted in the menu. This is to avoid the situation where FLASH has been deleted from the menu.
The flash driver re-vectors the following OS routines:
The multi-boot Flash driver allows .BIN files following the driver code to be booted in.
This is an extension to the standard Flash Driver. It requires about 500 bytes of extra code some of which will be taken out of the PERMANENT cell. For this reason it is not included in the standard driver.
The first time it boots as well as making itself permanent, it boots all the long records (02 80 type that are assumed to be .BINs) immediately after the bootable code on the pack. The second time (ie when the driver is already present) it will be boot into the PERMCELL (the existing flash driver will already take up most of the lower 7K). Once it has determined that the flash driver is already present it minimises its size and boots the following long records.
You must use 3.20 or above of BLDPACK and MAKE to utilise this feature.
WARNING: BLDPACK is unable to adjust any absolute pack addressing (used for loading overlays) in the Bins that it strings together.
Before removing the driver all other devices and their drivers must be removed by pulling out all bootable packs and devices like commslink, printer and then pressing On/Clear at the top level. This is to avoid re-revectoring problems.
Now the driver can be removed by option REMOVE in the FLASH menu.
If a device is still present the REMOVE fails with the message "BAD DEVICE CALL".
Flash Datapacks consist of either one or two Flash chips on a board with associated regulator, counters and logic. All circuitry is CMOS so reading requires very little power.
Flash Datapacks are paged and segmented. Segments control address lines A14 to A18 (16K byte blocks) and pages control lines A8 to A13 (256 byte blocks). So to get to the last byte requires the segment to be set, 63 toggles of the page and 255 toggles of the address. This will take in the order of 1 millisecond.
All Organiser models can read data from Flash Datapacks except CMs which are not able to recognise segmented packs.
Writing is done in a completely different way to ')"; onMouseout="hideddrivetip()"> EPROM s and is implemented by the driver. If the Flash driver is not present any write attempted results in a "READ ONLY PACK" error.
All Flash Datapacks have their write protect bit set to zero so that unless the Flash driver is present no writing can take place. In order that Flash Datapacks can be write protected the most significant bit of byte 8 of the header is used as the alternate write protect bit. When a pack is freshly formatted it is always 1 (ie write enabled).
Flash Datapacks can be formatted in place. To do this each byte must be written to zero and then for the one or two chips present they must commanded to erase back to FF. When doing this each byte must be checked to ensure that is has been erased properly. If not it tries another erase until either all bytes are FF or the chip is judged to have failed.
As after formatting the driver has to be copied back to the pack, there must be another flashpack (or a flash formatter pack) present otherwise DEVICE MISSING error will occur.
In Flash driver Version 1.3 and greater packs can be formatted by calling the OPL procedure FLSHFORM:("B",0) where the first parameter is the slot (B or C) and the second is whether a display is required. If the second is non-zero then the standard display is given otherwise the screen is not altered.
Formatting does consume a noticeable amount of power and it is suggested that a power supply unit is connected.
After formatting the driver has to be copied back to the pack, therefor a pack containing the driver must reside in the other slot. If no other flashpack is at hand, a ram- or datapack must be prepared to store the driver.
Never use a Formatter pack if the Flashpack itself has a later version of the software!
Developer Pack's BLDPACK and MAKE are used to create the pack.
This sample .BLD file will build a formatter pack.
FLSHFORM 16 !packname, size in kb FDRIVE19 BIN !FLASH driver
The drivers size is about 7.4k, the rest of the Pack is free and may be used as usually.
Note that datapacks must be blank and unsized to receive the device boot code.