11 March 2016 - Forum Rules

Main Menu

Zelda 2 - Palace Pointers

Started by matal3a0, February 05, 2016, 08:43:25 AM

Previous topic - Next topic


I'm working on an cross-platform overworld-editor for Zelda 2. Currently I am able to edit the map and locations of caves, towns etc.
But when it comes to editing the locations of the palaces, I'm stuck on the part with the pointers which put a mountain-tile in place of the palace, when the palace has been cleared.
I found lots of great information on

479F - Palace 1 (value 0x18)
47A1 - Palace 2 (value 0x76)
47A3 - Palace 3 (value 0xEA)

For example: The table refers to adress 0x479F  as the offset for Palace 1. I can successfully edit this and move the palace a little bit, so that the offset matches the new location.
But when it comes to the second and third palace, the offset isn't enough. I've tried calculating with the surrounding values, but to no avail..

From my calculations, I would need
Palace 2 0x174
Palace 3 0x2e6
Which is bigger than one byte can contain..

Has anybody worked with this, any ideas?
I've tried looking at but I'm unable to interpret the code..


Your reasoning is correct, but your only mistake is that you are trying to make your calculation based on only one of the 2 bytes that compose the pointers. Here's the exact documentation:

478F: Pointer table for Palaces offsets in Saved RAM (4 * 2 = 8 bytes)

187C -> 7C18   Palace 1
767D -> 7D76   Palace 2
EA7E -> 7EEA   Palace 3
A67D -> 7DA6   Palace 4 (in Death Mountain)

If you do the subtraction with the base offset 7C00, you get:

7C18 - 7C00 = 18
7D76 - 7C00 = 176
7EEA - 7C00 = 2EA
7DA6 - 7C00 = 1A6

If you add these values to their respective base offset of the Overworld map data (West Hyrule or Death Mountain), you fall on the value 02 every time. By the way, I'm the author of the documentation you got this information from, so I can pretty much answer any question on its contents...


Just want to show my support for a Zelda2 editor!

Hopefully this project will expand over time and include dungeons and towns as well?



Thank you very much Trax for the clarification, this will probably solve my issues.

And thanks dACE for the support. Time will tell how much further this will go. But a "full featured" overworld editor is the first goal.
I'm writing in Python, and this is my first real program in Python, so development is rather slow. And as I learn more, I go back and rewrite some portions.

I'll make everything available on this the Utilities-page when it's ready for some sort of release. In the mean time you can have a look at github

Thanks again, I'll probably be back with more questions ;)


Just wondering how this is coming along as im very interested in Zelda 2 editing tools being created. Hope you haven't giving up on this project.


It's moving forward :)
You can follow the thread under Personal Projects,21273.0.html