THE MGT PLUS D The Disc/Printer Interface for the ZX Spectrum 48K ZX Spectrum + ZX Spectrum + 128K ZX Spectrum 128K + 2 from Miles Gordon Technology USER MANUAL © MGT 1987 NOTICE ------ This manual, and the information contained herein, is copyright material and may not be reproduced, transcribed, stored in a retrieval system, translated into any language or computer language, or transmitted in any form whatsoever without the prior written consent of Miles Gordon Technology. The manual is intended to provide the user with detailed information adequate for the efficient installation and operation of the equipment involved. However, while every effort has been taken to ensure accuracy, the manufacturer assumes no liability resulting from errors or omissions in this manual, or from the use of the information contained herein. Miles Gordon Technology reserves the right both to change the specifications of the PLUS D and to revise this publication from time to time without obligation to notify any person of such revision or changes. page 1 CONTENTS -------- SETTING UP ........................................... 3 CREATING YOUR SYSTEM DISC ............................ 4 USING A DISC DRIVE ................................... 5 Compatible Disc Drives (5) Loading the Disc Operating System (5) The Catalogue (6) PLUS D Disc Drive Commands (8) Saving a File and Verifying (8) Loading a Program (9) Breaking into a Program (9) Renaming a File (9) Copying a File (10) Erasing a File (10) Creating an Autoload File (11) The Spectrum's Reset Button (11) Snapshot Files (12) Abbreviated Syntax (13) Wild-Card Files (14) Formatting New Discs (14) ERROR REPORTS ........................................ 15 ADVANCED DISC OPERATIONS ............................. 16 Sector by Sector Copying - Two Drives (16) Reading and Writing to a Sector (16) Using Streams and Channels (16) The Execute File (17) USING A PRINTER ...................................... 18 Compatible Printers (18) Setting up your Printer (18) Starting to Print - LPRINT, LLIST & SAVE SCREEN$ 1 (19) Snapshot Printing (20) Changing the Layout of your Printed Page (20) Printing from a Commercial Word-Processor (21) Other Types of Printer (22) QUICK REFERENCE GUIDE ................................ 23 GUARANTEE REGISTRATION ............................... 24 Please don't forget to fill in your Guarantee Registration form and return it to Miles Gordon Technology within 14 days of purchase. See page 24. page 2 SETTING UP ---------- WARNING: Don't forget to turn off the power to your Spectrum before you connect or disconnect any peripherals, including the PLUS D. With the power off, carefully connect your PLUS D to the computer and your disc drive and printer to the PLUS D, as shown in the diagram above. If you are using other peripherals, connect them to the computer in their normal places. If you are using a peripheral which plugs into the Spectrum's edge connector, you'll need to use a "Y" connector so that it can be attached at the same time as the PLUS D. For the first steps, you'll need to have your cassette recorder connected to the computer in the normal way. Turn the Spectrum power on and the normal Spectrum introductory screen will appear on your monitor/TV. The red indicator light on your PLUS D will come on, indicating that the electrical connection between the PLUS D and the Spectrum has been correctly made. Turn on the power to the disc drive and insert a blank disc. If you are using the Spectrum 128K or + 2, go into the EDIT mode and then move the cursor to select SCREEN. Then press ENTER. You must be in this screen mode to avoid problems later. Problems? --------- The indicator light on your disc drive stays on all the time with the PLUS D attached. Don't worry - it's normal. We keep the light on to show which was the last drive in use. Later you'll see how useful this is. page 3 CREATING YOUR SYSTEM DISC ------------------------- You'll have noticed that a cassette has been supplied with the PLUS D. The program on the System Cassette asks you a series of questions about your system - what sort of disc drive are you using? are you using a printer? etc. You need to load the program from cassette in the normal way. Make sure you have a blank disc in your drive. Don't worry about formatting the disc - that comes later. (And don't worry if you don't understand what formatting is, either: all will soon be clear!) Make sure that the drive is turned on. Then simply follow the instructions on screen. Don't worry if you make a mistake while answering the questions. You'll be given the opportunity to repeat everything at the end. By answering the questions, you create your own SYSTEM FILE. The final instructions in the program allow the file to be transferred to disc. Once this has been done, you have created a SYSTEM DISC, and if you follow our instructions carefully, you'll probably never need the System Cassette again. (But we recommend that you keep the cassette stored in a safe place, just in case! Why not store it in the PLUS D's original carton, which you should keep just in case you ever need to send the unit back for repair?) Problems with SYSTEM FILE questions? 1. I keep getting an error message "Nonsense in Basic" at the end of the section on disc parameters. What's going wrong? The problem is probably that a clean connection is not being made between the PLUS D and the computer. Try cleaning the computer's edge connector. It this doesn't work, try to borrow a friend's computer and see whether the PLUS D will work with it, If this is successful it's likely that you have a faulty line on your computer (which may not necessarily have been apparent with other interfaces). But if it still doesn't work, then you probably have a faulty PLUS D - return it. 2. I don't know the stepping rate of my disc drive. The vast majority of drives work on a 6 or 12 millisecond stepping rate. If your drive seems to be behaving erratically later, try slowing the stepping rate. Some 3" drives have a stepping rate of 30 milliseconds. 3. I don't understand the control codes in my printer manual. Yes, printer manuals are notoriously difficult. But if you are stuck, contact INDUG - the users' group. Full contact details are in the Introductory issue of FORMAT. page 4 USING A DISC DRIVE ------------------ Compatible Disc Drives The PLUS D will work with any drive which has the industry standard Shugart 400 connection interface (ask your dealer for a "Shugart 400-type") and which is capable of double density operation. This means most drives which work with the BBC range of computers (but not single density drives, and if you're buying a drive, make sure that it has its own power supply). You can use one or two drives; To get maximum efficiency from the PLUS D, we recommend 3.5" or 5.25" 80-track double sided and double density drives, which will give you up to 780K of storage per drive. But Shugart 400-type 3" drives will also work. Make sure you also buy good-quality discs which have the same specifications as your drive. If you want to use two drives, you can buy them in a single "dual" case with a single power supply and connector. Or you can use two single drives in tandem, attaching them to the PLUS D via a double drive connector. Loading the Disc Operating System Connect the computer, the PLUS D and the disc drive(s) and turn on the power. The normal Spectrum title screen will appear, and the indicator lights on the PLUS D and on disc drive 1 will come on. Insert your System Disc in disc drive 1. Type RUN, then ENTER. The disc drive will go into action for about two seconds and while this is happening, the PLUS D indicator light will temporarily go out (- the light always goes out while you are actually using the drive). When the System is loaded, the screen will display; Miles Gordon Technology G+DOS1 and an OK message: O.K. G+DOS1. 0:1 (G+DOS stands for the Gordon Disc Operating System for the PLUS D. The 1 which follows shows the version number of the DOS, and this may change from time to time.) page 5 The Catalogue Type CAT 1 (or CAT 2 if you wish to access drive 2) - ENTER. In about two seconds the screen will display: - The heading PLUS D Disc 1 (or 2) Catalogue. - A list of the files on the disc with various comments. (The maximum number of files per disc is 80.) - The amount of free space on the disc in kilobytes. A typical catalogue screen looks like this: 1 +SYSTEM 14 CDE 8192,5656 2 CONFIG 31 BAS 9100 3 CONFIG1_C 4 CDE 40300,1750 4 CONFIG2_C 14 CDE 42240,6656 5 CONFIG3_C 1 CDE 49000,60 6 snap F 97 SNP 48K 7 screen 14 SCREEN$ 8 listing 34 M/DRIVE 9 data 8 SPECIAL 10 numeric 4 D.ARRAY 11 character 5 $.ARRAY Number of free K-bytes = 667 Most of the information on this catalogue screen is automatically displayed by the PLUS D. The only information which you have to supply is the file-name, which is shown in the second column. These file-names can be up to ten characters long, in upper case or lower case characters, or both. The first column on the left shows the program number. Whenever you save a file, the PLUS D will give it the first available program number. So, if you have the catalogue shown in the example above, the next file you save will automatically become program number 12. This program number will stay the same until the file is erased (we do not list files in alphabetical order). But if you erased, say, program number 8, then the next file you save to the disc will become the new program number 8 - taking the first available program number. The third column shows the number of disc sectors used. Each sector holds 512 bytes (= 1/2 kilobyte), so to find out the number of kilobytes used for each file, divide the number in the third column by 2. The fourth column is for the type of file, which the PLUS D automatically selects. The different types are shown in the table at the top of page 7. You probably won't fully understand the significance of all these different types of file yet, but most of them are covered in this Introductory Manual. Those marked with an asterisk are likely to be used by more experienced programmers and demand fuller explanation than we can give in this Manual: but FORMAT - the newsletter published by the Users Group, INDUG - explores them in detail in regular articles. page 6 BAS = Basic CDE = Code SNP 48K = 48K Snapshot File SNP128K = 128K Snapshot File SCREEN$ = Screen File M/DRIVE = Microdrive File * SPECIAL = Special File * D.ARRAY = Data Array $.ARRAY = Character Array OPENTYP = File created by OPEN # statement * EXECUTE = Execute File * PLUS D File-Types The right-hand column in the catalogue tells you the starting address of the file, and, after the comma, the number of bytes used if it is a code file. If it is a file in Basic, the number will show the line at which the program starts. The amount of free space left on the disc is displayed in kilobytes at the bottom of the screen. Remember that the PLUS D displays all this information automatically. All you'll have to do is to select a name for each file - and we'll explain how to do this later. If your catalogue fills the screen, and you wish to scroll down to the next screen, press ENTER. You can also display an abbreviated catalogue by typing CAT 1! (or CAT 2!). This would show the same catalogue in this format: +SYSTEM CONFIG CONFIG1_C CONFIG2_C CONFIG3_C snap F screen listing data numeric character Both the full and the abbreviated catalogue can be listed on screen simultaneously. Or you could, for example, list disc 1 in full and disc 2 in the abbreviated form (but you must list the full catalogue first, as CAT 1 clears the screen, while CAT 1! does not) If you wish to print out the catalogue on your printer, you can use the special CAT #3 command. For example, to send the catalogue on drive 1 to the printer, you enter: CAT #3;1 To print an abbreviated catalogue from drive 2, you enter: CAT #3;2! Question -------- What are the files that are already on my disc - +SYSTEM, CONFIG, CONFIG1_C, CONFIG2_C, and CONFIG3_C? +SYSTEM is the system file that you created earlier. The other four files allow you to re-load the set-up program from disc if you wish to change your system file later. If you ever need to do this, simply load in the CONFIG program. page 7 PLUS D Disc Drive Commands When you use the PLUS D and a disc drive, Basic commands typed on the computer keyboard are followed by a Syntax Operator - a code to let the computer know that the instructions are directed toward the disc drive, and not, for example, to a tape recorder. For ease of explanation in this Manual, the syntax operator will always be referred to as Dl, meaning that the instruction is for drive number 1. However, when you are working on the computer, the following options are also available: Dl or dl = a command for drive 1 D2 or d2 = a command for drive 2 D* or d* = a command for the last drive in use (Programmers should note that D* is particularly useful when your disc file autoruns and calls up another file on the same drive. Also note that a variable can be assigned for drive number 1 or 2 but not for *.) By typing an upper case D rather than a lower case d when saving a file, the abbreviated disc catalogue will be displayed automatically when the save is complete. A new catalogue also appears automatically if you type an upper case D when erasing or renaming a file. Alternatively, the PLUS D also understands the Sinclair Microdrive syntax. For example, you can load a file by entering LOAD *"m";1;"file-name" The PLUS D syntax will obviously be preferred by most users, since it is much easier than Microdrive syntax. In fact, we only mention that the PLUS D understands Microdrive syntax in order to make the point that most programs written for the Microdrive will be able to run without alteration on the PLUS D's disc system. One small change may be required: if a Microdrive program uses a CLOSE # statement, you will have to modify this to CLOSE #*. We are obliged to use the * to fail syntax in order to correct a small bug in the Spectrum. Saving a File and Verifying First, ENTER this short program called "Squares". We'll use this program to show the PLUS D's various disc operations: 10 REM Squares 20 FOR n=1 TO 10 30 PRINT n,n*n 40 NEXT n Then, to save the program on the disc in drive 1, ENTER: SAVE Dl "Squares" The screen border will flash (provided that you said it should when you were setting up your System File), and after about 2 seconds the program will be saved. page 8 As described in the last section, if you have saved using a capital D, the abbreviated disc catalogue is automatically displayed. You'll see the program Squares shown on the catalogue as the last entry. But if you wish, you can do a further check to ensure that the program has been correctly saved, by entering: VERIFY Dl "Squares" When the O.K. message confirms the save, clear Squares from the computer's memory by entering NEW. Loading a Program Now you can reload Squares from the disc, by entering LOAD Dl "Squares" When the O.K. message appears, the program has been loaded, But so far we haven't given an instruction to make the program run. Let's do that now by entering: SAVE Dl "Squares" LINE 10 But of course, there's already a program called Squares saved on the disc. The PLUS D tells you this and asks you whether you wish to overwrite the existing file by entering Y (= Yes) or N (= No) Enter Y. Then: LOAD Dl "Squares" Breaking into a Program To break into the program and stop Squares running, use the normal Spectrum BREAK key. Note that BREAK will stop the computer running all normal routines, but it will have no effect during a disc read/write (i.e. Load or Save) operation until the disc activity has been completed. Renaming a File To rename a file, we use the two keywords ERASE and TO. For example, let's rename the Squares file as Example 1: ERASE Dl "Squares" TO "Example 1" The abbreviated catalogue will confirm that the change has been made. The file-names you choose can be any combination of letters and numbers - or even spaces - but the maximum number of characters is ten. You can use upper-case or lower-case characters, or both. In the catalogue, the file-names will appear exactly as you originally typed them, but when you re-load a file it doesn't matter if letters originally typed in lower case are changed to upper case, or vice versa. Warning: Don't use the characters ? or * in your file-names, as this may cause problems with other commands we deal with later. page 9 Copying a File To copy a file, use the two keywords SAVE and TO. Copy the program you have written by entering: SAVE Dl "Example 1" TO Dl "Newcopy" You'll see that before the copy is made, you are given the opportunity to change the disc. If you don't need to change the disc, press the SPACE bar and the file will be copied on the same disc with the new file-name. Perhaps you wish to back up the file on a different disc but with the same file-name. (ALWAYS do this with your important files.) In this case, using your original disc, you enter: SAVE Dl "Example 1" TO Dl Once again you are given the opportunity to change the disc before you press the SPACE bar to make the copy - and of course you'll do so if You're making a back-up on another disc. But if you don't change the disc and press the SPACE bar, you'll be told that the File-name exists and asked whether you wish to overwrite the existing file. Press Y (= Yes) to overwrite, N to cancel the command. If you are using two disc drives with the PLUS D, you can also copy a file from one drive to the other, using the command: SAVE Dl "File-name" TO D2 If you add a file-name after D2, the new copy will have this as its new file-name: otherwise, the new copy will have the same name as the original, (Note that the SAVE...TO command will not copy two types of file which we come to later - Snapshot files and files created by an OPEN # statement. When copying is complete, the Spectrum automatically receives a NEW instruction and your screen will be cleared. Check that your copy has been made, and find out how the full catalogue looks now by entering CAT 1. If you've followed the suggestions here, your catalogue should include a file called Example 1 and another called Newcopy. Note the amount of free space left on your disc. Erasing a File Let's now erase the file called Example 1, by entering: ERASE Dl "Example 1" After the erase, your abbreviated catalogue will confirm that Example 1 is no longer there. Enter CAT 1 for the full listing, and you'll see that more space has been made free on the disc (although this is such a small program that any change will be minimal!) (Note that unlike Interface 1, the PLUS D returns an error message if you try to erase a non-existent file. When using programs originally written for Microdrive, you may sometimes need to delete ERASE commands in the listing to avoid the error message when the program is running.) page 10 Creating an Autoload File An autoload file is one which loads as soon as you RUN the operating system; you are allowed one autoload file per disc. For an illustration of an autoload file, let's rename the file Newcopy. Enter: ERASE Dl "Newcopy" TO "Autoload" When the catalogue confirms that the change has been made, turn off the power to your Spectrum so that you lose everything in the computer's memory. (Turn off the power - don't use the Spectrum's reset button - we're coming to this in the next section.) Turn on the power again and load the operating system from your system disc by entering RUN. Your Autoload program (which, you'll remember, is the original Squares program) will be loaded at the same time, and instead of the normal PLUS D title screen, you'll see the Squares program running. The Spectrum's Reset Button All Spectrums from the ZX Spectrum + model onwards have a reset button which allows you to reset your system without having to turn off the mains power. When you have the PLUS D attached, and press the computer's reset button, everything stored in the Spectrum's RAM will be lost as usual, but the PLUS D still retains the operating system in its own memory - unless the DOS has been corrupted or changed in some way, and this is automatically detected. This means that you don't need to reload the PLUS D's system from the system disc - you just carry on giving normal PLUS D commands. Of course, if power to the computer is turned off, or if the system has been corrupted, the PLUS D's operating system is no longer retained in memory. To be able to use PLUS D commands, you'll then have to load the operating system from your system disc (or technically, "boot up") afresh. Problems? --------- Every time I enter a PLUS D command, nothing happens except a question mark that appears in the command line on the screen when I press ENTER. You haven't loaded the operating system - the Spectrum doesn't recognise the Dl syntax operator unless the G+DOS has been booted up. Did you forget to load the system in? Have you tried using a different system disc in case the one you're using now has been corrupted. page 11 Snapshot Files For many PLUS D users, one of the most important features will be the interface's ability to transfer virtually any piece of Spectrum software to disc easily and instantly by means of the Snapshot Button. You can take Snapshot saves at any time during a program and as often as you like; if you are a games-player, you'll find it especially valuable to be able to: - start a game at an advanced level instead of at the beginning - come back to a game on another occasion and start at exactly the point where you had to leave it last time - keep a permanent record of your high scores. A Snapshot save is made when you press the Snapshot Button on the PLUS D once. Anything and everything held in the Spectrum's memory at that time is saved to the last drive in use, shown by the indicator light on the disc drive. But there are three different types of Snapshot file. To experiment, first make sure that your system has been booted up. Then load in any program (a game is best for demonstration) in the normal way - from disc or from cassette. (If you're loading from cassette, you should of course use the Spectrum's normal LOAD "" command, and not the special PLUS D disc syntax.) When the program has loaded and started to run, press the Snapshot Button. You'll notice that your program will be frozen at its current status, and you will see a number of multi-coloured lines filling the borders on the screen. You now have three Snapshot save options: Press key 3 on the Spectrum to save only the current SCREEN. A screen save will occupy 7K of memory space on a disc. When the save is complete, you'll see that the program will continue at the same point from which you left it. Press key 4 on the Spectrum for a 48K PROGRAM to be saved to disc. Every time you save a 48K program, 48K of memory space (or actually 97 sectors) will be used on the disc. When the save is complete, in just over 3 seconds, the program will continue from the point at which you left it. If you want to, you can take more Snapshots at later points in the program until your disc is full - that's up to 16 Snapshots per disc on a 780K capacity drive. Press key 5 on the Spectrum for a 128K PROGRAM to be saved to disc. Every time you save a 128K program, 128K of space will be used on the disc (= 256 sectors). The procedure here is slightly different. The save will commence (and if you have kept flashing borders in your system file, you'll see the borders flashing), but then the program will appear to be frozen again.' If the picture on your screen (the picture - not the border) has changed, press key Y (= Yes) on the Spectrum: if it has not, press key N. The 128K save will then be complete in about 10 seconds and the program will resume from the point at which you left it. page 12 If you have loaded the program on drive 1, but wish to save your snapshot file to drive 2 - or vice versa - press the CAPS SHIFT key on the Spectrum at the same time as pressing key 3, 4, or 5. If you hit the Snapshot Button accidentally, and wish to return immediately to your program, press key X on the Spectrum. When you've saved a Snapshot file, press the computer reset button once (or in the case of Spectrums without reset buttons, turn off the power, then turn it back on again and reboot the PLUS D system). Then call up the catalogue - enter CAT 1. You'll see that your Snapshot file has been automatically labelled "Snap A/B/C" etc. with the letter of the alphabet dependent upon the file's position in the catalogue. Clearly, it would be difficult to remember the precise contents of your snapshot file if this were the only name possible. So you'll need to give your Snapshot file an identifiable file-name. First choose a new name for the file you have snapshotted and then rename it using the ERASE....TO keywords. Then, to reload Snapshot files, you enter: LOAD Dl "Your new file-name" S (for a 48K file) LOAD Dl "Your new file-name" K (for a 128K file) LOAD Dl "Your new file-name" SCREEN$ (for a screen file) Without the S, K and SCREEN$ identifiers, the Snapshot files will not load - unless you use the special abbreviated syntax. Abbreviated syntax Now that you've learnt the basic disc drive commands, we can introduce you to a much easier way of loading a file, You can just enter: LOAD p6 This has the effect of loading the file labelled number 6 in the catalogue. If you use this command you don't need to worry about the S, K or SCREEN$ identifiers to load snapshot files. It also makes it much easier to load code files. Normally, you would have to type, for example: LOAD Dl "CONFIG1_C" CODE 40300,1750 - stating the start address of the file and the number of bytes used. Instead, you can now simply enter LOAD p3. Try it. MERGE and VERIFY can also be used with the program number in this way - but ERASE cannot. Problems? --------- 1. I've found lots of programs I can't snapshot. We can't guarantee 100% success with snapshotting, but we're pretty close. If you're getting failure with several of your programs, there's probably a problem with your equipment. If you find that you can only snapshot a small number of programs per disc, this strongly suggests a problem with the heads on your disc drive. 2. I can't copy my Snapshot files using SAVE....TO. Quite right - this is a security precaution against Illegal professional copying of commercial software. page 13 Wild-Card Files Wild-card files allow you to CATalogue, copy (using SAVE...TO) or ERASE a group of similar files in a single operation. Let us imagine, for example, that you have a series of files called: numbers1, numbers2, numbers3, numbers4 To erase all of them you can enter: ERASE Dl "n*" The effect of the star is to say that all the rest of the file-name doesn't matter: you wish to erase all files commencing with "n". Be careful: this really means all files beginning with "n". You could also enter: ERASE Dl "??mb*" You would then erase all the files which have "-mb-" as their third and fourth letters. The effect of each question-mark is to say that "this letter is of no significance". The same syntax - using ? and * - is available for the SAVE...TO and CATalogue commands. Thus if you wanted to copy all the files on disc 1 to disc 2, you could enter: SAVE Dl "*" TO D2 Or if you wanted to copy your "numbers" files to drive 2 and also give them a new file-name, you could enter: SAVE Dl "numbers*" TO D2 "figures*" Note that if you are using wild-cards, the new file name must have the same number of characters as the first - in this case eight. Formatting New Discs Before a floppy disc is used for the first time, it must be formatted. You can also format a previously-used disc: the effect will be to wipe the disc clean of information. You must therefore be careful not to format a disc which contains any files you may wish to keep (and let's say it again - ALWAYS make back-up discs for important files!). It is also risky to format a disc while you are holding a program in the Spectrum's memory, in case the program is overwritten with format information. Your original system disc was formatted automatically at the end of the set-up program. But to format other discs. make sure the PLUS D system is booted, and then enter: FORMAT Dl Always make sure that you have spare formatted discs when you start work. Then, if you fill your original working disc, you can easily substitute a spare disc without interrupting your work in progress. After formatting a new disc, it's also a good idea to copy the PLUS D system file onto it, so that you always have a spare system disc available. You can copy the system to a new disc by entering: SAVE Dl "+SYSTEM" CODE 8192,6656 page 14 ERROR REPORTS ------------- There are a number of standard Spectrum error messages which will appear on screen if the command you have typed in cannot be obeyed. For full details, consult the Spectrum manual. When you are using the PLUS D, these standard error messages will continue to appear, but there are some additional error reports which refer specifically to disc handling problems. These are some of the more important you may meet. Nonsense in Basic This is a standard Spectrum error report, and if it appears as soon as you start trying to use the PLUS D, it suggests that the coonnection between the computer and the PLUS D is not being properly made, so the special PLUS D commands cannot be recognised, Or it may mean that you have typed a command incorrectly - try again. Format Data Lost This means that the disc has been damaged or the file has been corrupted - perhaps you've been working too close to a magnetic field. You won't be able to access the current file, and other files may also have been lost. Copy any remaining files to another disc immediately. Try reformatting the original disc, and if there's no permanent damage, you may be able to use it again, But don't risk storing important files on this disc. Sector Error This means that the information you've tried to save has been corrupted. You'll need to rewrite the file and save it again. But your disc has not been damaged and need not be reformatted. The numbers after the error message tell you which track and which sector have been corrupted, You should always make a back-up copy of key files. If the Sector Error or Format Data Lost messages appear regularly, you may have a problem with your disc drive. The bead may be dirty, or the drive may not be centring the discs correctly on insertion. Try cleaning the heads. If this fails, repairs may be necessary. Disc Write Protected You cannot save, erase, or otherwise modify files on this disc until you uncover the security lock on the disc. (Use the security lock on the disc to keep important files safe.) File Not Found You are trying to load, copy, verify, erase or rename a file which is not present on the disc. Check that you have typed In the file-name correctly. Make sure that you have used the file identifier - S, K or SCREEN$ - if necessary. page 15 ADVANCED DISC OPERATIONS ------------------------ Sector by Sector Copying - Two Drives FORMAT Dl TO 2 - formats the disc in drive 1 (and thus wipes it clean of data) and copies the contents of the disc in drive 2 to the disc in drive 1, sector by sector. BE VERY CAREFUL NOT TO FORMAT THE WRONG DISC. Because the copying is done a sector at a time, the copying process takes much longer than the SAVE...TO command; but the FORMAT.. TO command will give you a disc which is identical in every respect to the one which has been copied - useful if you are investigating corrupt sectors. Reading and Writing to a Sector LOAD @ D,T,S,Address SAVE @ D,T,S,Address These commands are used for reading from or writing to a specified track and sector on the disc to a memory location in the Spectrum memory area, where D = the drive number (type either 1 or 2 - not the D) T = the track number from 0 to 39 (40 track) or from 0 to 79 (80 track) To read the second side on a double-sided disc drive then 128 to 167 (40 track) or 128 to 207 (80 track) S = the sector number - from 1 to 10 Address = the start address of any location in the Spectrum memory. Nb: 512 bytes will be used. Working with a monitor program, this powerful command allows you to access a single sector on the disc from Basic. Particularly useful for breaking into, examining and modifying a Snapshot file. Using Streams and Channels i) OPEN #S; Dl "file-name" IN or OUT This command is used to open a file on the disc and attach a stream number to it, so that you can print out to or input from that Stream, where: S = Stream number - from 4 to 16 (type the number only) D = Dl or D2 (drive number - type D as well as drive no.) IN = When you specifically need an input or read file opened OUT = When you specifically need an output or write file opened If you choose not to specify IN or OUT, then the default is the same as Interface 1: an input file if the file-name is found in the catalogue, and an output file if the file-name is not found. Also available is Microdrive syntax: OPEN #S;"m";1;"file-name" page 16 ii) CLOSE #*S This command closes the file and stream opened in the previous command. S = Stream number. If you do not type the stream number, then all current open streams will be closed. Note the addition of the * to Microdrive syntax. iii) MOVE is a command which moves a file, one sector at a time, to either another file or a stream. MOVE Dl "file-name" TO #S This command reads the file and outputs it to the specified stream (where Dl = Dl or D2, and S = the stream number, from 4 to 16). MOVE Dl "file-name" TO Dl "file-name" This command reads the file and writes it to the second file. iv) CLEAR # This command clears all open streams and channels, but it does not CLOSE a file. v) CLS # This command clears the screen and attribute area, and resets BORDER, PAPER, INVERSE, BRIGHT, OVER and FLASH. The Execute File An excute file is a machine code file occupying up to one sector length of memory (510 bytes) . When loaded from disc it is executed (RANDOMISE USR) in the PLUS D RAM, and not in the Spectrum memory as other files are. An execute file gives the programmer the ability to execute utility routines - such as renumbering a program - without affecting or using the Spectrum memory. To save a sector length of memory as an execute file, enter SAVE Dl "file-name",X,Address where: Dl = Dl or D2 (drive number) X = the execute file identifier - just type X Address = the location in the Spectrum of the machine-code program, which has been assembled to run at 3BD6 hex. To load the execute file and run it internally in the PLUS D, enter: LOAD Dl "file-name" X or LOAD p(n) - in other words, the normal abbreviated syntax for LOAD. After execution, control is returned to the Spectrum. Examples of the use of these more advanced features of the PLUS D can regularly be found in FORMAT, often in programs and routines contributed by PLUS D and Disciple users. page 17 USING A PRINTER --------------- Compatible Printers The PLUS D has a printer interface designed to work with standard centronics/parallel type printers, You'll need to provide the printer cable, which may differ from printer to printer. Make sure that at the PLUS D end, the connector is the standard BBC-type - that it has a 26-way connector. The PLUS D has been set up to work automatically with Epson-compatible printers. If your printer is not Epson-compatible, you'll need to make a few changes to your System File to make it work. This is described later. The PLUS D offers sophisticated graphics printing capabilities. Obviously, daisy wheel printers, which cannot print graphics, will not be able to make full use of the PLUS D's facilities. There are also a small number of older dot-matrix printers - those which print their characters on a 7-dot rather than an 8-dot matrix - which will not print graphics with the PLUS D. Setting up your Printer If you are using a disc drive and have already set up your PLUS D System File (see page 4), then your printer will automatically be ready for action every time you boot up the system. If you don't yet have a disc drive but wish to use the PLUS D as a stand-alone printer interface, you may do so. If your printer is Epson-compatible, you should be able to plug the printer into the PLUS D (with the computer power off, of course), switch the system on and then type in POKE @ 11,0 to turn the centronics interface on. If your printer is not Epson-compatible then you'll need to use the program on the System Cassette. Connect the printer to the PLUS D and turn it on. (In this case, you don't need to enter POKE @ 11,0.) Then load the System Cassette program in the normal way (LOAD ""). When the program has loaded, you'll be asked a series of questions. The first questions relate to use of a disc drive. Press ENTER to bypass each of these questions and then press Y (= Yes) when asked "Do you want to use the PLUS D's printer port?" At this point, you'll find the answers to the questions in your printer manual. If you find that the printer manual defeats you, please contact INDUG, the Users' Group, for help. Finally, there'll be a series of questions referring to the disc drive again. Answer No to all these questions. Printing can now commence. page 18 Starting to Print - LPRINT, LLIST and SAVE SCREEN$ 1 LPRINT and LLIST have exactly the same meaning as PRINT and LIST, except that instead of making information appear on the screen, they send it to your printer. To see how they work, enter the following program - but first, check that your printer is attached to the PLUS D and turned on, and that you have set up your printer as described in the previous paragraph: 10 LPRINT "This program" 20 LPRINT "prints out the character set" 30 FOR n=32 TO 255 40 LPRINT CHRS n; 50 NEXT n RUN When you run the program, the LPRINT command sends the heading and the list of characters directly to the printer. Now enter LLIST - and the listing of your program is sent to the printer. Then enter LIST to restore the program listing to the screen. Finally, enter SAVE SCREEN$ 1. (Note that if you are using 48K mode on your computer, both SAVE and SCREEN$ must be typed in using the Spectrum keywords.) With this command, the contents of your screen are copied (technically, "dumped") to the printer. SAVE SCREEN$ 1 is a particularly powerful command: if you've set up your system to print graphics, you can dump screen pictures to your printer. There's also a SAVE SCREEN$ 2 command, which will dump a screen picture to the printer in a much larger format: with this command, you'll find that the print-out will be sideways down the page, and that the various colours on the screen will be interpreted as shades on the print-out. But, the SAVE SCREEN$ 2 command will only work with Epson-type printers which recognise the ESC * code for bit image graphics. INDUG may be able to help if your printer is unable to do the larger screen-dump. Note that you can also use SAVE SCREEN$ instead of SAVE SCREEN$ 1. Note also a peculiarity of Spectrum Basic. If you have written a program listing on screen, you cannot dump the screen directly to your printer. First you have to enter LIST: then you can use SAVE SCREEN$ 1. Or, faster would be to write your program, then simply enter LLIST. When printing, you can also use the commands TAB and AT to position your text at a certain point on the printed line or page. Try these two examples to see how the commands work: - LPRINT TAB 8: "This line is indented" ENTER LPRINT AT 4,5: "This line is less indented" ENTER In example 1, you start printing at character position 8 on the current line; in example 2, you start on line 4 at position 5. page 19 Snapshot Printing The SAVE SCREEN$ 1 command allows you to dump the screen to the printer - provided you are able to enter a Basic command. But what happens if, for example, you are in the middle of a game and you want to print the current screen but you can't exit to Basic? With the PLUS D you can still do your screen dump, using the Snapshot Button. This use of the Snapshot Button has nothing to do with the disc drive - and in fact you can do Snapshot prints even if you are not using a drive. This facility offers exciting new possibilities to games players: in an adventure game, for example, you can print out the screen at each new location, gradually building up a complete picture of all the available screens. To experiment with Snapshot printing, load a normal commercial program, preferably a game with good graphics to show the facility at its best. When you wish to print a screen, simply press the Snapshot button - in the same way as if you were taking a Snapshot save. As usual, the program is paused. If you then press key 1 on the Spectrum, you will send a 32-column screen dump to the printer. If instead you press key 2 on the Spectrum (and you have an Epson-compatible printer that understands the ESC * code), you will be able to send a large-size screen dump to the printer - just as if you had entered the command SAVE SCREEN$ 2. When printing is complete, the program will resume from the point at which you left it. Changing the Layout of your Printed Page With an Epson-compatible printer, the PLUS D's printer interface has been set up to the following standard: Line-length: 80 characters per line Line-spacing: 1/6" (=12/72" or 6 lines per inch) between lines. Line-feeds after carriage return: 1 line Left-hand margin spaces after carriage return: 0 £, #, and © symbols set to be printed: Yes Density/size of graphics: Single density graphics Character pitch: Pica (= 10 characters per inch) If you wish to change these variables, you can use a special PLUS D command - the POKE @ command. Every POKE @ command must be followed by a number, which states which variable is to be changed. For example, the POKE @ 5 statement is concerned with line length, while the POKE @ 7 statement is concerned with the spaces between lines. The number is then followed by a comma and another number, which is the variable you wish to set. For example, POKE @ 5,40 would set your line length to 40 characters per line. page 20 The POKE @ statements are temporary settings, and if you turn off your mains power, you'll need to reset them. However, the PLUS D retains POKE @ commands if you simply reset the computer: you'll be able to continue with the same variables in use. This is how to change your page layout using the POKE @ commands: Line Length: POKE @ 5,n (n = 0 to 255) default 80 The number you type in for the variable (n) will be the number of characters per line - provided your printer can cope with the number you've typed. Line-Spacing: POKE @ 7,n (n = 0 to 255) default 12 The number (n) you type in will set the spacing between lines in increments of n/72" - thus 12 is 12/72" or 1/6" (= 6 lines per inch). Line-Feeds after a Carriage Return: POKE @ 8,n (n = 0 to 255) default 0 The number you type will be the number of line-feeds. Left-hand Margin Spaces after Carriage Return; POKE @ 9,n (n - 0 to 255) default 0 The number you type will be the number of spaces before printing begins in the left-hand margin. Printing £, # and © as graphics symbols: POKE @ 10,n (n = 0 or 1) default 1 Type 1 if you need £, # and ©. Type 0 if you don't want them. Printing from a Commercial Word Processor Commonly, commercially-produced word processors and other "serious" software have a special printer driver which allows you to send your work to a printer. Much serious Spectrum software has now been modified to work with the Disciple's printer interface. The Disciple was the PLUS D's predecessor, and if your software allows you a Disciple printing option, this will also work with the PLUS D. Occasionally though, you may find that a Disciple or PLUS D printer driver is not offered. If so, and if when you try to print, you get unsatisfactory results (a common symptom is question-marks appearing in the left-hand margin), you will usually be able to solve the problem by finding the part of the program-listing which sends data to the printer and preceding it with the line: POKE @ 6,1. Then, when the printing finishes, enter the line POKE @ 6,0. What's happening here is that, by entering POKE @ 6,1 you are allowing codes embedded in the software to be sent directly through to the printer without being intercepted by the PLUS D. page 21 POKE @ 6,0 allows the PLUS D to take over again when the software's printer driver is no longer in operation. (Programmers note that POKE @ 6,1 allows the printer driver to output directly to the printer the absolute value of the code 0 to 255. Note also that under normal circumstances, if a control character is to be sent to the printer using LPRINT, then you must precede it with CHR$ 27 - even when you want to output CHR$ 27. Thus, to output CHR$ 27, CHR$ 65, CHR$ 40 you would enter: LPRINT CHR$ 27;CHR$ 27;CHR$ 27;CHR$ 65;CHRS 27;CHR$ 40 But if you enter POKE @ 6,1 first to release PLUS D control, then you will not need to precede the control characters with CHR$ 27. When you've finished, don't forget to return to POKE @ 6,0. Other types of printer If you are using a serial printer, you cannot connect it to the PLUS D, but you can continue to use the PLUS D as a disc interface. Your serial printer can be connected directly into the PS232 port on the Spectrum Plus Two as usual; or if you have a separate RS232 interface, use a Y connector so that it can be connected to the computer at the same time as the PLUS D. Similarly, the Sinclair ZX Printer can be connected at the same time as the PLUS D by using a Y connector. (Don't try to plug the PLUS D in behind the ZX printer: the printer's through port does not carry through the full signal, which the PLUS D needs.) In both cases, when the System File asks whether you are using the PLUS D's centronics printer port, answer No. You can also "turn off" the PLUS D's centronics printer port by using another POKE @ statement. POKE @ 11,1 leaves the printer channel unchanged by G+DOS: it assumes that you are using a serial printer or the ZX printer. POKE @ 11,0 makes the PLUS D's centronics printer channel active again. Ouestions/Problems ------------------ 1. I can't even find the initialisation code in my printer manual. If you can't find this code, try the code for Carriage Return, which is almost universally 13 (in decimal), or enter 128 so that no codes are sent. Remember that if you're having real difficulty in understanding your printer manual, INDUG is likely to have had previous experience with your printer. 2. Are there other POKE @ commands? Yes. If you're a serious programmer, needing fuller coverage of these - or details of the PLUS D's command codes (used in machine code routines to effect control of disc subroutines), please talk to the Users' Group. There's regular coverage in FORMAT. page 22 QUICK REFERENCE GUIDE --------------------- RUN Boots the system CAT 1 Displays catalogue CAT 1! Displays shortened catalogue SAVE Dl "file-name" Saves file VERIFY Dl "file-name" Confirms save has been made LOAD Dl "file-name" Loads file (except Snapshot files) LOAD Dl "file-name" S Loads 48K Snapshot file LOAD Dl "file-name" K Loads 128K Snapshot file LOAD Dl "file-name"SCREEN$ Loads screen file LOAD p(n) Loads the program (from its number) ERASE Dl "file-name" TO "new file-name" Renames a file ERASE Dl "file-name" Erases a file SAVE Dl "file-name" TO Dl "file-name" Copies a file FORMAT Dl Formats disc in drive 1 FORMAT Dl TO 2 Formats drive 1; copies from 2 to 1 OPEN #(n);Dl "file-name" IN or OUT Opens a file; attaches stream no. CLOSE #*(n) Closes a file & stream no. CLOSE #* Closes all open files MOVE Dl "file-name" TO *(n) Reads file; outputs to specified stream MOVE Dl "file-name" TO Dl "file-name" Reads file; writes it to 2nd file CLEAR # Clears all open streams & channels CLS # Clears screen & attributes area SAVE Dl "file-name"X,Address Saves sector length memory to disc LOAD Dl "file-name"X Execute file; runs it in PLUS D RAM LOAD @ D,T,S,Address Reads a specified track/sector to memory SAVE @ D,T,S,Address Writes to specified track/sector on disc SAVE...TO, ERASE, CAT can be used with * and ? for wild-card operations Snapshot Button halts program temporarily & allows selection of: 1 - 32 column screen-dump to printer; 2 - Large-size printer dump; 3 - Screen save; 4 - 48K Snapshot save; 5 - 128K Snapshot save; Key X breaks out of Snapshot and returns to program LLIST Prints out a program listing LPRINT "statement" Prints out statement SAVE SCREEN$ 1 Prints 32-column screen-dump SAVE SCREEN$ 2 Prints large-size screen-dump LPRINT TAB n; "statement" Prints from position n on current line LPRINT AT n,n: "statement" Prints from line n at position n page 23 GUARANTEE --------- Thank you for buying the PLUS D. To ensure your satisfaction, the product is guaranteed by Miles Gordon Technology against defective design, workmanship or materials for a period of 6 months from the date of purchase, subject to the conditions below: 1. Please complete and return to us the Guarantee Registration form at the bottom of this page, within 14 days of purchase. Until we have your registration form, we cannot undertake repairs under guarantee. 2. The guarantee only applies to the UK and to the original purchaser. 3. The guarantee is invalidated if the product is opened, modified, repaired, or otherwise tampered with by any party other than Miles Gordon Technology or their appointed agents. 4. The guarantee is also invalidated if the PLUS D has been in any way misused, used with unsuitable equipment, or subjected to deliberate, accidental or consequential damage. 5. Claims under the guarantee should be referred to the dealer from whom you purchased your PLUS D. If this is not possible, contact us directly. 6. Customers will be responsible for the cost of sending a unit back to us for repair. Please pack the product carefully (preferably in the original package) to prevent damage in transit. If posting the unit, please obtain a postage receipt and keep it safe until you have received your repaired product. Make sure you enclose your name and address, and if possible enclose a note explaining what appears to be wrong. 7. Your unit should be returned to you in working order within 28 days. If it is not, please contact us on 0223-311665, and give details of what was returned, when, and how. 8. The purchaser's sole and exclusive remedy under this guarantee is for repair or replacement of the PLUS D. No other remedy, including, but not limited to, incidental or consequential damage or loss of whatsoever nature shall be available to the purchaser. 9. This guarantee is in addition to and does not in any way affect the purchaser's statutory rights. ======================================================================= GUARANTEE REGISTRATION Please detach and return to Miles Gordon Technology, Unit 4 Chesterton Mills, French's Road, Cambridge CB4 3NP within 14 days of purchase. Name ..................................... Purchase Date.............. Address ............................................................... ....................................................................... Product No (see underside of PLUS D) .................................. Dealer's Name/Town .................................................... page 24