Jump to content
Jet Set Willy & Manic Miner Community

Too many lives scenario


Spider

Recommended Posts

While looking at something else (different sprite for lives) but that did not quite work out as I intended as it seems not as easy as you'd think to change the sprite properly although I did not look *too* closely at this.

 

Anyway the 'too many lives' scenario generally there are two usual options here:

 

1. Do not display them as per the 'fix'  in the disassembly

2. Change the scoring code to only give them at 100,000 instead of 10,000 (a bit mean?) or reduce the scoring down instead

 

I'd like to suggest an alternative:

 

Option 3. At the code to add a life jump out into a bit of spare space and see how many lives are actually present. Rather than complicate it by jumping back further down the code without adding if there are more than x, simply see if there are more than ideal, reduce it to x instead then return.

 

The advantage of this should be that its slightly simpler and potentially less messy, a simple check of the value of 33879 / #8457 should be enough. If for example (lets say max 7) that contains 6 or more, reduce it by one then return. That way the 'extra add' will only ever take it to 7 in total...

Link to comment
Share on other sites

You could insert an AND #0F just before the LD B, A at #8717.  That way, no more than fifteen remaining lives would be displayed.

 

You'd need to check whether that leaves room for the 'Cheat Mode' Boot sprite - I think it would, but if not, then using an AND #07 would work instead.

 

******

 

Either way, it would require two more bytes to be inserted near the start of the Main Loop, which is quite a tight part of the code.  The simplest way I can think of to do that (with minimal code-shuffling) would be to replace the three-byte command at #8711 with a CALL to a subroutine located elsewhere (e.g. the spare addresses that are filled with source code remnants).

 

Then at the remote location, insert the following six bytes:

 

AND #0F (to bring A within the range 00-0F)

LD HL, #50A0 (to replace the command which was displaced from #8711(

RET

Edited by IRF
Link to comment
Share on other sites

Its similar to what I had (sort of!) thought.

 

I'd planned on where the part of the code starts to add the life, simply jump out elsewhere (there's plenty of free space) and the 'new routine' will check the total and return without if its already too high, if its not then it will do the add then call the screen-flash if needed then return.

 

The existing few bytes of the routine to check it would be empty apart from three bytes to do a 'call' to the new routine. :)

 

I must admit I am having an odd issue with getting it to display a different sprite for lives for some reason, :unsure: but I need to look at this in detail really.

Link to comment
Share on other sites

Its similar to what I had (sort of!) thought.

 

I'd planned on where the part of the code starts to add the life, simply jump out elsewhere (there's plenty of free space) and the 'new routine' will check the total and return without if its already too high, if its not then it will do the add then call the screen-flash if needed then return.

 

The existing few bytes of the routine to check it would be empty apart from three bytes to do a 'call' to the new routine. :)

 

I must admit I am having an odd issue with getting it to display a different sprite for lives for some reason, :unsure: but I need to look at this in detail really.

 

Try the method I suggested, your new subroutine would only need to be six bytes I think.   ;)

 

Alternative sprite - have you tried replacing the value of #8726, from the default '82' to '81'.  That should work, although the sprites picked up in some caverns might look a bit odd. :o

Edited by IRF
Link to comment
Share on other sites

I should point out I have a static sprite to use but that's not an issue as I can (test it) by disabling the piece of code to pick up the note to decide what frame to use, well probably :unsure:

 

I did this once before and it was easy to pick the sprite this time it is being slightly annoying for some reason I'll have another look at it then see if I do need further intervention or otherwise.

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.