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

Author Topic: [PSX] PSH editor needed for future Romhacking projects  (Read 1051 times)

NSM1996

  • Newbie
  • *
  • Posts: 4
    • View Profile
[PSX] PSH editor needed for future Romhacking projects
« on: May 06, 2020, 09:29:56 am »
I intend to romhack a game produced by EA designed for creating to PlayStation, but the images are not in TIM file, but in PSH one. That's why, I need an editor to decompress and reinsert the PSH to BMP images for doing it successfully. But, I've found FSHTool without a support to PSH images, because a topic created by an user here demonstrates a citation. Can users of this site help with an advice or a link to do it? Because the Tile Molester pixelizes the remaining images, except only one, without any specific criteria to work correctly.

Ed101

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: [PSX] PSH editor needed for future Romhacking projects
« Reply #1 on: May 07, 2020, 10:56:03 am »
Hi there,

I had a quick look around, and there does not seem to be a complete solution for this.

I will summarise what I have found, apologies if you know everything I cover.

Download of FSHTool (v1.22) - includes source code
http://www-math.mit.edu/~auroux/software/index.html

References to "PSHTool":
https://www.romhacking.net/forum/index.php?topic=19587.0
http://nfspolicehq.com/forum/index.php?showtopic=128

NFS4 PSH Editor (v0.1b) - download is no longer available
https://lgt.createaforum.com/index.php/topic,18.0.html
https://www.tapatalk.com/groups/residentevil123/nfs4-psh-editor-t2719.html


You could ask at those other places, to see if anyone has a backup of "PSHTool" and/or "NFS4 PSH Editor".

NFS4 PSH Editor can't change the size of the textures, it seems, so if you need to do that, it may not be worth the effort of tracking down.

As for "PSHTool", it looks like all that was done was a minor edit to the source code:
"...a slightly edited FSHtool (so it understands .PSH files now, but not .FSH and .QFS files anymore)."

".PSH is actually .FSH with one byte changed (fourth byte is 50 (P) instead of 49 (I))"

I suspect changing line #1865 in the C code from:

"if (!strncmp(inbuf,"SHPI",4)) {  "

 to

"if (!strncmp(inbuf,"SHPP",4)) {  "

will either create "PSHTool" when it is compiled, or get you very close to this functionality. Search for "SHPI" in the source code for more.

Judging by this statement: "The only solution I see - replacing .BMP support of FSHtool with .TIM support - requires knowledge of programming languages, which I lack." the creation of "PSHTool" will only require quick and easy code changes, as the author claims to lack programming skills.


Are you comfortable trying to edit the source code of FSHTool?



Jorpho

  • Hero Member
  • *****
  • Posts: 4428
  • The cat screams with the voice of a man.
    • View Profile
Re: [PSX] PSH editor needed for future Romhacking projects
« Reply #2 on: May 07, 2020, 11:26:29 am »
".PSH is actually .FSH with one byte changed (fourth byte is 50 (P) instead of 49 (I))"
If that's the case, I reckon it might be easier to change that one byte in the .FSH and then open it in the editor, rather than trying to recompile the source code.
This signature is an illusion and is a trap devised by Satan. Go ahead dauntlessly! Make rapid progres!

NSM1996

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: [PSX] PSH editor needed for future Romhacking projects
« Reply #3 on: May 07, 2020, 01:35:21 pm »
Hi there,

I had a quick look around, and there does not seem to be a complete solution for this.

I will summarise what I have found, apologies if you know everything I cover.

Download of FSHTool (v1.22) - includes source code
http://www-math.mit.edu/~auroux/software/index.html

References to "PSHTool":
https://www.romhacking.net/forum/index.php?topic=19587.0
http://nfspolicehq.com/forum/index.php?showtopic=128

NFS4 PSH Editor (v0.1b) - download is no longer available
https://lgt.createaforum.com/index.php/topic,18.0.html
https://www.tapatalk.com/groups/residentevil123/nfs4-psh-editor-t2719.html


You could ask at those other places, to see if anyone has a backup of "PSHTool" and/or "NFS4 PSH Editor".

NFS4 PSH Editor can't change the size of the textures, it seems, so if you need to do that, it may not be worth the effort of tracking down.

As for "PSHTool", it looks like all that was done was a minor edit to the source code:
"...a slightly edited FSHtool (so it understands .PSH files now, but not .FSH and .QFS files anymore)."

".PSH is actually .FSH with one byte changed (fourth byte is 50 (P) instead of 49 (I))"

I suspect changing line #1865 in the C code from:

"if (!strncmp(inbuf,"SHPI",4)) {  "

 to

"if (!strncmp(inbuf,"SHPP",4)) {  "

will either create "PSHTool" when it is compiled, or get you very close to this functionality. Search for "SHPI" in the source code for more.

Judging by this statement: "The only solution I see - replacing .BMP support of FSHtool with .TIM support - requires knowledge of programming languages, which I lack." the creation of "PSHTool" will only require quick and easy code changes, as the author claims to lack programming skills.


Are you comfortable trying to edit the source code of FSHTool?

I've did in Visual Studio Code, but I think that I to rename SHPI to SHPP for all definitions found about it.

NSM1996

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: [PSX] PSH editor needed for future Romhacking projects
« Reply #4 on: May 07, 2020, 02:18:45 pm »
If that's the case, I reckon it might be easier to change that one byte in the .FSH and then open it in the editor, rather than trying to recompile the source code.

Unfortunately, the program didn't work. But, if one of you succeed, send a source code here.

May 07, 2020, 04:15:35 pm - (Auto Merged - Double Posts are not allowed before 7 days.)
Hi there,

I had a quick look around, and there does not seem to be a complete solution for this.

I will summarise what I have found, apologies if you know everything I cover.

Download of FSHTool (v1.22) - includes source code
http://www-math.mit.edu/~auroux/software/index.html

References to "PSHTool":
https://www.romhacking.net/forum/index.php?topic=19587.0
http://nfspolicehq.com/forum/index.php?showtopic=128

NFS4 PSH Editor (v0.1b) - download is no longer available
https://lgt.createaforum.com/index.php/topic,18.0.html
https://www.tapatalk.com/groups/residentevil123/nfs4-psh-editor-t2719.html


You could ask at those other places, to see if anyone has a backup of "PSHTool" and/or "NFS4 PSH Editor".

NFS4 PSH Editor can't change the size of the textures, it seems, so if you need to do that, it may not be worth the effort of tracking down.

As for "PSHTool", it looks like all that was done was a minor edit to the source code:
"...a slightly edited FSHtool (so it understands .PSH files now, but not .FSH and .QFS files anymore)."

".PSH is actually .FSH with one byte changed (fourth byte is 50 (P) instead of 49 (I))"

I suspect changing line #1865 in the C code from:

"if (!strncmp(inbuf,"SHPI",4)) {  "

 to

"if (!strncmp(inbuf,"SHPP",4)) {  "

will either create "PSHTool" when it is compiled, or get you very close to this functionality. Search for "SHPI" in the source code for more.

Judging by this statement: "The only solution I see - replacing .BMP support of FSHtool with .TIM support - requires knowledge of programming languages, which I lack." the creation of "PSHTool" will only require quick and easy code changes, as the author claims to lack programming skills.


Are you comfortable trying to edit the source code of FSHTool?

Now, I've succeeded to do the full edition, and decompressed succesfully because I had downloaded the Dev C++ and I have been copied the source code to compile in .exe.
« Last Edit: May 07, 2020, 04:26:30 pm by NSM1996 »

Ed101

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: [PSX] PSH editor needed for future Romhacking projects
« Reply #5 on: May 07, 2020, 10:18:45 pm »
Now, I've succeeded to do the full edition, and decompressed succesfully because I had downloaded the Dev C++ and I have been copied the source code to compile in .exe.

What did you need to change to get it working? And can you recompress the textures too?


NSM1996

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: [PSX] PSH editor needed for future Romhacking projects
« Reply #6 on: May 08, 2020, 09:14:53 am »
What did you need to change to get it working? And can you recompress the textures too?

I've changed the SHPI to SHPP in all command lines, but the image was converted to BIN and the only difference was the images were separated even they stay untidy in relation to original view in PSicture. So, it partially worked, maybe the NFS4 PSH Editor would be efficient.

May 11, 2020, 11:51:50 pm - (Auto Merged - Double Posts are not allowed before 7 days.)
What did you need to change to get it working? And can you recompress the textures too?

I'd contacted the administrator of the site LGT (Leo's Game Tools) to update and I've succeeded to download the program that it renderizes the images correctly.
« Last Edit: May 11, 2020, 11:51:50 pm by NSM1996 »