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

Author Topic: Add routine in PS2 Elf file  (Read 2344 times)

Mirakichi

  • Jr. Member
  • **
  • Posts: 19
    • View Profile
Add routine in PS2 Elf file
« on: December 24, 2016, 06:48:02 am »
Hi, this is my first time here in Romhacking.net. I need to help for add and enable some routines in ps2 elf executable.
This routine refers to the subtitles showed in cutscenes of Resident Evil 4 (ps2) european version. This RE4 version uses text files with subtitles for videos, however, manys videos don't show the subtitles during the speechs, but the this subtitles are in text files.
My goal is; add lines in text scripts to show subtitles in main game, e.g; when a Ganado to speak: "Un forasteiro", a subtitle to be showed in tv screen, sync with the speech. And enable the subtitles that are not showed in some cutscenes, edit the showing time of text in screen, and the position.
Someone can help me to find the routine that read the texts and shows them in screen, to make possible the edition of routine?
This is the link with executable elf of re4: https://drive.google.com/file/d/0B-izXc2oOt7udEpPU3FkOGJ3V0E/view?usp=drivesdk

mz

  • Sr. Member
  • ****
  • Posts: 447
  • Whore
    • View Profile
Re: Add routine in PS2 Elf file
« Reply #1 on: December 24, 2016, 12:12:26 pm »
"Un forasteiro"
They're Spanish, not Portuguese, so it's "forastero", without an "i".
There has to be a better life.

Mirakichi

  • Jr. Member
  • **
  • Posts: 19
    • View Profile
Re: Add routine in PS2 Elf file
« Reply #2 on: December 24, 2016, 02:01:44 pm »
Ok, forgive my mistake in "i", but returning to the post subject, how to find a routine that shows the subtitles in tv screen, and how to edit, add new subtitles syncronized with the speechs?

mz

  • Sr. Member
  • ****
  • Posts: 447
  • Whore
    • View Profile
Re: Add routine in PS2 Elf file
« Reply #3 on: December 24, 2016, 04:22:08 pm »
If you have to ask that, you're probably not going to be able to do it.

This is what I'd try:
1. Find where the text for the other subtitles are in RAM.
2. Set a read breakpoint for one of them (using an emulator with debugger).
3. You should find the routine for printing text there.
4. Find where the sound files are in RAM.
5. Set a read breakpoint in that position.
6. You should find the routine for playing sounds here.
7. Add a call from somewhere around this routine to the text printing routine you found earlier with your new text and all that.

I hope you get an idea.
There has to be a better life.

Mirakichi

  • Jr. Member
  • **
  • Posts: 19
    • View Profile
Re: Add routine in PS2 Elf file
« Reply #4 on: December 24, 2016, 05:16:20 pm »
I'll try here, I've searched a good tutorial of how to mapping the ps2 ram with ps2dis, but I have no found none detailed tutorial about the subject

December 25, 2016, 08:26:39 am - (Auto Merged - Double Posts are not allowed before 7 days.)
@mz, you can add the routines in re4 elf executable for me? I can't understand the meaning of instructions in Elf mutilator and in none debug program. I can't find the specific routine of subtitles, i have no idea. If you can make this for me, i'll be very grateful. If yes, I will post here a report with the videos and the exactly moment to show the subtitles in videos and in-game.
« Last Edit: December 25, 2016, 08:26:39 am by Mirakichi »