Tuesday, 19 November 2019

The Maze of Argon

I'm really quite proud of how this game port came out. David Maunder recovered this game for the Dick Smith VZ-200 computer from an old cassette tape. The machine language portion of the game that draws the 3D maze was corrupted.


However, the BASIC part, which handles all the other functions of the game, was ok. So I rewrote the wall rendering in BASIC and it came up very speedy.


I had to change how the maze data was stored too. It was set/reset into hires graphic screen area, but that area was never displayed. It was just used to store the 2D map info from each level that were read by the wall rendering subroutine.  Values for the maze in the sightline of the virtual player (represented in the following by "^") were poked into memory before a call was made to the USR M/L subroutine:

  8
  6
 475
  3
 1^2

I had to recreate the maps and store them as strings into which I POKEd the various items you can find (Pits, Energy packs, exit). This was greatly aided by David, who was able to halt the program and display the graphic screen to show the maps.



I used the screenshot that he provided to redraw the maps as a string array using # symbols to represent the walls, ! symbols for pits, % symbols for energy packs and $ for the secret exit.  These latter items had to poked into the strings  rather than using BASIC string handling commands (MID$, LEFT$, RIGHT$) because otherwise, the strings would be reallocated to string space, and there wasn't enough memory for that to be possible.  I had to readjust the offsets used to perform operations on the maps.  In the VZ each of the 3 levels takes a 40 wide space in the x axis and are set down from the top of the graphic screen by 24 pixels.  In my versions the levels each have 32 spaces in the X axis and only a 4 space offset from the top of the string array:

7001 M$(01)="                                                                                                 "
7002 M$(02)="                                                                                                 "
7003 M$(03)="                                                                                                 "
7004 M$(04)="   ###########################     ###########################     ###########################   "
7005 M$(05)="   #           #   #   #   # #     #                         #     #       #       # #   #   #   "
7006 M$(06)="   # # ### ### # # # # # # # #     # ########### ### ### ### #     # # ### # # ### # # ### # #   "
7007 M$(07)="   #   #   # #   #   #   #   #     # #         #   # #     # #     # #   #   #             # #   "
7008 M$(08)="   # ### # # ### # ### # #####     # # ####### # # # # # # # #     # ### # # ##### # ##### # #   "
7009 M$(09)="   #     #       #     #   # #     # # #     # #   # # # #   #     #     # # #   # # #   #   #   "
7010 M$(10)="   ### # ### # # # # ##### # #     # # ##### # # # # # # ### #     ### # # # # # # # # # # # #   "
7011 M$(11)="   #   # # # # # #   #   # # #     # #       # # #   # #     #     # # # # # # # # # # # # # #   "
7012 M$(12)="   # # # # # # # # # # # # # #     # ######### # # # # ##### #     # # # # # # # # # # # # # #   "
7013 M$(13)="   # # #     #   # #   #     #     #           # #   #   # # #     # # # # # # # # # # # # # #   "
7014 M$(14)="   # # ### ##### # # ##### ###     ######### ### ### ### # # #     # # # # # # # # # # # # # #   "
7015 M$(15)="   #   #   #     #     #     #     #     #   #         #     #     #   #   #   #   #   #   # #   "
7016 M$(16)="   ### # # # ### # # # # # ###     # ### # ### # ### # ##### #     # ### ### ### ### ### ### #   "
7017 M$(17)="   #     #       # # #   #   #     # #   #     #   # #       #     # #   #   #   #   #   #   #   "
7018 M$(18)="   # ### ### ##### # ### # # #     # # # # # ####### # ##### #     # # # # # # # # # # # # # #   "
7019 M$(19)="   #   #   #     #         # #     # # #   # #       # #     #     # # # #   # #   # # # # # #   "
7020 M$(20)="   ### ### # # # # # ##### # #     ########### ####### # #####     # # # # # # # # # # # # # #   "
7021 M$(21)="   #         # # # #       # #     #                   #   # #     #   # # #   # # #   #     #   "
7022 M$(22)="   # # ### # # # # ### ### # #     # ### ########### # ##### #     ##### # ##### # ###########   "
7023 M$(23)="   # #     #   # # #     #   #     # #   #   #   #   #       #     #     # #   # # #         #   "
7024 M$(24)="   # # # # ### # # # ### #####     # # # # # # # # # ##### ###     # # # # # # # # # ####### #   "
7025 M$(25)="   #   # # #         #       #     # # # # # #   # #   # #   #     #   #       # #   #     # #   "
7026 M$(26)="   ### # # # # # # # # ##### #     # ### # # # # # ### # ### #     ### ### # # # # ### # # # #   "
7027 M$(27)="   #     #   #   #   #       #     #   #   #   #   #   #     #     #   #   #     #     # #   #   "
7028 M$(28)="   ###########################     ###########################     ###########################   "
7029 M$(29)="                                                                                                 "
7030 M$(30)="                                                                                                 "
7031 M$(31)="                                                                                                 "


The game is pretty fun and very challenging.  The original starts you with a countdown timer of 10000, but I bumped this to 12000 for the MC-10 because I think it runs a little faster than the VZ.  The VZ version also has a funky musical interlude at the end of the game ("Lara's Theme" from Doctor Zhivago), which also had to be dropped for memory reasons.  I did preserve the other fanfares for losing and winning.  I just use the VZ BASIC manual to convert the note numbers from VZs SOUND command to their equivalent values for the  MC-10 SOUND command.

I used James the Animal Tamer's JVZ_021 emulator to load the original program and the to LLIST it to a text file for editing.  Thanks James!

No comments:

Post a Comment