***==========*** ADVANCED ORB PONDERING SIMULATOR ***==========*** A low-effort (or is it?) CSSCGC game for 16K Spectrum by J. Waterman 28-29 February 2024 (crikey, look what I was doing on the extra day!) https://knowyourmeme.com/memes/pondering-my-orb This was intended to be a very quick and filthy attempt to see if I can make an actual GAME, no matter how crap, entirely in machine code. If I can do a crap utility with Hol-Rock Smeg-thesiser, then I figured this should be possible... and what do you know, it is. You see the "Pondering The Orb" wizard. You must ponder the orb until it flashes and makes mystical zapping noises. As soon as it flashes, press SPACE. If you don't, you'll soon find out what happens. Depending on the random outcome, you will find yourself deep in enponderment for anything from 38 seconds to just over five minutes. Use the time to ponder well. Also, as this was small enough to have been made for a 16K Spectrum (and it needs a LOT more space to store a copy of two-thirds of the screen than for the actual game), the contended memory bank the code sits in might even make it MORE random. In the words of the Mojon Twins: "Bwa ha ha ha." Some outside assistance has been used: - Patrik Rak's XOR-based random number generator (which is more random than RND, I find), was useful because I have no idea how to call the RND function from machine code. It can be done, and probably involves the calculator stack; Patrik's code makes it obvious where the output lies so I can find and use it. - BeepFX by shiru8bit (https://opengameart.org/content/zx-spectrum-beeper-sound-effects) to make the zapping sound. Ideally, what I wanted is the sound from Gargoyle's Quest when Firebrand zaps a boss, but that's well beyond me (even though the Game Boy uses a Z80 processor). - A merry victory tune from my own Machine Code Beep Sequencer (https://rickdangerous.co.uk/zx/programs_spectrum.html) which is very crude, but doesn't half make the job of calculating strings of HL and DE values for CALL 949 a lot easier. Quick and filthy devlog ======================= 28 February 2024: Converted the "Pondering The Orb" picture with BMP2SCR, corrected it as necessary with ZX-Paintbrush, wrote a bit of BASIC to change the attributes in the correct place, then converted that to machine code (a mere 43 bytes of it!) Borrowed some machine code from Pepe's Day Out and expanded it to make the loading screen (which is a hatched pattern with attributes dumped over it). 29 February 2024 (which would have been in March, normally!): Wrote the game in one evening - built it up from a test to see how long the delay loop needed to be before the orb flashed, then added the BeepFX loop, then the keyboard routine to check for SPACE, then the victory text and tune, then the LDIR to squirrel away the screen so that the text can be erased and you can have another go (as if you'd want to!) then the final tweaks (such as remembering to POKE 23739,244 in machine code). Then, and only then, was the final "lose" routine added... Also, wrote the loader - and needed a CUNNING PLAN to avoid the use of a direct address when I was holding the machine code for the loader program in a REM statement that nobody will ever see. Because the BASIC loader program can move around in memory (can't it...?), I had to calculate where the start of the data was relative to the value of PROG (which in the end was 71 bytes after the start of the code, and hence *76* bytes above the value of PROG - AND IT WORKS!) "Deep joy." - James May, yesterday