Info from XaserLe on Big Keys

Go down

Info from XaserLe on Big Keys Empty Info from XaserLe on Big Keys

Post by Puzzledude Mon 18 Feb 2013 - 7:39

¸


Last edited by Puzzledude on Fri 17 Apr 2020 - 13:56; edited 1 time in total
Puzzledude
Puzzledude

Info from XaserLe on Big Keys Image213

Since : 2012-06-20

Back to top Go down

Info from XaserLe on Big Keys Empty Re: Info from XaserLe on Big Keys

Post by scawful Tue 3 Sep 2013 - 15:17

For opening the small lock in the prison, is it possible to set that so normal small keys can open it rather than choosing one of the 3 main items?
Similarly to the key blocks in gates of time but using small keys.
scawful
scawful

Info from XaserLe on Big Keys Image211

Since : 2013-07-04

http://zeniea.com

Back to top Go down

Info from XaserLe on Big Keys Empty Re: Info from XaserLe on Big Keys

Post by XaserLE Tue 3 Sep 2013 - 16:07

This is a question that spane asked me before.
Yes, it is possible, we know the adress where the game checks for the big key to open this small door and you can replace this door with a block graphic, like puzzledude did. But there is more. You need to jump out of this code and check if the player has at least one small key and then decrement the small key counter. Actually i am missing the adress of the small key counter. If i had this, i could try it.

@PuzzleDude: Do you know where this counter is saved?

XaserLE

Info from XaserLe on Big Keys Image111

Since : 2013-01-22

Back to top Go down

Info from XaserLe on Big Keys Empty Re: Info from XaserLe on Big Keys

Post by Puzzledude Tue 3 Sep 2013 - 16:26

I don't know about the small key or the counter locations. Currently I can make a key block, opened with the third big key, but once you have it, all blocks can be unlocked.

More asm is required here, to check for a small key. I guess we would need tracing here to determine where the counter is in ram, and where the check for a small key is at in ram (both can be traced I guess, when opening a normal small door with the keyhole).
Puzzledude
Puzzledude

Info from XaserLe on Big Keys Image213

Since : 2012-06-20

Back to top Go down

Info from XaserLe on Big Keys Empty Re: Info from XaserLe on Big Keys

Post by XaserLE Tue 3 Sep 2013 - 16:39

Good idea, will try that next time. This could be a nice feature, i remember Link's Awakening had such key blocks.

XaserLE

Info from XaserLe on Big Keys Image111

Since : 2013-01-22

Back to top Go down

Info from XaserLe on Big Keys Empty Re: Info from XaserLe on Big Keys

Post by XaserLE Wed 4 Sep 2013 - 4:31

Readme updated:
https://www.dropbox.com/s/t81ywev9rxn3cfk/RoomTransfer.zip

@Puzz: I think it were nice to have your dungeon data document in the zip file, could you add this? Do you have an actual version (since your last found, the wrong pointer)?

XaserLE

Info from XaserLe on Big Keys Image111

Since : 2013-01-22

Back to top Go down

Info from XaserLe on Big Keys Empty Re: Info from XaserLe on Big Keys

Post by Puzzledude Wed 4 Sep 2013 - 9:10

Here is the final version of the program, with updated info and updated Dungeon Hex document. Updates on document: chests (fixed data on pointers, info on expansion), updates on damage pits (expansion), sprites (on how to move them) etc.

https://dl.dropbox.com/s/24504v1zszpsq7c/RT%20program%20v1-10%20upload.zip

Puzzledude
Puzzledude

Info from XaserLe on Big Keys Image213

Since : 2012-06-20

Back to top Go down

Info from XaserLe on Big Keys Empty Re: Info from XaserLe on Big Keys

Post by XaserLE Wed 4 Sep 2013 - 9:26

Great, thanks. I uploaded it (a little bit modified) to our Zeldix-Dropbox:
https://www.dropbox.com/s/t81ywev9rxn3cfk/RoomTransfer.zip

By the way, i thought i was posting this in the other thread "Unlimited room headers...." *LoL*

By the way, i traced the adress with the small key counter and actually work on the patch for the key blocks.

XaserLE

Info from XaserLe on Big Keys Image111

Since : 2013-01-22

Back to top Go down

Info from XaserLe on Big Keys Empty Re: Info from XaserLe on Big Keys

Post by XaserLE Wed 4 Sep 2013 - 10:19

Ok, here it is, open the small prison door with small keys (the big key doesn't work anymore on this small door). Simpy change the prison door to a small key block like it appears in Link's Awakening. If there is no small key left, the door will simply not open (no message like it happens when not having the big key "Eh? It's locked....").

Code:
;This is for making small key blocks like they appear in Link's Awakening. I will overwrite the prison door for that (like that one where zelda is behind).
;You only need to change the prison door graphic to a key block.
;The patch is "in place" so it doesn't overwrite other data or patches you added.
;WRITTEN:    by XaserLE
;THANKS TO: -MathOnNapkins' Zelda Doc's
;         -wiiqwertyuiop for his Zelda Disassembly


;header
lorom

ORG $01EB8C         ; go to the code that loads the big key holding variable

LDA $7EF36F         ; load the small key counter
AND #$00FF         ; check if we have at least one small key (AND will not be zero)
BEQ $4C            ; if not (AND is zero), don't do anything and especially don't give this "Eh? It's locked..." - message
               ; otherwise we will decrement the small key counter and branch to the code that opens the prison door
LDA $7EF36F         ; reload small key counter
DEC A            ; remove one key
STA $7EF36F         ; save the new value at small key counter position
BRA $05            ; branch to the code that opens the prison door
There is one remaining problem. Works only if you come from the bottom. Left, right (and upside as far as i know) won't work. I need to find the code that checks the coordinates of link. I'll do my best to fix this.

XaserLE

Info from XaserLe on Big Keys Image111

Since : 2013-01-22

Back to top Go down

Info from XaserLe on Big Keys Empty Re: Info from XaserLe on Big Keys

Post by Puzzledude Wed 4 Sep 2013 - 11:54

This is great.
 
Here the asm to hex code (assembled with xkas)
 
at EB8D, new code
6F F3 7E 29 FF 00 F0 4C AF 6F F3 7E 3A 8F 6F F3 7E 80 05
 
 
 
Remaining things
-you can unlock it from the upper or lower side, but not from  left or right (this is not such a big problem)
 
-the other thing is, how to correctly load the floor under the block. Currently it loads (left-up, left-up, right-up, right-up). But it should be: left-up, right-up, left-down, right-down, to correctly load all 4 small parts of the floor beneath the block, to match the other floor.
Puzzledude
Puzzledude

Info from XaserLe on Big Keys Image213

Since : 2012-06-20

Back to top Go down

Info from XaserLe on Big Keys Empty Re: Info from XaserLe on Big Keys

Post by XaserLE Wed 4 Sep 2013 - 12:08

Hmm, this is odd, i didn't notice this before, interesting point. But this happens in the original rom too, so i guess it has nothing to do with the patch. Due to the pattern of the ground the the cellar where zelda is this is hard to see. So maybe it's better use this doors on grounds with such pattern.
Actually i have no idea how to get rid of this.

XaserLE

Info from XaserLe on Big Keys Image111

Since : 2013-01-22

Back to top Go down

Info from XaserLe on Big Keys Empty Re: Info from XaserLe on Big Keys

Post by Puzzledude Wed 4 Sep 2013 - 12:25

That's ok. This happens on original Alttp to, and Nintendo probably even didn't see this, because of the non-squared floor. However this data could be right at the code where the prison door is.

This is very similar to what to load in the inventory. So if we do the tracing while opening the prison door, we should search for the sequence of bytes A, A, B, B and should change them to A, B, C, D. The A should be the coordinate of the gfx tileset with the floor, B is x mirror, C is Y, D is XY mirror.

I'll see if I can find this.
Puzzledude
Puzzledude

Info from XaserLe on Big Keys Image213

Since : 2012-06-20

Back to top Go down

Info from XaserLe on Big Keys Empty Re: Info from XaserLe on Big Keys

Post by XaserLE Wed 4 Sep 2013 - 12:29

Ok i will try it too tomorrow. Let's hear if you found something.

XaserLE

Info from XaserLe on Big Keys Image111

Since : 2013-01-22

Back to top Go down

Info from XaserLe on Big Keys Empty Re: Info from XaserLe on Big Keys

Post by Puzzledude Wed 4 Sep 2013 - 13:05

I've tried my method, but it didn't work. The floor is in the second gfx bank at 8A 8B, could also be 8C 8D, 8E 8F, AC AD, AE AF to be loaded. Or a single load 87, 92, 93 (in the gfx tileset map similar to the inventory).
 
So the start sequence should be 8A 01 or 8A 02, and the same for all beginning bytes: 8A, 8C, 8E, AC, AE, 87, 92, 03. I've changed all bytes in the game with such combinations, but no result.
 
I guess we need the trace while unlocking and see how VRAM is affected.
Puzzledude
Puzzledude

Info from XaserLe on Big Keys Image213

Since : 2012-06-20

Back to top Go down

Info from XaserLe on Big Keys Empty Re: Info from XaserLe on Big Keys

Post by XaserLE Wed 4 Sep 2013 - 13:08

Damn. Ok as i said i will try that later, for today i have done enough tracing :-D

XaserLE

Info from XaserLe on Big Keys Image111

Since : 2013-01-22

Back to top Go down

Info from XaserLe on Big Keys Empty Re: Info from XaserLe on Big Keys

Post by scawful Wed 4 Sep 2013 - 15:39

Oh nice! That happened pretty quickly. This will be awesome to use eventually Very Happy
scawful
scawful

Info from XaserLe on Big Keys Image211

Since : 2013-07-04

http://zeniea.com

Back to top Go down

Info from XaserLe on Big Keys Empty Re: Info from XaserLe on Big Keys

Post by XaserLE Wed 4 Sep 2013 - 16:08

Thank you, that's the reason i make this stuff :-)

XaserLE

Info from XaserLe on Big Keys Image111

Since : 2013-01-22

Back to top Go down

Info from XaserLe on Big Keys Empty Re: Info from XaserLe on Big Keys

Post by XaserLE Thu 5 Sep 2013 - 4:34

Ok continued testing and first of all i saw that these four quarter tiles can't match a correct square without rotating.
So i tried to load the floor tile a little bit manipulated (adding/substracting multiples of 2). If you do that, you will see, that the floor tile will be the same but the little quarter tiles change. Adding 4 will show the same floor tile with other quarters, quarters that can match a square by moving them.

Here is what to change (no final code, just for testing):
--> non headered rom, pc file adresses

-0xEBBC: new code 0xA0 0x94 0x00 (will load 94 statically as floor tiles, so the other rooms will have that too)
-0xEBC9: new Code 0x56 (will change the position of a quarter)
-0xEBD2: new Code 0x54 (will change the position of a quarter)

So this will make the floor tile look correctly in your test rom. In the cellar (original rom) it seems to work, but not at all (not sure because of the pattern).
It would be nice if you could test it with some floor tiles and tell me if it works. Then i would add this to the patch.
When testing other floor tiles keep in mind to change the 0x94. In RAM adress 0x46C you can see which floor tiles actually loaded in the room (if you know how to use SNES9X Geiger). In the castle in your test rom this is 0x90 and i added 4. So you only need to look there which floor tiles you have and add 4 to them. Or maybe you can see this in hyrule magic.


EDIT: This really seems to be a bug in the game the programmers didn't notice.

XaserLE

Info from XaserLe on Big Keys Image111

Since : 2013-01-22

Back to top Go down

Info from XaserLe on Big Keys Empty Re: Info from XaserLe on Big Keys

Post by Puzzledude Thu 5 Sep 2013 - 7:50

Thank you for this! I've tested this further and I now have the final version, which works. That code at EBBC is actually not necessary, but rather 4 bytes later on, all after the opcode B9, which loads one single tile (but in many mirror shapes).
 
Key block code
**************
 
at EB8D, new code
6F F3 7E 29 FF 00 F0 4C AF 6F F3 7E 3A 8F 6F F3 7E 80 05
 
 
 
 
Load the floor under the key block correctly
********************************************
 
floor
A, B
C, D
goal is: A (normal), B (x mirror), C (y mirror), D (xy mirror)
 
table with testing
50- /
52- normal
54- x mirror
56- normal
58- x mirror
5A- y mirror
5C- xy mirror
5E- y mirror
 
 
Addresses to change
EBC0-is A, value 52
EBC9-is C, value 5A
EBD2-is B, value 54
EBDB-is D, value 5C
 
this will load it the way it must be, default was not like that
 
NOTE!
the key block must always be placed on EVEN x and y
The even x or y is: 00, 02, 04, 06, 08, 0A, 0C, 0E, 10, 12 ETC
 
HM x and y value of the position of the key block must end with: 0, 2, 4, 6, 8, A, C, E.
 
If the above is true (addresses and Note part), it will always load the way it must be, no matter the floor type or value, or blockset value.
Puzzledude
Puzzledude

Info from XaserLe on Big Keys Image213

Since : 2012-06-20

Back to top Go down

Info from XaserLe on Big Keys Empty Re: Info from XaserLe on Big Keys

Post by XaserLE Thu 5 Sep 2013 - 8:17

Great! Thank you, i didn't notice that these 50, 52, 54..... values are rotating/transforming ones, i thought it were only positions in ram to save it.
I will put this in the asm patch and upload it.

XaserLE

Info from XaserLe on Big Keys Image111

Since : 2013-01-22

Back to top Go down

Back to top

- Similar topics

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