News: 11 March 2016 - Forum Rules
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia, Danke

Author Topic: Zelda - A Link to the Past - Starter Patches  (Read 5226 times)

SunGodPortal

  • Hero Member
  • *****
  • Posts: 2917
  • 2 + 2 = 5
    • View Profile
Zelda - A Link to the Past - Starter Patches
« on: January 26, 2016, 02:09:38 am »
Here are 4 patches designed to make beginning a hack of The Legend of Zelda: A Link to the Past just a little bit easier. Hacking this game will never be easy, but hopefully with these patches the initial learning curve will be just a little less fatal to some. Four different version of this patch have been included. Each one modifies either the initial SRAM or how the game develops. Choose the one that best suits your needs and apply it to an unmodified US ALttP ROM without a header.

Zelda - A Link to the Past Starter Patches

01-27-16: Patches updated to correct a mistake that was due to some of my files being mislabeled.

What does this do?

**Expands the ROM to 2MB and changes the final byte to FF

This is to make room for additional code (like if you need to re-point, rewrite and expand the list of rooms with holes that damage the player) and to help prevent Hyrule Magic from giving your ROM an unusual file size when it has to tack extra data just beyond the normal end point but is too stupid to expand the ROM for you. That could cause problems with certain emulators and real hardware.

**First save in Hyrule Magic already done

This is something that needs to be done before you start making changes but it is easy to overlook and those new to hacking the game will have no idea that it even needs to be done. When you make your first save in HM it rearranges some of the data to make it slightly more conducive to editing. Not doing this first can have disastrous consequences.

**Room header data relocated to 120000

If you have the most recent version of HM you can have it move and expand the room header data. Again, most people don't realize how necessary this is and will likely run into additional problems if they don't do this.

**Dungeon item data emptied via hex editor

Hyrule Magic is too stupid to do this properly so is has been done for you. Not doing this will make it easier for HM to destroy your ROM once too many things are added.

**Overworld item data emptied via hex editor

Same as above, but applies to the overworld items. The same risk applies. Once HM bugs your items data, saving in certain situations can ruin your ROM.


Four different versions?
There are four different versions to choose from. The difference is how the game proceeds or what a new save file includes.

1) Normal start: The game starts and proceeds as it normally does. You wake up in your uncles house, proceed to rescue Zelda and once that is accomplished the game moves on into the pendant phase.

2) Skip pendant phase: This starts like normal, but once Zelda is rescued the game automatically skips to the crystal phase. This is useful if you do not wish to include the pendant phase in your game.

3) When creating a new save file this will skip the opening rescue mission and start directly in the pendant phase. The player also starts with your uncle's sword and shield. This is good if you want to immediately begin testing your dungeon designs from a fresh save file without having to do the rescue mission every single time.

4) When creating a new save file the game will skip both the opening rescue mission and the pendant phase. The player also starts with the Master Sword and Fire Shield. Like the previous patch, this is good if you want to immediately begin testing your dungeon designs from a fresh save file without having to do the rescue mission every single time.

Note: If at any point you need to undo the custom start from options 3 + 4, just go to 65C5A in a hex editor and change 20 B1 FF > A0 00 00.


Additional Resources:

Hyrule Magic
The only gig in town...

Orochimaru's Zelda III Hacking Compendium v1.84
Ridiculously extensive guide to Zelda III hacking. In need of editing (I'm in the middle of that task) but still a life saver. Mostly serves as a manual for Hyrule Magic but also has a lot of other useful things like the hex info for bug fixes and stuff.

Zcompress
Used to extracted and reinsert the compressed graphics data from ALttP. New version no longer requires a header.

Hyrule Add-Ons
Can be used to edit things like enemy HP and whatnot. Old version, still requires header. :P


Well, good luck.

PS: Don't for get about Zeldix.net

**I put this in the projects section because it is a project of mine to make Zelda III hacking more accessible to the community. But who knows, it may belong in the ROM hacking section**
« Last Edit: January 27, 2016, 03:25:10 pm by SunGodPortal »
War is Peace. Freedom is Slavery. Ignorance is Strength.

ShadowOne333

  • Hero Member
  • *****
  • Posts: 1512
    • View Profile
Re: Zelda - A Link to the Past - Starter Patches
« Reply #1 on: January 26, 2016, 10:40:11 am »
One thing that still seems to be missing from many editors is the option to edit the Credits text.
I am currently screwing around with it and found out that  the Japanese and English versions have some changes to them, like Loyal Priest to Loyal Sage, Ocarina boy to Flute boy.

It starts at $074150

Also, it seems like the you are limited to input the same amount of characters or else the credits will crash.
I am still looking for a workaround so I can implement the japanese names/variants into the credits.

InvisibleCoinBlock

  • Jr. Member
  • **
  • Posts: 5
    • View Profile
Re: Zelda - A Link to the Past - Starter Patches
« Reply #2 on: January 26, 2016, 02:40:58 pm »
Hacking this game will never be easy....

A finished version of Black Magic wouldn't hurt.

 :'(

SunGodPortal

  • Hero Member
  • *****
  • Posts: 2917
  • 2 + 2 = 5
    • View Profile
Re: Zelda - A Link to the Past - Starter Patches
« Reply #3 on: January 26, 2016, 06:06:23 pm »
Quote
Also, it seems like the you are limited to input the same amount of characters or else the credits will crash.
I am still looking for a workaround so I can implement the japanese names/variants into the credits.

Have you examined the same entries in the Japanese ROM? Perhaps that might give you a hint as to how this might be possible. I would think the table(s) would be the same for this font since it isn't used in the rest of the game (where there would def be a difference in the table for the Japanese font).

Quote
A finished version of Black Magic wouldn't hurt.

Maybe we'll get it by the time we find the Loch Ness monster or Chupacabra. :P

People should still try though. It's not as bad as it sounds once you know what you're doing. It's fairly reliable after that. Except for when this happens:

Spoiler:

But I've only had that happen once to me personally and I've been using it for at least a year. That's not the only bug I've ran into though. Learning to use Hyrule Magic will def teach you the importance of keeping backups. LOL At times I think working with HM requires super-human patience and dedication, but really the biggest part is the learning curve associated with designing dungeons (and learning to edit such a complex game in general). Sure, there are things that could be better designed when it comes to the editor, but I guess there's probably a limit to how simple you can make building dungeons where every room could potentially be 2 or 3 layers deep and made from dozens of overlapping/inter-locking pieces.
War is Peace. Freedom is Slavery. Ignorance is Strength.

Grimlock

  • Sr. Member
  • ****
  • Posts: 366
  • Graphics Artist, Level Designer
    • View Profile
Re: Zelda - A Link to the Past - Starter Patches
« Reply #4 on: January 26, 2016, 06:56:37 pm »
Working on a Link to the past project has always sounded appealing to me.  Unfortunately due to the state of Hyrule Magic (as I understand it to be) I'll probably never pursue it.  I would want to completely rework the over world, dungeons, storyline, and most of the graphics  With as much as I would want to do I'm sure Hyrule Magic's tendency to break things would just set me up for some serious frustration and probably a corrupted dead end.  There's a lot of other great games to work with so I'll most likely take my time elsewhere.  I think your patches are a great idea though, if I decided to move forward with a project I'd definitely look at using them.  It would be great to see patches like these released for other games also.

SunGodPortal

  • Hero Member
  • *****
  • Posts: 2917
  • 2 + 2 = 5
    • View Profile
Re: Zelda - A Link to the Past - Starter Patches
« Reply #5 on: January 26, 2016, 08:01:52 pm »
Quote
Working on a Link to the past project has always sounded appealing to me.  Unfortunately due to the state of Hyrule Magic (as I understand it to be) I'll probably never pursue it.  I would want to completely rework the over world, dungeons, storyline, and most of the graphics.

The graphics can be edited outside of HM and its related features are safe (though if you want to use the import features without palette issues you need to use something old like Paint Shop Pro 9). The palette editor from my experience is completely safe and rather handy. Some entries could be better labled though. Your imagination is the limit here. I copied this from the screenshots thread. It's from an ALttP hack in the works (Conker's High Rule Tail):




The overworld editor is safe (except for what the patches above help address) and very well designed apart from one or two things that annoy me about the block selector.

The dialogue editor does have at least one bug that I know of, but that can be fixed by replacing the two bytes that it overwrites in error. Only problem is that it doesn't warn you of spill-over. Dialogue is easy to test though if you are clever:

1) Set aside a ROM specifically for testing with a new save in slot 1. NEVER USE SAVE STATES FOR THIS!! It won't work. The dialogue will appear corrupted after any editing.
2) Write your text and place it in entry #31 (the very first text in the game, when Link is in bed) in the "monologue" editor, set and save.
3) Open your ROM, fast-forward through the title screen and choose your save file. With everything set up right you can test your text within 5 seconds of saving.
4) Once you have it how you want it, cut and paste it into the proper slot of your master ROM.

The story options are limited to how creative you can get with the existing sequences combined with things like the variations I have listed above OR how much ASM you want to do. Either way, you have plenty of options.

The dungeon editor is a different story. It seems to be one of the worst features. Some of the functions are very strangely mapped (key wise) and there's an invisible limit to how much you can add or remove without destabilzing (all of) the room data. You get a feel for it after a while though. It's also not wise to make very many changes to second set of rooms (rooms 256 and up) because I'm guessing that said data is really close to some other stuff that can be over-written/corrupted. Those rooms are less useful anyway because by design they lack some of the features of the first set of rooms (0-255). Dealing with doors is incredibly frustrating because there are dozens of types and they all look the same. You never know what type to use unless you open another copy of HM and browse through a vanilla ROM looking for examples (until you have done it enough to know from experience).

A good thing about editing dungeons in this game is that there are two groups of "rooms". The first has 256 areas that are the size of 4 rooms (quadrants) and they're all on one huge global grid. That means that you can make the dungeons as big as you want, basically. If you want one huge dungeon that has 1,024 rooms, it's entirely possible.

Quote
With as much as I would want to do I'm sure Hyrule Magic's tendency to break things would just set me up for some serious frustration and probably a corrupted dead end.

I recently started building a new version of Bruce Campbell vs Ganon from a clean, unaltered ROM. I've spent about 25-30 hours on it, made about 10 backups and have yet to break a ROM on this project or encounter a bug because I know what I'm doing now. It really isn't as bad as it sounds once you get used to certain things and know what to expect. You just have to go into it knowing that in the beginning you aren't going to have a feel for what you should and shouldn't do and will therefore have to accept that destroying ROMs is inevitable until you do.

All of this may not change your mind, but I figured I would explain it all in case it might change someone else's. This thread is kinda like my campaign to bring more hackers into this game. With no Black Magic and without someone making this sort of effort the days of hacking this game are numbered.
War is Peace. Freedom is Slavery. Ignorance is Strength.

InvisibleCoinBlock

  • Jr. Member
  • **
  • Posts: 5
    • View Profile
Re: Zelda - A Link to the Past - Starter Patches
« Reply #6 on: January 26, 2016, 08:40:18 pm »
One of my biggest complaints with HM is the overworld editor is in 32x32 chunks. Every other editor is 16x16, and it's seriously frustrating to be limited by set blocks of 32x32. Dungeons freaking out is also :banghead: annoying.

It seems like there's not any good editors for a top down SNES action adventure game, which is unfortunate, especially since it's freaking 2016! SOMEDIT is maybe not dead. Hyrule Magic is dead as far as development goes, and is pretty frustrating for a lot of people, but at least GaiaTheCreator looks really promising!

If there was a good, well working, well supported Z3 editor, I think we'd see some fantastic hacks. I'd love to see a community like SMWcentral but for Z3, people making new sprites, new patches, fun adventures, etc. Zeldix.net exists, but it'll never reach its potential with the tools we have now.

MathOnNapkins, please save Hyrule!  ;D


SunGodPortal

  • Hero Member
  • *****
  • Posts: 2917
  • 2 + 2 = 5
    • View Profile
Re: Zelda - A Link to the Past - Starter Patches
« Reply #7 on: January 26, 2016, 09:15:07 pm »
Quote
One of my biggest complaints with HM is the overworld editor is in 32x32 chunks. Every other editor is 16x16, and it's seriously frustrating to be limited by set blocks of 32x32.

I haven't studied that part of the ROM, but I'm guessing that it is such because the game stores it that way (as 4x4 block configurations consisting of 8x8 tiles). Either way, it's easy to customize these blocks once you figure out how. In fact, I made this list regarding the blocks in the block selector that others may find handy.

Spoiler:
GFX 33
0000-0336
0983-1139

GFX 34
0337-0982
1140-1415

GFX 35
2021-2272
2819-3088
3518-3578

GFX 36
2273-2514
3089-3220

GFX 37
2582-2818
3221-3517

GFX 39
2515-2581
1416-1613
3579-3661
3912-4064
4309-4401

GFX 41
1614-2020

GFX 43
3662-3911
4065-4308

GFX 47
8246-8769

GFX 59
5976-6187
6560-6667

GFX 60
5060-5122

GFX 61
6201-6458
6668-6874

GFX 62
4402-4663
5123-5392

GFX 63
5501-5689
5905-5975
6459-6559
6875-7056

GFX 64
5690-5904
6175-6200
7056-7231
7387-7566
7660-7715
7853-7975

GFX 65
4664-5059
5393-5500

GFX 66
7232-7386
7567-7659
7716-7852
7976-8126

8127-8160 GFX 33 (forest overlays)
8161-8245 (rain overlay, actually compatible with many GFX sets)
8770-8787 GFX 59 (pyramid background)
8788-8819 GFX 34 (mountain background)
8820-8861 GFX 81 (triforce room)

8864-8871 GFX? spare?

This will give the user a general idea of what block numbers match up with each overworld GFX set. It's useful not only for finding compatible block configurations but also if you decide to, for example, not have a desert area in your game so that you can use all of those block configurations for additional block configs compatible with other GFX sets.

Quote
It seems like there's not any good editors for a top down SNES action adventure game, which is unfortunate, especially since it's freaking 2016!

That's probably because they are much more complicated than top down turn-based RPGs where the environments are not anywhere near as involved, interactive (and in this case with much more complex and interactive layering) or as simple as 2D side-scrollers. The more I work on this game the more I am amazed by the work of the developers. ALttP is infinitely more complicated than the previous Zeldas and a few that followed.

Quote
Hyrule Magic is dead as far as development goes, and is pretty frustrating for a lot of people

Which is a real shame since it would be awesome if it just had a proper bug fix and a refinement of some of the controls for certain things.

Quote
If there was a good, well working, well supported Z3 editor, I think we'd see some fantastic hacks. I'd love to see a community like SMWcentral but for Z3, people making new sprites, new patches, fun adventures, etc. Zeldix.net exists, but it'll never reach its potential with the tools we have now.

True. It's almost as if Sephiroth3 both created and murdered the Zelda III scene with his editor and refusal to let anyone else finish it for him. As I've stated before, were it not for HM someone would have already made their own editor because it is much less trouble to work around the quirks of an unfinished editor than to create one yourself.

As for support, Zeldix does have that in spades. People like myself, Puzzledude, Conn and Seph can help people with just about anything as collectively we have all been there before.

Hyrule Magic really isn't that difficult to use or limiting once you have the necessary experience, but the learning curve to that destination can def be too much for the faint of heart and undedicated. Admittedly, my occasional rants about this program have probably not been very helpful as to welcoming more people into this "scene".
::)

Quote
MathOnNapkins, please save Hyrule!  ;D

May the way of the Hero lead to the Triforce. :thumbsup:
War is Peace. Freedom is Slavery. Ignorance is Strength.