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

Author Topic: [psx] possible/worth it, relinking file from exe?  (Read 2643 times)

irecinius

  • Jr. Member
  • **
  • Posts: 18
    • View Profile
[psx] possible/worth it, relinking file from exe?
« on: July 12, 2011, 12:05:46 am »
Ok, the title doesn't convey exactly, but here is the question.

I have the game in English and Japanese, but other then of course language differences, the Japanese has ONE LESS FILE..
called M.B
this file is special as holds addresses related to a bigger file called M.D.. more exactly segments of it.

Inside the NA (English) executable "SLPS_013.55" I have this..

Code: [Select]
00000EEA 00 00 5C 58 41 5C 54 2E 58 41 3B 31 00 00 5C 58 41 5C 56 2E 58 41 3B ..\XA\T.XA;1..\XA\V.XA;
00000F01 31 00 00 5C 44 41 54 5C 4D 2E 44 3B 31 00 00 5C 44 41 54 5C 4D 2E 42 1..\DAT\M.D;1..\DAT\M.B
00000F18 3B 31 00 00 5C 4D 4F 56 49 45 5C 32 35 2E 53 54 52 3B 31 00 5C 4D 4F ;1..\MOVIE\25.STR;1.\MO
There is a reference to the m.d file..

little after it (why on it later)

Code: [Select]
000010CD 44 41 54 5C 49 2E 42 49 4E 3B 31 00 00 00 00 5C 44 41 54 5C 4E 2E 42 DAT\I.BIN;1....\DAT\N.B
000010E4 49 4E 3B 31 00 00 00 00 5C 44 41 54 5C 42 2E 44 3B 31 00 00 5C 44 41 IN;1....\DAT\B.D;1..\DA
000010FB 54 5C 42 2E 42 3B 31 00 00 74 08 75 08 70 08 71 08 72 08 73 08 00 00 T\B.B;1..t.u.p.q.r.s...
00001112 00 00 30 19 02 00 44 19 05 00 58 FB 08 00 14 B3 09 00 A0 D3 0A 00 B4 ..0...D...X............

Now into the JAPANESE game, the one with the missing file "SLPS_030.50"

Code: [Select]
00000F5D 58 41 5C 54 2E 58 41 3B 31 00 00 5C 58 41 5C 56 2E 58 41 3B 31 00 00 XA\T.XA;1..\XA\V.XA;1..
00000F74 5C 44 41 54 5C 4D 2E 44 3B 31 00 00 5C 4D 4F 56 49 45 5C 32 35 2E 53 \DAT\M.D;1..\MOVIE\25.S
00000F8B 54 52 3B 31 00 5C 4D 4F 56 49 45 5C 32 34 2E 53 54 52 3B 31 00 5C 4D TR;1.\MOVIE\24.STR;1.\M

as you can see, just there between the V.XA and M.D the M.B file is missing, and after the same code from before BUT!

Code: [Select]
00001140 5C 44 41 54 5C 4E 2E 42 49 4E 3B 31 00 00 00 00 5C 44 41 54 5C 42 2E \DAT\N.BIN;1....\DAT\B.
00001157 44 3B 31 00 00 5C 44 41 54 5C 42 2E 42 3B 31 00 00 74 08 75 08 70 08 D;1..\DAT\B.B;1..t.u.p.
0000116E 71 08 72 08 73 08 00 00 00 00 D0 E0 03 00 A4 7F 07 00 6C 64 0C 00 D0 q.r.s.............ld...
<addresses are here>
00001F89 55 A3 0A 38 07 A6 0A 24 00 A9 0A 00 00 00 00 30 19 02 00 44 19 05 00 U..8...$.......0...D...
00001FA0 58 FB 08 00 14 B3 09 00 A0 D3 0A 00 B4 53 0E 00 48 6C 12 00 68 6E 13 X............S..Hl..hn.
00001FB7 00 88 70 14 00 A8 72 15 00 C8 74 16 00 E8 76 17 00 08 79 18 00 68 7B ..p...r...t...v...y..h{
The 0x00000000 here is the FIRST address of the supposed m.d file, while 0x2400A90A, is the last value of the supposed M.D file, removing those addresses, the next 0x90 values are identical to both files..

So instead of having a separated file, the file is embedded inside the exe, its possible to relink it values from a external file instead?

And its worth the trouble? I don't know much about not even where to begin with this.


Gemini

  • Hero Member
  • *****
  • Posts: 2026
  • 時を越えよう、そして彼女の元に戻ろう
    • View Profile
    • Apple of Eden
Re: [psx] possible/worth it, relinking file from exe?
« Reply #1 on: July 12, 2011, 05:03:34 am »
Why would you want to do that anyway? If the file is just cached in the exe you don't really need to make it into an external file again. Also, you got the wrong ID for Tales of Destiny 2 (it's supposed to be SLUS-01355).
I am the lord, you all know my name, now. I got it all: cash, money, and fame.

irecinius

  • Jr. Member
  • **
  • Posts: 18
    • View Profile
Re: [psx] possible/worth it, relinking file from exe?
« Reply #2 on: July 12, 2011, 02:38:40 pm »
Indeed, its SLUS

I see what you talking, its just I thought would be simple to extract it, and when I'm done modifing the M.D file I'd have to fix the M.B file too, so instead of having to pack it back into the executable, I'd just update the extracted file.

The only reasonable reason for me to do that, is go gain that extra space on the exe for translation and what not..

Gemini

  • Hero Member
  • *****
  • Posts: 2026
  • 時を越えよう、そして彼女の元に戻ろう
    • View Profile
    • Apple of Eden
Re: [psx] possible/worth it, relinking file from exe?
« Reply #3 on: July 12, 2011, 05:52:11 pm »
You can create room by other means, especially if there's a debug font still in there somewhere (2+ KB for whatever is necessary) or by injecting and copying stuff in zones of the memory that are usually ignored by the PSY-Q compiler (like the PS-X EXE header sector, entirely useless when the game is already running).
I am the lord, you all know my name, now. I got it all: cash, money, and fame.