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

Page 5 of 6 Previous  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 Puzzledude on Sat 31 Aug 2013 - 6:35

This is great news. I will test this some more. Didn't actually realize I could look into the cpp file for the locations.
 
EDIT
This last version is awesome. Everything seems to work normally and the bank breaches are ok. I've also tested the chests and pit expansions. Both are working (tested). It is a relief to have more of both (57 rooms out of 320 for pits was just to low). I could also remodel Bruce campbell vs Ganon with its bugged pits to now have normal hurt pits. Plus, some master quests have those bugs, since they could not expand the number of hurt pits.
avatar
Puzzledude



Since : 2012-06-20

Back to top Go down

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

Post by XaserLE on Sat 31 Aug 2013 - 18:05

I am glad to see that you find this tool useful :-)

Ok, messages are done, so now all data will be copied when using RT.

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

I found an odd problem. The toll won't work properly when using the ouput rom as new input rom to copy some rooms. Will try to fix that.

Is there anything left i should do?

XaserLE



Since : 2013-01-22

Back to top Go down

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

Post by Puzzledude on Sat 31 Aug 2013 - 18:38

Since the entire indoors is now covered, I think only fixing the existing problem you've found.
avatar
Puzzledude



Since : 2012-06-20

Back to top Go down

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

Post by XaserLE on Sun 1 Sep 2013 - 3:18

Ok and i will try to make it work with an headered rom.

XaserLE



Since : 2013-01-22

Back to top Go down

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

Post by Puzzledude on Sun 1 Sep 2013 - 9:21

The easiest way, I think, is to determine if there is a header and then make the program remove it first, and then do the same operation as for no-header.
avatar
Puzzledude



Since : 2012-06-20

Back to top Go down

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

Post by XaserLE on Sun 1 Sep 2013 - 11:49

Yeh i thought so, but actually i am thinking about how to determine it, cause it doesn't seems that the header consists of 0x00's. Sometimes it differs. Maybe the easiest way is to to count the 0x00's in the first 0x200 bytes and check if it's more than 0x100 (more than 50 percent) cause no zelda rom hast 0x100 bytes of 0x00's in the first 0x200. But this isn't very elegant.....

XaserLE



Since : 2013-01-22

Back to top Go down

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

Post by Puzzledude on Sun 1 Sep 2013 - 12:05

One possibility would be to search for sequence 78 9C 00 42 9C. All Z3 roms/hacks start this way. If this is at 0x00, then we have no-header, if this is at 200, then it is a headered rom. If it is no-header, then proceed to code, if the rom is headered, remove the first 200 bytes and then proceed to code.
avatar
Puzzledude



Since : 2012-06-20

Back to top Go down

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

Post by XaserLE on Sun 1 Sep 2013 - 12:11

Oh yes, you're right, i don't thought this way :-D, good idea! Ok i will do it so and then upload the new version.

XaserLE



Since : 2013-01-22

Back to top Go down

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

Post by XaserLE on Sun 1 Sep 2013 - 12:25

This leads me to another idea, i will test 0xFFC0, should be "THE LEGEND OF ZELDA", if not, i remove the first 0x200 and test again, if not, it's possibly not zelda.

XaserLE



Since : 2013-01-22

Back to top Go down

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

Post by Puzzledude on Sun 1 Sep 2013 - 14:49

This is of course a possibility. Of course it will not necessary read The legend of Zelda in hacks. For instance PW has it LOZ: Parallel Worlds. This reminds me of zcompress. Did you know it does not work if you change this line to something different.
avatar
Puzzledude



Since : 2012-06-20

Back to top Go down

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

Post by MathOnNapkins on Sun 1 Sep 2013 - 17:06

Just my two cents, here's how I check for a header:

Code:

   
    ExpandInfo::ExpandInfo(std::ifstream &zeldaFile)
    {
        int fileLength = FileSize(zeldaFile);
       
        // ---------------------------------
       
        m_data = new Buffer(0x200);
       
        m_headerBuf = new Buffer(0x200);
       
        if(fileLength & 0x200)
        {
            m_hasHeader = true;
           
            zeldaFile.read(reinterpret_cast<char*>(m_headerBuf->contents),
                          0x200);
           
            fileLength -= 0x200;
        }
       
        m_rom = new Buffer(fileLength);
       
        zeldaFile.read(reinterpret_cast<char*>(m_rom->contents),
                      fileLength);
       
        Initialize();
    }
   

MathOnNapkins



Since : 2013-02-08

Back to top Go down

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

Post by XaserLE on Sun 1 Sep 2013 - 17:41

@puzz: Good point, i don't thought about that, so i will use your first hint, check the first line.

@math: Elegent way, but it seems you assume that fileLength&0x200 is only true if there is a header. For example one of my unhacked roms "Zelda3(U).smc" has no header and a length of 1.050.171 Bytes. This ANDed with 0x200 is 0x200 and therefore true. So are you sure this works in every case?

XaserLE



Since : 2013-01-22

Back to top Go down

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

Post by MathOnNapkins on Sun 1 Sep 2013 - 22:04

XaserLE: That's 0x10063B bytes, which is either an overdump or has actually been hacked by Hyrule Magic. Hyrule Magic creates noncompliant roms because it tacks on data to the end of roms without rounding up the filesize to a 2 megabit boundary at the time of file writing (fwrite / WriteFile / etc). If you want to handle noncompliant roms, I'd just provide the user a way to override this or fall back to detection mechanisms like you guys have been saying. I find those to be unreliable though, as a hacker can and will change any of the game internals if they really want to.

MathOnNapkins



Since : 2013-02-08

Back to top Go down

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

Post by XaserLE on Mon 2 Sep 2013 - 3:06

Yeh i know, but i want to support a lot of roms and don't want this tool to break cause a rom doesn't fit rounded filesize (by the way: i always thought this needs to be a multiple of 8 megabits, good to now).
So i think puzz's way is a good compromise since every game seems to use a slightly different initialization code at the beginning.

XaserLE



Since : 2013-01-22

Back to top Go down

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

Post by XaserLE on Mon 2 Sep 2013 - 5:33

Ok, works with headered roms now, even if only one of the input roms are headered. Not one of my best pieces of code, but works.

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

XaserLE



Since : 2013-01-22

Back to top Go down

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

Post by Puzzledude on Tue 3 Sep 2013 - 8:20

This final version is great. An importaint benefit to the Z3 hacking/data extracting. I've also made some precalculation roms earlier and now I can do all indoors on separate roms and extract/view the data easily. And then glue the dungeons together on a precalculated rom (which uses max space for all indoors). It is a matter of copy/paste now, without calculating a single pointer. Very Happy 
avatar
Puzzledude



Since : 2012-06-20

Back to top Go down

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

Post by XaserLE on Tue 3 Sep 2013 - 8:28

Thank you so much :-), it's great to know how useful this is.

XaserLE



Since : 2013-01-22

Back to top Go down

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

Post by XaserLE on Wed 18 Sep 2013 - 12:13

Bugfix:
https://www.dropbox.com/s/t81ywev9rxn3cfk/RoomTransfer.zip

MIRROR:
http://www.bwass.org/bucket/RoomTransfer.zip

Like i said before it was not possible to use the output rom of the tool (the merged rom) again with RT.exe to merge it with another one (to merge multiple rom's all together in one). The problem was that i forgot that i overwrite the sprite table pointer with the long jump, so in the new rom there was no sprite table pointer anymore. This was fixed.

This should be the final version of this tool but i discovered a little "problem". I used the original rom to test and used the RT the following way: "RT.exe Zelda.smc" so it creates a new one named "_Zelda.smc" with data extended and moved to the end. When using this one again (should produce the same rom without differences) "RT.exe _Zelda.smc" there was a slighly difference. It seems that one torch data is missing (exactly two bytes). When using the output rom "__Zelda.smc" again with "RT.exe __Zelda.smc" it produces the same rom like "_Zelda.smc" without differences, so this problem occurs only one time. No idea what happend here.


Last edited by Trovsky on Thu 26 Jan 2017 - 21:33; edited 1 time in total (Reason for editing : mirror)

XaserLE



Since : 2013-01-22

Back to top Go down

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

Post by Arnachy69 on Wed 11 Nov 2015 - 10:52

How it is with an unlimited on Sprites in one room ( Dungeon )
Everytime i'll get this poppup



[Not Enough Space For Sprites] is this issue to fixid or?

Arnachy69
Wish Fairy
Wish Fairy

Since : 2015-09-27

Back to top Go down

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

Post by XaserLE on Wed 11 Nov 2015 - 12:28

Hyrule Magic can only use what is there in the rom. You are not able to insert new sprites without deleting an old one. The tool in this thread can't change Hyrule Magic, but you can use two different rom's to edit and merge them after editing. In this way it is possible to have more sprites than there was. But this should be a final step in rom-hacking. The merged rom is no longer editable with hyrule magic.

So this issue can't be fixed. If you are a beginner in hyrule magic, you don't should mess with RoomTransfer tool, it's written for advanced users.

XaserLE



Since : 2013-01-22

Back to top Go down

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

Post by Puzzledude on Wed 11 Nov 2015 - 12:46

I suggest you stick with what HM is capable. Remove some sprites in other rooms or in the overworld and then add new sprites.

PS @XaserLe
The IQ hack is actually using your strategy of reorganizing indoors data to have unlimited space for room header, sprites etc, but it does not use all rooms.
avatar
Puzzledude



Since : 2012-06-20

Back to top Go down

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

Post by XaserLE on Wed 11 Nov 2015 - 13:12

I am glad to hear that Smile I always wanted this tool to be used in hacks, but unfortunately it needs hacking experience to know what this tool can do. So hackers with your knowledge are the only ones that will ever use it.
Is the IQ hack released? Due to time issues i was a long time away from hacking, but i will come back and fix your menu rearrangement.

XaserLE



Since : 2013-01-22

Back to top Go down

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

Post by Arnachy69 on Wed 11 Nov 2015 - 13:37

Problem solved Guy's without delete other sprites normal and dark world Razz

Arnachy69
Wish Fairy
Wish Fairy

Since : 2015-09-27

Back to top Go down

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

Post by SunGodPortal on Thu 15 Dec 2016 - 1:35

XaserLE wrote:https://www.dropbox.com/s/t81ywev9rxn3cfk/RoomTransfer.zip

There it is! I was looking for this the other day and it turns out that it's not in the tools section but in one of the doc threads.
Confused

While I'm here I'd just like to say that this tool is awesome. The organization and labeling of the relocated data is a real life saver and it made it so easy for me to move the data somewhere else with a hex editor (I didn't like where it was at and didn't like having a 3 MB ROM with mostly empty space).

Cheers to Puzzledude and XaserLE!
Very Happy
avatar
SunGodPortal



Since : 2015-01-26

Back to top Go down

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

Post by XaserLE on Thu 15 Dec 2016 - 5:59

I am glad to hear that Smile

XaserLE



Since : 2013-01-22

Back to top Go down

Page 5 of 6 Previous  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