IRF Posted April 23, 2016 Author Report Share Posted April 23, 2016 (edited) There is a residual problem with the Bug Fix. I was thinking that a bit of code in the Main Loop might fix it, as follows: Load up the Airborne Status Indicator at #85D1. Check: is it '1' (meaning that 'Willy is jumping')? If not, then reset the Jumping Animation Counter at #85D5 to zero. (But if the Airborne Status Indicator does have a value of 1, then the command which resets the Jump Counter to zero is bypassed via a relative jump.) I have inserted the above (11 bytes) into the Main Loop (replacing the redundant 'Screen Flash Counter' code in the attached file), which has resolved the last remaining 'structural' problem with the patch. There is still plenty of scope for the patch to be made more byte-efficient, though. Or indeed, other options considered (such as Andrew Broad's suggestion). New Bug Fix Final.z80 Edited April 23, 2016 by IRF jetsetdanny 1 Quote Link to comment Share on other sites More sharing options...
IRF Posted April 23, 2016 Author Report Share Posted April 23, 2016 (edited) By Edited April 24, 2016 by IRF Quote Link to comment Share on other sites More sharing options...
IRF Posted April 24, 2016 Author Report Share Posted April 24, 2016 (edited) Scenario 1b is actually present in original JSW in The Forgotten Abbey (jumping from the top of the ramp), and allows Willy to subsequently walk through head-height Earth cells and exit directly onto the conveyor in The Wine Cellar. However, if he doesn't keep the left key pressed until he is clear of the Earth cells on the right-hand edge of The Wine Cellar, then he can get stuck (because of the conveyor and the Earth cells above him), meaning the player has to abandon the game! So it's definitely a bug that's worth fixing - at least in terms of preventing him walking leftwards through Earth cells (a bug which also allows Willy to get stuck in the Dr Jones elephant's head in the original game!) Edited April 24, 2016 by IRF Quote Link to comment Share on other sites More sharing options...
IRF Posted April 24, 2016 Author Report Share Posted April 24, 2016 (edited) I've also tested jumping over the Barrel Guardian in 'Ballroom East', and crossing 'The Banyan Tree' Another observation: In the original game [and with Andrew Broad's suggested alternative patch], both of those routes (when going leftwards) are made considerably easier because the ILB code rapidly speeds up Willy's descent as soon as his head becomes aligned with the Earth cell that sits above the two-cell Air gap into which he is jumping. With my version of the patch in place, the timing of either jump is much more critical, as Willy has to fall at 'normal speed' until he is almost aligned with the gap, before he can proceed forward to land on the 'ledge'. Banyan Tree is particularly difficult (jumping from the ledge between the Cyan Computer Chip and Magenta Gremlin), as he has to 'step back' above the Chip and jump left whilst the Gremlin is still quite high up in the intermediate cavity, in order to safely jump into the gap. Edited April 24, 2016 by IRF Quote Link to comment Share on other sites More sharing options...
IRF Posted April 24, 2016 Author Report Share Posted April 24, 2016 (edited) I think it would be better to check for Earth cells at head height when walking, but not when jumping, as this would retain a spectacular class of quirky features. So the following features would be removed... walking left through Earth cells at head height; walking up through overhead Earth cells on Edited April 26, 2016 by IRF Spider and jetsetdanny 2 Quote Link to comment Share on other sites More sharing options...
IRF Posted April 25, 2016 Author Report Share Posted April 25, 2016 One other point in relation to this Bug Fix - my variant means that Willy is safe from hitting a Fire cell that is embedded between Earth cells above and below it; whilst Andrew Broad's variant means it is possible for Willy to hit such a Fire cell if he jumps from a certain animation-frame. (I've got Hornet's Nest in TNE particularly in mind here, given that the whole screen is a 'honeycomb' of Fire and Earth cells!) jetsetdanny and Spider 2 Quote Link to comment Share on other sites More sharing options...
IRF Posted April 26, 2016 Author Report Share Posted April 26, 2016 (edited) I've implemented the 'Andrew Broad variant' of the 'Don't Mind Your Head Bug Fix', and noticed some other interesting elements of it. Before I go into detail, you might like to try out the following mini-challenge - load up the attached file, then try to collect all the Bathroom taps and exit to Top Landing (without losing any lives). New Bug Fix Andrew variant.z80 Edited April 27, 2016 by IRF Spider and jetsetdanny 2 Quote Link to comment Share on other sites More sharing options...
IRF Posted April 27, 2016 Author Report Share Posted April 27, 2016 (edited) The attached rzx demonstrates the problems with the 'Andrew Broad variant' of the Bug Fix - if Willy is underneath Earth blocks, and walking towards a head-height Earth block, if he holds the Jump key down then he can pass through the latter! It also removes his ability to stand adjacent to a head-height Earth block and jump up onto it - instead, he jumps through it (in either direction)! So I've come up with a 'hybrid' solution which resolves the above, but which retains [for moving left - and adds in the case of rightwards movement] Willy's ability to jump onto ledges underneath Earth blocks, or to quirkily jump through overhead Earth blocks. This was achieved by inserting the following checks when Willy is trying to pass left or right through a cell boundary: (1) firstly, is Willy jumping (is the Airborne Status Indicator at #85D1 set to a value of 01)? If not, check for Earth blocks at head-height (in either direction), and block his progress (or not) accordingly; (2) secondly, has Willy only just started his jump (is the Jumping Animation Counter at #85D5 reset to a value of 00)? If so, check for Earth blocks at head-height (in either direction), and block his progress (or not) accordingly; (3) in all other circumstances, the check for head-height Earth blocks is bypassed. I have implemented the above in the attached 'hybrid fix' Z80 file (the relevant code once again starts at #9700). Starting point set to The Bathroom, with the same layout as in the previous file - you will see that the original Bathroom tap in this test file is now uncollectable! I think we've cracked it this time!! (Except that there is plenty of scope for code optimisation!) New Bug Fix Andrew variant.rzx New Bug Fix Hybrid.z80 Edited December 19, 2016 by IRF andrewbroad 1 Quote Link to comment Share on other sites More sharing options...
jetsetdanny Posted April 27, 2016 Report Share Posted April 27, 2016 Very interesting! :) Quote Link to comment Share on other sites More sharing options...
IRF Posted May 2, 2016 Author Report Share Posted May 2, 2016 (edited) I think we've cracked it this time!! (Except that there is plenty of scope for code optimisation!) Case in point: On two occasions I used a two-byte 'FE 00' (Compare with zero) command, whereas a single-byte 'B7' (OR A) instruction achieves the same thing! Edited May 2, 2016 by IRF andrewbroad 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.