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: 6842
Author: john_elliott_uk
Date: 13/04/2015
Subject: Re: Question about inserting patch vectors in JSW64
It is possible; you just have to adapt the code a bit. Here's an example with the Off Licence in variant V:
At 1:#C0FB: #00 #81 (room setup patch vector to #8100)
At 1:#C100: #dd #21 #0d #81 #11 #6c #70 #0e #10 #cd #80 #96 #c9
At 1:#C10D: Ascii 'TestTestTestTest'
The machine code bytes disassemble as:
LD IX, #810D ; Where the bytes at #C10D end up
LD DE, #706C ; Coordinates for the roof of the Off Licence: row=3 column=12.
LD C, #10 ; Length of string
CALL #9680 ; Draw text
RET
Note that the code draws into the room bitmap at #7000, not the screen at #4000. It also only draws text, so the colours are picked up from whatever cells are present in the room definition. In the Off Licence, this means text drawn on Air is not visible (though it'll still kill Willy if a guardian should hit it).
