[PS1]Ace Combat 3 Electrosphere: text replacement

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

Previous topic - Next topic


Quote from: xander on February 09, 2014, 07:21:05 PM
Not sure if you were aware of this but someone posted info on this game here http://giphtbase.org/gipphe/ac3j/journal.php

which leads to http://giphtbase.org/gipphe/ac3j/old%20progress.php

might be usefull if this is the same ace combat 3 game unless there are different versions.
Quote from: that siteProject site:   http://projectnemo.net/
we are in a horrible and deadly danger


Okay, I took a look at those examples. Obviously, some images are exactly the same as the others but shrinked to half its height. Seeing it only happens to textures with BIG font, I've added a little checkbox under the Generate button that is only activated when using that type of font. Use this option when you want to generate the "half" version of a big one (the name will be changed to "filename-half.png"). DON'T use it with one of the shrinked originals! (I'm supposing there's a BIG for each SMALLEST in the dump).

Check it here:


The BIG (and SMALLEST) font is now the "Antonio" one, however I've left Sans for the SMALL font because Antonio looked a bit bad in that size and there's more room for writing in these textures. If you want the SMALL font changed to another one, just say it.

Quote from: BRPXQZME on February 09, 2014, 04:23:32 PM
edit: or you could just go for consistency and make it not readable
I love that font. Too bad it's so wide :-\


If you like it, feel free to hit the webclap button (the one that says web拍手).
we are in a horrible and deadly danger


I think I'll begin my first pass on the first disc beginning tomorrow, here's another test for the first briefing. Unlike the first few tries, the font size and half-height end result is very satisfying.

Obviously, nothing included here is final but it's a good start. I'll keep on the look out for other fonts and test 'em but for now I can finally write in English without over-simplifying the script! Original size limitations be damned!

Bob Liu


Hey guys, I thought I'd drop by and show a bit of what's happening on my end. I'm halfway through the briefings and debriefings, for Disc 1 as always. I should be done with these by tomorrow. After that it's the real meat of the game, the dialogue.


I've read TimView+ can convert BMP to TIM and reinsert TIM. Have you tried that already? If it works, I could change the program to output BMP files and you'd have your compressor.


Quote from: Dashman on February 11, 2014, 06:33:55 AM
I've read TimView+ can convert BMP to TIM and reinsert TIM. Have you tried that already? If it works, I could change the program to output BMP files and you'd have your compressor.

I'm sure TimView+ can do those things, but things aren't working the way they're supposed to, I'm at a loss here. I'm converting BMP to TIM using the older timviewer as timview+ doesn't seem to respond when trying this.

After editing I convert the image with usenti but the resulting bmp isn't right unless I save it as 8-bit, 4-bit gives me corrupt text, readable but not right. Something must be going wrong after the ac3 text editor outputs a 24-bit .png, as converting from that for replacement gives me jumbled text on every occasion. Is there anyway you can make your editor can accept and output 4-bit .bmp files? Could help by cutting down on how many times the file must be converted. As long as the edited text isn't all weird in the end.

Then I still try to replace the (corrupt text) TIMs in the .bin but it's all compressed so I only get the message that says tims must be the same size.


Hm... It could be because I'm outputting images in RGB mode instead of indexed, as I feared in the beginning. I'll look into it tomorrow, working with BMP shouldn't be that different.

The real challenge will be the BMP -> TIM step. I ran into the same problem (different sizes) recently when trying to edit and reinsert some GIM files for a PSP game. It was a very small difference (84 bytes), so I managed to cheat the reinserter by adding zeroes in hex to the edited file, but somehow it didn't work how I wanted and the game ignored my changes. If we're lucky we won't have to resort to any sort of trick for this to work.

Give me a couple of examples of 4-bit BMP files to test on when you can. Let's see what can we do with this.


I hope this post is comprehensive enough, here it goes.

Un-touched TIM sizes are 32.864 bytes.

The 4-bit bmp I get from them using timviewer is 32.886 bytes. That's the kind of bmp I've been using for editing.

If I use TimView+ the .bmp I get is 24-bit and much bigger, at 262,198 bytes. Haven't used any of these.

Here's an example for mission 1: http://www.mediafire.com/download/yr71cziw1ork18w/BMPs_2-12-14.rar

Also, I forgot to mention, the TIM included there shows two indexes, index 1 shows the text, index 2 doesn't (background color-only)


Okay, I tweaked the editor to admit BMP files and output 4-bit BMP files as well. I've copied 3 of the possible CLUTs that I've been seeing in the BPB files with TimView+ (there are actually some variations of those, but I don't think it will matter that much... hopefully) and applied them to the different possible colour schemes. The down side is that some characters seem a bit too "clear" now in the example (looks like the palette has a very bright "black"), but for now it's just a detail.

For the example given, the BMP I get is 32.886 bytes as well. Then I've tried to convert this BMP to TIM and I got one with 32.832 bytes (32 bytes less). The most likely reason for this is that I generate images with only one CLUT, whereas the original has two. If you notice, TimViewer gives a CLUT size of 64 (2 sets) for the original and size 32 (1 set) for what the editor can output. I'm not sure if this will cause trouble during insertion, but if it does I honestly have no idea about how to add that second set...

Anyway, download this:


and try reinserting something. I'll be crossing my fingers.


I've tried replacing one of the uncompressed images, those that use the small font, but no success. But maybe these few files are just garbage maybe not, no way to know yet. This wasn't a regular section anyway, but it was all I could try atm. At least I got to insert an image file in there for once. I should probably investigate further to see if I must fool the game into thinking this is the original file, so it works. You mentioned a HEX editor, maybe I should try that.

When I try to reinsert a briefing or dialogue section, TimView+ complains they must be the same size, can't really fault them for that, here's how the original compressed ones look like.


I'm guessing you should be able to reinsert any image that has only 1 palette (CLUT) right now. I've read a bit into the TIM format (Klarth's document in Zophar here: http://mrclick.zophar.net/TilEd/download/timgfx.txt ) and there's a chance we can modify a file to include a second palete with relative ease. It's a matter of turning a 01 into a 02 and adding 32 bytes after the first palette and bang! size issue solved. I manually overwrote the palettes in a hex editor and this is the resulting TIM file:


Try to reinsert that one into the game, and tell me how it fares. There are other stuff that might need some editing other than the palettes, but let's try this one for now.


I need a little bit of advice on how to do this. I can't do this with TimView+ because it can't read the compressed files and even if I had your TIM compressed like those the program wouldn't be able to pinpoint which one to replace anyway.

So I thought of doing this by putting your test TIM in the extracted BPB that esperknight decompressed, then compressing the whole thing for replacement. I tried ulz and lzss compressors, but no success, little to no documentation that I could find. Is this complete replacement of the BPB thing even feasible?


Hm... maybe you can try jPSXdec for this one (if it recognizes the original 0000.tim, whichever it is inside the game files). If it works, I think I could prepare another little tool to fix the headers of the converted tim files (basically, paste the headers of the originals on the edited ones) and the only thing left would be a program to reinsert the files properly. That one's a bit out of my league though, maybe esperknight could make it.


I've sent an email about this question to the jPSXdec team.

I'm also thinking that maybe I should put make a request for a decompressor/compressor at the lab 313 team, I took a quick glance at their forums, they kind of made one specifically for the Front Mission 2 team, a project my co-founder is also part of (a web manager AFAIK). It's worth a try, they seem to be really helpful with this kind of thing.

Let's wait for now and see what happens, I'll post here as soon as I have new information. I've halted editing for now until we can overcome these latest obstacles.

UPDATE: a guy from jPSXdec answered my email and said their program isn't able to do what I wanted (replace entire blocks of an iso image) but there may be one that can do it, he wasn't able to name one though. After a few days wait my post at lab313 hasn't gotten more than a few views and no replies.

I'll contact esperknight to see if he can help us out.


DragonSpikeXIII, your problem is so simple...
Where did you find any type of compression? How do you know, that any compressions exists at all?

I've checked AC3 CDs, and 've found non-compressed TIMs. If you want to edit those TIMs, you can use Tim2View to extract/insert all TIMs (it works much faster than TimView+). Then, for editing extracted TIMs you can use Optpix, or Photoshop plugin (but check bitmode, when saving). That's all!

P.S. r43 version of Tim2View was released.


Thanks for your input.

The problem I was referring to is mostly due to these unreadable files, which I suspect to be the so crucial text images. Only esperknight has been able to find and extract them with his own decompression code.

This is what I get with Tim2View:

I apologize for not using the correct terminology.


If you see nothing, try to change Transparence View mode to "No Transparence".
P.S. Download last version of T2V here: https://code.google.com/p/tim2view/


I've tried with no transparence on and this is what I get, the same thing happened when perusing the game files with jPSXdec.

There are dozens of entries just like this one and the icon is always the same and is not present in the actual game.