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

Author Topic: reinserting files  (Read 4233 times)

Blank_User

  • Jr. Member
  • **
  • Posts: 20
    • View Profile
reinserting files
« on: April 20, 2014, 11:13:41 am »
hello everyone,

sorry for bothering all of you but could someone teach me how to reinsert edited files in the original psx rom. thanks for the help in advanced :)

FAST6191

  • Hero Member
  • *****
  • Posts: 3091
    • View Profile
Re: reinserting files
« Reply #1 on: April 20, 2014, 11:30:23 am »
Assuming it is not one of the rare games that uses raw/LBA reads then
Open iso editor
Find replace file dialog (typically right click on the file in choice and press insert)
Find file on your hard drive and press OK
Many will do it there and then, others might want to save it to another file.

It is slightly easier for the PS1 I believe (it does not use some of the newer concepts for the iso format seen on the PS2 and beyond) so you might find something in the freeware world but most will find themselves using commercial software for insertion purposes. Most of the big iso handling tools in the ultraiso/poweriso/magiciso world will do this.

Inserting files to things with a filesystem is usually quite easy. About the only times it gets tricky are in cases where the game goes outside the filesystem (the playstation line has a habit, with Square (Enix) games being noted for it and such a thing typically being called raw/LBA reads), if the files have to stay in order (some stuff on the DS has this) though this is typically only a problem when doing a full rebuild of the iso, there is an archive format within the normal game (common everywhere), or a file has to be at a certain location.

Blank_User

  • Jr. Member
  • **
  • Posts: 20
    • View Profile
Re: reinserting files
« Reply #2 on: April 20, 2014, 11:06:25 pm »
I guess inserting files is not that hard but could you teach me how to fix the bugs. The files I edited is the script of the game and menu. Thanks for the reply ;D

BlackDog61

  • Hero Member
  • *****
  • Posts: 784
    • View Profile
    • Super Robot Wars A Portable translation thread
Re: reinserting files
« Reply #3 on: April 21, 2014, 02:41:51 am »
This is going to be a half-worked answer, because I have not tried, but can you not use the CD Gen tools from that package?
http://theisozone.com/downloads/playstation/tools/ps1-psx-hack-tools-v20/

(actually you might want to just delete this post...)

FAST6191

  • Hero Member
  • *****
  • Posts: 3091
    • View Profile
Re: reinserting files
« Reply #4 on: April 21, 2014, 04:09:17 am »
Fix bugs..... assuming you did not mean fix issues caused by my inserting a file then two schools of thought really

1) You play to the bugs.
I once saw a presentation on I think it was the unreal engine. There was a bug where object 57 or something was invisible, it turned out to be because of bad coding (a dev of the original game wanted to make an object invisible and forced it for object 57).
Solution. Make object 57 something small and use what you want in the object 58 slot instead.

If you prefer
"It hurts when I do this."
"Then don't do that."
It has the same pitfalls as that really.

2) You fix the bugs.
This might involve actual coding, it might involve something a bit higher level (pointers are not code but they are also something you can fix easily enough) or it might involve getting a bit creative -- say the devs left out a & symbol and you really need one for your hack, bonus is there is a left over character like ¬ which you really do not need.... guess what you get to draw over.
Otherwise yeah this is hacking and teaching you everything there is to know there is a bit outside the scope of a forum post.

Blank_User

  • Jr. Member
  • **
  • Posts: 20
    • View Profile
Re: reinserting files
« Reply #5 on: April 23, 2014, 01:07:15 am »
hello blackdog61,

can you give some of the tutorials on how to use the tools in there. it's my first time to psx scene that is why i have no idea how to use them.

Scio

  • Full Member
  • ***
  • Posts: 155
    • View Profile
Re: reinserting files
« Reply #6 on: April 23, 2014, 12:07:59 pm »
Reinserting files is usually something you have to tweak on a game-by-game basis. So there isn't much of a tutorial on that, because every game is different. If what you're asking for is a tool that magically fixes all your bugs and issues with pointers, there isn't one. This may sound a little patronizing, but no one told you this would be easy.

If the game doesn't work at all after reinserting the files: you did something wrong
If the game works, but there are bugs everywhere: guess what, you have to fix them.

Blank_User

  • Jr. Member
  • **
  • Posts: 20
    • View Profile
Re: reinserting files
« Reply #7 on: April 26, 2014, 03:38:05 am »
hello scio,

i think you are right i thought also it would be easy but can you tell me how can i tell what kind of compression is use on the game.

henke37

  • Hero Member
  • *****
  • Posts: 643
    • View Profile
Re: reinserting files
« Reply #8 on: April 26, 2014, 08:11:25 am »
Look for obvious signs. The first thing to look for is headers with markers that unambiguously state the exact compression used. The second thing to look for is typical data for common algorithms. Plaintext interrupted with control data that slowly starts becoming nonsense? Probably a runtime dictionary compression like lz77 or lz78. Tree followed by a bitstream? Huffman. Phrases followed by plaintext? Fixed dictionary. Small integers that rarely change sign? Delta coded.

Blank_User

  • Jr. Member
  • **
  • Posts: 20
    • View Profile
Re: reinserting files
« Reply #9 on: April 26, 2014, 10:40:37 pm »
ah ok. this is a great help for a beginner like me in the psx scene. thank you for the help.

MarkGrass

  • Jr. Member
  • **
  • Posts: 65
    • View Profile
Re: reinserting files
« Reply #10 on: April 27, 2014, 03:26:21 pm »
For extracting and replacing files, I highly suggest using CDmage B5.

If you're going for a huge hack, where many files are altered, then I would suggest simply rebuilding the ISO. This can very easily be done with 'cd-tool' or Sony's 'buildcd' - I don't think buildcd works on Win7+, however.

You'll want to be on the lookout for the following issues:

1 - Games that use check sum integrity (many CAPCOM games use this). In such case, you'll need to write your own check sum calculator and insert the table into the executable before every modification, no matter how big or small. If you replace a file that undergoes check sum integrity without updating the sum value, the game will simply black-out (crash). An alternative to this is to disable the check sum integrity via r3000a dis/assembly. When/if such functionality is located, you can use KC's armips for making the necessary changes.

2 - As mentioned, games that use hard-coded LBA tables (Squaresoft, CAPCOM, etc. use this). It is generally safer, faster and easier for the original developers to use this method, compared to generic PSY-Q SDK functionality. Again, a special tool will be required for such matters. To determine if a game uses an internal LBA table, insert a file via CDmage B5 and play the game to the point where you know when the file is going to be used. If the game doesn't crash, you probably don't need to worry about this. If the game won't even boot, or if the game crashes where the file is used, chances are extremely likely that the executable utilizes an internal LBA table in addition to performing file integrity check sum.

3 - Compression isn't a linear process for PSone games - just about every game developer for every game in existence use their own compression schematics. Yet again, this will require a special tool, only you'll have to reverse-engineer the specifications via r3000a dis/assembly. In any case where you get lucky (if the game/series is popular enough), chances are likely that someone else has already written tools for the cause.

4 - Most, but not all games for the PSone use Mode2/XA formatted disc types. In any other case, modification becomes a true painstaking process where rebuilding the ISO is almost always necessary.


All said, I would suggest starting small - replace a texture or two, see how it goes and eventually work your way up from there.

krat0s

  • Jr. Member
  • **
  • Posts: 31
    • View Profile
Re: reinserting files
« Reply #11 on: June 17, 2014, 07:34:29 pm »
hello blackdog61,

can you give some of the tutorials on how to use the tools in there. it's my first time to psx scene that is why i have no idea how to use them.

Search the forums.
« Last Edit: March 14, 2021, 09:17:44 am by krat0s »