NSNSNSNSNSNSNSNSNSNSNSNSNSNSNSNSNSNSNSNSNSNSN S S N ADVANCED HORSESHOE MAGNET SIMULATOR 2 N S (KEMPSTON EDITION) S N For 16K ZX81 by J.R. Waterman N S 23 August 2022 S N N SNSNSNSNSNSNSNSNSNSNSNSNSNSNSNSNSNSNSNSNSNSNS The Whole Rotten Saga ===================== You can blame a whole load of random events for this one. I was busy disassembling Spectipede, for the 16K Spectrum, to see if I could find out the mysteries of what a Mikro-Gen joystick interface was, how it worked, and why so few games supported it. It turns out it uses the same port 31 as the Kempston interface, just turned round by 90°. Apparently it also uses port 223 but will respond to port 31. Seeing all this use of IN 31 - or more specifically, IN A,(31) in Z80 assembler - made me wonder if a Kempston interface could be used on a ZX81. I have one for a rubber-key Spectrum that won't fit on my Amstrad-built models, but I'd never tried to fit it on the ZX81. And as my ZX81 has an internal 16K memory upgrade, there's no need for an extra piece of equipment to double up the edge connector; it fits just about perfectly, with just enough room to accommodate the joystick plug. All I needed was six bytes to test it: IN A,(31) LD C,A LD B,0 RET ...throw these in the standard REM statement and USR 16514 will read the joystick! So *then* I thought: I need to write a program that will make use of this new-found knowledge, and demonstrate it to anyone who cares. Fortunately, I already had something useful: Advanced Horseshoe Magnet Simulator, which I'd sent to the 2004 CSSCGC. It was nothing more than a response to a thread on World of Spectrum in its glory days, speculating what the next big Codemasters title might be if they were still doing Simulators, or something along those lines, so I thought I'd write it. "Hmm, I could swear I've seen one or two similar games to this entered into previous CGCs. Come to think of it, this game is almost identical to 24.364% of all the crap games ever made! Luckily, this is a ZX81 game so the fact that it's a heaping pile of unoriginal repetitive tosh will go largely unnoticed as 97.376% of ZX81 games are identical to this and 98.265% of ZX81 users don't care." - Jim Langmead, 1974-2007, 2004 CSSCGC host This game has essentially reached adulthood - yes, it is *18* years since its original appearance - and the time is right for it to morph into something greater than it was. And, at the same time, subject Andy Jenkinson to the same painfully slow heaping pile of unoriginal repetitive tosh that Jim had to put up with back in the day. The game itself, if you can call it that ======================================== Some careless, uncoordinated clown with Asperger's Syndrome (who may or may not be the author of this game - and before anyone objects, AS has a proven track record of wrecking the coordination of its unfortunate host... ASK ME HOW I KNOW HOW ANNOYING IT'S BEEN FOR THE LAST 43 YEARS... anyway, I digress) has dropped a box of nails on the floor. Fortunately, you are armed with the latest piece of witchcraft from Merlin's cave of delights: a horseshoe magnet! That should make picking up the nails a lot easier. Unless they're made of brass. Fortunately, these are steel. You have a time limit of 200 Arbitrary Time Units (it's merely FOR N=200 TO 0 STEP -1, no use of FRAMES or anything like that) in which to pick up the nails. And that's about it. But wait, there's more! This heavily-upgraded version of the original game comes with several advantages: - TWO sets of controls: Q/Z/I/P on the keyboard (which is better on a real ZX81 than Q/A/O/P because of the spacing of the keys), or the KEMPSTON JOYSTICK INTERFACE! To use this, though, you'll need a real ZX81, with an internal RAM upgrade, an *old* Kempston interface designed for a rubber-key Spectrum (because the later ones designed for a Spectrum+ have a longer edge connector and won't fit a ZX81), and a suitable joystick. But trust me on this one, IT WORKS! - The necessity of using machine code to read the joystick port means that the keyboard controls have been read the same way (using the same IN addresses as for the Spectrum - no surprises there), and the four directions have been assigned to four separate addresses, hence they can all be read at the same time, and so DIAGONAL CONTROL is possible! This should make it easier (by which I mean, actually possible) to complete the task at hand. - There are two endings, one for failing the task and one for completing it. There isn't just a brief message and a STOP statement. - If you are successful, you'll get the Best Remaining Time recorded - and as this is POKEd into a free address in the machine code REM, it'll stay intact even if you RUN the program again and clear the variables. There is, of course, one major disadvantage: it's still as painfully slow as the original. A disassembly of the machine code has been provided for those who want to know how it works. Enjoy, if you can. - JRW 23/8/2022