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

Poll

What should the new name for the "Spell" spell be?

Reveal
5 (21.7%)
Unveil
4 (17.4%)
Enigma
9 (39.1%)
Expose
5 (21.7%)

Total Members Voted: 23

Author Topic: Zelda II Redux  (Read 96235 times)

itemdrop

  • Jr. Member
  • **
  • Posts: 61
    • View Profile
Re: Zelda II Redux
« Reply #660 on: March 11, 2019, 06:17:33 pm »
I really think of the FDS version as a beta version. NA version is just overall more complete and well rounded. Not to mention the WAIT factor of the FDS version really hampers the pace of the game.

Trax

  • Sr. Member
  • ****
  • Posts: 489
    • View Profile
    • Trax ROM Hacking
Re: Zelda II Redux
« Reply #661 on: March 11, 2019, 07:49:55 pm »
I'd like to see the Battle music randomized. Fifty percent chance for each theme. I think the idea of having one for each region is good, too.

By the way, Ice Penguin, a few more details about your music document. I think you may have some offsets that are, well, offset from the ones expected. I know that you use ROM offsets and not "real" ones. In section 4, it reads: "Starting at 0x1A00A, count $55 bytes ahead to reach 0x1A070." But, 0x1A00A + 0x55 = 0x1A05F. You are off by one byte. This makes the data entry more like:

Code: [Select]
18 42 A2 0D 09 15
The first byte is the Note Lengths offset. It's a multiple of 8, and is an offset into the table at 0x1914D (+0x10) :

Code: [Select]
1914D: Table for Music Note Lengths ? (6 * 8 = 30 bytes)

04 0C 08 10 18 20 05 06 ?
04 0F 09 12 1B 24 06 06 Battle
05 0F 0A 14 1E 28 07 06 Boss
06 12 0C 18 24 30 08 10 Overworld, Palace, Item
07 15 0E 1C 2A 38 13 12 Town, House
07 15 0E 1C 2A 38 09 0A ?

For any given song, you basically have 8 choices of note lengths. The bytes that represent the actual notes of the songs refer to these length values.

Shade Aurion

  • Full Member
  • ***
  • Posts: 214
  • Shadow Keeper
    • View Profile
    • DudeGoBack
Re: Zelda II Redux
« Reply #662 on: March 11, 2019, 08:29:41 pm »
Alternatively (just throwing it out there) you could have different songs for the easy and hard enemies. The FDS battle theme def sounds like a theme for harder enemies haha

IcePenguin

  • RHDN Patreon Supporter!
  • Sr. Member
  • *****
  • Posts: 265
    • View Profile
Re: Zelda II Redux
« Reply #663 on: March 11, 2019, 08:48:58 pm »
I'd like to see the Battle music randomized. Fifty percent chance for each theme. I think the idea of having one for each region is good, too.

By the way, Ice Penguin, a few more details about your music document. I think you may have some offsets that are, well, offset from the ones expected. I know that you use ROM offsets and not "real" ones. In section 4, it reads: "Starting at 0x1A00A, count $55 bytes ahead to reach 0x1A070." But, 0x1A00A + 0x55 = 0x1A05F. You are off by one byte. This makes the data entry more like:

Code: [Select]
18 42 A2 0D 09 15
The first byte is the Note Lengths offset. It's a multiple of 8, and is an offset into the table at 0x1914D (+0x10) :

Code: [Select]
1914D: Table for Music Note Lengths ? (6 * 8 = 30 bytes)

04 0C 08 10 18 20 05 06 ?
04 0F 09 12 1B 24 06 06 Battle
05 0F 0A 14 1E 28 07 06 Boss
06 12 0C 18 24 30 08 10 Overworld, Palace, Item
07 15 0E 1C 2A 38 13 12 Town, House
07 15 0E 1C 2A 38 09 0A ?

For any given song, you basically have 8 choices of note lengths. The bytes that represent the actual notes of the songs refer to these length values.

Randomized battle theme would be really neat.  I think that could be easily achievable if we used the frame counter.  Since it's always being incremented, a check could be done to determine which song is played.  Though there probably is a better way...

Thanks for the feedback on the music document!  It could definitely use improvement, so any advice is really appreciated.  Yeah, I have a bad habit of using file addresses instead of real addresses.  I understand it's important to use NES address when writing code, or sharing snippets of ASM code.  I just like using file address when giving directions to a location.  I'm sure as I learn more, and get better at ASM my view on that will change.  :P

About your comment on section 4 of the document, from my understanding of how optomon explained it, he does say to count from 0x1A00A, but I always counted from 0x1A00B.  I wasn't sure how to go about explaining this part, so I stuck with what optomon said since he knows better than I do.

The Note Length offset you mentioned, I'm pretty sure it's supposed to be the last byte in the phrase structure.  That's how it was in the FDS version, and even when porting the battle theme over, it used that same 6 byte structure between the two versions.  The original code from the FDS version was way too fast, so I used this byte to slow it down.  I'm not sure what to think about optomon saying 0x1A00A, to be honest, but I'm confident it's the last byte.

Edit:
I looked at that specific line you quoted from the document: "Starting at 0x1A00A, count $55 bytes ahead to reach 0x1A070."  I made a mistake.  It should be 0x1A060!  That's the start of the battle theme phrase structure.  42 A2 0D 09 15 08

I didn't experiment too much with the actual notation of the music, since composing music, or anything related to that, really confuses me.  Does the table you referenced act as sort of a "global" tempo for any phrase in the song?  I don't quite understand the connection between the Note Length byte and how the table affects note length.  Also, the table sections being labeled as "?, Battle, Boss, etc." how are those related exactly?

Alternatively (just throwing it out there) you could have different songs for the easy and hard enemies. The FDS battle theme def sounds like a theme for harder enemies haha

This would be really neat, too! 


« Last Edit: March 11, 2019, 09:06:49 pm by IcePenguin »

ShadowOne333

  • Hero Member
  • *****
  • Posts: 1141
    • View Profile
Re: Zelda II Redux
« Reply #664 on: March 13, 2019, 02:17:22 pm »
Seems like we are on the finishing line, guys :)
Everything that I wanted to implement, improve or modify, has been added so far successfully thanks to the help of IcePenguin, Trax, njosro, and many others which have given their thoughts and feedback regarding this hack.

I'll wait for DarkSamus to take his time to finish the menus hack, and I think that should be it for Redux!
:D

Heaven Piercing Man

  • Jr. Member
  • **
  • Posts: 41
    • View Profile
Re: Zelda II Redux
« Reply #665 on: March 13, 2019, 04:12:03 pm »
There are sidescrolling segments that use the battle theme, will these also fall under the theme randomization? These segments seem a little too peaceful for the FDS battle theme.

IcePenguin

  • RHDN Patreon Supporter!
  • Sr. Member
  • *****
  • Posts: 265
    • View Profile
Re: Zelda II Redux
« Reply #666 on: March 13, 2019, 04:47:39 pm »
I was quite intrigued by Trax's suggestion for randomized battle theme, so I made a way to do it.  It uses the frame counter.  If you enter any side-scrolling battle scene when the frame counter is 80, or above, it will play the normal NES battle theme.  If it is below 80, it will play the FDS battle theme.  The frame counter is being incremented constantly, so there is no telling what it will be when you enter a battle.  After playing around with it for a bit, I was able to hear both versions pretty regularly.  If adding this doesn't interest you, no worry, I just made it for fun and to see if I could.  :P

Spoiler:
At 0x600, you'll find this code:  EE 26 07

This code increments ram address $726, which is the black transition screen when loading a battle scene.  It hides the loading gfx.

Add a JSR here, so change it to:  20 F0 A8

At 0x2900, paste this code:  EE 26 07 A5 12 85 F2 60

This is creating a temporary copy of the frame counter at $F2 to determine which song to play.  Since the frame counter is reset to 00 every time the battle scene is finished loading, we will store a copy of it the moment you initiate the loading, hence using the transition routine.

Now we'll just overwrite some old code that plays the FDS battle theme only in East Hyrule, and check the frame counter copy, instead.

At 0x28E0, paste this code:

A6 F2 E0 80 30 04 8D 5F 07 60 A9 08 8D 5F 07 60 FF

At 0x19DD0, paste this code:

A5 F2 C9 80 30 05 A9 04 85 EB 60 A9 08 85 EB A9 00 8D 02 07 60 FF

At 0x1FEC4, paste this code:

A5 F2 C9 80 30 06 A9 04 8D 5F 07 60 A9 08 8D 5F 07 A9 00 8D 02 07 60 FF

These 3 chunks of code check ram address $F2, which we set up to be a temporary check on the frame counter, and plays either the NES or FDS battle theme.  This will be applied to every area on the overworld.  (caves, secrets, encounters, etc.)

ShadowOne333

  • Hero Member
  • *****
  • Posts: 1141
    • View Profile
Re: Zelda II Redux
« Reply #667 on: March 13, 2019, 04:54:25 pm »
I was quite intrigued by Trax's suggestion for randomized battle theme, so I made a way to do it.  It uses the frame counter.  If you enter any side-scrolling battle scene when the frame counter is 80, or above, it will play the normal NES battle theme.  If it is below 80, it will play the FDS battle theme.  The frame counter is being incremented constantly, so there is no telling what it will be when you enter a battle.  After playing around with it for a bit, I was able to hear both versions pretty regularly.  If adding this doesn't interest you, no worry, I just made it for fun and to see if I could.  :P

Spoiler:
At 0x600, you'll find this code:  EE 26 07

This code increments ram address $726, which is the black transition screen when loading a battle scene.  It hides the loading gfx.

Add a JSR here, so change it to:  20 F0 A8

At 0x2900, paste this code:  EE 26 07 A5 12 85 F2 60

This is creating a temporary copy of the frame counter at $F2 to determine which song to play.  Since the frame counter is reset to 00 every time the battle scene is finished loading, we will store a copy of it the moment you initiate the loading, hence using the transition routine.

Now we'll just overwrite some old code that plays the FDS battle theme only in East Hyrule, and check the frame counter copy, instead.

At 0x28E0, paste this code:

A6 F2 E0 80 30 04 8D 5F 07 60 A9 08 8D 5F 07 60 FF

At 0x19DD0, paste this code:

A5 F2 C9 80 30 05 A9 04 85 EB 60 A9 08 85 EB A9 00 8D 02 07 60 FF

At 0x1FEC4, paste this code:

A5 F2 C9 80 30 06 A9 04 8D 5F 07 60 A9 08 8D 5F 07 A9 00 8D 02 07 60 FF

These 3 chunks of code check ram address $F2, which we set up to be a temporary check on the frame counter, and plays either the NES or FDS battle theme.  This will be applied to every area on the overworld.  (caves, secrets, encounters, etc.)

Can be made into an optional patch if you want to :P
Let me know if you agree!

IcePenguin

  • RHDN Patreon Supporter!
  • Sr. Member
  • *****
  • Posts: 265
    • View Profile
Re: Zelda II Redux
« Reply #668 on: March 13, 2019, 05:03:36 pm »
Can be made into an optional patch if you want to :P
Let me know if you agree!

I think having it just in East Hyrule is good.  Gives that section of the game more intensity, and makes it feel more unique when compared to West Hyrule.  Seems more fitting to be in the later parts of the game, because it sounds more dire.  I just did the randomized version as a learning experience.

ShadowOne333

  • Hero Member
  • *****
  • Posts: 1141
    • View Profile
Re: Zelda II Redux
« Reply #669 on: March 13, 2019, 05:12:54 pm »
I think having it just in East Hyrule is good.  Gives that section of the game more intensity, and makes it feel more unique when compared to West Hyrule.  Seems more fitting to be in the later parts of the game, because it sounds more dire.  I just did the randomized version as a learning experience.

I agree, it does feel like you are getting near the end of the game, and the stakes are getting high :P

IcePenguin

  • RHDN Patreon Supporter!
  • Sr. Member
  • *****
  • Posts: 265
    • View Profile
Re: Zelda II Redux
« Reply #670 on: March 13, 2019, 07:36:33 pm »
There are sidescrolling segments that use the battle theme, will these also fall under the theme randomization? These segments seem a little too peaceful for the FDS battle theme.

This crossed my mind before.  The FDS battle theme does seem a bit extreme for single screen areas with a fairy, life doll, heart, etc.  Creating a condition check for every one of those maps could be easily done.  It would be interesting to have a more peaceful track, like maybe the theme played in houses.  That will be left to ShadowOne's decision.  If it's something he is interested in, I can look into it.  The code is set up to use any song, there just needs to be those condition checks for each secret area.

Trax

  • Sr. Member
  • ****
  • Posts: 489
    • View Profile
    • Trax ROM Hacking
Re: Zelda II Redux
« Reply #671 on: March 13, 2019, 09:36:19 pm »
Or no music at all...

I think there's a unused bit in the level data's headers, so that could be used to setup different songs according to each area.

ShadowOne333

  • Hero Member
  • *****
  • Posts: 1141
    • View Profile
Re: Zelda II Redux
« Reply #672 on: March 14, 2019, 10:33:58 am »
This crossed my mind before.  The FDS battle theme does seem a bit extreme for single screen areas with a fairy, life doll, heart, etc.  Creating a condition check for every one of those maps could be easily done.  It would be interesting to have a more peaceful track, like maybe the theme played in houses.  That will be left to ShadowOne's decision.  If it's something he is interested in, I can look into it.  The code is set up to use any song, there just needs to be those condition checks for each secret area.

This sounds kinda neat actually.
For the Fairy one, the house theme sounds good, for the doll/hearts/magic jar, perhaps the original battle theme?
I'm not sure, but that does sound like a neat idea to implement :)

Shadic

  • Jr. Member
  • **
  • Posts: 36
    • View Profile
Re: Zelda II Redux
« Reply #673 on: March 14, 2019, 12:18:48 pm »
If only inserting/creating music was easier... A mild "encounter" theme could have a lot of uses.

IcePenguin

  • RHDN Patreon Supporter!
  • Sr. Member
  • *****
  • Posts: 265
    • View Profile
Re: Zelda II Redux
« Reply #674 on: March 23, 2019, 04:33:10 am »
Did some more testing, and found that the new FDS theme needed an additional condition check.  Currently, if you die in a palace, the music won't play the correct song ID (04) when you die.  Instead, it uses the new code for playing song ID (08) which is the boss music, or in great palace the credits theme. (08 is also the FDS theme while on the overworld)

At 0x28E0, paste this code over the old code:

AE 07 07 E0 00 D0 07 AE 06 07 E0 02 F0 04 8D 5F 07 60 A9 08 8D 5F 07 60

The new condition checks if you are on the world map ($707), or in a palace, so it knows to play the correct song - including the FDS theme in East Hyrule.

Anyway, sorry I haven't been on lately.  I've been busy, so I haven't had time to sit down and do any romhacking stuff.  :(  Still looking forward to the completion of Redux!

Edit:

Also, there is a bridge room in great palace that has no enemies.  This room is along the path you take to the end, so you can't miss it.  Maybe you could change its enemy pointer data to use the enemies from another bridge room.  (bago bago enemies?)  It'd be a simple 2 byte change.
« Last Edit: March 23, 2019, 04:52:54 am by IcePenguin »

azul120

  • Jr. Member
  • **
  • Posts: 14
    • View Profile
Re: Zelda II Redux
« Reply #675 on: March 23, 2019, 03:33:24 pm »
Is there anyone creating vids for these yet? Previews for each patch would be helpful.

Shade Aurion

  • Full Member
  • ***
  • Posts: 214
  • Shadow Keeper
    • View Profile
    • DudeGoBack
Re: Zelda II Redux
« Reply #676 on: March 24, 2019, 08:42:33 pm »
I'll likely do another playthrough when these guys are ready but individual updates are a no go for me sorry

IAmCaptPlanet

  • Full Member
  • ***
  • Posts: 102
    • View Profile
Re: Zelda II Redux
« Reply #677 on: March 24, 2019, 09:05:16 pm »
i would like to check out each update too. just to play around, but i want the optional patches too!

Spoiler:
a patch that mirrors the game from beginning to end made a LoZ1 playthrough into a totally new experience, perhaps one for AoL-Redux could work?
http://www.romhacking.net/hacks/4279/
« Last Edit: March 24, 2019, 09:31:22 pm by IAmCaptPlanet »

ShadowOne333

  • Hero Member
  • *****
  • Posts: 1141
    • View Profile
Re: Zelda II Redux
« Reply #678 on: March 25, 2019, 12:00:10 pm »
Did some more testing, and found that the new FDS theme needed an additional condition check.  Currently, if you die in a palace, the music won't play the correct song ID (04) when you die.  Instead, it uses the new code for playing song ID (08) which is the boss music, or in great palace the credits theme. (08 is also the FDS theme while on the overworld)

At 0x28E0, paste this code over the old code:

AE 07 07 E0 00 D0 07 AE 06 07 E0 02 F0 04 8D 5F 07 60 A9 08 8D 5F 07 60

The new condition checks if you are on the world map ($707), or in a palace, so it knows to play the correct song - including the FDS theme in East Hyrule.

Anyway, sorry I haven't been on lately.  I've been busy, so I haven't had time to sit down and do any romhacking stuff.  :(  Still looking forward to the completion of Redux!

Edit:

Also, there is a bridge room in great palace that has no enemies.  This room is along the path you take to the end, so you can't miss it.  Maybe you could change its enemy pointer data to use the enemies from another bridge room.  (bago bago enemies?)  It'd be a simple 2 byte change.


Thanks for the update on the code, IcePenguin!
Just updated the patch, link is in the OP as always!

Also, I did notice that bridge room you mention.
I'm all in for the idea of making it use the enemy pointer data from the other bridge room.
What 2 bytes would I need to change to make so?

IcePenguin

  • RHDN Patreon Supporter!
  • Sr. Member
  • *****
  • Posts: 265
    • View Profile
Re: Zelda II Redux
« Reply #679 on: March 25, 2019, 03:32:01 pm »
There are actually 2 rooms that have no enemies.  That bridge room I already mentioned, and the room right before it with the elevator.  Here is the data for both:

0x145BC:  Change from 70 00 to 70 5F.  (elevator room)
0x145BE:  Change from 70 00 to 70 0E.  (bridge room)

This will add 2 firebird enemies to the elevator room, using the data from another elevator room, and also add bago bago enemies to the bridge using another bridge.

Also, here is another suggestion that I always thought would make Great Palace a little more non-linear and forgiving.  You know that room near the end where you break the blocks to drop down?  Well, this room basically makes half of the Great Palace useless beyond a first playthrough.  I made a little edit to some of the blocks to open this path, allowing a player to use 3 paths to reach the end.  New players now won't be greeted with a massive dead end if they take the wrong path, and experienced players will have an option to choose another path if they want to change things up.  Just a thought.  If you like this idea, change these bytes:

0x14A96, change 60 9E to A0 3E.

This is what it will look like after:

Spoiler: