Jump to content


Photo

Fix for the 'Nine lives in the light' bug


  • Please log in to reply
8 replies to this topic

#1 IRF

IRF

    Advanced Member

  • Contributor
  • 3,680 posts

Posted 07 March 2017 - 01:18 PM

In 'Solar Power Generator', Miner Willy isn't always killed if he runs out of air supply at a time whilst he is standing in the solar beam:

 

http://skoolkid.gith...LivesInTheLight

 

This is because the 'Solar Power Beam' routine calls up 'Decrease the air supply' as a subroutine eight times in succession (four for each character of Willy's sprite that the beam passes through in a given time-frame), without checking whether the air in the cavern has run out.  As a result, the air supply can 'wrap around' past zero, causing the final character of air on the status bar to be replenished with another eight pixels!

 

Anyway, I've come up with a twelve-POKE fix for this:

 

At #88FC, insert '18 F4 E1'.

 

At #8D89, insert '06 04 C5'.

(Incidentally, the operand '04' is the number of times the Air Supply is depleted by the Solar Beam in the original MM; it could be altered to make the Solar Beam less deadly, or even more so!)

 

[The CALL at #8D8C remains in situ.]

 

Finally, at #8D8F, insert 'C1 CA FE 88 10 F6'.


Edited by IRF, 07 March 2017 - 02:21 PM.


#2 jetsetdanny

jetsetdanny

    Advanced Member

  • Contributor
  • 1,892 posts

Posted 11 March 2017 - 10:51 AM

Interesting, I didn't know about this bug until now. It's also cool to be able to control the lethality of the Solar Beam  :) .


  • IRF likes this

#3 IRF

IRF

    Advanced Member

  • Contributor
  • 3,680 posts

Posted 11 March 2017 - 10:58 AM

I've since noticed that John Elliott came up with a similar method on Yahoo! to control the lethality, although not in the context of fixing the bug.



#4 IRF

IRF

    Advanced Member

  • Contributor
  • 3,680 posts

Posted 18 March 2018 - 09:16 PM

Correct me if I'm wrong, but there is no way in JSWED's GUI to edit the location of the 'entry point' of the solar beam in 'Solar Power Generator', for a file based on the Manic Miner game engine?

 

You can change the start of the beam, but you have to manually adjust the appropriate addresses in the hex editor (namely #8D74-5).

 

In contrast, in a room with a solar beam in a JSW64 game, there is an option to move the beam's starting point within the GUI.



#5 Spider

Spider

    XOR (HL)

  • Administrator
  • 3,207 posts

Posted 19 March 2018 - 11:50 AM

That's correct as far as I'm aware, the 'Extra' cells do not allow this to be moved :)

 

I had to manually move it about in the Mixup project as you're aware as you helped me with the beam (as getting the beam to work made me pull what little hair I had left out! :lol: :unsure:


Changing order to chaos since 1984

#6 IRF

IRF

    Advanced Member

  • Contributor
  • 3,680 posts

Posted 19 March 2018 - 12:24 PM

I've just realised the reason for the difference between MM and JSW64 - in the latter, there is a room offset byte which can specify the low byte of the solar beam's start point (anywhere within the upper half of the room). Whereas in MM, it's set within the game engine - if you had more than one room with a solar beam, then moving it in one would change its position in the other (ditto with Kong and Eugene). So it's 'safer' to make the game designer change the position within the hex editor.

It does mean that in MM, in theory, you can change both low and high bytes of the address, and therefore have a solar beam which starts in the lower half of a cavern - e.g. in Final Barrier, where it could represent light coming in from the outside world as drawn in the top half of the screen!

#7 Spider

Spider

    XOR (HL)

  • Administrator
  • 3,207 posts

Posted 19 March 2018 - 12:33 PM

Helpful (or not) :unsure:
 
http://www.worldofsp....cgi?id=0014610
 
 

This patch program will convert Manic Miner so that you can have the following features:

* Kong beast
* Eugene
* Skylabs
* Vertical guardians
* Solar power

  in any of the rooms.

 As supplied, the patch program contains a standard Manic Miner game; press N to start. If you want to patch a different Manic Miner variant, then press BREAK (CAPS+SPACE) and re-run it (you may need to modify the first few lines since it assumes the standard Manic Miner tape file).

 Once the patch has been applied, the items listed above will be controlled by a room's "border" byte, at 45683 + 1024 * room. The byte is now formed:

Bits 0-2: Border
Bit    3: Solar power
Bit    4: Kong Beast
Bit    5: Room may have vertical guardians
Bit    6: Skylab landing bay (bits 3-5 ignored and assumed to be 0)
Bit    7: Eugene

 In Manic Miner, the only valid combinations are:

(Solar Power + vertical guardians) and (Kong Beast + vertical guardians). As far as I can see, (Solar Power + Eugene) works as well. The others are left as experiments for you to try.

This patch was written against the Bug-Byte engine. I do not know what it will do to the Software Projects version.


Edited by Spider, 19 March 2018 - 12:37 PM.

Changing order to chaos since 1984

#8 IRF

IRF

    Advanced Member

  • Contributor
  • 3,680 posts

Posted 19 March 2018 - 12:43 PM

You can have Eugene with Skylabs, but none of the other specials work alongside Skylabs, because the program enters and exits the Skylab routine via jumps - on the way back to the Main Loop it jumps straight to the CALL to draw portals - rather than a CALL and RET.

#9 IRF

IRF

    Advanced Member

  • Contributor
  • 3,680 posts

Posted 19 March 2018 - 06:46 PM

You can have Eugene with Skylabs


Actually, I take that back - for his graphic, the Eugene routine uses the data from the copy of Eugene's Lair in the cavern buffer (#80E0-#80FF), rather than the original data at #C2E0-#C2FF.

So in other rooms, in order to insert a Eugene you would have to copy the graphic data into the equivalent slot in the primary cavern data (Offsets #2E0-#2FF), meaning that you couldn't also have a vertical guardian or Skylabs (whose definitions occupy the same slots) in the same cavern as Eugene.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users