The Legend of Zelda [NES] Lost Woods Question

Started by KevvyLava, October 16, 2019, 10:44:46 AM

Previous topic - Next topic

KevvyLava

Hi all, I have a few questions on a LoZ Third Quest I'm making.

* I want to edit the Lost Woods path but the hex editing tips I've seen don't seem to tell the full story. Do I just open the hex editor, locate the value, and then change it to something? I see information here: https://datacrystal.romhacking.net/wiki/The_Legend_of_Zelda:ROM_map ...But I imagine that I have to change the exit path to break out of the maze, etc.?

* Can I eliminate the "secret" chime when going onto the top-right corner of the overworld map?

* I'm using 3 tools to edit the game, including Dungeon Master, Zelda Tech, and Zelda NPC Text Editor.  How do I create the patch in the first place? Obviously I can't just upload the ROM here when I'm done. Is there a program that cross-references the data between the original rom and the modded one and creates the *.ips file or something?

A little info on the project:

The goal was to make a "Third Quest" that didn't depart too strongly from the original game. I took a few liberties with design that would be outside the scope of what the original game did, but not in a way that drastically alters the gameplay, and not in a way that would feel unfair or too difficult. Locations of dungeons, secret money, shops, heart containers, etc. have changed, but the new locations are either in the same physical spots on screens as previous secrets, or they are in obviously-modified areas. But other than that, it's basic Zelda and shouldn't be too much harder than the Second Quest. Maybe easier in some areas. There has been some overworld redesign, but mostly small touches, aside from a few overhauled screens.

-Kevin

redmagejoe

Lunar IPS not only allows you to apply IPS files, but it will create IPS files by cross-referencing the unmodified ROM and your new ROM, spitting out an IPS of the differences.

KevvyLava

Awesome!  I guess for as many times as I used the program to patch, I never considered how it would work otherwise.  But it makes sense, and thank you.  Do you know any resources I could use in order to figure out how to use a hex editor to change the stuff above?  Or do you think it's simple enough where I can do some trial and error and figure it out?  I don't have any meaningful experience using hex editors, but I'm also not an idiot.  I guess I'm somewhere in that middle ground. haha.

redmagejoe

I do all of my edits and patches using hex editors, but I also generally have to rely on other people's disassemblies and experience. TinyHexer is a great tool for comparing an unmodified ROM and a copy of the ROM you'll be manipulating. As for learning how, it's really not so much simple trial and error as it is figuring out where things are in memory and how they work. Having a character tranlsation table helps, especially if you're looking to modify text, as it can help narrow down what you're looking for in ROM.

Beyond that, it seems you've already found a ROM map of what you want to change, so for your specific changes, I'd first look for a disassembly of Legend of Zelda, and peruse it for any areas that mention triggering the chime. It would likely have a documented set of instructions for what specific scenarios demand the chime, and you could change the instruction at the specific scenario you want it disabled on. Likewise, I'm sure that there's some sort of variable or counter that's being manipulated for checking your success in navigating the Lost Woods, so you'd need only find that. What I do once I've traced the assembly instructions down for what I want to change, I simply find the relevant addresses (usually doing a Ctrl+F of the string of hex addresses as presented in the disassembly) and then modify the values necessary.

All of my changes for the Crystalis Sky Tower Exit hack I was working on in the past, I did this way. Sadly, that project requires more time and energy than I have available now, so it's been released as a beta version: http://www.romhacking.net/forum/index.php?topic=27197.0
Still, I did not use any special program to apply my changes and a little trial and error can go a long way so long as you're at least changing things in the right general area of ROM.

KevvyLava

Thank you so much for this thorough response! I actually did some slight trial/error based on the info that I linked above and was able to identify the Lost Woods path.  Once I found 08 02 04 02 in a row near where it said (although I think my rom having a header pushed everything a bit off) I was able to modify the values and set a different path.  As for the chime, I'm going to mess around with it a bit more like how you described.  I just looked up the disassembly of Zelda to, so I can some trial and error on the chime.

I got pretty far into Crystalis at one point many years ago.  Maybe I should revisit that game, eh!

ShadowOne333

I've been doing a lot of Zelda 1 hacking recently due to my Zelda 1 Redux project:
https://www.romhacking.net/forum/index.php?topic=29403.0

What exactly are you trying to do with the Lost Woods sequence?
Remove it, or simply change it?

If all you want to do is simply change it to another sequence, then it's rather easy to do so.
Open the ROM (PRG0) in a hex editor, and go to address 0x06DA7.

Once there, you will see four bytes: [08 02 04 02]
Here's what each one means:
08 = North
04 = South
02 = West
01 = East

As you can see, the sequence is straight forward:
08 (North), 02 (West), 04 (South) and 02 (West) again.
If you want to change it to other sequence, then you simply replace those 4 bytes with whatever you want in order.

If you want to entirely remove it... Then that's another thing on its own :P

KevvyLava

Hey there!  Like I said in my other posting, I just wanted to change the path for that and for the Lost Hills.  My hack is a "Third Quest" so it makes sense that most of the overworld is the same/very similar.  But seeing how easy it is makes it fun to mess with.  Just have to put a character in the game to give the new directions as a hint, etc.

redmagejoe

Quote from: KevvyLava on October 18, 2019, 01:58:58 PM
Hey there!  Like I said in my other posting, I just wanted to change the path for that and for the Lost Hills.  My hack is a "Third Quest" so it makes sense that most of the overworld is the same/very similar.  But seeing how easy it is makes it fun to mess with.  Just have to put a character in the game to give the new directions as a hint, etc.
It may be easiest in this case to cannibalize one of the Old Men's text, finding a hint about something relatively unnecessary and instead changing that to the Lost Woods hint you desire. If you're going to be changing a great deal of things, this works even better if you have the things some of the vanilla hints are pointing to removed or changed anyway.

KevvyLava

Yes, exactly.  I really only need to change the hint for the new Lost Woods path and one hint inside a dungeon.  Other than that, it's pretty straightforward.  I just need to ask the creator of the NPC Text Editor for some help on getting the text to appear correctly.  Other than that, I think the patch is ready for beta testing once I give it one more run-through.  Is the process on here just a matter of posting a new thread saying, "Hey, can some people help me beta test this?" and then once the errors are ironed out, you post it on the site?  I've probably caught 99% of the issues so far.

redmagejoe

It is not uncommon to see a thread pop up on ROM Hacking Discussion asking for playtesters, no. I don't see any reason why you couldn't make such a request. :thumbsup:

KevvyLava

I posted a new thread for anyone to playtest if they're interested.  Just notifying you guys in case you're interested.

Trax

Quote from: ShadowOne333 on October 18, 2019, 01:49:54 PM
If all you want to do is simply change it to another sequence, then it's rather easy to do so.
Open the ROM (PRG0) in a hex editor, and go to address 0x06DA7.

Once there, you will see four bytes: [08 02 04 02]
Here's what each one means:
08 = North
04 = South
02 = West
01 = East

As you can see, the sequence is straight forward:
08 (North), 02 (West), 04 (South) and 02 (West) again.
If you want to change it to other sequence, then you simply replace those 4 bytes with whatever you want in order.

If you want to entirely remove it... Then that's another thing on its own :P

The next 4 bytes are as follow : [08 08 08 08] and it's the sequence for Lost Hills, the screen just below Dungeon 5. Use the same logic for directions. If you change the values in these tables, you must be aware that you may need to change the correct "safe direction" that lets the player leave the screen without activating the secret.

Note: always add 0x10 to the addresses I provide, to account for the ROM header.

Recovery direction for Lost Woods : address is 6DC0, default value is 01 (East)
Recovery direction for Lost Hills : address is 6DD2, default value is 02 (West)

If you want to change the locations on the Overworld of these two special screens, you also have this option:

Location of Lost Woods : address is 6DA7, default value is 61
Location of Lost Hills : address is 6DC9, default value is 1B