A link between overworlds

Page 1 of 2 1, 2  Next

Go down

A link between overworlds Empty A link between overworlds

Post by scawful Sun 11 Aug 2013 - 18:29

As you can read in my hacks development thread I was discussing with puzzledude the possibilities of crossing over to the dark world without a teleport. He recommended using a standard connection entrance recoded with asm to switch the byte from light world to dark world, however I'm just learning how to do SNES asm and I couldn't pull something like this off.

So I'm wondering if there is anyone with more asm experience that would be willing to help me out to create a way to cross between the light and dark world bug free without a warp. I would plan to really only use this at 2 points if possible, one being the castle and the other being the castle garden as a means of sneaking in on one world and coming out in another. It would be really great if someone could help me out because a lot of my main idea goes into "combining" the two overworlds.
scawful
scawful

A link between overworlds Image211

Since : 2013-07-04

http://zeniea.com

Back to top Go down

A link between overworlds Empty Re: A link between overworlds

Post by Conn Sun 11 Aug 2013 - 19:06

The switch between light and dark world is 7ef3ca: if 00= light world, if 40 dark-world, naturally since the dark world screens have always the value 40 more than the light world screens

If you make a screen transition, 7Ef3ca will be added to the screen you enter (7E/008a).
So you enter screen 2c.
if you are in light world it stays 2c (00), if dark world 7ef3ca with the value 40 will be added, so screen 6c.

You can simply try this on your emulator. Cheat on Light world with
7ef3ca-40, enter the next screen and you are in dark world... but not without graphical glitches.
The only way to get rid of the glitches is to reload the screen in a mosaic way (similar as when you enter lost woods). The same is happening when using a transport.
So you'd only have the possibility to switch to dark world if you can reload the screen in the mosaic way (if not using warp).

But why do you want to renounce on a warp?
Conn
Conn

A link between overworlds Image212

Since : 2013-06-30

Back to top Go down

A link between overworlds Empty Re: A link between overworlds

Post by scawful Sun 11 Aug 2013 - 19:14

The rom I'm using has mosaic warps on every screen so that wouldn't be a problem, the reason for not using a warp is because I want to cross over on one side and come out the other and using a warp would put me on the opposite side of the map in a geographical sense.
scawful
scawful

A link between overworlds Image211

Since : 2013-07-04

http://zeniea.com

Back to top Go down

A link between overworlds Empty Re: A link between overworlds

Post by Conn Sun 11 Aug 2013 - 20:00

Still not understand... are you using the same overlay as SePH does, so you only have 40 screens or why are you exit on opposite? I know nothing about your project and what your problem is... sorry.
If you use a warp in 2c you end up in 6c, where do you want to exit then?

The code is this
Code:

$02/AA7D BF EC A5 02 LDA $02A5EC                                ; Load screen value - here it is lost woods, screen 00
$02/AA81 0F CA F3 7E ORA $7EF3CA[$7E:F3CA]   A:0000  ; ora dark world; if 40, a 40 will be added
$02/AA85 85 8A       STA $8A    [$00:008A]   A:0000; A:0000, means you are in lost woods light world
$02/AA87 8D 0A 04    STA $040A  [$00:040A]   A:0000
You can hijack the code at
pc $01:2A81 (snes: $02/AA81), make a check, like cmp #$2c if you want screen 2c dark, then make an adc 40 and save.
But then this screen will always be dark world and there is no light world 2c, since there is no normal way to enter light world 2c anymore!


Last edited by Conn on Sun 11 Aug 2013 - 20:09; edited 1 time in total
Conn
Conn

A link between overworlds Image212

Since : 2013-06-30

Back to top Go down

A link between overworlds Empty Re: A link between overworlds

Post by scawful Sun 11 Aug 2013 - 20:03

I'm not using the overlay seph uses to make the dark world BG2 if that's what you mean.

Essentially I want to make it so you can go into an entrance ( or make a screen transition ) at the far right part of the light world and come out of the far left part of the dark world bug free. I don't want to replace any areas I just want a safe way to travel between the two.
scawful
scawful

A link between overworlds Image211

Since : 2013-07-04

http://zeniea.com

Back to top Go down

A link between overworlds Empty Re: A link between overworlds

Post by Conn Sun 11 Aug 2013 - 20:21

Ah, I understand. No problem, just send me the rom, con.s@gmx.de and tell me from which screens to which screens you need that implemented.
But: what happens now if you just open a walkthrough like you exit from 0f, zora to the right? Will you get in 10?
Conn
Conn

A link between overworlds Image212

Since : 2013-06-30

Back to top Go down

A link between overworlds Empty Re: A link between overworlds

Post by scawful Sun 11 Aug 2013 - 20:38

I sent you the rom, but I'm confused what you mean. Can you rephrase that?
scawful
scawful

A link between overworlds Image211

Since : 2013-07-04

http://zeniea.com

Back to top Go down

A link between overworlds Empty Re: A link between overworlds

Post by Conn Sun 11 Aug 2013 - 20:57

ok, got it and for 1e to 58 I can make and test the transition,
for 17 to 50 I must do it blindly I guess...

To understand correctly: use the flute, warp3 (1e) walk to the right and get into 58? the same for 17-50. Will do that tomorrow.

Rephrase: I wonder in which screen you end up when walking right in 1e without me hacked it.
Conn
Conn

A link between overworlds Image212

Since : 2013-06-30

Back to top Go down

A link between overworlds Empty Re: A link between overworlds

Post by scawful Sun 11 Aug 2013 - 21:00

Err I figured if it worked for 1E to 58 it would work for 17 to 50, if you'd like me to clear up that area too I can.

When you walk off the world without the hack it gives some loop bug and doesnt really load anything but a mess of graphics.
scawful
scawful

A link between overworlds Image211

Since : 2013-07-04

http://zeniea.com

Back to top Go down

A link between overworlds Empty Re: A link between overworlds

Post by XaserLE Mon 12 Aug 2013 - 4:04

The mosaic transit is no problem, i already have code to make this possible on certain areas. It's surely not the best to use it on all areas. I remember this was the only one thing in parallel worlds i would have criticized, too much mosaic transits.

@Conn: I don't thought it is this easy (that the mosaic transit reloads the tileset). The problem actual is, that the game doesn't load the right tileset in my test. Have you tested it? I set 7EF3CA to 40, music works, enemys work, but the tileset is wrong. I tried to manually set 7E008A to the specific area i go to (normal area + 0x40) but this doesn't changed anything.

XaserLE

A link between overworlds Image111

Since : 2013-01-22

Back to top Go down

A link between overworlds Empty Re: A link between overworlds

Post by Puzzledude Mon 12 Aug 2013 - 6:36

Rephrase: I wonder in which screen you end up when walking right in 1e without me hacked it.
You would go off screen, into a Loop bug. 1E is the most right area. You can not walk more to the right (on original Alttp).

I was hoping that the one byte change would do the rest automatically (load rabbit if no moonpearl, reload gfx and pal). If this actually happens, needs to be tested.

I guess we need to step on the warp and then trace to see, what has changed since before the warping.
Puzzledude
Puzzledude

A link between overworlds Image213

Since : 2012-06-20

Back to top Go down

A link between overworlds Empty Re: A link between overworlds

Post by Conn Mon 12 Aug 2013 - 11:59

Technically it works. Got to dark world into the desired screens, however it will break if I move. Maybe it's due to the tiles. Dunno. Sent you the rom moegami.

Code:

changes:
all addresses pc w/o header!

01/2a81: 0f ca f3 7e -> 22008022

11/0000:
TAX               ;transfer supposed screen number to X      
LDA $8A           ; load old screen number
CMP #$17              
BNE $03    
JMP $8030        ; jmp 11/0030 if entrance screen =17
CMP #$1E                
BNE $03    
JMP $8050        ; jmp 11/0040 if entrance screen =1e
CMP #$50                
BNE $03    
JMP $8070        ; jmp 11/0050 if entrance screen =50
CMP #$58                
BNE $03    
JMP $8090        ; jmp 11/0060 if entrance screen =58
TXA                    
ORA $7EF3CA          
RTL

11/0030:
CPX #$10         ; compare supposed screen with 10    
BNE $09
lda #$40          ; if match load new screen instead start with 40 for dark world
sta $7ef3ca    
LDA #$50              
RTL                    
TXA  
ORA $7EF3CA
RTL

11/8050:           ; same procedure
CPX #$18              
BNE $09    
lda #$40
sta $7ef3ca  
LDA #$58                
RTL                    
TXA  
ORA $7EF3CA
RTL

11/8070
CPX #$57              
BNE $09    
lda #$40
sta $7ef3ca  
LDA #$17                
RTL                    
TXA  
ORA $7EF3CA
RTL

11/8090:
CPX #$5e              
BNE $03    
lda #$00
sta $7ef3ca  
LDA #$1e                
RTL                    
TXA  
ORA $7EF3CA
RTL
But doesn’t work. What is strange. As you see in the asm, I only make $8a to the new value and set 7ef3ca to 40 for dark world and 00 for light world.

Test this, go into the village in native ALTTP, enter the lost woods through the mosaic screen reload
Cheat here with 7ef3ca-40 and 7e008a-50; you end in Skull Woods.

Edit:
Ah, now I have a small clue. If I use those codes in the green field (screen 11). Beginning down, left. Cheat with 7EF3CA-40 and 7E008a-55 and go left, I get to this screen in the dark world without bugs.
If I however make that from the border screen as in your rom, it won't work.
So you need to make this transition screen somewhere in the middle of Hyrule. Can you test this out and adjust if this works for you the code at 11/0000 yourself?
I give you an example. You are in 11 (grass plain) and want to get into 55 instead of 12:
Cmp #$17 -> CMP #$11 (old screen number you exit) pc w/o header: 11/0004: 17->11
You jump to 11/0030:
CPX #$10  -> CPX #$12 (normally you should come into $12)      pc w/o header: 11/0031: 10->12
LDA #$50  -> LDA #$55 (screen in dark world you want to get). pc w/o header: 11/003b: 50->55
This must be done that way for all 4 transition jumps.

For me this worked with above code when I walked right from 11 I was in 55 bugless...
I do not know whether this helps with your problem, but I guess it's just not possible to get access to dark world from border screens.
Conn
Conn

A link between overworlds Image212

Since : 2013-06-30

Back to top Go down

A link between overworlds Empty Re: A link between overworlds

Post by Puzzledude Mon 12 Aug 2013 - 13:53

This is very well made, but if you could see how the overworld is made, you would realize, you can not come to the dark world from the border screens. There's nothing there. The dark world is "in place" of the light world, but on different screen definitions (40 instead of 00) and with different gfx and pal.
 
So the transit must happen through the cave (enter in one place and when exit, new area is defined, but +40 in that ram location). This should work, since you end up in dark world by default (for that screen only). But now the game will hopefully know to stay in the dark world, when you start transiting further.
Puzzledude
Puzzledude

A link between overworlds Image213

Since : 2012-06-20

Back to top Go down

A link between overworlds Empty Re: A link between overworlds

Post by scawful Mon 12 Aug 2013 - 14:03

Yeah, I did test it out and removing those graphics left over in the dark world didnt help. I could move the castle over to the left for the sake of it not being a border screen but then I would be sacrificing two areas. Just wondering, even if the transition happened somewhere that isnt on a border screen, could other screen transitions happen in the dark world without bugs?

I think it would probably be best to go with an entrance and exit that can switch the byte of whether youre in the light world or dark world because as of now like seph showed in that video it will load the dark world map properly but upon screen changes it will think youre in the light world again. Some sort of custom exit that can fix this is probably the best bet now without moving areas over.

EDIT:
I noticed something kind of interested but I'm not sure how relevant it is.
A link between overworlds J3h9SPk
When I made the transition to the dark world it took me there but as you said moving sends you into a bug and the screen goes black, however thats only moving right. Upon moving left and jerking around a bit I noticed that part of the screen I was just on is still there but cut off, but it definitely loaded the dark world because in the bottom right are gfx #63 tiles. The borders of where I can walk up and down are mimicing that of the trees I placed so I believe the reason we cant keep walking right is because the screen transition is happening again. As in all it did was visually load the map of the dark world, but again not sure how relevant that is Razz 
scawful
scawful

A link between overworlds Image211

Since : 2013-07-04

http://zeniea.com

Back to top Go down

A link between overworlds Empty Re: A link between overworlds

Post by Conn Mon 12 Aug 2013 - 15:51

I noticed that cut off screen as well.

I guess however you really have only 2 possibilities:

(1) Puzzledude's way to make a cave exit to DW
(2)your way to sacrifice 2 screens and use above code. In the end I'd probably go for your way since you have 128 screens in the game, so 2 less aren't that much... or 4 would also be ok in case you need 2 transitions.

Edit:
You'd not even have to renounce on these 4 screens! Make the screens 1e and 17 connected and warp there with the bird to find an extra treasure. I do not know whether you can warp with the bird into Dark world but here you could then make a whirlpool connection to screen 50/58.
And make the transition with screen 16-4f and 1d-57... that will work.
Conn
Conn

A link between overworlds Image212

Since : 2013-06-30

Back to top Go down

A link between overworlds Empty Re: A link between overworlds

Post by scawful Mon 12 Aug 2013 - 16:54

I think it might be good to move the areas to the left. I could make the areas I sacrifice like secret areas or something that are apart of the castle or even a treasure of some sort.
However I believe I would also have to move the other side to the right because the light and dark world share the same layout. Which isn't bad but i would have to do a bit of work on the maps in order for it to make sense.

https://i.imgur.com/kvWSsO1.jpg
Essentially in order for it to work I'd have to change the layout like this and it would be 1D to 59 and 16 to 51
scawful
scawful

A link between overworlds Image211

Since : 2013-07-04

http://zeniea.com

Back to top Go down

A link between overworlds Empty Re: A link between overworlds

Post by Conn Mon 12 Aug 2013 - 17:21

Yeah if you understand the code, you can do that all.

According to your plan you have 3 areas each side to "sacrifice" but this gives you more possibilities like hiding a dungeon or so inside them...
Conn
Conn

A link between overworlds Image212

Since : 2013-06-30

Back to top Go down

A link between overworlds Empty Re: A link between overworlds

Post by scawful Mon 12 Aug 2013 - 17:40

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?
scawful
scawful

A link between overworlds Image211

Since : 2013-07-04

http://zeniea.com

Back to top Go down

A link between overworlds Empty Re: A link between overworlds

Post by Conn Mon 12 Aug 2013 - 17:59

Sure, just send and tell me where you want to get by exiting which screen.
Conn
Conn

A link between overworlds Image212

Since : 2013-06-30

Back to top Go down

A link between overworlds Empty Re: A link between overworlds

Post by Puzzledude Mon 12 Aug 2013 - 18:07

But this should only be a change of the actual values.
 
This is new pointer at 12A81 in hex
01/2a81: 0f ca f3 7e -> 22 00 80 22
 
new code is then at 110000. But in this case ASM must first be assembled with ASM inserter.
 
Once the Conn's original code is in, this should be looked at
Cmp #$17 -> CMP #$11 (old screen number you exit) pc w/o header: 11/0004: 17->11
You jump to 11/0030:
CPX #$10  -> CPX #$12 (normally you should come into $12)      pc w/o header: 11/0031: 10->12
LDA #$50  -> LDA #$55 (screen in dark world you want to get). pc w/o header: 11/003b: 50->55
 
This is for 11 to 55, in your case it is 1D to 59. So this should be at 110004, 110031 and 11003B. For some reason the old 12 (11 -> 12 must be taken into consideration).
 
But I guess it can be difficult to understand, if you haven't yet worked with hex editor and asm inserting (since this is achieved with xkas, which is dos based, took me a while too at first).

PS The remaining areas are not lost, since you can get there with flute (but only in light world).


Last edited by Puzzledude on Mon 12 Aug 2013 - 18:13; edited 1 time in total
Puzzledude
Puzzledude

A link between overworlds Image213

Since : 2012-06-20

Back to top Go down

A link between overworlds Empty Re: A link between overworlds

Post by scawful Mon 12 Aug 2013 - 18:12

I emailed you the rom conn.

Puzzledude wrote:
But I guess it can be difficult to understand, if you haven't yet worked with hex editor and asm inserting (since this is achieved with xkas, which is dos based, took me a while too at first).
Yeah I have little to know idea how to, of course I'm trying to learn asm but it's still too complicated to me Razz 
scawful
scawful

A link between overworlds Image211

Since : 2013-07-04

http://zeniea.com

Back to top Go down

A link between overworlds Empty Re: A link between overworlds

Post by Puzzledude Mon 12 Aug 2013 - 18:33

You can start with this hex editor which I've uploaded a while back.
http://acmlm.kafuka.org/uploader/get.php?id=4306
 
And then open the Zelda3 rom with this HxD hex editor. Then you will see the actual code of the game. What the xkas is doing is convert this new code:
TAX
LDA $8A
CMP #$17
BNE $03
etc
into bytes. When Conn will implement this, you can open the new rom in a hex editor, and select Go to, and then type in the address 110000 (just over 1MB, so your rom will be expanded to be able to have new code). But this code will be read, because Conn hijacked the pointer at 12A81. The new pointer is 00 80 22, which is actually a reversed SNES address of the pc address 110000. And the 22 infront is the code to make a "jump".
  
 
While xkas works like this
 
go to cmd command line
for Windows this is
C:\Windows\System32\cmd.exe
or choose run cmd from your OS
 
type this into cmd to apply asm to smc
xkas.exe Nameofasm.asm Nameofrom.smc
all files must be in the same folder (this is only if ASM is pure; has no txt, otherwise use ; to blank out the "non codes")
Puzzledude
Puzzledude

A link between overworlds Image213

Since : 2012-06-20

Back to top Go down

A link between overworlds Empty Re: A link between overworlds

Post by Conn Mon 12 Aug 2013 - 19:30

It was unfortunately a bit more complicated, Puzz because I was doing some mistakes in the asm, sorry. Gotta almost freaked me out then I found that the ora 7ef3ca must come at the very start. I am too exhausted now to get into detail.

For some reason the old 12 (11 -> 12 must be taken into consideration).
Yes, if you do not take this into consideration you'd always change the screen into transition. Also when you walk left, up, down. Since we only want to change when walk to right, this is the easiest way to exclude the other possible walks.


I just sent you the patch+rom... should work now. Please note that your fly-3 was to screen 15, but the code works for screen 16 - you will have to walk one screen further to the right to test.

One nice idea for the 2x3 sacrificed screen were to make a mirror mountain or something nifty Razz
Conn
Conn

A link between overworlds Image212

Since : 2013-06-30

Back to top Go down

A link between overworlds Empty Re: A link between overworlds

Post by scawful Mon 12 Aug 2013 - 19:37

So it works, but not exactly the way it's meant. Like it loads the map 51 but treats your position like you're at map 57 and same goes for map 59 it treats you like you're at 5D. Perhaps since it successfully took you to the dark world I could use some kind of cave to avoid the screen transition problems.
scawful
scawful

A link between overworlds Image211

Since : 2013-07-04

http://zeniea.com

Back to top Go down

A link between overworlds Empty Re: A link between overworlds

Post by Conn Mon 12 Aug 2013 - 19:41

yeah maybe it's really better to work with transition caves then
Conn
Conn

A link between overworlds Image212

Since : 2013-06-30

Back to top Go down

Page 1 of 2 1, 2  Next

Back to top

- Similar topics

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