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

Author Topic: [PS1]Ace Combat 3 Electrosphere: text replacement (next ver. coming soon)  (Read 109027 times)

Dashman

  • Full Member
  • ***
  • Posts: 210
    • View Profile
Re: [PS1]ACE COMBAT 3: text replacement (Jpn.->Eng.)
« Reply #120 on: May 25, 2014, 07:43:02 am »
That's a lot of updates man, it's always nice to see progress. Seeing these videos makes me be a bit more pissed off with Namco for not localizing the game. Back in the day, I completed the game and I never had an idea about what the electrosphere was. Now it turns out the game had a GITS-like plot going on. Thanks for butchering that out, Namco.

Good luck with your military duty! :thumbsup:

cj iwakura

  • Full Member
  • ***
  • Posts: 236
  • The Rhythm Rogue
    • View Profile
    • iwakura.productions
Re: [PS1]ACE COMBAT 3: text replacement (Jpn.->Eng.)
« Reply #121 on: May 25, 2014, 04:28:56 pm »
I can relate to the hell of an image-based script, Castle Shikigami was the same way. Looks great, can't wait for the finished product.

蒼く咲く華 日は灯り 天に流れる | Kill The Past

OOZ662

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: [PS1]ACE COMBAT 3: text replacement (Jpn.->Eng.)
« Reply #122 on: June 20, 2014, 03:57:06 am »
Argh, it slays me to read the middle of this thread. Back when Gipphe was taking a crack at it, I went crazy one night and literally taught myself from knowing nothing about the inner workings of games and zero programming experience to extracting and analyzing TIM files. In the process I ran across many of the quirks you ended up running into. Unfortunately, whatever drugs someone slipped me that night wore off, and when things went silent (LZSS, man) I ended up deleting the folder of everything AC3-related (I'm too poor for a bigger hard drive) and eventually forgot everything I learned.

Perhaps I can make one suggestion, though; you mentioned in your blog post that the game was structured in such a way to facilitate translation. If that's the case, would it be easier to find the in-mission text by cracking open an NTSC copy of the game? I know I ripped my disk to compare with the Japanese ISO I had in order to find...something...I can't remember. :'( In any case, the NTSC version has a few (non-voiced) mission updates that pop up in that same green area; maybe being in English they'd be easier to hunt down.

I really wish I knew what I was doing so I could help out more. I certainly cheer from the sidelines, at least. :thumbsup:

DragonSpikeXIII

  • Full Member
  • ***
  • Posts: 205
  • Team NEMO
    • View Profile
    • Project NEMO
Re: [PS1]ACE COMBAT 3: text replacement (Jpn.->Eng.)
« Reply #123 on: June 28, 2014, 08:10:48 am »
A fellow hacker, username "me", has given me permission to re-post information about his hacking of AC3 and manipulation of certain elements, such as the HUD and the elusive green box where the "in-mission" text is displayed. He's chosen not to participate in this thread but he has read it and is following it just in case.

"I want to edit the in game mission, but unfortunately I can't experiment with ACE.SPB, both in my iso they are cyclic error. Is it okay to ignore the error (perhaps bad iamge) and proceed? anyway Gipphe seemed can't unpack it, or is it me who can't find his post?

This is what I've done :

Open bitmap file in mission mode, so I can browse trough it:
http://s16.postimg.org/ep3eckvxx/SLUS000.png
http://s28.postimg.org/c4gnf25r1/SLUS001.png

Using this method I could know the bytes number to access such text/bitmap:
http://s28.postimg.org/vmfw8qs2l/SLUS000.png
http://s14.postimg.org/lg3q260zl/SLUS001.png


Even more the text that already in latin is easily edited (like you guys displaying team nemo logo):
http://s15.postimg.org/leexvv42z/SLUS001.png


Moreover I can display in-mission message (actually the trigger to speak and display caption), for example in fragile cargo, the UPEO commander guy only "speak" when the baloon had safely landed in water. I can trigger it so it will displayed anytime.

This means huge leapstone, imagining kanjis could be way too long to be "stringed" by latin
letter (unfortunately my native language isn't in latin letter).

For example the text :
The baloon has safely landed, now it's launching escape hydrofoil, destroy it.
only need 1 "frame" (that is the caption displayed)
BUT when translated to latin, perhaps it will fit in 2 to 3 frames!!
So with this I could falsely use frame 1 to fake/replace the frame 2 and 3.
By I mean falsely is : duplicate it and change its content.

http://s18.postimg.org/caq9nnu89/SLUS001.png
http://s14.postimg.org/sfmdf9qbl/SLUS002.png

The real problem is here, I couldn't change the kanjis content or bitmap or ulz, beacuse I don't know yet how to unpack the SPB file.

So what I need to do is know how to unpack the SPB file and repack it back. I already unpacked the BPB file using Gipphe's tool, but not yet able to repack it."

"Allright, my efforts editing the dumped "in game mission" texts seems futile, because its base address changed for every mission, even if I use different aircraft in the same mission the address could change, phew! Say later to the dumped portion inside SPB file, now I tried to synchronize my pace with yours, that is editing the ULZ/TIM inside BPB file.

So today I just doing one TIM editing, that is to put back my messed TIM as a foolproof, but I can't make the ISO playable. I have AC3E both disk and are authentic (that is acquired via reflect, I mean an imager tool named "reflect"). The format is BIN and it seemed the SPH and SPB file in both disk are corrupted. So I use isobuster to "ignore" error and copy them as raw. After all files extracted (including my edited and repacked BPB) I bundle it with Free ISO Creator from minidvdsoft. The resulting ISO causing my emulator to crash. It is bizzare because the original BIN does play fine on my emulator."

Green_goblin

  • Full Member
  • ***
  • Posts: 103
    • View Profile
    • Parasite Eve Translation Project
Re: [PS1]ACE COMBAT 3: text replacement (Jpn.->Eng.)
« Reply #124 on: June 28, 2014, 09:43:03 am »
Quote
The real problem is here, I couldn't change the kanjis content or bitmap or ulz, beacuse I don't know yet how to unpack the SPB file.

Probably the SPB file is compressed, LZSS compression or GZIP compression were extensively used during the PSX era.

LZSS compressor/decompressor: https://drive.google.com/file/d/0BzlNWlGlBntUaHYzMWY3Ym1qYVE/edit?usp=sharing

command line use:

Decompress
lzss d original_file decompressed_file
Compress
lzss e decompressed_file original_file

GZIP compressor/decompressor: https://drive.google.com/file/d/0BzlNWlGlBntUMVhSOTQ5amMwRjg/edit?usp=sharing

command line use:

Decompress
gzip -cd original_file > decompressed_file
Compress
gzip -cn9 decompressed_file > original_file


OOZ662

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: [PS1]ACE COMBAT 3: text replacement (Jpn.->Eng.)
« Reply #125 on: June 28, 2014, 09:55:50 am »
That was the last result Gipphe got to; that the game was LZSS compressed.

DragonSpikeXIII

  • Full Member
  • ***
  • Posts: 205
  • Team NEMO
    • View Profile
    • Project NEMO
Re: [PS1]ACE COMBAT 3: text replacement (Jpn.->Eng.)
« Reply #126 on: June 29, 2014, 04:52:52 am »
http://useatoday.blogspot.com/2014/06/state-of-project-2014.html#comment-form
"My bad, I didn't read it enough, the BIN "maker" is configured via build.bat, that is I must put my ac3.bin inside cd/orig. Ok managed to translate it to my language, so far so good, but same like you : no in game mission stuffs translated yet. I tried to memorize the pattern on the dump (those are in game mission stuffs that I successfully edited) and search in every dat inside BPB using hex editor, and the result is none. None of the dat contains the pattern of in mission stuffs. Perhaps they are compressed in ulz. Is ulz decompressor works only for extracting TIM files? Tried to modify the code but seems I failed to make it work for arbitrary file type. So far I haven't found the in game mission text/textures/images yet inside the BPB.

I also found some ulz inside the SPB, maybe it is in mission stuff or maybe not. I just scan the SPB file for ulz string, case sensitive. I don't know if it works, but scanning the XA on BPB before and after extracted seems worked. There are 6 ulz header inside the raw SPB, perhaps they are the not compressed one so they are visible from hex editor?"

http://useatoday.blogspot.com/2014/04/ac3-hidden-extra-bonus-options-menu.html#comment-form
"My plan is :

1) discover the "command" to display the message sequentials

2) edit the message, including add/remove new "frame"

3) force the "in game mission" to display the edited message.

and all I do still limited using the dumped data via emulator. But hope this will spill any lead to hex pattern in the BPB/SPB files."

"If you mind, here is my updated version of the map. It's not complete yet :

0000 : the 0004.dat contained narrator sounds like engage, bingo, bulls eye, MA, MF, MO, etc

0005 - 0065 : every 0016.dat is sound archive, and no, not all sounds yet.

0066 - 0102 : all ulz are not valid TIM, the dat file always contain T header, perhaps text? btw it is 46 folders, any relation to 52 missions?

0103 - 0111 : contains solo TIM file, originally uncompressed (to flag the BPB file containing this? so we are "lured" to extract the BPB??)

0112 - 0113 : the TIM files for AC3 icon (such displayed on memory card reader) are here. Contains some data swallow menu GUI, and Neucom logo here.

0114 : dat inside contains the data swallow interface sound, all TIM files are used in data swallow GUI (such in menu texts, joystick control options, etc)

0115 - 0126 : many dat file, and no, no in mission thingy, because just 11 folders?

0127 - 0178 : see http://www.romhacking.net/forum/index.php/topic,17658.msg259580.html#msg259580

0248 - 0400 : see http://www.romhacking.net/forum/index.php/topic,17658.msg259580.html#msg259580

0409 - 0415 : zero bytes only, really pure zero

0416 - 0463 : contains 47 player aircraft textures only, no 3D model. Tested by changing its dat and gives no effects on 3D model.

0464 - 0573 : have the same pattern, there is one 0000 folder and two dat files inside, 0000.dat and 0001.dat
judging by its size and content, they are similar. But wait, 110 folders? isn't it just 52 missions? So it is unlikely to contain in game mission data perhaps?"

EDIT: added comment from 6/30/2014
"So far I managed to locate the block of bytes in the GPU dump that is responsible for the text in the green message box. That means I could already change what's inside. Currently I'm not yet able to force the game to load additional TIM, even to add one new line in the same TIM I still can't. But here is what I've done. When I put zeros on those blocks, the result is :

http://s17.postimg.org/bymaxjonj/SLUS000.png

yes, the text inside the greenbox is gone, but the greenbox "wrapper" along with UPEO commander face is still there. This is not uninitialized text/content (it is happened if you take screenshoot too fast when the green box just appeared). The next 4 seconds after the first image, here is the second image, notice it is still empty (while commander's voice is still being played) :

http://s27.postimg.org/4napkz2gz/SLUS001.png

After that 4 secs, the green box dissappear and the voice stop playing, now it's Erich's turn :

http://s28.postimg.org/wr8kybtvx/SLUS002.png

Bored with zeros, I put arbitrary byte on those blocks, and here they are the results :

When Erich say something after Fiona's radio been jammed.
http://s13.postimg.org/fq611mz5j/SLUS003.png

After the 4 NEU carrier destroyed in Awakening, here comes the UPEO commander talking about updating target.
First "frame" :
http://s8.postimg.org/5s2iv4sz9/SLUS004.png

Second "frame" :
http://s27.postimg.org/nok5ehbnn/SLUS005.png

You may wonder why I always looking to the sky ? good question, because the "ground" texture is glitched, maybe the side effects of those zero bytes replacements. Of course it has to do with the GPU. I think it's just inappropriate to display it. I found the responsible bytes is around to 8.2 KB to 36.4 KB, depending on the amount of "frames".

After that, I tried to refer to data in those blocks and do hex search inside the extracted BPB. Phew! after 9 hours of searching all possible pattern, I still didn't found any match on the extracted BPB files."
_____________
_____________
_____________

More messages by fellow contributor "me", announcing recent successes in translating text that plays during the mission themselves, meaning both green-box communications and in-game 3D cut-scenes.

July 14, 2014 at 10:06 AM
"Sorry for the late reply, I'm busy with my lab work. Last week, I and my colleague just collecting data about C. elegans muscarinic receptor together with its related motor activity, and now we're trying to do an in-silico imitation using the already mapped neuronal data by previous researchers. This is just a coincident with the game's main theme. Anyway, the human's actual mind uploading is way too far from our resarch, so don't expect too much. But let's see if mind-uploaded worms will be existed soon, lol.

Anyway, I'm not a fans whatsover, so I don't know what is the "true" music on particular mission. I just intrigued by this ace combat game because it was involving biotech thingy and I'm indeed interested in such stuff even before playing this game. Luckily here we are Team Nemo translating it, so not only people with japanese proficiency could understand the actual storyline.

I recall that what I mean by "edit the in game mission", is editing the textual elements, not another resources to alter the gameplay. Now I announce that the in game's mission texts, and the in game's cutscene texts are ready to be edited. Please read my comment in your announcement post."

July 14, 2014 at 10:10 AM
"We can edit the in game's mission texts without packing/unpacking any ulz. Basically it is just extending the mission debriefing tim files so it is loaded on the next vram room. Then we just need to nop the opcodes that responsible for replacing the already filled vram. Tested in "awakening" mission, I repeat the same text for the briefing:

http://s27.postimg.org/mc7jrcxv7/SLUS000.png

so it'll displayed when Erich-Fiona-Rena are talking:

http://s9.postimg.org/f25l5mqdb/SLUS001.png
http://s4.postimg.org/twy9r2qul/SLUS002.png

and when the dual layer in action:

http://s27.postimg.org/sthq2raer/SLUS003.png

also the cutscene from "bravado", sorry I just put an arbitrary tim file with large japanese font, just to show that even file like this could be loaded, and displayed, even 'twas chopped:

http://s30.postimg.org/a1iq1kzpt/SLUS004.png


The cutscene texts and the in mission dialogue texts are located on the same block, this ease us much further. So from now on, we can make a permanent changes as opposed to the "immediate" emulator mode :]

Here is a how to reproduce those results :

http://en.file-upload.net/download-9212470/greenbox-message---cutscene-by-me.zip.html


I'm getting emotionally unstable when I realize this method doesn't work in mission simulator (because the tim never loaded), and I'm sure it has an easy "patch to jump" solution (to force execute the routine that contains CDROM tim read and then CpuToVram opcodes), or if another member has solved it, I don't really care though.

I wonder am I the only female member in here? Anyway just enjoy and make use of my translation method, hope it helps you guys.

The search app texts are located inside 0179 - 0185, but there are also tons of japanese inside 0121 - 0126, somewhat menu texts. Unpack any ulz inside those folders with esperknight's tool, most of them are the tims, ready to be translated."
« Last Edit: July 14, 2014, 02:22:48 pm by DragonSpikeXIII »

DragonSpikeXIII

  • Full Member
  • ***
  • Posts: 205
  • Team NEMO
    • View Profile
    • Project NEMO
Re: [PS1]ACE COMBAT 3: text replacement (Jpn.->Eng.) UPDATED 14 July
« Reply #127 on: August 01, 2014, 04:07:43 pm »
Greetings gentlemen,

the month of July has seen some new developments.

Our newest team member, simply named "me," has helped us find the mission text and also found her own way of replacing the mission text.

To be added to my BPB coordinates rundown from a few months ago are:

0005-0065: these folders all contain 15 BIN files. None work with our current tools at the moment except the 11th, 14th and the 15th BIN. The 11th contains the mission's ground textures., 14th has 3 black images that must be used for something else.

Each mission's in-game map and the radio chatter is always located inside the 15th, and last, BIN. These .bin files act as TIM containers. The map is its own single-layer, 128x128 image, TIM while the radio chatter is always a double-layered, WHITE-on-BLACK, TIM.

 This debunks my initial theory that the radio chatter was green-on-black and confirms Dashman's that the text gets colorized by the game during gameplay. This has been confirmed during tests when I was trying me's replacement method with some improvised (i.e. not proper) images.

0066-0102: this is a mix of folders where some contain 3 BINs each and some that contain 2 BINs each. They only work with the newest Tim Viewer Plus (only 4 worked with the older version). These contain aircraft icons (the HUD damage plane icon maybe?) and the full body texture.

Examples:
0073: 3rd BIN has the F/A-32 Erne's icon + full body texture
0080: 3rd BIN has the R-101U's icon + full body texture
0084: 3rd BIN has the R-101's icon + full body texture
0087: 3rd BIN has the R-201's icon + full body texture

These 3rd .bin files have two TIMs each, one for the icon, one for the texture. Texture's is always double-layered.

0186-0247: the Search files, or for those not familiar with AC3, the in-game encyclopedia, very similar to Wikipedia. These all seem to work and are ready for editing as, thankfully, their format is identical to the news bulletins interspersed throughout the game. Will test very soon.

General note for A LOT of those BINs, especially the ones I haven't mentioned here: non-working .bin files always give a "Bad FSR-file. Try to change it manually" when opening with an older version of Tim Viewer Plus (newer versions do not work at all with these BINs). Using the nweest TimViewerPlus doesn't give any error msg but they don't work either. Some are just that stubborn...

Important note: up until now I've only seen and identified radio chatter spoken by our dear characters. Mission updates spoken by commanding officers (i.e. "Enemy reinforcements spotted! Intercept!) have yet to be found. This pertains only to those that appear in the green box. I'm pretty sure mission updates that display on the black "letterbox" area (where text displays during 3D cut-scenes) are included in the same TIM that has the lines spoken by our ace pilots.

Here's what we need to work on, gentlemen:

@Dashman: at the moment I am unable to join the edited mission text TIM with the green map TIM with the layer merger because file sizes are different ( that's what the error msg says). Dashman, you think you can make an actual TIM merger, as opposed to your layer merger? We're dealing with multi-TIM files now, moving up in the world from single-layer and double-layer TIMs!

@esperknight: we've already spoken about the Disc 2 toolkit so I know you've got your hands full for now!

@pmt7ar: let me know when you can about that Search files transcription/translation.

@me: any new developments on your side of things? That mission text replacement of yours was nice but at this point, after testing, I have my doubts about going that way for the whole game. We don't have all pieces in place yet for us to try something like that yet.

In other news: the True Ending has been revised by me and pmt7ar, it's been tested and I have the video ready. The one I uploaded on YT years ago is now obsolete.

USEA Today will resume regular weekly updates this September. I've been preparing and organizing many of the next volley of posts about AC3ey things.

I've been making some fan videos and posters too here and there as well.

This is pretty much it for this update, phew

P.S.: btw mods, I know this is double-posting but I had no other choice, I was hoping someone would post something/anything but I have to post updates so here it is. Thanks for understanding!

Dashman

  • Full Member
  • ***
  • Posts: 210
    • View Profile
Re: [PS1]ACE COMBAT 3: text replacement (Jpn.->Eng.) UPDATED 14 July
« Reply #128 on: August 02, 2014, 08:31:26 am »
@Dashman: at the moment I am unable to join the edited mission text TIM with the green map TIM with the layer merger because file sizes are different ( that's what the error msg says). Dashman, you think you can make an actual TIM merger, as opposed to your layer merger? We're dealing with multi-TIM files now, moving up in the world from single-layer and double-layer TIMs!
Well, the green map TIM and the mission text TIM are two separate files entirely, the layer merger shouldn't work at all with those. I haven't looked into it yet, but I'm guessing those BIN files simply contain one TIM followed by the next one, probably with a little pointer table at the beginning. I'll take a look at it later and see what can be done. ;)

esperknight

  • Full Member
  • ***
  • Posts: 130
    • View Profile
Re: [PS1]ACE COMBAT 3: text replacement (Jpn.->Eng.)
« Reply #129 on: August 02, 2014, 12:48:37 pm »
Here's my updated AC3 decompression code (if anyone's curious) : https://subversion.assembla.com/svn/transprojects/psx/ace_combat_3/tools/code/

Turns out there was two flavors of the ULZ decompression code which I've accounted for both now.  One is type 0 and the other type 2.  So far I haven't hit any others so this should be all inclusive... we'll find out though :)

Soon I'll get to extracting the stuff from disc 2 :)

And awesome Dashman, really appreciate you helping out with the TIMs :D

DragonSpikeXIII

  • Full Member
  • ***
  • Posts: 205
  • Team NEMO
    • View Profile
    • Project NEMO
Re: [PS1]ACE COMBAT 3: text replacement (Jpn.->Eng.)
« Reply #130 on: August 03, 2014, 10:07:41 am »
Roger that, guys, I'll continue my editing and begin compiling files for the next stage of our project. This includes identifying the rest of the TIMs from Disc 2, all Search Mode BINs and the mission BINs.

I've run some tests and the mission text for the commander mission updates still eludes me, I haven't seen it anywhere near the radio chatter text from the main characters. Yet, during one of my tests, where I had completely removed the 0015 file (where the chatter text is stored), both of them did not display during the mission (Awakening).

I haven't been able to insert a Search Mode file in English because, like the mission text, it's stored in BINs. These .bins contain the usual TIM with the text, and a second (in some cases more) TIM for the thumbnail icon of the article/file being read by the player. In the image below, that would be the General Resource icon ONLY, and nothing else. The Peek-a-Boom icon and other assets are stored elsewhere.



As always, I'm keeping a close eye on what's already been inserted in order to improve it, a continuous effort of playing/watching/reading, taking notes and revising where necessary.

August 6 update:

Enemy down: I can now confirm that all mission/green box text is in those 0015 BINs.

August 9 update:

Many tests performed using the methods devised by team member me. Me's workaround can only work with only a few missions because of the way TIMs vary from mission to mission. After a lot of trial and error I managed to get a 99% successful translation of a mission. This test will be posted tomorrow as our third showcase video.

This is how the TIM itself looks in order to achieve an almost perfect replacement:

August 17 update:

The folders containing the mission text files have all been mapped. That would be 0005 up to 0065.

esper, remember when we talked about a certain mission for which we couldn't find the text files and were afraid they might be embedded? Problem solved, the mission has so much text that it uses two separate 0015 BINs in order to display all of the text. No embedded subs of any kind, thank goodness!
« Last Edit: August 17, 2014, 05:10:47 am by DragonSpikeXIII »

Dashman

  • Full Member
  • ***
  • Posts: 210
    • View Profile
Re: [PS1]ACE COMBAT 3: text replacement (Jpn.->Eng.)
« Reply #131 on: August 17, 2014, 06:39:53 pm »
Sorry for taking so long to answer, I was busy with a little editor that dealt with ~3000 hardcoded pointers and I made so many mistakes while copying them by hand... :P

Anyway, I just took a little peek at one of the 0015.bin (the one inside 0005) files and it's exactly as I expected it to be.

bytes 00 - 03: Number of TIM files inside the BIN. It happens to be 2, so two pointers follow.
bytes 04 - 07: Pointer to TIM 1.
bytes 08 - 0b: Pointer to TIM 2.

All values are little endian. TIM files have no compression thankfully. I'll try to take a look at more of these files tomorrow to confirm the structure, but it seems making a splitter / merger for these is gonna be a walk in the park. :)


EDIT:

And there you go, this will let you split those 0015.bin files into TIMs and join them again after editing:

https://www.dropbox.com/s/l5axo6g8dba8m1k/AC3%20Bin%20Splitter.7z

I repurposed a program that did almost the same for SRW GC to do this. I forgot to get rid of some (wrong) debug messages during the merging process but I don't feel like turning on the other computer again, so just ignore them.

Treat the extracted TIMs as usual and then merge them together back into a bin file with the program. Remember that the TIM names have to remain the same!

Have fun :thumbsup:
« Last Edit: August 18, 2014, 07:16:55 pm by Dashman »

DragonSpikeXIII

  • Full Member
  • ***
  • Posts: 205
  • Team NEMO
    • View Profile
    • Project NEMO
Re: [PS1]ACE COMBAT 3: text replacement (Jpn.->Eng.)
« Reply #132 on: August 19, 2014, 02:44:41 pm »
Great job, Dash, that was quick!

I've just tried the program  but it's been giving me a few errors. The TIM merger doesn't recognize the TIMs from the BINs (says "Original files found: 0"), so I had to manually change the X/Y and CLUT X/Y parameters, weird thing. The real issue is that the game locks up when the mission is just about to start so I can only see the green HUD and the mission's title.

I have no idea what could be causing this, maybe the game doesn't like the .pak format or maybe it's the rebuilding program that doesn't know what to do with it. These are just educated guesses though.

Did you run into the same problems or is it just me?

Dashman

  • Full Member
  • ***
  • Posts: 210
    • View Profile
Re: [PS1]ACE COMBAT 3: text replacement (Jpn.->Eng.)
« Reply #133 on: August 19, 2014, 02:55:24 pm »
Hm.... weird. I tried splitting the 0015.bin inside 0005 and had no problem with the extracted TIMs, even after merging (the original and the merged 0015.bin files were the same). Which file did you try this on?

...which .pak format? :P

DragonSpikeXIII

  • Full Member
  • ***
  • Posts: 205
  • Team NEMO
    • View Profile
    • Project NEMO
Re: [PS1]ACE COMBAT 3: text replacement (Jpn.->Eng.)
« Reply #134 on: August 19, 2014, 03:01:28 pm »
The splitting/merging was smoothly, aside from the TIM merger not wanting to see the original TIM from 0015.bin (even after renaming, just to be sure). I tried this on 0006's folder, which is the one actually used by mission 01 (you can see this in a line spoken by Rena in M01). Tried replacing both 0005 and 0006 so they'd be the same but that was not it.

About the .pak, that's the extension written in the readme for the splitter. I did try renaming the output file to .bin or .ulz but I think that broke the file so it didn't work. Is .pak a leftover from your other project? Shoudl I try .ulz or .bin DURING the actual merging of 0015 TIMs?

Dashman

  • Full Member
  • ***
  • Posts: 210
    • View Profile
Re: [PS1]ACE COMBAT 3: text replacement (Jpn.->Eng.)
« Reply #135 on: August 19, 2014, 03:14:44 pm »
Oh crap, sorry. I reused the readme from the other program and that PAK bit went unnoticed :P In your case it should say "0015-new.bin" (the original program was to be used with a "bpilot.pak" file).

So this is what I did to test this:

1) Copy bin_splitter.jar in 0006 (for example)
2) Execute: java -jar bin_splitter.jar -s 0015.bin extract
3) You'll have created an "extract" folder containing three files: 0000.TIM, 0001.TIM and files.list. Copy bin_splitter.jar into said "extract" folder.
4) Inside "extract" execute: java -jar bin_splitter.jar -m 0015-new.bin files.list
5) 0015-new.bin should be identical to 0015.bin (in 0006), you can put both files into the same folder and execute "fc 0015.bin 0015-new.bin". It should say there's no differences.

I hope that clears things up, sorry if the instructions were a bit confusing.

DragonSpikeXIII

  • Full Member
  • ***
  • Posts: 205
  • Team NEMO
    • View Profile
    • Project NEMO
Re: [PS1]ACE COMBAT 3: text replacement (Jpn.->Eng.)
« Reply #136 on: August 19, 2014, 03:52:31 pm »
I've found the problem, the two 0015's aren't identical. It seems changing the X/Y data by hand instead of using the TIM merger won't be enough this time. If only the TIM merger would recognize the original TIM, then I think it'll work.

How does the TIM merger behave on your end Dash?

Dashman

  • Full Member
  • ***
  • Posts: 210
    • View Profile
Re: [PS1]ACE COMBAT 3: text replacement (Jpn.->Eng.)
« Reply #137 on: August 19, 2014, 06:00:12 pm »
I haven't tested it yet. I'm not sure what you mean by X/Y data, but I'm going to assume it's something from the 20 first bytes of the TIM file. If it's that, I guess the Header Replacer should take care of that.

What steps did you take that lead to a wrong 0015?

I want to think you did something like:

1) Split 0015.bin into TIMs
2) Extract BMPs of each layer (2) from extracted 0001.TIM (with TimView+?)
3) Edit BMPs
4) Convert BMPs to TIMs (with TimViewer?)
5) Merge both TIMs back into an edited 0001.TIM with the Layer Merger
6) Use the Header Replacer to give the edited 0001.TIM the original's header
7) Merge the original 0000.TIM and the edited 0001.TIM back into an edited 0015.bin
8) Test reinsertion

I think that is the (pretty convoluted) way of doing this right, but I haven't been in touch with the programs for a while so I'm a bit lost. Please tell me what you did and if it's not like those steps, give them a try, they might just work.

DragonSpikeXIII

  • Full Member
  • ***
  • Posts: 205
  • Team NEMO
    • View Profile
    • Project NEMO
Re: [PS1]ACE COMBAT 3: text replacement (Jpn.->Eng.)
« Reply #138 on: August 20, 2014, 12:32:38 am »
Sily me, I kept saying tim merger but I meant the header replacer, sorry. It's the header replacer that doesn't work with the original TIMs extracted from 0015.

Dashman

  • Full Member
  • ***
  • Posts: 210
    • View Profile
Re: [PS1]ACE COMBAT 3: text replacement (Jpn.->Eng.)
« Reply #139 on: August 20, 2014, 06:11:01 am »
I've compared 0001.TIM's header with some headers of previously used TIMs and other than the CLUT data and slightly different Palette Org X and Y, the headers are the same.

I've gone through the whole process of extracting the layers as BMPs (with TimViewer), then joining them again and replace the header.

I had one problem with replacing the header: the program didn't recognize the 0001.TIM in the original folder. Why did that happen? Well, the program works with ".tim" files, but doesn't recognize ".TIM" files. Changing the extension made the program work and yes, it was the same as the original (as expected). Was this the problem you were experiencing?

I'll change the Bin Splitter later to write ".tim" as the extension and probably enable the Header Replacer to be a bit less silly with extensions later.

By the way, I noticed a very curious stuff with TimViewer. I extracted the layers from 0001.TIM as 0001-layer1.bmp and 0001-layer2.bmp. When I opened the first one to save it as a TIM file, it was as usual, but when I opened layer2, TimViewer actually loaded both layers and allowed me to save them as a 2-layered TIM. The second CLUT was slightly messed up (fixed with the Header Replacer), but this could mean you can skip using the Layer Merger if you name the BMPs properly.


EDIT:

And there you go, it was a pretty quick fix:

https://dl.dropboxusercontent.com/u/144016034/AC3%20Bin%20Splitter%20v1.0a.7z

https://dl.dropboxusercontent.com/u/144016034/AC3%20Header%20Replacer%20v1.1a.zip
« Last Edit: August 20, 2014, 01:09:44 pm by Dashman »