GRUMPHERS ================================================================================ THE OBJECT of Grumphers is to capture the Grumphers by moving your figure on top of them with the usual cursor keys. As you move you leave a trail which you must not cross. Unless you move carefully you will soon find your way blocked at all turns. If you find yourself trapped, use the 'J' key to jump to a random position on the screen. The game ends when you cross, or land on your own trail. The program was written by John Litherland of Manchester for the 16K Spectrum. - Sinclair Programs, July 1983 ================================================================================ LAMBDA 8300 VERSION FOR 2022 CSSCGC BY JIM WATERMAN, 19-20 DECEMBER 2021 ================================================================================ WHAT YOU NEED TO KNOW --------------------- The emulator of choice is EightyOne 1.23 (or you could use NO$ZX, but you're on your own with that one). Select Options -> Hardware (or press F6). Under "Others", select Lambda 8300. "RAM Pack: 2k" will be automatically selected - stay with this for the 2K Monochrome Version. Or select "16k", and "Colour: Lambda" to run the 16K I Can't Believe It's Not A Spectrum Version. Type LOAD "" and ENTER (yes, ENTER, not NEWLINE) as you would do for a ZX81. You will notice that the Lambda doesn't use the "K" cursor and you'll have to type LOAD in full, yourself, just like on a 128K Spectrum in 128 BASIC. The 16K version will run automatically; type RUN and ENTER for the 2K version. Or, better still, type NOBEEP and ENTER before you do anything else. Controls are with the Lambda's cursor keys: C = up, V = down, B = left, N = right, M = jump. These may look horrid but they're the same fingers you'd use for Q/A/O/P layouts so I don't expect to hear any complaints! Well... not too many, anyway. Sound on the 16K version causes the picture to roll and drop out of sync. This may be because the Lambda is automatically set to 60 Hz by default (under the "Advanced Settings" tab). I tried putting it to 50 Hz, but the picture is as stable as a flask of warm diazomethane solution in an earthquake. It's best left at 60 Hz and you'll have to put up with it. WAFFLE AND BUNK --------------- Some time in 1981, someone in Hong Kong saw the ZX81, and they saw that it was good. And they thought: "Hey, wouldn't it be a great idea if we had our own version of the ZX81? We could add colour and sound to it, give it a bit more memory, and we could even give it some built-in graphics especially for games! All right, so we will have to drop a few characters... let's see, what could we drop... I know, the colon, we don't need that, and the question mark!" Fast forward to 2021, when Mark Kinsey threatened to send me a machine code game for the Lambda 8300 during the 2021 CSSCGC. It wasn't ready in time, but by the time I send this, it should have been completed... and will show what the Lambda is actually capable of... right? It did at least make me investigate the Lambda 8300 to see what it could do. Fortunately, there is a manual out there, and it reads a bit like a cut-down version of the one we all know for the ZX81. It's missing information such as "where is the display file?" and "what are the system variables?" but these appear to be equivalent to the ZX81. So, no biggie, I can write some small and uninvolving machine code fragments for it. All I need to know is that the first byte of the REM in line 1 is 17307. And now you know as well. Seeing the mock-up screen of Mark's "Simple Invaders" with the ghostly in-built graphic (GRAPHICS, SHIFT+1) made me think of Grumphers, the type-in from an issue of Sinclair Programs I enjoyed when I was a nipper and enhanced slightly back in the day. (I used to do that, a lot.) Knowing that the Lambda had these built-in graphics, I thought: why not? So I took the Spectrum listing, ripped out all the UDGs, colour and sound commands, typed it into the Lambda and used a convoluted PEEK to substitute for SCREEN$. Just like the ZX81, the display file holds characters rather than a row of 8 pixels, so PEEKing it returns the CODE of the character in that square - only the value stored in D_FILE is 33 bytes ahead of where is should be. Is this a bug? I don't know. All I do know is that I had to subtract 33 from the address I was expecting to PEEK to get the right value - or subtract 1 from the row if I was calculating it from specified row (L) and column (C) positions. i.e.: 140 IF PEEK(PEEK 16396+256*PEEK 16397+33*(L-1)+C)=CODE "*" THEN GOTO VAL "340" The base-model 2K Lambda always uses the expanded 768-byte display file, as Mark told me - so I only had about 1.2K of memory to play with. With a load of VALs and NOT/SGN PIs everywhere, the listing fit into the memory available. It was silent, it was monochrome, it was SLOW. Cue the machine code. How hard can it be to replicate that same series of PEEKs, bearing in mind that we can (in QL-speak) PEEK_W two-byte values directly? The calculation of 33*(L-1)+C was considerably more involved. But it worked, and USR 17322 - when POKEd with the correct values of L and C (which then appear in the REM statement...) - duly returned the CODE of the character at (L,C). It was STILL SLOW! And that, really, was that for the 2K version. Only a full machine code rewrite would ever make it not run at the speed of a slug on Mogadon slithering through Gorilla Glue. So there was only one logical thing to do - what I do best. Bells, whistles and extraneous junk that adds nothing to the gameplay but makes it look nice. And so was created the 16K version, and with all that gargantuan memory available, all the NOT PIs and the VALs could be returned to actual numbers. Then, I added a bit of sound, and that's where I found out that the Lambda's SOUND command - which is programmed in a similar way to machine code (HL for pitch on a reciprocal scale, DE for duration - or, rather, number of cycles) - is so utterly horrid (and is affected by FAST and SLOW mode as well...) that it makes the QL sound like the London Philharmonic Orchestra. At least there's another way - the TEMPO and MUSIC commands, which cover a three-octave range with musical-note syntax a bit like PLAY on the 128K Spectrum, though in its own language. (It's all there in the manual, but only right at the end.) A single MUSIC note was stable enough to act as the "capture the Grumpher" sound as it was on the Spectrum, but it blacks out the screen while doing so, hence there is no constant beep-beep-beep while you move. Next came the intro screens - the Lambda ROM programmers gave us diagonally-divided graphics instead of the ZX81's dithered "grey"(ish) squares and half-squares, so I made good use of them - and the colours came in handy as well to distinguish between the letters, because I didn't have room for space. There's a condensed version of the instructions at the top, and also a nod to the origins of this computer in Hong Kong and the turmoil that territory is facing at the moment... The score bar was rehashed to use the diagonal graphics as well - BORDER and PAPER are so badly bugged I didn't use them at all, but at least a bit of INK in the right direction helped us. This reduces the playing area by two rows, so this makes the game a bit harder, not that anyone will play it for long enough to notice. I tried a couple more MUSIC cues - the "sterotypical Chinese riff" (as heard frequently in Corona Capers last year), and a short victory fanfare if you beat your high score. Both of them sound absolutely, miserably terrible. The syntax is correct for how it *should be* if the sound output was perfect - I have deliberately not tried to compensate for it, because if the alleged version 2.0 of EightyOne surfaces any time soon, it might have improved timings. I don't know whether the problems are intrinsic to the Lambda, or if EightyOne is at fault here. BORDER only sets a vertical strip at the left side of the screen, PAPER spills over the right-hand edge onto the next line at the left to touch it. The screen rolls whenever there's anything taxing going on, such as playing sounds. SOUND appears to be completely shot to all hell, and the timing of the notes and rests in MUSIC is all wrong. But still: a Lambda 8300 game for the Crap Games Competition. There weren't any for 26 years, now two turn up at once. What more do you want? - JRW 20/12/2021