Jump to content
Jet Set Willy & Manic Miner Community

Moving the air bar


Spider

Recommended Posts

Are there any MM variants with the 'air' bar in a different location ? :unsure:

 

It does not (at first glance) appear that simple to move it as its using the game clock to set the LSB and / or the MSB

 

The MSB is set at 34517 to 82

 

I did do this once quite a long time ago but I can't quite remember how exactly. Just wondered if there are any games with it in a slightly different place. I need to shift it down one row as such. I've not spent a lot of time looking** however as there may be a game already with it done to look at

 

**apart from a few tweaks as if you attempt to adjust the values without care you can cause a crash too but that's partly expected as it will attempt to 'draw' where it should not.

 

Link to comment
Share on other sites

It isn't the #52 at #86D6 which you need to change.  That just determines the height of the air supply pixel-rows within the chosen character-row.

 

I think you would need to do the following:

 

At #86DA: replace the #24 with #44

At #86DC: replace the #25 with #45

At #86E2: replace the #24 with #44

At #8A4C: replace the #24 with #44

 

Then in each individual cavern definition, add #20 to the relevant Offset Byte (#xBC, where x = 2,6,A or E). e.g. For the Central Cavern, edit #B2BC to replace the value #3F with #5F.

 

******

 

Warning: That might do odd things to the sound effect when the remaining air supply is counted down after Willy has completed a cavern!

 

If you wanted to preserve the sound effect, then I suspect you would have to insert a SUB A, #20 immediately before the CPL instruction at #90D1.

 

Fortunately, I have just identified two inefficiencies in the vicinity of that part of Matthew's code, which would free up the necessary two bytes to allow you to insert the SUB A, #20 with minimal code-shuffling:

 

- At #90D4, there is a two-byte RLC A command which could be replaced with a single-byte RLCA;

- At #90D7, there is a two-byte LD A, #00 command which could be replaced with a single-byte XOR A.  (Don't forget to adjust the operand of the relative jump at #90E6 accordingly.)

 

******

 

Er, good luck!!!

Link to comment
Share on other sites

Thanks. I'll have a play with this later. Its more complex that it first appeared though as the MSB for the display is set at 34517 LDA,82 and there's some minor sub going on. I really should just put a few breakpoints into that routine and the one around 35388 to determine exactly what is going on.

 

I'll try your code shortly to see. I have a 'quick test' file which simply has all the lower screen area set to black paper / white ink on all of it so its very easy to see where exactly its 'drawing'

 

I did have it drawing attribute blocks on the playing area at one point due to too high an MSB which then caused some concerns. :D

Link to comment
Share on other sites

Very quick test and it worked :D Thank you.

 

I 'forgot' the cavern supply one first which resulted in a near full lower third of air bar, but once I'd applied that and reset it was straightforward. Quick pic:

 

airbar.gif

 

More about why I wanted to do this over the next few days. Its not what you may think though. :)

Link to comment
Share on other sites

Did you apply the fix for the sound effect, when Willy clears a cavern?

 

And I should emphasise: you'd have to change the value of the appropriate Offset Byte in the data for all twenty caverns, not just for Central Cavern.

No not tried the sound effects yet. :)

 

Yes understood as its the 'supply' for the room:

The next byte is copied to 32956 and specifies the initial air supply in the cavern.
45756     DEFB 63

That's from the Central Cavern but I see exactly what to do with those anyway :thumbsup: In decimal I'm changing the 'supply' byte to 95. Simples (famous last words!)

Edited by Spider
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.