The Steven McDonald "16K ZX81 High Res Range" ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ ÛÛÛÛ ÛÛÛÛ ÛÛÛÛ Û Û ÛÛÛÛ ÛÛÛÛ Û Û ÛÛÛÛ Û Û Û Û Û Û Û Û Û Û Û Û Û Û Û Û Û ÛÛÛÛ Û Û Û ÛÛ Û ÛÛÛÛ Û Û ÛÛÛÛ ÛÛÛÛ Û Û Û Û Û Û Û Û Û Û Û Û Û Û Û Û Û ÛÛÛÛ ÛÛÛÛ Û Û ÛÛÛÛ Û Û ÛÛÛÛ ÛÛÛÛ Û Û ÛÛ Û Û ÛÛÛ Û Û ÛÛ Û Û Û ÛÛÛÛ ÛÛÛÛ Û Û Û Û Û ÛÛ Û Û Û Û Û Û ÛÛÛ ÛÛÛ ÛÛ Û Û ÛÛÛÛ ÛÛÛÛ ÛÛÛÛ Û Û ÛÛÛÛ Û Û ÛÛÛÛ ÛÛÛÛ Û Û Û Û ÛÛ Û Û Û Û Û Û Û Û ÛÛ Û Û Û Û Û ÛÛÛÛ ÛÛÛÛ ÛÛÛÛ ÛÛÛÛ ÛÛÛ Û Û ÛÛÛ ÛÛÛÛ Û ÛÛ ÛÛÛ Û Û Û Û Û ÛÛ Û Û Û Û Û Û Û Û ÛÛ Û Û Û ÛÛÛ Û Û Û Û ÛÛÛÛ Û Û ÛÛÛÛ Û ÛÛÛÛ Û Û ÛÛÛÛ ÛÛÛÛ °°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°° High Res Range 1 - "Rock Crush" (C)1985 Steven McDonald, ZX81 16K ***************************************************************** Loading Instructions: --------------------- Type in the following: LOAD "CRUSH" For best results, place volume control at 75% of maximum. The program is recorded on both sides of the tape. The Aim Of The Game: -------------------- You must guide Diamond Dan through the 10 caverns, whilst collecting all the diamonds, but beware of the rocks. If Dan stands under a rock for too long he will be crushed. Note: When a life is lost, hold down any key. Press Newline to die! Credits: -------- Programming: S. McDonald Game Design: S. McDonald Graphics: S. McDonald ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ High Res Range 2 - "Dan's Revenge" (C)1986 Steven McDonald, ZX81 16K ******************************************************************** Loading Instructions: --------------------- Type in the following: LOAD "REVENGE" For best results, place volume control at 75% of maximum. The program is recorded on both sides of the tape. The Aim Of The Game: -------------------- You must guide Diamond Dan through the 10 caverns, whilst avoiding all the monsters along the way. Once you have collected all the diamonds a secret door appears allowing you to the next cave - if you can make it! Credits: -------- Programming: S. McDonald Game Design: S. McDonald & Scott Dolan Graphics: S. McDonald & Scott Dolan ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Rock Crush And Dans Revenge - Internet Freeware Release V2.1 - July, 1996. -------------------------------------------------------------------------- About The Games: ---------------- These two programs, "Rock Crush" and its follow-up "Dan's Revenge" were originally available for sale for the standard 16K ZX81 and featured a Spectrum quality high-res display resolution and fast 100% machine code action, all without extra hardware being needed. In their time they received several rave reviews in magazines and coverage in Texas's WOAI 1200 Radio "Computer Line" program. The station also ran a competition where they were given out to listeners as prizes. They were made available mail-order only and a lot of copies were posted abroad to the States and Canada (as well as here in the UK). Looking back, however - they were written just that little bit too late and the market had long shifted over to the superior ZX Spectrum. Rock Crush dates from 1985 and Dans Revenge from 1986. Both were hand crafted in 100% machine code and offered fast and smooth performance. Looking back now, they do seem very simplistic and dated. However it still brings a tear to my eye to see these games restored and working on an IBM! I would say that Rock Crush's best point is the screen design, which even today, I like to see people puzzle over. I would have liked stronger end sequences etc. but I was very happy with the finished program size - it had to run well in 16K. Unfortunately, with Dan's Revenge, I was more interested in my new optimising technique for squeezing a 6K high-res screen design along with its monsters into just 25 bytes per screen. I did plan to do 100 screens and memory space was reserved for this. I designed one screen and left the rest to Scott Dolan, who was going to design and play-test the game. As all the game engine was coded first and only the screen data had to be entered, I left the designing of the levels up to Scott. He decided that 10 screens was plenty and that I should "patch" the code so that only 10 screens had to be completed to finish the game. He figured 100 was too excessive. Looking back, I have to agree! Anyway he did a good job with a rather limited game engine! When moving in Dan's Revenge - your timing must be exact - there is no leeway! (Even more so - under the emulator). Eventually . . . the bottom finally fell out of the ZX81 market and the hardware, software and users began to disappear. One day, my own ZX81 finally gave up the ghost and was put in storage with all my software and games with it - all to be forgotten about! The ZX81 was gracefully laid to rest. This mists of time have passed however. . . and they are now once again being made available to ZX81 users (this time probably running under Carlo Delhez's superb ZX81 emulator). Both these games have been re-mastered by myself, the author, to run under the emulator, almost identically as they will on a real 16K ZX81. Incidentally, this new version (V2.1) runs the games exactly as the original version did! I have decided therefore to make both these games available as FREEWARE. If you like them - drop me an e-mail or whatever. Did you have them the first time around? Since the first Internet release earlier this year, I have had a lot of response from ZX81 enthusiasts from around the world regarding these games. It is good to know that they are still appreciated by people out there! A short story on how they were rescued: --------------------------------------- As I have said, for myself anyway, both these games were lost for over ten years! I always hoped 'something' could be done one day. I first came across the ZX81 emulator a few years ago and knew it could handle "high-res" as I wrote a short test program to verify what is said in the XTENDER manual regarding emulation. I was very impressed with the results of this test. However, over the years my ZX81 had gone to that great big junk box in the sky and I knew the only chance of seeing these games working again was if someone over the Internet had them and could send them on to me. In May of 1996, I decided to eventually try and do something about this - it had been bugging me that someone out there may still have working copies. I did still have the original duplicating masters, however, I had nothing to run them on and no way to convert them over - despite trying the Spectrum "ZX81 converter" (and another few tricks) with 0% success rate! I put out an e-mail over the Sinclair newsgroup and a few days later received a reply from Wilf Rigter - the inventor of the 'true' ZX81 high-res core routine. Amazingly, he had a working copy of Rock Crush and send it over to me via e-mail. Unfortunately, as he admitted, it crashed! - probably due to Fred Nachbaur's custom relocated version for his ZX81 disk drives! However, I decided to do something about it! I dusted down the old ZX81 and after a lengthy session with a soldering iron and parts from another broken ZX81, got the machine to boot. What a sight! Those old memories came flooding back, ram pack wobble, enough heat to cook your dinner on and THAT keyboard! I downloaded Nick Joslin's ZX81 encoder program from the Net - which was only available as a Basic listing at the time! There was no exe version or ZX81 decoder as I see there now is! I then did a straight conversion of his Basic listing to Pascal and compiled it. I now had a working ZX81 encoder - all thanks to Nick! For the next week, I worked solidly, staring at the WAVE for Windows 'oscilloscope' view of the waveform and worked out an algorithm for decoding the signal on the PC from the ZX81. After two re-writes I got the thing working and the excitement I felt when I managed after all those years to get a program transferred over from the ZX81 was just like the old days. As I have just said, I notice that Nick has now made available his own decoder. It is interesting to compare the code he has written with the code I have written - different algorithms but the same output! I had planned on releasing my PC ZX81 Decoder with these games. However, as Nick has uploaded his version to the Net, I have put this on hold for a while. My decoder requires Wave for Windows and gives me 100% accuracy - with the ZX81 wired up directly and Saving into the Soundblasters Mic Line - no tape recorder. Wave is used to Normalise the signal! If anyone is interested, give me a shout. A few hours later and I had most of my ZX81 software up and running on the PC! As I had the master copies of the games, I converted them over to the PC and with little editing, both worked perfectly. It was a joy to see after all those years! Anyway, enough of the Nostalgia, no point in keeping them to myself - here they are! I hope you enjoy them! Emulator Issues: ---------------- Both games, as I have said now work 100% like the originals. I have included a batch file to start up Xtender, called HRESGO.BAT All this does is start up the slow version with a delay of 127, which with my own Pentium 150, runs the games at original speed. You may want to experiment with this delay until you match the games to the speed of your computer. Rock Crush runs fine, however Dans Revenge requires spot-on-timing (as it always did), due in part to the delay loop in the main game core and the type of keyboard scanning used. I really should have used some sort of keyboard buffer and debounce on that one! Rock Crush does not use this method of keyboard scanning and so is largely unaffected by this. Occasionally, under the emulator, Dans Revenge will appear to freeze. This happens at random intervals, but unfortunately is nothing to do with the game code, rather it is the emulator "keyboard lock" problem of Xtender rearing its ugly head again. There is nothing that can be done to prevent this from happening under the present version of Xtender. Just press CTRL and ESC, type in RAND USR 0 then reload the game again! I understand from speaking to Carlo Delhez, that he is continuing to develop and improve Xtender and presume that the new versions do not suffer from this annoying problem any more. A problem was evident with the original release of Dans Revenge (V2.0), in that it was almost unplayable under the emulator, no matter what delay value was used with Xtender. To address this problem this new version has additional code to detect if it is being run on a real ZX81 or under the emulator. If it is the emulator, the game speed variable (course) at address 16523, is changed to a higher value of 22 from the ZX81 default of 15. The game speed (fine) is at 16522 and is set to 160 for a real ZX81 and 25 for the emulator. Therefore, the original delay of 4000 is used in a genuine ZX81, and 5657 under the emulator. Again, feel free to experiment with these values. With these changes however, I now find the game as playable under the emulator as it is on a real ZX81. The best tip for playing Dans Revenge is to only watch the monster you are trying to pass and to take your timing from it, as the other monsters will be moving at a slightly different rate. Once the monster has moved next to you, make your move during the slight pause, before it moves again. Also, keep a movement key pressed until it is registered and then release it quickly unless you want to keep momentum up. Just stabbing a movement key and then releasing it will probably not be picked up! The speeds for these games were chosen and tested with the emulator running under a full-screen Windows 95 DOS session, as the overall keyboard response was found to be slightly better under Windows 95. Both games use I, P, Q, and Z for Up, Down, Left and Right - which is convenient on a ZX81 and a PC. Technical Information: ---------------------- A lot of people used to wonder why both Rock Crush and Dans Revenge loaded in five separate modules. The answer is that both games were written in machine code on a 16K machine and with only that amount of memory, some juggling is needed to fit an assembler, the data, source code and object code into 16K whilst writing the thing! My solution was to write a custom routine (which loads first). This manages to set RAMTOP to a low value and to do it without a system reset or 'NEW' which were always needed when you tried to do this on the ZX81. Basically, the system stack and certain system variables are adjusted and copied down. I was very happy with this routine. Each module then loads and runs a routine to dump it above RAMTOP and then loads the next one. The fifth module is the game code which then begins executing at last - with everything in place! All of this works fine under the emulator. If you want to nose around, Pressing "S" as each module loads (you need to be very quick), will allow you to break in and examine the code. The original had piracy protection code which crashed the machine if you attempted to stop execution. This has since been removed! I am asked a lot if I am familiar with Software Farm's excellent range of hi-res games: Forty Niner and Rocketman. Indeed I am and the hi-res system used in all these games is very similar. For those interested, the hi-res screen display is generated by an interrupt driven display routine which replaces the normal ZX81 screen generation code. This routine can only generate pseudo-high-res with a limited number of bit-patterns available. With perseverance however, quite passable graphics can be designed. Basically, there is true high-res vertically, but not horizontally, due to the ingenious ZX81 design economies built into the ULA chip. For me that is one of the most fascinating features of the ZX81, the fact that it generates its own video signal, using nothing more than the Z80, some extremely clever interrupt driven routines and a ULA chip to glue everything together. Not many computers did that - but it did create the possibility for re-writing the routines and messing about with the hardware in general to create some very weird effects! This is something you could not really do on a ZX Spectrum as its ULA tended to take much more control of the machine. Whereas on the ZX81, under tightly controlled code, the programmer could fool the ULA into doing some strange things that it was not designed to do! Files in the archive: --------------------- The files come packaged in a ZIP format archive called 'ZX81HRES.ZIP'. This unpacks into the following: CRUSH P 402 31/07/96 02:10 The Rock Crush Loader Module RCDFILE P 6,557 31/07/96 02:10 Rock Crush High Res Display File RCDATA P 809 31/07/96 02:10 Rock Crush Graphics Data RCSCRNS P 2,221 31/07/96 02:10 Rock Crush Screen Layout Data RCCODE P 2,689 31/07/96 02:10 Rock Crush Main Game Code REVENGE P 404 31/07/96 02:10 The Dans Revenge Loader Module DRDFILE P 6,557 31/07/96 02:10 Dans Revenge High Res Display File DRDATA P 792 31/07/96 02:10 Dans Revenge Graphics Data DRSCRNS P 671 31/07/96 02:10 Dans Revenge Screen Layout Data DRCODE P 3,142 31/07/96 02:10 Dans Revenge Main Game Code HRESGO BAT 28 31/07/96 02:10 Batch File To Set Emulator Speed README TXT 21,939 31/07/96 02:10 This Text File - Documentation GAMES JPG 60,332 31/07/96 02:10 JPG Format Picture Of Game Covers Contacting the author: ---------------------- As stated above, I will not be releasing my ZX81 encoder and PC Decoder in the immediate future, as there are similar programs available already on the Internet. I plan to do some more development on these programs and tidy the code up a bit before finally uploading them to the Net. However, if you are in urgent need for my programs, I will provide them as they are - just ask! I have quite a few other projects in the pipeline, one of which is a major new operating system for the ZX81. It was the last project I had going before my machine gave up on me! It was 100% Z80 for lightning speed, supported true high res and gave a DOS like command interface. The ZX81 video and keyboard routines were optimised and rewritten from scratch (no need to support a collapsed display file etc.) and the system kernel supported multi-tasking. It could digitally sample sound with no extra hardware and play it back! I also wrote a program for it to save and load from tape at 20x normal speed with compression and a routine to dance in time to music being played. I would still like to do some work on restoring this project but would need your support and user feedback on this. It was around 70% finished and I can supply copies of the original code. If you have any questions or comments, regarding these games or any other general matters, feel free to contact the author, Steven McDonald who can be reached via e-mail at: stevemcd@easynet.co.uk New ZX81 web site launched: --------------------------- As of 20th July, 1996, a new web site was launched by the games author, Steven McDonald. "The ZX81 Support Page" can be reached on the World Wide Web at: http://easyweb.easynet.co.uk/~stevemcd/zx81.htm This site will provide full support for these games as well as other ZX81 news and links from around the world. Any new updates and programs from the author will be posted here, as and when they are released. The "ZX81 Support Page" will be updated frequently! New versions of Xtender: ------------------------ According to a recent e-mail I received from Carlo Delhez: - Latest public XTENDER version is 1.16 (May 1995) Xtender is still under development. At this moment Carlo is at version 1.65. The next version will be released when it's ready! - Carlo's surface mail address is: Dr. Carlo Delhez, Emmastraat 3, 4651 BV Steenbergen, Netherlands. - Carlo can be contacted via e-mail at: carlo@f751.n285.z2.elcom.org (Please be patient, Carlo receives his e-mail on floppy, every few weeks!) Version History: ---------------- Rock Crush and Dans Revenge V1.0 - 1985 and 1986 (Original Cassette release) ---------------------------------------------------------------------------- * Hi-res core routine developed and optimised first and then Z80 'I' register value decided upon (this determines the bit-patterns available). * Rock Crush Graphics and game design worked out. * Rock Crush game engine coded and screens designed. * Rock Crush opening screen designed and stored in display buffer. * Rock Crush duplicating master created. * Dans Revenge graphics worked on and game design worked out. * Dans Revenge game engine coded and screens designed. * Dans Revenge opening screen designed and stored in display buffer. * Dans Revenge duplicating master created. * Games tested extensively on standard 16K ZX81's and all bugs removed. * Games sold initially as mail-order and sent out around the World. * Later master had piracy protection code removed. Rock Crush and Dans Revenge V2.0 - 18th June, 1996 (Re-mastered version) ------------------------------------------------------------------------ * 16K ZX81 restored to operating condition and original cassette duplicating masters located after 10 years! * Custom PC ZX81 Encoder and Decoder successfully developed and tested. * Game files transferred from the ZX81 to the PC and formatted for use with Xtender. * Extensive testing to check compatibility with Xtender - no problems! * Code added to stop loading each module when "S" key is held down. * Game Covers Photo scanned-in and edited. * Batch file written to match speed of emulator to original. * Documentation file written. * Zip file uploaded to the Internet and games released as Freeware. Rock Crush and Dans Revenge V2.1 - 31st July, 1996: (Updated Re-master) ----------------------------------------------------------------------- * HRESGO.BAT - changed delay from 115 to 127 to better match speeds. * Code added to Dans Revenge to detect whether the game is being run on a real ZX81 or under the emulator and to adjust the game speed accordingly. * The separate game modules (except final code modules) re-mastered with collapsed display files to save space and provide faster loading times (as in the original cassette release). * Documentation file corrected and updated. * New version uploaded to my new ZX81 web site and released as Freeware. License: -------- Both these programs have been released as Freeware. However the author retains the copyright in these works. Feel free to duplicate and pass on these programs as you wish. However, I ask that this archive is passed on intact and that all files including this README.TXT are included as originally packaged. Thank You. Steven McDonald. Internet Freeware Release: V2.1 - July 1996. --------------------------------------------