[PS1]Ace Combat 3 Electrosphere: text replacement

Started by DragonSpikeXIII, January 31, 2014, 01:51:57 PM

Previous topic - Next topic


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

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


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:


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:

Using this method I could know the bytes number to access such text/bitmap:

Even more the text that already in latin is easily edited (like you guys displaying team nemo logo):

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.


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."


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:

lzss d original_file decompressed_file
lzss e decompressed_file original_file

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

command line use:

gzip -cd original_file > decompressed_file
gzip -cn9 decompressed_file > original_file


That was the last result Gipphe got to; that the game was LZSS compressed.


"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?"

"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 :


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) :


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


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.

After the 4 NEU carrier destroyed in Awakening, here comes the UPEO commander talking about updating target.
First "frame" :

Second "frame" :

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:


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


and when the dual layer in action:


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:


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 :


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."


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.

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!


Quote from: DragonSpikeXIII on August 01, 2014, 04:07:43 PM
@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. ;)


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


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!


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. :)


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


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:


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?


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


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?


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.


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?


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.


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.


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.


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