A link between overworlds

Page 2 of 2 Previous  1, 2

View previous topic View next topic Go down

Re: A link between overworlds

Post by moegami on Mon 12 Aug 2013 - 12:45

I would have no idea how to make that. Is it possible to apply the way you were able to make the screen transition to the dark world to a custom exit or something?

OR I could just put an entrance in the castle areas that leads outside of it but that would be odd
avatar
moegami
Elite ROM Hacker
Elite ROM Hacker

Since : 2013-07-04

http://zeniea.com

Back to top Go down

Re: A link between overworlds

Post by Conn on Mon 12 Aug 2013 - 13:06

I'd say you go for the easiest solution since this is least bug affective (as you've seen with my try, ASM almost always has side effects (bugs) which drive me into madness sometimes. Wink
If you can make a cave with 2 exits, one in the overworld, the other in the darkworld this would probably be best and doable with HM I guess.
avatar
Conn
Zelda God - Administrator
Zelda God - Administrator

Since : 2013-06-30

Back to top Go down

Re: A link between overworlds

Post by moegami on Mon 12 Aug 2013 - 13:09

Well the problem with that is if you go into a cave in the light world you cant come out into the dark world bug free. It will load the dark world map but upon changing screens it will put you in the light world again, like in sephs video.

Your method managed to take you to the dark world but leaving that screen is still eh, but even though its in the wrong place its still in the dark world properly. So what I could do is do the screen transition and put a an entrance in that area so there is no more screen transitions.

So either way it requires some asm as far as I know, at least with this method we can properly make it into the dark world without a warp to some extent.
avatar
moegami
Elite ROM Hacker
Elite ROM Hacker

Since : 2013-07-04

http://zeniea.com

Back to top Go down

Re: A link between overworlds

Post by Conn on Mon 12 Aug 2013 - 13:28

Ah I see, the dark world flag 7ef3ca-40 will not be set. Yes, send me a rom with 2 caves that have entrance in light world and exits in dark world with bird in front of the light world entrances. I think I can set the 40 when leaving.
Will do that tomorrow I think. I am hacking now 4 weeks in a row and need a break. So after this and SePH's deku seed I'll take one...
avatar
Conn
Zelda God - Administrator
Zelda God - Administrator

Since : 2013-06-30

Back to top Go down

Re: A link between overworlds

Post by moegami on Mon 12 Aug 2013 - 16:27

Thanks for that, I've sent the rom hopefully it's not too confusing to navigate.
avatar
moegami
Elite ROM Hacker
Elite ROM Hacker

Since : 2013-07-04

http://zeniea.com

Back to top Go down

Re: A link between overworlds

Post by Potentialing on Mon 12 Aug 2013 - 19:05

moegami wrote:I can't say I know how to apply those myself :? If I were to send you a rom with the new layout could you apply it to those areas?
Alternatively, you could just ask for the ASM file. Just amend it to the Overlord.asm I gave you, or patch it to the rom before/afterwards manually. It'll probably be better in the long run too, imo.
avatar
Potentialing
Rank: Hardhat Beetle
Rank: Hardhat Beetle

Since : 2013-07-04

Back to top Go down

Re: A link between overworlds

Post by XaserLE on Tue 13 Aug 2013 - 0:30

Interesting at this point is, there seems to be a hidden counter that holds the position in the grid layout that represents the map.

XaserLE
Elite ROM Hacker
Elite ROM Hacker

Since : 2013-01-22

Back to top Go down

Re: A link between overworlds

Post by Conn on Tue 13 Aug 2013 - 5:48

sent you a ips with the dark world flag enabled.
avatar
Conn
Zelda God - Administrator
Zelda God - Administrator

Since : 2013-06-30

Back to top Go down

Re: A link between overworlds

Post by moegami on Tue 13 Aug 2013 - 6:50

It works beautifully! Though the music doesn't change between the two they probably wont have new music anyway. It's awesome that the bunny link works properly too!
Thanks so much for this conn it's amazing!
avatar
moegami
Elite ROM Hacker
Elite ROM Hacker

Since : 2013-07-04

http://zeniea.com

Back to top Go down

Re: A link between overworlds

Post by Conn on Tue 13 Aug 2013 - 7:02

You're welcome Smile
But during the castle music transition the music ~must~ reload, since it is overworld-dungeon-overworld bank (wasn't able to test this since your exit in the rom you sent was corrupt).

The village uses overworld theme, so if you can switch it to the dungeon music bank (as you did with the castle music indoors) it surely will reload as well.
avatar
Conn
Zelda God - Administrator
Zelda God - Administrator

Since : 2013-06-30

Back to top Go down

Re: A link between overworlds

Post by Puzzledude on Tue 13 Aug 2013 - 7:06

Nice to see this work. The bunny and all the rest works because of what Conn calls the flag +40 to set the dark world. Also, have you tested this backwards (since then the flag must return -40).
 
Srm issue. When you are defeated, it will autoload light world if Agahnim-1 has not been defeated. So if you are in part1 mode, no srm saves can be defined on the right side. You can however skip from beginning to part2 (which I think you want to do from previous posts, since this is the only way to collect crystals early). Then the right side can have a srm start, which is a white exit dot with the exit from room 32.
 
The music will autoload overworld music, but luckily you can change that with Conn's custom music patch in recently released ASM pack.
avatar
Puzzledude
Elite ROM Hacker
Elite ROM Hacker

Since : 2012-06-20

Back to top Go down

Re: A link between overworlds

Post by Conn on Tue 13 Aug 2013 - 7:48

Of course I thought about reversing the flag Wink

The code goes like this:
Code:
pc (w/o header): 01/6551
64 8b 9c 0b 04 -> 22 00 80 22 ea

pc: 11/0000
STZ $8B        ; repeat overwritten code
STZ $040B    
LDA $A2        ; load exit you've taken
CMP #$60      ; compare if it matches one exit you need to set a flag          
BNE $03  
JMP $8040     ; jump overworld flag
CMP #$62              
BNE $03    
JMP $8070        ; jump darkworld flag
CMP #$F2    
 BNE $03  
JMP $8040       ; jump overworld flag
CMP #$F3            
BNE $03  
JMP $8070       ; jump darkworld flag
RTL

11/0040:
LDA #$00            
STA $7EF3CA ; set overworld flag
STZ $02E0     ; erase bunny mode
JMP $8023     ; rtl would have been better on second thought but works as well
        
LDA #$40      ; set dark world flag
STA $7EF3CA
JMP $8023  
The music will autoload overworld music, but luckily you can change that with Conn's custom music patch in recently released ASM pack.
Misunderstoodment: the problem with the current hack is that you'll first hear darkworld music as soon you proceed one further screen once you've taken the exit. This can be prevented by assign a dungeon theme into the transition cave. Currently Moegami assigned village there. This plays music from bank 1 - overworld (Kakariko houses play same music as the overworld). For this reason there is no music reload when you get into the first screen darkworld.
If you want to have dark world music in the first screen after you exit, you need to force this by giving the village transition a bank 2 theme (cave, castle, dungeon...). Should be doable with HM, since you also use castle music in the second transition cave.

Code:
Bank 1 Overworld:
-01 Triforce + title screen
-02 Overworld
-03 Rain
-04 Rabbit
-05 Lost Woods
-06 Introduction
-07 Kakariko Village
-08 Portal SFX
-09 Dark World
-0A Master Sword
-0B Name select screen
-0C Guard summoned
-0D Skull Woods
-0E Minigame
-0F Title screen only

Bank2, indoors:
-10 Hyrule Castle
-11 Light World dungeon
-12 Cave
-13 Medallion/crystal acquired
-14 Sanctuary
-15 Boss
-16 Dark World dungeon
-17 Fortune Teller
-18 Cave (appears to be identical to -12)
-19 Zelda rescued in prison
-1A Sage rescued in crystal
-1B Fairy spring
-1C Ganon's theme only
-1D Ganon appears in Agahnim's shadow
-1E Face-to-face + Ganon's theme
-1F Ganon battle
avatar
Conn
Zelda God - Administrator
Zelda God - Administrator

Since : 2013-06-30

Back to top Go down

Re: A link between overworlds

Post by moegami on Tue 13 Aug 2013 - 8:17

It took me awhile to figure out what you meant by the music problem but i understand now because of the transition cave I used for the dark world ( from kakariko ) I'll have to do some overworld and light dungeon editing so these transitions happen smoother and the music works correctly, but aside from that I haven't experienced any bugs. I'll probably make it so you have the moon pearl ( or whatever I call it ) before you cross over to the other world to avoid any confusion. Seems like the castle will be my next project

Puzzledude wrote:
Srm issue. When you are defeated, it will autoload light world if Agahnim-1 has not been defeated. So if you are in part1 mode, no srm saves can be defined on the right side. You can however skip from beginning to part2 (which I think you want to do from previous posts, since this is the only way to collect crystals early). Then the right side can have a srm start, which is a white exit dot with the exit from room 32.
 
If you could help me or refer me to anyone who can help set up that skip to part2 function that would be really helpful.
avatar
moegami
Elite ROM Hacker
Elite ROM Hacker

Since : 2013-07-04

http://zeniea.com

Back to top Go down

Re: A link between overworlds

Post by Puzzledude on Tue 13 Aug 2013 - 8:48

Nice of you to post the actual code, so I can test this in Alttp to see how it works.
 
CMP #$60
So the exit 0060 was choosen, this is room 96 by the way, which is the left exit of Hyrule castle in the original.
 
This can be prevented by assign a dungeon theme into the transition cave. Currently Moegami assigned village there.
I didn't know that the village music was indoors, since it is an exception and can not be in a transition cave.
 
If you could help me or refer me to anyone who can help set up that skip to part2 function that would be really helpful.
I think the fastest way is to play Goddess of Wisdom on snes9x and make a savestate (which is compatible with Geigers tracer Conn is using) just before bringing Zelda to the priest. Then Conn does not need to write any new codes, but rather trace it and copy it from GoW to your rom (I thinks he hasn't had a brake in 4 weeks). I think this is 1 byte only, the event byte, which must be 02 instead of 01, but this is in the ROM, don't know about RAM.
 
But, if you want the jump when talking to your uncle (I think you want to cross out the church and priest and Zelda), you need a savestate before talking to uncle (removing uncle is not recomended for various reasons). Then this is traced. I think this can be done with the compare opcode: compare if you have sword1 or above (only way to get it is talking to uncle), if yes, then jump to the same code as when talking to priest in GoW (so you need that savestate regardless).
avatar
Puzzledude
Elite ROM Hacker
Elite ROM Hacker

Since : 2012-06-20

Back to top Go down

Re: A link between overworlds

Post by Conn on Tue 13 Aug 2013 - 9:17

Ah in that case you can need it, here's the asm (bit updated) with free space on pc 11/0000 as you can use it in xkas (but please test though, I am not so familiar with asm texts). You only need to replace the 11/0000 (22/8000) in case you have unused place somewhere and no need to extend the rom then. If you need more than 2 caves you can simply add them as well.
I'd suggest making these caves first available after you got the moonpearl so that you aren't bunny in those caves (and use warps before).

Code:

; Alttp (US) without header, extended pc 11/0000 is used!
lorom

org $02E551
jsl $228000    ;pc 11/0000!
nop

org $228000     ; pc $11/0000!
STZ $8B        ; repeat overwritten code
STZ $040B    
LDA $A2        ; load exit you've taken
CMP #$60      ; compare overworld exit1        
BNE $03  
JMP oflag  
CMP #$62      ; compare dungeon exit1        
BNE $03    
JMP dflag
CMP #$F2     ; compare overworld exit2  
BNE $03  
JMP oflag
CMP #$F3     ; compare darkworld exit2  
BNE $03  
JMP dflag      
RTL

oflag:
LDA #$00            
STA $7EF3CA ; set overworld flag
STZ $02E0     ; erase bunny mode
RTL
 
dflag:      
LDA #$40      ; set dark world flag
STA $7EF3CA
RTL
I didn't know that the village music was indoors, since it is an exception and can not be in a transition cave.
I'm not sure he chosen it... He used village indoors, and village indoors ever play overworld music (either kakariko or overworld, depends which part of the game you are, as we found out).
avatar
Conn
Zelda God - Administrator
Zelda God - Administrator

Since : 2013-06-30

Back to top Go down

Re: A link between overworlds

Post by Puzzledude on Tue 13 Aug 2013 - 11:02

This is what I got as main code
64 8B 9C 0B 04 A5 A2 C9 60 D0 03 4C 24 80 C9 62 D0 03 4C 2E 80 C9 F2 D0 03 4C 24 80 C9 F3 D0 03 4C 2E 80 6B A9 00 8F CA F3 7E 9C E0 02 6B A9 40 8F CA F3 7E 6B
 
However the game will not allow the jsl jump at all. Try this
at 16551, 22 00 80 22 EA, and at 110000, 64 8B 9C 0B 04 6B. This should be equal to original, but no normal exit works in the game, which is odd, since nothing is changed.
 
Don't know how moegami got it working, since when you apply the jump (no new code inserted), none of the exits work. But that's ok, if he has the version which works for him.
 
I've also tried the short jump to 17F70 (empty), same result.
avatar
Puzzledude
Elite ROM Hacker
Elite ROM Hacker

Since : 2012-06-20

Back to top Go down

Re: A link between overworlds

Post by Puzzledude on Tue 13 Aug 2013 - 11:53

EDIT
FOUND the problem. The game must be expanded to 2MB, otherwise all exits crash the game (I had it on 1.089, ended just after the end of code). What's up with that?? No logic at all. Reminds me of zcompress (works only if the file is at certain size). It seems like the jump makes the rom fragile if at wrong size (1101F0 gave me a message, corrupt hirom, which is all wrong, since this is a lorom, but if the size is 1FFFFF= 2.048 KB all is ok).
avatar
Puzzledude
Elite ROM Hacker
Elite ROM Hacker

Since : 2012-06-20

Back to top Go down

Re: A link between overworlds

Post by Conn on Tue 13 Aug 2013 - 12:28

Yes, roms will crash if the size doesn't fit! There is an ingame header that checks the size. Always use lunar expand: [You must be registered and logged in to see this link.]
If you apply this asm on a 1MB ALTTP, xkas will expand the rom, but then it of course crashes! Lunar expand will set the correct byte in the ingame header (not that start $200 byte header thing, another very important one).

If you want to have it work on native ALTTP  try this (main code directly below the last special treasures hack)
Please tell whether it worked:




Code:

; Alttp (US) without header,

lorom
org $02E551
jsl $0eff00    ;pc 07/F000!
nop

org $0eff00     ; pc $07/F000!
STZ $8B        ; repeat overwritten code
STZ $040B    
LDA $A2        ; load exit you've taken
CMP #$60      ; compare overworld exit1        
BNE $03  
JMP oflag  
CMP #$62      ; compare dungeon exit1        
BNE $03    
JMP dflag
CMP #$F2     ; compare overworld exit2  
BNE $03  
JMP oflag
CMP #$F3     ; compare darkworld exit2  
BNE $03  
JMP dflag      
RTL

oflag:
LDA #$00            
STA $7EF3CA ; set overworld flag
STZ $02E0     ; erase bunny mode
RTL
 
dflag:      
LDA #$40      ; set dark world flag
STA $7EF3CA
RTL
Edit:
I also tried to erase bunny mode when entering a the transition cave from dark world, there you have to use the entrances, which are in Moegami's rom 0e and 05. The additional asm would look like this:

Code:

; Alttp (US) without header,

lorom
org $02DA14
jsl $0EFF50 ; below above flag set code in native ALTTP not extended here

org $0EFF50
and #$00ff
tax
cpx #$000e ; entrance from dark world1
bne $03
jmp erase
cpx #$0005 ; entrance from dark world2
bne $03
jmp erase
rtl

erase:
stz $02e0
rtl
I used a similar code to reload the native AST tileset in SePH's hack. There it worked flawlessly. If I try it however with Moegami, a palette bug will occur (red pixels in Link's face):

[You must be registered and logged in to see this image.]

I'm not sure whether it is caused by minish cup tileset or another thing... I would however make the transition cave after you've got the moonpearl. Before it, you can use normal warps.
avatar
Conn
Zelda God - Administrator
Zelda God - Administrator

Since : 2013-06-30

Back to top Go down

Re: A link between overworlds

Post by Puzzledude on Wed 14 Aug 2013 - 7:37

to moegami
 
This is how the ASM looks like after assembled with xkas. I've tested it and it works (it is recommended to have the Moonpearl before this transition). The additional bunny asm makes some problems to the palettes and makes the main sprite animation of walking (moving) slower. So this can be avoided by not using that code and having the Moonpearl. 
 
at 16551, (new pointer)
22 00 FF 0E EA
 
 
at 77F00, (new code= asm in hex)
64 8B 9C 0B 04 A5 A2 C9 60 D0 03 4C 24 FF C9 62 D0 03 4C 2E FF C9 F2 D0 03 4C 24 FF C9 F3 D0 03 4C 2E FF 6B A9 00 8F CA F3 7E 9C E0 02 6B A9 40 8F CA F3 7E 6B
-----------------------
 
these are the connections
 
light world <------>dark world
 
entr 03/ exit 60 <------> entr 05/ exit 62
 
entr 0D/ exit F2 <------> entr 0E/ exit F3
 
-------------------
 
You need one more fix actually. The entrances you've choosen are special. Hyrule castle doors wont open in part2 mode in Alttp (would lead to game paradox). This is fixed in hex directly, by changing 2 bytes.
 
found by Euclid
Make Hyrule Castle doors (entrances 03, 04, 05, 24) open again after beating Agahnim (which is in part2 mode).
 
rom with no header
address DBC9E,
old values= B0 21
Change to EA EA.
avatar
Puzzledude
Elite ROM Hacker
Elite ROM Hacker

Since : 2012-06-20

Back to top Go down

Re: A link between overworlds

Post by moegami on Wed 14 Aug 2013 - 9:10

Alright so I've inserted the first two without issues however when I look to the address DBC9E the values are 13 22. Should I still change it to EA EA? I'm not sure if you are using the original lttp rom so it may be different on a rom like mine that has been altered.

When it comes to the moon pearl I'll definitely make it available before this transition area is accessed, unless anyone knows if theres an address I can change that makes it so the moon pearl is always in effect. That way whenever I get to the task of the menu I could just remove the moon pearl in general.

As soon as this is done I'll probably go hunting in goddess of wisdom for whatever byte was used to skip to part 2.
avatar
moegami
Elite ROM Hacker
Elite ROM Hacker

Since : 2013-07-04

http://zeniea.com

Back to top Go down

Re: A link between overworlds

Post by Puzzledude on Wed 14 Aug 2013 - 9:40

This is the standard US non-headered rom, which I'm using
[You must be registered and logged in to see this link.]

These two bytes should be the same for your modified rom as well. So do not change it, if it is not B0 21.

You can try to use the search for hex bytes and enter this
C9 03 00 B0 21
and change the last two accordingly.


At 274DD, change 00 to 01 to always have the pearl - you must start a new game to see the change, no savestates or other srms. This is compatible to all Zelda3 files (srm section). Will not be removed from menu though (removing it from menu is a difficult job).

Both addresses (DBC9E and 274DD are accurate in the upper rom).


In GoW the jump from beginning to part2 is made when bringing Zelda to the church. I guess you or someone else needs to trace this with Geigers snes9x tracer, to see which bytes are affected in RAM.
avatar
Puzzledude
Elite ROM Hacker
Elite ROM Hacker

Since : 2012-06-20

Back to top Go down

Re: A link between overworlds

Post by moegami on Wed 14 Aug 2013 - 13:38

Oh cool searching for those hex bytes worked and now it's changed. As it pertains to that jump to part2 byte, I'll go looking for that now but I'm wondering if there are any other events in part1 I could possibly apply it to without it bugging out. Because I'm pretty sure it has to happen in a dungeon because it's changing the overworld sprites.

Also, a bit unrelated but do you happen to know if it's possible to change the item the old man gives you ( from death mountain ) as well as the door he walks into ( hopefully it's not a hardcoded location )
avatar
moegami
Elite ROM Hacker
Elite ROM Hacker

Since : 2013-07-04

http://zeniea.com

Back to top Go down

Re: A link between overworlds

Post by Puzzledude on Wed 14 Aug 2013 - 22:57

You can apply the jump to part2 to any event indoors in beginning or part1. One example is talking to uncle, other is obtaining any item. For instance check for the lamp, if yes on having the lamp, jump to the same code as GoW when talking to the priest. But this is advanced asm.

I know there's one byte which controls what you get from both old guys (shoes and mirror), I think only the shoes were found. The door he walks in is actually a sprite and can be changed. The bigger problem is how to make him appear in the new cave.
avatar
Puzzledude
Elite ROM Hacker
Elite ROM Hacker

Since : 2012-06-20

Back to top Go down

Page 2 of 2 Previous  1, 2

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum