News: 11 March 2016 - Forum Rules
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia, Danke

Author Topic: A question about Multi-file hacks for newer systems.  (Read 1845 times)

Maeson

  • Sr. Member
  • ****
  • Posts: 279
    • View Profile
A question about Multi-file hacks for newer systems.
« on: November 23, 2015, 04:59:05 am »
Just being curious.

To put you into perspective, I'm messing around with Skies of Arcadia: Legends for the Gamecube, and i've been able to play around with magic, items,  even with the growth rates of the characters (Which i don't know how they work exactly, but I can make it work somehow, though). I want to give a new spin to the game.

So far I made all the changes I thought for a first try, and I need to do an entire test play to see how it flows instead of playing by parts. And i'm happy to see that it works playing it on real hardware (on my wii, in this case).

But that's not the important thing:

Most of the changes only affect one file: Start.dol, items, equipment, magic, special skills, ship battles and ship equipment... But when I get to the enemies, and enemy formations, those have a bunch of files for themselves.

If I would want to share this hack for whatever reason... What would be the best way to do so?

Just packing the edited files with instructions? With a tool named GCRebuilder is pretty easy, and i'm not a programmer so I don't know how to do an executable. But with that way, most probably this couldn't/shouldn't be submitted here. Not to mention, it sounds kind of fishy.

Again, I still don't know what I'm going to do with this, as it was made for personal use in mind, but I just thought that maybe some people would be interested in it... All two of them.

If this shouldn't be discused here just delete the post.
« Last Edit: November 23, 2015, 09:51:31 am by Maeson »
I'm off for some time. If for some weird, strange, and important reason, you need to talk to me, just send me a PM and probably I'll read it whenever I come back.

FAST6191

  • Hero Member
  • *****
  • Posts: 3050
    • View Profile
Re: A quesiton about Multi-file hacks for newer systems.
« Reply #1 on: November 23, 2015, 06:24:56 am »
Always a fun one and subject of discussion around here. Fortunately GC isos, unlike the Wii which shares a lot of file formats and coding styles, are not encrypted.

Obviously you can not just share the modified files and will need some form of patch so only your changes are included in it.

For the Wii people got hack users to decrypt the iso and then used a modern patching format like xdelta, bsdiff or even ppf (no idea why people went for that but they did on several occasions) to alter the files and then got people to rebuild. Fewer people have gone into real depth with the GC.

If your changes are mostly in place then that helps; if I am adding or changing text file sizes will tend to increase or decrease but if I am editing a start.dol (others reading dol is the main executable format for the GC) then a lot of changes might be in place (if it is mainly stats tables, drop rates and whatever then that tends to be in place), or at least contained within the binary so as not to mess up any later memory maths. To that end if you can overwrite just the files and not have size changes for the final patch/released patch then that is good. By all means do full rebuilds for your internal purposes but then insert manually/file by file for the final result. You can twist this a bit further and leave most things in place but if you have the space then put the new/altered files at the end of the iso and just change the file pointers to there, a bit crude but I have done it more than once.

Otherwise yeah you either make a batch file to disassemble the iso, patch the individual files and then rebuild it or stick a proper patching format with a long read ahead/behind window on it to search and alter things and hopefully just leave your changes. The latter works and GC games were not the largest so it should not be one of the 3 days of 100% CPU to make a patch type sessions like if you try that on a 30 gig PS3 iso.
Executables in newer systems that require this are acceptable, just try to document what is done so we can still patch things in 20 years without having to have fun and games with virtual machines and messing about finding runtimes.


Maeson

  • Sr. Member
  • ****
  • Posts: 279
    • View Profile
Re: A quesiton about Multi-file hacks for newer systems.
« Reply #2 on: November 23, 2015, 08:04:34 am »
I obviously would like to make a patch before sharing the files themselves, it's just that I do know absolutely nothing about the procedures of making cd/dvd based patches. I would try to take the easiest way for others to patch things, If i can do it of course, as my computer is a piece of junk. Although if I've been able to go to this point in the first place, maybe it can do this too, lol.

As I said, pretty much everything is in one file, but data from enemies and formations are stored in two folders, one named Battle. In total, the number of edited files edited there (At least for the version of the hack i have now) are 246, with a total size inferior to 1MB, each one is between 100/300 bytes each. The other one is the Field folder, that holds 51 edited files with a total size of ~70KB

In fact all that has been touched is in those folders or Start.dol (With a size around 3MB, just like the original file). So at the very least is easy to find...

I've seen that there is one hack for GC already in this site, and uses Xdelta with a .Bat file. Although the patch is in .dif format.

Could you simply use Xdelta (or any other tool) to make a patch by comparing the edited and original iso? That sounds too easy to work...
I'm off for some time. If for some weird, strange, and important reason, you need to talk to me, just send me a PM and probably I'll read it whenever I come back.

FAST6191

  • Hero Member
  • *****
  • Posts: 3050
    • View Profile
Re: A question about Multi-file hacks for newer systems.
« Reply #3 on: November 23, 2015, 11:24:26 am »
When I said files I meant the files themselves -- you can't just give out a complete start.dol (or any other file really) and say inject that with [insert GC iso bothering tool of choice] as it still contains Nintendo's or someone else's code.

In this case xdelta running across both files (by the way xdelta does not officially have an extension so people use anything they like) would probably produce something that turns the base iso into your modified version as it will try to locate data if you change its location or increase something else in size and bump things forward or backwards. However at the hex level a full iso rebuild makes for some crazy changes if you are not careful* so if your resulting patch ends up dozens of megabytes for a few small changes then the seek function of xdelta has failed and you are technically distributing copyrighted material, and also having to shuffle a patch some several dozen megabytes around. In these instances you tend to both want to make the patch making tool's life easier and make less apparent changes and also increase the seek window (it should be an option in whatever patch making tool you are using), if you have to scan several hundred megs looking for a pattern to latch onto then it increases the time taken to make the patch, almost exponentially if you are not careful.

*the xbox was more notable for it but similar things did exist for other consoles. Anyway when people ripped xbox games they would just rip them at a file level and rebuild later, this works fine for most games but then came things like Star Wars KOTOR which deliberately put textures or other certain files close to each other to reduce latency and load times -- those that had just rebuilt using the standard alphabetical order suffered latency and load times over the stock game. Even without that though if the original game had padding or used say unix style alphabetical rather than windows alphabetical in the build process it can still make for some radical changes.

BlackDog61

  • Hero Member
  • *****
  • Posts: 784
    • View Profile
    • Super Robot Wars A Portable translation thread
Re: A quesiton about Multi-file hacks for newer systems.
« Reply #4 on: November 23, 2015, 05:39:13 pm »
Could you simply use Xdelta (or any other tool) to make a patch by comparing the edited and original iso? That sounds too easy to work...

As crazy as it sounds, I went from a more complex wayto exactly that, for the Super Robot Wars AP project (on the PSP).
Your mileage may vary for the GC, but it's worth a try.

Maeson

  • Sr. Member
  • ****
  • Posts: 279
    • View Profile
Re: A question about Multi-file hacks for newer systems.
« Reply #5 on: November 24, 2015, 04:05:00 am »
As crazy as it sounds, I went from a more complex wayto exactly that, for the Super Robot Wars AP project (on the PSP).
Your mileage may vary for the GC, but it's worth a try.

I ended trying it, and it creates a patch with a file size around 7MB that you can install with XdeltaGUI, nothing more is involved.

When applied to a clean iso, it seems to produce the changes I did to the game looking at the files (I still have to try it on my Wii),but Start.dol has it's size changed...Somewhat. The other files seem to have the changes I made without creasing it's size.

Comparing between the original Start.dol, the modded one and this third created by the patch, it seems that when I rebuild it the tool adds a few bytes to it somehow. They do seem to do absolutley nothing (it's just 00 until the end of the file). Both the modded and the third have those extra bytes.

I never noticed it because once the iso was rebuilt I keep using the Start.Dol I already had. And I know for a fact that the file being a bit longer doesn't affect the game as I've played it from beginning to end (while doing changes constantly) with those bytes on Start.Dol, so...

For now it seems that the Xdelta tool may have done a great job. This is the kind of thing you don't expect to work...

Now I'll test this patched iso in my Wii to see if the changes are really there and if it works properly. It will be fast because the very first battle was changed, lol.

EDIT: Yeah, everything seems to be there. Formations, the change in stats, the items, magic, the description of items... and working perfectly on my console. Awesome! I still don't believe that Xdelta can do this, lol.

Thank you FAST6191 and BlackDog61 for your input!
« Last Edit: November 24, 2015, 04:38:01 am by Maeson »
I'm off for some time. If for some weird, strange, and important reason, you need to talk to me, just send me a PM and probably I'll read it whenever I come back.