11 March 2016 - Forum Rules

Main Menu

Zelda II Redux

Started by ShadowOne333, March 15, 2018, 01:29:52 PM

Previous topic - Next topic


You could get rid of the 'M' before the magic meter, yeah? OOT/MM didn't use one.


Could you stop fiddling with the "L" tile before someone gets hurt? It is important for timing the split scrolling.


Quote from: Trax on February 11, 2019, 07:31:57 PM
Could you stop fiddling with the "L" tile before someone gets hurt? It is important for timing the split scrolling.

I don't wanna get hurt.    :(  For the "L" tile, I realize its importance.   I even remember you telling me about it back in the day when working on Shadow of Night.  However, couldn't another tile in the HUD take the role for the timing of the split scrolling?  Is this what allows the HUD to remain stationary, right?   As long something has collision with sprite zero, everything runs as normal.  I don't fully understand, but in all my tests I've never seen anything out of the ordinary.

February 12, 2019, 04:31:07 AM - (Auto Merged - Double Posts are not allowed before 7 days.)

I made the hearts into 1/4 hearts, as suggested by Shadic.

The tiles that were used for the extra hearts were the "-" and "x" so if you want to keep those, you'll have to get creative and find other tiles to replace.  I just went with these to make it simple, and honestly, the "NEXT" and "LEVEL" in the HUD don't look too bad without the "-" or triangle shape you made.  Just a thought.  :)

Anyway, here is a screenshot showing where I put the new heart tiles:


You can ignore the magic meter, I was doing some tests with it, to see if I could find a way to remove the "M" and still hide the sliding white tile.  Nothing yet...

Here is the code for the new 1/4 heart gauge.  There is a lot more code, but luckily there is plenty of free space!  :P

First, go to 0x1D4E2 and replace 65 05 with 74 07.  This is the low health beeping, so were pointing to Link's health at RAM address $774.  If you want to remove the health beeping, you could always point this to a location in RAM that is a constant FF, or just use a NOP.

Next, at 0x17AC, you will find the following code:

AD 74 07 8D 65 05 4A 4A 4A 4A 4A 85 00 C6 00 30 09 A9 C7 99 09 03 C8 4C A9 97

Replace it with:


This time there are only 2 jsr.  One for hearts 1-4 and one for hearts 5-6.  They both work differently, so it was just easier to keep them separate.

At 0x3010, paste this code:

A9 00 CD 74 07 D0 01 60 A9 80 CD 74 07 30 01 60 A9 C7 99 09 03 A9 C7 99 0A 03 A9 C7 99 0B 03 A9 C7 99 0C 03 A9 80 CD 74 07 30 01 60 A9 F6 99 0D 03 A9 88 CD 74 07 30 01 60 A9 F7 99 0D 03 A9 90 CD 74 07 30 01 60 A9 FC 99 0D 03 A9 98 CD 74 07 30 01 60 A9 C7 99 0D 03 A9 A0 CD 74 07 30 01 60 A9 F6 99 0E 03 A9 A8 CD 74 07 30 01 60 A9 F7 99 0E 03 A9 B0 CD 74 07 30 01 60 A9 FC 99 0E 03 A9 B8 CD 74 07 30 01 60 A9 C7 99 0E 03 A9 C0 CD 74 07 30 01 60 A9 F6 99 0F 03 A9 C8 CD 74 07 30 01 60 A9 F7 99 0F 03 A9 D0 CD 74 07 30 01 60 A9 FC 99 0F 03 A9 D8 CD 74 07 30 01 60 A9 C7 99 0F 03 A9 E0 CD 74 07 30 01 60 A9 F6 99 10 03 A9 E8 CD 74 07 30 01 60 A9 F7 99 10 03 A9 F0 CD 74 07 30 01 60 A9 FC 99 10 03 A9 F8 CD 74 07 30 01 60 A9 C7 99 10 03 60

At 0x3110, paste this code:

A9 00 CD 74 07 30 01 60 A9 F6 99 09 03 A9 08 CD 74 07 30 01 60 A9 F7 99 09 03 A9 10 CD 74 07 30 01 60 A9 FC 99 09 03 A9 18 CD 74 07 30 01 60 A9 C7 99 09 03 A9 20 CD 74 07 30 01 60 A9 F6 99 0A 03 A9 28 CD 74 07 30 01 60 A9 F7 99 0A 03 A9 30 CD 74 07 30 01 60 A9 FC 99 0A 03 A9 38 CD 74 07 30 01 60 A9 C7 99 0A 03 A9 40 CD 74 07 30 01 60 A9 F6 99 0B 03 A9 48 CD 74 07 30 01 60 A9 F7 99 0B 03 A9 50 CD 74 07 30 01 60 A9 FC 99 0B 03 A9 58 CD 74 07 30 01 60 A9 C7 99 0B 03 A9 60 CD 74 07 30 01 60 A9 F6 99 0C 03 A9 68 CD 74 07 30 01 60 A9 F7 99 0C 03 A9 70 CD 74 07 30 01 60 A9 FC 99 0C 03 A9 78 CD 74 07 30 01 60 A9 C7 99 0C 03 60

That's it!  Another solution to hiding the sliding health tile is to place it behind the "M" on the magic meter.  Now that it no longer functions, it will just sit there, hidden.

While using the quarter heart hack, bits and bots will deal 1/2 a heart in damage at life level 1.  At life level 5, they will deal 1/4 heart of damage.  At life level 8, it will take two hits for bits and bots to deal 1/4 heart of damage.  As I said before, the health system still functions the same way.  Nothing has been change with how much damage Link receives, or how strong enemies are.  This is just an aesthetic hack.

Hope you like it!  So you have a choice of either 1/2 heart gauge, or 1/4 heart gauge - with the 1/4 hearts more accurately displaying your health.


One thing we forgot to consider, when replacing the "-" tile is that it's used by the register name alphabet.  Simple solution is to just change its value to something else, like the "/" character.  It could be any tile, really, even a heart if you want to let players put a heart in their name, ha ha.  For quick reference, CE = / and F8 = heart.

Here is some data on this:

0x17D4B - tile displayed for "-" in aplhabet selection.
0x17D4D - tile displayed for "." in aplhabet selection.

0x17D9F - real value of "-" in alphabet selection.
0x17DA0 - real value of "." in aplhabet selection.

I'm currently looking into the file selection movement.  Hopefully it's not too troublesome to get that up direction working.   :-\  Like njosro mentioned before, I think this would be more trouble than it's worth, and if it's just a partial implementation, it'd be better to not have it at all, just to retain consistency.  Still, though, I'll see if I can figure anything out.


Thanks for all this work, IcePenguin.
It's really appreciated.

I gotta say I am really interested in that 1/4 hearts hack.
Although, I feel sacrificing the triangles to be a bit much, but I can think of a nice workaround.
Maybe replacing the left triangle with an arrow like "" could help, and simply remove the triangle found at the right side of the "EXP" and "LEVEL" words.
That could free-up space for where the "X" was located for one heart tile.
If you can find a way to remove the M, then I can replace both the "L" and "M" tiles with the remaining two heart tiles so that we can have all three new heart tiles in there, without sacrificing the centering of the EXP and LEVEL words, with their fancy new "" arrow.

As for the File Selection stuff, if it's really TOO much trouble to get the "UP" input to move the cursor up, I think having it so that both UP and DOWN move the cursor down could work as it is right now.
The current beta patch has it so that both the File Selection and Elimination Mode respond to Up and Down inputs, and they do move the cursor down.
Only one remaining would be the "Game Over" screen, which I couldn't get the Up and Down inputs to make anything in that one.


i think the little "M" for magic should be placed under the 1st (farthest left) heart.

like directly, if possible. maybe move the whole row of hearts left one space.

i realize this stuff can be tricky, and i know nothing about coding.

i am just still a little bummed that the Magic meter can't be green and have NO little "M" (hearts look better without the little "L" too, btw)

thanks for all you guys' great work so far, this will be the DEFINITIVE version of Link's Adventure, easily


Quote from: IAmCaptPlanet on February 12, 2019, 05:05:01 PM
i think the little "M" for magic should be placed under the 1st (farthest left) heart.

like directly, if possible. maybe move the whole row of hearts left one space.

i realize this stuff can be tricky, and i know nothing about coding.

i am just still a little bummed that the Magic meter can't be green and have NO little "M" (hearts look better without the little "L" too, btw)

thanks for all you guys' great work so far, this will be the DEFINITIVE version of Link's Adventure, easily
Might be feasible to change the magic meter to green.
I know I can change the magic tile which moves to green with no issues, but the problem is the static magic tiles, which use the very first palette, with the white that is shared with all the HUD.
If we can find a way to locate the attribute table for only THOSE tiles in particular, and change them so they used another palette instead,  it could be possible, but I couldn't find anything in a quick search through RAM/PPU. I could be looking wrongly though.

As for the M being placed under the first heart, I don't think that would look good.
If at all, it would make the Life and Magic meters to be displaced, and not aligned with one another.


Quote from: IcePenguin on February 11, 2019, 03:29:46 PM
Done!  I made a small hack that make extra lives a permanent upgrade.  I actually really like this idea because the life dolls are so pointless in the original game.  It gets my vote for being in Redux!  ;)  It would seriously improve the value of the life dolls.

Here's the code:

At 0x1E82A, you'll find the following code:

EE 00 07

Replace it with:

20 50 FF

Next, go to 0x1FF60 and paste this code:  (there's a bit of free space here)

EE 00 07 EE 95 07 60

Next, go to 0x1C368 to find the following code:

A9 03 8D 00 07

Replace this with:

20 A0 D3 EA EA

Finally, go to 0x1D3B0 and paste the following code:

A9 00 CD 95 07 F0 07 AD 95 07 8D 00 07 60 A9 03 8D 95 07 8D 00 07 60

For this hack we are using an unused location in memory.  RAM address $795.  This location was never utilized by the original game, so we will use it to keep track of extra lives collected.  When the game loads for the first time, it initiates this variable ($795) by setting it to 03.  Whenever you collect a life doll, it increments both the normal counter for lives at $700, and the new one we made at $795.  Then when you get a game over, the game uses the new variable to reset the counter, thus having permanent life upgrades!  :)

Great idea Jeville!
Thanks! I will make use of it whenever I find the motivation to make a small-scale hack.


The Blue used as a shadow for the text could become green, and then use that colour for the magic bar


I love the idea of making the magic meter green.
I thought about commenting on it before.

If it were up to me I'd remove the text for NEXT and LEVEL altogether and the M on the magic meter.
It would make the whole thing look much cleaner.

The 1/4 heart hack is sick and is a must have in my opinion.


Argh... Well, I have good news and worse news.  Good news, I managed to get the cursor on the file select to move up and down.  The worse news is it would take a ton of time and code to get it working, and worst of all, it hurts my brain.
There are 8 different cursor movement combinations.  At RAM address $1A:

00 = all 3 files
01 = file 2 & 3
02 = file 1 & 3
03 = file 3
04 = file 1 & 2
05 = file 2
06 = file 1
07 = no files

To get the up and down movement working, you would have to make code for each individual combination, since the game skips rows with no file, or skips over the "register name" when all 3 files are there.  It would take some serious dedication to write all that code, ha ha.

The data starts at 0x17313.  If you wanna do some tests with it, here is what I did:

At 0x17349, you'll find this code:  (use a clean rom)

A9 1C 8D 4D 00

Replace it with:

20 D0 BD EA EA

Next, go to 0x17DE0 a paste this:

A9 1C 8D 4D 00 EA EA EA EA EA EA EA EA EA EA EA A9 00 CD 1A 00 F0 09 EA EA EA EA EA EA EA EA 60 A9 00 CD 19 00 F0 04 EA EA EA 60 A9 08 CD 44 07 F0 04 EA EA EA 60 A9 04 8D 19 00 CE 45 07 60

Keep in mind that this code is just experimental.  It works, but it ONLY for the combination that has all 3 files entered (00), and it lets you move up from file 1, to "elimination mode".  As you can see, it would take some time to write code for every possible movement and for every combination.

Also, the reason for all those EA (NOP) bytes in the code is because I was trying to keep things organized and easy to follow.  My thought process was to check which combination of files that is loaded at $1A, then check which position the cursor is at using $19:

Cursor position:
00 = file 1
01 = file 2
02 = file 3
03 = register name
04 = elimination mode

With those checks, you could assign the new position accordingly, when you press up.  Anyway, if you, or someone more experienced than me, want to have a go at it I hope this info helps.

By the way, did that code fix the pausing bug?


Before Trax kills us all, here's a mockup of the HUD that I was thinking, now that some more magic seems to be possible. There's two versions, one with a line separating each bar of magic, and one without. Thoughts?

Without bars:
With bars:

I'm partial to without, myself.

I see "Next" as a pretty non-standard way of just saying experience, which happens to have a nice 3-letter abbreviation that allows you to center it on the HUD. And "Level" just... Doesn't feel necessary?


Without! To hell with the bars!


Quote from: Shadic on February 12, 2019, 11:59:10 PM
Before Trax kills us all...

:laugh: I laughed WAY too hard at that!

Look, if the game works without a hitch, fine, but I still find it bizarre that nothing serious is happening (not that I want to). But I clearly remember, in the past, people tried to change the L tile and couldn't understand why the game would glitch heavily or even crash just because of a simple graphics modification. The usual explanation was that the tile was involved in the mechanism that makes the screen have a partial scroll. The engine starts drawing the HUD, and on a precise scanline, the L tile is supposed to trigger a hit with the first sprite, called "Sprite Zero". That hit triggers a bit change in one of the PPU registers and that allows to make the rest of the screen scrollable.

Anyway, maybe I'm wrong about the potential effects of moving or modifying the tile, maybe the game has a tolerance for timing, maybe it's absolutely not related to background tiles at all, I don't know. From what I see in screenshots, the L tile is either way out of place, or removed completely, and the game still runs fine. Alleluia, then. However, if you suddenly experience weird visual tearing, at least you'll know it's probably caused by a bad timing of the split screen mechanism.

That said, I like where the HUD is going. It feels less cluttered, and just seems to make more sense. The hearts bar grew on me too, but I still have a bit of "not Zelda II" vibe coming from it. As for the magic bar, I prefer having the box separators. I want to know how much magic I have remaining at a quick glance, and the squares help with that (1 square = 16 magic units). Because you can actually associate magic amounts with spells, you can quickly evaluate if you have enough based on a numeric value.

As for the green color, the problem is that we would need a 5th background color. Not that it's not possible, but it means it's another color that could not change through the entire game. Right now, the background colors that are used for the HUD are white, dark blue and red, which never change. After that, the current background of the area you are in, which is usually clear blue sky, black for caves and forests or dark blue for graveyards and some towns. Having an extra color in the HUD would hinder all other colors in the game itself. You'd have to impose green everywhere in the game. I understand the green color is for matching the other Zelda games, but I think leaving it white is fine.


I love the green magic bar, but as Trax said, it would be a challenge to actually get it in the game.  I'm still working out a solution for removing the "M" tile, so if I manage to get something, I'll post a screenshot.  For those that don't know, the way it works is the "M" acts as a mask for the sliding white tile in the magic meter.  So when you are empty, you won't see the magic tile sliding outside of the meter.

Trax, I appreciate the explanation.  I think back on Journey of a Day, we were messing around with it, and I was all confused why the game froze, ha ha.  So far, in all of these modifications, there haven't been any unusual graphical glitches.  There is still scrolling lag when too many monsters are on screen, but that's normal for Zelda II.  I'm glad you like the hearts bar!  It definitely is a stray from what were used to in Zelda II, but it's actually quite nice in action.  One reason I like it more over the health meter, is that now you will die when it's empty.  The original meter could be empty, but you'd still be alive.

ShadowOne, I came up with a possible solution for the heart tiles.  Now this whole process isn't ideal, but it's a good work-around to getting enough tile space for the hearts without sacrificing anything major.  The game uses the arrow tile for only two menus, the level up menu and game over screen.  So what I did for the level up menu was replace it with Link's extra life icon.  (screenshot at the bottom of post)  It still makes sense using this as a cursor, because you are leveling up Link. 

For the game over screen, that uses the same gfx as towns, so there is plenty of stuff you could use for that.  I saw an empty tile by the "?" tile in towns.  The value of this tile is 32, and if you do change this, you'll also want to change it on the title screen, as well.  If you don't, you will see it change gfx when you select "save" because it loads the title screen gfx before that game resets.


Move this tile to make room for the arrow.

Then go to 0x16FA2 to change it from 32 to 19.  This will restore the title screen logo after moving that tile.  Also, I noticed in Redux, that you used the arrow tile for the magic select cursor, so you'd have to change that back to the magic jar tile.  Again, this is just one possible solution you could do.  :)

Some data:

0x1F49  - Tile for arrow in level up menu, when moving it.
0x268C  - Tile for arrow in level up menu, upon open.
0x1CB23 - Tile for arrow in game over screen, when moving it.
0x1FDE6 - Tile for arrow in game over screen, upon open.

I took some screenshots using Redux, with the new HUD and I even changed the font a bit.  This font, just like yours, is still the Zelda II font, but I reduced the width by 1 pixel.  It seems you reduced the height by 1 pixel, so overall, it looks the same but smaller.  (there is a GIF comparison below)  If you don't want to use the font, no worry, it's just something I did for fun as I was thinking of possible ways to fit the new heart tiles.

Here are 6 screenshots:


GIF comparing the smaller font to the original font:



That smaller font is much more pleasing on the eye, and just makes the top feel lighter.


Sorry about all the super long posts!  Here's another one...   ::)

This is a solution to get the pause text to use palette 01 instead of palette 02.  Palette 01 is reserved for the black screen borders, so that's why it's all black.  Let's change that, allowing the pause letters to display properly with a normal font and black background.  Like so:


First, let's change palette 01's colors.

At 0x1C47F, you'll find palette 01 for world map.  0F 0F 0F 0F.  Replace it with:

0F 30 12 0F

Next, go to 0x79D.  This byte is the tiles to use for the right black screen border, which uses palette 01.  The left one works differently and is unaffected.  Change the tiles from FF to 9C.

Next you'll have to draw these new tiles for the border.  Use the last color in the palette so it uses the black in palette 01.  The tiles should go here, and you'll have to draw them in each bank of the world map animation:  (right after the magic key)


Next, change the palette of the "PAUSE!" text.  In the code I posted for the pause hack, look for six instances of A9 02.  Change all of them to A9 01.

Finally, draw the new tiles for the pause display:


That should do it!  Now you can have the pause display with the black background.  :)

Quote from: mdtauk on February 13, 2019, 06:12:42 AM
That smaller font is much more pleasing on the eye, and just makes the top feel lighter.

Hey, glad you like it!  It will ultimately be up to ShadowOne's decision.  ;)


Oh wow IcePenguin, I love those changes you've done!
And the triangles do look a lot nicer that way!

You managed to get them working without sacrificing the centering of the words, that's fantastic.
Every bit of change you have done looks great, everything from the reworked HUD with the 1/4 hearts, the new PAUSE message with the new palette and without the overlay (which btw forgot to say, the code you sent me last time didn't work for me, it was causing flickering at random, so leaving it like it is in your image looks perfect!), the new reduced font, the arrow changes and all, everything looks great.

Have you been implementing the changes over the latest IPS provided in the OP?
If you have, would you be kind enough to provide the IPS with the changes you have applied so far in here?
I think since the last time I have updated the OP patch, the only change that I have done is change the "-" symbol in the character entry to the diagonal symbol "/" (CE in hex I believe). You can change if that one is already applied, if not, please apply it over your changes.

Are there any other changes you have applied over the latest Redux that I didn't mention here?

Thank you so much, honestly.
Without your help, and the help of Trax, njosro, and the beta testers, this hack wouldn't have been possible at all.
I am really thankful for all of you that have been following this hack, and more so to those of you that have helped throughout the development of this hack.

Really makes me love the hacking community, and makes me happy and pushes me to continue pursuing romhacking as a whole.
Thank you all from the bottom of my heart.


I am happy to help out!  It's been a lot of fun.  ;)  Sure I'll make an IPS patch.  If you PM me your email, I'll send it to you.  I have no means for easy uploading at the moment.

Before I do that, however, I'm trying to finish a new hack.  I was going through your entire topic, reading people's comments to see if there is anything I can do.  One thing I saw brought up a few times by a couple of people, was the issue of wasting EXP by placing the crystal in the palace.

So I'm wondering, is this something that you'd want to implement?  If so, should it be a fixed value like say 500 exp per palace?  What are your thoughts on that?


Sent a PM with email and other stuff, thanks!

I do remember someone mentioning that, but I think limiting the palace Exp to 500 could be really something that would impact the game negatively. As it is right now, it would require some good strategy for a player to make sure to level up before putting the crystal in, that way they gain two levels in a short spawn of time. It's a system that can be abused, but perhaps makes for a more free experience.

I am not sure, what do you think?
Maybe as an optional patch, perhaps?
Alongside the other two I posted.


Hmm, well for me personally, I quite agree with the original comments on it.  One thing I never liked about the original game was feeling "forced" into not completing a palace because your were so close to leveling - plus adding risk to losing all of it by killing more stuff.  So in a way, it was more restricting than free, as you put it.   While it was nice to get a free level, I wouldn't miss it, ha ha.  EXP is aplenty, so I don't think it would have any negative impact on the game.  :P

It could be balanced since bosses give a huge chunk of exp already, so combined with a fixed value from the crystal, it'd be a good reward still.  It'd just need to be a reasonable amount of exp.

You have to consider this, the main problem with the current system is at higher levels.  You could be a couple thousand EXP away from leveling, and if you want to gain the most from a crystal, you basically just have to grind exp.  That kind of thing is why I think the original suggestions were made.

Anyway, that's my thoughts on it.  :)