Showing posts with label ZX Spectrum. Show all posts
Showing posts with label ZX Spectrum. Show all posts

Tuesday, May 12, 2020

TuT-TuT on the Jupiter Ace: Part 2

Leave a Comment
Welcome to the second and final article on Porting the ZX81 and ZX Spectrum Game Tut-Tut to the Jupiter Ace:  This time George Beckett takes us through the gritty details of programming in Forth, leaving few treasures undiscovered in the process.

If you missed Part 1, be sure to read up before continuing below.

Jupiter Ace Game: TuT-TuT
Archaeology is just as fun in the Jupiter Ace version of TuT-TuT

The Forth Tut-Tut is Ace

Previously, I told you a little about what motivated me to port Tut-tut to the Ace and promised to describe how the game is written. However, before we get on to the game, I should explain a bit about the Forth language, which was developed in the late 1960s for the control system of a telescope. Since then, its scope has grown, being used for a range of scientific and other serious applications in the 1980s and 90s. Even today, Forth lives on and can be found at the heart of various embedded systems.

The basis of any Forth system is a dictionary of words that encapsulate the functions of the machine. There are simple words for manipulating data (bytes of memory) or performing rudimentary arithmetic, as well as more complex words for printing on the screen, making sound, and saving or loading files. The programmer combines these words together to make new words, continuing to build up the functionality until the final program is represented by one top-level word. In that way, writing a Forth program is a bottom-up process, starting at the lowest-level elements and working up. In contrast, the design of a Forth program is a top-down process. You iteratively break the program’s function down into smaller and smaller elements until you reach the level of the built-in words.

The overall structure of Tut-tut is relatively simple, with the player completing a sequence of levels, which involves collecting objects, unlocking doors, dodging mummies and finding the exit. The bulk of the logic is in how each level plays: how the player navigates the maze, collects objects and is chased by the mummies.

In Rabbit Run, the core of the game was a loop in which the player first had the opportunity to make their move and then each possible outcome was tested for—in that case, eating carrots, falling down mole holes, or being caught by a fox. At the end of the loop, the fox made their move and it was back to the beginning.  The same game loop could be used for Tut-tut, though replacing foxes by mummies, carrots by gems, and so on.

For both Rabbit Run and Tut-tut, the game state is held in the display buffer. For example, to check the location the player wants to move to, you look up what is there in the display buffer. This is useful for saving both memory and time. In Tut-tut (and Rabbit Run) on the ZX Spectrum, objects are distinguished by colour. This makes it very fast to check what an object is by looking up its colour using the ATTRIB function (or PEEK-ing the right location in the display buffer). The Ace has a monochrome display, so this approach does not carry over immediately. However, the Ace display is very simple, formed from a two-dimensional array of characters, just like the attributes on the Spectrum is as two-dimensional array of colour values, and so it should be just as quick to look up the character code in the Ace’s screen memory as it is to look up a colour on the Spectrum. Thus, a crucial word to define in the Forth version of Tut-tut is SCREEN, which retrieves the character at a particular location in the level:

    : SCREEN ( X Y -- CHAR )
        SWAP 32 * + ( 32 CHARS PER ROW )
        9216 +  ( START OF SCREEN MEMORY )
        C@
    ;


For player movement, I decided to use the Rabbit Run core as the starting point for Tut-tut, though there were some differences. Surprisingly, Ace Forth does not include a CASE statement (which would allow a number of different program paths to be followed depending on the value of an input field—such as, a key-press or the object at a location). For example:

    ( X Y -- NEW_X NEW_Y )
    INKEY
    CASE
        ASCII P OF 1+ ENDOF            ( RIGHT )
        ASCII O OF 1- ENDOF            ( LEFT )
        ASCII A OF SWAP 1+ SWAP ENDOF  ( DOWN )
        ASCII Q OF SWAP 1- SWAP ENDOF  ( UP )
    ENDCASE


Sadly, there is no CASE word in Ace Forth, so the above code would not work. I investigated options to implement a CASE structure (a big selling point of Forth is the ability to add your own commands). However, while I found a few candidates on the Internet and in 1980’s magazines, none of them proved to be very effective nor reliable. I therefore decided to use brute force, writing multiple IF statements. This is an ugly approach though has proved adequate for Tut-tut.

Another weakness of FORTH (and, to a lesser extent, BASIC) is that it is difficult to define large input datasets—in this case, I was thinking about how to get the data for game levels into the game. In the BASIC version, David used DATA statements, RESTORE-ing to the correct line and then READ-ing the data for each level. However, FORTH does not have a DATA statement and the method for entering data described in the Ace manual is very laborious. In the end, I decided to bypass FORTH and to define the level data in binary code blocks to be loaded into memory inside suitable ALLOT’ed arrays. For example:

Tut-tut UDGs and character codes on the Ace.
    ( RESERVES 4,000 BYTES FOR LEVEL DATA )
    CREATE GAMELEVELS 4000 ALLOT
    GAMELEVELS 4000 BLOAD tut-tut.lev


There is a reasonable amount of logic involved in drawing each level in Tut-tut, as a level is stored in a compressed form to save memory. In the original ZX Spectrum version, a technique based on trios of character cells was use to reduce the memory requirements of a level by a factor of three. However, since finishing the BASIC version, David updated the compression strategy to one inspired by the GIF image format and described on his website [link]. This gives better compression and has been used in the ZX81 version to allow more levels to be added. Given that David planned to back-port his new compression algorithm to the ZX Spectrum, I decided to adopt the GIF-inspired approach for the Ace.

On the Ace version of Tut-tut, the logic for drawing a level is encoded in a word called DRAWLEVEL. Using Forth is an advantage here, as it excels at integer arithmetic, which is fundamental to how the encoding works. The only complication, for the Ace version, comes because I needed to remap the character values encoded in the (ZX81) level data onto the correct Ace character codes. For example, in David’s level encoding, the four sliding walls are represented by values 5, 6, 7, and 8. For the Ace version, I need to map these onto inverse-video ASCII characters 177, 178, 179, and 180. The same is true for the keys, gems, bracelets, and so on. This remapping of the character encoding represents the majority of the work of DRAWLEVEL, as you can see if you look at the source code.

As well as level data, Tut-tut also contains a reasonable amount of text for the instructions and splash screen, plus user-defined graphics. I also encoded these into two other binary code blocks, called MESSAGES and CHARSET, respectively.  CHARSET includes two sets of graphics. There are stylised versions of capital letters that overwrite the default bitmaps for these letters, the same as on the ZX Spectrum version, and a set of objects, held in character code 1—14 (except character 13, which is reserved for carriage return).

Otherwise, the port to Ace Forth was relatively straightforward (accepting I needed to brush up on my Forth skills). I tried to follow good Forth programming practice and to keep the most important game data (the position of the player plus temporary variables) on the stack.  This, and the fact that the state of the level is kept in the display memory, means there are relatively few variables needed: for score, air, keys, mummy locations, and a couple of useful flags to help in quickly exiting from the depths of program loops.

Some words involve a fair amount of stack acrobatics, which is a common trait of Forth programs. A particularly complex stack is required for the word CHECKLOCK (which moves a sliding wall, if possible). At one point, CHECKLOCK has a stack depth of 14 numbers, to hold the various permutations of player moving a sliding wall, not having the right key, and/ or a sliding wall being unable to move because of a blocking object behind it.

The word MOVEMUMMY also descends into some scary stack manipulation when the mummy needs to change direction. What was a relatively simple logic in the BASIC version, to make the mummy follow the player, proved particularly challenging in Forth, because I tried to avoid using variables as much as possible. MOVEMUMMY is the element of the program that I most struggled with, spending a good few hours debugging mummies that wandered off the screen or worse still teleported into other parts of the Ace’s memory, typically causing it to crash.

Talking about debugging, this was one of my bugbears with Ace Forth. The programming environment on the Ace is not typical for Forth. Most contemporary versions of Forth required the programmer to enter program source code into screens, which correspond to space reservation on disk (or tape). Manipulating screens was often a clumsy process, though it did mean the programmer could access and change any part of the program at any time.

Instead, on the Ace, you interactively develop the dictionary using : (colon), EDIT, and REDEFINE, creating the new words that make up your program in the active dictionary. If you need to fix a bug or change a word, you must first EDIT the word, which creates a second copy of the word at the top of the dictionary. Then, to get rid of the old version of the word and update any references to the old definition, you must remember to REDEFINE the word, otherwise you can quickly end up with confused dictionaries with multiple versions of a word in use. Because the dictionary is a stack of words, if you forget to REDEFINE a word after changing it, and then define further words, you end up trapped in a situation where you cannot remove the out-of-date version of the word nor can you update the definition of any other words that link to that out-of-date version. The only work around is to FORGET everything that you did afterwards and then re-enter the lost words. On my first attempt at Tut-tut, I fell into this trap on several occasions, and ended up with a hopelessly corrupted dictionary with stale links that made the game unstable.

Eventually, it became clear I needed to start again, from scratch. This was not all bad, as it gave me the opportunity to fix some wrong decisions I had made in that first attempt. I suspect that when writing a program on the Ace, this was a relatively common requirement. Unless you have a very thorough design, the first attempt at a program was likely to end up as a prototype, because once you had moved on from a word definition, you could not go back.

Debugging is not a strong point for Ace Forth (nor Forth, in general). The common trick from the 1980s (because no one does that now!) of adding print statements at key points in a program is slightly more tricky in Forth, as you have to make sure not to affect the state of the stack. The Ace User Guide has a useful word, named .S, which prints out a full copy of the stack without affecting it. I took .S and extended it a little, so that the stack is printed on the first line of the display (a line that is not used in Tut-tut):

: .S ( -- ) ( PRINT STACK )
  15419 @ HERE 12 + ( FIND THE TOP AND BOTTOM OF THE STACK )
  OVER OVER – ( IF TOP = BOTTOM, WE ARE DONE )
  IF
    DO
      I @ . 2
    +LOOP
  ELSE
    DROP DROP
  THEN
;

: .T ( PRINT STACK ON ROW 0 )
  0 0 AT 32 SPACES ( CLEAR ANY PREVIOUS TEXT )
  0 0 AT .S
;


Otherwise, debugging typically meant studying the source code and manually tracking the changes to the state of the stack after each line. It was sometimes quite laborious; though I noticed, as the game developed, I tended to make fewer mistakes, so suspect my Forth competence was growing. I also found useful tips by looking at other people’s code, especially some of the old magazine listings archived on www.jupiter-ace.co.uk, as well as the Ace ROM disassembly [link].

The full listing of Tut-tut is available on GitHub [link]. There are four files. The main file, called ‘tut-tut.fs’, is the Forth source for all of the words, including constants, arrays, and a small amount of machine code. The other three files contain the level data ‘tut-tut_levels.asm’, the help text ‘tut-tut_messages.asm’, and the user-defined graphics ‘tut-tut_charset.asm’. These need to be assembled using a Z80 assembler, such as Z80ASM [https://savannah.nongnu.org/projects/z80asm], to create binary files that can then be inserted into the memory on an Ace emulator, such as EightyOne; into arrays called GAMELEVELS, MESSAGES, and CHARSET, respectively, which have been pre-allocated appropriately.

The process for inserting the binary blocks is a little involved, so I outline it here for GAMELEVELS.

1. First, assemble the source file ‘tut-tut_levels.asm’ and make sure to write a label file, so you can work out how big the binary block is. Using Z80ASM, the following command would do the trick:

z80asm –L –o tut-tut_levels.bin tut-tut_levels.asm

The block is assembled to address 0x0000, though this is not significant. If you print the labels, you should see a label END, which is used to work out the length of the block. At the time of writing, my test version has three levels and END is reported as 0x017D (or, decimal 381).

2. In your Ace emulator, with your in-progress Tut-tut dictionary loaded, create some space for the game levels, with:

CREATE GAMELEVELS 381 ALLOT

—substituting the right value for the length of the block.

3. Check where GAMELEVELS is located in memory, using

GAMELEVELS .

—and use the address returned as the start point to which you load the block—for example, using [File] [Load Memory Block] on EightyOne.

4.    If necessary, remember to:

REDEFINE GAMELEVELS

—if you have a previous version of the array earlier in the dictionary.

I hope you will agree that the Ace version of Tut-tut is a reasonable tribute to David Stephenson’s original and that you will consider attempting to type in the game. I never found a way to automatically output the program from EightOne, so tut-tut.fs has been transcribed by hand. This means I have almost certainly made some mistakes—just like back in the 1980s!

Having written the game, I have come to like Forth a little more, and I have developed a fondness for the Jupiter Ace. Richard and Steven were right that a micro powered by Forth is better able to run software without the need for machine code and I suspect I would indeed have produced more useful programs if I had discovered Forth in the 1980s. I like to think I would have been happy had I owned a Jupiter Ace rather than a ZX Spectrum, when I was younger. However, I suspect I would have been envious of my Commodore- and Spectrum-owning friends and would have missed classic games like Jet Pac and Manic Miner too much.


Read More

Tuesday, May 05, 2020

TuT-TuT on the Jupiter Ace: Part 1

Leave a Comment

Exciting news this week as Tut-Tut launches on the Jupiter Ace: As a special treat to celebrate, guest blogger George Beckett takes us through his journey in porting the game to the Forth Language an onto the Jupiter Ace.

George has spent the last few months converting the original BASIC source listings and some of the latter adaptations made for the ZX81 and 2020 Spectrum versions of the game.

Join us for a new series of articles as we dig up an ancient micro treasure and explore the depths of game conversion.


Evolution of Tut-Tut: ZX Spectrum BASIC, ZX81, ZX Spectrum 2020 Edition, Jupiter Ace.

Porting TuT-TuT to the ACE

Towards the end of August (2019), David Stephenson (a.k.a. zx81adventures) started posting screenshots, on Twitter, from a new ZX Spectrum game that he was working on. The previews showed an arcade, maze game with bright, clear graphics and an Ancient Egyptian theme. What made the game stand out was that David was using Sinclair BASIC to write the entire game: it was to be a type-in game, harking back to the 1980’s home computing scene, when it was not uncommon to invest many hours into typing in, debugging, and playing such games. Given Sinclair BASIC’s sluggish performance and appetite for consuming memory, David needed to employ some careful tuning and compression tricks to achieve reasonable speed from, and to fit the game into, the rubber-keyed 48k Spectrum.

Very Early BASIC version of Tut-Tut on the ZX Spectrum.
The game, called Tut-tut, was finally published in the online retro-computing magazine Paleotronic in early November [link], along with a YouTube review and taster from Villordsutch [link]. Those who did not want to type in the game could download a copy from Paleotronic’s website. However, the download included a subtle warning that it was not quite complete: If you wanted to be sure of having the full game, you needed to invest the time to type it in yourself.

Tut-tut had some similarities to a very rudimentary game I had made, called Rabbit Run, as part of a series of articles I had written on programming for the Spectrum Show Magazine (issues 16—26) [link]. I had produced a few different versions, including several BASIC versions, a machine-code version, and—a little more unusually—a version written in Forth. The Forth version of Rabbit Run worked surprisingly well, being similar in speed and size to the machine code version, though being much quicker to write.

I started to think about revisiting my Forth version of Rabbit Run and using it as the basis for a port of Tut-tut. However, rather than write it for the ZX Spectrum, I decided I would try to write it for the Jupiter Ace, a less well-known British micro from the early 1980s that was unusual in that it had Forth as its built-in language, rather than the ubiquitous BASIC.

The Ace was developed by Richard Altwasser and Steven Vickers, who had been designers at Sinclair Research until they left to form their own company called Jupiter Cantab. The Ace was their first (and only) computer, and was launched in 1983. The Ace had much in common with the ZX81, which almost certainly inspired it but, by using Forth instead of BASIC, the limited RAM (2 kilobytes, built-in, usable) was much less of a constraint than had been the case for the ZX81.

Source - https://k1.spdns.de/Vintage/Sinclair/80/Jupiter%20Ace/Advertisements/
Sadly, while Forth was compact and efficient, its more primitive functionality and idiosyncratic syntax (based on Reverse Polish notation [link]) put people off, and the machine only ever sold a few thousand units. Also, the arrival, soon after, of Sinclair’s next micro, the ZX Spectrum, which for similar money gave you 16kb of RAM and full-colour, high-resolution graphics would have made the Ace look a poor proposition.

The demise of the Ace signalled a change in the way people viewed home computers. The hobbyists and electronics tinkerers of the 1970s had been replaced by a new breed of users who wanted to play arcade-like games and do useful things such as organise their accounts or run small businesses. The Ace, which was billed as “the programmer’s computer”, arrived on the scene too late, after most micro hobbyists had moved on.

I missed out on the Ace, in the early 1980s, instead being lured by the pull of the ZX Spectrum. However, I probably spent at least as much time trying to program my Spectrum as I did playing games. I soon outgrew BASIC, so spent much of my time wrestling with machine code and crashing my computer. Perhaps if I had started out with an Ace rather than the Spectrum, my programming would have been more fulfilling (if a little less colourful). In an attempt to find out if this was the case, I downloaded an Ace emulator (EightyOne), purchased a copy of the 35th-anniversary Ace User Guide, and set to work on a new version of Tut-tut.

Tut-Tut on Jupiter Ace.
The finished product is available from GitHub [link] as either a TAP file to be used in an emulator, such as EightyOne, or a source code that you can type in and modify, consisting of a Forth program occupying around 4kb once compiled and three assembly language files, which hold various game data to be assembled and loaded into the Forth program as binary code blocks.

While based on David’s Sinclair BASIC version, the Ace version uses the newer levels from the ZX81 version and, thanks to some help from David, includes the extra features such as bracelets, amulets, and a hidden treasury for the final level.

The game requires roughly 12kb of memory, so if you are lucky enough to own a real Jupiter Ace, you will also need a 16kb RAM pack as well. Alternatively, you could buy and build a Minstrel 4th [link], a modern day Z80 microcomputer that is compatible with the Ace and can run Tut-tut without any problems.

In the next blog post, I will provide some insight into how the game is written in the hope it will encourage some to have a go at typing in the game rather than loading it from a tape file. However, for now, I suggest you power up your Ace (or Minstrel 4th), or install an Ace emulator, and get on with some Egyptian-themed adventuring.



Read More

Wednesday, April 22, 2020

ZX Spectrum Game: TuT-TuT 2020 Ed

Leave a Comment


After the success of the ZX81 version of Tut-Tut it was suggested to me by several people that it should be ported to the ZX Spectrum. But didn't the game start on the Spectrum you say? Indeed, back in October 2019 the very first version of Tut-Tut was released as a good old fashioned type in game for Paleotronic Magazine. 

Brining Tomb Raiding Back to the Speccy

The initial version of Tut-Tut was a sizeable challenge to get working in pure Sinclair BASIC. The ZX81 version proved a nice little conversion project in C. This time around I've taken both versions, squashed them together and used ZXbasic as the modern development tool of choice.

Keeping it Early 8bit

Despite constantly changing implementation languages, TuT's core game mechanics and functionality are all based around the algorithms and techniques outlined in the Paleotronic article.

Staying true to the BASIC version of the game became a key style choice for new Spectrum edition of Tut-Tut. In particular the decision not to introduce fluid animation into the game was something that I'd much internally debated about.

In the end I felt retaining character square based movement lead heavily to an early 80s home micro aesthetic, one that most retro games (understandably) shy away from. That's not to say the game feels old, it's just meant after a fashion to feel like a kick arse earlier tittle.


TuT-TuT for the ZX Spectrum Screen Shots
Screen Shots from ZX Spectrum TuT-TuT 2020 Edition

New Elements for the Ancient  

Of course nothing stands still, the new edition includes all the enhanced game play elements introduced in the ZX81 version, including bracelets and amulets. All 29 ZX81 levels have been updated for the Spectrum; plus 6 new levels to discover if you've previously played the ZX81 game.

Being that this game is for the ZX Spectrum I've really tried to give the Tut-Tut a great Ancient Egyptian tomb raiding colour vibe. All the graphics have had a good makeover from those in the original BASIC version. In addition the game now contains several minor graphic tile sets that weave together throughout the tombs.

For ease of play-ability, the 2020 Spectrum edition adds joystick support and a much converted ability to pause the game; having to play the ZX81 version in one sitting without coffee became a little taxing.

Download Excavate a Copy of the Game

ZX Spectrum TuT-TuT 2020 Cassette Cover Art

Thanks for Helping it Happen

I'd really like to thank a number of people in particular for helping out and generally supporting the Tut-Tut project from the beginning till the present:

  • Melody Ayres-Griffiths for suggesting something Halloween inspired for the Paleotronic Article.
  • Rod (Villordsutch) Bell and his support for the game, plus suggesting the ZX81 version really ought to be on a real tape.
  • Simon Ullyatt of Cronosoft fame for publishing the game and being generally enthusiastic and awesome.
  • Jim (Magenta) Blimey gets much thanks for play testing a lot of demo versions and providing some really useful dev tools. 


Read More

Sunday, November 17, 2019

ZX81 Game: TuT-TuT - Editions

Leave a Comment

What news of the ZX81 version of the TuT-TuT since the initial release you ask? Well there are some exciting developments that need some sharing.

Physical Tape Release of TuT-TuT

I'd mentioned in the previous post that a physical tape release was in the works. Simon Ullyatt and his brilliant retro publishing label Cronosoft will be releasing the game in the not to distant future.

Simon is busy putting the game through some additional testing on real hardware, checking the loading from real tapes and the like. Then of course there is the small matter of cassette production, once all is confirmed the release date will be announced, so stay tuned for exact dates.

Of course what's a physical tape release without some good cover art? After an intense drawing session on my part and some quality layout work on Simon's side of things we have a tape inlay cover ready to go. Those mummies really look menacing, would you dare enter this tomb? (Of course you will)


Coming to a Tape Player near you, the Soon to be released Tape version of TuT-TuT  

UDG 4 ZXpand Edition 

For those fortunate enough to own both a ZXpand and a UDG 4 ZXpand expansion cards for their ZX81s, Moggy from over on the Sinclair ZX World forums created a User Defined Graphics set for TuT-TuT. Don't have the expansion or a ZX81, no need to worry the enhancements can be used with the excellent EightyOne Sinclair Emulator.

All instructions on how to use the UDG version in an Emulator or with a real ZX81, along with the required files are all now included in the TuT-TuT tape file download.

Original ZX81 version and the enhanced UDG 4 ZXpand graphics set.

Get TuTing on an iPhone

In need of a mobile on the go fix of some TuT-TuT action? Kevin Palser has your desires covered if you're an iPhone / IOS user. TuT-TuT is to be included in the next release of the his ZX81 for IOS emulator. The latest version of the emulator should be appearing later this week (Late Nov 20119).




The ZX Spectrum Version

The ZX Spectrum version of TuT-TuT has been a huge success all off it's own. A big thanks for the overwhelmingly positive reviews circulating out there in the wild.

A special shoutout to Ewan Spence for his play through of the game on his Retro Spectrum YouTube channel. It's been great to see so many great reactions to the game. Who would have thought a game written in Spectrum BASIC could be such a hit in 2019.



The Spectrum version of the game was all about challenging the idea that Sinclair BASIC couldn't be used effectively in games creation, I think I've managed to help in some way to bust that myth. If you haven't yet, go grab yourself a copy from Paleotroic Magazine and get playing, remember to check out some of the other articles while there.

The ZX81 Version is more than a Conversion

If you've had fun playing TuT-TuT on the ZX Spectrum be sure to give the ZX81 version a play through.

Unlike the Spectrum TuT-TuT, the ZX81 game is not written in BASIC, this left the door open for some enhancements of gameplay and features. While some of the levels will be familiar, many have been subtly changed and many more added, in fact there are almost twice the amount on the ZX81.





Getting a Copy of TuT-TuT


ZX81 Versions


ZX Spectrum Versions


Love the Game?


Read More

Tuesday, October 29, 2019

ZX81 Game: TuT-TuT

4 comments
For the October 2019 issue of Paleotronic Magazine I took on the challenge of writing a ZX Spectrum game in BASIC. The result being the fast paced Halloween inspired, Ancient Egyptian themed arcade puzzler Tut-Tut. Now with the Spectrum version sorted, how about a ZX81 version of the same game, only better?!


Tomb Raiding with a ZX81

It's coming to the end of 1921's digging season in Egypt. Your excavations have not gone so well this year, failing to find any trace of the legendary and as yet undiscovered Pharaohs tomb. Then in your final weeks wild stories recounting the wrath of vengeful mummies strangling would be tomb local raiders filter back to base camp.

At last some concrete leads worth looking into, and opportunities to good to pass up. Oculist tales of curses be dammed, you're an Egyptologist and grand adventurer, such nonsense can't possibly hurt you. Or can it?

How far into the tomb of the Pharaoh can you make it? 

Playing the Game

Tut-Tut is one part puzzle, two parts arcade action. The game is comprised of 28 levels, plus a hidden treasure chamber which may only be opened if you are deemed worthy.

Collect gems, amulets and bracelets for points, you'll need 5000 before the end of "Sutekh's Eye" (level 28) for the treasure chamber to open. Amulets and Bracelets will freeze the player or halt mummies respectively.

To complete each level the player will need to collect keys, open doors, move blocks before finding exits to lower crypt levels. Keep an eye out for Pharaohs roaming guardians, they're not the smartest of the undead but they are relentless.

Keys are: O’ left, ‘P’ right, ‘Q’ up, ‘A’ for down and ‘R’ to reset the level (at a cost).

Details on where and how to acquire a copy of TuT-Tut are listed at the end of this blog entry.


The reMaking of TuT-TuT


The original version of Tut-Tut was written as a type-in game for the ZX Spectrum and published in Paleotronic Magazine. The game was entirely constructed in BASIC, this presented numerous challenges, the the greatest being the problem of speed and squeezing enough of it out of the machine. The trials and tribulations of undertaking that task on the ZX Spectrum is pretty well documented in the magazine.

I had considered re-pointing the BASIC game to the ZX81, but the challenge of writing a good game in BASIC had kind of been dealt with. The greater challenge on the ZX81 is in presenting an atmospheric game that transcends the limits imposed by the machines most obvious shortcomings; black and white predefined chunky graphics. To that end the ZX81 version of Tut-Tut has been written in C, targeted towards Z88dk for compilation.

TuT-TuT: ZX Spectrum vs ZX81 Version
I've been careful to maintain the core game play between versions. The choice not to use BASIC could have been a catalyst to greatly enhance elements such as enemy mummy movement for example. The choice not to change to much has however kept the feel of the game, and ensured the overall design feels consistent.

Despite remaining essentially the same game, opportunities have been taken to add additional elements. The size and scope of TuT-TuT has increased, there are now 28 normal levels, plus 1 special level. Extra levels necessitated the creation of a couple of additional items to hold player interest; Amulets and Bracelets provide chances for scoring extra points alongside the potential disadvantage of actually interacting with the items.

That's about it, be sure to check out the article in Paleotronic and enjoy both the original and especially this ZX81 enhancements. Special thanks to Paleotronic for both suggesting and providing the space the Spectrum game and a shout out to Rod Bell for supporting the project.

Be sure to check out Rods video review of the ZX81 TuT-TuT Demo Version


Getting a Copy of TuT-TuT


ZX81 Versions


ZX Spectrum Versions


Love the Game?






Read More

Wednesday, May 29, 2019

ZX-Key, External Keyboard For ZX81s and Other Micro Computers: Part 5

8 comments
The ZX-Key ZX81 Keyboard in Full Case

The Full Case For ZX-Keys

I've been promising a full keyboard case for the ZX-Keys ZX81 keyboard for a while, now at long last it is (almost) complete. Complete enough that have in my hands a freshly minted case fresh from Shapeways, and it looks gorgeous.

The Full Case builds on the Starter Case covered in the previous blog post, adding the top half and a bottom plate. As mentioned previously only the Starter case is really required, but for some smart good looks the top half is a must have. Of course for the sake of competness a bottom plate may also be attached.

Exploded Viw of the ZX-Keys Case Components
 The top half of the case is really where all the action takes place. The ZX-Keys mode indicator LEDs and reset switch are slightly recessed at the back, with some nice speed lines running either side, lending a retro 80s feel. A small hole is left open to the right of the case allowing a USB lead to be plugged in when using the keyboard with a PC or MAC. At the rear of the case the IDC connectors for serial out and direct connection the ZX-Key expansion interface are nicely flush.

ZX-Key ZX81 Keyboard - REar View
The Rear of the ZX-Keys Keyboard Case, Showing the Flush Mounted IDC Headers.
The whole unit is help together with 3mm diameter case bolts. A 6mm bolt and nut hold the centre of the base plate to the keyboard, all other bolts are 8mm in length and may be screwed firmly into to case holding the unit tightly in place.

ZX-Key ZX81 Keyboard - Side View
Right of the ZX-Keys Keyboard Case, with cutout for micro USB Access.
Attached to the inside of the top case is a sprew containing two Switch Cover components for mounting on the keyboards reset switch. The exact Switch Cover to be fitted on assembly depends on the micro switch found on the ZX-Keys PCB. A hollow stemmed version for use with long barreled micro switchs, or a flat bottom variety if shallow micro switch is in place. The Switch Covers should be placed inside the top shell the before assembly.

ZX-Key ZX81 Keyboard - Under Side View
ZX-Keys Base Plate and Mounting Bolts.
The only real issue I have with the beta case print is with the base plate. I found the plate to be a little flimsy, and it'll need to strengthening it before general release. Notably the grill like pattern on the base will be removed and made solid. Additionally the riser bars along inner sides will be widened to add a little extra rigidity.

The ZX-Key ZX81 Keyboard and Interface Card Connected to a ZX81
My ZX81, pictured with the complete ZX-Key Case and ZX-Keys Interface Card.
The ZX-Keys itself is for sale on Sell My Retro, At the time of writing there is one unit available, never fear more are on their way very soon. The Starter Case can be found on Shapeways., and the Full Case will be made ready for purchase there very soon.

Once I've completed work on the Full Case design a DIY Beginners Case for home 3D printing will also be made avaliable. The Beginners case will be based on the Starter Case design, although it will not be full compatible with the complete case units. All will be announced ASAP.

Update: All Case Parts are now avaliable for order from my Shapeways Shop.


See more entries for this project: Part 1Part 2Part 3Part 4, Part 5

Read More