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: 6254
Author: dm_boozefreek
Date: 04/09/2007
Subject: Re: Tweaking the JSW engine: One for the experts
Sorry for carrying this on :)
But I figured I'd hijack this chain of messages anyway, as others may
be interested in it anyway.
I've been fiddling with patches a lot tonight just for fun as I enjoy
fiddling basically, and it was a welcome break from editing "The Man
Who Sold the World" (Will I ever finish it hahaha). Anyway I think I
asked a while ago about this particular patch.
It's a Geoff Eddy patch from the screen "Willys Doppleganger"
from "ZX Willy the Bug Slayer". I always wanted to do a patch like
this and when Geoff released this game a few years back I was super
happy and tried to steal it for a JSW 48k but couldn't get it
working. I have not too many probs patching JSW 64 though. Now I
already know I can put this patch into a JSW 64 room.
Taken directly from Geoff Eddys' patch dissassemblies:
; room 15 [Doppelganger]
9784 1E80 LD E, #80 ; signify other half of screen
9786 0E01 LD C, #01 ; "die if we touch something"
9788 CD3B96 CALL #963B ; print doppelganger
978B C2B790 JP NZ, #90B7 ; die if somethingh is touched
978E C9 RET ; otherwise exit
But it's the extra code I want to know about?
; rewritten "draw Willy" code so that this works
9637 1E00 LD E, #00
9639 0E00 LD C, #00
963B 3ACF85 LD A, (#85CF)
963E 80 ADD B
963F AB XOR E
9640 2682 LD H, #82
9642 6F LD L, A
9643 23 INC HL
9644 7E LD A, (HL)
9645 2B DEC HL
9646 6E LD L, (HL)
9647 67 LD H, A
9648 3AD385 LD A, (#85D3)
964B E61F AND #1F
964D 85 ADD L
964E 6F LD L, A
964F 3AD285 LD A, (#85D2)
9652 E603 AND #03
9654 0F RRCA
9655 0F RRCA
9656 5F LD E, A
9657 3ADE80 LD A, (#80DE)
965A 47 LD B, A
965B 3AD085 LD A, (#85D0)
965E CB10 RL B
9660 3804 JR C, #9666
9662 CB10 RL B
9664 1807 JR #966D
9666 CB10 RL B
9668 3802 JR C, #966C
966A EE01 XOR #01
966C 1F RRA
966D CB1B RR E
966F 3AED80 LD A, (#80ED)
9672 57 LD D, A
9673 C35694 JP #9456
I'd like to know would it be safe to modify the "Draw Willy routine"
in JSW64, or is the memory located in different places? Or will this
be OK in theory but overwrite the code from another part of the
program?
Questions, questions :)
Any help will be most appreciated
Cheers
DrUnKeN mAsTeR!!!
