Jump to content
Jet Set Willy & Manic Miner Community

Willy disassemblies in hexadecimal


SkoolKid

Recommended Posts

And another suggestion for your TODO list - you could mention the fact that the 'Don't Mind Your Head' Bug can cause Willy to get stuck inside Earth cells (in at least two places that I can think of, namely Dr Jones... and The Wine Cellar, via The Forgotten Abbey) - forcing the player to abandon the game!

 

Ian, I believe the fact that Willy gets stuck in this particular place is related to the conveyor. If there was no conveyor there (or if it had a different direction), Willy wouldn't get stuck (he could always walk left).

Link to comment
Share on other sites

Ian, I believe the fact that Willy gets stuck in this particular place is related to the conveyor. If there was no conveyor there (or if it had a different direction), Willy wouldn't get stuck (he could always walk left).

Indeed! Or you could blame the fact that there are Earth cells overhead.  So it's the culmination of a number of elements.  But I'd rather fix the Left bug (thus preventing him from getting into the situation in the first place) than remove the conveyor (or the wall)!

Edited by IRF
Link to comment
Share on other sites

By the way, the reason for the mismatch you've noticed is that the check for nasty/fire cells below Willy takes place after his y-coordinate has been updated but before his x-coordinate has been updated. In other words, the code is looking for danger at (x-1,y) instead of (x,y) (where (x,y) are Willy's new coordinates).

The above also explains the asymmetry of jumping over Fire cells. If Willy jumps over a Fire cell and lands too close, he can't just turn around and perform the jump in the opposite direction, as you might expect. And if two Fire cells are placed three columns apart, he can't jump them in turn without stepping back towards the first one in order to clear the second.

Link to comment
Share on other sites

I'm wondering if one such unintended consequence might be to prevent Willy from being able to jump through a ramp?  (I'm not sure about that though.)

Having thought some more about this, I don't think progressing both x- and y- coordinates before checking for underfoot cells would prevent Willy from jumping through a Ramp, but it might mean that he falls straight through the Ramp, rather than getting caught on the 'inside' of it and being able to walk through...

 

EDIT: Actually, he can do that anyway with the existing code if he starts at the bottom of the ramp.  If he then turns around and jumps back though (jumping from the inside of the ramp), he doesn't jump straight through to the outside, but gets caught on the ramp - another illustration of the asymmetry of the way jumps are determined by the game engine!

Edited by IRF
Link to comment
Share on other sites

This is an interesting phenomenon - if you NOP out the bytes at #8E4E and #8E55 (relative jumps associated with checks for a Fire cell underneath Willy's sprite*), then Willy can bounce off a Fire cell into a second forwards jump without being killed!  It doesn't work if the second jump is vertical though!  And it only occurs if his frame of animation is such that he's about to cross a cell-column boundary when his attributes (though not his on-screen sprite) become cell-row aligned.

 

See the attached rzx recording - after a successful 'bounce' in each direction, I pressed the jump straight up key when Willy was coming in to land between the pillows, and he was killed (hence he jumps straight up at the start of his next life, because 'jump' was still depressed; after that I jumped across and let go, which of course had the same fatal consequence).

 

(*This is how the checks are described in the SkoolKit disassembly, although in light of recent discussions I don't think it's strictly accurate to refer to the cells "below Willy's sprite" - the vertical position of his attributes and his sprite drawn on the screen are out of sync!)

Fire Bounce.rzx

Link to comment
Share on other sites

You're right - I hadn't noticed that before. I'll update the images and description in 'Through the wall' accordingly. Thanks!

 

By the way, the reason for the mismatch you've noticed is that the check for nasty/fire cells below Willy takes place after his y-coordinate has been updated but before his x-coordinate has been updated. In other words, the code is looking for danger at (x-1,y) instead of (x,y) (where (x,y) are Willy's new coordinates).

Actually, it's kind of the other way round - the 'entry point' for a jump (the check for whether the jump key is being pressed) is in 'Move Willy (2)', and so during a jump Willy's x-coordinate is incremented first (via 'Move Willy (3)'), then we return to the Main Loop and Willy's new position is drawn, then in the next pass through the main loop we reach 'Move Willy (1)' and his y-coordinate is incremented for the first time, followed by the check for Fire cells before he is drawn again.

 

And I think I've come up with the reason why this is the case - there isn't actually a check in the code for overhead Earth cells that stops Willy from jumping up through them. Instead, he is moved upwards by one increment and then, if either of his upper cells coincides with an Earth block, he is immediately brought back down again by the code at #8EBC (the same code that causes the 'Innocent-Looking Block' effect). Now, if Willy's sprite was drawn on the screen at the updated y-coordinate before that check took place, then when walking through a cavity that is two cell-rows high with the jump key depressed, Willy would appear to repeatedly jump up into the Earth cells above (by half a cell height) before falling back down each time.

 

So the order of the routines, as laid out in the first paragraph above, prevents the quirky effect described in the second paragraph from being seen (although it is taking place 'behind the scenes').

Edited by IRF
Link to comment
Share on other sites

Ian, I believe the fact that Willy gets stuck in this particular place is related to the conveyor. If there was no conveyor there (or if it had a different direction), Willy wouldn't get stuck (he could always walk left).

 

I should point out that there is no conveyor nearby that can be blamed for the occurrence of the bug in Dr Jones...

Dr Jones Bug.rzx

Edited by IRF
Link to comment
Share on other sites

Richard, here is a small suggestion for your JSW disassembly 'to-do' list: in the entry for Willy's direction and movement flags
http://skoolkit.ca/disassemblies/jet_set_willy/asm/34256.html
perhaps you could add a comment that it is "Updated by the routine at 36307"?

This would be in accordance with the format of most of the other entries for the game variables, and I think it would help the reader to understand why Willy can walk against the flow of a conveyor when he jumps onto it, but cannot do so when he falls onto it.

Edited by IRF
Link to comment
Share on other sites

I should point out that there is no conveyor nearby that can be blamed for the occurrence of the bug in Dr Jones...

 

There is no conveyor, but there is an Earth cell at the height of the lower part of Willy's body, which prevents Willy from moving on to the left. If that particular Earth cell wasn't there, Willy could move left (he would then get killed by the Fire cell below, but you couldn't claim that Willy gets stuck because of the bug).

Link to comment
Share on other sites

There is no conveyor, but there is an Earth cell at the height of the lower part of Willy's body, which prevents Willy from moving on to the left. If that particular Earth cell wasn't there, Willy could move left (he would then get killed by the Fire cell below, but you couldn't claim that Willy gets stuck because of the bug).

 

Once again, I'd beg to differ.  You could equally blame the cells under his feet for not being Air cells for the reason he gets stuck?  That would be ridiculous!  The fundamental reason he gets stuck is because a bug allows him to progress (against the natural laws of physics) into Earth blocks, but only in one direction!

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.