LERM - TRANSPACK ---------------- CONTENTS -------- * Introductory section. inc Guarantees. * Basic ideas behind drive transfer. incl Training steps. * Manual for TRANSFER. * More Technical information. * Manual for Advanced Header Reader. * Manual for Bytes Mover (BM). * Manual for VR code. * Simple Transfers + inform. books. * Transferring 128k programs. * Spectrum PLUS 3 Information sheet. * INFORMATION SAMPLE PACK. TRAN1-Copyright LERM 1989 LERM SOFTWARE ------------- INTRODUCTORY SHEET:TRANSPACK 1 ------------------------------ ONLY for 48k + 128k Spectrums WELCOME ------- We believe that this package of programs, together with some of our other software and transfer guides, gives you the most powerful set of utilities that are available to enable YOU to transfer YOUR programs to your drive and then get them running. The manual has been designed for use by all drive owners (e.g Microdrive, Wafadrive, +D, Disciple, Plus 2 and Plus 3, Beta disc, Swift disc, and so on). HOWEVER it can't get them ALL running and it is NOT for the person who has just purchased his Spectrum or for the person who is not prepared to work with the utilities, experiment, and put in some-effort. It does have the advantage that we are always UPDATING our software. Many hardware devices and snapshot buttons can easily be defeated and our method is the only way of overcoming this. You will also gain much satisfaction and knowledge about your Spectrum. Basically transfering programs to drive isn't simple. IT WILL, TAKE YOU TIME TO GET FAMILIAR WITH THIS PRODUCT. TAKE THINGS EASY - DON'T RUSH. TAKE VERY GOOD CARE OF THIS MANUAL AND READ IT VERY CAREFULLY. You will find that the package grows on you, and in time we hope you will be able to fully utilise its powers. IN FUTURE WE WILL USE THE FOLLOWING ABBREVIATIONS: MD = Microdrive WD = Wafadrive +D = Plus D +3 = Plus 3 +2 = Plus 2 BD = Beta Disk DIS = Disciple SD = Swift disc GUARANTEES ---------- We offer you a full money back guarantee if you are not satisfied with this product (sales purchased in the UK by MAIL order only). It DOES NOT apply to UPDATES. Naturally this can't last a lifetime, so we will give you up to 3 weeks from the date it was posted by us. If you return the product please, to help us and others, GIVE YOUR REASON(S) for your dissatisfaction. A stamped addressed envelope does help. Please mark your return package to us "REFUND". Secondly we will guarantee the TAPE for 6 months, and will replace any faulty tapes within that period. We limit you to this time because you are likely to make heavy use of the tape. After this time has lapsed you can get a replacement under our "UPDATES" service (see later on). Sorry we have to charge but tapes, duplication, postage/package, secretarial time etc, etc are not cheap, and we hope you agree that our package is very reasonably priced. FAULTY TAPES ------------ Tapes are not 100% reliable. We purchase special computer tape, but some are inevitably faulty, OR develop a fault through the post! We can't test every tape, so if ONE or MORE programs fail to work properly send them back for replacement provided they are within your guarantee period, and STATE THE FAULT. We will try to replace them promptly. Please just return the cassette marked "FAULTY" - nothing else, not even the library case. It DOES HELP if you enclose a SAE, only during our odd holiday periods will delay occur (or problems with the postal service). UPDATE SERVICE -------------- As the program is improved you will no doubt want to obtain the latest version. As a former customer you are entitled to buy the latest verion with £2 off the latest price, but you must send back the old tape (not library case), and an SAE, as well as the cash. CONTENTS -------- You have been supplied with our latest TAPE UTILITY package of programs. This will contain the following programs: Tape Utility (the latest version) Conversion utility (the latest version) TYPE Type is unsecured and will copy to your drive. The others are protected and secured against hardware devices like the multifaces and snap shot buttons. Wafa Drive owners get one extra program called WAFATAPE. The other software will be the latest version of our TRANSPACK package of utility programs - all of these are unsecured and will transfer to your drive system. The four TRANSPACK programs are as follows: TRANSFER BYTES MOVER (BM) ADVANCED HEADER READER (AHR) VR COPYRIGHT --------- We can accept no liability for breach of copyright laws. It is your responsibility to ensure that any transfering you do is within the law. WE CONSIDER that many "enlightened" individuals would think it only "fair" to allow you to transfer YOUR programs. Some however WON'T. What nobody can accept is selling or giving away of others software. Companies MUST be given payment for their work, and we have NO sympathy with pirating of software, and will report any we hear of!!! You can't expect good quality software to be produced at a loss, and costs of advertising and production are heavy. Please don't give away or sell this product or manual. It is OUR copyright and has taken many hours to produce. Its ideas and contents are for the purchasers use ONLY. PRESS and ENTER --------------- Throughout this manual we have tried to stick to the following notation: When we say PRESS "y or n" we mean just that - you only need touch either of those keys. When we say ENTER 23 we mean that you will press keys 2 and then 3, but you will then have to press the ENTER key. LOADING in a program -------------------- The following instructions apply for all programs, except vr. WARNING: Peripherals, other than your drive MAY affect your ability to use the programs you can't transfer to your drive. We thus advise you to remove them (e.g a ZX printer or joystick might have to be removed) if you have problems. To LOAD them in: For all but the CONVERSION UTILITY (see the special manual for this), follow the following instructions: Make sure your computer is EMPTY by pulling out the plug, pressing the RESET button if you have one, or for 48k owners type RANDOMIZE USR 0 (and ENTER). 128k owners should put their computer into 48BASIC to load the TAPE UTILITY. Find the start of the program on your tape. Type LOAD"" and then press ENTER. Press PLAY on your recorder, and wait until loading is complete. If it fails to load, repeat the above using a different volume setting on your recorder. If this fails you might have a faulty tape in which case please return the tape for replacement. If you need advice then phone us on (091) 2533615 up to 9.00p.m. If you write to us, we can't reply UNLESS you enclose an SAE. We CAN offer you help and advice ON HOW TO USE the package but NOT on transfering your favourite programs a,b,c..... The chances are we haven't got the program anyway and thus our help would be very limited. LERM, 11 BEACONSFIELD CLOSE, WHITLEY BAY. TYNE & WRAR. NE25 9UW --------------------------------------------------------------- BASIC IDEAS BEHIND DRIVE TRANSFER --------------------------------- Programs are highly secured. What you do is to "desecure" them, saving to TAPE. Finally you need to transfer the program from tape back to your drive to complete the transfer. We have a unique 2 way approach to drive transfer. First, many programs are secured using a system called SPEEDLOC* or ALKATRA*. There are now several types of SPEEDLOC* on the market. This accounts for approximately half of the software currently available. Our CONVERSION UTILITY will deal with these in a semi-automatic way. All you do is load in the CONVERSION UTILITY, select the type of security, then your program is loaded into your Spectrums memory under the CONVERSION UTILITIES control. The program is then saved out onto tape in a "desecured" form. Finally your program is copied from TAPE onto your drive system - this is easily done with some software we provide you with. This is fairly straight forward and is "semi-automatic". But what about programs that aren't SPEEDLOC* or ALKATRA*? Well here we provide a unique service. We have other utilities which we have provided you with and a training course within this manual to allow you to "desecure" programs to TAPE which are then copied to your drive. We sell at a very low cost, INFORMATION BOOKS. Each book contains many transfers of popular programs.(see our catalogue for details), which tells you what to do in a step by step way, to transfer particular programs using our software tools. A NOTE ABOUT YOUR DRIVE ----------------------- Different drives use different SYNTAX. You must therefore be FAMILIAR with how to use your drive BEFORE trying to effect drive transfer. You should know how to LOAD/SAVE/VERIFY Basic and code. e.g 1. To save a simple BASIC program with auto run line 5 onto MD use SAVE*"m";1;"name"LINE 5 WD use SAVE*"name"LINE. 5 (having used NEW*) SD use SAVE %0;"name" LINE 5 +D and DIS MUST use the same as MD NOT SAVE d1 "name"LINE 5 +3 use the same as tape - SAVE "name" LINE 5 e.g 2. To save 3000 bytes starting at address 40000 you use for MD SAVE*"m";1;"name"CODE 40000,3000 WD SAVE*"name",40000,3000 SD SAVE%0;"name"CODE 40000,3000 +D and DIS MUST use the same as MD and NOT SAVE d1"name" CODE 40000,3000 +3 use the same as tape SAVE "name" CODE 40000,3000 e.g 3. To VERIFY code: MD, +D, or DIS VERIFY*"m";1;"name"CODE WD VERIFY*"name" (note NO CODE!). etc. In some of our INFORMATION books we have used the syntax for MD and WD. In this manual and the one for the TAPE UTILITY we will replace the syntax with a simple "*" to allow for all drive systems. So SAVE * "name" LINE 5 means save the BASIC program called "name" using the syntax of your drive, to auto-run from line 5. SAVE * "fred" CODE 40000,3000 means save, using the syntax your drive, the 3000 bytes called "fred" from address 40000. TRAINING STEP 1 - TECHNICAL INFORMATION --------------------------------------- We are now going to teach you how to use our CONVERSION UTILITY program that transfers about half of the software on the market. First it is necessary for you to appreciate the basics of Spectrum loading and saving so please now read the section called TECHNICAL INFORMATION in your TAPE UTILITY MANUAL. Make sure that you fully understand it before taking the next step. TRAINING STEP 2 - BYTES TRANSFER -------------------------------- We now need to teach you how to copy Basic and Bytes from TAPE to your drive. If you have a WAFA-DRIVE then please ignore the rest of this section, and read the manual for WAFA-TAPE (your own special program to copy from TAPE to WAFA-DRIVE). After that whenever we refer to using our TRANSFER program to copy from TAPE to DRIVE you should use WAFA-TAPE instead. You should then go onto TRAINING STEP 3. (a) To TRANSFER BASIC --------------------- If you type LOAD"" and ENTER, then your Spectrum will simply load in the first BASIC file it encounters from your tape and automatically run. To stop this "auto-run", all you need do is the following (in 48K or 128k BASIC) CLEAR 50000 (and ENTER) NEW (and ENTER) LOAD "t:" (for +3 OWNERS ONLY) MERGE"" and ENTER then play your tape. When loading is complete, after a while, the "ok" message will appear at the bottom of the screen. Your BASIC will have been loaded into the Spectrum but the auto-run will have been removed. You can now manually save to your drive with appropriate syntax. e.g. SAVE * "fred" LINE 1 So you are replacing LOAD"" with MERGE"" having previously NEWd your Spectrum. This will work for any basic saved by the CONVERSION UTILITY, but it might not work for commercial games. So to transfer BASIC from TAPE to your drive follow the above proceedure. (b) To TRANSFER CODE -------------------- On your TRANSPACK tape we have provided you with a program called TRANSFER that will load in and then save CODE to your drive. It is the 1st program on the tape. Use LOAD"", and play the tape. After loading is complete then enter BREAK. The program is already set up with the syntax for MD, +D, and DIS, using the syntax of SAVE *"m";1;"fred" and so on. If your drive uses a different syntax then EDIT line 10 to the syntax of your drive so that it will load the CODE called "fhead4". Similarly alter the syntax of lines 50 and 60 to suit your drive. Line 50 should SAVE code called a$ from 2 bytes more than the CLEAR NUMBER in line 10. Line 60 should SAVE the complete TRANSFER program, BASIC and CODE. You might add a line of your own to say VERIFY the CODE saved. Now you can copy TRANSFER to your drive system by placing a disc into your drive, and then enter GOTO 60. TRANSFER will now save itself to your drive. Now let us save some CODE to tape which we will transfer to your drive system with TRANSFER. EMPTY your Spectrum. Now write the following BASIC, to save two blocks of code to tape. (Note +3 owners will have to enter the command SAVE "t:" to switch to tape saving). 10 SAVE "test1" CODE 30,400 20 SAVE "test2" CODE 1000,400 Now RUN, this program and save the two files to tape. Load in your TRANSFER program from drive. Rewind your tape to the start, press any key except "h", and play the tape. After loading in the first file, stop that tape. You will see that TRANSFER will have named your file, and told you that it was saved from 30, with a length of 400 bytes. To save this to your disc with the same name press the "s" key. Pressing the "1" key will take you back to the start for another load. Pressing the "n" key, allows you to give the file a new NAME before saving to drive - handy if your drive won't accept names with say a "*" in them. TRANSFER can cope with files up to approximately 39600 bytes in length. Now load in the second file - test2 by repeating the above. If you enter BREAK then you can restart the program by simply entering GOTO 20. If you try to load in a file which is NOT CODE, then you will be told "NOT CODE", and taken back to the start ready for another load. This would happen if you tried to use TRANSFER to copy a BASIC file to your drive. Note that you can also load and save HEADERLESS files. Simply press "h" at the start rather than any key. TRANSFER will just load in a TONE LEADER then the BYTES that follow. In this case TRANSFER will ask you a name to give the file before it saves it to your drive system. Incidentally, as an extra, after loading you are told if the load was "GOOD" or "BAD". This is the same as "ok" and "Tape loading error" that you would have met had you used BASIC to do the loading. This even works on Headerless files, and when they are TONED. If you are copying TONED blocks to drive then ensure that you stop the tape PROMPTLY after loading a TONED block, and after saving, rewind the tape back slightly to start loading in the next TONED block. This is very important when using it with TONED blocks saved by our Conversion Utility. IMPORTANT NOTE -------------- TRANSFER saves its code to your drive at line 50. You may have noticed that it saves from address 25501 as supplied. So any CODE saved to your drive would not load back into the correct address unless it was specified by BASIC. e.g A file called "TEST" is CODE 40000,300 has been copied to your drive using TRANSFER. To load it back from your drive you must use LOAD * "TEST" CODE 40000 or as appropriate for your drive. You must specify the 40000, if you don't it would load into 25501, the address from which it was saved. SUMMARY ------- By using MERGE"" (for BASIC) and TRANSFER (for CODE) you can now copy files, including Headerless, from TAPE to your drive. EXTRA FOR +3 OWNERS ------------------- You are now asked to read the extra section supplied for you called "SPECTRUM PLUS 3 - INFORMATION SHEET'. You must understand the METHOD 1 and METHOD 2 outlined in the section. TRAINING STEP 3 - CONVERSION UTILITY ------------------------------------ If you own a 128k SINCLAIR SPECTRUM and the program you are transferring is a 48k one, we would suggest that you put it in 48k mode at power up for all transfers. +3 owners can't do this as their drives wouldn't work, but you should already be aware of what to do as you will have read the SPECTRUM +3 INFORMATION SHEET. Now take your TAPE UTILITY manual and read through the INTRODUCTORY SECTION and the manual for the CONVERSION UTILITY. To help you decide which TYPE of SPEEDLOC* or ALKATR* your program is we suggest that you also become familiar with the TYPE program we have supplied. Try some transfers, particularly of the older SPEEDLOC*. - - - - - At this stage you should have been able to transfer a great number of programs which use SPEEDLOC* or ALKATRA* loading systems. You will have (a) Read the technical section of the Tape Utility manual (b) Be familiar with copying BASIC and CODE from TAPE to your drive system, using MERGE"" and TRANSFER. (+3 owners will have read their own special manual as well) (c) Be familiar with the use of the Convtlesion Utility, and the program called TYPE. You will have learnt a great deal about software transfer. We will now train you to cope with other transfers either by using our software alone, or with our INFORMATION BOOKS. - - - - - TRAINING STAGE 4 - THE TAPE UTILITY ----------------------------------- Go to your TAPE UTILITY manual and try copying some NONE SPEEDLOC* and NONE ALKATRA* programs from TAPE to TAPE using the TAPE UTILITY manual. If you have them, try to copy programs which are TONED and those with high speed loaders. This is important for DRIVE transfer of "other" programs - in future we will refer to none SPEEDLOC* and none ALKATRA* programs by that name. "Other" programs have high speed parts that may need to be reduced to normal speed using the "B" mode with the TAPE UTILITY. They may have TONED parts which need to be separated with the "M" mode of the TAPE UTILITY. So become familiar with the TAPE UTILITY, and do some TAPE to TAPE backups for practice. TRAINING STAGE 5 - MORE TECHNICAL INFORMATION --------------------------------------------- It is helpful if you can understand what is going on. For this reason at this stage you should read the MORE TECHNICAL INFORMATION section in THIS MANUAL and make sure that you understand it as fully as possible before going on to the next stage. TRAINING STAGE 6 - OTHER UTILITIES ----------------------------------- It is now important that you learn how to use 2 important programs called ADVANCED HEADER READER (AHR for short), and BYTES MOVER (BM). Please read through the manuals for these programs in this booklet. TRAINING STAGE 7 - the "vr" program ------------------------------------ Turn to the manual for our "vr" program. It is a handy toolkit piece of machine code that can shorten the size of BASIC and save on memory. TRAINING STAGE 8 - SAMPLE TRANSFERS AND INFORMATION BOOKS --------------------------------------------------------- As the last step in your training, go through the section in this manual called SAMPLE TRANSFERS and INFORMATION BOOKS. At the end of this process we hope that you will he able to cope with most transfers. In addition, for 128k owners, there is an extra section for 128k transfers. We hope that, you will have gained much knowledgen and Satisfaction out of using our TRANSPACK. Good luck! END. MORE TECHNICAL INFOMATION SHEET ------------------------------- The following sheet is designed to explain some of the technical language and principles that are important for you to understand. We Will assume that you have read the TECHNICAL INFORMATION section in the TAPE UTILITY manual. 1. HEADER --------- As explained in the TECHNICAL INFORMATION section of the TAPE UTILITY manual, the Spectrum has a header 17 bytes long. It tells your Spectrum what type of program you are trying to cope with, its name, how long it is, and sometimes where to load it, as well as how long the "BASIC" part of it is. How is the "header" read by the Spectrum? ----------------------------------------- The first byte (or number) is coded as follows: 0= basic 1= numeric array 2= string array 3= code Bytes 2,3,4,5,6,7,8,9,10, and 11 give the program its NAME e.g if it were called Test these numbers would be 84,101,115,116,32,32,32,32,32,32. Why ? Look at pages 184 and 185 in your Spectrum manual. The number given for "T" is 84, for "e" is 101 etc. The 32's are all spaces (see p.183). Bytes 12 and 13 - they tell the Spectrum how many bytes in total are to be loaded in. e.g if bytes 12 and 13 were 213 and 12 the Spectrum loads in 213 + 256x12 = 3285. What ? Well the biggest number your Spectrum can handle in any address (or pigeon hole) is 255, so how can it understand a number bigger than 255. The answer is that it splits the number into parts. For numbers in the range 0 to 65535 it splits them into 2. To calculate what they mean you add the FIRST to 256 times the SECOND. e.g 101 23 becomes 101 + 256x23 = 101 + 588 = 5989 Bytes 14 and 15 - if the progam was BASIC it gives the line number from which the program would normally run. e.g if Bytes 14 and 15 were 10 and 0 then the program would auto-run from line 10 + 0x256 = line 10. If the line number was 32768 or greater then NO auto-run occurs just like when you save a program as SAVE "test". - if the program was CODE then these numbers tell the Spectrum at which address to start loading them in if you use LOAD""CODE without a number following (LOAD""CODE25000 places the bytes starting at 25000 no matter what the header indicated.) Bytes 16 and 17 - they frequently hold the number 32768. If the program was BASIC, they indicate how many of the bytes were BASIC. e.g if total bytes loaded in were 3000, (given from header numbers 12 and 13) but 1000 of those were variables and data, Oxen only 2000 of the bytes wold be the "BASIC" part, and bytes 16 and 17 of the header would be 208 and 7 (as 208 + 256x7= 2000). If there were NO variables - e.g you type CLEAR before saving then the length of BASIC would be the same as the TOTAL number of bytes loaded in. If the program was CODE, this number would be the same as the total number of bytes being loaded in. If part of the CODE was "BASIC" then the BASIC length would be indicated here. NOTE that our TAPE UTILITY (in "M" mode), automatically shows you the name of the program, its type, and calculates the various data for you. (see Tape Utility manual - Technical information - Header data). EXERCISE -------- 1. Make SURE you know what we mean by (a) TONE (b) A BLOCK of bytes (c) PROGRAM PART. 2. "Decode" the following headers (answers given later on) a. 0 76 69 82 77 46 32 32 32 32 32 2 2 1 0 1 2 b. 3 71 111 111 100 32 32 32 32 32 32 100 2 20 40 100 2 2. HEADERLESS and FALSE HEADERS. -------------------------------- Mainly to "secure" programs-against "copying" program writers have written some machine code, and usually placed this into their 1st program part (i.e the BASIC or CODE that starts the program off). Frequently numbers are pushed (or POKED) into a dummy REM statement near the top of the program. The machine code does away with the need for a header - after all the programmer knows where all the subsequent bytes should be loaded and how long they are - so they write some machine code to do the loading where they want. A typidal "headerless" program will be constructed as T H T B T B T B (note this has two "headerless" bits - they could be ANY length) A false header ? ---------------- These are not so commonly used now. Copier programs frequently read the "header" so as to know how many bytes are to be loaded in. To fool the copiers, false headers were used i.e you put a 17 bytes part into your program with the wrong numberS in to fool the copier. REALLY this is a HEADERLESS piece of CODE and NOT a header at all - its only purpose being for security. We shall denote this a "F" for false header. A typical example T H T B T F T B T B (note "F" is really just 17 bytes of "dummy" code designed to look like a header). Effectively the program has one true header and lot of bytes that follow, the remaining TF TB and TB are three "headerless" blocks of code. 3. HOW THE MEMORY IS ORGANISED. -------------------------------- In your Spectrum manual is a diagram showing how the memory is organised. It is rather complicated so we are going to simplify it for you. Firstly however the basics. Your Spectrum has 65536 pigeon holes (called addresses). The first is 0, and the last 65535. Each address is capable of holding any number from 0 up to 255 (i.e. 256 numbers). To SEE what is in any address we use PEEK. The number that is in each address is called a BYTE. e.g to see what is in address 65350 type PRINT PEEK 65350 (and enter, noting that PEEK is a keyword) Try typing in the following program and running it. It prints out each address and the contents of that address from 1000 to 1020 10 FOR A=1000 TO 1020 20 PRINT A,PEEK A 30 NEXT A 40 PRINT "END" What is RAMTOP and how do you use CLEAR? ---------------------------------------- Perhaps surprisingly when you put a basic program into your computers memory it might not lie in a fixed position. When using a m/drive to load or save, the "basic" is moved along the memory to make room for the 600 or so bytes the m/drive needs. It then moves back again after use, so that most of those 600 bytes have been "reclaimed". A WD has another system. It doesn't move basic up and down the memory but simply moves the start of basic 2292 bytes up the memory once NEW* has been activated. A Beta Disc uses 170 bytes. Thus those 3 systems all have the start of basic at a different position to "normal". Some drives use no memory and the start of basic may be as normal. So what? Well machine code, unlike basic, usually has to live in the place where it was designed to run from, and mustn't therefore be moved. To "reserve" memory we use the CLEAR command. e.g TYPING CLEAR 39999 (and enter), will reserve all the addresses beyond 40000, and you will have restricted the size of basic. If you now type "NEW" the computer loses its basic and variables, but everything beyond 40000 is left UNAFFECTED. This number 40000, is called the RAMTOP i.e it has now become the top number you have allocated for BASIC and VARIABLES. Typing just CLEAR clears the screen, and variables, but leaves the BASIC program intact. When you switch on your Spectrum RAMTOP is set not at 65535 (the largest possible address), but at 65359 - why ? - because the Spectrum reserves the top 176 address for the user defined graphics, which it wants to keep "safe". MEMORY ORGANISATION ------------------- Addresses Purpose 0-16383 This is the so called ROM. You can't alter the contents of any of these - they are fixed for life. They contain the master program that runs your basic and other programs for you. FROM 16384 upwards we have RAM - addresses you CAN alter. 16384-22527 These numbers display what you see on your TV screen. 22528-23295 A very useful area - the printer buffer. It stores numbers to be sent to your printer for printing i.e. numbers are not sent to your printer "one at a time", but are stored (buffered) here until there is sufficient to be worth sending. After sending this area is cleared ready for the next batch. 23552-23733 The computer needs somewhere to store numbers - this is where it stores them - the so called SYSTEM VARIABLES. This area is v.important. 23734-23754 When NO interface ONE is attached or when it hasn't been used this area deals with "channels" i.e. lines of communication from the computer to the t.v, printer, etc. HOWEVER the upper number is INCREASED when a MD, WD, or many Disc drives are used. 23755 or higher-RAMTOP This area contains your BASIC program, then the variables, followed by some "computer workspace". RAMTOP-65535 This area is the "reserved area" of the computer, and is where machine code is usually stored. 4. RECLAIMING BYTES ------------------- THIS IS A VERY IMPORTANT SECTION FOR YOU TO UNDERSTAND, PARTICULARLY FOR WD OWNERS. As stated previously the normal address at which basic starts is 23755. HOWEVER if you use a WD (having started it-up with NEW*) this is increased by 2292 bytes to 26047, and remains fixed at this value. Similarly the MD also uses memory, but it moves basic up by approx 600 bytes while in use, but then reclaims nearly all of them, after use adding usually only 58 bytes to the start of Basic (usually now 23813). Other systems use no memory at all, or use memory higher up the RAM. The Technology Research DD uses 170 bytes when interface one is attached just before Basic like the MD and WD. When using the BYTES MOVER program you are asked to enter the number of bytes your drive uses up. To find this out, having "used" your drive type in the line 9999 PRINT PEEK 23635 + 256* PEEK 23636 - 23755 and then run the program using GOTO 9999. The number that is printed out is the number of bytes used by your drive on the assumption that it uses memory just before BASIC as most do these days. You might need to consult your drives manual. Most modern interfaces don't use any memory when using the drive. So going back to BYTES OVER if you don't want to "reclaim" the bytes your drive uses enter 0. You will therefore enter 0 for the +3, +D and DIS. WO owners will enter 2292, then they effectively cancel the NEW* command and they can no longer use their WD. This won't matter for games and most programs, as once you have loaded in the program you don't need to use your drive again. HOWEVER this would not be so for business type programs, and it might thus not be possible to transfer them. Now the MD is different in that even when you have used the drive to load in the bytes, and then called the m/code made by BYTES MOVER and reclaimed the 58 bytes, the start of basic is increased again by 58 bytes if an error is encountered. This again won't matter much for many programs. FINALLY note that the room left for basic (and the variables) is REDUCED when using MD and WD. 5. POKING --------- You can alter the contents of an address by using the POKE command. try this : Type CLEAR (and enter) POKE 16384,255 (and enter) You will see a thin line on the top left hand side of your screen - why ? 16384 is the 1st address that looks after the screen, and putting 255 into it gives a line. When you type CLS your computer POKES all addresses from 16384 to 22527 with 0. You can't damage your computer by POKING numbers, but you can cause it to CRASH. Try 10 POKE 23659,0 20 PRINT "Testing":PAUSE 0 If you run this program you alter addres 23659 so that it contains 0 (rather than the usual 2). This address is in the computers SYSTEM variables. If you enter BREAK after running this program the screen will FREEZE UP, and you will have to pull out the plug on your power supply to start again. This trick is frequently used to stop people using the break key to get into their programs. 6. What is the STACK POINTER ? ------------------------------ In your Spectrum manual you will see that the Stack pointer is placed very near RAMTOP, but always a lower number as it is not in the "reserved" area of memory. What is Stack pointer used for? Your Spectrum, when running any sort of program, basic or machine code, requires a "bin" to store numbers on a temporary basis. This has nothing to do with the system variables as each of those addresses has a specific purpose. The "bin" or STACK as it is properly called, is a place where any old numbers are stored. It is thus important to ensure that the STACK isn't located anywhere where you are going to use memory. The size of the "bin" isn't fixed and it grows down the memory. (e.g top of stack = 39999 and perhaps the next 50 or so bytes down to 39949 form part of the "bin".) e.g. if you are using 40000 - 65635 and intend to also use 16384-20000 you must have the STACK POINTER somewhere beween 20000 and 40000 - or can you? Well not really as you wouldn't want it altering the system variables. Usually the Spectrum alters where the stack starts itself, but it is useful SOMETIMES to alter it yourself. 7. DRIVE TRANSFER - the problems and solutions. ----------------------------------------------- The problems fall into one of 4 categories. 1. Your program, designed to run from cassette, has a statement in it like CLEAR 24000 - fine for the cassette because basic occupied 23755 up to 23999 (v. short basic!). This is no good for many drives as the lowest CLEAR (or RAMTOP) number you can have is ABOUT 24500 for MD, and 26500 for WD. Many "business" type packages "VUCALC", "VUFILE" or whatever would have this problem, as well as the very long adventure games, perhaps occupying 40000 bytes of machine CODE. How to overcome the problem. Chop the bytes into 2 parts say 2000 and the remaining 38000. Save them onto drive in 2 parts. Produce some machine code to weld them back together, and convert your drive to "normal" using the reclaim option. Write a simple; VERY COMPACT basic program to LOAD in the 38000 bytes into their correct position (having previously used the appropriate CLEAR?????) LOAD in the 2000 bytes into the SCREEN area temporarily. LOAD in the "welding" machine code (say into the printer buffer provided it is kept "free") produced by the BYTES MOVER program. Do a RANDOMIZE USR to get the "welding" machine code to transfer the 2000 to where they are supposed to go, altering everything else (e.g system variables) as appropriate. Snags ? Well, unless you have enough room left in your basic part (pay between 23813 and your RAMTOP) for the COMPACT basic and those 600 bytes for the MD, you won't be able to save anything (e.g. data or your "game so far") onto MD - just onto tape. Still at least the "parent program" can be loaded from the MD. See EXAMPLE PROGRAMS later on. For WD owners it can be even more difficult. Programs like VU-FILE have a CLEAR 25087, and it is impossible to effectively transfer them and use the drive to save files - why? - the start of basic with the WD is 26047, and thus the basic is "living" where the machine code was designed to be used. 2. The 2nd problem is that your program might be too long. e.g. it has a part that loads in from 16384 to 65535 - i.e all of the area available to you. This can be overcome by removing from 16384 to 23551 (i.e. the screen and attribute bytes), They are not part of the program only filling up the screen. These bytes can then be "split" and then reformed as detailed above. Note it is useful to keep from 23552 onwards - why? - this preserves the "system variables" keeping the values they were supposed to have. 3. The 3rd problem is that the program is not too long, but loads across the system variables e.g. it loads from 16384 (the screen) up to 32000. This is easily overcome by loading in the bytes much higher in memory, (from your drive) and then using the machine code produced by BYTES MOVER to "transfer' them back down again. 4. The program has lots of "headerless" parts and "false headers", or is a "fast loader". This is the most difficult problem to overcome. Most of these will be either SPEEDLOC* or ALKATRA*, in which case you can use our Conversion Utility, or they might be in one of our INFORMATION BOOKS. 8. EMPTY -------- When you switch on your Spectrum we say it is EMPTY. When however you have a program in your computer and type NEW you DON'T NECESSARILY restore it to its EMPTY state. Indeed if you had moved RAMTOP by using say CLEAR 40000, all the addresses above 40000 will not be affected by NEW. RATHER THAN pull out the plug to EMPTY your Spectrum type RANDOMIZE USR 0 This empties the computer (or to be technical gives a system restart). If your computer has a reset button (e.g. +3), then simply use it instead. EXERCISES --------- Answer these questions. 1. What does CLEAR 39999 do ? 2. How do you see what is in address 40000 ? 3. Why is the printer buffer useful ? 4. What does CLEAR do ? 5. What is the stack ? 6. What is the effect of CLS: POKE 20000,255 ? ANSWERS to HEADER DATA QUESTIONS. a. BASIC Namer=LERM. 514 bytes of code, auto line number 10, with 513 bytes of basic. b. CODE Name=Good 612 bytes long, loads into 10260, with 612 bytes of basic. ANSWERS to questions. 1. Clears screen, variables, printer buffer, and sets RAMTOP at 39999 thus "reserving" 40000 to 65535 2. PRINT PEEK 40000 3. You can store code in there as it is usually unused. Mustn't use CLEAR though as it would be lost! 4. Clears screen, printer buffer, and variables. 5. A "bin" for the computers memory. It starts at the STACK POINTER and grows down the memory. The stack is usually just below RAMTOP - not in the "reserved" area of memory. 6. Puts a line on the screen (pokes number into the screen area of the memory). LERM ADVANCED HEADER READER (AHR) --------------------------------- INTRODUCTION ------------ This program has 4 functions. 1. It "reads" headers giving you the encoded information. 2. It counts the length of any block of bytes (for a header 17), including many fast loaders. 3. It allows you to make up and save onto tape your own 17 byte "header". 4. Has a BYTES REMOVER/CHOPPER option that removes from 0 to 16380 bytes from the start of a program (with or without a header) saving it then as CODE, in either one of 2 parts, thus allowing you to remove bytes from the start and/or split them up. This is a VERY IMPORTANT and POWERFUL option for drive transfer. Note that after this option is used the computer EMPTIES itself. GETTING STARTED --------------- 1. Load in the program by winding your LERM tape to the appropriate position and enter LOAD"", and press PLAY. After LOADING, you can enter BREAK, and EDIT LINES 9600 and 9999 to the syntax of your drive. Enter GOTO 9999 will copy AHR to your drive system. 2. You can now select any one of the 4 options the use of which is explained below. OPTION 1 - Header reader ------------------------ 1. Rewind your tape to the start of the header you are about to "read". (make sure you will be playing in enough TONE leader) 2. Press key 1, and play on your recorder. 3. After the header has been taken in it will tell you (a) the programs name (b) what type of program (c) the length of the program (d) where the code is leaded if it was code; OR the auto-run line number if it was BASIC; OR the letter of the array, and whether it was a numeric or string array. (e) the number of bytes of basic. (f) the CODES of each letter in the headers name (this is included as illegal codes are not shown in the programs name - yet another security device!) e.g if the name of the program was "Fred" then the codes would be 70, 114, 101, 100, 32, 32, 32, 32, 32, 32 corresponding to the "F" , "r", "e", "d", and then six spaces. Full explanation of these terms is given in the More Technical information section. 4. To repeat this option again place your tape in position and press key 1. Press key 2 to return to the menu. OPTION 2 - Bytes Counter ------------------------ This option simply tells you how long a headerless or any other part of a program is. 1. Place your tape in the appropriate position at the start of the part to be counted. 2. Press key 2 and play on your recorder. After "loading" is complete you will be told the length of the program (good to detect false headers). 3. To repeat this option again position your tape, but press key 1, and play. Pressing key 2 takes you back to the menu. OPTION 3 - Header Creator ------------------------- This option saves on tape a 17 byte header of your choosing. 1. Press key 3 to select this option. You will then be asked for the programs name (max 10 letters). INCIDENTALLY if you just press ENTER you abort from this option and are returned to the menu. 2. After the name you are asked whether it is to be a BASIC or CODE header (you can't make array headers). 3. You are then required to give its length (in bytes). 4. If BASIC you are then asked for the AUTOMATIC line number from which the program should run (just like when you save a program as SAVE"bloggs"LINE100 where here the auto-run line number is 100). If you enter a number greater than or equal to 32768 the program doesn't auto run (just like when you save a program as SAVE "bloggs"). If CODE you are asked where the code should be loaded. (This doesn't matter all that much since when you load it back into your Spectrum you can specify then where it should go - this number will merely indicate where it should go if you load it as LOAD"name"CODE with no number following the keyword "CODE") 5. Finally you are asked for the "length of BASIC". (see technical information for its use). Unless the program is BASIC frequently this number is set to 32768. If CODE and you are not sure, then always make this number the same as the length of your code. By using the above option of "making a header" it is possible for you to take away the automatic "run" from any BASIC. Simply use OPTION 1 to read your BASIC header, then this option to make the SAME BASIC HEADER but at 5. above enter 32768 to take away the auto-run. Save this header to a fresh tape. Then play into your Spectrum, using LOAD"", from TAPE and CREATED header, quickly stopping the tape when all the header has been read into the Spectrum, then swop tape, and play the BYTES from your original BASIC - i.e substitute the CREATED header for the ORIGINAL. OPTION 4 - BYTES REMOVER/CHOPPER -------------------------------- Some programs are just too long to be coped with by your drive, and the code must be reduced in length and/or SPLIT into two parts. This option allows you to remove up to approx 16380 bytes from the START of a BASIC or CODE or HEADERLESS part. It is SAVED as CODE with headers. 1. Press 4 from the menu to enter this option. You are then asked if the header information is already stored. Why? Suppose you want to reduce the size of a BASIC or CODE program. Use option 1 to read the header. The program thus already has its name, etc, so you can answer y (for yes) at this point, and save time. If you press n (for no), you will be brought through a series of questions as follows: a. Enter the NAME of the program you want to save. b. Then press key "1" for BASIC, "2" for CODE, or "3" for headerless. In most cases you will be pressing "2" or "3". Whether or NOT you pressed "y" or "n" above, you are now asked to enter the number of bytes that are to be REMOVED (up to 16380). If you don't want to chop off any bytes then enter 0. You are then asked how many bytes are to be saved in the first block. eg 1. You want to simply chop off the first 2000 bytes from the start of some code. When asked how many "bytes to remove" enter 2000, and when asked how "many to be saved first", enter 0. eg 2. You want to chop off 7000 bytes and then save the first 2000 and then the rest (i.e. chop off 7000 and split the rest into 2 parts - 2000. bytes and "the rest"). Enter 7000 and 2000 when asked "the number of bytes to be removed", and the "number to be saved first", respectively. eg.3 To simply split code into 2 parts without removing any of the bytes, saving 300 bytes then the rest. Enter 0 and 300 at the two stages indicated by the previous-examples. In addition if you split your code into 2 blocks, the second block is given the same name as the first but the last (10th) character is made into a *. Also the position of where the bytes should be loaded will not be accurate for either block of code, but as you can use LOAD""CODE XXXXX replacing the XXXXX with an appropriate address, it doesn't really matter. You may also be asked to enter the start of CODE - if so you can enter any address as this is simply the address given to the header. If you enter 30000 at this stage the CODE saved by this option will have 30000 as their load address in the header. You may be asked for the No of bytes of basic - if so again you can enter any number. 2. Once you have gone through the stages of creating your "header" then you will be asked to "PLAY THE TAPE". IF THE PROGRAM WAS BASIC OR CODE then play the tape at the start (i.e. play through the header and the program TH TB). Naturally if it was "headerless", then simply play it from its start. (TB) 3. Ignore the funny pictures on the screen that appear while loading. After loading is completed, remove your old tape, and place in the new. Start your cassette recording, and PRESS ENTER to start saving. The program NEW's itself after use. Question - what are its limits? Answer - it can manage to save accurately the last approx 48700 bytes. So for most programs you can remove exactly what you want. Question - what do I do if the program part is say 60000 bytes ? Answer - well you can't (or wouldn't need to) chop off only 10 bytes. As you can only save approx the last 48700 bytes, you must remove at LEAST 60000-48700 = 11300 bytes in order to get the program to take in the last byte. This should be no real problem as you will only need at most 41983 bytes (65535-23552) to get your program going. WHEN ENTERING CAPITAL N AT THE MENU THE PROGRAM NEW'S ITSELF ------------------------------------------------------------ EXERCISES --------- 1. Find some programs (not LERM) and use OPTION ONE to read their "headers". 2. Use OPTION 2 to count the lengths of each block of bytes in some programs - see if the bytes count matches the information given in the header (if the "lengths" are different you have a false header) 3. (a) EMPTY your Spectrum. Type the following program and run it to save onto tape some 200 bytes: 10 CLEAR 29999: FOR a=1 TO 200: POKE (a+29999),a:NEXTa 20 SAVE "200 bytes" CODE 25000,200 It puts numbers 1 to 200 into address 30000 to 30199. (b) Having saved these 200 bites onto TAPE load in the Header reader, Use OPTION ONE to "read" the header for these bytes called "200 bytes'. (c) Now use OPTION 4 to remove the first 50 bytes, also saving in 2 parts, saving 60 and then the rest (i.e 60 and 90 as you have removed 50). You can press "y" for yes in answer to the question "is the header prepared", as you have already used option ONE. Remember to rewind your tape to the start of the header of your "200 bytes" before trying to load it in. (d) Having saved the bytes (now only 150) test that you have done the job correctly by (i) Typing RANDOMIZE USR 0 to EMPTY the computer (ii) Type CLEAR 29999 (iii) LOAD in the 1st piece of new code by using LOAD""CODE 30000 (iv) Type in this one line program 10 FOR a= 30000 TO 30100: PRINT a, PEEK a: NEXT a (v) RUN the program. You should find that you have 51, 52, 53, etc in the memory, with nothing at 30060, 30061, etc. (vi) LOAD in the 2nd piece of code using LOAD""CODE 30000 and again look at it with line 10. This time the numbers should be 111, 112, etc. 4. Try removing bytes from headerless and other programs. LERM BYTES MOVER (BM) --------------------- INTRODUCTION ------------ The purpose of this program is to generate some machine code which will rapidly move bytes from one location to another. eg. move 6000 bytes from 30000 to 16384. You can move just one "block" of code, (like the example above) or several (max 20) e.g for 2 blocks: move 2000 bytes from 30000 to 16384, then 200 bytes from 40000 to 60000. NOTE: It is essential that you understand how to use the CLEAR instruction and how to move RAMTOP. For advice on these see the section called "MORE TECHNICAL INFORMATION" in this manual. ALSO NOTE that the CODE BMmakes is "position independant". This simply means that you can place the code in any addresses that are UNUSED. GETTING STARTED - LOADING IN AND COPYING TO YOUR DRIVE ------------------------------------------------------ Load in the program by winding the tape into the appropriate position and enter LOAD"" and play the tape. After loading you can enter the BASIC by holding down the SHIFT key and then pressing the number "6" key. BM is already set up to use the MD syntax, so alter the Syntax of lines 300 and 9000 for your drive system as appropriate. Enter GOTO 9000, and the program will save itself to your drive. STAGE 1. -------- When loading is complete you will be invited to enter details of each block of code to be moved. Entering CAPITAL N - the program NEW'S itself. For ease of understanding we are going to consider the following example: 1. Suppose you want to move all the bytes in the range 50000-6000 down to 45000-55000 i.e MOVE 10001 (yes there are 10001 if you include both 50000 and 60000). 2 Having done that you want to move bytes in the range 30000-30099 down to 28000-28099 i.e a total of 100 bytes. You want the program then to run from line 30, and because originally you had fixed RAMTOP at 29999 (thereby "protecting" all bytes from 30000 and beyond) but are moving your code down to 28000 you need to reset RAMTOP at 27999, to now "protect" your bytes from 28000 and beyond. a. So in response to the first question FROM where do you want to move the bytes enter 50000. b. In response to the second question TO where do you want to move the bytes? - answer 45000. c. In response to the third question, "how many bytes to be moved" you enter 10001. d. After checking the screen to see that your entries are correct, press "y" to answer the question "is this o.k". If it isn't you press "n", and start again back at step a. e. In response to the question "any more blocks to move" you will press "y", and repeat stages a-d above only entering the following answers: a = 30000 b = 28000 c = 100 d = y Now as you have no more blocks to move press "n" key at stage e. STAGE 2. -------- You are now asked how many bytes your drive uses up. If you enter 0 everything is left alone - this applies to most drive systems - e.g. +3, +D, DIS, SWIFT. The manual for your drive probably gives you this information. M/drive owners will enter 58, and W/drive owners 2992. The purpose of this option is to get the mover code to reClaim the bytes your drive uses up and thus to convert your Spectrum to its "normal" state. (see More Technical Information sheet under section "RECLAIMING-BYTES" for further information.) Having moved your bytes you are given a number of options. You are giVen a brief statement of your options on the screen and asked to press any key to continue. In many situations you are told which option you should probably choose. What are the options? 1. Having moved the code you can get the computer to then return to BASIC and RUN from a given line number. The majority of time you will NOT choose this option but go straight to the machine code. On the odd time you will elect to return to a specific line of BASIC. 2. You can alter RAMTOP WITHOUT a CLEAR INSTRUCTION. Thus instead of returning to basic to do a CLEAR 30000 for example, your bytes mover program does it for you BUT, AND THIS IS OFTEN VERY IMPORTANT, it does this without clearing the screen or the "printer buffer" - it just merely resets RAMTOP. 3. After this you are given the chance to let the program produce the rest of the code you are going to need AUTOMATICALLY. Again the majority of the time you will press "y" for yes at this stage. STAGE 3 ------- 1. In response to the question "Do you want the program to run from a line number" press the "y" key for our example. Now if you pressed "n" for no then you would be asked from which address you want the program to run from. Thus, if after moving your code you want the program to run from address 40000 (this is equivalent to RANDOMIZE USR 40000 or PRINT USR 40000, etc) you would enter the number 40000. For Most games you will have to go straight to the code and will thus have to press "n" and find out the USR number by your own hacking or using one of our INFORMATION BOOKS. 2. If your answer to 1. had been "y" you would be asked "from which line should the program run". You must enter the line number, and for our example you will enter 30. HOWEVER if you enter 0 instead the bytes mover creates your code so that on returning to basic it seeks AUTOMATICALLY the next line to run from (or statement within the line). e.g. if you place the bytes mover code that is created at address 23296, to "call it up" you will have the following: 30 RANDOMIZE USR VAL"23296":PRINT "o.k" NOTE for 128k SPECTRUM OWNERS: The +3, +2, and Sinclair 128k machines all use the printer buffer, from 23296 to 23551 - a total of 256 bytes. You must therefore NOT place your bytes mover code into 23296 as this would cause a CRASH. It is worth noting that not all 256 bytes are used - in the +3 for example, the last 115 bytes from 23436 to 23551 are used as a stack and it is possible to get away with making some use of this area - see later. If the program being transferred to drive is only 48k, once your drive has been used, it will be possible to overwrite the printer buffer area provided that your Spectrum is placed in 48k rather than 128k mode. If you entered line 0, after moving the code your Spectrum would then return to line 30, and print "o.k", or do whatever you put there. If there had been nothing after the RANDOMIZE USR VAL"23296", then it would, as usual, simply seek out the next available line. Thus you will frequently enter 0 at this point. If the code you are moving puts numbers into address 23618, and 23619 then you will be told "probably enter 0". Why? Well these addresses are part of those system variables which tell your Spectrum which line to "do next", and thus your Spectrum already knows which line it should tackle next. 3. The next question to be answered is "do you want a new RAMTOP"? In our example we do, and so you would enter 24999. If you enter 0, then RAMTOP is left unchanged. When would you move RAMTOP? Well if you have "protected" your bytes with a HIGHER RAMTOP number than the lowest number to which you are moving them down, then you will need to alter RAMTOP. e.g. You have previously entered CLEAR 29999 thereby "protecting" 30000 upwards. You want to move bytes in the range 50000-55000 down to 30000-35000 - you WON'T need a new RAMTOP as the addresses you are sending your code to will already be "protected". If on the other hand you are moving bytes from 50000-55000 down to 24000-29000 then you will need a new RAMTOP at 23999 to "protect" your code. DON'T try to move RAMTOP below about 24000 however! You will probably need room for some BASIC which starts at usually 23755 for most modern drive systems. However this does increase to 23813 with MD attached whenever an error is met. WD owners can't move code down to 24000 unless they reclaim the byes the drive uses first (see More Technical information), and Basic starts at 26047. Thus our Bytes mover can overcome the problem of not being able to do an instruction like CLEAR 24000 - a problem that creates many difficulties in drive transfer, where we would keep getting a message like "ramtop no good" if we tried to do a CLEAR 24000 manually. If the bytes you are moving will alter addresses 23730 and 23731 then you will be given the message "probably enter 0" - why? Well 23730 and 23731 are those system variables that tell your Spectrum where RAMTOP is, and so you are already altering them when moving your bytes. 4. You will now be asked if you want the program to create the rest of the machine CODE automatically. Pressing y for "yes" brings you to section 5 below. On MOST occasions you will press "y", the exception being when you want to remain in control say to set the STACK POINTER - see section 8 below, in our example press "y". 5. You will then be given a range of addresses, and are asked to ensure that they have been left alone. The computer needs a "bin" of approx 50 bytes to store numbers. The "bin" must be positioned away from any other addresses that are needed. e.g. in our example the "bin" could be placed at many places - perhaps 60000 and beyond, or at the top of the printer buffer 23490-23540. On the assumption that this is a "free area" you press any key except "n". If you press "n" you are brought back to stage 3, and will have to answer "n" at section 4 above when you come to this point a second time. 128k owners will usually find that the "bin" of 23490-23540 is o.k even though it is in the printer buffer because the Spectrum itself uses this area as a "bin" under certain circumstances. 6. You will then be asked if everything is o.k. If you press "n" you are brought back to STAGE 2 above, You will then be told to wait, and are then asked where you want to save the code, and if so, its name. BM will then save the CODE directly to your drive system. Also remember that, unlike tape, you can only have a given file name (basic, code, array or whatever) ONCE on any given disc, cartridge or Wafa. 7. You are then returned to the start at STAGE 1. 8. On the rare occasion that you answered "n" at section 4 then you are brought to this point. If you altered RAMTOP then you will be taken to section (c) below, otherwise you are then required to: a. Enter the HIGHEST address of a block of 50 bytes that remain "free" and is not required. This is where the STACK POINTER will be set i.e. the address of your "bin" may be. 65500 and the bin grows DOWN the memory so that any addresses in the range 65450-65500 is the "bin" area. b. Now usually the Spectrum likes its "bin" just below RAMTOP, so after moving your code with the new bin position you selected in a. you are asked if you want to restore the bin to its usual position just below RAMTOP. Usually the answer would be "y" for yes but you might find that by "trial and error" your program only works properly if you select "n" - you will just have to experiment. c. Now if your code is moved such that address 23659 is altered you are given the chance to ensure that this holds the number 2. Why? - well in order to stop people from entering "break", a frequent trick is to alter this address from 2, its usual value, to 0. They do this by using POKE 23569,0. You can however ensure that this number is 0 by pressing "y" at this stage. Note however the programmer might have checked later on that the contents of this address is 0, so if you alter it to its correct value of 2 it might cause the program to crash. After this you are taken to section 6 above. STAGE 4 ------- Having put my code onto drive, where should I load it back into and run it from? The answer is anywhere that is UNUSED. If your program doesn't use any of the high addresses (say 65200 onwards, except perhaps the bin which is set at 65530), you have plenty of room there. i.e between 65201 and 65480. Another good place is at the START of the printer buffer (23296 - but not for 128k Spectrums - if you must use the printer buffer area try putting it at about 23440 or slightly higher but it mustn't overwrite the "bin" (stack) area ). The screen area which starts at 16384 is also useful to use (don't clear the screen if you do!). Do make sure that you don't load the bytes into there and then do a CLEAR of any sort until the code has done its job and is no longer needed. e.g you can do CLEAR 30000, then load the code in 23296, then do a CLEAR. you CAN'T load in the code, then do a CLEAR 30000 why? - clear not only alters RAMTOP, but it clears the screen and the printer buffer, and variables area - you have thus wiped out the code! EXERCISES --------- Well all this may seem complicated but you will quickly get used to using it. We are now going to provide you with some tasks so that you can get really used to the program. BEFORE we start however here is a one line program we use every day of the week! The line number is only given as an example. 10 INPUT b:FOR a=b TO 65535:PRINT a,PEEK a: NEXT a:STOP What does it do? It prints out an address and the contents of that address from a specified starting point. Try entering the line and running it. When you get the flashing "L" cursor (showing it wants a number) enter say 1000. You will then be given addresses starting at 1000 (i.e. the ROM - that part fixed by Sinclair Research), and WHAT THEY CONTAIN. When you are finished looking simply enter "break" or press "n" in reply to the message "scroll?" Perhaps you might run the program again but this time entering the number 65420 - this shows some of the numbers in the USER defined graphics area. INCIDENTALLY there is-no real point in moving blocks of bytes of length 1 or 2. The earlier ULTIMATE games had several blocks of code some very short. e.g. a program has 3 blocks of code which should be placed in addresses 24000-40000, 23613-23614, and one byte only at 23659. Load in the large block at say 30000 and use the bytes mover to create the code that will move it down to 24000. Get the mover to return to basic, where you then do POKE 23613, ??:POKE 23614,??:POKE 23659,?? where those three ?? would be found by PEEKING - add line 5 below to line 10 above and load in each 5 CLEAR 59999:LOAD""CODE 60000 ALTERNATIVELY combine all 3 lots of code together thus: 10 CLEAR 29999: LOAD""CODE 30000: LOAD""CODE 46010: LOAD""CODE 40615 Run the program playing into the Spectrum the three lots of CODE which should be placed at 24000-40000, 23613-23614, and 23659 but you have put at 30000-46000, 46010-46011, and 40615 Use the mover to reclaim the bytes your drive uses, and move the 3 blocks of code to where they should go, reducing RAMTOP to where it should be (see inside basic listing for a CLEAR instruction) but probably 23999. Finally get the mover to jump straight to the m/code and NOT return to basic (at 24000 probably). If this fails try a return to basic and then a RANDOMISE USR 24000 or whatever. This technique is particularly important for WD users to minimise the number of loadings and hence save time. FOR THE TASKS BELOW DON'T BOTHER TO RECLAIM THE BYTES YOUR DRIVE USES, THEREFORE ENTER 0 AT THAT STAGE. TASK 1 ------ Suppose you want to move all the bytes in the range 65500-65535 down to 30000-30035. Having moved the bytes you don't want to specify the line from which the progam would run but you do want it to return to basic. 1. Use the bytes mover to create the m/code for you. 2. Write a simple basic program that loads in the code and then executes the moving of the BYTES. 3. include the PEEK line to test that everything works correctly. OK its your first attempt so "cheat" by looking up the "possible" answer. TASK 2 ------ Suppose you have designed a really good SCREEN string and want to copy it higher up the memory. i.e. you have designed a picture on your t.v and you want to store it so that you can then bring it back to the sceen very quickly. 1. Use the bytes mover program to create some code to move all the bytes in the range 16384-23295 to 40000-46911. Save onto your drive. 2. Use the bytes mover again to create some code that does the reverse i.e moves BYTES from 40000-46911 back to 16384-23295. Save onto your drive. 3. Write a simple basic program to load in BOTH sets of code at appropriate positions. Include in that basic program RANDOMIZE USR ??? to store and bring back the screen picture. 4. Test it out. TASK 3 ------ Write a program that SWOPS over all the contents of address 40000-40100 with 30000-30100. Perhaps to make it more interesting fill the contents of addresses 40000-40100 all with 0, and 30000-30100 all with 100 first (using a simple POKE instruction). POSSIBLE ANSWERS TO TASKS ------------------------- The following only represent possible solutions. We have placed in perhaps one or two "extras" to help you understand what you are doing. TASK 1. ------- 1. Use-Bytes mover program. At STAGE 1 enter 65500 (1st address FROM which you are to move) 30000 (1st address TO which you are to move) 36 (there are 36 bytes from 65500-65535 when you include 65500 and 65535) y (in response to "is this o.k") n (in response to "any more blocks") 0 number of bytes used by your drive. 2. Stage 3 section 1, press "y" for yes but enter line number of 0 so as not to specify line number from which basic should auto-run. 3. Stage 3 section 3. Well this is optional. You could enter 29999 just to ensure that you have moved RAMTOP to "reserve" addresses from 30000 and above. However in this case you could have simply used CLEAR 29999 in the basic program. You can also thus just enter 0. 4. Stage 3 section 4. Press "y" and the program generates the code automatically, and save it having answered other questions as appropriate, onto your drive - we will assume you named it as "task1-c". 5. Having saved your code, enter capital "N" to get rid of your bytes mover program and then type in the following BASIC program. 10 CLEAR 29999:LOAD * "task1-c"CODE23296 20 RANDOMIZE USR 23296 30 CLS 40 FOR a=30000 to 30055: PRINT a;TAB 10;PEEK a;TAB20;PEEK (a+35500):NEXT a Why the clear 29999 : to move RAMTOP to now reserve addresses 30000 and above. NOTE this clear must be done before loading in the task1-c because it was placed in the printer buffer at 23296 and clearing after this would destroy the code. If 30 CLS was altered to 30 CLEAR then the "task1-c" code would be lost. Why put the "task1-c" code into 23296 - well this area was "free" (not for 128k owners!) but we could have put it at 40000 instead. This would have had LOAD"task1-c"CODE 40000, and RANDOMIZE USR 40000. We couldn't have put it at anywhere under between 23813 and 30000 as this is for your "BASIC" or between 30000-30035 as that is where you are going to transfer the code or beteen 65500-66535 as this was also needed. What does line 40 do? It prints out the contents of address 30000 to 30035 as well as 65500-65535. The number should be the same if the bytes were moved successfully. TASK 2 ------ Use Bytes mover program. At STAGE 1 enter 16384 (1st address FROM which you are to move) 40000 (1st address TO which you are to move) 6912 (there are 6912 bytes from 16384-23295 when you include 16384 and 23295) y (in response to "is this o.k") n (in response to "any more blocks") 0 number of bytes your drive uses. 2. Stage 3 section 1, press "y" for yes. You could enter line number of 0 so as not to specify line number from which basic should auto-run. 3. Stage 3 section 3. Well this is optional. You could enter 39999 just to ensure that you have moved RAMTOP to "reserve" addresses from 40000 and above. However in this case you could have simply used CLEAR 39999 in the basic program. You can also thus just enter 0. 4. Stage 3 section 4. Press "y" and the program generates the code automatically, and save it, having answered other question as appropriate, to drive - we will assume you named it as "task2-c1". 5. Now repeat the above stages but swopping over the numbers 16384 and 40000 in instruction 1 to generate the code to transfer your bytes back to the screen, but saving the code as "task2-c2". NOTE that you are using the bytes mover to create two sets of code. Usually however you would only create one set as you can use the programs to move more than one block before returning to basic or whatever. 6. Use "N" to effect a NEW. 7. Type in the following BASIC program. 10 CLEAR 39999 (reserves 40000 upwards) 20 LOAD * "task2-c1"CODE 50000 (placihg code at 50000) 30 LOAD * "task2-c2"CODE 50100 (placing code at 50100) 40 PAPER 6:INK9:BORDER6:CLS: (sets up colours) 50 FOR a=1 TO 20:PRINT "This is a test":NEXT a. (sets up screen picture) 60 PAUSE 0 (waits for key to be pressed) 70 RANDOMIZE USR 50000:CLS (moves bytes+ CLS) 80 PRINT "SCREEN STORED - press a key to get it back" 90 PAUSE 0 (waits for key) 100 RANDOMIZE USR 51000 (bring back the screen) 110 PRINT "got it back" We put the code at 50000, and 50100 so as not to lose it - its above RAMTOP. TASK 3 ------ 1. You are going to use the Bytes mover program to a. move code 40000-40100 to 41000-41100 (keeping it safe) b. move code 30000-30100 to 40000-40100 c. move code 41000-41100 to 30000-30100 Thus at STAGE 1 answer: 40000 41000 101 (then answer "y" and "y" again) 30000 40000 101 (then answer "y" and "y") 41000 30000 101 (then "y" and then "n" as you have no more blocks to move) Enter 0 for number of bytes your drive uses. 2. At stage 3 section 1 just for a change get the program to run from line 50 by entering 50 at this point. 3. At stage 3 section 3 enter 29999 to move down RAMTOP as (deliberately) we have left this out of the basic program below. 4. Again press "y" at Stage 3 section 4 (for auto-code production) and then go through the usual stage saving the code onto tape as "task3-c" 5. Enter "N" and type in the following BASIC program. 5 CLEAR 39999 10 FOR a=40000 to 40100:POKE a,1:NEXT a (puts 1 into those addresses) 20 LOAD * "task3-c"CODE 23296 30 RANDOMIZE USR 23296 (moves code) 40 PRINT "this line will be missed" 50 FOR a=30000 TO 30100:PRINT a,PEEKa:NEXT a (all these should show 1) 60 FOR a=40000 TO 40100:PRINT a,PEEKa:NEXTa (should show the 0) Because we selected auto-run at line 50, line 40 will be "missed out". Lines 60 and 60 display the contents of those addresses we have affected. INTERUPTS --------- When you switch on your Spectrum, 50 times every second the computer stops what it was doing, and goes off and does several vital housekeeping tasks (e.g scans the keyboard). It does this even when running a BASIC program, or machine code. This is a so called INTERUPT. Now it is possible to stop this process taking place so that the computer doesn't do these housekeeping tasks - many games do this as they have their own housekeeping routines - to do this we DISABLE INTERUPTS. For those who are interested it is possible for you to have the interupts ON but to get the computer to do your own housekeeping or interupt routines - this is called INTERUPT MODE 1. Anyway, to get some of your programs working it is necessary to DISABLE (or turn off) the INTERUPT before you start running the program. The easieat way to do this is to add an extra byte to the code made by BM which has the effect of turning off the interrupts. The byte that turns off the interupts is 243. e.g you have used DM to make some m/code to move 1448 bytee from 16384 to 23552, and then to jump to 40000 (the USR for your game). You called the code made by BM "move". Your BASIC LOADER is as follows: 10 CLEAR 24999:LOAD * "fred1" CODE 27000 20 LOAD * "fred2" cODE 16384 30 LOAD * "move" CODE 19384:RANDOMIZE USE 19384 So the bulk of your game is loaded in at line 10, but 1443 bytes are loaded into 16384, and you are using the "move" code made by BM to shift 1448 bytes from a temporary home of 16384 to their proper address of 23552. To get INTERUPTS switched off all you need to do is to change line 30 of the above BASIC as follows: 30 LOAD * "move" CODE 19385:POKE 19384,243: RANDOMIZE USE 19384 So all you do is to load in the code made by BM one address higher, and to POKE the old loading address with 243. In that way you are adding one extra instruction, number 243 which disables interupts, to your BM code, and are placing it at the start of the BM code. e.g.2 Your old BASIC was LOAD * "BMcode" CODE 40000: RANDOMIZE USR 40000 If this didn't work try LOAD "BMcode" CODE 40001:POKE 40000,243 RANDOMIZE USE 40000 Indeed many games will need interupts disabled - some do this themselves at an early stage, but some don't. Many have interupts ON, but run their own routine using interupts mode 1. LERM UTILITY vr CODE -------------------- INTRODUCTION ------------ We have provided you with two bits of useful code which can more or less be placed anywhere in your Spectrums memory (i.e it is relocatable). The purpose of the code : (a) The. first program; (CODE "v") goes through a BASIC program and replaces the numbers with VALS. e.g LET a=3 becomes LET a=VAL"2". i.e Program "a" does a VAL. This slows the computer down a little but saves 3 bytes for every insertion. It doesn't seem much but when done on TASWORD approx 1000 bytes were saved from 6900 down to 5900! It ignores REM statement and DEF FN, and even works for numbers like LET a=-2E+6. (b) The second program (CODE "r") removes all REM statements from line 10 onwards. If you have line numbers less than 10 containing a REM statement then you will have to remove then manually. This is to avoid accidentally removing machine code contained in low line numbers within REM statements. i.e Program b does a rem kill. In addition each program tells you how many bytes it saved. How to LOAD in the code and transfer it to your drive ----------------------------------------------------- 1. EMPTY your Spectrum. 2. Type CLEAR 59999 and press ENTER. +3 owners enter LOAD"t:" 3. Find the code on your tape and type LOAD""CODE 60000 4. Now save it onto your drive using SAVE * "LC"CODE 60000,342 or whatever commands your system uses. YOU HAVE SAVED BOTH PROGRAMS ONTO YOUR DRIVE. 5. You can now save each program separately if you wish SAVE * "val"CODE 60000,180 (saves just CODE "v") SAVE * "rem"CODE 60180,161 (saves just CODE "r") i.e from 60000-60179 is CODE "v" from 60180-60341 is CODE "r" as the first 180 bytes are the val creator, and the last 161 bytes the "rem killer". How to use the code ------------------- Either program, or both of them, may be loaded anywhere provided it is above RAMTOP. (you could put it into the screen area provided you don't do a CLS or CLEAR before you use it!) TO activate the code simply use PRINT USR ????? where the ????? are replaced with the FIRST address where you place the code. eg 1.Suppose you have some basic and want to remove all REMs above line 10 and put in VAL's. a. ENTER CLEAR 63999. (makes RAMTOP=63999) b. LOAD in the LC code from your drive into address 64000 (eg. LOAD * "LC" PODE 64000) c. LOAD into your Spectrum the basic to be converted. d. ENTER PRINT USR 64000 to activate the VAL creator. The number that appears on the screen gives you the bytes saved. e. ENTER PRINT USR 64180 to activate the REM remover, and again the number on the screen tells you the bytes saved. THE TIME TAKEN FOR THE PROGRAMS TO RUN DEPENDS UPON THE LENGTH OF THE BASIC. THE SCREEN WILL GO BLANK WHILE THE CODE IS RUNNING. eg 2. To simply remove the REMS from some basic, repeat the above, perhaps with a different RAMTOP, but at step b. LOAD in the "rem" code from your drive, and PRINT USR 64000 (or wherever you, placed the FIRST byte). Similarly you can just do a "val" create using the "val" code. So what ? --------- Well it saves time and memory if you kill off REM statements and convert numbers to VAL "number". Often the size of basic must be reduced to an absolute minimum to effect drive transfer, and on most occasions using both programs will be well worth while. Reducing the number of lines (i.e. use of many steps within one line), careful use of variables, and other techniques (eg LET a= NOT PI makes a=0, and LET a=PI/PI makes a=1) also help. SAMPLE TRANSFERS AND INFORMATION BOOKS -------------------------------------- NORMAL PROGRAMS --------------- These are the most simple to do, and are only likely to work on old programs. They are UNSECURED, and simply contain some basic, then perhaps one or two lots of CODE. a. Rewind your program to the start. Empty your Spectrum. Use MERGE"" to load in the BASIC. b. Look through the BASIC and find the loading lines to suit the syntax of your drive. e.g 30 LOAD "fred1" CODE 30000 40 LOAD "fred2" CODE 50000 all you do is to change lines 30 and 40 to suit the syntax of your drive system. c. Save the BASIC to your drive to auto-run from the appropriate line number - this can be found by using the HEADER READER option with our AHR program on the BASIC HEADER of the program you are transferring. d. Finally, use our TRANSFER program to copy all the CODE files from tape to your drive system. If your original basic had lines 30 and 40 so: 30 LOAD""CODE 40 LOAD""CODE then BASIC would automatically load in the files into the address given by the CODEs "headers". Your drive MUST be told both the name of the file it has to load AND where it must be loaded. In this case you would do step d above, and transfer both CODE files to your drive, but NOTE down the loading address for the files. Suppose TRANSFER said the files names were as follows: Name "fred1" CODE 30000, 4000 Name "fred2" CODE 50000, 8000 You can now do step. a, b, and c, above but alter lines 30 and 40 to the following: 30 LOAD * "fred1" CODE 30000 40 LOAD * "fred2" CODE 50000 and save to your drive system. MINIMISING BASIC ---------------- Now for another point. Many programs are difficult to use with a drive because of the extra bytes used by the drive (MD 600 - WD about 2000). It is thus VERY IMPORTANT to MINIMISE THE SIZE OF THE BASIC. 1. USE VAL. e.g rather than use PAPER 7, use -PAPER VAL"7", and do this for all numbers. Why - well the Spectrum uses far more than one byte to remember the number 7, but by making it a string and finding its VAL (value) you save 3 bytes every time this is done. OUR "VAL" creator program (called "vr") can do this automatically for you - see Example transfer 1. 2. If you are going to use say 0 many times make it into a variable. e.g. 10 PAPER 0: BORDER 0: PRINT AT 0,3;"Test" becomes 10 LET a=VAL"0": PAPER a:BORDER a:PRINT AT a,3;"Test" 3. Remove all unnecessary words, REM statements (our "vr" program may be helpful here), BEEPS, VERIFIES, etc - and USE AS FEW lines as you can, by doing many routines in a single line. e.g. 10 BEEP 1,0: INPUT "Enter name";a$ 20 IF LEN a$>10 THEN GOTO 10 30 PRINT "SAVING" 40 SAVE a$: 50 PRINT "rewind tape to verify" 60 VERIFY a$ reduce to 10 INPUT a$:SAVE a$ or perhaps 10 INPUT a$:SAVE*"m";1;a$ (for MD) or 10 INPUT a$:SAVE*a$ (for WD) A final tip. When you first save your basic onto drive MISS OUT the auto-run. ONLY when you are happy that it works should you then re-save it to "auto-run" using SAVE * "test"LINE 50 EXAMPLE PROGRAM 1 - TASWORD 2. ------------------------------ Step 1. By breaking into the basic you will see that there is CLEAR 31999 at line 15. Thus the main problem is to (a) reduce the size of the BASIC and (b) alter the syntax. So load in your cassette based TASWORD (WD owners use NEW* first), but stop the tape just after finishing the loading of the basic and before the code. Step 2. Alter line 15 to 15 POKE 23609,2:CLEAR 31999: GOSUB 4000: LOAD*"tas.c",54784:CLS GOSUB 11:LET a= USR 59081: GOTO 10 (MD owners use LOAD*"m";1;"tas.c" CODE 54784) Now alter lines 700 to 790 to the syntax for your drive. (e.g MD owners alter SAVES to SAVE*"m";1;"name") MAKE THE NAME OF THE CODE AT LINE 710 "tas.c" alter line 800 to 800 RETURN and line 900 to 900 RETURN. Alter lines 1030 to 1100 to the correct syntax as above. You may also want to alter one of the options to give an easy CATALOGUE of your files or do an ERASE option. If you do shorten the basic even further by reducing the length of "user friendly" statements and removing options you don't often use (e.g. alter graphics). DO THIS LATER, only when you have got your Tasword transferred and working. Step 3. Use the VAL creator to alter all numbers to VALS, then save the BASIC onto your drive. Step 4. Type CLEAR 31999, and load in the CODE of your tasword, using LOAD"" CODE. When this is complete save the whole program onto your drive by entering GOTO 700. This should work provided you have altered lines 700 to 800 as suggested above. There are many other alterations and improvements you might like to make later on, but the main help is given by the VAL creator. NOTE that WD owners will just about manage TASWORD without any extras and altering the syntax as instructed above. INFORMATION BOOKS and FURTHER TRANSFERS --------------------------------------- For the more complicated programs, we started off selling INFORMATION SHEETS with about 8 programs in each sheet. Later on we combined these into INFORMATION BOOKS. The first book started off giving full details on transfers, but as so many followed a standard pattern we developed some shorthand notation. We will now go through the process of teaching you a how to use our transfer techniques, so that you will be able to do the transfer given to you in our INFORMATION SAMPLE PACK. This pack contains a number of transfers, taken from INFORMATION BOOKS 1, 2, and 3. Full details of the current number of INFORMATION BOOKS available, together with their contents and price are available from us upon request. IT IS IMPORTANT FOR YOU TO READ THROUGH THE REST OF THIS SECTION EVEN IF YOU DO NOT HAVE THE PARTICULAR GAMES TO WHICH WE REFER. THIS IS SO THAT YOU WILL UNDERSTAND OUR SHORT-HAND INSTRUCTIONS GIVEN IN OUR INFORMATION SAMPLE PACK AND BOOKS. As we said at the start, we provide you with a full transfer service, and our INFORMATION BOOKS are priced very competatively to help you make full use of our software. TRANSPACK has now replaced our old manual and programs. We used to provide a manual called MD1b/WD1b - this manual has replaced this. We also provided a program called HEADER CREATOR or HC. This is no longer needed as the TRANSFER program can transfer HEADERLESS blocks directly to your drive. WD owners who use WAFATAPE for transfer can manage HEADERLESS blocks if they use AHR to first measure the length of the headerless block if unknown, then use AHR to make a HEADER on a separate TAPE, making the header of the CODE type, and its length as for the HEADERLESS block. The file can then be loaded into WAFATAPE by playing in the created header then the HEADERLESS file. We also used to supply a program called PROGRAM ANALYSIS (PA) which tried to find out where programs loaded in headerless blocks. Modern security means that this is no longer possible so we have stopped supplying PA. You will see that we refer to CC1 in our INFORMATION BOOKS - this program; full name CODE COMPRESSOR 1, is a handy extra program in that it shortens (or compresses) blocks of machine code making them smaller in size. This is useful as it saves space on disc/wafers, etc, and saves on loading tines. You may wigh to invest it this program at a later stage - it is very competatively priced! ESSENTIAL INFORMATION --------------------- TU = Tape Utility AHR= Advanced Header reader. BM= Bytes Mover. T= Tone leader (normal) H=Headel ST= Short Tone leader When using Bytes Mover enter the number of bytes your drive uses as appropriate (e.g. M-drive users enter 58: +3 users zero). To find out, use your drive and try entering the command PRINT (PEEK 23635+256*PEEK 23636) - 23755 SYNTAX OF YOUR DRIVE:This varies with each drive system. e.g for m/drive you use LOAD*"m";1;"d"CODE 27000 to load the code "d" into 27000 from drive 1. e.g for the +3 you would simply use LOAD "d" CODE 27000 e.g for the Betadisc RANDOMIZE USR ? : REM: LOAD "d" CODE 27000 (the ? is replaced by a number given in your Beta manual) In early sheets we use m/drive and w/drive syntax, but eventually use simply LOAD*-----"d" CODE 27000 (i.e. we don't bother with syntax at all using *----- to cover all drive systems OR simply LOAD * "d" CODE 27000. Saving gets the same treatment e.g SAVE*---"d" CODE 27000, 10000 or SAVE * "d" CODE 27000, 10000 COMBINING CODE -------------- This section is VERY IMPORTANT for you to understand. Many transfers work by taking the machine code that the program needs, (sometimes chopping off some bits like the screen), splitting it into parts which are then loaded into the wrong location from your drive. Having done this the code is moved to its correct location (frequently using machine code produced by BYTES MOVER), and then the program is run using the appropriate USR number. e.g the original from TAPE loads into the screen a picture, and then uses the rest of memory - i.e from 16384 to 65535 - all the bytes in your Spectrum. Frequently we chop off the FIRST 7218 bytes of the screen and printer buffer, leaving from 23352 to 65535. To avoid crashing when loading from your drive, these bytes are split into TWO, so that you load the bytes that should have gone into 23252-26999 into the screen. The second part of the split, bytes from 27000 to 65635 can be loaded directly from drive into their correct location. Some machine code, produced from BYTES MOVER perhaps, is needed to move the code from the screen back to 23352 and then do the correct USR number to run the program. To save on loading time from your drive, we frequently COMBINE the MOVING CODE produced from BYTES MOVER, and the FIRST split piece of code that we temporarily put into the screen. e.g. Program name:FRED ORIGINAL: 16384 to 23351 23352 to 26999 27000 to 65535 chop off. load into screen load into 27000 (call this "d1") (call this "d2") The screen starts at 16334, but we are going to put the "d1" into 16484 to allow a space of 100 bytes for the CODE produced by BYTES MOVER - we will call the code "bm". This code will therefore need to move 3448 bytes (23552 to 26999 = 3448 bytes) from 16484 to 23552, followed by the approptiate USR number. To avoid 3 loadings from drive (from "bm", "d1", and "d2") we can cOMBINE "bm" and "d1" as they occupy, in total, less than the 6912 bytes of the screen. To COMBINE these do the following: (a) ENTER CLEAR 26999. (b) ENTER LOAD"bm" CODE 27000 and play the "bm" code or load directly from your drive (c) ENTER LOAD"d1" CODE 27100 and play the "d1" code or from tape or from your drive. (allowing 100 bytes for "bm"). (d) SAVE the COMBINED CODE, WHICH WE WILL ALWAYS CALL "cc" so: SAVE * 4 "cc"CODE 27000, len (len = total length, which, in the example is 100 for""bm" and 3448 for "d1" giving a total of 3548) To LOAD you would write a simple BASIC LOADING program like so: 10 CLEAR VAL "26999":LOAD * "cc" CODE VAL "16384": LOAD * "d2"CODE VAL "27000":RANDOMIZE USR VAL "16384" (the USR is always where you first placed the "bm" code). We often shorten our description of chopping, splitting, and combining code. e.g for our example "FRED" above we could have simply said chop off the screen and printer buffer (7218 bytes) and split into 3448 and the rest using AHR. Use BM to produce CODE to move 3448 bytes from 16484 to 23552, and jump to the appropriate USR number. Combine the "bm" and 3448 bytes, and write the usual BASIC LOADER (which should load the "cc" code into 16384, the main block of code into 27000, with a USR of 16384 to activate the "bm" code). FURTHER NOTATION: We adopted standard names for bytes we had split into 2 parts using AHR. The first, shorter part we give the name by its length, and the second longer part we simply call "*". In our example "FRED" we would have called "d1' by the name "3448", and "d2" by the name "*". Some drives won't allow you to save with a name like "*" - in this case make up your own name. We will also refer to THE USUAL BASIC, as it is used so often. This means, use the following: 10 CLEAR 26999:LOAD * "cc"CODE 16384 LOAD * "*"CODE 27000: RANDOMIZE USR 16384. (i.e put the "cc" CODE into 16384, the MAIN CODE called "*" into 27000, and a USR of 16384.) We also sometimes talk about the TWO USUAL BLOCKS OF CODE. These are blocks that are 23296,3704 and 27000,38536 - what we mean here is that the first block loads into 23296 and is 3074 bytes long, and the second loads into 27000, and is 38536 bytes long. This is because many programs are transferred by removing the screen, and then taking the rest of the memory from 23296 to 65535 but loading it into memory from your drive in 2 blocks. The "main" block, from 27000 to the top of memory can be loaded directly from drive (using LOAD * "*" CODE 27000), but the bytes that should go from 23296 to 26999 must be loaded from your drive into the sceen (at 15848) as a temporary home, and then, having finished with your drive, these bytes are moved to their proper address at 23296 by some code produced by BM which we normally load into 16384. Doing RAND 16384 (this is short for RANDOMIZE USR 16384) will call up the BM code and run your Program. NOW FOR SOME SAMPLE TRANSFERS. MORE TRANSFERS -------------- PHE*NIX (note we always code the name of the program to help stop stealing of Software.) ------- From INFORMATION BOOK 1, page 76 it states the following: Transfer the last code block to drive. Use BM to move 7890 bytes from 27000 to 24832, jump to 31874 and set RAMTOP to 24531. Load the game into 27000 (RAMTOP = 26999), and the BM code into 40000. Issue a RAND USR 40000 and away you go. What does all this mean? Well PHE*NIX, no doubt starts with some BASIC, and Possibly a screen, but all you need is, the LAST BLOCK of CODE - that is just the last header and bytes that are on the tape. So use TRANSFER to copy these bytes from your tape to drive. We will assume that its name is "phe1". Now load in our BM program and answer 27000, 24532, then 7890, then "y" (to are you sure), and "n" (to "any more to move"). When asked do you want to return to a line number answer "n", and you will then enter the "jump to" number of 31874. When asked to give the RAMTOP number, you enter 24531, and then get BM to make the code automatically. Save this to your drive by the name "mover". Finally write the fallowing BASIC LOADER and save to your drive to auto-run from line 10. 10 PAPER VAL "0" : INK VAL "0" :BORDER VAL "0":CLEAR VAL"26999": LOAD * "phe1" CODE VAL"27000":LOAD * "mover" CODE 40000: RANDOMIZE USR VAL "40000" Now we hope you can understand what has been done and why. Note that the CLEAR 26999 was needed to protect the "phe1" CODE. As the game is short, and address 40000 and above was not used we loaded in the "mover" code into that address. We could have put it into the screen at 16384, and altered the USR number in the BASIC LOADER to 16384. WIZAR** LAIR - from INFORMATION BOOK 1 - Page 17. ------------ The shortened version of the explanation for transfer would be as follows: Take the last long section of CODE and use AHR to chop off 6912 bytes and split into 4000 and the rest. Transfer "4000" and "*" to your drive. Use BM to create code to move 4000 from 16484 to 23296 jumping to 24130 setting RAMTOP to 24090. Combine, with an extra DISABLE intrupts, and write the usual BASIC. What should we do for this? Rewind your original game to the start of the last long block of code. Use AHR (option 4) to chop off 6912 and to save 4000 bytes then the rest. TRANSFER these two files "4000" and "*" we shall call them, from tape to your drive using our TRANSFER program or equivalent software. Now load in BM and get it to make code to move 4000 bytes from 16484 to 23296, jumping to 24130 rather than returning to BASIC, with RAMTOP changed to 24090, and save to your drive system, say with the name "mover2". Now we are going to "combine" with a DISABLE interupts. i.e we are going to "weld" together the "mover2" CODE and the CODE called "4000" as well as doing one extra step - adding an instruction to DISABLE the INTERUPTS. Above, under the section COMBINING CODE we showed you how to save time by combining the code produced by BM and the CODE that was loaded into the screen - that is what we mean by COMBINING CODE. So EMPTY your Spectrum. Now type CLEAR 26999 then ENTER. Now as "4000" and "mover2" are in your drive write and then run the following BASIC. 10 LOAD * "mover2" CODE 27001 20 LOAD * "4000" CODE 27100 30 POKE 27000,243:SAVE * "ccWIZ" CODE 27000,4100 You can now ERASE the "4000" and "mover2" code from your disc. The above BASIC loads in both "mover2" and "4000" and saves them as one block of CODE. Note however that instead of loading the "mover2" code into 27000, it was moved into 27001 instead, and the address 27000 was POKED with 243. This means that an extra instruction is added to the "mover2" code - remember that 243 DISABLES or switches off, the INTERUPTS. Finally, all you have to do is to write the usual BASIC LOADER as follows: 10 PAPER VAL "0" :INK VAL "0":BORDER VAL "0":CLEAR VAL "26999"; LOAD * "*" CODE 27000: LOAD * "ccWIZ" CODE VAL "16384": RANDOMIZE USR VAL "16384" Save it to drive to auto-run from line 10. STACK POINTER and NORMAL SPEED ------------------------------ We will take you through another example transfer - taken from INFORMATION BOOK 3, page 65. PROGRAM: SW*RD SLAYER - 48k VERSION a. Convert the last block to normal speed. b. Use AHR to split this block into 3704 bytes and the rest. c. Use BM to move 3704 bytes from 16484 to 23296, jump to 47104 and set STACK POINTER to 65024. d. Combine loading BM at 27001 and POKE 27001, 243 and write the usual BASIC. Now first of all this game loads in at a different speed from normal when loaded from tape. Instruction "a" tells you to convert it to normal. To do this you will have to load into your Spectrum our latest TAPE UTILITY and put it into "b" MODE. See manual for detailed instructions, but essentially you must measure the BAUD rate, or speed with the "b" key, then load in the last block from your original game, but SAVE it to TAPE using the "0" key - with a NORMAL tone at normal speed. Next you must use AHR to split this into 3704 bytes and the rest (no chopping off at all). These two blocks can then be placed onto your drive from tape using TRANSFER or equivalent software - say with the names "3704" and "*". Now load in BM, and get it to move 3704 bytes from 16484 to 23296, and not to return to BASIC but to jump to 47104. Now above it tells you to set the STACK POINTER to 65024. What you must do is therefore a. When asked by BM to ENTER a new RAMTOP number you ENTER 0 (for no change) b. When asked "Should I produce the code automatically" you must answer 'n". c. You are now asked for the 1st address of a block of 50 unaffected bytes - you must enter 65024 - this sets the STACK POINTER to 65024 d. When asked "should the stack pointer be put just below ramtop after moving your code" you answer "n". Save this to your drive as say "mover3". You must COMBINE (or weld together) the "mover3" and the "3704" code by running the following BASIC. 10 CLEAR 26999:LOAD * "mover3" CODE 27001 20 LOAD * "3704" CODE 27100:POKE 27001,243 30 SAVE * "ccSWO" CODE 27000,3804 Finally write and save to auto-run from line 10 the following usual BASIC LOADER. 10 PAPER VAL "0":INK VAL "0" :BORDER VAL "0" :CLEAR VAL "26999" 20 LOAD * "*" CODE VAL "27000":LOAD "ccSW" CODE VAL "16384" 30 RANDOMIZE USR VAL "16384" We hope you can now transfer some of the programs given in our INFORMATION SAMPLE PACK. We suggest that you try for yourself. EXTRA INFORMATION FOR 128k OWNERS --------------------------------- In a later section called "TRANSFERRING 128k programs" we explain how to transfer 128k games saved by the CONVERSION UTILITY, and we explain how to BANK in extra PAGES of memory. Unless you have a PLUS 3, you will be able to follow the 128k transfers in the INFORMATION BOOKS and SAMPLE PACK easily enough. The rest of this section only applies to +3 owners. PLUS 3 - 128k TRANSFERS - how to adapt INFORMATION BOOKS. ----------------------- You will need to ADAPT the instructions given in the INFORMATION BOOKS and SAMPLE PACKS. You must only put 6912 bytes into PAGE 17, and you must load in all bytes for pages 11, 13, 14, and 16 into address 32768, and use machine code to put them in the proper page at the correct address (even then you can have problems with page 11 and so your transfer may not work). Only then can you load bytes into page 10. If you haven't already done so, read the section in this manual called "TRANSFERRING 128k PROGRAMS", and then return here. IGNORE the section on page 3 in the INFORMATION BOOK 3 manual titled "+3 DISC". Follow the steps given in the example below. In the information books you will see for 128k transfers that you have instructions like POKE 23388, 17:LOAD*"fred"CODE49152. This is used to load PAGE 11 (17 in decimal), with the code called "fred" directly into 49152. +3 owners can't do this - they must load the code into 32768, and then use machine code to BANK in PAGE 11, and then copy the code from 32768 to 49152. To do this we are going to use a simple standard technique with the following BASIC LOADER. Type it into your +3 and save it by GOTO 300. +3 STANDARD LOADER. ------------------- 10 PAPER 0:INK 0:BORDER 0:CLEAR 26950: LET B=0 15 LET R=1 PEEK 23730 + 256*PEEK 23731 20 RESTORE 150:FOR A=R TO (R+40):READ T$:POKE A,VAL T$ LET B=B+VAL T$:NEXT A:READ T$:IF B<>VAL T$ THEN PRINT "ERROR":STOP 30 REM - PUT IN LOADING INSTRUCTIONS HERE 150 DATA "243","58","92","91","230","248","246","7","1","253" 160 DATA "127","237","121","33","0","128","17","0","192","1" 170 DATA "0","64","237","176","58","92","91","203","231","230" 180 DATA "248","50","92","91","1","253","127","237","121","251" 190 DATA "201","5379" :STOP 200 POKE (R+20),0:POKE (R+21),64 210 POKE (R+7),P-16:RANDOMIZE USR R :RETURN 220 LET K=INT (Z/256):POKE (R+21),K:POKE (R+20),Z-256*K: 230 GOTO 210 300 SAVE "STDLOAD" The CLEAR at line 10 must be under 32768. We have chosen 26950 above as this is 49 bytes less than the most common CLEAR we use. The STANDARD LOADER (or STD for short) will poke some machine code into 49 bytes less than the value of the original CLEAR given for the transfer. e.g if original CLEAR was 26999, we choose 26950. This machine code will be used to BANK in PAGES and move bytes from 32768 to 49152. RULE 1: In all cases you replace POKE 23388,19:LOAD*"prog"49152 with LOAD "prog"32768:LET P=.??:GOSUB 200 where the ?? should give the value of the POKE - in the above example it should be LET P=19. Here the original, using POKE 23388,19, loaded "grog" into PAGE 13 (19 decimal) at address 49152. Its replacement, loads the same file called "prog" into PAGE 10, (16 decimal) then the GOSUB 200, pokes the page number and activates the machine code at a USR of ONE byte higher than the CLEAR used at line 10. This machine code moves 16k bytes from 32768 into the correct PAGE at 49152. RULE 2: Adjust your BASIC LOADER to load in bytes from PAGE 10 (16 in decimal) last. The CLEAR must be reduced by 49 bytes. RULE 3: Simply delete any instruction that does POKE 23388,16 as the +3 will always be in PAGE 10 (decimal 16) after using our machine code. Add a PAUSE 150 after the last disc loading. RULE 4: Put only 6912 bytes into PAGE 17 (23 decimal), and hope that the rest aren't needed. Example 1 --------- Suppose from the INFORMATION BOOK you have the following BASIC LOADER. (taken from Book 3 page 33 - M*SK 3) 10 CLEAR 26999:LOAD * "cc" CODE 16384:LOAD *"£"CODE 27000: POKE 65534,255 15 POKE 23388,20:LOAD*"c"CODE 49152:POKE 23388,16: POKE 65534,0 20 LET X=USR 16384 For the +3 you would have to change the names as it can't cope with "£" for example. Apart from this the only problem lies with line 15. The POKE 23388,20 can't be used by the +3 - what it is trying to do is to load the "c" CODE into address 49152 of PAGE 14 (20 in decimal). LINE 10 loads in the "cc" CODE into 16384, and then the "3" CODE into 27000, both in PAGE 10 (16 in decimal). To adapt the above for the +3 you should ALWAYS load any bytes that are to be loaded into the normal page 10 (16 in decimal) AFTER loading in bytes into other pages. So take your STANDARD LOADER and add the following lines. 40 LOAD "c"CODE 32768:LET P=20:GOSUB 200 50 LOAD "cc" CODE 16384: LOAD "x"CODE 27000:PAUSE 150 60 POKE 65534,0:LET X=USR 16384 and save to auto-run from line 10. Explanation:- Line 10 - the CLEAR 25950 can be left as it is 49 bytes less than the CLEAR of 26999. Line 15 in the original loader POKED 23388,20, BANKING in PAGE 16 (20 in decimal), then loaded in "c" CODE into 49152, BANKED in the normal PAGE with a POKE 23388,16, and then POKED 65534,0. So we begin with our LINE 40 which loads in "c" CODE into 32768, then with the GOSUB 200, BANKS in PAGE 16 (20 in decimal), and moves it to the correct place. The code automatically returns in PAGE 10 (16 in decimal), so that the POKE 23388,16 is no longer needed. Having loaded in bytes into all PAGES other than PAGE 10, we can now, at LINE 50 load in the "cc" CODE, and the "x" CODE (renamed from "£") then at line 60, do the POKE 65534,0 (as it is in PAGE 10), then the final USR of 16384. Example 2 --------- If the original loader had been as follows: 10 CLEAR 26999:LOAD *"a" CODE 27000 20 POKE 23388,17:LOAD *"b" CODE 49152 30 POKE 23388,19:LOAD *"c" CODE 49152 40 POKE 23388,22:LOAD *"d" CODE 49152 50 POKE 23388,16:LOAD *"e" CODE 49152 60 RANDOMIZE USR 40000 Looking at the above, LINE 10 loads "a" CODE into 27000. As this loads into PAGE 10 (decimal 16), by RULE 3 we will load this later. Lines 20, 3O. and 40 put bytes into PAGES 11, 13, and 16 respectively, so by RULE 1 we will replace them with lines 40, 50 and 60 as shown below. Above line 50 nuts "e" bytes into PAGE 10, so we will now do this with a new line 70 below, and finally with line 80, the USR. The CLEAR at line 10 stops at 29650. 40 LOAD "b" CODE 32768:LET P=17:GOSUB 200 50 LOAD "c" CODE 32768:LET P=19:GOSUB 200 60 LOAD "d" CODE 32768:LET P=22:GOSUB 200 70 LOAD "a" CODE 27000:LOAD "e" CODE 49152:PAUSE 150 80 RANDOMIZE USR 40000 Example 3 --------- This is the most difficult. Here the original BASIC LOADER given in the information book manual has a POKE 23388,23, and puts bytes into PAGE 17 (23 in decimal). As the +3 disc needs to use PAGE 17 for the disc drive, you must leave this area of memory unchanged. e.g ORIGINAL BASIC LOADER: 10 CLEAR 26899:LOAD *"a" CODE 26900 20 POKE 23388,17:LOAD *"b" CODE 49152 30 POKE 23388,19:LOAD *"c" CODE 49152 40 POKE 23388,23:LOAD *"d" CODE 49152 50 POKE 23388,16:LOAD *"e" CODE 49152 60 LOAD *"f" CODE 16384:LOAD *"g" CODE 20480 70 RANDOMIZE USR 20480 Lines 20 to 40 load bytes into pages other than the standard page 10. NEW BASIC LOADER: Use the STANDARD LOADER with the following extra lines: 40 LOAD "b" CODE 32768:LET P=17:GOSUB 200 50 LOAD "c" CODE 32768:LET P=19:GOSUB 200 60 LOAD "d" CODE 32768:LET P=23:LET Z=6912:GOSUB 220 70 LOAD "a" CODE 26900:LOAD "e" CODE 49152 80 LOAD "f" CODE 16384:LOAD "g" CODE 20480:PAUSE 150 85 RANDOMIZE USR 20480 ALSO change LINE 10 to make a CLEAR 26850 (i.e reduce the original 26899 by 49 bytes). Note that when we load bytes into PAGE 17, at line 70 above, we do LET Z=6912:GOSUB 220. The reason for this is that the GOSUB 220 has the effect of moving Z bytes from 32768 to 49152 for the page given by P - in this case it therefore moves those 6912 bytes into PAGE 17. Example 4 --------- Another difficult one. e.g The original instructions in the information book were: 10 CLEAR 26499:LOAD *"a" CODE 26500 20 POKE 23388,17:LOAD*"b" CODE 49152 30 POKE 23388,19:LOAD*"c" CODE 49152 40 POKE 23388,20:LOAD*"d" CODE 49152 50 POKE 23388,21:LOAD*"e" CODE 49152 60 POKE 23388,23:LOAD*"f" CODE 49152 70 POKE 23388,16:POKE 65535,201:RANDOMIZE USR 26500 Here, at line 60 we are to load "f" into PAGE 17 (23 decimal). Take the STANDARD LOADER and EDIT line 10 to change the CLEAR to 26450. Now add the following lines: 40 LOAD "b" CODE 32768:LET P=17:GOSUB 200 50 LOAD "c" CODE 32768:LET P=19:GOSUB 200 60 LOAD "d" CODE 32768:LET P=20:GOSUB 200 70 LOAD "e" CODE 32768:LET P=21:GOSUB 200 80 LOAD "f" CODE 16384:LET P=23:LET Z=6912: GOSUB 220 90 LOAD "a" CODE 26500 100 POKE 65535,201:PAUSE 150 110 RANDOMIZE USR 26500 Lines 40 to 70 load in the bytes and then use the GOSUB 200 to move them to their correct location in the appropriate PAGE. Line 80 now loads the "f" bytes into the screen of PAGE 10, and then uses the machine code so that the GOSUB 220 moves 6192 bytes from 16384 to PAGE 17 at address 49152 - the first 6912 bytes of PAGE 17. This is acceptable as the disc drive is no longer needed. Then the "a" CODE is loaded into 26500 - this is done last by RULE 3, then the POKE that is needed, the PAUSE 150 to let the drive motor stop, and finally the USR 26500. Example 5 --------- e.g The original instructions in the information book were: 10 CLEAR 26999:LOAD *"a" CODE 27000 20 POKE 23388,17:LOAD*"b" CODE 49152 30 POKE 23388,19:LOAD*"c" CODE 49152 40 POKE 23388,20:LOAD*"d" CODE 49152 50 POKE 23388,21:LOAD*"e" CODE 49152 60 POKE 23388,23:LOAD*"f" CODE 49152 70 POKE 23388,16:LOAD*"g" CODE 16384,4096 80 LOAD*"h" CODE 20480:RANDOMIZE USR 20480 Not only do we need to put the code named "b" to "f" into all the pages, but PAGE 10 (decimal 16) is also completely used up as "a" goes into 27000 to the top of memory. The screen is used by "g" and "h". Try the following - it might work provided that you don't need all the bytes in PAGE 17, and the corruption that occurs in PAGE 11 doesn't matter either. Add the following to the STANDARD LOADER. 40 LOAD "b" CODE 32768:LET P=17:GOSUB 200 50 LOAD "c" CODE 32768:LET P=19:GOSUB 200 60 LOAD "d" CODE 32768:LET P=20:GOSUB 200 70 LOAD "e" CODE 32768:LET P=21:GOSUB 200 75 LOAD "f" CODE 32768:LET P+23:LET Z=6912:GOSUB 220 80 LOAD "a" CODE 27000 90 LOAD "g" CODE 16384 100 LOAD "h" CODE 20480:PAUSE 150 110 RANDOMIZE USR 20480 We hope that the above has been helpful for +3 owners with 128k programs to transfer. TRANSFERRING 128K PROGRAMS -------------------------- INTRODUCTION ------------ The following is a simple guide for putting your 128k programs (SPEEDLOC* TYPE 2 or TYPE 3) CONVERTED by our CONVERSION UTILITY onto your drive. A fuller explanation of what is going on is given later to help you further if required. MD owners can't get all files onto 1 cartridge, and must use CART 1, and CART 2. STEP 1 ------ When using the CONVERSION UTILITY at PART 1 you saved some CODE by pressing the "c" KEY. Use TRANSFER to copy it to your drive. Give it the name of your program, but with the number 0 on the end. e.g Game named "fred", save the code onto drive as "fred0". This code will eventually be loaded into address 20480, which is also the USR for all programs. MD owners copy this to CART 2. STEP 2 ------ At PART 2, by pressing the "1" key you will have saved to TAPE a total of NINE headerless files. Use our TRANSFER program, to transfer all of them EXCEPT the last one (the screen), to your drive system. Save them with the same name as above, but also with a number to show which is which, starting with the number one. e.g call the first "fred1", then "fred2", and so on up to the last one, "fred8". MD owners need 2 cartridges so copy blocks 1,2,7, and 8 onto CART 2, and 3,4,5, and 6 onto CART 1. Be careful when using our TRANSFER program when copying the headerless files to tape as they are TONED. Make sure that you stop the tape recorder as soon as possible after. TRANSFER has loaded in a block. To load in the next one you will probably need to rewind your tape slightly so that TRANSFER receives its TONE leader. The NEXT STEP has 2 versions - STEP 3a for everyone except the PLUS 3, and STEP 3b for PLUS 3 owners. STEP 3a FOR ALL EXCEPT PLUS 3. ------- Write the following BASIC LOADER and save to your drive as a general BASIC LOADER for all 128k programs - call it LOADER. 10 PAPER VAL "0":INK VAL "0" :BORDER VAL "0":CLEAR 26999 20 LET A$="fred" (gives name of program) 25 POKE 23388,23:LOAD * (A$+"3a") CODE 49152 30 LET T= VAL"22":FOR A=4 TO 7 35 IF A=7 THEN BORDER 5:PAUSE 0:BORDER 0 (for"MD only) 40 IF (T=18 OR T=21) THEN LET T=T-1 60 POKE 23388,T:LOAD * (A$+STR$ A) CODE 49152 70 LET T=T-1:NEXT A 75 POKE 23388,16:LOAD * (A$+"8") CODE 49152 80 LOAD * (A$+"2") CODE 27392:LOAD * (A$+"1") CODE 16384 90 LOAD * (A$+"0") CODE 20480:LET X=USR 20480 To adapt this for every 128k program simply alter the name of the game at LINE 20, and save it to your drive to auto-run from line 10. MD owners save it to CART 1 - line 35 is for them only, doing a PAUSE to allow you to swop cartridges. Finally you must change block 3 you saved onto your drive, as this must only be 6912 bytes long (see later for explanation). To do this take the disc or cartridge containing block 3 and run the following BASIC: 10 CLEAR 29999:LOAD * ("fred"+"3") CODE 49152:SAVE * ("fred"+"3a") CODE 49152,9472 We have assumed your game is called "fred". This must be changed as appropriate. LOADER works by loading in from drive; the files numbered "3a" at LINE 25, then "4" to "7" at lines 30 to 70, and then file number "8" into 49152, number "2" into 27392, number "1" into the screen at 16384. Line 90 loads in the CODE saved by the Conversion utility at part 1 into the USR address of 20480. STEP 3b FOR PLUS 3 ONLY. ------- Now unfortunately your PLUS3 disc, when activated uses some memory area which your game might also need. For this reason it is possible that your program may not transfer to your +3 drive. Write the following BASIC LOADER and save to your drive as a general BASICS LOADER for all 128k programs - call it LOADER. 10 PAPER VAL "0":INK VAL "O":BORDER VAL "0":CLEAR 26999 20 LET A$="fred" (gives name of program) 30 GOSUB 120:LET T= VAL"22":FOR A=4 TO 7 40 IF (T=18 OR T=21) THEN LET T=T-1 60 LOAD (A$ + STR$ A) CODE 32768:POKE 27007,T-16:GOSUB 190 70 LET T=T-1:NEXT A 80 POKE 27021,27:LOAD (A$+"3")CODE 32768:POKE 27007,7:GOSUB 190 85 LOAD (A$+"8") CODE 32768 90 LOAD (A$+"2") CODE 27392:LOAD (A$+"1") CODE 16384 95 LOAD (A$+"0") CODE 20480:PAUSE 150:LET X=USR 20480 120 LET B=O 130 RESTORE 150: FOR A=27000 TO 27040: READ T$:POKE A,VAL T$: LET B=B+VAL T$:NEXT A : READ T$:IF B<>VAL T$ THEN STOP 140 RETURN 150 DATA "243","58","92","91","230","248","246","7","1","253" 160 DATA "127","237","121","33","0","128","17","0","192","1" 170 DATA "0","64","237","176","58","92","91","203","231","230" 180 DATA "248",'50","92","91","1","253","127","237;,"121","251" 185 DATA "201","5379" 190 RANDOMIZE USR 27000:RETURN To adapt this for every 128k program simply change line 20 to the appropriate name, and save onto drive with auto-run line 10. Lines 120 to 140 poke in machine code that moves 16384 bytes from 32768 into the correct PAGE of memory. The other lines do the loading of all appropriate files into memory. SUMMARY ------- So for EVERY 128k transfer all you need to do is to follow STEPS 1 to 3 above but change LINE 20 in the BASIC LOADER to the name of your particular program given to all the files transferred at STEP 2. In our example A$="fred". Finally SAVE your customised BASIC LOADER to your DRIVE to auto-run from LINE 10. The BASIC LOADER always loads in file number "8" into 49152, number "2" into 27392, number "1" into the screen at 16384, and "0" into 20480, which is the USR number. TECHNICAL INFORMATION ON THE 128K SPECTRUMS ------------------------------------------- This should help you further, and can save on memory space on your discs. To start with we would like to explain how the 128k memory works. The Spectrum has 65536 addresSes (like pigeon holes) from number 0 to 65535. The first 16384 (from address 0 to 16383) can't be altered by you - they are fixed in the computers memory - this is ROM. However your 128k has 4 different ROMS (number 0, 1, 2, and 3) all of which can be placed between 0 and 16383. When you do some EDITING of BASIC, ROM 0 is placed by the computer into addresses 0-16383. When you run a BASIC program the computer automatically swops ROM 0 for ROM 3. The technical word for "swop" is BANKED. So the computer BANKS OUT ROM 0 and BANKS in ROM 3 when you run a BASIC program. +3 owners note that ROM 2 operates the disc drive. In this way you can pack MORE computing power into a limited space. Now the rest of memory (from 16384 to 65535) can be changed by us - this is RAM. If you remember that 1k =1024 bytes, you should realise that the first 16k of memory is ROM and the rest, 48k, is RAM. But you have 128k of memory so how is this done? Well the top 16k of memory from 49152 to 65535 can be BANKED just like RAM. When you switch on your Spectrum PAGE 10 (this is the hex number, in decimal it is 16 - see later) lies between 49152 to 65535. Numbers can be POKED or loaded into these addresses, and then another PAGE can be placed in the same memory area from 49152 to 65535. You can later recall the old PAGE - its rather like pieces of paper in a clip file, but you can only see the piece of paper that is on top of the pile, the others are underneath but you can't see them - you can write on the top page, then swop pages 1 and 2 over and write on page 2 then if needed it can be swopped back again to see page 1. This is what happens in the 128k and allows you to have very long games - part of the game is in PAGE 10, another part in PAGE 14, and so on. The PAGES that are available are number 10, 11, 13, 14, 16, and 17. BUT numbers 12 and 15 are NOT available for reasons which we won't go into. Page 17 has problems for all owners - you can only load 9472 bytes (6912 for the +3) into memory starting at 49152. For the +3 there are also problems with PAGE 11 and if your game doesn't work this is the most likefy reason. For 128k owners other than the +3 we only load bytes into the first 9472 addresses of PAGE 17 which is why you need to re-save block "3" as "3a". You have the top 16k with PAGES 10,11,13,14,16, and 17. Your 128k program may not use every PAGE and we can save on disc space if this so. HEX and DECIMAL --------------- Our "normal" numbers are 1,2,3,4,5,6,7,8,9,10,11,12,13, and so on. Many computer programmers use another number system called HEX (short for hexadecimal). We will not go into a full explanation of this but numbers from 0 to 9 are the same in both numbering systems. After that as we are only interested in numbers from 16 to 23 we will give you the following simple table. DECIMAL: 16 17 18 19 20 21 22 23 HEX: 10 11 12 13 14 15 16 17 So 18 in decimal is 12 in hex. POKING 23388 ------------ For the Sinclair 128k and the PLUS 2 all you have to do to BANK in a PAGE is to POKE address 23288. This DOES NOT WORK ON THE PLUS 3. For example, to BANK in PAGE 11, simply look up the DECIMAL value of 11, which is 17, and then do POKE 23388,17. Note that. the second the computer goes back to allow you to EDIT BASIC it will automatically put you BACK INTO PAGE 10. So try the following little program (not for the +3). 10 CLEAR 40000:POKE 23388,16:POKE 50000,10:POKE 23388,17: POKE 50000,100 and run it. If you enter as a direct command the instruction PRINT PEEK 50000 you should get the answer of 10, as you POKE this when in PAGE 10. If you enter as a direct command POKE 23388, 17:PRINT PEEK 50000 you will now get an answer of 100 and you have BANKED IN PAGE 11 For the PLUS 3 you can't do a POKE 23388,16 to BANK IN page number 10. Instead you must load in the code into address 32768, and then use machine code to BANK in the correct page and move the bytes from 32768 to their proper address at 49152. This is what the machine code in line 150 does in the above BASIC LOADER. USING OUR CONVERSION UTILITY ON 128K PROGRAMS --------------------------------------------- When you use our Conversion utility on SPEEDBLOC* TYPE 2 OR 3 in 128k mode, when the full program has loaded at PART 2, you press key "1" to save out the following: BLOCK PAGE ADDRESS LENGTH POKE 23388 -------------------------------------------- 1 10 23296 4096 16 2 10 27392 21760 16 3 11 49152 16384 23 4 13 49152 16384 22 5 14 49152 16384 20 6 16 49152 16384 19 7 17 49152 16384 17 8 10 49152 16384 16 9 10 16384 6912 16 So it first saves out BLOCK 1, from PAGE 10, the 4096 bytes that were loaded into 23296. Then it saves out BLOCK 2, again from page 10, but 21760 from address 27392. It then saves bytes from other pages, and finally saves out, again from PAGE 10, the screen picture, 6912 bytes from 16384. We told you to discard BLOCK 9, the screen, and you should now see how the BASIC LOADER for the 128k Spectrum works. We told you at STEP 2, to TRANSFER all the headerless blocks produced by the CONVERSION UTILITY to your drive with the numbers 1 to 8. All the BASIC LOADER does is to load back BLOCK 2 and BLOCKS 4 to 8 into their correct memory location. Block 1 is loaded into 16384, and the code produced by CU is loaded at 20480, which is also the USR number. Block 3 is loaded but only 9472 (6912 for the +3), are moved into the correct memory location. Now it might well be that your 128k game does NOT use every PAGE. This is most easily spotted when performing step 2, copying the CODE for each page from TAPE to DRIVE. If the bytes are all the same you will simply hear a constant TONE instead of the usual mixed up sound. If you think that there is nothing in some of the pages (blocks 3 to 8) then they can be diacarded, but you will have to change the BASIC LOADER. The easiest way to do this is to add a line like the foIllowing: 50 IF (T=17 OR T=19) THEN GOTO 70 This would prevent PAGES 11 and 13 BEING LOADED (remember 11 is in HEX which is 17 in decimal, and 13 in HEX is 19 in decimal. This saves on memory, particularly if your game only uses half of the extra pages available. So you now have a technique for saving if any of the blocks numbered 3 to 8 are unused. SPECTRUM PLUS 3 - INFORMATION SHEET ------------------------------------ This sheet tells you how to adapt our instructions to work specifically for 48K PROGRAMS for the PLUS 3. Note that it won't be possible to transfer some programs - if you can't load them in the 48k BASIC, then naturally you won't be able to transfer them to your plus 3. This might be because the program checks to see if it has the original 48k ROM present (the PLUS 3 in 48k mode is slightly different!). MAKING "LOAD1" and "LOAD2" -------------------------- This is a one off task. Write the following BASIC (the REM at line 1 contains ninety zeros (it must have at least 82). Save it to drive with the name "MAIN". 1 REM 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 15 REM CLEAR + LOADER HERE 25 PAUSE 150:RANDOMIZE USR 23760 100 REM RUN HERE 200 LET T=0:RESTORE 300:FOR A=23760 to 23841:READ X: POKE A,X:LET T=T+X:NEXT A:CLS:PRINT T:STOP 300 DATA 243,58,92,91,230,248,203,231,203,239,1,253,127,50,92 310 DATA 91,237,121,58,103,91,230,248,246,4,1,253,31,50,103 320 DATA 91,237,121,33,59,92,203,166,42,178,92,54,62,43,43,43 330 DATA 249,17,3,19,213,237,115,61,92 340 DATA 33,219,95,17,0,91,1,0,1,237,176 350 DATA 17,100,0,33,66,92,115,35,114,35,54,1,251,195,125,27 Now enter the command GOTO 200. If all is well the number 8923 should appear. If NOT check the DATA numbers in lines 300 onwards. If the number is correct then DELETE LINES 200-350 and save to your drive by the name "LOAD2". Now RELOAD the above program called "MAIN". Change all the numbers in line 340 to zeros so: 340 DATA 0,0,0,0,0,0,0,0,0,0,0 Now enter GOTO 200 and the number 8053 should appear on the screen. If all is well then again DELETE LINES 200-350 and save to your drive by the name "LOAD1". HOW TO ADAPT INSTRUCTIONS FOR THE PLUS 3. ----------------------------------------- For the Plus 3 you should follow the instructions given in the rest of the TRANSFER pack and/or CONVERSION UTILITY manual, and you should regard it as another disc drive system (like the Technology research disc). The only problem you face is when dealing with the BASIC which is used to load in the machine code - a so called "BASIC LOADER" program. A typical example of a BASIC loader is shown below. WHAT TO DO FOR MOST PROGRAMS ---------------------------- The vast majority of transfers can be managed using either METHOD 1 or METHOD 2 indicated below. Method 1 is the simplest to cope with as all you do is to follow the instructions given in the TRANSFER PACK, but add an extra PAUSE command to allow time for the motor on the disc drive to be switched off. The second method is to use our own program called "LOAD1" (or possibly "LOAD2") to act as your BASIC loading program. They contain some special machine code. METHOD 1. (works in approx 60% of the time) ---------- Simply add one line to your BASIC LOADER. e.g Suppose, following the transfer instructions you have the following basic loader program called "fred": 5 PAPER 0:INK 0: BORDER 0:CLS 10 CLEAR 26999: LOAD "fred1"CODE 27000:LOAD "fred2" CODE 16384 20 RANDOMIZE USR 16900 (NOTE you must use the spelling RANDOMIZE not RANDOMISE!) All you will have to do, with luck, is to add the following extra line: 15 PAUSE 150 (gives time for motor to stop running) SUMMARY: Alter your basic so: (i) Add a line after loading code from your PLUS 3 drive like line 15. (ii) Save to auto-run from the appropriate line (in the above case LINE 5). DO NOT clear the screen if there is any code there! This method will fail if your program needs to run with your PLUS3 in 48BASIC or if some machine code is loaded from disc into the printer buffer area (from 23296 to 23551). Methods 2 and 3 respectively, are designed to get around these problems. Although method 3 is rather tricky to use, it will only need to be used very rarely. METHOD 2 (usually works if method 1 fails) -------- This uses the "LOAD1" program you made previously. This technique is used for programs that need to be changed from +3BASIC into 48BASIC before doing the usual RANDOMIZE USR to get the game or program running - it is an extra step needed after loading from your drive but before doing the USR. It can't cope if code is loaded into the printer buffer. The "LOAD1" program has some special machine code in a REM statement to convert your PLUS3 into 48BASIC from +3BASIC, but without clearing the screen. (NOTE that this can be done by putting the command SPECTRUM to a line of BASIC, but the program then stops, and the bottom 2 lines of the screen are cleared with an error mere age OUT 7I. This is no use if the screen is full of valuable machine code, and is rather clumsy to use.) How to use "LOAD1" as a Basic loader ------------------------------------- (i) Load our "load1" program from disc. Use any of the line numbers available between 6 and 24 to load in the machine code. Line 25 does the pause to allow the disc motor to stop. (ii) Make line 100 (it must always be 100), the RANDOMIZE USR line. (iii) Save to auto-run from line 1. e.g. Suppose you had the program mentioned previously called "fred". This is what you would do: (i) Load in your "load1" program. (ii) Add the following new lines into the Basic: 15 PAPER 0:INK 0:BORDER 0:CLS 20 CLEAR 26999:LOAD"fred1"CODE 27000:LOAD"fred2"CODE 16384 100 RANDOMIZE USR 16900 (DON'T remove lines 10, or 25) (iii) Save to auto-run (e.g SAVE"fred"LINE 1) This can cope even if you fill the whole of the screen with bytes (i.e 6912 bytes from 16334), but you must NOT use it if the code would overspill into the printer buffer (e.g code longer than 6912 bytes which load into 16384). EXPLANATION: Line 15 clears the screen which is made black in colour, and line 20 loads in all the machine code. Line 25 causes a PAUSE to allow the drive motor time to stop, then does the USR 23760, and activates the machine code in line 10. This code pages the memory and makes the PLUS 3 go into 48BASIC without clearing the screen, and it then returns back to BASIC but always running from line 100. So line 100 must contain the remaining instructions to run the game, in this case a RANDOMIZE USR 16900. AN EXPERIMENT: If you simply load in "LOAD1" from disc, and enter GOTO 30, you will find that the PLUS 3 goes into 48BASIC. METHOD 3 - COMPLICATED PROBLEMS - using "LOAD2" ------------------------------- Only very rarely are you likely to need this! Suppose that you are very short of memory area as shown below: Program: John 1 PAPER 0: INK 0: BORDER 0: CLS 5 CLEAR 24799: LOAD"1" CODE 24800,40736:LOAD"2" CODE 16284,7168 10 RANDOMIZE USR 16390 With the +3 the printer buffer from 23296 to 23551 must be left alone. It can only be written over once you have put your +3 back into 48 BASIC. This is because in +3BASIC, the computer makes use of the printer buffer. The problem with "John" is that it loads the code "2" into the sreen but also into the printer buffer (scrnen is 6912 bytes, and the printer buffer has 256 bytes). This would cause the +3 to crash. We can't put the last 256 bytes into say 40000, because we have already loaded from 24300 to 65535 with the bytes called "1". There is a way around the problem because the PLUS 3 doesn't use memory when loading from its disc drive so we can use a very much lower CLEAR number than with other drive systems. What we are going to do is to chop off the last 256 bytes from "2" and put them in front of the bytes "1", and then restore the situation with some machine code we have given you in our "load2" Basic loader. It ALWAYS copies 256 bytes from 24539 to 23296 as it assumes that the printer buffer has been temporarily placed at 24539 and needs to be placed into its correct position of 23296 having Converted the PLUS 3 into 48BASIC first. This won't work if your progam needs to load code into 24539 to 24795. When using "load2" you must have a CLEAR number of 24538 or less. How to use "LOAD2" ------------------ To make life simple, we will illustrate by showing you how to cope with the example program "John". TASK 1 - to chop up the code "2" into screen only (6912 bytes) and printer buffer (256 bytes). Enter CLEAR 29999, and load into memory the code called "2" using LOAD"2" CODE 30000 (if already on disc this will be simple. If on tape then you will need to use the LOAD"t:" command first). You can, now split into 2 by saving to your drive. e.g. SAVE "2a" CODE 30000,6912 followed by SAVE "2b" CODE 36912,256 TASK 2 - make up the BASIC loading program. Load in our "LOAD2" program. Use lines 7 to 24 to load in the machine code. For John we would have 15 CLEAR 24538:LOAD "1" CODE 24800:LOAD "2b" CODE 24539:LOAD "2a" CODE 16384 Now add line 100 to do the USR so: 100 RANDOMIZE USR 16390 Save with auto-run line 1. If your original had a second CLEAR number (say 65535) before it did a RANDOMIZE USR, then put this CLEAR instruction at the start of line 100. EXPLANATION: In "LOAD2", line 10 contains the machine code that not only converts from +3BASIC to 48BASIC without clearing the screen, but in addition it moves the printer buffer of 256 bytes from a temporary store of 24539 to 23296, then it runs from line 100. INFORMATION SAMPLE PACK ----------------------- INTRODUCTION ------------ The following TRANSFERS have been taken from our INFORMATION BOOKS 1, 2, and 3. The first 12 from BOOK 3, the next 12 from BOOK 2, and the rest from BOOK 1. We have placed in ITALICS the exact way in which they are placed in the books. Any extra text, providing further explanation to help you get used to the way we describe transfers is placed in NORMAL text. Sorry - we often spell RANDOMIZE as RANDOMISE. 1. BRAT ATT*CK -------------- a. The main code loads into 30000 with RAMTOP at 29999. The RAND USR is 55888. b. CC1 can be used to give a BASE address of 36038 - a saving of 6038 bytes on your drive. This is a simple transfer. Simply find the "main code" that should be obvious to you as it will be the longest part, and you can transfer it directly to your drive with TRANSFER. All you will now need to do is to write a simple BASIC LOADER with a CLEAR 29999, and LOAD * "BRAT" CODE 30000, and RANDOMIZE USR 55888. For the +3 owner, try the above but put a PAUSE 150 just before the RANDOMIZE USR 55888. If this fails to work then load in your "LOAD1" program, and make line 15 and line 100 so: 15 PAPER 0:INK 0:BORDER 0:CLEAR 29999:LOAD "BRAT" CODE 30000 100 RANDOMIZE USR 55888 Save to auto-run from line 1:Line 15 will load in your game, line 25 pauses for 3 seconds and then does a USR 23760 to convert your Spectrum into 48k BASIC, and line 100 runs the game. 2. DARKS*DE ----------- a. Convert the last TWO blocks to normal speed with TU. b. The last block is the game screen. c. To reload:- CLEAR 25999, load the screen and the code at 27410. POKE 65109,201 and the RAND USR is 31778. d. BM can be used to reset RAMTOP to 25999 by moving 1 byte from 1 to 65000 etc. Summary An easy transfer BUT a POKE is needed. Here you must load in our TAPE UTILITY and put it into "B MODE". Convert the last 2 blocks to normal speed, by saving with the "0" key. You will need to measure the BAUD RATE first, and reload the TU for each block to be converted to normal speed. Write a BASIC LOADER with the usual PAPER, INK, and BORDER COLOURS all set to 0, and a line like: CLEAR 25999: LOAD * "screen" CODE 16384:LOAD * "dark" CODE 27410 POKE 65109,201:RANDOMIZE USR 31778 3 HERC*LES - SLAYER OF THE DAMNED 48/128K --------------------------------- a. Transfer the short block of 4300 bytes to drle as "£11". This code is only-needed for 128K users. b. Split the next block into 3704 bytes and the rest with AHR. These will be "1" and "2". Transfer the last block to drive as "3". c. Use BM to move 3704 bytes from 16484 to 23296, jump to 31340 and set the STACK POINTER to 65520. d. Combine at 27000, load BM into 27001 and POKE 27000,243. e. Transfer all remaining parts. f. Write the usual basic to include the "3" code at 41883. g. 128K users should POKE 23388,17 and LOAD "£11" code at 50000, then POKE 23388,16 before the usual basic. h. 48K USERS POKE 65532,48 BEFORE THE FINAL RAND 16384. i. 128K USERS POKE 65532,128. See the manual for TRANSPACK for full information on this 128k transfer. 4. BEYOND THE *CE PALA*E 48/128K ------------------------ a. The main code loads into 24832 for both 48K and 128K versions. Both are 39168 bytes long. b. RAMTOP is 24831 and the RAND USR is 24832 - 48K AND 128K. c. These are ideal programs for CC1 giving a 48K BASE of 28744 and a 128K BASE of 27400. 128K users should POKE BASE+19,64. d. Split the main code into 2168 bytes and the rest with AHR. e. Use BM to move 2168 bytes from 16484 to 24332, jump to 24832 and set RAMTOP to 24831. f. Combine, transfer and write the usual basic. Summary An easy transfer of both 48 and 128K versions. Perform step (d) first, and then transfer both blocks of CODE from TAPE to your DRIVE using our TRANSFER program. Now do step (e), then (f). Remember how to COMBINE CODE - on the assumption that the CODE made by BM was called "moveBEY", and that the first block of CODE produced by AHR was called "2168" and they are both on your DRIVE then run this program: 10 CLEAR 26999:LOAD * "moveBEY" CODE 27000: LOAD * "2168" CODE 27100:SAVE * "ccBEY" CODE 27000,2268 The usual BASIC will load the "ccBEY" CODE into 16384, and the main CODE produced by AHR into 27000, with a USR of 16384. +3 owners need a PAUSE 150 before the USR 16384. 5. KENTI**A ----------- a. A messy transfer. b. Transfer the block AFTER the screen to drive as "1". c. Split the next block into 3704 bytes and the rest with AHR. d. Use BM to move 3704 bytes from 16484 to 23296, return to basic - do not specify a line number and set RAMTOP to 59829. e. Combine at 27000, load BM into 27001 and POKE 27000,243. Transfer all remaining blocks. f. Write this basic:- 10 CLEAR 26999: LOAD * "CC" CODE 16384: LOAD * "*" CODE 27000: LOAD * "1" CODE 59830: LET X= USR 16384 Summary The main program runs from basic. Notice the DISABLE INTERUPTS in step (e). You load the BM code into 27001, and POKE 27000,243. To save the combined code do: SAVE * "cc"CODE 27000, 3804 Note also that the BM code does a return to BASIC. 6. PEGAS*S ---------- a. Write this basic:- 10 LET T=0: FOR N=23300 TO 23398 20 READ A: POKE N,A: LET T=T+A: NEXT N 30 READ A: IF T<>A THEM PRINT "ERROR": STOP 40 LET X = USR 23300 50 DATA 221,33,236,94,17,209,157,1,95,0 60 DATA 49,235,94,243,221,229,197,213,62,255 70 DATA 205,86,5,48,231,209,193,225,237,72 80 DATA 126,169,119,35,27,122,179,32,247,33 90 DATA 61,91,62,195,50,227,103,34,228,103 100 DATA 175,50,232,103,195,204,103,62,127,219 110 DATA 254,31,56,249,221,33,236,94,17,140 120 DATA 10,205,198,4,6,2,33,80,195,43 130 DATA 124,181,32,251,16,246,221,33,120,105 140 DATA 17,136,150,205,198,4,195,232,103,12761 b. Play the tape from the start. When loading is complete tapping will save TWO blocks of code. c. Use BM to move 2700 bytes from 16484 to 24300, jump to 26600 and set the STACK POINTER to 24299. d. Combine at 27000 loading BM at 27001 and poke 27000,243, transfer and write the usual basic. We have included this transfer to show that we sometimes have to write some special CODE to transfer a specific program. Note that step (c) has the STACK POINTER at 24299 - to do this you must NOT get BM to produce the CODE automatically - you must enter "0" when asked for a new RAMTOP, and answer "n" to the questions about "restoring the "bin" to the usual position below RAMTOP", and the one about "POKING 23569". 7. B*GGY B*Y 48K ------------ a. Use AHR on the long block. Split into 3704 bytes and the rest. b. Use BM to move 3704 bytes from 16484 to 23296, jump to 32768 and set the STACK POINTER to 65535. c. Combine at 27000 loading BM at 27001 and POKE 27000,243, transfer and write the usual basic. Again note that BM must produce a new STACK POINTER - see example 6. 8. Y*GI BEAR ------------ a. Transfer the last headerless block to drive. b. Use BM to move 1 byte from 0 to 16384, jump to 33792 and set RAMTOP to 24000. c. Reload the code at 26880 and BM at 16384 with a CLEAR of 26879. RAND 16384 and the game will start. The last headerless block loads into 26880, hence the CLEAR of one byte less in the LOADER you make at step (c). The BM code moves one byte from 0 to 16384 - this is simply put into the code as a DUMMY operation - it isn't needed but the rest of the CODE produced by BM is! (i.e setting RAMTOP to 24000) 9. Mr. WIN* ----------- a. RAMTOP is 27999. b. The main code loads into 28000. c. The RAND USR is 28000. An easy one. Simply copy the main code from tape to drive using TRANSFER, and have a simple BASIC LOADER: 10 CLEAR 27999:LOAD*"WIN"CODE 28000:RANDOMIZE USR 28000 10. CERI*S ---------- a. Use AHR on the long code block and split into 2485 bytes and the rest. b. Use BM to move 2485 bytes from 16484 to 24515, jump to 39510 and set RAMTOP to 24514. c. Combine, transfer and write the usual basic. Nothing special here - other examples cover this. 11. MET*L ARMY -------------- a. Convert to normal speed. b. Transfer to drive. c. Use BM to move 33202 bytes from 27000 to 24800, jump to 40272 and set RAMTOP to 24799. d. CLEAR 26999, load the code at 27000, BM at 16484 and RAND 16384 to start. You will have to use the "B MODE" of the TAPE UTILITY to do step (a). Note in step (d) we say RAND 16384 as short for RANDOMIZE USR 16384. In addition step (d) is meant to give you the information to write your BASIC LOADER - it doesn't tell you but assumes that you understand that is the purpose of that step. 12. GANG PL*NK -------------- a. Use AHR on the long code block. Split into 2750 bytes and the rest. b. Use BM to move 2750 bytes from 16484 to 24250, jump to 24251 and set RAMTOP to 24249. c. Combine, transfer and write the usual basic. Again nothing here that we haven't met before. THE NEXT 12 TRANSFERS ARE TAKEN FROM INFORMATION BOOK 2 - THE ITALICS ARE THE ORIGINAL TEXT - ANY ADDED COMMENTARY TO HELP YOU OUT WILL BE GIVEN IN NORMAL TEXT. 13. CENTURI*NS -------------- a. This is a modified version of the Firebird short tone loader. Write this basic or modify the standard loader appropriately. 10 CLEAR 31999: LET T=0 20 FOR N=32000 TO 32108: READ A: POKE N,A 30 LET T=T+A: NEXT N 40 READ A: IF T<>A THEN PRINT "ERROR": STOP 50 LOAD "" CODE: RANDOMISE USE 32000 100 DATA 42,79,92,17,182,92,229,175,237,82 110 DATA 225,196,229,25,49,144,101,33,194,97 120 DATA 34,63,251,195,0,251,05,87,252,122 130 DATA 254,146,192,33,87,252,34,63,251,62 140 DATA 195,50,58,255,33,219,97,34,59,255 150 DATA 201,50,107,92,33,240,97,17,129,255 160 DATA 1,38,0,237,83,0,0,237,176,195 170 DATA 61,255,62,127,219,254,31,56,249,221 180 DATA 33,0,91,17,120,14,205,194,4,6 . 190 DATA 185,251,118,16,253,243,221,33,120,105 200 DATA 17,136,150,205,194,4,195,32,147,13641 X = 37664 Y = 28000 b. RUN the program and play the appropriate MASTER tape from the start. The program will load more or less as normal. c. Upon completion of loading, change tapes and start recording. Tapping will save TWO headerless blocks to tape with a short gap between the blocks. DO NOT touch ANY keys when the save has begun or your machine will crash. d. The saves are the usual 23296,3704 and 27000,38536 CODE e. The game will start and run normally after the save. f. Use BM to move 3704 bytes from 16484 to 23296, jump to X and set the STACK POINTER to Y. g. Combine this code with the first, short, headerless block at 27000 as normal. The second block loads into 27000 as normal after transfer. Write the usual basic and voila! F*rebird games often have a particular piece of machine code that is used to load in the game. The above is an example of this. All you do is to write the BASIC as shown in step (a), then RUN it, and PLAY your original game from the start. After loading is complete, put a fresh tape in your recorder and tap the SPACE key to save 2 headerless blocks. Transfer these to drive - step (d) tells you where they should load. Now follow step (f). Step (g) tells you to combine the first (short) headerless block (called "3704" say), with the BM CODE (say it was called "bmX"). This could be done so: 10 CLEAR 26999:LOAD*"bmX"CODE 27000:LOAD*"3704"CODE 27100:SAVE*"cc"CODE 27000,3804 You then write the usual BASIC LOADER with USR of 16384, loading the 2nd block of CODE into 27000. 14. X*N ------- a. A machine code transfer. b. Write this basic:- 10 LET T=0 20 FOR N=65024 TO 65070: READ A: POKE N,A: LET T=T+A 30 NEXT N: READ A: IF T<>A THEN PRINT "ERROR": STOP 40 RANDOMISE USR 65024 50 DATA 221,33,0,240,17,186,0,62,255,55 60 DATA 205,86,5,48,241,33,27,254,34,117 70 DATA 240,49,0,0,195,0,240,62,127,219 80 DATA 254,31,56,249,221,33,0,64,17,32 90 DATA 78,205,194,4,195,0,128,5012 c. Run this program and play the master tape from the start. d. When loaded, tapping will save ONE headerless block. e. Transfer this block to drive. f. Use BM to move 20000 bytes from 27000 to 15384, jump to 32768 and set the STACK POINTER to 65535. g. Reload the code at 27000. Load the BM code at 48000 and RAND 48000 will start the game. Step (g) is the instructions for writing the BASIC LOADER with a final RANDOMIZE USR 48000. 15. MOLE* CHRISTMA* ------------------- a. A freebie game. b. Split the main code into 2424 bytes and the rest with AHR. c. Use BM to move 2424 bytes from 16484 to 24576, jump to 33024 and set RAMTOP to 24575. d. Combine, transfer and write the usual basic. 16. R**M TEN ------------- a. Transfer the last code block to drive. b. Reload at 38912 with RAMTOP at 32767 and the RAND USR is 44544. The BASIC LOADER at step (b) will simply need the following: 10 CLEAR 32767:LOAD *"maincode" CODE 38912:RANDOMIZE USR 44544 17. RED L*D ----------- a. Only the last long headerless block is needed. b. Use AHR to chop off 6912 bytes and split into 724 bytes and the rest. c. Transfer these to drive as "1" and "2". d. Write this basic:- 10 LET T=0 20 FOR N=62000 TO 62043 30 READ A: POKE N,A: LET T=T+A 40 NEXT N: READ A: IF T<>A TURN PRINT "ERROR": STOP 50 SAVE * "3" CODE 62000,70 60 DATA 17,43,254,1,0,1,33,0,91,26 70 DATA 119,27,11,35,120,177,32,247,33,120 80 DATA 105,17,183,237,1,31,66,126,245,26 90 DATA 119,241,18,35,27,11,120,177,32,243 100 DATA 33,62,63,34,44,254,33,87,201,34 110 DATA 46,254,33,120,105,17,192,93,1,64 120 DATA 132,237,176,49,88,253,195,125,255,6727 e. Alter the syntax of line 50 to that of your drive and run the program. f. A short block of relocating machine code will be saved to drive. g. Now write this basic to auto-run from line 10:- 10 CLEAR 26999: LOAD * "1" CODE 64812: LOAD * "2" CODE 27000: LOAD * "3" CODE 62000: POKE 61999 243:RANDOMISE USR 61999 Summary An easy transfer of a very difficult program. Machine code is needed to put the program code into the correct addresses prior to decryption of the program before it starts. An extra piece of machine code is needed for this transfer. It is made at step (d). 18. P*GGY --------- a. Split the last code block into 2877 bytes and the rest. b. Use BM to move 2877 bytes from 16484 to 24123, jump to 33171 and set RAMTOP to 24122. c. Combine, transfer and write the usual basic. 19. GR*D *RON ------------- a. The last TWO code blocks are needed. b. Use AHR on the first and chop off 6912 bytes and split into 3704 bytes and the rest. c. Transfer the last block to drive. d. Use BM to move 3704 bytes from 16484 to 23296, RETURN to basic LINE 6 and make NO change to RAMTOP. e. Write the usual basic, include the final code to load at 64950, combine and transfer. 20. DISP*SABLE HER*ES --------------------- a. The last code block loads into 28000. b. RAMTOP is 27999 and the RAND USR is 31851. We really do use a brief explanation here. Simply use TRANSFER to copy the last long code directly to your drive. Then write a simple BASIC LOADER of the form: 10 CLEAR 27999:LOAD*"disCODE"CODE 28000:RANDOMIZE USR 31851 21. BARGA*N BAS*MENT -------------------- a. A novel program in that it was "MASTERED" with one of those push button devices! At least our master was like that!. b. Transfer each code block to drive. c. Write this basic to auto-run from line 10:- 10 CLEAR 24791: LOAD * "3" CODE 24792: LOAD * "2" CODE 16384: RANDOMIZE USR 24830: LOAD * "1" CODE 16464: RANDOMIZE USR 24853 d. Most users should have NO problems with RAMTOP at 24791. It works even from M/D, 22. XEN* -------- a. Convert the last TWO blocks to normal speed with TU. b. Use AHR on the first block and split into 2424 bytes and the rest. c. Use BM to move 2424 bytes from 16484 to 24576, jump to 52600 and set the STACK POINTER to 24538. d. Combine, transfer ALL blocks and write the usual basic to include the short block at 65288. Most of this is obvious. The BASIC LOADER written at step (d) refers to the short block. This is the 2nd block mentioned at step (a). So the combined code as usual goes into 16384, and the rest produced from step (b) into 27000. Also load the final block produced at step (a) into 65288. 23. S*ULS OF DARK*N ------------------- a. Use AHR on the last block. Chop off 6912 bytes and split into 3704 bytes and the rest. c. Use BM to move 3704 bytes from 16484 to 23296, jump to 25344 and set RAMTOP to 25340. d. Combine, transfer and write the usual basic. 24. FIREST*RM ------------- a. Transfer the screen and the code block to drive. b. Use BM to move 36349 bytes from 27000 to 24064, jump to 24064 and set RAMTOP to 65367. c. Write basic to CLEAR 26999, load the screen, and then the code at 27000. Load the BM code at 64000. RAND 64000 will then start the game. Summary The screen is needed for the gameplay. The main code loads into 24064. The RAND USR is 24064 and RAMTOP is 65367. AND NOW FOR SOME TRANSFERS FROM INFORMATION BOOK 1 - YOU WILL NOTICE THAT THE EXPLANATIOM FOR SOME IS VERY MUCH FULLER AS WE HADN'T ADOPTED ANY SHORT-HAND NOTATION AT THIS POINT. AGAIN ANY EXTRA COMMENTARY WILL BE PLACED IN NORMAL TEXT, THE ORIGINAL IN ITALICS. 25. 3D Starstr*** ----------------- a. Ignore all parts except the last long block of code that starts loading into the screen. Its structure is: T H T B T H T B (last part) Load in the Advanced header reader program, and enter option 4. b. Get AHR to CHOP OFF the screen and printer buffer (7168 bytes), and SPLIT the rest into 4000 and the rest. These might be named 3D" and "3D *". c. Load in Bytes Mover, and get it to produce code to move 4000 bytes from 16484 to 23552. It should NOT return to basic but JUMP directly to 65280, and the new Ramtop should be 24240. This might be named "3Dmc". Save onto tape. d. Now combine the code produced in (c), called "3Dmc" with the smaller 4000 bytes produced in (b) called "3D *" so: (i) With an EMPTY Spectrum (type Randomise USR 0), type CLEAR 26999. (W-drive owners enter NEW*) (ii) LOAD "3Dmc" CODE 27000 (and play this through from tape). (iii) LOAD "3D" CODE 27100 (and play the "3D" code through). (iv) Finally save onto your drive as a single part using SAVE *"m";1;"3D2"CODE 27000,4100 (for M/drive) OR SAVE*"3D*",27000,4100 (for W-drive) depending on the syntax of your drive. Thus we have combined the moving code produced by Bytes Mover, with the first 4000 bytes of the program. THIS COMBINING TECHNIQUE WILL BE USED FOR OTHER PROGRAMS, and saves on loading time. e. Transfer the long piece of code, named "3D *", to your drive. f. Finally write this piece of basic and save onto your drive to auto-run from line 10: 10 CLEAR VAL "26999".LOAD *"m";1;"3D *"CODE VAL "27552" 20 LOAD*"m";1;"3D2" CODE VAL "16384 ":RANDOMISE USR VAL "16384". (for W-drive the LOAD syntax is LOAD*"3D2",16384 - thus alter as appropriate). Note that the "3D2" code, will, in later sheets, be called "cc". SUMMARY: The code has 7168 bytes chopped off the start, and thus the rest loads in to 23552, with a RAND USR=65280, RAMTOP=24240. We would now shorten the above to someting like the following: Use AHR on the last long block, chopping off 7168 bytes and saving as 4000 bytes and the rest. Use BM to move 4000 from 16484 to 23552, jumping to 65280 with RAMTOP = 24240. Transfer, combine, and write the usual BASIC. 26. Automan** ------------- This program has a fast loader. The only blocks you will need are the screen and the final block that follows. Both are fast loaders (enter the "B" mode). a. Convert both the screen and the final block to "normal" using TU. b. Use Header Creator to put headers onto both blocks. Save as say "p" and "q" (screen =p, last block=q). c. Transfer both to your drive. d. Write and save this basic program to auto-run from line 10. 10 CLEAR VAL "33279":LOAD*"m";1;"q"CODE VAL"33280": LOAD*"m";1;"p"CODE VAL "16384":RANDOMISE USR VAL "65274" (again alter as appropriate for your drive.) Summary: Two blocks of code needed; the screen string loads into 16384 as usual, the other into 33280 with a RAND USR number of 65274 with new Ramtop of 33279. You would NOT use HEADER CREATOR at step (b) as TRANSFER can copy directly to your drive so you can manage steps (b) and (c) together. 27. Gyro* --------- This is similar to example 1 as it is loaded at normal speed and the main block of code loads in at the screen. a. Use Advanced Header reader on the last long block that loads in the screen picture. Use it to CHOP off the 6912 bytes of the screen and SPLIT into 4000 bytes and the rest. Call these parts "g" and "g *". b. Use Bytes mover to move 4000 bytes from 16484 to 23296. Make it jump to 24576 (not return to basic) with a new Ramtop of 65535. Save as "gmc". c. Do exactly the same combining as in example 1 step d, with "gmc" and "g" saving onto your drive as say "gc". d. Transfer the long part of code called "g *" to your drive. e. Save the following basic program to auto-run from line 10. 10 CLEAR VAL "27000": LOAD*"m";1;"g *" CODE VAL "27296": LOAD *"m";VAL "1"; "gc" CODE VAL "16384":RANDOMISE USR VAL "16384" (alter as appropriate for your drive.) Summary: Chop off screen picture and load rest into 23296, with RAND USR number of 24576 and new Ramtop of 65535. 28. Sherlo** ------------ a. Similar to example 1. Find the last long block, and using option 4 of Advanced Header Reader, SPLIT the block into two parts, the first block 3064 bytes in length (no chopping) and the rest. Save as "sh" and "sh *". b. Transfer the "sh *" code to your drive. C. Use Bytes Mover to produce machine code to move 3064 bytes from 16484 to 23936, making it jump to 41024 (not returning to basic), with a new Ramtop of 23935. Call this say "shmc". d. Combine, as example 1, step d, parts "shmc" and "sh", but saving at (d) (iv) so: SAVE*"m";1;"shc" CODE 27000,3164 or as appropriate for your drive. e. Save the following basic to auto-run from line 10. 10 CLEAR VAL "26999":LOAD *"m";1;"sh *" CODE VAL "27000":LOAD*"m" ; VAL "1" ; "shc" CODE VAL"16384":RANDOMISE USR VAL "16384" Summary: The last long block of code loads into 23936 with RAND USR number of 41024 and new Ramtop of 23935. 29. TRANSMUTE* -------------- Only the last, long headerless block is needed. Use AHR to split into 2986 bytes and the rest. Use BM to move 2986 bytes from 16484 to 24014, jump to 24014 and make NO change in RAMTOP. Now KEEP CONTROL and set the STACK POINTER to 24010, making NO other changes. Combine, transfer and write the usual basic. Remember to "keep control" you will have to say "n" when asked by BM "do you want me to make the code automatically". 30. DODGY GEEZER* ------------------ Both parts transfer in similar manner. The only difference being that part 2 does not load with a screen. The short, 48 byte, "linad" code and the last long block are needed. Use AHR on the last long block - the header is correct. Split into 2424 bytes and the rest. Transfer "the rest" ("*") code to drive. Use BM to move 48 bytes from 16484 to 23504 AND move 2424 bytes from 16584 to 24576, jump to 24732 and set RAMTOP to 24575. We now have to combine the "linad", "BM" and "2424" bytes. As usual we will do this at 27000 thus:- 10 CLEAR VAL "26999": LOAD "BM" CODE VAL "27000": LOAD "linad" CODE VAL "27100": LOAD "2424" CODE VAL "27200": SAVE * -- "CC" CODE VAL "27000", VAL "2624" Write the usual basic to auto-run from line 10. 31. SPORT OF KING* ------------------ This program is included for racing fans because if your drive uses ANY bytes then the program and code are too long to fit in memory with the original CLEAR of 34975. Use AHR to split the headerless block after the screen into 3000 bytes and the rest. Transfer "the rest" ("*") code to drive as "a". MERGE the last basic and add line 9999 thus:- 9999 RANDOMISE USR VAL "16384" Now save this basic to drive to auto-run from line 9999, call it "sp", Use BM to move 3000 bytes from 16484 to 34976, return to basic LINE 230 and set RAMTOP to 34975. Combine the 2424 bytes and the BM code as usual at 27000 and save as "b" CODE 27000,3100. Now save this basic to auto-run from line 10:- 10 CLEAR VAL "37975": LOAD * --"a" CODE VAL "37976":LOAD *-- "b" CODE VAL "16384": LOAD * -- "sp" 32. IMPOSSABAL* --------------- Use AHR on the last, long, block. Treat it as a headerless block. Split it into 1400 bytes and the rest. Use BM to move 1400 bytes from 16484 to 25600, jump to 65105 and set RAMTOP to 25599. Combine and transfer "the rest" ("*") and the combined code ("cc"). Now write this basic:- 10 CLEAR 65000::LET T=0 :FOR N =65105 TO 65152 :READ A: 20 POKE N,A: LET T=T+A:NEXT N 30 READ A: IF T<>A THEN PRINT "ERROR": STOP 40 SAVE * -- "REL" CODE 65105,48 50 DATA 205,0,100,243,49,255,255,33,0,109,17,0,91,1,0,143 60 DATA 237,176,33,113,254,17,0,240,1,16,0,237,176,195,0,240 70 DATA 33,0,252,17,1,252,1,255,1,54,0,237,176,195,0,128,5038 If your typing has been accurate the code will be saved to drive (with the usual syntax changes in line 60). Now write this basic to auto run from line 10:- 10 CLEAR VAL "26999": LOAD * -- "*" CODE VAL "27000":LOAD * -- "CC" CODE VAL "16384": LOAD * --"REL" CODE: RANDOMISE USR VAL "16384" 33. PROFFESSIONAL SNOOKER *IMULATION ------------------------------------ Transfer the last headerless block to drive as "s". Now write this basic to auto-run from line 10:- 10 LOAD * -- "s" CODE 43008: RANDOMISE USR 64784 34. KOBYASHI NAR* ----------------- Included as the screen is needed for the game to run properly. Use AHR to split the first code block into 1336 bytes and the rest. Use BM to move 1336 bytes from 20580 to 25664, jump to 35853 and set RAMTOP to 24769. Transfer the screen code to drive, transfer the main and combined codes to drive. Write the usual basic to include the screen load THEN load the combined code into 20480 and RAND 20480. 35. HEAVY ON THE MAGIK ---------------------- Convert the long, high speed, headerless block to normal with TU in "c" mode. Use AHR to chop of 6880 bytes and split into 3704 bytes and the rest. Use BM to move 3704 bytes from 16484 to 23296, jump to 47027 and set RAMTOP to 24099. Combine, transfer and write the usual basic. 36. SIGM* 7 ----------- Only the last, long block is needed. Use •ARR to chap off 6912 bytes and split into 3704 bytes and the rest. Use BM to move 3704 bytes from 16484 to 23296, jump to 59844 and set RAMTOP to 25085. Combine, transfer and write the usual basic. 37. JAILBREA* ------------- This program loads TWO main code blocks, the first into the screen. Use AHR on the first block, chop off 6912 bytes and save as ONE block. Use BM to move 6400 bytes from 16484 to 23296, jump to 65520 and MAKE NO CHANGE to RAMTOP. NOW KEEP CONTROL and set the STACK POINTER to 29952, making NO other changes. Combine these blocks at 27000, as normal, and save to drive as "jb1" CODE 27000,6500. Transfer the last block to drive as "jb2" CODE. Now write this basic to auto-run from line 10:- 10 CLEAR 29000: LOAD * -- "jb2" CODE 29952: LOAD * -- "jb1" CODE 16384: RANDOMISE USR 16384 38.NOSFERAT* ------------ This program loads a long block into the screen and then a further block into 23296. Use AHR on the first block chopping off 13824 bytes. Transfer to drive as "N" code. Transfer the last two blocks to drive as "1" and "2". Use BM to move 6896 bytes from 16384 to 23296, jump to 30222 and make NO CHANGE to RAMTOP. KEEP CONTROL and set the STACK POINTER to 65535, making NO other changes. Save to drive as "nmc" code. Now write this basic to auto-run from line 10:- 10 CLEAR 30000: LOAD * -- "N" CODE 30208: LOAD * —- "1" CODE 16384: LOAD * —- "nmc" CODE 65200: RANDOMISE USR 65200 If you wish to load part 2 then change the "1" to "2" or write appropriate basic to give you the option of part 1 or part 2. 39. HOW TO BE A HE*O -------------------- Ignore the first code block. Treat the next block as headerless and transfer to drive as "heroa". It is 11000 bytes long. Transfer the last three parts to drive as "herob", "heroc" and "herod" respectively. They are 23426 bytes long- Use BM to move:- 23426 bytes from 31100 to 23638 AND 11000 bytes from 54535 to 47064 AND 6000 bytes from 16484 to 58064 AND 1000 bytes from 16484 to 64000 Jump to 47064 and make NO CHANGE in RAMTOP. KEEP CONTROL and set the STACK POINTER to 23359. Save as "heromc". Now write this basic to auto-run from line 10:- 10 CLEAR 31099: BORDER 0: INK 0: PAPER 0: CLS: LOAD * - "heroa" CODE 54535: LOAD * -- "heromc" CODE 16384 20 INK 6: PRINT AT 10,4; "1. EGYTIAN TOMB"; AT 12,4;"2. THE SPACE STATION"; AT 14,4; "3. AFTER THE HOLOCAUST"; AT 16,4; "PRESS KEY 1 OR 2 OR 3" 30 LET A$ = INKEY$:IF A$="" THEN GO TO 30 40 IF A$ ="1" THEN LET B$ = "herob" 50 IF A$ ="2" THEN LET B$ = "heroc" 60 IF A$ ="3" THEN LET B$ = "herod" 70 IF A$ >= "1" AND A$ <= "3" THEN GO TO 90 80 GO TO 30 90 LOAD * -- B$ CODE 31100: RANDOMISE USR 16384 40. BOMB JAC* 2 --------------- Write this basic:- 10 CLEAR 60000: FOR N=65100 TO 65135 20 READ A: POKE N,A: NEXT N: LOAD "" CODE 40 POKE 65225,76: POKE 65226,254 50 RANDOMISE USR 64705 60 DATA 251,62,127,219,254,31,56,249,221,33 70 DATA 0,91,17,120,14,205,194,4,6,192,118 80 DATA 16,253,221,33,120,105,17,136,150 90 DATA 205,194,4,195,0,91 Run this program and play the master tape from the start. When the program has loaded, tapping will save two headerless blocks. CHANGE TAPES FIRST. The game will then run normally. Use BM to move 3704 bytes from 16484 to 23296, jump to 23296 and Make NO change in RAMTOP. NOW keep control and set the STACK POINTER to 65110. Combine the first saved block with the BM code at 27000, but load the BM code at 27001 and poke 27000,243. Transfer the second saved block as normal. Write the usual basic. 41. SHOW JUM*ING ---------------- Only the last headerless block is needed. Split this into 2600 bytes and the rest with AHR. Use BM to move 2600 bytes from 16484 to 24400, jump to 55360 and set RAMTOP to 24399. Combine, transfer and write the usual basic. 42. SCEPTR* OF BAGDA* --------------------- Only the last code block is needed. Use AHR to split into 2936 bytes and the rest. Use BM to move 2936 bytes from 16484 to 24064, jump to 58002 and set RAMTOP to 24063. Combine, transfer and write the usual basic. 43. NEXU* --------- Only the last three parts are needed. Transfer all these parts to drive as "1", "2", and "3". Use BM to move 28000 bytes from 27000 to 24000 AND move 10000 bytes from 56000 to 52000, jump to 24000 and set RAMTOP to 23999. Now write this basic to auto-run from line 10:- 10 CLEAR VAL "26999": LOAD * -- "1" CODE VAL "27000":LOAD * -- "2" CODE VAL "55000": LOAD * -- "BM" CODE VAL "65001":LOAD * -- "3" CODE VAL "16384":RANDOMISE USR VAL "16384" 44. STA* RAIDE*S 2 ------------------ Write this basic:- 10 CLEAR 29999: LOAD "" CODE: POKE 65070,201: RANDOMIZE USR 65024 The game will load BUT will return to basic when loaded. If you now save to drive "sr" CODE 30000,32000, you have done the transfer. RAMTOP is set at 26999 and issuing a RAND USR 30000 sets the game away. THE REST OF THE TRANSFERS ARE ALMOST ENTIRELY THE "Firebir*" SHORT TONE LEADER. THE FOLLOWING PROGRAM IS A BASIC CORE TO TRANSFER ALL THE REMAINING PROGRAMS. THEY HAVE A SIMILAR LOADER, BUT, LOAD THE CODE ONTO SLIGHTLY DIFFERENT ADDRESSES. THE VARIABLES A TO J IN THE DATA STATEMENTS ARE THE DIFFERENT ADDRESSES AND THEIR VALUES. OTHER DIFFERENCES ARE GIVEN UNDER EACH PROGRAM HEADING. THE BASIC LOADER AND SAVER PROGRAM:- 10 CLEAR 31999: LET T=0 20 FOR N=32000 TO 32108: READ A: POKE N,A 30 LET T=T+A: NEXT N 40 READ A: IF T<>A THEN PRINT "ERROR": STOP 50 LOAD "" CODE: RANDOMIZE USR 32000 100 DATA 42,79,92,17,182,92,229,175,237,82 110 DATA 225,196,229,25,49,A,B,33,26,125 120 DATA 34,63,205,195,0,205,205,87,206,122 130 DATA 254,46,192,33,87,206,34,63,205,62 140 DATA 195,50,58,C,33,51,125,34,59,C 150 DATA 201,50,107,92,33,72,125,17,D,C 160 DATA 1,38,0,237,83,E,F,237,176,195 170 DATA 61,C,62,127,219,254,31,56,249,221 180 DATA 33,0,91,17,120,14,205,194,4,6 190 DATA 185,251,118,16,253,243,221,33,120,105 200 DATA 17,136,150,205,194,4,195,G,H,J Use the information below to put in the values of A to J. RUN the program and play the appropriate MASTER tape from the start. The program will load more or less as normal. Upon completion of loading, change tapes and start recording. Tapping will save TWO leaderless blocks to tape with a short gap between the blocks. DO NOT touch ANY keys when the save has begun or your machine will crash. The saves are the usual 23296,3704 and 27000,38536 CODE blocks. The game will start and run normally after the save. Use BM to move 3704 bytes from 16484 to 23296, jump to X and set the STACK POINTER to Y. Combine this code with the first, short, headerless block at 27000 as normal. The second block loads into 27000 as normal after transfer. Write the usual basic and voila! 45.STARGLIDE* (48k version only) ------------- Values are:- A = 120 B = 105 C = 93 D = 126 E = 0 F = 0 G = 24 H = 219 J = 12276 X = 56088 Y = 27391 NB Two pokes are needed in the BASIC loader:- POKE 30027,83 and POKE 30034,83. 46. DRUI* --------- Values are:- A = 176 B = 104 C = 105 D = 137 E = 0 F = 0 G = 23 H= 143 J = 12313 X = 36631 Y = 28656 NB Two pokes are needed in the BASIC loader:- POKE 30027,83 and POKE 30034,83. 47. HIV* -------- Values are:- A = 236 B = 94 C = 95 D = 170 E = 0 F = 0 G = 0 H = 96 J = 12294 X = 24576 Y = 24319 48. KIN*'S KEE* --------------- Values are:- A = 76 B = 195 C = 93 D = 12 E = 176 F = 93 G = 240 H = 255 J = 12729 X = 55520 Y = 23999 NB Two pokes are needed in the BASIC loader:- POKE 30027,83 and POKE 30034,83. 49. THRUS* 2 ------------ Values are:- A = 48 B = 117 C = 93 D = 0 E = 197 F = 93 G = 75 H = 146 J = 12366 X = 37451 Y = 25000 50. TUBARUB* ------------ Values are:- A = 176 B = 95 C = 93 D = 171 E = 0 F = 0 G = 0 H = 96 J = 12228 X = 24576 Y = 23760 NB. Two blocks of code need moving with BM. The usual 3704 from 16484 to 23296 AND 6912 from 49152 to 16384, jump to X and set the STACK POINTER to Y. Note the use of the term "saves the usual code 23296,3704 and 27000,38536. The special machine code is always saving the full contents of memory beyond the screen in 2 headerless blocks. You might find it easier to add a line 15 to this BASIC so 15 LET A= 34:LET B= etc up to LET J=23: which you can EDIT for each game. TRANS1 - v1 - 9.89