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

Author Topic: Zelda 1 Redux / The Legend of Zelda Redux  (Read 110965 times)

stratoform

  • Jr. Member
  • **
  • Posts: 82
    • View Profile
Re: Zelda 1 Redux / The Legend of Zelda Redux
« Reply #260 on: May 05, 2020, 08:38:21 pm »
org $8AEC   // 0x14AFC
   db $20,$D2,$43
   db $00,$FF,$CB,$CB,$D3

That $20 should be $23. :)


#2
LDA #newbank
JSR $FFAC

Works in overworld but dungeons are breaking. So detective hat is on.


=============================
=============================


Dungeons must have bank 04. But if some other code derps us, it'll have another bank.


=============================
=============================


Tile collision code

Code: [Select]

; $07:F116 = x1F126
LDA #$04     ; bank 04  (dungeons)
JSR $FFAC    ; -- note that some paths use bank 01 later
JMP collision_tiles_call




; $04:BF10 = x13F20
collision_tiles_call:
JSR $EDFA       ; old detour  (load tile #)

; ----------------------
; ----------------------

CMP #$54        ; $00-53 = old detour code
BCC collision_tiles_normal

CMP #$58        ; $54-57 = secret tiles, solid
BCC collision_tiles_solid


; add more secret tile checks if needed

; ----------------------
; ----------------------

collision_tiles_normal:
CMP $034A       ; old detour  (range check)
BCS collision_tiles_solid

JMP $F14E       ; non-obstacle

; ----------------------
; ----------------------

collision_tiles_solid:
JMP $F11E       ; solid tile



; NOTE:
; If something other than Bank 04 needs to be restored,
; check 8000-8003 and swap banks accordingly

So far nothing bad is happening. But that Bank 04 should be on alert.


Code: [Select]
old code:
           $07:F116: 20 FA ED  JSR $EDFA
           $07:F119: CD 4A 03  CMP $034A = #$89
           $07:F11C: 90 30     BCC $F14E


=============================
=============================


Your source code is good reading material. ;)

Easy to read. Clean and for me easy to follow. I'm jealous now.


=============================
=============================


The flute correctly warps to each dungeon entrance in Quest 1. Will this be changed for Quest 2?

And oh! If MMC5 is used, I request that the extra sound channel is somehow used to recreate the FDS sounds and music.
« Last Edit: May 05, 2020, 09:18:45 pm by stratoform »

ShadowOne333

  • Hero Member
  • *****
  • Posts: 1478
    • View Profile
Re: Zelda 1 Redux / The Legend of Zelda Redux
« Reply #261 on: May 05, 2020, 09:22:20 pm »
Ah that was it, the 23 was borking me over hahaha

Oh neat!
I was doing the bank switch with bank 05 when you edited the message.
I have now implemented it, and it seems to be working.

If you bump into it while walking with Link, you stop where it should.
There's only one bug I noticed, and I found it by mistake actually.

It seems the tile collision with the cracked walls is not checked when you are hit by an enemy.
For example, try the cracked wall right above the starting point, where Octoroks spawn.

Let one hit you while you stand right in front of it, and once one does, you'll see Link go pass the collision and hit the end of the cracked tile like it would if it didn't have collision.
You can get out of it easily by just walking out, and if you try going back in, the collision will hit again.

It seems to only happen when an enemy hits you.

Tbh, it's such a small bug, that I'm quite okay with it, since it doesn't feel as important, it's just niche haha

Thank you so much, stratoform, I never expected that just out of the blue someone would jump in and help with almost all of the remaining bugs and things to do for the project :P
You just took out the great majority of them, now there's only a handful of things remaining!

Thanks again for all the work :D
I will upstream all this to the Github page, and make the appropriate changes in files to give you credit.
I will also edit the OP accordingly.

stratoform

  • Jr. Member
  • **
  • Posts: 82
    • View Profile
Re: Zelda 1 Redux / The Legend of Zelda Redux
« Reply #262 on: May 05, 2020, 09:44:09 pm »
That's hilarious actually. Interesting glitch too. I'll take a peek since I am curious.

But it was great helping out with small technical stuff! Can't say I can help with the others but I'll be lurking (and playing) otherwise. Thank you for this Redux! Nearly my (ideal) all-star definitive edition. :)


===========================
===========================


New question:
"Some creatures are weak against arrows."


Should this be changed back to the original hint now that flute works?
Quote
Literal translation: "There are some creatures that are weak against sound."
« Last Edit: May 05, 2020, 09:51:50 pm by stratoform »

ShadowOne333

  • Hero Member
  • *****
  • Posts: 1478
    • View Profile
Re: Zelda 1 Redux / The Legend of Zelda Redux
« Reply #263 on: May 05, 2020, 09:53:46 pm »
Sure thing!

I'm always around, so feel free to continue contributing or discussing anything you feel like to any of my projects!
There's also a Zelda 2 Redux project as well :)

I think right now it's only these two Zelda projects, I am not sure about the future :P

But all in all, thank you so much!
And I'm really glad you liked the hack so far :D


New question:
"Some creatures are weak against arrows."

Should this be changed back to the original hint now that flute works?

Actually, I might change it to:
"There are some creatures that are weak against arrows and sound."
« Last Edit: May 05, 2020, 10:24:42 pm by ShadowOne333 »

stratoform

  • Jr. Member
  • **
  • Posts: 82
    • View Profile
Re: Zelda 1 Redux / The Legend of Zelda Redux
« Reply #264 on: May 05, 2020, 10:29:57 pm »
That hint works better since you have both options.


Fixed the hit collision glitch. But it'll take a code rewrite.
Code: [Select]
; 07:EEFD = x1EF0D
LDA #$04   ; bank 04 (dungeons)
JSR $FFAC

JMP collision_hit_tiles_call


; 07:F116 = x1F126
LDA #$04   ; bank 04 (dungeons)
JSR $FFAC

JMP collision_tiles_call


; $04:BF00 = x13F10

collision_tiles_call:
JSR collision_tiles_sub
BCS collision_tiles_exit2

JMP $F14E       ; non-obstacle

collision_tiles_exit2:
JMP $F11E       ; obstacle



collision_hit_tiles_call:
JSR collision_tiles_sub
BCS collision_hit_tiles_exit2

JMP $EF05       ; non-obstacle

collision_hit_tiles_exit2:
JMP $EEE4       ; obstacle



collision_tiles_sub:
JSR $EDFA       ; old detour  (load tile #)

; ----------------------
; ----------------------

CMP #$54        ; $00-53 = old detour code
BCC collision_tiles_normal

CMP #$58        ; $54-57 = secret tiles, solid
BCC collision_tiles_solid


; add more secret tile checks if needed

; ----------------------
; ----------------------

collision_tiles_normal:
CMP $034A       ; old detour  (range check)
RTS

; ----------------------
; ----------------------

collision_tiles_solid:
SEC             ; solid obstacle
RTS



; NOTE:
; If something other than Bank 04 needs to be restored,
; check 8000-8003 and swap banks accordingly


Old code for hit collision:
Code: [Select]
; x1EF0D
 07:EEFD: 20 FA ED  JSR $EDFA
>07:EF00: CD 4A 03  CMP $034A = #$89
 07:EF03: B0 DF     BCS $EEE4

 07:EF05: B5 C0     LDA $C0,X @ $00C0 = #$08
 07:EF07: 29 0F     AND #$0F
 07:EF09: 20 B6 6F  JSR $6FB6


===============================
===============================


Note for myself. I was wondering why Famicom doesn't have the "screen transition blink". Turns out NMI handler has the classic PHP - PHA - TXA+PHA - TYA+PHA.

USA actually cuts it all out for speed so some loading code takes too long to run and the screen black frames for 2 VSYNCs. When it's done, NMI goes back on. Otherwise we'd get register corruption mania.


===============================
===============================


The arrow code is wicked impressive!


===============================
===============================


Arrow shop limit (30,60)

Code: [Select]
org $A423 // PRG $06423, PC 0x06433
ShopArrow: // $6B1C ID 02 at $7392. This ID is read and put into Y
cpy.b #$02 // Compare ID and end if not arrow
bne EndArrowShop
lda.w $0677 // Get arrow count
clc
adc.b #$1E // Give 30 arrows
ldx.w $0659 // Get arrow type (1,2)
cmp.w ArrowShopMax,x
bcc ArrowShopStore
lda ArrowShopMax,x // Limit arrows
ArrowShopStore:
sta.w $0677
EndArrowShop:
lda.b #$40                 
sta.b $29
rts

ArrowShopMax:
db $0,$1E,$3C // 0,30,60

NOTE: There's so much free space, you can move it up the bank now. ;)


======================================
======================================


Overworld arrow drop

Code: [Select]
// For Overworld
bank 4;
org $BFC0 // PRG $13FC0, CPU $0BFC0, PC 0x13FD0
GiveArrowDrop:
lda $AC,x // Check if the item is a arrow before it deletes.
cmp.b #$55
bne BackDeleting
txa
pha
lda.w $0677 // Get arrow count
clc
adc.b #$04 // Give 4 arrows
ldx.w $0659 // Get arrow type (1,2)
cmp.w ArrowDropMax,x
bcc ArrowDropStore
lda ArrowDropMax,x // Limit arrows
ArrowDropStore:
sta.w $0677
pla
tax
BackDeleting:
lda.b #$FF
sta.b $AC,x
sta.b $84,x
rts

ArrowDropMax:
db $0,$1E,$3C // 0,30,60

NOTE: There's some free space, you can move it up the bank now. ;)


Dungeon code is copy-paste so not posted. Done?
« Last Edit: May 05, 2020, 11:59:30 pm by stratoform »

ShadowOne333

  • Hero Member
  • *****
  • Posts: 1478
    • View Profile
Re: Zelda 1 Redux / The Legend of Zelda Redux
« Reply #265 on: May 06, 2020, 02:46:51 pm »
Oh damn man, you covered almost all of the remaining stuff in the project in like 2 days :P
The arrow and rupee code was all dne by Bogaa, so all that amazingness was his :D

I tried out your code for both the reworked cracked overworld tile fix, and the arrow max amount, and they both seem to be working fine in-game!

I had some trouble implementing the tiles fix, but it was all due to a bad transcription. :P

I tested it for a few mins and it seems to be going well, max amount of arrows properly changed from 30 with normal arrows, to 60 when you get the Silver Arrows, and the shop purchases work as intended.

So far so good! :D
Thank you for this!

I have updated the GitHub page, and also the OP to reflect the latest changes.

-----------------------------------------------------------

One thing outside of what's currently being done.
With the current implementation of the arrows thanks to bogaa's code, how would you guys feel about changing the order in which the icons appear in the HUD for numbered items?

Like, right now you have:  Rupees -> Arrow -> Keys -> Bombs.
I thought of something like:  Rupee -> Keys -> Arrows -> Bombs
I just think of it to like make it have a proper order of items, and if you have all items maxed out, it would be more in order too.
Or do you guys think it would just be changing things for the sake of changing things?

Original    /   Mockup
« Last Edit: May 07, 2020, 12:19:00 pm by ShadowOne333 »

CoolCatBomberMan

  • Jr. Member
  • **
  • Posts: 46
    • View Profile
Re: Zelda 1 Redux / The Legend of Zelda Redux
« Reply #266 on: May 06, 2020, 02:52:27 pm »
I don't really see the point in rearranging the item counters. And the original looks better.

SpringSonic9187

  • Jr. Member
  • **
  • Posts: 46
    • View Profile
Re: Zelda 1 Redux / The Legend of Zelda Redux
« Reply #267 on: May 06, 2020, 03:31:49 pm »
I don't really see the point in rearranging the item counters. And the original looks better.
Me neither. Just lets this be as a reference to how arrows were in the vanilla deal and call it a day.

ifightdragons

  • Jr. Member
  • **
  • Posts: 90
    • View Profile
Re: Zelda 1 Redux / The Legend of Zelda Redux
« Reply #268 on: May 06, 2020, 05:21:44 pm »
Actually, I'd put the keys at the bottom.

The rupees, arrows and bombs are easy to come by-consumables. Their numbers will constantly change. It makes perfect sense to group them together at the top.
The keys, however, are much rarer and more important items. It makes sense to keep them at the bottom, for a quicker visual reference and separation between the three consumables at the top.

Whenever stuck in the game because you're missing a key, you know JUST where to look by instinct, if the key is at the bottom. It's a smart QOL HUD design choice.


Pleiades7

  • Jr. Member
  • **
  • Posts: 30
    • View Profile
Re: Zelda 1 Redux / The Legend of Zelda Redux
« Reply #269 on: May 06, 2020, 08:05:52 pm »
Thank you for the feedback


Love the graphic changes!

Any plans to do any environmental changes too? (i.e. better trees, rocks, items. etc.)

Thought that might be cool too if the spirit moves you. Peace out.

triforce141

  • Jr. Member
  • **
  • Posts: 8
    • View Profile
Re: Zelda 1 Redux / The Legend of Zelda Redux
« Reply #270 on: May 07, 2020, 09:29:15 am »
The mockup has a good layout, if just for the fact that arrows and bombs are grouped together now; those being the consumables you would use the most during combat.

ShadowOne333

  • Hero Member
  • *****
  • Posts: 1478
    • View Profile
Re: Zelda 1 Redux / The Legend of Zelda Redux
« Reply #271 on: May 07, 2020, 12:17:03 pm »
The mockup has a good layout, if just for the fact that arrows and bombs are grouped together now; those being the consumables you would use the most during combat.

That was actually my reasoning behind the change.
Move theicons around to group them together in according to their use, and also to make tem fit somewhat with other games like ALttP.

Arrows and bombs are usually grouped together, so that's why I want to flip ONLY the key and arrow icons, so bombs and arrows are together and both consumables can be seen in a quick glance.

Moving the key at the bottom would require moving all 3 icons (key, arrows, bombs), and this would require more changes than wanted, since moving the counters is no easy fit at all.
Besides, I think having them in the RUPEE - KEY - ARROWS - BOMBS order gives the HUD a good aesthetic, more user friendly in terms of visibility and readibility from the player.

Love the graphic changes!

Any plans to do any environmental changes too? (i.e. better trees, rocks, items. etc.)

Thought that might be cool too if the spirit moves you. Peace out.

Thanks!
I've already changed the rocks and water/sand graphics, and the items as well to match official artwork too (forgot to mention those).

Only things I haven't changed are trees and the waterfalls I believe, I'll see what I can do for those

MaruMaru

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Zelda 1 Redux / The Legend of Zelda Redux
« Reply #272 on: May 07, 2020, 02:16:30 pm »
This is looking great! Can't wait to give it a try!

nosynose

  • Jr. Member
  • **
  • Posts: 41
    • View Profile
Re: Zelda 1 Redux / The Legend of Zelda Redux
« Reply #273 on: May 08, 2020, 02:52:57 am »
Actually, I'd put the keys at the bottom.

The rupees, arrows and bombs are easy to come by-consumables. Their numbers will constantly change. It makes perfect sense to group them together at the top.
The keys, however, are much rarer and more important items. It makes sense to keep them at the bottom, for a quicker visual reference and separation between the three consumables at the top.

Whenever stuck in the game because you're missing a key, you know JUST where to look by instinct, if the key is at the bottom. It's a smart QOL HUD design choice.

I second this (RUPEE, ARROW, BOMB, KEY):
They are ordered by their occurences, ARROW and BOMB are grouped together, and we can monitor RUPEE and KEY effortlessly since they occupy the top and bottom positions respectively.

Pleiades7

  • Jr. Member
  • **
  • Posts: 30
    • View Profile
Re: Zelda 1 Redux / The Legend of Zelda Redux
« Reply #274 on: May 08, 2020, 11:22:02 am »

how would you guys feel about changing the order in which the icons appear in the HUD for numbered items?

Like, right now you have:  Rupees -> Arrow -> Keys -> Bombs.
I thought of something like:  Rupee -> Keys -> Arrows -> Bombs
I just think of it to like make it have a proper order of items, and if you have all items maxed out, it would be more in order too.

Original    /   Mockup


Do it! Its a great idea. Just because this is a great game doesn't mean it is without its flaws. So, yeah, fix this flaw! Makes more sense anyways. And it doesn't need to be an optional hack since it is a quality of life improvement.

jimstrom

  • Jr. Member
  • **
  • Posts: 58
    • View Profile
Re: Zelda 1 Redux / The Legend of Zelda Redux
« Reply #275 on: May 08, 2020, 01:32:29 pm »
I second this (RUPEE, ARROW, BOMB, KEY):
They are ordered by their occurences, ARROW and BOMB are grouped together, and we can monitor RUPEE and KEY effortlessly since they occupy the top and bottom positions respectively.

I third it, makes the most sense.

The3Dude

  • Full Member
  • ***
  • Posts: 191
    • View Profile
Re: Zelda 1 Redux / The Legend of Zelda Redux
« Reply #276 on: May 09, 2020, 01:05:55 pm »
Instead of Rupee, Arrow, Bomb, Key. You should do Rupee, BOMB, Arrow, Key.

Thats how Alttp Lists them. And keys are added to the side only when in dungeons.
~The3Dude~

ultimaweapon

  • Sr. Member
  • ****
  • Posts: 250
    • View Profile
Re: Zelda 1 Redux / The Legend of Zelda Redux
« Reply #277 on: May 10, 2020, 12:19:30 am »
I agree with Rupee, Bomb, Arrow, Key.
Trust in the Heart of the Cards

ShadowOne333

  • Hero Member
  • *****
  • Posts: 1478
    • View Profile
Re: Zelda 1 Redux / The Legend of Zelda Redux
« Reply #278 on: May 10, 2020, 02:59:57 pm »
Turns out actually moving the HUD items wasn't as hard as I thought, but I think mainly because both Bogaa and stratoform had done such amazing job with the Rupees and Arrows code that they made this way easier for me.

So this is the code at hand:
https://github.com/ShadowOne333/The-Legend-of-Zelda-Redux/blob/55c13a7f1058fb215bda1cdbcb66b25380540560/code/move_maps.asm#L321-L325

Code: [Select]
// Reorganize Keys and Arrows in HUD
db $20,$6C,$03,$62,$00,$24 // Rupees
db $20,$8C,$03,$62,$64,$24 // Keys
db $20,$CC,$03,$62,$03,$00 // Bombs
db $20,$AC,$03,$62,$00,$24 // Arrows
This is already in the order I wanted it (Rupees -> Keys -> Arrows -> Bombs).

That should be located at 0x16C96 in the ROM.
If you want Rupees -> Arrows -> Bombs -> Keys, then you need to make the following changes:

Code: [Select]
// Reorganize Keys and Arrows in HUD
db $20,$6C,$03,$62,$00,$24 // Rupees
db $20,$CC,$03,$62,$64,$24 // Keys
db $20,$AC,$03,$62,$03,$00 // Bombs
db $20,$8C,$03,$62,$00,$24 // Arrows

You can also make the changes with any hex editor, should take less than 30 secs to do it.

You only need to change the byte after the "20" so they show up in that order. That's it.
I might see about making it an optional patch, still unsure though.

------------------------------------------------------------------------

Also, one REALLY odd stuff I found out today.
If you change the tile for the bombs in the HUD to a blank, the game refuses to change screens at all.
Try it out, open the game in a Tile Editor, modify the bomb icon used in the HUD to blank it out, and load the game again. The game just refuses to change screen when you reach the edge of the screen, and then freezes right away.
This is SO weird, I don't know why it does that haha.

Just a little bit of info I found amusing, nothing else.
« Last Edit: May 10, 2020, 05:23:37 pm by ShadowOne333 »

Vanya

  • Hero Member
  • *****
  • Posts: 1753
    • View Profile
Re: Zelda 1 Redux / The Legend of Zelda Redux
« Reply #279 on: May 12, 2020, 02:28:09 am »
It isn't maybe sprite 0?