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

Author Topic: THE Tairyou Jigoku (English Translation)  (Read 5459 times)

halumi

  • Jr. Member
  • **
  • Posts: 30
    • View Profile
THE Tairyou Jigoku (English Translation)
« on: October 12, 2018, 12:24:41 pm »



Oh no, it's me again. Our L.O.L. project is not dead, I have just been preoccupied with other things. But I thought I'd get in the Halloween spirit by putting some work in on this.

The text is just naked Shift-JIS and is straightforward (but laborious) to edit. I have no idea what I am doing, though, so the size and space limits of a lot of this menu stuff are really killing me, and I'm definitely not enough of a programmer to figure out the text pointers and character spacing. No luck getting into the textures, either, and I have more or less tried everything I am capable of, which is a little discouraging. Like 98% of the game's text is plaintext, though, so it'd be totally playable if that is a bust.

If you're not familiar, this is a gross horror game from D3's Simple 2000 Series of budget games, and it is one of the better ones.

If you think you can change the character spacing or open Tamsoft's .TI texture files, hit me up, hotshot.

mz

  • Sr. Member
  • ****
  • Posts: 447
  • Whore
    • View Profile
Re: THE Tairyou Jigoku (English Translation)
« Reply #1 on: October 12, 2018, 08:06:13 pm »
A cheap horror game by Tamsoft!? :o Sounds exactly like the kind of thing I'd love to play!

I could help you with all the programming and some translation, if you need that too. Unfortunately, right now I've been commissioned to help with the translation and hacking of a PS1 game for the Star Trinket guys, which is taking a LOT of my time...

(Also, I've never worked on a PS2 game before; if it would have been a PS1 game, I could probably hack most of the game in a few days. :P)

In short, if you can't find anyone else and you don't mind waiting until I'm free (or me working very slowly on my little spare time right now), feel free to message me! I have a lot of experience hacking PS1 games, which can be very similar to the PS2, and I like everything I hear about this game.
There has to be a better life.

halumi

  • Jr. Member
  • **
  • Posts: 30
    • View Profile
Re: THE Tairyou Jigoku (English Translation)
« Reply #2 on: October 12, 2018, 11:59:30 pm »
It doesn't seem too well known outside of Simple Series appreciation circles. There are a few playthroughs on YouTube, though. I recommend taking a look if you like trashy horror or horror games with unique mechanics. You can't take damage, but there is a sort of gross-out meter that fills up as things crawl on you.

Oh, excellent, thank you very much! That would be greatly appreciated.

I'm not in any particular hurry. I have no idea where character spacing or pointer data is stored (maybe the ELF file), and I assume this website would frown upon posting the entire disc image, so that would be an "at your leisure"-style pursuit anyway. If you or anyone else want to take a crack at the TI files, though, here's a sample. I've tried tools for myriad file formats and consoles, and this is the closest I got:



I dunno if it will take someone who actually knows anything about image hacking, or I just missed something obvious, but perhaps you will succeed where I have failed. I've dug through a lot of PS2 games, but my "expertise" is more in audio, which isn't particularly useful here.

I'm probably ok for translation help, although there is a decent amount of text despite the game's short length, so I wouldn't say no if someone wanted to pitch in. I'll post a link when I get a spreadsheet goin'. Mostly I have been plugging away at menu stuff.

mz

  • Sr. Member
  • ****
  • Posts: 447
  • Whore
    • View Profile
Re: THE Tairyou Jigoku (English Translation)
« Reply #3 on: October 13, 2018, 06:31:46 am »
I see! As I said, I've never worked on a PS2 game, so maybe this is completely wrong.

This is what I got: https://i.imgur.com/dki75Cc.png

It seems to me that this file is just a raw bitmap that lacks a proper TIM2 header and a CLUT with its correct colors (I used a standard gray-scale palette to create my image).

So, I supposse we need to find where the game gets the headers and CLUTs for these TI files, or just edit them in grayscale (they would later appear correctly in-game, of course.)


EDIT: ah, forget what I said! I'm just stupid. I remembered that I had cut the first bytes of the files to make it align correctly on a tile editor. :P

All the info we need is at the beginning of the file, so there shouldn't be any problem to see and edit all these files. It seems to have a 32-bit CLUT... (We'd just have to figure out how to parse that header and write a converter to a standard file, unless it already exists and we don't know about it!)

« Last Edit: October 13, 2018, 07:07:43 am by mz »
There has to be a better life.

halumi

  • Jr. Member
  • **
  • Posts: 30
    • View Profile
Re: THE Tairyou Jigoku (English Translation)
« Reply #4 on: October 13, 2018, 08:35:12 am »
Oh, so quick! Superb! Thank you! Could you tell me how you did that, please? If I had a workable header I could slap on some of these files just to get them into an editing program, I could at least make sure reinserting textures without some crazy tool is doable.

Better in the long run to find the headers/color tables, if you think they are a thing that can be found. Not just because blind editing sounds like a colossal pain, but also the fact that I tried skimming through the TI files with rawpixels.net and I couldn't find some of the UI elements I need to replace. Maybe I missed them, but they could be buried in another file.

I did find this QuickBMS script somebody wrote for TI files, but I couldn't get it to work. Dunno if the information therein is useful.


e: Oh, you edited as I was replying. That's great! I am humbled by your Actual Expertise. Thank you so much! If you did author some kind of script or tool to convert the images, presumably it would work with all of Tamsoft's other Simple 2000 games, as well. They all seem to use the same image formats. If the text in those games is as easy to access as it is in Tairyou Jigoku, that'd make for a pretty speedy turnaround on some fan translations for any interested party.
« Last Edit: October 13, 2018, 08:41:09 am by halumi »

mz

  • Sr. Member
  • ****
  • Posts: 447
  • Whore
    • View Profile
Re: THE Tairyou Jigoku (English Translation)
« Reply #5 on: October 13, 2018, 08:54:18 am »
e: Oh, you edited as I was replying. That's great! I am humbled by your Actual Expertise. Thank you so much! If you did author some kind of script or tool to convert the images, presumably it would work with all of Tamsoft's other Simple 2000 games, as well. They all seem to use the same image formats. If the text in those games is as easy to access as it is in Tairyou Jigoku, that'd make for a pretty speedy turnaround on some fan translations for any interested party.
Sorry for the late edit!

That bms script doesn't look very helpful, since it mostly just writes a lot of hardcoded bytes for that specific game.

I haven't authored anything yet, I was only doing a quick test with a hex editor and some standard programs!

To export that image I posted, I created an empty image with OPTPiX iMageStudio (256 colors, 512x512) and saved it as a TIM2 file. Then I replaced the bitmap and palette with those in your file's bytes, using a hex editor. Then I opened the edited TIM2 file again in iMageStudio and exported the PNG file.

So, we'd only have to create a script that reads the first 0x30 bytes of a TI file and converts it to a proper TIM2 header (or whatever we want to export it to.)

EDIT: I uploaded the TIM2 file I put together in case you want to take a look with a image viewer or a hex editor: http://www.bwass.org/bucket/ti-test.zip
« Last Edit: October 13, 2018, 08:59:57 am by mz »
There has to be a better life.

halumi

  • Jr. Member
  • **
  • Posts: 30
    • View Profile
Re: THE Tairyou Jigoku (English Translation)
« Reply #6 on: October 13, 2018, 01:29:30 pm »
I see, I see! That program sounds incredibly useful! I was hoping there was something like that with native TIM2 support, but I was not able to find anything on my own.

No, I wouldn't have thought so. I meant "if you did" as in "if you were to do so". The information you've already offered is such a huge help, though. As I said in the OP, I'm really not any kind of programmer, and I haven't been hacking games for very long, so I hope you'll forgive my ignorance. I wouldn't know the first thing about writing a script or program to automate the process, but I would not mind rewriting the image headers manually as long as I know what's supposed to go where.

In any case, thank you very much, I'll see if I can successfully edit and insert that.

In the meantime, I've done a sloppy mockup:



Yes, it's ugly. I just like making horrible Illbleed type. The real point of this was to attempt to use the art from the front of the slipcover to matte out "THE 大量地獄".



I honestly thought it would look a lot worse than this? The edges where the background is much lighter would obviously require greater care, but this seems totally workable (much to my surprise). For the foreground, at least, I don't think you'd be able to tell it was edited at all after applying color reduction.

Considering just setting it in white Century New Style to match the THE and keep that Simple Series flavor.

mz

  • Sr. Member
  • ****
  • Posts: 447
  • Whore
    • View Profile
Re: THE Tairyou Jigoku (English Translation)
« Reply #7 on: October 13, 2018, 02:18:15 pm »
That actually looks great so far! I'm the kind of person who only edits graphics very quickly in MS Paint until the very last day before a release. Like this:

So your sloppy mockup is already looking a lot better than what I'm used to. :P

I might try to put a script together later if I have some spare time (and energy) tonight! And if I manage to figure out the original TI header. :D
There has to be a better life.

Mugi

  • Sr. Member
  • ****
  • Posts: 298
  • Personal text
    • View Profile
    • Blacklabel-translations
Re: THE Tairyou Jigoku (English Translation)
« Reply #8 on: October 13, 2018, 02:25:30 pm »
i took a quick look at it and didnt really look like rocket science.

since the image is 512x512, here what i dug out.

header size: 0x30
palette size: 0x400 (256 color)
data order in file: header->palette->data

as you said that it straight out works with a TIM2 header, the easiest solution would be just to hardcode a tim2 header and give the script options to slide in image diemnsions and some other tidbits that might be needed.

here's what i dug out just by staring at it for 20 seconds:

0x08: header size (0x3000) (or palette addr.)
0x22: width (or height)
0x24: height (or width)
0x28: palette size (0x0004)

there are several more flags there that might or might not match an actual tim2 header such as color mode, bpp settings etc, but assuming most if not all graphics of the game are most likely 256 or 16 color, hardcoding a header that works should get you quite far already.

i did notice though, that the image uses a half-range transparency mode, so when messing with it, it's something to keep in mind. (values 0x00-0x80)
« Last Edit: October 13, 2018, 02:30:50 pm by Mugi »
In PSP we trust.

mz

  • Sr. Member
  • ****
  • Posts: 447
  • Whore
    • View Profile
Re: THE Tairyou Jigoku (English Translation)
« Reply #9 on: October 13, 2018, 02:49:23 pm »
Thanks!

Hardcoding a TIM2 header of course sounds easy enough (and it's pretty much what I did earlier!), but I'd like to properly read those 0x30 bytes at the beginning of the TI file to be able to work with all of the game's images!

(Unless all of the game's images have exactly the same specs, which wouldn't surprise me coming from Tamsoft. :P)
There has to be a better life.

Mugi

  • Sr. Member
  • ****
  • Posts: 298
  • Personal text
    • View Profile
    • Blacklabel-translations
Re: THE Tairyou Jigoku (English Translation)
« Reply #10 on: October 13, 2018, 03:00:10 pm »
that eas exactly my point. it's not really uncommon in ps2 games that 99% of the graphics are just 256color BGRA data with various headers thrown in.
i'd just start from hardcoding it and giving it a go, and adjust later if necessary. with the above data you can already hardcode it to 256color, and just let the script read the width and height from the original TI header (just test which one is which, impossible to tell since the sample was a square.)

i did give the sample image a go with my ps2/psp decoder but the tim2 swizzle is currently not implemented on it, sans that it does the job as usual (whatever<->tga conversion)

edit: jeez my spelling lol.
In PSP we trust.

mz

  • Sr. Member
  • ****
  • Posts: 447
  • Whore
    • View Profile
Re: THE Tairyou Jigoku (English Translation)
« Reply #11 on: October 13, 2018, 03:13:46 pm »
I see! It's my first time ever looking at a PS2 file, I'm used to seeing many different types of TIM files on the PS1 just within a single game. :P

Is your "whatever<->tga" tool public and/or could you share it with us?
There has to be a better life.

Mugi

  • Sr. Member
  • ****
  • Posts: 298
  • Personal text
    • View Profile
    • Blacklabel-translations
Re: THE Tairyou Jigoku (English Translation)
« Reply #12 on: October 13, 2018, 03:32:38 pm »
it's not (it's kinda a forever wip tool.) as i said though, unless you implement the ps2 swizzle on it, it wouldn't do the jb here anyway. At that point you might aswell just write something of your own instead of getting a brainfart trying to figure out the gigantic clusterfuck that's the tool's sourcecode.

i will propably eventually release it once we're done giving it a cleanup and implementing a pile of shit i've been wanting to add to it. (couple morton swizzles, the ps2 swizzle, maybe png output support)
In PSP we trust.

halumi

  • Jr. Member
  • **
  • Posts: 30
    • View Profile
Re: THE Tairyou Jigoku (English Translation)
« Reply #13 on: October 14, 2018, 12:43:32 am »
That actually looks great so far! I'm the kind of person who only edits graphics very quickly in MS Paint until the very last day before a release. Like this:

So your sloppy mockup is already looking a lot better than what I'm used to. :P

I might try to put a script together later if I have some spare time (and energy) tonight! And if I manage to figure out the original TI header. :D

Thanks!

There is absolutely no rush. Your enthusiasm, friendliness and helpful attitude are very much appreciated. I have to say, I am not accustomed to being treated this way on the Internet when I'm trying to do something I am bad at.

Incidentally, the TM2 you posted is not the same size as the original, and looks substantially different in a hex editor (although OPTPiX iMageStudio could open and edit it perfectly, thank you for telling me about that program!). I have low confidence in my understanding of bitmap files and I will probably just break things if I try to insert it as is, so I think I will hold off on this for now and wait to see if there are further developments wrt a clean TI to editable format conversion (and vice versa) before I get too caught up in trying to make this work. To that end, here are a few other TI files from various Tamsoft games, and BIN and CAT files I know to contain texture(s) that appear to be TI files. No idea if that is of use to anyone (it sounds like you may have figured the header out already), I again apologize, but I am really clueless when it comes to this sort of stuff. Would it be possible to determine how many bytes a TI packed into an archive is supposed to be based on the header, and then extract it?

Some of the above files do have different values at 0x22 and 0x24, which I would assume based off of what Mugi posted means that they are rectangular. I doubt that will save anyone any time in figuring out which is which, but hey.


i took a quick look at it and didnt really look like rocket science.

It certainly isn't so easily understood by everyone (like me), although I am glad to hear it is not that complicated as image formats go. Thank you for taking a look and weighing in.

VicVergil

  • Hero Member
  • *****
  • Posts: 727
    • View Profile
Re: THE Tairyou Jigoku (English Translation)
« Reply #14 on: October 14, 2018, 03:00:38 am »
Hi there halumi, really grateful for your L.O.L. translation (hilarious translation group acronym btw :laugh: ) and cheers for tackling a PS2 translation. You don't see much of this these days.

I will cut to the chase:

Spoiler:

You probably know a lot of what I'm about to say next, but for the sake of the idea flow I will need to point it out anyways.
 
Most old-school formats are stored in a way that each pixel never has the actual RGB color value, but instead has an index (hence why these images are called indexed color images). That index is one out of a number of entries in a table with the actual RGB color values, that table is called the palette (or sometimes the CLUT for "color look-up table" in a Sony context). Of course the exact specifics of how this is represented in hexadecimal data depends on the target console's conventions.

The prime motive of this is to drive down the memory cost of storing the image, either in the static game image (ROM, game disks) or the runtime memory (RAM), and as a neat side effect reduce loading and processing times. So as you might have guessed, while there are formats that directly encode each pixels to their RGB value (meaning every single pixel is encoded in data as a number from 0 to 16 million, if not more, and that makes for a looong file, but they often count on compression to cut it down) this tradition has never let down really.

You seem to be expecting a new tool to be made for scratch to handle .TI files. It would read the header, extract the palette, process the image data accordingly and output a neat png file.
However, in case this didn't ever pan out, and you need to get stuff done anyways, here's an alternate method.

You run all of the file, header, palette and graphics, in a tile editor (crystaltile2) with the settings given above. You still get an editable preview of the graphics (just keep in mind some colors are meant to be transparent as Mugi said), and some garbage at the top that's very clearly non-image data that you shouldn't probably paint over since it's not meant to be handled that way.

The main problem is the colors.
It's off here because Crystaltile2 just uses a placeholder palette for the lack of anything better to interpret that indexed color image, and expects you to give you (under the palette tab, import button) a working palette file (pal/act format) with 256 colors.

The palette data is there, in this very file, stored from 0x30 to 0x42F. Normally you can select it in Ct2, right click (palette to data conversion) and it will overwrite the palette, but the problem is that this conversion works only for palettes formatted for the GBA/NDS systems, and the PS2 uses something slightly different (and apparently twice as big).
Your only remaining roadblock would be to code a tool that converts that PS2 palette to a working pal file (presumably after reading a lot about how PS2 palettes work), and load that in Crystaltile2.

It's a half-measure solution by all definitions of the term, but it's better than nothing, which is why I'm mentioning it here at all in case you're stumped. For simpler graphics like the fonts, you could even overwrite the default palette by a custom "made-up" handmade palette to get it done.

And...

If you're fixing the font, please don't bother coding a VWF routine for it if you know it will be more trouble to debug and test. Just make it fixed width but with a smaller width like any low budget publisher who would like to get its game out asap would do. Some letters will need to be redrawn more centered, but that will be good enough for a game like this.

Please figure out the text pointer system as well. There's only so far hex editing in a translation will take you, before you'll have to butcher it to make it fit. In case it's still too hard to fit in the translation, you could spare the effort you would have put into the VWF routine, to instead add ASCII support and if possible, even dictionary compression support (a shift-jis value would call an entire word instead, for example).

Mugi

  • Sr. Member
  • ****
  • Posts: 298
  • Personal text
    • View Profile
    • Blacklabel-translations
Re: THE Tairyou Jigoku (English Translation)
« Reply #15 on: October 14, 2018, 08:19:36 am »
there's nothing really weird on this palette to be honest, it's just quite simply a 32BPP BGRA palette.
256 entries, 32bits (4 bytes) per entry = 0x400

the only catch with these images here is that if you mess with them with an external program such as crystaltile you have to absolutely pay attention to the last byte of the palette entries (the alpha) as i already stated, this image is using half-toned alpha channel, meaning that instead of using values 0-255 (decimal) to produce various states of opaqueness, this image uses only half of that. 0 is fully transparent and 128 is fully opaque. anything past 128 in the palette file can cause various other effects depending on if this image file supports it or not.

now i know for a fact that imgstudio supports a setting for half-range alpha, but im fairly sure crystaltile doesnt.
In PSP we trust.

halumi

  • Jr. Member
  • **
  • Posts: 30
    • View Profile
Re: THE Tairyou Jigoku (English Translation)
« Reply #16 on: October 14, 2018, 08:53:15 am »
-snip-

Thanks. I hope to see more translations for games from that console generation as younger folks who grew up playing those games get a little older. I don't have anything to "show" at the moment, but I have been working on rewriting the manual and biggest chunk of text in the game from my friend's first pass translation.

I don't expect anyone to do anything for me. I was surprised and delighted to receive mz's offer to help. I've already sunk so much of my time into reading a lot about hacking games for consoles that don't have a great deal of helpful resources for newcomers that I am very amenable to the idea of someone offering to make it a little easier for me. I love learning new skills, but this isn't my only hobby, and there are only so many hours in the day.

CrystalTile2 has no problem exporting TI files to BMP, but it won't actually save any changes you make to them after reimporting the edited BMPs. iMageStudio seems like a much more robust program for this sort of thing.

ASCII characters are already "supported" by the game, but with a number of caveats. They display identically to their fullwidth counterparts, but do not center properly in situations where the game expects the text to all be centered fullwidth characters (the gif in the OP was a compromise where I padded out "Begin" with some empty spaces to get the menu selections aligned with each other because "Continue" was one character too long and the one ASCII "e" I used pushed it slightly off-center), and break the text box when they attempt to wrap to the next line, with the number of characters per line being fixed at 29 (at least in the introduction). Additionally, the way the pointers seem to work is the first two byte S-JIS character is interpreted as the beginning of the message, and 00 as the end (in other words, any part of the text string can be ASCII except for the initial character). As it stands now, they are useful for squeezing more text into small strings with a fixed alignment, but are otherwise pretty buggy.

e: Can confirm that most of the text is in the ELF file. I also found reference to some "Message Size" variables, which sounds promising, but I don't have time to mess with it right now.
« Last Edit: October 14, 2018, 03:22:34 pm by halumi »