Willy-Longwalk.gif (4471 bytes)Willy-Longwalk.gif (4471 bytes)
FAQ Technical

Back ] JSW Remakes Home ] Up ]
JSW1-bathroomfloor.gif (1468 bytes)

visitors to
this page since



View Guestbook
Sign Guestbook

decoboot.gif (4103 bytes)


Non-white arrows

Yesterday, I managed to get coloured arrows in JSW:

POKE 37512, i

{0 <= i <= 7

It's the operand of an OR mask. The default value is of course 7 (111), which means that arrows always appear white.

However, if you set it to i < 7, then the arrow colour can be contaminated as it passes through things with non-black ink (including background), because the INK colour of the thing it is drawn on is bitwise-ORed with the mask i - it's an OR mask, rather than the INK colour.

For example, if i = 0 (000), then the arrow has black ink if it is drawn over black ink, but it gets its INK colour from the character square it is drawn over (effectively, you can specify the colour of arrows for each room by setting the background INK).

This discovery raises the prospect of scary invisible arrows, too, which with the unhacked JSW game engine could only happen in white-paper rooms :->

I haven't tried i > 7, but I imagine that would extend to the rest of the colour attribute (FBPPPIII) in the obvious way.

Note that this POKE does not affect the colour of the objects with which arrows collide (still white), just the colour they appear as.

It's just like having black Willy - Willy could be any of the 8 colours, but his colour could be contaminated because it's an OR mask (in the case of black Willy, it's an AND mask instead - to reset rather than set the bits). The solution for INK 1-6 Willy or arrows without such contamination would be to have an AND mask followed by an OR mask, to clear the ink colour and then set it directly, but it's very fiddly as it would involve code motion to insert the extra instruction.

- Andrew Broad

Invalid arrows - effects on colour

I was re-reading the thread on invalid arrow technology and decided to experiment a bit myself. I couldn't find any documentation on how changing the 'frilly bits' on the arrow alters the effect, so I fiddled about and found out the following.

I'm sure it's not news to most of you, but it might be helpful to my fellow newbies!

I'll call the 8 blocks of the arrow's 'frilly bit' 1 to 8 thus:



Block 1 sets flash on or off
Block 2 sets bright on or off
Blocks 3, 4 and 5 control paper colour:
Single blocks in 3,4 and 5 make paper green, red and blue respectively

Double blocks in 3, 4 and 5 make yellow, cyan and magenta (3&4, 3&5, 4&5 respectively)
All three blocks filled in makes white, no blocks makes black.
Blocks 6, 7 and 8 control the ink colour and the colours are set in the same order as paper.

So for example, to turn a block into bright blue paper with magenta ink, fire an invalid arrow with the following 'frilly bits':



(0 is blank)


Invalid Ramps

So, what are they then ?

They are ramps with a value other than 0 or 1 (left and right), although they still go either left or right. they are useful because they make willy act strange, in a sort of buggy but interesting way, and are even stranger if you have multiples on the room (i.e. giving it the same attributes as water or air).

Yes you will need to set them manually, the best way to do this is to find a hex editor and have a look. the room format is fairly easy to understand, and i managed (so it must be easy) but if you get stuck just ask for more explicit instructions!



Is it possible to change the colour of willy? I want to do a game set against a white background (or light colours) and I want a black willy. I have patents pending on this idea btw :)

The following bit of code makes Willy white:

    LD    A,(80A0h)
    OR    07h    ;Set INK to 7

And if we replace "OR 07h" with "AND 0F8h", the ink will be set to black. So the bytes which go

3A A0 80 F6 07

want to become

    3A A0 80 E6 F8

A word of warning: As it stands, this patch completely wrecks collision detection - Willy can't pick up objects, because he's black and the objects still expect him to be white.
It may be possible to fix this by searching through the game engine for the instructions

AND   7    ;Get INK colour
    CP    7    ;Is it white?

and replacing them with

AND   7    ;Get INK colour
    CP    0    ;Is it black?

As byte sequences, these are:

E6 07 FE 07 and

    E6 07 FE 00 respectively.

but this second patch remains entirely untested; apply at your own risk :-)

How do you change colours for room titles ?

An easy one this time, I hope. JSW.MAC shows that the attributes for the bottom third of the screen are at 9A00h. They start with a stream of 46h bytes, and 46h equals:

  80h * 0 (flash  0)
+ 40h * 1 (bright 1)
+  8h * 0 (paper  0)
+  1h * 6 (ink    6)

So if you set the bytes at
9A00h, you should be able to change the colours of room titles. This should be the same in JSW48 and JSW128. Be warned that if you use a background other than black, it'll show up as a horizontal bar on the title screen.

John Elliott


1. How do you spell it? Conveyor? Conveyour?


2. How does the conv.-bitmap work? I think the engine constantly moves the upper lines of the bitmap and those below the upper lines are moved in an opposite direction. What's the truth?

The top row of pixels in the conveyor are animated by rotating them TWO PIXELS AT A TIME - left rotate for `left' and `off' conveyors; right rotate for `right' and `sticky' conveyors. The third row of pixels in the conveyor are rotated in the opposite direction.

3. How do you make conveyor-stairs (The Chapel) in JSWED?

You set conveyor and ramp to have the same colour attribute, and place a ramp in the room.

Of course, if you also place a conveyor in the room, it will behave like a ramp too, and will be drawn using the ramp graphic rather than the conveyor graphic (due to the Block Graphics Bug). This is a compromise I had to accept in JSW:LOTR's "The Stairs of Cirith Ungol"! :-)

Andrew Broad



How do you do the multi-rope trick :- that is, more than 1 per room in JSW ?

If you import the JSWIX6.SNA from http://www.seasip.demon.co.uk/Jsw/experiments.html into a JSW editor, you should be able to have eight ropes in a room.

Changing the length byte is the only variation on the standard bytes that seems to work, doesn't it?

Changing the last byte (how far to swing) also works. For example, in true JSW, POKE 40975, 34 makes the rope in `Quirkafleeg' swing not quite far enough to catch :-)

John Elliott


How do you change speed of horizontal guardians like in Geoff mode?

hi, unfortunately the answer is: you can't. only the speed of vertical guardians can be edited via jswed at the moment. geoff has implemented this effect in his games but it isn't yet supported by an editor (to my knowledge).

"I'm using JSWED. It works really great. The only flaw I've discovered so far is that it crashes when changing guardian type to diagonally moving. (or something like that)"

When you want a diagonal guardian, hit "!" and zero out all the bytes. Then, select your diagonal and pull it into shape. if you need to change the guardian type while editing, erase the guardian again.

Don't give up on the diagonal guardians, they're really good! you can even have guardians patrolling up and down along the ramps :)


1) Horizontal Guardians can start from any point on their path then?

Yes - even outside their left and right boundaries if you want to give them a grand entrance! :-)


2) Vertical Guardians always start at the same vertical point but you can choose the horizontal point yourself?

You edit the vertical start position of a guardian by editing the guardian CLASS - it has to be within the top and bottom boundaries. You edit the horizontal position of a guardian by editing the guardian INSTANCE.

For those unfamiliar with my terminology:

- Guardian class: an entry in the guardian class table (40960-41983).

  • Guardian instance: an instance of a guardian class in a particular room (each room can have up to eight guardian instances).

Andrew Broad

Fall from a certain height

How can you stipulate how far Willy can fall ?

"John Elliott may know…" - Ed.

As it happens, I do know. But it's late at night and I'm feeling tired, so I'm not going to bother working out addresses and patches. I'll just outline the changes necessary, and leave you all to work out the tedious details :-)

Load up the JSW disassembly from my homepage, and do a search for the label "BREAKFALL:". A few lines after BREAKFALL: are some lines that read


CP 0Ch

and the 0Ch byte is the maximum falling height. So all you need to do is work out its address and change that byte? Well, not quite.

The variable I've called AIRBORNE is used to indicate whether Willy is on the ground, jumping, falling or dead - search for "AIRBORNE:" for the details. There are a number of places where its value gets automatically set, and you would do well to check them if you're going to change the allowed-fall height. So it's best to do a search for "(AIRBORNE),A" and check if the values written to it are correct. In particular, there's one place where AIRBORNE is set to 0Ch (so that Willy is certain to die of falling when he hits the ground), and one where it's set to 06h (I forget exactly why).

John Elliott

Title Screen editing

I have noticed that some people have changed the title screen in their games. Where it said jet set Willy 128 for example they have changed it to the name of their game.

The title screens are done differently in JSW128 and JSW48, it isn't too hard, at least on a Spectrum +3 :-). Anyway, the JSW128 title screen is stored at the start of TITLE.JS7, in the following format:

* Bitmap: CODE 16384,4096
* 1st Attributes: CODE 22528,512
* 2nd Attributes: as above
* 3rd Attributes: as above

When I was drawing the original JSW128 title screen, I generated three screens on my +3 using Animator1 (a paint package) and then wrote a little BASIC program to copy the correct bits to an area of memory and save the result as TITLE.JS7.

Changing the title screen in the 48k version and ending up with something recognisable is much harder.

Can you 'shape' the title blocks & the triangle, and put normal text'n'stuff on the Title screen in JSW128 ?

Of course you can. But you don't want to use a hex editor, you don't want to use SGE, and you don't even want to use JSWED. What you need is a Spectrum or emulation thereof; I'll give this example for Z80.EXE.

Design your screen (either write a BASIC program to draw it, or use a Spectrum-hosted paint package - or even start with a GIF and convert it to SCREEN$). Anyway, you should have your title screen displayed on the Spectrum screen. Remember you can only use the top 16 lines.

Now hit F10, Extra functions, Save Memory Block; and save from #4000, length #1000.
If your emulator can't do this, SAVE "bitmap.bin"
CODE 16384, 4096. Then you save the attributes - with Z80, this is from #5800, length #200. Otherwise, SAVE "attr1.bin" CODE 22528, 512.

For colour cycling, change the attributes and save a second set, and a third. If you don't want colour cycling, just repeat the attribute save a couple of times.

If you used Z80, you should end up with four files: bitmap.bin, attr1.bin, attr2.bin and attr3.bin. If you used something that saves as .TAPs, you'll need to use TAPSPLIT or specsasie to recover the files from within the .TAPs.

Now combine the four files. In DOS, this is:


And in Unix, it's

  cat bitmap.bin attr[1-3].bin >screen.bin

Now you can start using your hex editor. Paste
the resulting file in, 128 bytes after the start of TITLE.JS7; and it'll work just fine.

The whole thing's easier on a +3, because you just LOAD "TITLE.JS7" CODE, and then write little FOR/NEXT loops to copy the new screen data in.

Is there something I can alter to tighten the time limit ?

In both JSW48 and JSW128, What You See Is What You Get - the ASCII clock message is also the counter.
So all you have to do is go to 857Fh and set a new start time (do it to both copies of the "7:00a" message) which can be as close to "11:59p" as you like.

 John Elliott


can you use your own midis for music in JSW128?

No. You can write your own tunes if you want, but they wouldn't be MIDIs. As it is I only know of one person who wrote tunes in the .TUN format used by JSW128, and that's Ian Collier himself. The tune format for JSW48 is documented on Andrew Broad's site, and various authors have written new JSW48 tunes (which are, of course, simpler).

 John Elliott


Is there something I can alter to tighten the time limit?

In both JSW48 and JSW128, What You See Is What You Get - the ASCII clock message is also the counter.

So all you have to do is go to 857Fh and set a new start time (do it to both copies of the "7:00a" message) which can be as close to "11:59p" as you like.

 Collision detection

I have written up what I have learned about collision detection, and have just uploaded it to my website http://www.cs.man.ac.uk/~broada/spectrum/willy/collision.html

The most important message is that the order in which two objects collide is important: A colliding with B does not have the same effect as B colliding with A.

The document explains how a room's guardian instance list should best be ordered to avoid problematic collisions involving ropes and arrows. In short, the order should be:




Andrew Broad


Back ] JSW Remakes Home ] Up ]

View the JSW Remakes Guestbook Sign the JSW Remakes Guestbook

JSW1-bathroomfloor.gif (1468 bytes)
From the original location of Gawp's Jet Set Willy Pages

Last updated: September 12, 2001.

Thanks to Emulation Unlimited for providing the web space.
willy3.gif (249 bytes) eulogo.gif (19565 bytes) Willy3reflected.gif (285 bytes)