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: 5928

Author: andrewbroad

Date: 10/10/2006

Subject: Static v Dynamic POKEs (items & teleporting in JSW)

 

skarpo.rm wrote:

>
> Started the game as normal, typed in the poke I found on the
> Tipshop site: "POKE 41983,255 You have only to collect the tap to
> see the finale effect" ... nothing different on-screen.
>
> Picked up the tap(from the tub, right???) and ambled on over to
> the Bedroom.
>
> She was there.

You need to understand the difference between:

* a STATIC (compile-time/load-time) POKE: a poke that has to be
applied before you start playing the game - before you even reach
the title-screen.

* a DYNAMIC (runtime) POKE: a poke that has to be applied while you
are playing the game.

POKE 41983,n is a static poke for setting the size of the item-table
to 256-n (hence a JSW game must have at least one item, and at most
256).

When you start playing the game, the byte at 41983 is copied to
34270, so to have to collect only one more item whilst playing the
game, use the dynamic POKE 34270,255.

(Static values are copied to dynamic addresses when JSW is run from
BASIC, and at the end of a game before returning to the title-
screen - they are NOT copied when starting the game from the title-
screen, hence if you apply a static POKE on the title-screen, you'll
have to start and restart the game to see its effect.)^1

Another useful dynamic POKE is 34271,s, where s is the game-status
you wish to enter:
* 0: normal (not collected all items)
* 1: Maria disappears
* 2: Willy runs to the right, looking for the toilet
* 3: Willy in the toilet


> got bored and still standing there I decided to take a look at the
> Quirkafleeg screen.
>
> Again using Tipshop I found that as being room number 16 and also
> found a poke to transport over there.
>
> "Start in room x 34795,x:33824,x (x=1-63, see list)"

POKE 34795,x is a static poke for setting the start-room to [x].
To start in "We must perform a quirkafleeg" [16], use POKE 34795,16.

POKE 33824,x is a dynamic poke for setting the current room to [x].
It's like teleporting, but the current-room buffer is not refreshed
until you lose a life, so at first it will look like you're still in
the room you were in before you applied the poke. However, the
effect on items and Maria is instantaneous, i.e. you will see [x]'s
items immediately.

Personally, I prefer POKE 33824,x to using WRITETYPER for
exploration-purposes (or to escape from a trap which makes a JSW
game not Maria-completable).


> So, in Spin I punched 34795,1

which means: set the start-room to "The Bridge" [1].


> hit POKE then I punched in 33824,6

which means: set the current room to "Entrance to Hades" [6].


> hit POKE ... went back to the game, lo and behold, guess who
> dissapeared right in front of me?

Maria, because she only appears when the current room (according to
the byte at 33824) is "Master Bedroom" [35].


> Anywho, went to bed (and touched the pillow/wall) and got the Die
> Mortal screen.

Because when you lose a life, it refreshes the current-room buffer,
i.e. copies "Entrance to Hades" [6] to #8000-80FF, and does the rest
of the room-initialisation (according to the code at #8912 onwards).

--
Dr. Andrew Broad
http://geocities.com/andrewbroad/
http://geocities.com/andrewbroad/spectrum/
http://geocities.com/andrewbroad/spectrum/willy/
---
Footnote ^1: The code I'm talking about is at #87CA.

 

 

arrowleft
arrowright