AlchemillaHsospital

PlayStation (SH) modding basics FAQ & Tutorial (UPD!)

Talk about modding SH 1 here
Post Reply
User avatar
admin
Site Admin
Posts: 294
Joined: Wed Aug 18, 2021 11:41 am
Contact:

PlayStation (SH) modding basics FAQ & Tutorial (UPD!)

Post by admin »

|PaulSilentin" wrote: Hello, i saw here that many people don't have information about playstation original romhacking basics. I can write some info about all traditional methods simplifying as possible, to help anyone who want to modify this game.

About first silent hill mod ever:
i'm almost sure, that really first mod was completely done by comercial russian hackers for internal russian bootleg market, it was done after several months from USA retail release, as i can remember. This mod is actually unofficial english - russian translation with a lot of errors and mad skillz stuff. Method for modding was - their own hacking tools and debugging hardware with soldering on real console and such advanced stuff. All the first modifications was based on replace: font texture, city textures, audio streams and in-game text bytes, they was replaced from english to russian language, i mean it was replaced BYTE TO BYTE - without rebuild of the iso, without codes, only HEX iso editing! This is was most basic and first mod ever, i think. (newer mods-translations was more advanced with rebuild iso and extended characters limits in game subtitles, but this is was a lot later then first one (like polish, brazilian and other translation projects))

proof scans and screens of this mods here, i can confirm this is 100% real, cos i was holding this in my own hands back in 1990's-2000's

http://youtu.be/NA09ZA2zJkI

PLAYSTATION GAMES MODIFICATIONS MAIN METHODS
1. Memory editing
Image
Example: no$psx debugger/disassembler, Cheat Engine, ArtMoney, ect...

Good about this: It's pretty simple, it can be done by anyone (hacking bullets amount or medical kits amount). It's popular, there is a lot of youtube tutorials. It can be shared with anyone in simple text format, without files, patches and media files. It's can be used everywhere.
Bad about this: memory adresses can be dynamic, that means you can hack something, but you can't hold it hacked for a long time, or after reboot. Or you can't share this with other people (you can share only videos and screens). This is problem, but it can be solved. Only a few romhackers with a lot of experience can do the code, that will work for anyone, all the time, in any console and with any retail game. This people doing great cheats for GameShark, Xploder, ARMAX, CodeBreaker and more, codes listed here: http://gamehacking.org/

2. PlayStation common formats media/text files scanners/rippers
Image
Example: PSound 2.0, tim2view r86, PSX VRAM viewer 1.0, PSmplay 0.4, TIMViewer, Jaeder Naub 2.14g, VGMToolbox, Dragon UnPACKer HyperRipper, several TMD, TIM, STR, XA, VAB scanners and rippers, such stuff...

Good about this: super easy, you just hit the scan button and extract files, then modify them, and after replace original with modded, like in tim2view r86 and in others.
Bad about this: MANY game files may be under heavy compression methods (some SH files too!), like zlib, custom .zip and other specific stuff, scanners in most can't work with compressed files and archives, so sometimes you will not find something, that you was looking for, but this will stay in game resources anyway until it will be unpacked (look method №3 down here). Also some games don't use common files like: TMD (PS 3d models), TIM (PS 2d textures), STR (PS stream video), XA (PS stream audio), VAB (sounds) - so you will find nothing again without unpacking archives.

3. Editing the actual game files physically /rebuild /*.PPF patches
Image
This is not easiest, but most correct method, you will see game files in their original formats and folders/files direct native locations. Let's write step by step how it's goes usually with Silent Hill game:

1. Create game iso file from your own retail Silent Hill game to your PC HDD. (don't use iso, mdf, mdx formats)
2. Download already created hacking tools for SH by russian translators: http://forum.xentax.com/blog/?p=905
3. Extract all files from your ISO in root of your main HDD partition, in C:/sh/ with Deamon Tools Lite, windows explorer or with CDmage tool.

Attention: this tutorial for EUROPE retail release of Silent Hill, that had Sony ID: SLES-01514, NOT USA release, i don't know how to work with USA retail version in this tutorial with this tools (you may mod this/create your own unpacker tool for any other versions, it's possible, you can find source code of unpacker). Actually you can unpack "SILENT" archive from USA release WITH EUR "SLES_015.14" file, but i don't recommend to do this, some extracted files may be corrupted with this method or maybe not all of them.
---
4. extract silent hill tools archive, place file "SHFilesExtractor.exe" in path C:/sh/
Your folder must be like:

Code: Select all

SYSTEM.CNF
SLES_015.14
SILENT
SHFilesExtractor.exe
HILL
5. Run Windows Command Prompt, then write in this:

Code: Select all

cd c:/sh
SHFilesExtractor SLES_015.14 SILENT c:/sh/ex
Now you will see extraction process, wait until it will say "done", then close the Command Prompt.
6. open you new "ex" folder with extracted game resources, you will see folders and files. Write search tag in windows 7 search tool (upper right of window) with ".TIM" and you will see 1043 amout of 2d textures from game. To open TIM you can use tim2view r86 or "OPTPiX iMageStudio for PS2" with full TIM support.

Write search tag in windows 7 search tool with ".VAB" and you will see sfx sounds from in-game track music, can be opened with PSound 2.0 tool. Track music cannot be converted in PSF right now (all track music complete soundtracks you saw earlier was recording from emulator, not hacking silent hill konami track music driver), more info here: http://forum.xentax.com/viewtopic.php?f=17&t=10793 or here: http://www.zophar.net/music/psf.html
Write search tag in windows 7 search tool with ".TMD" and you will see some part of 3d models (not all 3d models in this format!), you can open SOME of them with MilkShape 3D 1.8.4 and TMD plugin. More info here: http://forum.xentax.com/viewtopic.php?f=16&t=10812
Image
Write search tag in windows 7 search tool with "BODYPROG.BIN" this is file with in-game text, and guess what? This file is encrypted. Place "SHDcdr.exe" from SH tools to new folder together with "BODYPROG.BIN" then drag'n'drop one to another, nothing will happend (will open and close small black window), but file will be decrypted in one moment. Open decrypted file in HEX editor and scroll down, you will see in-game text, here is visual explanation for this process for better understanding:
Image

It's not complete list of Silent Hill's resource native formats, but this is basic information, i will find more files and i will report results later. Archive "HILL" contains several stream media formats like STR video and audio stuff, you can use scanners/rippers for it. Also actually there is a lot of information inside of "SLES_015.14" file too, but i don't know how to modify this file in correct way, some people can do amazing things with it.

Replacing/actual modding guide:
Well, you can modify extracted files right now, but you can't directly rebuild "SILENT" archive with this tools. So you will need HEX editor or your own rebuild tools (you can try to create QuickBMS script with rebuild for example, compare to the sh tools source code http://aluigi.altervista.org/quickbms.htm). My choise is HEX editing of "SILENT" archive with BYTE TO BYTE method or BYTE PLUS ZEROS. After replacement inside of "SILENT" archive in HEX, you can replace SILENT archive in iso with CDmage "import file" function without rebuild if new file in same size (unpacking archive from unpacked iso similiar to russian Matryoshka doll, if this way easiest to understand).
I will write more details about HEX modding later, maybe will be a video tutorial. There is another methods of modding PS games, i will write about it later. Also some files STILL COMPRESSED after "SILENT" archive extraction process, you can decrypt some of them with "SHDcdr.exe" tool. I know how to rebuild PlayStation ISO with file replacement style "modded file bigger then original file", but it's useless without "SILENT" archive rebuilder tool. Down here is result of my mod, i was replaced knife model with "alessa room knife" from "nowhere" - it's works.

How to create/work with .PPF patches:
The "Create PPF" tool compares the "original image" and the "hack image" of a game or any other type of image, and make a PPF file with the differences to apply to the original image. Nothing more, just useful method for sharing your mods in the net with others in simple way. You can find many PPF tutorials and patches for Resident Evil series or you can convert memory codes to PPF someway (it's another cool story).

That's all for today, feel free to correct me, my english is not perfect and my knowledge of technical stuff too, i can be wrong with some of my words and my suggestions in this thread. Correct me, if you know something more then me. Also i can provide anyone with public domain hacking tools, useful links and tutorials (about ps1 emulators too, i know how to turn on true widescreen in SH), feel free to ask such things. Will be updates later. Thanks

https://youtu.be/gmtrNGtdZds
"SILENT" archive modding is extremely LIMITED, there is some reasons for that. In simple words: i can't replace all humans with Harry model because of MODEL SIZE, that Harry have more polygons, than in others characters models, also he have more size in bytes. I have done simple "compatibility table" it will show what models you can replace and what not. Some models have different skeletons and animation incompatibility between models, that can generate glitches.
Ugly and wierd, yea. Anyway how to do that without crashing the game and model flicking:

We will replace HERO .ILM model and .TIM texture with "AR" one.
AR.TIM smaller then HERO.TIM, so calculate difference and add NULLS in AR.TIM, this is directly 8192 bytes to add, do this. Then replace modded version of AR.TIM with fixed byte size inside of "SILENT" archive directly on offset 2D14800 (hex, HxD: Search->goto...) with Overwrite mode.
With .ILM will be tricky. AR.ILM bigger then HERO.ILM directly with 512 bytes - cut this 512 byte off the AR.ILM file FROM THE END, do this (select bytes from the end of the file and press delete button in HxD). This will cut off Alessa's leg lol, but it needed to be done.
AR.ILM now coincides with the size of HERO.ILM, but don't try to replace model right now! You need to modify internal model name and end of the file from original HERO.ILM to modded AR.ILM file, here is pic what bytes needed to be replaced directly with Overwrite mode, do this.
Attachments
JpMW.png
JpMW.png (126.88 KiB) Viewed 3421 times
JrCE.png
JrCE.png (47.69 KiB) Viewed 3421 times
User avatar
admin
Site Admin
Posts: 294
Joined: Wed Aug 18, 2021 11:41 am
Contact:

Re: PlayStation (SH) modding basics FAQ & Tutorial (UPD!)

Post by admin »

[quote="martinbiohazrd]Hi, first at all, congratulations for the great work with all this tutorials and useful info about SH1 modding! thank to you and some other users here, I have decided to enter into the SH1 modding scene. :)

Now, I just want to report something strange about the two available SH1 extractors; SHFilesExtractor.exe and shx.exe. What I mean is when you extract the SILENT file with both extractors (in this case I'm using the SLES_015.14 PAL version) and after you compare the files from CHARA folder, for example the HERO.ILM and HERO.TIM (Harry Mason) files, they are different in size, to be more extact, looks like the extracted ones with SHFilesExtractor.exe missing a few of data at the end of files, here a comparation I did with my hex editor:

Here HERO.ILM extracted with SHFilesExtractor.exe:
http://i.imgur.com/ypdRTeS.png

And here HERO.ILM extracted with shx.exe:
http://i.imgur.com/9qeLINL.png

I'm not 100% sure but maybe SHFilesExtractor.exe extract SILENT data incorrectly and shx.exe do it correctly?

Well, I just want to report it so you (the expert ones) can confirm me this.

Greetings and keep up the amazing work here PaulSilentin! ;)

EDIT:

After study in depth the files, I have come to the conclusion that the extracted files with both extractors, are not extracted correctly (no offense intended), the files are extracted along with DUMMY data in the end of each one of them.

Check this out, here I show you an example with the files HERO.ILM and HERO.TIM:
http://i.imgur.com/qrv2ogS.png

If you pay attention, that DUMMY data wich I'm talking is nothing more nor less than part of the same file that is used in game only to complete the sectors of disc.

Is very important to know how much DUMMY data each file have, so you can calcule how much free space you have to replace files.

I just wanted to clear that up, so there is not some kind of confusion.[/quote]
Post Reply