+  RHDN Forum Archive
|-+  Romhacking
| |-+  ROM Hacking Discussion
| | |-+  Replacing .bin files in a PS2 iso?
Pages: [1]
Author Topic: Replacing .bin files in a PS2 iso?  (Read 2 times)
Velsper
Guest
« on: October 19, 2009, 11:49:27 pm »

So, I had been planning on changing the script of PS2 game, and while I managed to find all the files that needed changing and did them with a hex editor I'm running into problems when I'm going to replace the .bin files in the iso with the ones I changed.

When trying to use CDmage's "import" function it replaces the file like normal but when I then extract the file to check the contents it's garbled about halfway through, or it includes information from another file I changed earlier.

Basically, it seems I can replace 1 file but any subsequent files are corrupted.

Any ideas on what the problem could be? Are the files too big for CDmage or something?

The only things changed are lines of text and they've all retained the original length and size so that's not the problem.
Rolen47
Guest
« Reply #1 on: October 22, 2009, 07:32:31 pm »

That's really strange. I've never had that happen to me, and I use CD Mage Beta a lot on my PSP translations.

However are you sure it's garbling the data while inserting? Maybe it only has problems when you attempt to extract a file after inserting multiple files. You could open the ISO in a hex editor and double check if the data is alright.
« Last Edit: October 22, 2009, 07:48:04 pm by Rolen47 »
DarknessSavior
Guest
« Reply #2 on: October 22, 2009, 08:31:08 pm »

I've said this before. You have to do things really carefully when you mess with CD-based games. Alot of the time, unless you do some careful hacking (insert Gemini rant here) if you put more text in a file than was originally in it (or increase filesize in any manner) the game will not work. At all.

Quote from: Rolen47 on October 22, 2009, 07:32:31 pm
That's really strange. I've never had that happen to me, and I use CD Mage Beta a lot on my PSP translations.

Slightly off topic: are PSP games set up the same way as PSX/PS2 games are (in general, I'm sure there are games that have crazy custom file systems)?

~DS
Velsper
Guest
« Reply #3 on: October 23, 2009, 01:45:27 am »

Quote from: Rolen47 on October 22, 2009, 07:32:31 pm
However are you sure it's garbling the data while inserting? Maybe it only has problems when you attempt to extract a file after inserting multiple files. You could open the ISO in a hex editor and double check if the data is alright.

I did mount the ISO and check the files from there and they are still garbled.

I didn't have any problems doing this on PSX games so I just guessed that it could be due immense difference in filesizes between PSX and PS2, or I suppose it could be some sort of memory problem with my comp.

I just wanted to see if anyone's experienced the same thing and knew why it happens.

Quote from: DarknessSavior on October 22, 2009, 08:31:08 pm
f you put more text in a file than was originally in it (or increase filesize in any manner) the game will not work. At all.

While I appriciate the responses, I did state in the original post that the filesizes haven't changed and so that's not the issue. If it were, CDmage would have alerted me to that fact to begin with.
mrspoon
Guest
« Reply #4 on: October 23, 2009, 01:55:21 am »

That was just an example he gave. Even replacing the text without altering the file size can alter hashes, which can render them corrupt. Unknowingly/accidentally/purposefully moving the location of files can jack things up as well, though I don't assume that's what garbled the contents.
Rolen47
Guest
« Reply #5 on: October 23, 2009, 06:02:56 pm »

Quote from: DarknessSavior on October 22, 2009, 08:31:08 pm
Slightly off topic: are PSP games set up the same way as PSX/PS2 games are (in general, I'm sure there are games that have crazy custom file systems)?

~DS

PSP ISOs are super easy to deal with. They adhere perfectly to the ISO9660 standard and don't do any weird tricks like PS1 ISOs did. Videos are always stored as a PMF file and music is usually stored as a AT3 file. The hardest thing about PSP ISOs is sometimes the developers pack the game's files into a proprietary compressed archive, but not all developer do this. There's a tool called Xpert2 that can extract some of these archives and it gets updated often. Even then, there are many games that can be hacked with nothing more than a hex editor because many games support both S-JIS and ASCII (but not all).

Quote from: mrspoon on October 23, 2009, 01:55:21 am
That was just an example he gave. Even replacing the text without altering the file size can alter hashes, which can render them corrupt. Unknowingly/accidentally/purposefully moving the location of files can jack things up as well, though I don't assume that's what garbled the contents.

CD Mage doesn't modify the locations of any files like other ISO builders do. It just overwrites the raw binary data, just like using a Hex Editor in Overwrite mode.
Velsper
Guest
« Reply #6 on: October 24, 2009, 07:22:24 am »

Quote
There's a tool called Xpert2 that can extract some of these archives and it gets updated often.

Hey, I'm glad you mentioned that tool cause even though I couldn't use it on the PSP game I wanted it proved useful to replace the bin files in the PS2 game. Thanks.
Pages: [1]  


Powered by SMF 1.1.4 | SMF © 2006-2007, Simple Machines LLC