Resource centre for ZX Spectrum games
using Manic Miner and Jet Set Willy game engines
Archive of the
Manic Miner & Jet Set Willy Yahoo! Group
messages
|
|
||
|
|
Message: 7127
Author: ian.rushforth
Date: 01/08/2017
Subject: Re: Manic Miner Air Supply - a more refined approach
One other thing I should mention is that the minimum valid value for the initial air supply requires that at least one character of air supply is filled in at the start of the game. This equates to a value of #25 in Offset 700, since the 'Cavern Setup' code subtracts #24 from it in order to draw the air bar in the correct place on the status bar: http://skoolkid.gith.../8684.html#8691
(If you try to select a value of #24 for Offset 700, then I believe the Spectrum will crash, as the air bar is drawn via a LDIR loop in the 'Cavern Setup' code, and using an initial value of BC=00 in a LDIR loop will cause BC to wrap around to #FFFF, leading to an attempt to overwrite all 65536 bytes of memory!)
So selecting an initial value of air supply = 1 for a cavern, in the current JSWED drop-down menu, equates to #180/4 = #60 time-frames (96 in decimal) before the air supply runs out.
Whereas it is possible, under my suggested alternative 'initial air supply' regime, to have a cavern with #41 time-frames of air supply, or 65 time-frames in decimal. (You can achieve this by inserting the values #25 and #04 manually at Offsets 700 and 701 via the hex editor, or the equivalent if it is a JSW64 game. However, if you subsequently open up the 'Room Properties' menu, then JSWED may over-ride those values and try to reinstate what it considers to be 'valid' values.)
Whether having a cavern with such a tight time constraint is a desirable feature - barely enough time to cross half the width of a cavern! - is a moot point, but it illustrates the increased flexibility (as well as the more rational distibution of permissible values) in the alternative regime.
