Unlimited room header! And the RT (Room Transfer) program

Page 1 of 6 1, 2, 3, 4, 5, 6  Next

View previous topic View next topic Go down

Re: Unlimited room header! And the RT (Room Transfer) program

Post by XaserLE on Tue 16 Jul 2013 - 7:56

With Hyrule Magic v0.964 it's actually possible to move the header pointers + data to another location then 27502
and it actually gives you 14 bytes of header for all of the the rooms in the game XD!

HM v0.964: https://www.dropbox.com/s/o8jm3nv2l5ycijm/HM%20%28New%29.zip

Enjoy!

XaserLE
Elite ROM Hacker
Elite ROM Hacker

Since : 2013-01-22

Back to top Go down

Re: Unlimited room header! And the RT (Room Transfer) program

Post by Puzzledude on Tue 16 Jul 2013 - 8:25

I don't have this option in my version 963 of HM. But this is what I've always considered to do - recode HM to be able to have more header data, item data, room data etc. If only everything could be moved like that, HM would never bug out, since it would have enogh place to function normally.
avatar
Puzzledude
Elite ROM Hacker
Elite ROM Hacker

Since : 2012-06-20

Back to top Go down

Re: Unlimited room header! And the RT (Room Transfer) program

Post by XaserLE on Tue 16 Jul 2013 - 8:46

I think with the source code of HM this were quite easy. As far as i know, MathOnNapkins has the source code of one of the versions of HM, but he was disallowed to make it public, but i am not sure, maybe my memory is wrong. So SePH, please tell us exactly which version this is? And upload it :-)

XaserLE
Elite ROM Hacker
Elite ROM Hacker

Since : 2013-01-22

Back to top Go down

Re: Unlimited room header! And the RT (Room Transfer) program

Post by XaserLE on Tue 16 Jul 2013 - 9:09

This is great, thank you. In two weeks (after my exams) i will try to find out what this version exactly does, cause it seems not to work with my gates of darkness rom natively where i moved the headers. But this is really a huge find! I don't need this RHE anymore.

XaserLE
Elite ROM Hacker
Elite ROM Hacker

Since : 2013-01-22

Back to top Go down

Re: Unlimited room header! And the RT (Room Transfer) program

Post by XaserLE on Tue 16 Jul 2013 - 9:24

Oh no, i was wrong, it works natively with my expanded gates of darkness rom. I tested with the hex editor what this version of hyrule magic does with the rom and it is the same that i do with RHE, perfect :-)
This was a big step forward in zelda hacking :-)

XaserLE
Elite ROM Hacker
Elite ROM Hacker

Since : 2013-01-22

Back to top Go down

Re: Unlimited room header! And the RT (Room Transfer) program

Post by XaserLE on Tue 16 Jul 2013 - 9:34

In my modified ROM the headers are far behind this, i moved them to the beginning of bank 3F and i saw that this new version of HM knows this. A few minutes ago (before my last post) i thought it wouldn't work but that was wrong, my failure.
This makes editing the doors really human now :-D

XaserLE
Elite ROM Hacker
Elite ROM Hacker

Since : 2013-01-22

Back to top Go down

Re: Unlimited room header! And the RT (Room Transfer) program

Post by Puzzledude on Tue 16 Jul 2013 - 12:22

Sephiroth3 disallowed MoN and Omega to distribute the source code of HM? This is odd. Maybe MoN did this version, as I know there's also a special version to read PW rooms. Nice to have this version really.
avatar
Puzzledude
Elite ROM Hacker
Elite ROM Hacker

Since : 2012-06-20

Back to top Go down

Re: Unlimited room header! And the RT (Room Transfer) program

Post by XaserLE on Tue 16 Jul 2013 - 12:28

Yes i remember a post from MoN where he said the same. He has the code but sephiroth3 gave it to him with the bid not to make this public (i hope my memory is right).

XaserLE
Elite ROM Hacker
Elite ROM Hacker

Since : 2013-01-22

Back to top Go down

Re: Unlimited room header! And the RT (Room Transfer) program

Post by Puzzledude on Tue 16 Jul 2013 - 16:22

Strange that Math On Napkins didn't decide to simply recode HM then (since he has the source code for it), since this would take less time. Making a brand new editor is hard work.

Also, Black Magic and Dark Prophecy both released some day? To good to be true.
avatar
Puzzledude
Elite ROM Hacker
Elite ROM Hacker

Since : 2012-06-20

Back to top Go down

Re: Unlimited room header! And the RT (Room Transfer) program

Post by XaserLE on Wed 17 Jul 2013 - 6:22

Sometimes it seems that MathOnNapkins can read the source code of zelda like we are reading books :-D, unbelievable what he knows about this game.
About the thing that Math decided to make a new program: I've heared (i think from you seph) that he also was bidden by sephiroth3 to not recode HM. To give him the source was only an act of prettiness to allow Math to learn from this source what he didn't know.
Is there no one that is able to get contact to sephiroth3?

XaserLE
Elite ROM Hacker
Elite ROM Hacker

Since : 2013-01-22

Back to top Go down

Re: Unlimited room header! And the RT (Room Transfer) program

Post by Puzzledude on Wed 17 Jul 2013 - 6:48

Again a strange move by sephiroth3, since he will then not allow for someone to fix the program and make it better. His actions would be logical if HM was working with no bugs and will actually read the pointers, the way the emulator does (can read repointed data). I get the point with the source code (I for instance don't need it, since I tried to assemble the source code of some program once and nothing worked), but if someone can make it better and present it as exe (why not allow this).

Which brings me to one more question, why doesn't the original author of HM make it better (for instance Fusoya, the author of Lunar Magic, is updating constantly), this is why there's such great number of SMW hacks.
avatar
Puzzledude
Elite ROM Hacker
Elite ROM Hacker

Since : 2012-06-20

Back to top Go down

Re: Unlimited room header! And the RT (Room Transfer) program

Post by XaserLE on Wed 17 Jul 2013 - 7:00

Yes, as a matter of fact, sephiroth3 isn't working on HM anymore, is seems he stopped working on it a lot of years ago so there is no reason to not give the source code to us.

XaserLE
Elite ROM Hacker
Elite ROM Hacker

Since : 2013-01-22

Back to top Go down

Re: Unlimited room header! And the RT (Room Transfer) program

Post by XaserLE on Thu 18 Jul 2013 - 3:19

That is exactly the reason why i wrote the RHE :-D, but unfortunately it seems that it was a little to complicated for practical use for the most :-/. But now we got it!

XaserLE
Elite ROM Hacker
Elite ROM Hacker

Since : 2013-01-22

Back to top Go down

Re: Unlimited room header! And the RT (Room Transfer) program

Post by MathOnNapkins on Sat 20 Jul 2013 - 0:23

Hello guys. Kind of a blast from the past that you got your hands on this. I wouldn't say I'd forgotten about it but I really would like to forget my experiences editing HM. The code was a real nightmare to work with, written in a tightly cramped, robotic programming style. A lot of the work I did on the source was just spreading it out and making it more readable. Quite honestly, I learned enough from monkeying with the Hyrule Magic source and my own research to fill in all the gaps on how the game's data is laid out. I think that version even has some kind of feature for porting data from one rom to another, but I'm certain it probably has some bugs.

To clarify things, yes we were asked not to release the source, and in fact seph3 asked me not to even release my modified version of Hyrule Magic (assumedly this v0.964). It was at that point I decided to start a new editor as dealing with seph3's restrictions was getting really tiresome. As I've worked more on Black Magic and related technologies, I've gotten burnt out repeatedly and my focus has evolved on how to approach editing the game. So um, I guess I could discuss that in another thread but rest assured I am not a quitter and I am always working on something, it just might not be what you want and at the pace you want it at. Long story short, the existing Zelda 3 is not a very good base platform to edit, and I have been trying to rewrite the underlying game engine to make things more flexible and intuitive.

MathOnNapkins
VIP Member
VIP Member

Since : 2013-02-08

Back to top Go down

Re: Unlimited room header! And the RT (Room Transfer) program

Post by XaserLE on Sat 20 Jul 2013 - 3:19

What you wanted to do with Zelda3 is the most expensive project in rom hacking ever, some kind of a mammoth project. I know how fast one can lose motivation.
Even without BlackMagic we are lucky guy's, because we have a living oracle for Zelda3-Questions named MathOnNapkins :-)
And your ZeldaDocs are very useful when making an assembler patch.

XaserLE
Elite ROM Hacker
Elite ROM Hacker

Since : 2013-01-22

Back to top Go down

Re: Unlimited room header! And the RT (Room Transfer) program

Post by XaserLE on Sat 20 Jul 2013 - 8:24

Like PuzzleDude i played around with the rooms above 295. He showed me how to hex transfer a room (without sprites). I transferred room 261 to 296 and set a staircase in Links House that leads to 296 (cause this version of HM takes numbers above 295 as correct in the header).
Here is the picture:


The only bad thind about this HM version is, that it only uses the pointers for 296 rooms (0-295). Adding one at the end causes the game to crash cause i need to correct all other pointers by adding 2 to them (but after that.....yeah, you know it, HM don't likes this :-D, but this is no problem). In two weeks i have more time. Then i will use my RHE to write a new program that copies fully automatically a specific room from one rom to another (including the correct room header) and recalcs header data if needed. So you can use a seperate rom to edit the rooms 296-319 in and then by one click merge them fully functional (but without sprites) with your actual rom to a new one.

XaserLE
Elite ROM Hacker
Elite ROM Hacker

Since : 2013-01-22

Back to top Go down

Re: Unlimited room header! And the RT (Room Transfer) program

Post by Puzzledude on Sat 20 Jul 2013 - 9:39

MathOnNapkins wrote:Hello guys. The code was a real nightmare to work with, written in a tightly cramped, robotic programming style. A lot of the work I did on the source was just spreading it out and making it more readable.

To clarify things, yes we were asked not to release the source, and in fact seph3 asked me not to even release my modified version of Hyrule Magic (assumedly this v0.964). It was at that point I decided to start a new editor as dealing with seph3's restrictions was getting really tiresome.

But rest assured I am not a quitter and I am always working on something. The existing Zelda 3 is not a very good base platform to edit, and I have been trying to rewrite the underlying game engine to make things more flexible and intuitive.
 
It all makes sense now. It is good to know, you are not a quitter. I think everyone will respect Black Magic when it is done. It doesn't matter when.
 
I also know the existing Alttp is packed very tight and unfriendly. In fact, I would not recommend anyone to start with the original Alttp in a combination with HM. I know the GoT hack had to severly replace a lot of code, to be able to work on it with HM.
 
 
 
XaserLE wrote:
The only bad thind about this HM version is, that it only uses the pointers for 296 rooms (0-295). Adding one at the end causes the game to crash
 
Are you sure about this. I remember the game crashed simply because the default sprite value, which is set to such properties, so that the game crashes.
 
So if you want to enter room 296 or above, you need to fix its data and header properties (and set the sprite blk to something normal), and it should not crash. I simply made room 296 to have the same properties as 295. So I entered 295 and could transit right into 296. When header was not set, it crashed.
avatar
Puzzledude
Elite ROM Hacker
Elite ROM Hacker

Since : 2012-06-20

Back to top Go down

Re: Unlimited room header! And the RT (Room Transfer) program

Post by XaserLE on Sat 20 Jul 2013 - 9:47

Oh no, it worked, i copied the room and set the header, but it crashed because this actual version of HM (try it) is putting only 296*2 Bytes before beginning with the room headers. I can go in the room but the game reads the pointer for the header at a position where the header of the first room starts, so it reads nonsense from somewhere. It worked, but the room was absolutely dark shortly after i walked in. Adding this two bytes for the header pointer of room 296 moves the headers 2 bytes forward, so all pointers are corrupted. But this can be fixed by recalculating all pointers, but then, HM can't work with the rom (loads wrong gfx etc.). But like i said, no problem, with a little tool this can be done automatically.

XaserLE
Elite ROM Hacker
Elite ROM Hacker

Since : 2013-01-22

Back to top Go down

Re: Unlimited room header! And the RT (Room Transfer) program

Post by Puzzledude on Sat 20 Jul 2013 - 9:55

Oh, this is odd. Since in the normal version it is always room all for 320 rooms. So it shoud have 320x2 bytes for header pointers, before going to the actual header code. If this size is smaller (like 296), the game does not have enough room (as usual).
avatar
Puzzledude
Elite ROM Hacker
Elite ROM Hacker

Since : 2012-06-20

Back to top Go down

Re: Unlimited room header! And the RT (Room Transfer) program

Post by XaserLE on Sat 20 Jul 2013 - 10:03

Yes, in the original rom, but i am speaking about the rom i made with this new version of HM. This version, that moves the headers to the extended space. But it cut's the pointers for 296 to 319 at this new position.

XaserLE
Elite ROM Hacker
Elite ROM Hacker

Since : 2013-01-22

Back to top Go down

Re: Unlimited room header! And the RT (Room Transfer) program

Post by Puzzledude on Wed 24 Jul 2013 - 14:07

XaserLE wrote:In two weeks i have more time. Then i will use my RHE to write a new program that copies fully automatically a specific room from one rom to another (including the correct room header) and recalcs header data if needed. So you can use a seperate rom to edit the rooms 296-319 in and then by one click merge them fully functional (but without sprites) with your actual rom to a new one.
 
This would be a great thing to have. This is why I've made the indoor data study in the first place.
 
If you study my document further, you can see, that it also has indoor items fully decoded. So they can also be moved to another address to allow more space.
 
If only all the data (objects, items, sprites, header etc) for one room would be stored at the same place, moving would be no problem.
---------------------------
 
What about a possibility to have a program, which would simply export the hex data for choosen room to a txt file. Object data, header, items and chest definitions (I've hex decoded this, pointers and all), but ignoring the telephatic messages, torches, pushable blocks and sprites (all of those are different).
 
Using precalculated pointers and new locations, we could then bring all rooms together in one file easily in hex, without having any programs (wouldn't mind having one though to actually insert the data at fixed locations and in order from room 0 to 295 or 319).
avatar
Puzzledude
Elite ROM Hacker
Elite ROM Hacker

Since : 2012-06-20

Back to top Go down

Re: Unlimited room header! And the RT (Room Transfer) program

Post by XaserLE on Wed 24 Jul 2013 - 14:16

Hey i see i am not the first one that had this idea :-D
In the test (see picture) i moved the header and the object data (0xF8000, you told me). If you could gave me the other things i could implement all to move a room completely :-)
Or is there any data you don't know? Sprites?

XaserLE
Elite ROM Hacker
Elite ROM Hacker

Since : 2013-01-22

Back to top Go down

Re: Unlimited room header! And the RT (Room Transfer) program

Post by Puzzledude on Wed 24 Jul 2013 - 15:05

This is from my hex Dungeon data document


1.) Object data indoors

primary pointers at
-8746, 01 80 1F --> F8001
-874C, 00 80 1F --> F8000
-883F, 01 80 1F --> F8001
-8845, 00 80 1F --> F8000
all coresponds to F8000

at F8000, 3 byte pointers, for rooms 0-319.
*Let's say the pointer is
6A 84 0A = reversed 0A 84 6A --> points to 5046A
etc

*Room code
start (pointer points to it)=5046A as example
....bg1...FF FF
....bg2...FF FF
....bg3...FF FF. (end)

Data are objects: x position, y position, size, type.
Data holds room layout (2nd byte) and floor1 and floo2 value (1st byte).
---------------------------


2.) Sprite data indoors

*Primary pointer at: (value 2E D6 can change!, because of the overworld sprites)
4C298, but 2 bytes only = 2E D6
No third value 09, to make it 2E D6 09 = 09 D6 2E = 4D62E.
no value is 09 to define 40000. (Decoded for taking the data out, but can not put it back elsewhere).

*Secondary pointers at (this can change! because of the overworld sprites)
4D62E (block is 300) = in dec is 768:2 = 384 (for 320 room + some additional data).

*Data is at:
4D92E (block is 1371) = ends at 4EC9E (always the end regardless of the overworld sprites)


*Pointer read:
2E D9 = reversed D9 2E = 09 D9 2E --> points to 4D92E = room 0.


*Sprite Code
for room 0 = Ganon
00 05 17 D6 FF,
sort sprite is 00, y = 05, x = 17, type = D6-Ganon, FF = end.

The 05 is not only y coordinate, but also: if the sprite is on bg1 or bg2.
---------------------------


3.) Item data indoors

-These are red dots in HM, to define stuff under jars (heart, magic, key, bomb etc)


*Primary pointer at E6C1
Code BF 69 DB 01, 85 00, A9 01

69 DB 01 points to DB69

01 defines the global bank. Can be realocated anywhere between 0 and 400000. For instance BF 69 DB 23, 85 00, A9 23; new address is 11DB69.


*Secondary pointers at:
DB69 (block is 282), 282 is 642 in dec :2 = 321 rooms (for 320 rooms + 2 bytes)

*Data at:
DDEB (block is 8C7)


*Pointer read
EB DD reversed is DD EB = direct address = DDEB


*Item code
CE 13 0B FF FF,
CE = x, 13 = y, 0B = type, FF FF = end

A jar object is necessary at the same location for the item to work!
---------------------------


4.) Indoors pushable blocks

*Number of bytes to define block data at:
8896,
default is 8C 01 = 18C = 396 bytes :4 = 99 blocks, but
maximum is 00 02 = 200 = 512 bytes :4 = 128 blocks (29 more).

*Primary pointers at:
1. 15AFA, DE F1 04, --> 271DE (but with hardcoded block = 80)
2. 15B01, 5E F2 04, --> 2725E (but with hardcoded block = 80)
3. 15B08, DE F2 04, --> 272DE (but with hardcoded block = 80)
4. 15B0F, 5E F2 04, --> 2735E (but with hardcoded block = 0C by default, 80 max)

Pointers can be changed to another place, but it will only read the 80 bytes in hex after this location.


*No secondary pointers, but Data directly at:

271DE (block is 80+80+80+0C) = 18C = 396 in dec :4 = 99 pushable blocks.
max block is 80 x 4 = 200 in hex.

*Code (4bytes for one block!)
0B 01 3A 19 (no ending value! FF), room values are mixed, so the space must be hardcoded, that the game knows where to stop reading values.

0B 01 is 10B = room 267.
3A is x, 19 is y.
---------------------------


5.) Indoors torches


*Number of bytes to define torch data at:
88C1,
default is 2C 01 = 288 bytes, but
maximum is 80 01 = 384 bytes. (around 28 torches more)

max was tested, 8C 01 crashes the game, too much data for torches. So 80 in hex for one pointer is max.

*Primary pointers at:
1. 15B16, 6A F3 04 = 04 F3 6A = 2736A (block 80)
2. 15B1D, EA F3 04 = 04 F3 EA = 273EA (block 80)
3. 15B24, 6A F4 04 = 04 F4 6A = 2746A (block 20, max 80)

If 04 is changed to 24, new data is at 12736A and at 88C1 to 80 01, the block can be 384 bytes long.


*No secondary pointers, but Data directly at:

2736A (block is 80+80+20) = 12C = 288 in dec.
max block is 180 in hex

1 torch in a new room is 6 bytes, then +2 bytes for each torch.
2 torches is 8bytes, 3 is 10 and 4 is 12 etc.


*Code (example)
43 00, AA 03, B6 03, AA 09, B6 09, FF FF

43 00 = room 67,
AA is x, 03 is y for the first torch
B6 is x, 03 is y for the second torch etc
FF FF is end.

The upper room has 4 torches.
---------------------------


6.) Room header properties

*Primary pointer at B5DC
Code BF, 02 F5 04, 85 0D, E2 20 C2 10, A9 04

02 F5 04 points to 27502

04 defines the global bank. Can be realocated anywhere between 0 and 400000. For instance BF, 02 F5 24, 85 0D, E2 20 C2 10, A9 24; new address is 127502.


*Secondary pointers at:
27502 (block is 280)

*Data at:
27782 (block is 87E)

*Pointers + data
27502 (block is AFE)

*Pointer read
82 F7 = F7 82 = 04 F7 82 = 27782


*Header code (14 bytes maximum)

1st byte,
bg properties + collision

2nd byte, 3rd byte, 4th byte, 5th byte, 6th byte, 7th byte
PAL, BLK, EnemyBLK, Room effect, Tag1, Tag2


8th byte
Plane properties for hole/warp and staircase 1, 2, 3

9th byte
Plane properties for staircase 4

10th byte, 11th byte, 12th byte, 13th byte, 14th byte.
hole/warp, staircase1, staircase2, staircase3, staircase4.
---------------------------


7.) Chest definitions

*Primary pointers at:
1. EBFB, 6E E9 01 = E96E
2. EC09, 70 E9 01 = E970
3. EC0F, 6E E9 01 = E96E
all for E96E

Repoint all 3 accordingly. 01 to 23 is 11E96E for instance.

max bank is 1F8 = 504 in dec : 3 for one chest = 168 chests possible in the game.


*No secondary pointers, but Data directly at:
E96E (block is 1F8)


*Code is (3 bytes for one chest definition)
04 00 23, 04 00 = room 4, 23 is a content of the chest.
23 in hex is 35 in dec is 35: Armor 3 in Hyrule magic.

04 80 23, 04 00 = room 4, but 80 is big chest, 23 is Armor 3.

04 01 23, 04 01 is 104 in hex is room 260, 23 is Armor 3.

*Definition will only work with the chest object in the same room.
---------------------------


8.) Indoor damage pits

*Couldnt find any pointers here


*Data at 190C (block is fixed to 72)

72 in hex is 114 in dec :2 = 57 rooms with pits are possible.

2 bytes for a pit definition.

*Code
72 00 = room 114

No pointers, fixed location and block size. No FF ending, just a list of rooms in hex.
---------------------------


9.) Indoor telepatic messages

*Couldnt find any pointers here


*Data at 3F61D (block is fixed to 280)

280 in hex is 640 in dec :2 = for 320 rooms. Rooms go from 0-319.

2 bytes for a message definition.

*Code
72 00 = message (monologue number) 114

No pointers, fixed location and block size. No FF ending, just a list of message values in hex.

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

With this you should be able to bring all the data for one room out of the rom. Bringing it in on other address is a different thing, since not all data can be realocated to other global banks.
avatar
Puzzledude
Elite ROM Hacker
Elite ROM Hacker

Since : 2012-06-20

Back to top Go down

Re: Unlimited room header! And the RT (Room Transfer) program

Post by XaserLE on Wed 24 Jul 2013 - 15:21

Thanks, great :-)
I've never seen this document before, i only have this little PM you sent me on kafuka.org with the indoor data at F8000.
I will do what i can. At first moving a room with headers and indoor data and then, step by step, the other values if possible.

XaserLE
Elite ROM Hacker
Elite ROM Hacker

Since : 2013-01-22

Back to top Go down

Re: Unlimited room header! And the RT (Room Transfer) program

Post by Puzzledude on Wed 24 Jul 2013 - 15:27

Here is the long version of it on this forum
http://zeldix.openphpbb.com/t58-vital-dungeon-hex-data
 
Yes, go step by step. Basically I can bring all data of a room out of the rom into txt manually (but this is a lot of work). Copy from hex editor into txt. With this hex string in the txt, the data is secured.
avatar
Puzzledude
Elite ROM Hacker
Elite ROM Hacker

Since : 2012-06-20

Back to top Go down

Page 1 of 6 1, 2, 3, 4, 5, 6  Next

View previous topic View next topic Back to top


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