Jet Set Willy Tech Page - Technical specification of internal table formats for game developers!
This page is a part of the JSW Ultimate Fan Page - The most comprehensive one on the Web

Visit the JSW Ultimate Fan Page!!! JET SET WILLY

TECH PAGE

This page contains detailed technical specification of internal table formats used in the original JSW code (Spectrum version). It is dedicated to all those who are still into hacking the good ol' Willy, and as well to the potential game-developers who would like to make a good PC version of JSW... C'mon, make my day!

ROOM DEFINITION ENTRY
room_address=$C000+room_number*$100
Offset
Description
$00-$7F
Screen definition (32x16 bricks)
$80-$9F
Room name
$A0
BACKGROUND BRICK - Colour-byte
$A1-$A8
                 - Pattern
$A9
FLOOR BRICK - Colour-byte
$AA-$B1
            - Pattern
$B2
WALL BRICK - Colour-byte
$B3-$BA
           - Pattern
$BB
NASTY BRICK - Colour-byte
$BC-$C3
            - Pattern
$C4
RAMP - Colour-byte
$C5-$CC
     - Pattern
$CD
CONVEYOR - Colour-byte
$CE-$D5
         - Pattern
$D6
         - Direction
(0-L, 1-R, 2-OFF, 3-Sticky)
$D7-$D8
         - Position
$D9
         - Length
$DA
RAMP - Direction (0-L, 1-R)
$DB-$DC
     - Position
$DD
     - Length
$DE
Border color (0-7)
$DF-$E0
???
$E1-$E8
OBJECT - Pattern
$E9
Room LEFT
$EA
Room RIGHT
$EB
Room ABOVE
$EC
Room BELOW
$ED-$EF
??? (Not used)
$F0
Guardian 0 - Number ($FF=END)
$F1
           - Start byte
$F2
Guardian 1 - Number ($FF=END)
$F3
           - Start byte
$F4
Guardian 2 - Number
$F5
           - Start byte
$F6
Guardian 3 - Number ($FF=END)
$F7
           - Start byte
$F8
Guardian 4 - Number ($FF=END)
$F9
           - Start byte
$FA
Guardian 5 - Number ($FF=END)
$FB
           - Start byte
$FC
Guardian 6 - Number ($FF=END)
$FD
           - Start byte
$FE
Guardian 7 - Number ($FF=END)
$FF
           - Start byte
SCREEN DEFINITION
BRICK TYPES: 0-Background, 1-Floor, 2-Wall, 3-Nasty
Byte
Bit
Description
$00
7-6
Brick at (0,0)
5-4
Brick at (1,0)
3-2
Brick at (2,0)
1-0
Brick at (3,0)
$01
7-6
Brick at (4,0)
5-4
Brick at (5,0)
3-2
Brick at (6,0)
1-0
Brick at (7,0)
...
...
...
$08
7-6
Brick at (0,1)
5-4
Brick at (1,1)
3-2
Brick at (2,1)
1-0
Brick at (3,1)
...
...
...
$7F
7-6
Brick at (28,15)
5-4
Brick at (29,15)
3-2
Brick at (30,15)
1-0
Brick at (31,15)

CONVEYOR/RAMP POSITION
Second byte First byte
0
1
0
1
1
1
1
R
R
R
R
C
C
C
C
C
Bits
Description
C
Start column (0-31)
R
Start row (0-15)

GUARDIAN START BYTE
S
S
S
C
C
C
C
C
Bits
Description
C
Start column (0-31) OR
Vertical position*2 for ARROW
S
Start sprite (0-7)

COLOUR BYTE
F
B
P
P
P
I
I
I
Bits
Description
I
Ink colour (0-7)
P
Paper colour (0-7)
B
Bright (0-No, 1-Yes)
F
Flash  (0-No, 1-Yes)

8x8 PATTERN (example)
Pattern
[8x8 Pattern Example]
 Byte 
 Value 
$00
$1F
$01
$04
$02
$A0
$03
$77
$04
$87
$05
$B1
$06
$AA
$07
$0A
16x16 SPRITE (example)
Pattern
[16x16 Pattern Example]
 Byte 
 Value 
 Byte 
 Value 
$00
$00
$01
$F0
$02
$00
$03
$F0
$04
$01
$05
$F8
$06
$00
$07
$D0
$08
$00
$09
$F8
$0A
$00
$0B
$F0
$0C
$00
$0D
$60
$0E
$00
$0F
$F0
$10
$01
$11
$F8
$12
$03
$13
$FC
$14
$07
$15
$FE
$16
$06
$17
$F6
$18
$00
$19
$F8
$1A
$01
$1B
$DA
$1C
$03
$1D
$0E
$1E
$03
$1F
$8C

GUARDIAN DEFINITION ENTRY
guardian_address=$A000+guardian_number*$100
Guardian type is determined by the lower nibble of the first byte in the guardian definition entry.
HORIZONTAL GUARDIAN
Offset
Value and Description
$00
D
X
X
X
X
0
0
1
D - START DIRECTION (0-L, 1-R)
$01
A
A
A
X
B
I
I
I
I - INK (0-7)
B - BRIGHT
A - ANIMATION
$02
[Reserved]
$03
ROW * 2 (pixels)
$04
[Not used]
$05
Sprite page
$06
Left boundary column
$07
Right boundary column 
VERTICAL GUARDIAN
Offset
Value and Description
$00
X
X
X
S
X
0
1
0
S - ANIMATION SPEED (0-S, 1-F)
$01
A
A
A
X
B
I
I
I
I - INK (0-7)
B - BRIGHT
A - ANIMATION
$02
[Reserved]
$03
START ROW * 2 (pixels)
$04
STEP * 2 (signed: -U +D)
$05
Sprite page
$06
TOP BOUNDARY * 2
$07
BOTTOM BOUNDARY * 2 
ROPE
Offset
Value and Description
$00
D
X
X
X
X
0
1
1
D - START DIRECTION (0-L, 1-R)
$01
$22 [Reserved]
$02
$0F [Reserved]
$03
$00 [Reserved]
$04
Rope len-1 (best $20)
$05
$00 [Reserved]
$06
$83 [Reserved]
$07
$36 [Reserved]
ARROW
Offset
Value and Description
$00
D
X
X
X
S
1
0
0
D - START DIRECTION (0-L, 1-R)
$01
$06 [Reserved]
$02
[Reserved]
$03
[Not used]
$04
Start
$05
[Not used]
$06
TOP/BOTTOM byte
$07
[Not used]

SPRITE PATTERNS
Page
Sprite
Description
$9C
(156)
 2
Foot
 3
Barell
 4-7
Maria
$9D
(157)
 0-3
Willy (facing right)
 4-7
Willy (facing left)
$A6
(166)
 0-1
Toilet
 2-3
Willy in Toilet
$AB-$B5
(171-181)
 0-7
[GUARDIANS]
$B6
(182)
 0-3
Piglet (facing left)
 4-7
Piglet (facing right)
$B7-$BF
(183-191)
 0-7
[GUARDIANS]

OBJECTS TABLE
Address
Description
$A3FF
256-Number of objects
$A400
Object 255 - Byte A
$A401
Object 254 - Byte A
...
...
$A4FE
Object 1   - Byte A
$A4FF
Object 0   - Byte A
$A500
Object 255 - Byte B
$A501
Object 254 - Byte B
...
...
$A5FE
Object 1   - Byte B
$A5FF
Object 0   - Byte B

Object entry is consisted of two bytes:
Byte A and Byte B.

OBJECT ENTRY
Byte A Byte B
R
P
S
S
S
S
S
S
R
R
R
C
C
C
C
C
Bits
Description
C
Column (0-31)
R
Row (0-15)
S
Room (0-63)
P
Collected (0-Yes, 1-No)



NOTES
Animation
Each guardian is associated with a page of 8 sprites (16x16). The corresponding page address is page * $100.

Technically, the character number to be displayed cycles constantly from 0 to 7, and is modified before printing by ANDing with the animation and ORing with the start sprite.

  • Animation 0 gives no animation: only a single character is used (eg. the barrel).
  • Animation 1 gives 2 character animation (eg. the jelly).
  • Animation 2 gives slow animation using only the even numbered characters 0 and 2.
  • Animation 3 gives 4 character animation (eg. the thing in the bathroom).
  • Adding 4 to the animation number for a horizontally-moving guardian gives bi-directional animation. The left-facing graphics are in characters 0-3, and the right-facing ones in 4-7, so a 2-character bi-directional guardian with start character 2 would use 2,3,6 and 7.

    For vertically-moving sprites, adding 4 just increases the number of graphics used.

Arrow
Arrows move constantly along an imaginary line with 256 positions numbered 0-255. Only positions 0-31 fall within the screen boundaries: the rest constitute the delay between the arrow leaving on one side and coming back on the other. An arrow is defined with a direction and a start position along the line.

TOP/BOTTOM byte is the pattern for the appearance of the top and bottom of the arrow. The middle is always 11111111 binary (255 decimal).

Vertical position of the middle of an arrow (not its top!) is given in pixel positions from the top of the screen, but the top or bottom of the arrow should not fall outside the character position containing the body of the arrow. Put more simply, that value should not be exactly divisible by eight, nor must it be one less than a number which is exactly divisible by eight.

Don't have arrows passing through anything with white INK, because you will loose a life.

Attributes
When a collision occurs, the attributes are used to identify types of the objects involved. Therefore do not have have two characters with the same attributes, especially if one is a 'nasty'.

Having the same attributes for ramp and conveyor creates a 'conveyor ramp' (see Chapel).

Guardians
Never allow guardians to overlap. See also Notes about animation.

Objects
If you have white background INK, any objects in the room will be automatically collected on entry to the room (see swimming pool).

You can create N objects with the same coordinates, that will result in an objects that is worth as N.

Rope
Do not put anything in the path of a rope, and do not allow an arrow to pass through a rope (especially not a white rope).

Hacked and designed by Arsen Torbarina, Copyright 1997