Romhacking.net

Romhacking => ROM Hacking Discussion => Topic started by: snarfblam on July 23, 2011, 08:58:32 pm

Title: Zelda Automap & Other Hacks
Post by: snarfblam on July 23, 2011, 08:58:32 pm
Update:

Download: Automap 0.2 (zipped IPS) (http://snarfblam.com/files/AutomapPatch0.2.zip). Or try the old version (http://snarfblam.com/files/Automap%20Test.ips).



I've just about finished with a hack to add an auto-map to the overworld in The Legend of Zelda (tracks which screens you've visited). Look at this video. (http://www.youtube.com/watch?v=YtaOlQlrz1o)

I'd love to get some help testing, if anyone is interested. I'm gonna test myself, of course, but I always seem to overlook something, so help is nice. I want to put the game through its paces and make sure the map does what it's supposed to do when, for example:

A few people have made suggestions such as showing how screens connect on the map or making different parts of the world different colors. I can't think of any way to do this without drawing the tiles on the fly, which is more work than I am interested in. When I'm done, I'm planning on sharing the code along side the patch so others can extend it if they see fit.

I'm also interested in input on the appearance of the map. So look at this thing (http://dl.dropbox.com/u/12027218/Shared%20Images/MapHackImages.png):

Spoiler:
(http://dl.dropbox.com/u/12027218/Shared%20Images/MapHackImages.png)

My favorite one is the first one, but I want everyone's opinions and suggestions. With the palette the map is using, I'm limited to gray, white, and blue. It's presumably possible for me to make the map use one of the other palettes, but I haven't looked too far into that.
Title: Re: Legend of Zelda Automap
Post by: Tito Santana on July 23, 2011, 09:12:50 pm
I was actually thinking about playing the original Zelda again so I'd be happy to help test.

As for which map, I think I like the first one the best as well.
Title: Re: Legend of Zelda Automap
Post by: Nightcrawler on July 24, 2011, 02:55:43 pm
Nice work. What did you end up having to do to get the feature working? That's a feature that really should have been part of the original game.
Title: Re: Legend of Zelda Automap
Post by: Jorpho on July 24, 2011, 04:23:03 pm
So it's an actual hack and not a LUA script like that thing for Metroid?
Title: Re: Legend of Zelda Automap
Post by: Jigglysaint on July 27, 2011, 04:09:33 pm
I wonder, what are you using to keep the screens active?  This game contains flags that are similar to how flags are stored in the Oracle games and Link's Awakening.  There's a flag for which screen has been visited, though I'm unsure if it's overworld active or not.

A while back I actually created a hack that changed the secrets around quite a bit.  In this hack I made, you could select which one of your weapons could trigger the secret, what tile appears when you trigger it, and what tile is drawn when you re-enter.  I also made the whistle be screen dependent, and not hard coded with few locations.  I think both these hacks would go hand in hand together.  In fact, if there was a way to clear up how the game actually stores the enemies killed as bits in the room flags, that could ad in a whole bunch of flags that could used to create more things.  I am thinking lock blocks for dungeons, being able to set secrets manually instead of specific macros(the game actually checks for the tile ID and sets the secret, which is actually a sprite, then if triggered, replaces all of the same Id on screen).

Perhaps I should start fresh, knowing alot more about ASM than I did before, and create an entirely new system that is way more flexable and ripe for expansion.
Title: Re: Legend of Zelda Automap
Post by: snarfblam on July 27, 2011, 08:52:20 pm
Nice work. What did you end up having to do to get the feature working? That's a feature that really should have been part of the original game.
It was surprisingly straightforward. There's more than enough free ROM space as well as save-RAM. I'm working on some other modifications that sound as if they would be simpler, but are turning out to be much more difficult (for example, making the subscreen open and close faster sounded so simple, but it's glitches galore).

So it's an actual hack and not a LUA script like that thing for Metroid?
Yup. There are two Metroid mods that provided a map. Parasyte hacked in a map that somewhat resembled Super Metroid's corner map. It was a 3x3 grid that simply showed whether there were any adjacent screens. Wasn't mind blowing, but it would presumably run on real hardware. MDBtroid had the LUA map that was more akin to Super Metroid's map in the pause screen.

Jigglysaint, I added my own map data using free save-RAM. I'm guessing that there's a bit field for every map (overworld, levels 1-6, levels 7-9), but that it would be used to track visited screens in levels and revealed secrets in the overworld. That's just a guess, though.

Worth mentioning: there are a number of random bits in the overworld data that, if they are changed, adversely affect the game (for example, there are two screens where changing the screen palettes affects which palettes are used in caves). I wonder what issues might crop up if you redo the whole map system. Also, there are plenty of simple hacks that could expand what options you have for screens. For example, it would be very easy to re-point the lists for which screens have armos-staircases, whistle stairs, etc., to give you virtually free reign. One thing I could never figure out is how the raft screens are managed. If I were more adept at ASM-hacking when I made Zelda Tech, I would have provided the user an option to "enhance" the game to provide more of these liberties.


Tito Santana, I'll PM you a link to the IPS. If you know anyone else who might be interested, you can share the link (just don't post it publicly). If anyone else wants to test, whether it's a full play-through or something less, please PM me. (Please  ;D)
Title: Re: Legend of Zelda Automap
Post by: snarfblam on August 07, 2011, 03:21:58 pm
By popular request, the automap now has an actual map of the overworld.

(http://dl.dropbox.com/u/12027218/Shared%20Images/Automap%201.0.png)

Download: Automap 0.1 (http://snarfblam.com/files/Automap%200.1.IPS). Or try the old version (http://snarfblam.com/files/Automap%20Test.ips).
Title: Re: Legend of Zelda Automap
Post by: Jigglysaint on August 07, 2011, 03:56:21 pm
Actually, those maps that change the cave palletes ARE the caves.
Title: Re: Legend of Zelda Automap
Post by: snarfblam on August 07, 2011, 04:14:31 pm
Note sure exactly what you mean, there. This is what I was talking about:

If you change the borders in this screen:
Spoiler:
(http://dl.dropbox.com/u/12027218/Shared%20Images/AutoDrop/autodrop18.png)

Like so:
Spoiler:
(http://dl.dropbox.com/u/12027218/Shared%20Images/AutoDrop/autodrop19.png)

The caves will look like this:
Spoiler:
(http://dl.dropbox.com/u/12027218/Shared%20Images/AutoDrop/autodrop20.png)

I thought there was one screen whose border affected caves and another whose center affected caves, but it turns out that it's both the border and center of this one screen affects caves.
Title: Re: Legend of Zelda Automap
Post by: Jigglysaint on August 07, 2011, 06:34:14 pm
That boarder palette isn't actually used in the game if I recall.  In fact I think the only ones used are the green, brown, and grey palettes.
Title: Re: Legend of Zelda Automap
Post by: snarfblam on August 07, 2011, 07:33:56 pm
My original point is that modifying overworld data has strange and unexpected consequences. I said that because you discussed re-doing the game's overworld data. My concern is that a overhaul in this department could cause numerous unforeseen problems.
Title: Re: Legend of Zelda Automap
Post by: Jigglysaint on August 08, 2011, 07:51:33 pm
Not exactly.  For one thing, I meant an overhaul of the system that determines which trees are burnable, where they are location, what tile they turn into and what to use to make them change.  I found that the game looks for the presence of a specific tile ID, places a specific sprite depending on what ID it is, and that sprite then looks for the triggering weapon to activate the change.

I figure that optimally, you could create additional fields that control these things.  Let's say that you wanted to make this work for both overworld and dungeons, both quests.  You would need 256 bytes for the overworld(128 screens per quest), 256 bytes for quest one dungeons, and another for quest 2 dungeons.  Basically, 3 pages, and that is per effect field.  One field for selecting which weapon or item triggers the secret(as an index), one field for yx location of sprite(and location of tile to replace after you come back), and one field for the tile type to replace.  I only did this for the overworld, but I think it could be possible to use space in other parts of the rom for these data fields.  The end result would be a better secrets engine that would allow for things such as lock blocks or obstacles that could be passed using arrows.  Perhaps a specific sprite that when triggered, opens a shutter or makes stairs appear.
Title: Re: Legend of Zelda Automap
Post by: never-obsolete on August 09, 2011, 03:37:01 pm
I like the automap. I have a couple of friends who won't play this or Metroid because they get lost too easily.


If you are interested in an overhauled map system, I have most of it worked out:

(http://i827.photobucket.com/albums/zz199/cbpena/lozdx0.png) (http://i827.photobucket.com/albums/zz199/cbpena/lozdx1.png) (http://i827.photobucket.com/albums/zz199/cbpena/lozdx2.png)

I removed that column based system it had. Every screen is unique, and can have its own tileset. Each screen can also have its own unique shop/cave. Backgrounds can be animated. Most of the kinks to work out are in the dungeons. Things like fixing the trapdoors, removing the hardcoded outer walls, replacing the graphics with those from LA.

I was also digging into the enemies, and hacking it so you can list each enemy that you want on a screen.


I could send you the source. Either way, I'm still gonna work on this from time to time, so no worries.  :)





Title: Re: Legend of Zelda Automap
Post by: Nightcrawler on August 09, 2011, 03:56:56 pm
Hey, that hack you're working on looks really cool, never-obsolete. An overhaul like that would renew interest in Zelda for me. Is there anywhere else to get information on the project?
Title: Re: Legend of Zelda Automap
Post by: snarfblam on August 09, 2011, 05:35:36 pm
never-obsolete, awesome work! Hmm... if you're looking for help I'd love to lend a hand (ASM, disassembly, level/overworld editor or anything else you need a hand with). I think the auto-map would complement your hack very nicely. I'll be posting the code for it soon anyways.

This project would be a very nice addition to MoN's new (sub)community, Zelda Construction (http://forum.metroidconstruction.com/index.php/board,27.0.html).
Title: Re: Legend of Zelda Automap
Post by: Jigglysaint on August 09, 2011, 08:09:46 pm
Hmm, well if space is no object, then just imagine the possiblities.  I don't think it will be hard getting rid of the walls in the dungeon.  The hard part is re-creating the overhangs and other door mechanics.  Of course why not just scrap ovehang instead and make them like Link's Awakening doors?  Of course by that point you might as well just edit Link's Awakening, since the Z80 is pretty powerful enough in terms of data manipulation.
Title: Re: Zelda Automap & Other Hacks
Post by: snarfblam on August 09, 2011, 09:33:42 pm
Tossing another hack on the pile, this one a bit simpler.

(http://dl.dropbox.com/u/12027218/Shared%20Images/Zelda%20Hearts.png)

Damage is shown in increments of 1/8 hearts instead of 1/2 hearts.

http://www.youtube.com/watch?v=_L2zprWO6ek
Title: Re: Zelda Automap & Other Hacks
Post by: never-obsolete on August 10, 2011, 01:12:30 pm
I have a website, but it has not been updated in a long time.



@snarfblam
If you have the time, for sure. I have a generic map editor that I ended up using for this. I'll pm you later with some more details.


@Jigglysaint
I ended up removing the overhangs. I also remembered that the whistle/lake secret needs to be fixed.

I chose this over Link's Awakening because: 1. nostalgia and 2. I like to play games on their original platform and I have a PowerPak.
Title: Re: Zelda Automap & Other Hacks
Post by: snarfblam on August 18, 2011, 10:01:25 pm
Well... I've put up the code for my auto-map hack. The bad news is that as-is, it requires my own assembler, snarfblASM, to assemble, mostly due to my extensive dependence on a non-standard directive. The biggest issue here (aside from the fact that you can't use your assembler of choice) is that the assembler has yet to be released.  :-\

Spoiler:
I've been looking for opportunities to test and improve my assembler. This was a good opportunity on both counts.

snarfblASM is part of a suite of NES-hacking-oriented tools I've been working on. I've added a .PATCH directive that can specify a location in the ROM that any following code can be inserted. Any number of .PATCHes can be used in a file, allowing related code to be placed together in an ASM file even if the pieces of code must be inserted at separate offsets. snarfblASM will output a .IPS file that can be applied to the ROM in question.

If anybody knows of any other assemblers with similar features, or has thoughts on it or suggestions about alternative approaches, I'd love to hear about it.

http://snarfblam.com/words/?p=260
Title: Re: Zelda Automap & Other Hacks
Post by: PolishedTurd on August 21, 2011, 02:03:55 am
Wow, the automap looks great.

This would be wonderful to have for Solar Jetman. Awhile ago, I envisioned a map generator that would produce maps programmatically for SJ, which you could then explore. An automap would make that kind of game more fun to play. Would it be possible to do this for Zelda, or is the map structure too complex?

When would you release your assembler? With SuiteNES?

@never-obsolete: Your hack looks fantastic. Please keep at it, and let me know if you need play testers.
Title: Re: Zelda Automap & Other Hacks
Post by: curses on August 21, 2011, 04:20:01 pm
This would be wonderful to have for Solar Jetman. Awhile ago, I envisioned a map generator that would produce maps programmatically for SJ, which you could then explore. An automap would make that kind of game more fun to play.

Great idea. It might be possible, too.


Quote
Would it be possible to do this for Zelda, or is the map structure too complex?

Is there something you want that is different from the sample of the automap shown in this thread?
Title: Re: Zelda Automap & Other Hacks
Post by: PolishedTurd on August 24, 2011, 01:23:20 pm
@curses: What I mean is, a program that intelligently builds a playable map based on some heuristics that you feed it. Basically, it's would create a "surprise" ROM hack for you so that you can actually explore a new map, as many times as you want, without requiring that each "hack" be painstakingly constructed. Then, to have this auto-map feature would make the game more playable.

It seems much simpler for a game like Solar Jetman, vs. Zelda which has more complex maps. I was just tossing it out there, knowing that snarfblam and never-obsolete are skilled programmers, as are several other members here.

@snarflblam: I prefer the automap that shows unexplored areas as black. Black seems visually more representative of "unexplored" to me.
Title: Re: Zelda Automap & Other Hacks
Post by: Trax on August 26, 2011, 02:03:07 am
Yeah, this auto-map feature is very cool...

As for the colors glitch in caves, I tested it myself and it's quite puzzling. It doesn't sound logical, since caves are screens like any other, except there's a trigger for the possible dialogs. I happen to be working on my Zelda 1 editor right now, so data tables are no problem. Bank 6 contains 6 tables that contain most of the data related to the maps, overworld and dungeons. There are a few hard-coded things, like Lost Woods and Lost Mountain, the top-left screen passage, the raft triggers, etc...

By the way, the raft screens test routine is at 14941. It really is a hard-coded if-then-else code sequence that checks if you are in the 2 screens that have it, i.e. 3F and 55. The top-right screen's secret passage through the wall is tested at 1EE97. The code checks if you have the right X and Y locations, and if you do, Link goes through the wall...

Adding a data table for each screen would be inevitable, since most of the bit fields in the original tables are taken. But there's plenty of free space as well, so it's doable...

I think I evoqued the idea of a free-roaming Zelda hack, but I didn't do anything about it. The idea just popped into my mind, but I'm not yet experienced enough with scrolling mechanics to achieve anything significant...
Title: Re: Zelda Automap & Other Hacks
Post by: snarfblam on August 29, 2011, 10:23:58 pm
When would you release your assembler? With SuiteNES?
I'm planning on releasing a command-line version as soon as possible.
Title: Re: Zelda Automap & Other Hacks
Post by: Legend on September 02, 2011, 11:11:12 pm
Will this work with other hacks like Zelda Outlands?
Title: Re: Zelda Automap & Other Hacks
Post by: Spooniest on September 07, 2011, 06:49:42 am
I've played this and it works beautifully. I don't even really mind that it changes when you go into a cave. Once you exit the cave, everything's back to normal. It's a great feature. Nice work.  :thumbsup:  :thumbsup:
Title: Re: Zelda Automap & Other Hacks
Post by: Trax on September 07, 2011, 10:56:06 am
Legend, if you want to know if it works with other hacks like Outlands, then just give it a try and check for yourself. Then report back...
Title: Re: Zelda Automap & Other Hacks
Post by: curses on September 16, 2011, 12:28:08 pm
It... kinda... works with Outlands. Obviously the map doesn't look like Outlands does, so it would have to be changed so that they match each other.

Did you know that GameMakr24 is talking about making an update to Outlands? Check out his blog: http://www.questforcalatia.net/Zelda3C/diary.html

He mentions a "10 year anniversary" edition of Outlands, as well as some improvements he wants to make.