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: 6386
Author: andrewbroad
Date: 05/03/2008
Subject: Re: Item Oddities
dm_boozefreek wrote:
>This is indeed odd! My first suspicion is a dislocated item-table, so
> I've been working on the sequel to the man who sold the world, and
> something rather strange has happened. I don't know if anyone else
> has had this happen before?
>
> The file I used for it was a .Z80 image I saved ages ago for this
> game because it had Andrews 24 hour clock patched into it. I
> converted it back to a .tap and started editing again, all seemed
> fine I deleted all the items but the one in the bathroom, and
> started making my game. I'm about 4 screens in and I decided to
> playtest the screens I'd done. All the items have vanished from
> where I put them, and all the items in the unedited rooms have
> appeared back in their usual spots even though JSWED displays them
> and counts them as being removed.
>
> So I thought lets put the remaining 255 in the start room and chip
> them off as I need them, low and behold when I playtested again the
> startroom total gives you 109 items and the ones from the rooms
> I've been working on are still not there, and the ones from the
> unedited rooms are back. Even though JSWED says that the items I've
> put down are in place and the ones I removed from the original
> screens aren't there.
>
> Could anybody shine a light on this rather odd situation?
I'll start with the following questions:
1. Which JSW-engine are you using?
(a) If JSW48, are you using either the Softricks engine or J.G.
Harston's extension?
(b) If JSW64, which variant?
2. What are the bytes at #8801 and #93D2? (they should be the same,
as they are the high byte of the item-table's base-address)
3. What are the bytes at #8803 and #8804? (low byte and high byte of
the address of the item-count)
4.(a) If using JSW48/128, what are the bytes at #93D4 and #93D5?
(should be the same as the two bytes in #8803 and #8804)
4.(b) If using JSW64, what are the bytes at #8590 and #8591? (should
be the same as the two bytes in #8803 and #8804)
Daniel wrote:
>I haven't actually tested this, but the on-screen item-count is
> So what happens in JSW64:MM when you keep playing in a loop? I know
> that you keep collecting the items, but what happens when you reach
> 256?
stored as an ASCII string in #857C-857E (initially "000").
Whenever you collect an item, the code at #93F3-9408 starts at the
right of this string (#857E), and increments the ASCII code for the
units until it goes above #39 ('9'), whereupon it replaces it with
#30 ('0'), moves one character to the left in this string (#857D) and
processes the tens likewise, then moves one character left again
(#857C) and processes the hundreds. So that's fine up to 999 items.
But what happens when we collect the 1000th item? The on-screen count
will reset to "000", but the algorithm doesn't check for moving past
the left end of the string, so it will start overwriting memory-
locations it shouldn't, starting with #857B (until that goes above
#39), and working backwards through the "GameOver" string!
--
Dr. Andrew Broad
http://geocities.com/andrewbroad/
http://geocities.com/andrewbroad/spectrum/
http://geocities.com/andrewbroad/spectrum/willy/
