CODINGDDI-1 Firmware: The Complete CPC 464 DISC Operating System ROM Specification

DDI-1 Firmware: Chapter 4.0 Utility Programs (2/2)
★ Ce texte vous est présenté dans sa version originale ★ 
 ★ This text is presented to you in its original version ★ 
 ★ Este texto se presenta en su versión original ★ 
 ★ Dieser Text wird in seiner Originalfassung präsentiert ★ 

Chapter 4 - Utility Programs

4.7 DISCCOPY.COM

Introduction

DISCCOPY is a CP/M transient program that copies the data from one disc onto another, using a single disc drive. The program supports the three AMSTRAD CP/M disc formats.

DISCCOPY is for use on a one drive system. For two drive systems use COPYDISC.

DISCCOPY copies eight tracks at a time and requires a minimum TPA size of 39K.

Starting DISCCOPY

The DISCCOPY program is held in a file called DISCCOPY.COM and may be invoked with the command DISCCOPY whereupon it displays a sign on message and then outputs the following prompt:-

Please insert source disc into drive A
then press any key

As copying begins and ends the following messages are displayed:

Copying started
Copying complete

Disc Formats

After the user has inserted the source disc into drive A DISCCOPY establishes its format. This format is compared with the format of the destination disc. If the two are not the same, or the destination disc has not been formatted, then DISCCOPY will format each track of the destination disc as it copies.

Copying

The source disc is copied eight tracks at a time, starting at track zero. Each block of eight tracks is read from the source disc with contiguous reads. It is then written to the destination disc, and verified, one track at a time. This keeps the number of disc interchanges required to a minimum.

Changing Discs

DISCCOPY uses drive A only for copying. Prior to reading the source disc the following prompt is displayed:-

Please insert source disc into drive A then press any key

Prior to writing the destination disc the following prompt is displayed:-

Please insert destination disc into drive A then press any key

The user must ensure that the correct disc is inserted into drive A.

Multiple Copies

When copying is complete the following prompt is issued:-

Do you want to copy another disc (Y/N):_

To copy another disc the user should enter Y. To exit DISCCOPY and return to CP/M the user should enter N, which results in the following prompt being issued:-

Please insert a CP/M system disc into drive A then press any key:_

The user should insert a CP/M system disc into drive A and then press a key. DISCCOPY then initiates a warm boot to return to CP/M.

Other Messages

You must insert the source disc into drive A

This message is output if there is no disc in drive A when the user has been prompted to insert one. After this message is output the user is again prompted to insert the source disc into drive A.

You must insert a CP/M system disc
into drive A

This message is output if there is no disc in drive A when the user has been prompted to insert a CP/M system disc. After this message is output the user is again prompted to insert a CP/M system disc into drive A.

You must insert the destination disc
into drive A

This message is output if there is no disc in drive A when the user has been prompted to insert one. After this message is output the user is again prompted to insert the destination disc into drive A.

The destination disc in drive A
must be write-enabled

This message is output if the disc in drive A is write-protected. After this message is output the user is again prompted to insert the destination disc into drive A.

This message is output if the destination disc is unformatted or does not have the same format as the source disc.

WARNING: Failed to copy disc correctly
The destination disc should not be used until
it is successfully copied onto

This message is output if DISCCOPY is abandoned whilst copying.

The source disc has an unknown format

This message is output if DISCCOPY does not recognise the format of the source disc. After this message is output DISCCOPYis abandoned.

Reading track: n

Where n is the current track number. This message is output when DISCCOPY is reading a track from the source disc.

Writing track: n

Where n is the current track number. This message is output when DISCCOPY is writing and verifying a track of the destination disc.

Failed to read source disc correctly:
track n sector m

Where n and m are the track and sector numbers of the bad sector respectively. This message is output if DISCCOPY fails to read a sector from the source disc correctly. After this message is output DISCCOPY is abandoned.

Failed to write destination disc correctly:
track n sector m

Where n and m are the track and sector numbers of the bad sector respectively. This message is output if DISCCOPY fails to write a sector to the destination disc correctly. After this message is output DISCCOPYis abandoned.

Failed to read destination disc correctly:
track n sector m

Where n and m are the track and sector numbers of the bad sector respectively. This message is output if DISCCOPY fails to read a sector from the destination disc correctly. After this message is output DISCCOPYis abandoned.

Failed to verify destination disc correctly:
track n sector m

Where n and m are the track and sector numbers of the bad sector respectively. This message is output if the data read back from the destination disc does not match that of the source disc.

Failed to format destination disc correctly: track n

Where n is the current track number. This message is output if DISCCOPY fails to format a track of the destination disc correctly. After this message is output DISCCOPY is abandoned.

↑C. . .aborted

This message is output if the user types Control-C when DISCCOPY is waiting for user input. After this message is output DISCCOPY is abandoned.

Illegal message number: Program aborted

This message indicates an error in the execution of the DISCCOPY program. It should not normally be produced.

Insufficient space in TPA

This message is output if the size of the Transient Program Area is too small to contain the buffers used by DISCCOPY. The user should warm boot CP/M with a 39K or greater CP/M system disc and invoke DISCCOPY again.

4.8 FILECOPY.COM

Introduction

The FILECOPY program has been designed to copy disc files from one disc to another whilst optionally transferring files between different user areas. All copying is carried out using drive A. If a two drive system is being used, then PI P is recommended for copying files. The three AMSTRAD CP/M disc formats are supported, however the disc to be written to must be formatted. The source and destination discs may be the same.

The file to be copied is read into a buffer before being written. The amount of buffer memory used is dynamically chosen to suit the size of TPA available.

Any source files that have a read/only status (R/0) will be copied to the destination file as read/write (R/W). Source files hidden from the directory with SYS attributes cannot be copied.

The program may be abandoned, whenever user input is required, by typing Control-C. Any file on the destination disc that has the same name as that being copied will be overwritten. The user should ensure that valuable files are not lost.

Starting FILECOPY

FILECOPY is invoked with the following command:

FILECOPY < filename > < / users>

FILECOPY can be given one or two command parameters, which are entered after the FILECOPY command, preceded by one or more space characters. The second command parameter must be separated from the first, by at least one space character. If no parameters are given, the message:

No SOURCE file present on input Line

will be displayed, before FILECOPY is abandoned.

The first parameter, < filename >, is the name of the disc file to copy, and must conform to CP/M conventions. The wildcard characters “?' and may be used in , in which case all matching files will be copied.

The second parameter, < /users >, is optional. If the parameter is used the first character must be a ' / ', otherwise the parameter will be ignored by FILECOPY. The parameter < /users> allows the selection of the user area to read the file from, and the user area to write the file to. It consists of one or two options, which may be specified in any order. No space characters are permitted after the ' / ' character, any options after a space will be ignored by FILECOPY.

The user area to read from, that is, the SOURCE user, may be chosen by using ‘S', followed by the user number.

The user area to write to, that is, the DESTINATION user, may be chosen by using 'D' , followed by the user number.

The user number for both options must be a decimal number in the range 0..15, otherwise the message:

Invalid user number in options

will be given and FILECOPY will be abandoned. Numbers less than ten may include an optional leading zero.

If FILECOPY cannot recognise any option, or if a number is longer than two digits, the message:

Syntax error in options

will be given and FILECOPY will be abandoned.

When the ‘ S ' option is used the message:

Copying will be from user n

where n is a decimal number in the range 0..15, will be printed as confirmation. When the ‘ D ' option is used the message:

Copying will be to user n

will be displayed. If both the ‘ S ' and ‘ D ' options are used the message:

Copying will be from user n to user n will be given.

If the second parameter is omitted, or ignored by FILECOPY, the current user number is assumed for both reading and writing of files: no confirmation is displayed.

Copying a single file

When 'filename' does not contain any wildcard characters a single file is copied. The message:

Please insert SOURCE disc into drive A then press any key:_

is given as a prompt. The user should then insert the disc that holds the file to be copied, and then press any of the alphanumeric keys. FILECOPY will then look for the source file on the disc. If the file cannot be found the message:

No SOURCE file present on disc

will be given, and FILECOPY will prompt for a CP/M system disc to be inserted, before abandoning. When the source file has been found, the message:

Copying started....

is printed and the file is then read into a buffer until either the end of the file is reached, or the buffer becomes full. The prompt:

Please insert DESTINATION disc into drive A
then press any key:_

is then displayed. The user should then insert the disc to write the file to, and press a key. The buffer is then written to the disc. If the file cannot be copied in one go, the source disc will again be asked for. The copy process will repeat until the destination file is complete. Note that a large file will require many disc changes. Upon completion of the copy, the message:

< filename > Copied.

is printed as confirmation. < filename > will be the name of the file actually copied. When all files have been copied the message:

Copying complete
Please insert a CP/M system disc into drive A
then press any key:_

will be given. The user should then insert a disc with CP/M on it and press a key. FILECOPY will then finish.

Copying Multiple Files

When < filename > contains wildcard characters FILECOPY will allow any matching files to be copied, in a continuous fashion. After prompting for the source disc the message:

Ambiguous filename:
Confirm individual files (Y/N)?

is displayed. If the user wishes to copy only some of the matching files then ‘Y' should be typed. In this case FILECOPY will search for all matching file names, one at a time, displaying each on the screen, with the message:

< filename > Copy (Y/N) ?

where is the name of a matching file. If the user types ‘ Y ' then the filename is stored in a buffer, ready for copying, and the search for matching files continues. If confirmation of individual files is not selected then all matching filenames are read into a buffer, without being listed. If FILECOPY cannot find any matching filenames on the source disc, then the message:

No SOURCE file present on disc

will be printed and FILECOPY will be abandoned. If ‘N' has been entered as confirmation for each file name listed, then the message:

No files to copy

will be given and FILECOPY will also be abandoned.

Once all matching filenames have been obtained each file is copied as if it were a single file.

Examples Of Use

FILECOPY STAT.COM

Copy the single file STAT. COM

FILECOPY HELLO.* /S4

Copy all files matching HELLO.* from user 4 to current user.

FILECOPY WHAT7.COM /D3S1

Copy all files matching WHAT7.COM from user 1 to user 3

FILECOPY PIP.COM /S12D01

Copy PIP.COM from user 12 to user 1.

Error Messages

During the operation of FILECOPY the following error messages may occur.

↑C . . .aborted

The user has typed Control-C whilst FILECOPY was waiting for a key to be pressed. The program is abandoned.

Failed to open SOURCE file correctly

This message is given when FILECOPY cannot open the source file. This may be due to a read fail, or the insertion of an incorrect source disc. The program is abandoned.

Failed to close DESTINATION disc correctly

This message is generated when the destination file cannot be closed. This may be due to the disc directory being full. The program is abandoned.

DESTINATION disc directory full

This message is generated when there is no room to create a new file in the directory of the destination disc. The program is abandoned.

DESTINATION disc full

This message is generated when the there is no more storage space on the destination disc. The program is abandoned.

The DESTINATION disc has an unknown format

This message is printed when the destination disc does not have any of the three AMSTRAD formats, if the disc is unformatted, or if the disc is corrupt. The destination disc prompt is repeated.

The SOURCE disc has an unknown format

This message is printed when the source disc does not have any of the three AMSTRAD formats, if the disc is unformatted, or if the disc is corrupt. The SOURCE disc prompt is repeated.

SOURCE disc missing

A key has been pressed in response to the source disc prompt without a disc in the drive. The prompt is repeated.

DESTINATION disc missing

A key has been pressed in response to the destination disc prompt without a disc in the drive. The prompt is repeated.

DESTINATION disc is write protected

This message is displayed when FILECOPY is unable to write to the destination disc because the disc is write protected. The user should re-insert the same destination disc with the write protect tabs disabled. The destination disc prompt is repeated.

Incorrect DESTINATION disc

The user has inserted a destination disc different to that originally used to copy the file to. This message is only displayed when more than one buffer of data is required to copy a file. The program is abandoned.

Failed to read SOURCE disc correctly

This message is output if the source file is incomplete, has zero length, or if a read fail has occurred. The program is abandoned.

Failed to write DESTINATION disc correctly

This message is displayed if a write fail occurs whilst copying to the destination disc. The program is abandoned.

WARNING: DESTINATION file < filename > is incomplete

This message is output if FILECOPY cannot successfully write the destination file .

Sign-off Messages

FILECOPY V2.1 abandoned

This message is displayed whenever the normal operation of FILECOPY has been affected. The last file to be copied may be incomplete.

FILECOPY V2.1 finished

This message is given after FILECOPY has successfully copied all files, as requested.

4.9 FORMAT.COM

Introduction

FORMAT is a CP/M transient program that formats discs for AMSTRAD CP/M. The program supports the three AMSTRAD CP/M disc formats.

Starting FORMAT

The FORMAT program is held in a file called FORMAT.COM and may be invoked with the command:

FORMAT < optional format parameter >

whereupon it displays a sign on message and then validates the format parameter, if one is specified.

FORMAT Parameter

When FORMAT is invoked the user may select which format is to be used, by specifying a format parameter. The parameter may be one of S, V, D or I as detailed below and is entered after the FORMAT command, the two being separated by at least one space character.

  • S-SYSTEM format
    V-VENDOR format
    D-DATA-ONLY format
    I-IBM PC format

The S and V options create discs with the same physical format. The difference is that the V option does not initialize the system tracks. This allows CP/M packages to be distributed on CP/M discs that do not contain the CP/M operating system and thus do not break the Digital Research licensing agreements.

If no parameter is specified then the S option is assumed. If the user enters an illegal parameter (i.e. not S, V, D or I) then the following message is output and the FORMAT

program is abandoned:

Bad format option
(you may only enter S, V, D, or I)

System Discs

When formatting system discs the two reserved system tracks must be set up correctly. To do this FORMAT reads these two tracks from the disc that is in drive A when FORMAT is invoked. If this disc is not a system disc then the following message is output and FORMAT is abandoned.

The disc in drive A is not a system disc

Formatting

Once the format parameter has been succesfully validated FORMAT outputs the following prompt:-

Please insert the disc to be formatted into
drive A then press any key

As formatting begins and ends the following messages are displayed:

Formatting started
Formatting complete

Tracks are formatted sequentially, starting at track zero. After each track is formatted, all sectors on the track are read back to ensure they have been formatted correctly. The data read from each sector is ignored.

Multiple Formats

When formatting is complete the following prompt is issued:-

Do you want to format another disc (Y/N):_

To format another disc the user should enter Y. To exit FORMAT and return to CP/M the user should enter N, which results in the following prompt being issued:-

Please insert a CP/M system disc into drive A then press any key:_

The user should insert a CP/M system disc into drive A and then press a key. FORMAT then initiates a warm boot to return to CP/M.

Other Messages

You must insert a CP/M system disc
into drive A

This message is output if there is no disc in drive A when the user has been prompted to insert a CP/M system disc. After this message is output the user is again prompted to insert a CP/M system disc into drive A.

You must insert the disc to be formatted into drive A

This message is output if there is no disc in drive A when the user has been prompted to insert one. After this message is output the user is again prompted to insert the destination disc into drive A.

The disc to be formatted in drive A
must be write-enabled

This message is output if the disc in drive A is write-protected. After this message is output the user is again prompted to insert the destination disc into drive A.

WARNING: Failed to format destination disc
correctly
The destination disc should not be used until
it is successfully formatted

This message is output if FORMAT is abandoned whilst formatting.

The disc in drive A is not a CP/M system disc

This message is output when FORMAT attempts to read the two reserved system tracks from a non CP/M system disc. After this message is output FORMAT is abandoned. The user should insert a CP/M system disc into drive A and invoke FORMAT again.

Formatting track: n

Where n is the current track number. This message is output when FORMAT is formatting a track from the source disc.

Failed to read source disc correctly:
track n sector m

Where n and m are the track and sector numbers of the bad sector respectively. This message is output if FORMAT fails to read a sector from the reserved system track correctly. After this message is output FORMAT is abandoned.

Failed to read destination disc correctly:
track n sector m

Where n and m are the track and sector numbers of the bad sector respectively. This message is output if FORMAT fails to read a sector from the destination disc correctly. After this message is output FORMAT is abandoned.

Failed to format destination disc correctly: track n

Where n is the current track number. This message is output if FORMAT fails to format a track of the destination disc correctly. After this message is output FORMAT is abandoned.

↑C . ..aborted

This message is output if the user types Control-C when FORMAT is waiting for user input. After this message is output FORMAT is abandoned.

Illegal message number: Program aborted

This message indicates an error in the execution of the FORMAT program. It should not normally be produced.

4.10 SETUP.COM

Introduction

SETUP is a CP/M transient program that allows the user to setup the parameters within the configuration sector of an AMSTRAD CP/M system disc.

Configuration Sector

AMSTRAD CP/M allows the user to set the initial values of certain parameters when CP/M is invoked. These parameters are held in a special sector on the system track called the configuration sector. Refer to chapter 2.13 for details of the format of the configuration sector.

SETUP is a program that allows the user to set the values of the parameters held in the configuration sector of a disc in drive A. SETUP allows the user to change the following configuration parameters:-

  1. Initial command buffer.
  2. The sign-on string.
  3. Printer power-up string.
  4. Keyboard translations.
  5. Keyboard expansion strings.
  6. IOBYTE setting.
  7. Saving alternate and IY registers enable/disable.
  8. BIOS messages enable/disable.
  9. Initial command buffer clearing.
  10. Motor on delay.
  11. Motor off delay.
  12. Drive stepping rate
  13. Z80 SIO channel A baud rate, data bits, parity and stop bits.
  14. Z80 SIO channel B baud rate, data bits, parity and stop bits.

Starting SETUP

The SETUP program is held in a file called SETUP.COM and may be invoked with the command SETUP whereupon the program steps through all the parameters in the configuration sector allowing the user to change only the ones required.

If the configuration sector is invalid then SETUP displays the following message:

-Invalid config sector:
Do you want to use default settings (Y/N):_

If the user enters N in response to the above prompt then SETUP is abandoned. Otherwise the following default parameters are used: -
  1. Initial command buffer is empty.
  2. The sign-on string is empty.
  3. Printer power-up string is empty.
  4. No keyboard translations are set.
  5. No keyboard expansion strings are set.
  6. The default IOBYTE is set for CON:=CRT:, RDR:=TTY:, PUN:=TTY: and LST:=LPT:.
  7. Alternate and IY register saving enabled.
  8. BIOS messages are enabled.
  9. The initial command buffer will be cleared on keyboard input.
  10. The motor on delay is set to 50.
  11. Themotoroffdelayissetto250.
  12. The drive stepping rate is set to 12 milliseconds
  13. Z80 SIO channel A is set for 9600 baud, 8 data bits, no parity and 1 stop bit.
  14. Z80 SIO channel B is set for 9600 baud, 8 data bits, no parity and 1 stop bit.

The following sections of this document detail how SETUP allows the user to change each of these parameters.

Entering Control Codes

A number of SETUP options prompt for text input. Most control codes may be entered simply by pressing the relevant control keys. However, a number of control codes have special meanings and are not entered into the text buffer. These control codes are detailed below. Refer to CP/M BDOS function 10 (read console buffer) documentation for further details on the actions of these control codes.

  • Control-C warm boots when at the beginning of a line
  • Control-E causes physical end of line
  • Control-H backspace one character position
  • Control-J (line feed) terminates input line
  • Control-M (return) terminates input line
  • Control-R retypes the current line after new line
  • Control-U removes current line
  • Control-X same as control-U

The above control codes (and indeed all others) may be entered into the text buffer as up-arrow followed by the ASCII character that represents the required control code, e.g. | C is translated into Control-C. This translation is performed by setting the three most significant bits of the ASCII character code to zero. Thus, control codes may be represented by one of three ASCII characters, e.g. Control-C may be represented by f #, | C or f c.

Two up-arrows next to each other are translated into one.

Initial Command Buffer

This buffer allows the user to specify up to 128 characters that will be input to CP/M automatically when CP/M is invoked. If the initial command buffer is empty then SETUP displays the following prompt:

**Initial command buffer empty
Is this correct (Y/N):_

Otherwise SETUP displays the current contents of the initial command buffer as follows:-

Initial command buffer:
"command buffer"
Is this correct (Y/N) :_

Where "command buffer" is the current contents of the initial command buffer. If the user enters Y in response to the above then the initial command buffer remains unaltered and SETUP moves on to the next parameter. If the user enters N then the following prompt is displayed:-

Enter new initial command buffer:_

and the user may then enter the required initial command buffer of up to 128 characters in length. When the new buffer has been entered, it is displayed and the user asked if this is correct, if not the process is repeated until it is.

Sign-on string

This is a string of characters that is output to the screen when CP/M is invoked. SETUP prompts the user in the same manner as for the Initial command buffer. The sign-on string may be up to 253 characters long.

Printer Power-up String

This is a string of characters that is output to the BIOS list device when CP/M is invoked. Note that the actual physical device the string is sent to, depends on the default setting of the IOBYTE. SETUP prompts the user in the same manner as for the Initial command buffer. The printer power-up string string may be up to 253 characters long.

Keyboard Translation Table

This is a table that redefines the codes generated when keys are pressed. Each entry in the table has four parameters as detailed below:-

< keynumber > , < normal >, < shift >, < control >

  • The < key number > is a number in the range 0 to 79, specifying which key to redefine.
  • The < normal >, < shift > and < control > parameters, if present, are numbers in the range 0 to 255. These parameters redefine the value to be generated when the key is pressed as follows:-
  • < normal> the value when neither Shift nor Control is pressed.
  • < shift> the value when shift, but not Control, is also pressed, control ' the value when Control is also pressed.
  • The values generated by keys are interpreted as follows:-
    • 0-31 Control characters which usually have special effects.
    • 32-127 Ordinary ASCII characters
    • 128 -159 The special characters which are expanded according to the expansion strings that are setup.
    • 160 - 223 Ordinary characters - not all CP/M programs will be able to cope with characters in this range.
    • 224 - 254 Reserved for special use by the firmware.
    • 255 Ignored.

If no keyboard translations are set then SETUP displays the following prompt:

No keyboard translations set
Is this correct (Y/N) : _

Otherwise SETUP displays the current keyboard translation settings as follows:-

Keyboard translations:
KeyCode Normal Shift Control
69 97 65 1
54 98 66 -

...etc

Is this correct (Y/N):_

Where dash means the translation remains unchanged. If the user enters Y in response to the above prompt then the keyboard translations remain unaltered and SETUP moves on to the next parameter. If the user enters N then the following prompt is displayed:-

Enter required command from:-

A-Add key translation to table
D-Delete key translation from table
C-Clear translation table
F- Finish translations

Command:_

The user should then enter the appropriate command letter followed by a suitable number of parameters. Spaces or commas must be used to separate each parameter. The parameters required by each command are as follows:-

A , < key number >, < normal > , < shift >, < control >
D , < key number >
C
F

Note that the C and F commands require no parameters.

When the F command has been entered the translation table is displayed and the user asked if this is correct, if not, the process is repeated until it is.

Keyboard Expansion Table

This is a table that redefines the 32 expansion characters. Each entry in the table contains the expansion character and its associated expansion string.

The normal default keyboard expansions 0 to 12, assigned to keys on the numeric keypad, are already set up. The keyboard expansion table allows the user to add extra expansions or to modify the default expansions.

If no extra or modified keyboard expansions are set SETUP displays the following prompt:

No keyboard expansions set
Is this correct (Y/N):_

Otherwise SETUP displays the extra or modified keyboard expansion settings as follows:-

Keyboard expansion strings:

Expansion TokenExpansionstring
0
1
DIR ^ M
STAT ^ M

etc...

Is this correct (Y / N):_

If the user enters Y in response to the above prompt then the keyboard expansions remain unaltered and SETUP moves on to the next parameter. If the user enters N then the following prompt is displayed:-

Enter required command from:-
A-Add keyboard expansion to table
D-Delete keyboard expansion from table
C-Clear expansion table
F-Finish keyboard expansions
Command:_

The user should then enter the appropriate command letter followed by a suitable number of parameters. Spaces or commas must be used to separate each parameter. The parameters required by each command are as follows:-

A , < key number >, < expansion string >
D,< key number >
C
F

Note that the C and F commands require no parameters. The A command requires an expansion string of up to 30 characters in length. When the F command has been entered the expansion table is displayed and the user asked if this is correct, if not, the process is repeated until it is.

Default IOBYTE Setting

The default IOBYTE setting is the value loaded in to the CP/M IOB YTE at location #0003 in RAM when CP/M is invoked. SETUP displays the current default settings of the IOBYTE as follows:-

Default 10 byte settings are:

CON: is assigned to CON-DEV
RDR: is assigned to RDR-DEV
PUN: is assigned to PUN-DEV
LST: is assigned to LST-DEV
Is this correct (Y/N):_

Where:

CON-DEV is the default device assigned to CON:
RDR-DEV is the default device assigned to RDR:
PUN-DEV is the default device assigned to PUN:
LST-DEV is the default device assigned to LST:

If the user enters Y in response to the above prompt then the default IOBYTE settings remain unaltered and SETUP moves on to the next parameter. If the user enters N then the following prompt is displayed:-

Enter required 10 byte setting:_

The user may then assign one of the four CP/M logical devices to one of its associated physical devices.

< logical device > < physical devive >

Where 'logical device' is one of CON: RDR: PUN: LST: and 'physical device' is one of CRT: TTY: BAT: UC1 : PTR : UR1 : UR2 : UP1 : UP2 : LPT:

U L1 :. The two devices must be separated by at least one space, comma or equals sign. For example CON:=CRT : may be used to assign the logical device CON: to the physical device CRT:. Detailed below are all the valid assignments of logical to phyisical devices:-

CON : may be assigned to: TTY : CRT : BAT : UC1 :
RDR : may be assigned to: TTY: PTR: UR1: UR2:
PUN : may be assigned to: TTY : PTR : UP1 : UP2 :
LST : maybe assigned to: TTY : CRT : LPT : UL1 :

Refer to chapter 2.7 for further details on the above assignments.

When a new default IOBYTE setting has been entered it is displayed and the user asked if this is correct, if not the process is repeated until it is.

Alternate and IY Register Saving enable/disable (MODE).

The MODE setting defines whether or not the BIOS saves the alternate and IY registers. SLOW mode means that the BIOS does save these registers and is the recommended mode. FAST means that the BIOS does not save these registers. The terms SLOW and FAST are misnomers. SETUP prompts as follows:

Default mode setting is < mode >
Is this correct (Y/N) :_

Where < mode > is the default mode, either fast or slow. If the user enters Y in response to the above prompt then the default MODE setting remains unaltered and SETUP moves on to the next parameter. If the user enters N then the default MODE is changed to the other state and the user asked if this is correct, if not the process is repeated until it is.

It is recommended that the user does not select FAST mode unless there are some special requirements. Any application program which requires the alternate or IY registers will not work in FAST mode, e.g. DR LOGO.

BIOS Message Enable/Disable

The value of this parameter defines whether BIOS error messages are enabled or disabled when CP/M is invoked. SETUP displays the current default state as follows:-

Default: BIOS messages < state >
Is this correct (Y/N)

Where < state > is the default message state, either enabled or disabled. If the user enters Y in response to the above prompt then the default message setting remains unaltered and SETUP moves on to the next parameter. If the user enters N then the default state is swapped to the other state and the user asked if this is correct, if not the process is repeated until it is.

Initial command buffer clear/preserve

The value of this parameter defines whether the initial command buffer is cleared when a key is pressed on the keyboard. SETUP displays the current default state as follows:-

Default: < state > initial command buffer on
keyboard input
Is this correct (Y/N)_

Where < state > is either preserve or clear. If the user enters Y in response to the above prompt then the default setting remains unaltered and SETUP moves on to the next parameter. If the user enters N then the default state is swapped to the other state and the user asked if this is correct, if not the process is repeated until it is.

Drive Motor On Delay

The motor on delay specifies the length of time the BIOS must wait between turning on the drive motors and accessing the disc. The time is specified in 1/50 of a second periods. SETUP displays the current setting of the motor on delay as follows:-

Default motor on delay is < nn > 1/50
second units
Is this correct (Y/N)

Where < nn > is the current motor on delay measured in 1/50 of a second periods. If the user enters Y in response to the above prompt then the motor on delay remains unaltered and SETUP moves on to the n'xt parameter. If the user enters N then the following prompt is displayed:-

Enter new motor on delay in 1/50
second units

The user may then enter the required value of the motor on delay. When the new value has been entered it is displayed and the user asked if this is correct, if not the process is repeated until it is.

The recommended value for the DDI-l/FD-1 is 1 second, i.e. 50. A larger value will unnecessarily slow down the disc system, a smaller value will cause spurious disc errors.

Drive Motor Off Delay

The motor off delay specifies the length of time the BIOS must wait between the last disc access and turning off the drive motors. The time is specified in 1/50 of a second periods. SETUP displays the current setting of the motor off delay as follows:-

Default motor off delay is < nn > 1/50
second units
Is this correct (Y/N):_

Where < nn > is the current motor off delay measured in 1/50 of a second periods. If the user enters Y in response to the above prompt then the motor off delay remains unaltered and SETUP moves on to the next parameter. If the user enters N then the following prompt is displayed:-

Enter new motor off delay in 1/50 second
units

The user may then enter the required value of the motor off delay. When the new value has been entered it is displayed and the user asked if this is correct, if not the process is repeated until it is.

The recommended value is 5 seconds, i.e. 250. The reason for leaving the motor on after a disc operation is to avoid the motor start-up delay in the event of another disc operation occurring shortly afterwards. However, leaving the motor on for long periods of time causes unnecessary drive wear. The time of 5 seconds is a compromise, the user may freely increase this if required.

Stepping Rate

The stepping rate specifies the speed at which the disc drive head may be stepped across the disc. The time is specified in milliseconds. SETUP displays the current setting of the stepping rate as follows:-

Default stepping rate is < nn > milliseconds
Is this correct (Y/N):_

Where < nn > is the current stepping rate measured in milliseconds. If the user enters Y in response to the above prompt then the stepping rate remains unaltered and SETUP moves on to the next parameter. If the user enters N then the following prompt is displayed:-

Enter new stepping rate in milliseconds:_

The user may then enter the required value of the stepping rate. When the new value has been entered it is displayed and the user asked if this is correct, if not the process is repeated until it is.

The step rate should be 12 milliseconds for the DDI-l/FD-1 drives. Other drives may require a different step rate.

Serial Interface Channel A Configuration

A number of parameters may be specified for the configuration of channel A of the serial interface. These parameters are:-

  • Tx baudrate - the default value of the transmit baud rate.
  • Rx baudrate - the default value of the receive baud rate.
  • Data bits - the default number of data bits
  • Parity - the default parity setting
  • Stop bits - the default number of stop bits

SETUP displays the default settings of the Z80 SIO CHANNEL A as follows:-

Z80 SIO Channel A: <AA> tx baudrate,
< BB > rx baudrate, < CC > data bits
< DD > parity, < EE > stop bits
Is this correct (Y/N):_

Where: < AA> is the default transmit baud rate
< BB > is the default receive baud rate
< CC > is the default number of data bits 5,6,7 or 8
< DD > is the default parity setting Even, Odd or None
< EE > is the default number of stop bits 1,1.5 or 2

The following baud rates are supported:-

19200 9600 4800 3600 2400 2000
1800 1200 600 300 200 150
110 75 50

If the user enters Y in response to the above prompt then the default configuration of channel A remains unaltered and SETUP moves on to the next parameter. If the user enters N then the following prompt is displayed:-

Enter Channel A parameters:-

The user may then enter the required configuration parameters in the order defined above. If any of the parameters are invalid or out of range then a suitable error message is output and the user must enter all the parameters again. When the new values have been successfully entered they are displayed and the user asked if this is correct, if not the process is repeated until it is.

Serial Interface Channel B Configuration

A number of parameters may be specified for the configuration of channel B of the serial interface expansion board. These parameters are:-

  • Baud rate - the default value of the transmit and receive baud rate.
  • Data bits - the default number of data bits
  • Parity - the default parity setting
  • Stop bits - the default number of stop bits

SETUP displays the default settings of the Z80 SIO CHANNEL B as follows:-

Z80 SIO Channel B: < AA > baudrate, < BB > data bits
< CC > parity, < DD > stop bits
Is this correct (Y/N):_

Where: < AA > is the default Transmit and receive baud rate
< BB > is the default number of data bits 5,6,7 or 8
< CC > is the default parity setting Even, Odd or None
< DD > is the default number of stop bits 1,1.5or 2

The following baud rates are supported:-

19200 9600 4800 3600 2400 2000
1800 1200 600 300 200 150
110 75 50

If the user enters Y in response to the above prompt then the default configuration of channel B remains unaltered and all parameter setting is complete. If the user enters N then the following prompt is displayed:-

Enter Channel B parameters:-

The user may then enter the required configuration parameters in the order defined above. If any of the parameters are invalid or out of range then a suitable error message is output and the user must enter all the parameters again. When the new values have been successfully entered they are displayed and the user asked if this is correct, if not the process is repeated until it is.

Updating the system disc

Once the user has setup all the parameters SETUP then issues the following prompt:-

Do you want to update your system disc (Y/N):_

If the user enters N in response to the above prompt then SETUP is abandoned, without altering the system disc. If the user enters Y then the disc in drive A is updated with the new parameter settings. The following prompt is then output:-

Do you want to restart CP/M (Y/N):_

If the user enters N to the above prompt then SETUP exits via a warm boot. If the user enters Y then SETUP initiates a complete power-up initialization of CP/M so that the newly configured parameters come into effect.

SETUP Messages

SETUP contains the following messages:-

Failed to read configuration sector correctly

This message is output if SETUP fails to read the configuration sector correctly. After this message is output SETUP is abandoned.

Failed to write configuration sector correctly

This message is output if S E T U P fails to write the configuration sector correctly. After this message is output SETUP is abandoned.

Failed to verify configuration sector correctly

This message is output if the data read back from the configuration sector is not the same as the data written to it. After this message is output SETUP is abandoned.

Sector buffer overflow

This message is output if there is insufficient space in the configuration sector to hold all the buffers, strings and tables. After this message is output SETUP is abandoned, without attempting to update the configuration sector.

The disc in drive A is not a system disc

This message is output when SETUP attempts to read the configuration sector from a non-system disc. After this message is output SETUP is abandoned.

Bad control character

This message is output if the user input a string which contained an up-arrow as the last character.

Bad command option (Enter A, D, C or F)

The message is output if the user entered an invalid command option when setting up the keyboard translation or expansion buffers.

Invalid number input

This message is output if S E T U P is expecting a valid number to be input and one was not found or was not terminated by a delimiter (space, comma or end-of-line).

Keyboard translation table empty

This message is output if the user attempts to delete an entry in the keyboard translation table when no translations are set.

Keyboard translation table full

This message is output if the user attempts to add an entry in the keyboard translation table when the translation table is full. Note that space has been reserved for more than 80 entries, thus this message should never be produced.

Key numbers must be in the range 0 to 79

This message is output if the user specifies a key number which is not in the range 0 to 79.

Keycodes must bein the range 0 to 255

This message is output if the user specifies a key translation code which is not in the range 0 to 255.

Keyboard expansion buffer empty

This message is output if the user attempts to delete an entry in the keyboard expansion buffer when no expansions are set.

Keyboard expansion buffer full

This message is output if the keyboard expansion buffer overflows.

Key tokens must be in the range 0 to 31

This message is output if the user specifies a keyboard expansion token that is not in the range 0 to 31.

Invalid command
(you may only specify CON:, RDR:, PUN: or LST:)

This message is output if the user specifies an illegal IOBYTE logical device.

CON: may only be assigned to
TTY:, CRT:, BAT:, or UC1:

This message is output if the user attempts to assign CON: to an illegal phsyical device.

RDR: may only be assigned to
TTY:, PTR : , UR1 : , or UR2:

This message is output if the user attempts to assign RDR: to an illegal phsyical device.

PUN: may only be assigned to
TTY: , PTP:, UP1:, or UP2:

This message is output if the user attempts to assign PUN: to an illegal phsyical device.

CON: may only be assigned to
TTY: , CRT: , LPT: , or UL1:

This message is output if the user attempts to assign LST : to an illegal physical device.

Step rate must be in the range 1 to 32

This message is output if the user specifies a step rate that is not in the range 1 to 32.

Invalid baudrate (you may only specify
19200, 9600, 4800, 3600, 2400, 2000, 1800,
1200, 600, 300, 200, 150, 110, 75 or 50)

This message is output if the user specifies an illegal baud rate for one of the two SIO ports.

Invalid data bits
(you may only specify 5, 6, 7 or 8)

This message is output if the user specifies an illegal number of data bits for one of the two SIO ports.

Invalid parity
(you may only specify ODD, EVEN or NONE)

This message is output if the user specifies an illegal parity setting for one of the two SIO ports.

Invalid stop bits
(you may only specify 1, 1.5 or 2)

This message is output if the user specifies an illegal number of stop bits for one of the two SIO ports.

↑C . . . aborted

This message is output if the user types Control-C when SETUP is waiting for user input. After this message is output SETUP is abandoned.

Illegal message number: Program aborted

This message indicates an error in the execution of the SETUP program. It should not normally be produced.

4.11 BOOTGEN.COM and SYSGEN.COM

Introduction.

The utilities BOOTGEN and SYSGEN are provided to permit reconfiguration of the system tracks on System discs, or the creation of system tracks on Vendor discs. System track reconfiguration may be caused by the need to distribute a non-standard sized CP/M system (made byMOVCPM)ora non-standard configuration (made by SETUP).

Conversion of Vendor discs to System discs

Vendor discs are CP/M system discs with blank system tracks. They are intended for the distribution of applications software and require the addition of system track information before they can be used. It is feasible, using the FILECOPY utility, to transfer the contents of a Vendor disc to a suitable System disc thereby avoiding the necessity for ever using SYSGEN or BOOTGEN in this context. It is prudent NEVER to convert the original Vendor disc, but to convert a copy of it (having used DISCCOPY or COPYDISC).

The conversion is achieved by invoking each of the utilities once in turn.

BOOTGEN should be invoked first by simply typing BOOTGEN.

The utility will first ask for the source disc, from which it will read the bootstrap and configuration information - just type [ENTER] to use the System disc already in the drive, otherwise insert the required alternative system disc and type [ENTER],

When the information has been read, BOOTGEN will then ask for the destination disc, you should now insert the vendor disc which you wish to convert.

You will need to insert a proper system disc when asked for a CP/M disc at the end of the program, since the disc you have written to only contains half of the required CP/M information.

In order to generate the second half of the CP/M information SYSGEN must be executed in exactly the same way, once it has been invoked by typing SYSGEN.

When you exit from this second utility, the vendor disc will now be correctly configured as a system disc.

Distribution of Non-standard version of CP/M

The system track information is held in two different blocks on the reserved tracks of a system disc. One section contains the boot sector (i.e. what is executed on start-up) and the configuration sector (this contains information such as sign-on message, key translations and disc drive hardware parameters).

The boot sector is common to all system discs i.e. they do not vary if a different size CP/M is constructed. The configuration sector is peculiar to a particular application, and is set up independently. These sectors need not, therefore, be updated when altering the CP/M size on an existing disc.

The second section of system data contains the CCP and the BDOS, which do need to be reconfigured for a different size CP/M. The CCP and BDOS for a different size CP/M is created by the utility MOVCPM and is left in memory when that program has finished executing (see chapter 2.6). SYSGEN can regenerate system tracks either directly from this memory image, or from a file copy of it. Such a file copy of the memory is made by invoking the ‘SAVE34 . . .' as prompted by MOVCPM.

The SYSGEN program makes certain checks to ensure that the information about to be written to the system tracks is suitable.

To reconfigure the system tracks SYSGEN should be invoked in one of the two following formats:

SYSGEN *
SYSGEN < filename >

SYSGEN * generates system tracks from the memory image following a MOVCPM < nnn > *. Where < nnn > is the size of the CP/M system, see chapter 2.6. Note that the * parameter for MOVCPM is mandatory.

SYSGEN < filename > generates the tracks from the relevant records in the file specified. < filename > cannot contain any wildcards.

Distribution of non-standard Configurations

The SETUP utility provides a method of customizing the Configuration sector. It is possible to transfer a configuration sector from one disc to another by running the SETUP utility making no changes and saving the result to the required destination disc. It is somewhat simpler to run the BOOTGEN utility which will copy the bootstrap sector (the same on all discs) and the required configuration sector. The utility will prompt for source and destination discs.

Summary

BOOTGEN copies Boot and configuration sectors.
SYSGEN copies CCP and BDOS.
SYSGEN * saves CCP and BDOS from TPA image.
SYSGEN < filename > writes CCP and BDOS from SAVEd file of TPA image.

BOOTGEN and SYSGEN Messages

Please insert SOURCE disc into drive A and press any key
Please insert DESTINATION disc into drive A and press any key

Generated when the program requires access to a disc to either read a file or to read or write system tracks.

File not found

Generated when the SOURCE file (generally produced following a MOVCPM) that has been specified in the invocation line cannot be found on the currently selected user number of the inserted disc.

Loading

Indicates that the SOURCE file specified on the invocation line has been found on the disc and a load of the relevant part is being attempted.

< filename > has incorrect format

The SOURCE file specified does not have sufficient records for it to contain the required information.

Ambiguous SOURCE filename

The filename specified contains wildcard characters and cannot therefore be correctly opened.

↑C . ..aborted

The user has pressed Control-C during execution of the utility and its operation has therefore been aborted.

MOVCPM memory image not present in TPA

The user is attempting to generate system tracks from data that has not either been created from MOVCPM or taken from existing system tracks.

SOURCE disc is not system format
DESTINATION disc is not system format

The user is trying to read/write the system tracks on a disc with format other than System and which therefore does not possess system tracks.

SOURCE disc has unknown format
DESTINATION disc has unknown format

The user is trying to read/write to a disc which is not of a standard AMSTRAD format.

SOURCE disc missing
DESTINATION disc missing

The program is trying to perform a disc operation when there is no disc present in the drive.

DESTINATION disc is write protected

Produced when the program is unable to write to a disc because it is write protected.

SOURCE disc error
DESTINATION disc error

A read/write operation has failed due to reasons other than those described above. This message should not appear during normal program execution.

Do you wish to reconfigure
another disc (Y/N)? :_

Appears when the DESTINATION disc system tracks have been correctly written. Note that any additional discs will use the same system track information as the first. In order to use different information the program will have to be re-executed.

Please insert a CP/M disc into drive A
then press any key:_

When the program is exited on completion or when aborted, this message is displayed indicating that a disc from which CP/M can be warm booted should be inserted.

★ AUTHOR: Paul OVERELL
★ NOTE: RÉF SOFT158A

Page précédente : DDI-1 Firmware: Chapter 4.0 Utility Programs (1/2)
Je participe au site:

» Vous avez remarqué une erreur dans ce texte ?
» Aidez-nous à améliorer cette page : en nous contactant via le forum ou par email.

CPCrulez[Content Management System] v8.7-desktop/c
Page créée en 261 millisecondes et consultée 360 fois

L'Amstrad CPC est une machine 8 bits à base d'un Z80 à 4MHz. Le premier de la gamme fut le CPC 464 en 1984, équipé d'un lecteur de cassettes intégré il se plaçait en concurrent  du Commodore C64 beaucoup plus compliqué à utiliser et plus cher. Ce fut un réel succès et sorti cette même années le CPC 664 équipé d'un lecteur de disquettes trois pouces intégré. Sa vie fut de courte durée puisqu'en 1985 il fut remplacé par le CPC 6128 qui était plus compact, plus soigné et surtout qui avait 128Ko de RAM au lieu de 64Ko.