Jump to content
Jet Set Willy & Manic Miner Community

'Long Distance Nasties' Bug Fix


IRF

Recommended Posts

See the attached file - I have added five bytes to the 'Set Willy's attributes' routine, immediately after the ADD HL, DE command which - prior to the code changes - used to be at #9614.

 

The five bytes in question are:

 

7C       -    LD A, H

FE 5E  -   CP #5E

30 07   -   JR NC 07

 

The effect of this intervention is to disable the 'bug/quirky feature' that causes Willy to die if he tries to fall off the bottom of a screen which has a Fire cell located above him at the top of the screen.

 

The starting point in the file is set to A Bit of Tree, and I have inserted a Fire cell nearby to demonstrate that falling onto a Fire cell within a screen still kills Willy as per usual.

 

However, if you jump Willy up to the screen above, Under the Roof, and then walk rightwards off the platform that he lands on, you will see that he falls off the bottom of Under the Roof without being killed by the Fire cells at the top of that screen due to the 'bug' - only to land (repeatedly!) onto the newly-inserted Fire cell in A Bit of Tree!

under roof fall test.z80

Edited by IRF
Link to comment
Share on other sites

I thought it could be done with four bytes, so in the file attached above I shifted the four bytes that reset the 'tick' counter when Willy reaches the toilet at the end of the game.

 

Unfortunately (and rather annoyingly!) that didn't work, so I had to consolidate one more byte, which I acquired from the 'Draw Willy to the screen buffer' routine:  There are four bytes which ensure that 'Flying Pig Willy' moves forwards in The Nightmare Room (they are NOPped out in JSW The Nightmare Edition, so that Flying Pig Willy moves backwards); in the attached file I used one of those (and NOPped out the other three).

 

So I had to apply consolidation in two directions to achieve the fix (from 'above' and from 'below'), and then ensure that all the relative and absolute jumps were in order.  But I got there in the end!

Edited by IRF
Link to comment
Share on other sites

  • 3 weeks later...

Andy, I believe it would be more appropriate if this topic was located in the 'JSW' rather than 'Remakes' category (along with topics on other Bug Fixes that we've created there), what do you think?  Could it be moved?

 

Also, I've just noticed that Richard (SkoolKid) provided an even more efficient way of fixing the bug in his disassembly:

 

http://skoolkid.github.io/jetsetwilly/reference/bugs.html#longDistanceNasties

 

I think if it was inserted via consolidation, then only four bytes would need to be found, which could be done by raiding either the Toilet code or the Flying Pig code - it wouldn't be necessary to do both!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.