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: 6904
Author: jetsetdanny
Date: 07/09/2016
Subject: J. G. Harston's extension allowing more than 64 rooms in JSW48
This is really a question to Jonathan, or anyone else who can reply with certainty.
On his website, Jonathan Graham Harston discusses his extension, which allows the JSW48 game engine to handle more than 64 rooms.
He says,
---
JSW48 uses 6-bit room numbers, giving rooms 0 to 63, with room 0 in memory at &C000. However, the only place where this is fixed is the code that fetches a room into the room buffer and the object location table. The current room variable and the room exits in the room data are all 8-bit values.
This patches the code to allow 7-bit room numbers to increase the number of rooms that can be used. Rooms.hex is an Intel Hex patchfile that can be applied to the original JSW48 game engine.
The room fetching code uses OR &C0 to map a room number from 0 to 63 to an address from &C0xx to &FFxx. This could be changed to ADD &C0 to use the whole 8-bit value, mapping rooms 192 to 255 to the spare memory within the code. I chose to change it to XOR &C0, as this maps the spare memory to rooms 64 to 127, running on from the existing 0 to 63. Also, a 7-bit room number is easier to fit into an extended object table.
Patching with POKE 35093,238 gives the following change:
Original code: Changed to:
8912 3A 20 84 LD A,(&8420) 8912 3A 20 84 LD A,(&8420)
8915 F6 C0 OR &C0 8915 EE C0 XOR &C0
This gives 8-bit room numbers, mapped to the following areas of memory:
Room numbers Memory
0 - 63 &C000 - &FFFF
64 - 127 &8000 - &BFFF
128 - 192 &4000 - &7FFF
192 - 255 &0000 - &3FFF
---
I have to admit this description is a little confusing to me and so my question is:
Does POKE 35093,238 make the game engine use 7-bit room numbers or 8-bit room numbers?
I need this clarification for the Readme file accompanying the Special Edition of "Willy's New Mansion" (to be released soon).
Jonathan's extension is used in this game, which features two rooms more than the Original Edition (66 in total). It has been used in the past in "Willy's Hoard" (75 rooms, an all-time high for a JSW48 game so far), the Final Edition of Steve Worek's "Jet Set Emily: Baby on the Go" (71 rooms) and "Jet Set Willy: The Nightmare Edition" (65 rooms).
Thanks for your invention, Jonathan!
