Converting 48k PAW games for SAM By Dave Whitmore 28/12/1991 The concept of converting PAW games, so that they can save data to Sam disk, was a subject that Dave Ledbury and I discussed at an All Formats Fair in Birmingham - Autumn 1991. I had a talk with Phil about it, and he seemed to like the idea so here's how it goes: After a bit of thought, and knowing that PAW has the ability to jump to Spectrum BASIC using EXTERN, and that SC_SPECLONE has the ability to "NEW" to Sam BASIC, I went about trying the idea out. I have converted 12 games so far, with 100% success, the list of games that were converted can be found at the end of this article. Converting PAWed Games To convert a PAWed game using the method that I use, you will need a Spectrum, a Plus D interface and 3.5 disk drive, a copy of the utility SC_SPECLONE, the Plus D version of PAW, and a tape version of a PAWed game!!! I realise that the majority of club members will be lucky if they have a working copy of SC_SPECLONE alone, and a solution to this situation may be provided by others. DO-IT-YOURSELF (?) The game that you want to convert must be a 48K version, and preferably it should have code blocks with standard tone headers, ie - you should be able to load the code block with LOAD "" CODE. If the file does have headerless blocks of code then don't despair, I have written a help sheet that will be useful to owners of the PLUS D hacker or a Multiface. The sheet can be obtained from me, free of charge, if you send me a stamped, self-addressed envelope - see address later. For now we will presume that the game has standard code headers. First, we will have to identify the database code blocks. You will normally find that the PAWed game tape has files in the following order: A BASIC loader, then sometimes a SCREEN$ file, next the PAW interpreter CODE file, followed by the two database CODE files. As an example, we will say that the game we want to convert is called "CAPTAIN KARLOS - SPACE EXPLORER" (never heard of it? - don't worry!). Now we have our tape copy of the game in the tape player, and the Spectrum is turned on. We want to check the file names on the tape, so we will enter an unlikely filename - LOAD "ANYSTUFF". Press play on your tape deck and watch the filenames that appear. In our example, the screen looks like this: BASIC "KARLOS" - this is the loader BYTES "PICCY" - the loading screen (optional) BYTES "EXPLORER @" - this is the interpreter file BYTES "EXPLORER A" - the first database file BYTES "EXPLORER B" - the second database file The last two files in our example are the ones that we will be using for the conversion. Make a note of the filename, press BREAK and rewind your tape. Load your Plus D version of PAW, and make a note of the EXTERN address. From the main menu select the DEVICE option (Y) and change the device to T, for tape loading. Return to the main menu and select "J" for LOAD DATABASE. Enter the name of the database - EXPLORER , do not include the A or B identifiers, just enter the first part. Press play on your tape. PAW will search the tape for the database files, it will ignore the BASIC, SCREEN and interpreter CODE file. When PAW finds the database that you need it will proceed to load the two files. Once the files are loaded, you can begin to alter the game for SAM. OR- you could change the device back to D1 now and save the adventure to the Plus D for use with the Spectrum, you will find that all loading and saving will work with D1 as normal, though you may want to alter messages in the database to prompt save or load. If you want to change the game for SAM, then follow these next instructions carefully. Select the VOCABULARY option from the main menu. (V) Check that the word DISK is not present - S DISK If DISK is not present, then all is well and you can skip the next bit. Follow this part only if DISK is present in the vocabulary. If DISK is in the vocabulary, you will have to think up a word to use instead. You can use any word provided that it isn't in the vocabulary. You could for instance choose the word SAM. Check that SAM is not present and make a note of your choice. From now on when you see references to DISK, substitute the word for the one of your choice. Now we are going to delete the normal LOAD and SAVE words from the database. Enter the following: D LOAD D SAVE PAW will tell you that the words are deleted. It is not always necessary to delete LOAD and SAVE, but some adventures have very few spare bytes free, and deleteing these will give restore some space. Check the VERB table for a number that is not used. To do this type: P 0 , then find a VERB number that is not used. We will presume that there is no VERB entry number 99, you MUST check this though, as if No 99 VERB is present then your conversion wont work correctly and some mighty strange results WILL occur! Enter this: I DISK 99 0 - substitute 99 if necessary Leave the vocabulary section by entering Z. From the main menu, select R for RESPONSE TABLE and enter the following: I DISK _ (enter) EXTERN 0 DESC (enter) That is the last entry in the database that is needed on the simplest level. You could make other alterations to the database, if you are experienced, experiment! Now return to the main menu, and select Y for DEVICE. Change the device to 1 (for D1), and return to the main menu. Select A - for SAVE ADVENTURE. Enter a name for adventure - eg: KARLOS, or whatever. The game will be saved to your Plus D disk. You may like to check the CAT (DIR) on the device (Y) to ensure that the files are saved. They should resemble the following (with your filename instead of Karlos) files. KARLOS BASIC KARLOS @ CODE KARLOS A CODE KARLOS B CODE Reset your Spectrum. Next we will write a new Spectrum BASIC loader for the game. Note - you can leave the REM lines out. You should substitute KARLOS for the name of your database. Make sure that the @ character is the tenth character position of the name in line 30 and it should be preceded with spaces. 10 CLEAR 28799 20 LET extvec = 34768 25 REM ^ or your PAW version's extvec address 30 LOAD d1 "KARLOS @" CODE 31 REM note ^^ the spaces 40 POKE extvec,195 50 RANDOMIZE USR 34777 100 POKE 23296,1: NEW : STOP 110 REM line 100 must not be any other line number Now save your new loader using a filename you will remember! eg; SAVE d1 "KAR LOAD" LINE 10 Now enter RUN The game should load into your Spectrum. You can try a few things to check that the game is working correctly, and when you are satisfied type DISK. If you have done everything right, then the Spectrum should reset. This may seem wrong, but it IS the effect that we want. Make sure that your Spectrum is in 48K mode and load your loader program again and the game should automatically load. Now press keys until an input is required- eg; a cursor on screen. Now use the Plus D snapshot button and press 4 to save a SNAPshot of the game. Rename the SNAP to a name you will remember. Dont forget that to rename on the spectrum we use ERASE d1 name1 TO name2. We will use KAR 48 in this example. Turn your Spectrum off, then turn on your Sam. BOOT, load SC_SPECLONE and choose the option for CONVERT PLUS D. Insert the Plus D disk with the SNAP file on it and input the number for the SNAP and the snap will be converted. Take out the Plus D disk and insert the SAM disk you want to use. Enter the filename - eg "KAR 48" then return, the converted file should now be on your SAM disk. NB: The Sam BASIC loader file that I have used on some examples can be altered to suit your filenames. If you have MasterBASIC and you name your converted Plus D SNAPshot with a three letter Identifier followed by " 48" then the BASIC can be altered very quickly - examples for your converted Plus D file could be - "BCD 48", "ARK 48", "RAB 48" etc. This method is used for speed and should be done the following way. Using MasterBASIC, load the dummy file "DUM 48" and simply type ALTER "DUM" to "KAR", where KAR is the three letter filename you gave to the converte dgame. Then type SAVER, and your loader will be saved to disk an dready to use. If you do not have MasterBASIC then you will have to alter every occurence of "DUM" manually. In my working examples, I have altered the BASIC of SPECLONE so that the game will drop to a SAM menu that will do the loading and saving for a game. When you wish to Save a game, you are asked for a filename with a maximum length of 7 characters. This is so that the three letter identifier ("KAR") can be tagged to the filename for future recognition in the directory. The main reason for it's inclusion is so the player won't mistakenly load a position from a different game that may share the disk. If you deliberatly want to load a position from another game, you can still do this by typing the filename, followed by the wildcard "*". Doing this can sometimes give amusing results. Another option to deal with colour changes is included. The idea of displaying MODE 4 graphics is currently being investigated, so we could end up with some fair examples. Playing the converted game To play the converted adventure, simply load the BASIC loader. You must select option 1 twice in order to play the game. Don't ask me why - it just works that way, unless further alterations are made to the database and you do some fiddling with Speclone, again see later. When the game starts, in this form, it will appear to have stopped and the report STOP will be displayed, don't worry about this, as you will find that once a key is pressed the game will start normally. At any time during game play, you can choose the option to save or load from disk. To do this simply enter DISK ( or the alternative name you included in the database - SAM?) On entering DISK, you will jump to the menu and saving and loading can be done from the menu. You will find that you can also alter the colours to suit your mood. Most adventures use black as the background, so altering palette 0 and 8 to your choice (0-127) will change the background colour, if this is so. Check the colour of the text before changing the text colour! In the original draft for this article, I included a text file of the necessary Sam BASIC that is needed to run your conversion, but due to disk space, you will have to read through the BASIC dummy loader that is included on this disk. You will find the program on the disk - filename "DUMLOAD". The file is saved with no auto run line, however when you use the SAVER procedure your altered program will auto run when loaded, just type SAVER when you have made the necessary alterations. Some of you will no doubt find better ways to convert games. If you can improve the above method, or figure out ways that may fix the untidy way that the game initially starts then please contact me at my address - you never know what may happen if we can make Spectrum PAW games presentable on Sam - with or without MODE 4 graphics! Write to: Dave Whitmore ) Since writing the above, I have 3 Pass Way ) converted the game A LEGACY FOR Carr Mill ) ALARIC. The methods I used were St Helens ) slightly more advanced, and the LANCASHIRE ) presentation is much better than WA11 7HL ) some of my previous efforts. _________________________) I believe that the game is PD and we are looking into the possibility of including the conversion in a future issue. Back on the subject of headerless PAW files. If the file does have headerless blocks of code then don't despair, I have written a help sheet that will be useful to owners of the PLUS D hacker or a Multiface and delves deeper into the subject of conversions in general, with tips for Speclone and an alternative method for PAW tape users. The sheet can be obtained from me, free of charge, if you send me a stamped addressed envelope, include a disk if you prefer the 'OUTWRITE' text file. For people who don't own a Plus D or a version of PAW, we are thinking of starting a conversion service for those who own the original games we have so far converted. We are not sure how we stand legally on conversions so we will have to wait to see. I hope to bring you some news on the possible service next issue. The games I have converted up to now are MUTANT: THE MATCHMAKER: THE ENCHANTED COTTAGE: REALM OF DARKNESS: THE HAMMER OF GRIMMOLD: DAVEY JONES LOCKER: THE JADE NECKLACE: THE CUP: WITCH HUNT: THE CHALLEMGE: BOG OF BRIT: and a pretty good version of A LEGACY FOR ALARIC. I reckon that most 48k PAW games can be converted, the only ones I can see that may cause problems (rare) are ones that make such use of EXTERN that there may be clash of some sort. - Dave