Parallel Worlds boomerang fix

Go down

20160407

Post 

Parallel Worlds boomerang fix Empty Parallel Worlds boomerang fix




Edit: superskuj provided a proper fix, so I'm replacing my original with his.  Ignore my dirty hack below, this one works.  This version makes the red boomerang chest always give the red boomerang.

Code:
PC 0x03B552: 0x46 -> 0xFF // Red boomerang alt treasure: none


Alternate version.  This version puts the blue boomerang in that chest instead, but makes the red boomerang the alternate treasure for the blue boomerang.  This way, if you miss the blue boomerang, you don't get the red one.  Also, if you somehow managed to get back into the sewers *after* grabbing this chest, then the big chest in the sewers should give you the red boomerang.
Code:
PC 0x00EA87 0x2A -> 0x0C // Chest contains blue boomerang
PC 0x03B534 0x44 -> 0x2A // Blue boomerang alt treasure: red boomerang

Parallel Worlds boomerang fix J1L1aOX
Parallel Worlds boomerang fix NJ2kb5R


Last edited by qwertymodo on Sat 6 Aug 2016 - 17:15; edited 4 times in total
qwertymodo
qwertymodo

Parallel Worlds boomerang fix Image212

Since : 2014-10-21

Back to top Go down

Share this post on: reddit

Parallel Worlds boomerang fix :: Comments

qwertymodo

Post Thu 7 Apr 2016 - 16:44 by qwertymodo

Ok, so I found an issue. Apparently that chest uses the same code as the lantern chest in Zelda's prison cell, so applying this patch allows you to pick up a second lantern. Looks like I have a bit more work to do.

Back to top Go down

qwertymodo

Post Thu 7 Apr 2016 - 18:32 by qwertymodo

Super hacky attempt number 2.  Fixes the boomerang, doesn't break the lantern.  Requires an additional subroutine, located at $21FDB0.  Time for more playtesting.

Code:
$07B5B0  22 B0 FD 21  jsl $21FDB0
$07B5B4  EA           nop
$07B5B5  EA           nop

. . .

$21FDB0  A5 00    lda $00
$21FDB2  C9 41    cmp #$41
$21FDB4  D0 0F    bne $FDC6
$21FDB6  A5 01    lda $01
$21FDB8  C9 F3    cmd #$F3
$21FDBA  D0 09    bne $FDC6
$21FDBC  A5 02    lda $02
$21FDBE  C9 7E    cmp #$7E
$21FDC0  D0 03    bne $FDC5
$21FDC2  A7 00    lda $[00]
$21FDC4  6B       rtl
$21FDC5  A7 00    lda [$00]
$21FDC7  F0 02    beq $FDCB
$21FDC9  A4 03    ldy $03
$21FDCB  6B       rtl

Back to top Go down

qwertymodo

Post Sun 10 Apr 2016 - 17:27 by qwertymodo

I've completed 3 Icy World dungeons, and have about 80% item collection, and so far haven't had any adverse side effects from this patch, so it's looking promising. It's still a super dirty hack though... the real solution would be to fix the chest contents directly instead of hijacking the chest opening code like this, but for now, it's one of those "if it's stupid, but it works, it isn't stupid" kind of things.

Back to top Go down

avatar

Post Mon 11 Apr 2016 - 1:54 by superskuj

Hm couldn't you just change the loot table at 3B538. Specifically the byte at 3B552 represents the red boomerang's alternative, changing it from 46 to FF should remove the alternative.

Back to top Go down

qwertymodo

Post Mon 11 Apr 2016 - 2:07 by qwertymodo

That's what I was getting at in terms of the right way to do it, but I didn't know the right addresses for the loot table, and I'm not able to edit it in HM, so running a debugger was my next best option, and that led me to a code-based fix vs a data-based one. I'll definitely give that a try and report back (time to restart my playthrough yet again...)

Back to top Go down

Conn

Post Mon 11 Apr 2016 - 5:19 by Conn

Great, maybe you can make a fix patch collection one time... I remember a bug when in a cave in iceworld, I think it was a fairy upgrade but am not sure about it, it was years ago. When I used the book mudora to warp to the entrance there the game crashed.

Back to top Go down

Puzzledude

Post Mon 11 Apr 2016 - 7:03 by Puzzledude

superskuj wrote:Hm couldn't you just change the loot table at 3B538. Specifically the byte at 3B552 represents the red boomerang's alternative, changing it from 46 to FF should remove the alternative.
Not really. With this you would just change the content of the chest. You see byte 46 is defined as: Red Boomerang/300 rupees. You can not "turn off" the alternative with this byte alone, you need ASM in order for this to become just Red Boomerang.

You have these two options for chest content regarding boomerangs: either (blue) boomerang or red boomerang/300 rupees. But the game will check for boomerang only. So if you have a blue boomerang, the game will give you 300 rupees, since the original game was not programed to obtain the red boomerang from a chest - so I don't think getting the red boomerang from chest (while having blue boomerang) would even process the upgrade (even if you would turn 300 rupees off with ASM). It is thus better to give the player the Red boomerang as the only boomerang in the game (from one chest only, and that chest needs to be: red boomerang/300 rupees).

Back to top Go down

qwertymodo

Post Mon 11 Apr 2016 - 9:39 by qwertymodo

Thanks puzzledude, that makes sense. Thankfully, red boomerang as upgrade works fine with my patch above. It hijacks the chest opening code at the point where it's trying to figure out if you have what's inside, and if it's checking for the boomerang it just answers no, so it always gives the red boomerang, regardless of whether or not you have the blue one. I tested both with and without the blue boomerang and it gave me the red one just fine. There's no reason the slot has to be empty in order to receive the upgrade, it works the same way as the other upgradable items, just a RAM location with the value 0 = none, 1 = blue, 2 = red, so getting the red one from the chest just sets the value to 2, and it doesn't matter if it was 0 or 1 before. The trick was just in getting it to not pick rupees.

Back to top Go down

Puzzledude

Post Mon 11 Apr 2016 - 10:22 by Puzzledude

qwertymodo wrote:Thanks puzzledude, that makes sense. Thankfully, red boomerang as upgrade works fine with my patch above.
Great. That's good to hear.

Back to top Go down

qwertymodo

Post Mon 11 Apr 2016 - 10:37 by qwertymodo

Yeah, thankfully it's not like the shovel/flute where you have 2 completely different items taking up the same space, it's stored like the sword/shield, so you don't have to remove it from inventory in order to upgrade.

Back to top Go down

avatar

Post Mon 11 Apr 2016 - 14:45 by superskuj

Puzzledude wrote:
superskuj wrote:Hm couldn't you just change the loot table at 3B538. Specifically the byte at 3B552 represents the red boomerang's alternative, changing it from 46 to FF should remove the alternative.
Not really. With this you would just change the content of the chest. You see byte 46 is defined as: Red Boomerang/300 rupees. You can not "turn off" the alternative with this byte alone, you need ASM in order for this to become just Red Boomerang.

You have these two options for chest content regarding boomerangs: either (blue) boomerang or red boomerang/300 rupees. But the game will check for boomerang only. So if you have a blue boomerang, the game will give you 300 rupees, since the original game was not programed to obtain the red boomerang from a chest - so I don't think getting the red boomerang from chest (while having blue boomerang) would even process the upgrade (even if you would turn 300 rupees off with ASM). It is thus better to give the player the Red boomerang as the only boomerang in the game (from one chest only, and that chest needs to be: red boomerang/300 rupees).
I just quickly tested it by placing a blue and red boom in chests in link's house and was able to collect the red after the blue one. The game checks the table first to see if it expects an alternative item before checking if link already has it, if it sees FF it knows there is no alternative and gives link the original item. Only if it sees a defined alternative does it check your inventory first.

Back to top Go down

Puzzledude

Post Mon 11 Apr 2016 - 16:16 by Puzzledude

I just quickly tested it by placing a blue and red boom in chests in link's house and was able to collect the red after the blue one
Really, than this problem is solved than.

Back to top Go down

qwertymodo

Post Mon 11 Apr 2016 - 23:00 by qwertymodo

Quick test here, PC 0x03B552 0x46 -> 0xFF seems to have done the trick. Works with and without the L1 boomerang in inventory. Time to restart the playtest and check for side effects (though I doubt there will be any). Thanks, superskuj Very Happy

Back to top Go down

qwertymodo

Post Sat 6 Aug 2016 - 17:13 by qwertymodo

I had a thought the other day that if you miss the blue boomerang in the sewers, you shouldn't get the red one for free later, so now that chest contains the blue boomerang instead, with the red boomerang set as the alternate treasure, so if you have the blue boomerang you get the red one, but if not you only get the blue.

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum