******************************************************************* Filename: ZVPAS.DOC.TEXT Source diskette: PASDOC: Description: Distribution documentation for AUTOBOOT PASCAL for ZVX4. ********************************************************************* (*$W*) ZVX4 PASCAL Configuration Guide SPS-D07-5 rev 0 12/1/81 Compatible with ZVX4 firmware version DDF2-8 or DDF2-8N Compatible with APPLE PASCAL version 1.1 (*$W*) ZVX4 AUTOBOOT PASCAL SOFTWARE INTRODUCTON The SVA autoboot PASCAL software will allow you to configure the APPLE PASCAL language system so that it will boot directly from 8" diskettes without a 5-1/4" disk drive. The SVA software is distributed on a 5- 1/4" diskette in order that an 8" PASCAL system diskette can be generated without the requirement that 8" APPLE PASCAL already be operational on your system. If you do not have a 5-1/4" drive, it will be necessary to generate the first system diskette with a borrowed 5- 1/4" drive . Once this has been done, further use of a 5-1/4" drive will not be required. The process of generating the 8" system disk has been simplified through the program MAKESYSTEM.CODE on the distribution diskette. This program will automatically generate the 8" equivalent of the 5-1/4" diskette APPLE1:. FEATURES OF SVA 8" PASCAL DRIVERS The SVA 8" PASCAL drivers are a set of memory resident assembly language routines which interface the APPLE PASCAL operating system to 8" drives via ZVX4. The software drivers reside in one of two areas of memory, on the PASCAL heap (the free memory area under the PASCAL system) or in bank 2 of the language card. The particular configuration will depend on the presence or absence of the file NOMINI.DRIVER on the boot diskette. If the file is absent at boot time (either removed or with its name changed) the drivers will reside on the PASCAL heap. If the file is present the drivers will reside in bank 2 of the language card, overlaying the 5-1/4" drivers. This will free the memory normally occupied by the 8" drivers (approximately 1K) at the expense of not being able to access the mini as units #11: and #12:. -1- (*$W*) In addition, if an 80 column card recognized by the system is being used (i.e., one that does not require special software drivers), another 1K of memory (half of the screen memory) will automatically be de-allocated by the PASCAL system. So, using the overlay feature guarantees the same amount of free memory for the user as would be available if mini drives alone were being used. The PASCAL operating system remains unchanged when used with the SVA drivers, with the exception of the mapping and size of the disk units. The mapping of the PASCAL disk units when booting from 8" drives is as follows: UNIT CORRESPONDING DRIVE #4: 8" drive #1 #5: " #2 #9: " #3 #10: " #4 #11: 5-1/4" drive #1 (in slot 6) #12: " #2 " Units #11: and #12:, the mini drives in slot 6 cannot be accessed if NOMINI.DRIVER was present on the boot disk at boot time. The capacities in PASCAL blocks of the different diskette configurations are as follows: Single density, single sided 494 Single density, double sided 988 Double density, single sided 988 Double density, double sided 1976 These are the number of blocks that should be specified when zeroing a disk using the Z(ero command in the Filer. The PASCAL drivers for the ZVX4 perform automatic density and sidedness detection, which means diskettes with differing sidedness and/or density can be on line concurrently. A disk unit is 'typed' for its sidedness and density whenever block 2 (the first directory block) is read. This is performed very frequently by the operating system, so the chances of the drivers mistaking a disk are slim -- but not impossible!! If different sided disks are being swapped, a 'typing' error can be avoided by listing the directory (which forces a read of block 2) before doing any writing to a disk. The disk typing operation performed by the 8" disk drivers checks for both the sidedness and density of a disk. The side checking can be defeated by closing DIP switch #1 on the ZVX4. The reason for the switch option is the side checking can result in noticeable delays when single sided disks are being typed. This is due to internal retries performed by the floppy disk controller chip which cannot be overridden. If single-sided disk drives are being used the delay can be eliminated via switch #1. The switch must be left open if double-sided drives and double sided diskettes are being used. -2- (*$W*) DISTRIBUTION DISKETTE CONTENTS The distribution diskette ZVPAS: is a standard 5-1/4" PASCAL diskette. The following files should also be present on the diskette: PASCAL.DOC.TEXT This documentation. PBOOT 6502 assembly language code which is the first stage boot code. This code resides on track 0, sector 1 of a bootable 8" PASCAL system diskette. MAKESYSTEM.CODE and WPBOOTER.CODE write PBOOT to the appropriate disk. UNITDRIVER 6502 assembly language code file which contains the heap resident drivers and the second stage boot code. This code resides on the remainder of track 0 of a bootable 8" PASCAL system diskette; it is written to track 0 by either MAKESYSTEM.CODE or WPBOOTER.CODE and is read into memory at boot time by PBOOT. CONNECT.DRIVER 6502 assembly language code file similar to UNITDRIVER containing temporary 8" drivers. CONNECT.DRIVER is loaded into memory by MAKESYSTEM.CODE if the user has booted from a 5-1/4" diskette. NOMINI.DRIVER 6502 assembly language code file containing the 8" drivers which overlay the 5-1/4" drivers. This file must be resident on an 8" boot disk at boot time if the user wishes to overlay the mini disk drivers (a memory saving feature). MAKESYSTEM.CODE Pascal code file which first writes PBOOT and UNITDRIVER to track 0 and then copies APPLE1: to an 8" diskette. WPBOOTER.CODE Pascal program which will write PBOOT and UNITDRIVER to track 0. This code must be executed whenever you wish to make a PASCAL system disk bootable. -3- (*$W*) CONFIGURATION PROCEDURE Note: The following instructions assume that the you have some experience with the PASCAL operating system. If you are using your 8" disk drives for the first time, we recommend that the you exercise them under APPLE DOS before proceeding, just to insure the hardware is working properly. Format two 8" diskettes using the formatter program on the DOS distribution diskette. (This is the diskette that was included with the controller at purchase time). These will become the 8" system diskettes. The following operations will create SYSDSK:, which will be your first 8" PASCAL system disk. It will contain all the system files on the mini diskettes, APPLE1: and APPLE2:. 1) Configure your system as follows: a) Slot 0 APPLE Language card or equivalent (requires a 48K APPLE) b) Slot 1..5 Other interface cards or empty c) Slot 6 APPLE mini disk controller d) Slot 7 ZVX4 controller (with autoboot ROM) e) DIP switch #1 on ZVX4 should be in the open position if you are using one or more double sided drives. 2) Power up and HIT RESET. You should see the BASIC prompt. 3) Insert APPLE1: into volume 4 (mini DRIVE 1) and a newly formatted 8" diskette in DRIVE 1. 4) Boot APPLE Pascal from the mini disk by typing: PR#6 5) Back up the ZVPAS: mini-diskette using the TRANSFER operation in the FILER. ie. Transfer? #4: To where? #5: (this assumes two mini disk drives) 6) From the APPLE Pascal command line, eX(ecute MAKESYSTEM. You will be asked to do the following: a) Insert a blank 8" diskette in drive #1. b) Place ZVPAS: in volume #4 (it should already be there since MAKESYSTEM has just been executed). -4- (*$W*) c) Type "S" to start. When "S" is typed the boot files PBOOT and UNITDRIVER will be written to track 0 of the 8" diskette. Next, you will be asked to insert APPLE1: into volume #4 and type "C" to copy. Doing so will cause the contents of APPLE1: to be transferred to the 8" disk. The 8" disk will have been given the name SYSDSK:, and is a bootable 8" PASCAL disk. 8) When the copy operation terminates, the 8" diskette can be tested. Remove all diskettes from the drives, power down and then power up. Insert SYSDSK into DRIVE 1 of your 8-inch drives; after some headshuffling you should be greeted with the APPLE PASCAL prompt. If this does not occur, try steps 1 through 7 once more. If you still are not successful, please contact your local Apple dealer or the dealer from whom you purchased this software for assistance. 9) Now that you have created SYSDSK: your first operation should be to make a backup copy of the diskette. The backup operation is performed from the Filer using the Transfer command. Also, since the backups need to be bootable, and the Filer does not copy the boot track (track 0) you will need to eX(ecute WPBOOTER, which will write PBOOT and UNITDRIVER to the boot track (the reason the FILER does not transfer the boot track, track 0, is block 0 begins on track 1). CREATING 8" SYSTEM DISKETTES FROM 8" DISKETTES After having configured the first 8" system disk using MAKESYSTEM, subsequent system disks can be created by transferring the appropriate system files using the Filer and then writing the booter code to track 0 by executing WPBOOTER. If a new or reformatted 8" disk needs a new directory the Z(ero command in the filer can be used (with the operator specifying the appropriate number of blocks). WPBOOTER.CODE writes the PASCAL booter code onto track 0 of an 8" PASCAL system diskette. This must be done any time a new PASCAL system diskette is created. The files used by WPBOOTER are PBOOT and UNITDRIVER; they contain the code written to track 0 and must be on the source volume number requested by the program. The prompt sequence for WPBOOTER is as follows: 'Enter source volume no:' Reply with the volume number (do not use "#" or ":") that contains the files UNITDRIVER and PBOOT followed by . 'Enter destination volume no:' Reply with the volume number to which the booter code is to be written followed by . -5- (*$W*) 'Insert source into volume X' 'Insert destination into volume Y ' 'Type "W" to write PASCAL booter:' Reply with a 'W' followed by a . If the boot writing operation was successful you will receive the prompt: 'Another disk (Y/N) ? ' A "Y" will return the program to the insert prompt above. A "N" will terminate the program. If the operation was unsuccessful you will receive an error message. Usually an error message implies a bad sector either on the source diskette (read error) or the destination diskette (write error). A read error can be checked by doing a bad block scan (in the Filer) of the source diskette. A write error cannot be checked by the same method, since track 0 is not checked by a bad block scan. The recommended procedure is to reformat the destination diskette and try again. PHYSICAL DISK I/O with ZVX4 APPLE PASCAL has the facility for performing direct disk I/O via the system intrinsics UNITREAD and UNITWRITE. Special considerations must be made when performing direct I/O with double sided and/or double density 8" diskettes. The ZVX4 drivers treat a track on side 1 (the back side) of a double sided diskette as an extension of the corresponding side 0 track. So a double sided diskette appears as having twice as many sectors per track (52 versus 26). Any translations from the sequential sector requested to the absolute track, sector, and side should take this into account. Double density density diskettes are formatted with 256 byte sectors, single density with 128 byte sectors; buffers should be sized accordingly. Proper access of a diskette requires that the diskette be properly 'typed'. Typing of a diskette can be forced by doing a BLOCKREAD of block #2. If disks are being swapped frequently, a deliberate typing operation may prevent loss of a diskette's contents. On double density diskettes track 0 is single density, which means the first 26 sectors (0-25) of a double density diskette cannot be accessed using UNITREAD or UNITWRITE. Applications that require track 0 access can use the firmware entry points. Please consult the ZVX4 manual for details. -6-