IRF Posted June 23, 2016 Report Share Posted June 23, 2016 (edited) 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 June 23, 2016 by IRF jetsetdanny and Spider 2 Quote Link to comment Share on other sites More sharing options...
Spider Posted June 23, 2016 Report Share Posted June 23, 2016 :) That's quite a neat fix. IRF 1 Quote Link to comment Share on other sites More sharing options...
IRF Posted June 23, 2016 Author Report Share Posted June 23, 2016 (edited) Although it's one that it might be best not to fix, as it's a useful feature for reducing Infinite Death Scenario falls off the bottom of screens! It took a fair bit of 'unavoidable drudgery' shifting code about to achieve it, too! Edited June 23, 2016 by IRF andrewbroad and Spider 2 Quote Link to comment Share on other sites More sharing options...
jetsetdanny Posted June 24, 2016 Report Share Posted June 24, 2016 Congratulations on this fix, Ian! :) IRF 1 Quote Link to comment Share on other sites More sharing options...
IRF Posted June 24, 2016 Author Report Share Posted June 24, 2016 (edited) 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 June 24, 2016 by IRF jetsetdanny and Spider 2 Quote Link to comment Share on other sites More sharing options...
IRF Posted July 15, 2016 Author Report Share Posted July 15, 2016 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! Spider and jetsetdanny 2 Quote Link to comment Share on other sites More sharing options...
Spider Posted July 15, 2016 Report Share Posted July 15, 2016 The appropriate topics were moved. :) IRF and jetsetdanny 2 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.