THE RING OF THE INKA (Sir Clive Edition)
==================================================

Scope:
--------------------------------------------------
After having traveled all the way from England as a stowaway on a cargo ship, you find yourself aboard a raft, drifting on the sea with your destination, the west coast of South America coming into sight. Your boss has commanded you to search and retrieve one of the most precious treasures of the ancient Inka culture: A golden ring that exceeds the wildest dreams of every archaeologist. To make this happen, there are many adventures which must be survived: fierce animals attempt on your life, palace guardians haunt you and you need to make friends with a native tribe.

About the Sir Clive Memorial Edition:
--------------------------------------------------
This very special Sir Clive Memorial Edition has undergone severe testing - to an almost excruciating level (thanks Jim!), debugging and rework. Tons of bugs and typos introduced 30 years ago have been corrected. More memory has been reclaimed so descriptions and a couple new features could be added: E. g. the Ring of the Inka has now magic teleportation features and the two palace guards have become even more evil (but at least you can shoot them now!). As a nice finishing touch, the Journey font made by DamienG [6] has been added. Kudos to DamienG for providing this service to the community!

The memorial edition also comes with an illustrated PDF map of where the adventure takes place. This helps in case you get stuck but of course takes away a considerable amount of difficulty and fun. Use at your own discretion!

Trivia:
--------------------------------------------------
For the comp.sys.sinclair Crap Gaming Competition 2021 (aka. "CSSCGC 2021" available at [5]), I (Volker) have completely revamped the game, provided a context sensitive HELP system for beginners, added EXAMINE to look at things, listing of objects&verbs (OBJECTS) and even a DEBUG command that activates invulnerability, allows you to teleport between rooms (just type GO <room number>) and conjure up invisible/inaccessible objects (GET <object number>). The icing on the cake is a cool loading screen and heavy optimization/compression (with the ZX0 algorithm) so the entire game plus all graphics would theoretically fit on a real cartridge.

Michael Wiedmer (who used to be reachable via [2] but the site has not been updated for a long time) and I (Volker, visit me at [1]) wrote this game back then, when the Sinclair ZX Microdrive finally allowed multi-location adventure games with space-demanding screen graphics. The Professional Adventure Writer (PAW) from Gilsoft International was already on the market and so was the Graphic Adventure Creator (GAC) from Incentive, but we wanted more control over game play, nicer imagery and squeeze all this into the Sinclair BASIC of a 48K Spectrum (just GO TO 9998 to see what I mean), which was a free interpreter already at our hands.

Yes, indeed: With the exception of
- an advanced CLS (clear screen) routine to speed things up and hide some loading/decompressing magic
- and the ZX0 image decompressor (see [7]) so the game theoretically fits on a real(!) cartridge,
(which were added later for extra spice) this adventure game uses no machine code at all.

Please have mercy if reactions to key presses are a tad on the slowish side even though the interpreter/parser/tokenizer was massively improved in the Sir Clive memorial release!

Heavy compression of larger numbers aside of introducing the constant z for 0, i for 1 and a couple frequently used subroutine addresses (e. g. replacing every decimal number by VAL "...") has the potential of reducing the memory footprint even more but was ditched in favor of readability and execution speed. There is clever handling of command vocabulary through a lookup table with GO TO and GO SUB targets (abbreviations and synonyms can be used if possible), complex maps have been implemented by means of a mesh with room numbers that (if multiplied by 10) relate to command lines. And you will even face hostile characters moving around with (some sort of) artificial intelligence!

In order to improve maintainability, we did not go to the extent of separating the variables and arrays in a separate loader or even compressing text (could be done with ZX0 as well). This would have made the source code (which is attached in its entiety including the build pipeline, see the ./source subdirectory) very hard to manage and introduced even more machine code. Neither is there a (surprisingly complicated as it turned out) function to load and save game states, so please use your emulator's snapshot feature if you want to avoid getting killed early. However, there is a decent line wrapping subroutine (line 6000) to make the text more readable during runtime and segmented scrolling underneath the graphics.

Feel free to sneak around in the code and learn about programming adventures in ZX BASIC, in case you are helplessly stuck somewhere in the game or - god forbid! - the program fails with an error. However - due to only capitals and some special characters being used in the font for memory preservation reasons, the BASIC listing is pretty illegible. As always, you can POKE 23606,0: POKE 23607,60 to reactivate the boring default font and continue hacking the code.

How to run:
--------------------------------------------------
Any decent emulator with Sinclair ZX Microdrive support will do. I have tested the the virtual cartridge with EightyOne [3] and FUSE [4]. Here, just bring up hardware options, activate "Interface 1" as FDC, verify that the IF-1 ROM version is set to "Edition 2" and at least one Microdrive is connected.

Additionally, FUSE needs to be provided with an external version of the Interface-1-ROM. I just took the one from EightyOne, renamed it to if1-2.rom and copied it into FUSE's \roms\ directory. For convenience sake, I have included the file in this distribution (.\roms\if1-2.rom). From there it is just a matter of configuration (Options/Peripherals/General [X] Interface 1 and Options/Media/MDR cartridge len: 254, [ ] Random length MDR cartridge).

Then pop the file "inka.mdr" into drive 1.

Finally reset the emulated Spectrum and type RUN <ENTER>, so the IF-1 automatically executes the "run" BASIC loader file on the cartridge.


Have fun & thanks Clive for making that happen!

NOVEMBER 21st, 2021, Volker Bartheld <speccy@bartheld.net>

--------------------------------------------------

[1] https://bartheld.net
[2] http://pdg-software.com
[3] https://sourceforge.net/projects/eightyone-sinclair-emulator/
[4] http://fuse-emulator.sourceforge.net/fuse.php
[5] https://www.rickdangerous.co.uk/csscgc2021
[6] https://damieng.com/typography/zx-origins/journey/
[7] https://github.com/b0nefish/ZX0
