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

Author Topic: Help with Countdown Vampires (Extract & Inject Tim Files)  (Read 1129 times)

Mr.Nobody

  • Jr. Member
  • **
  • Posts: 13
    • View Profile
Help with Countdown Vampires (Extract & Inject Tim Files)
« on: January 10, 2018, 12:05:51 pm »
I am trying to figure out if it is possible to translate this resident evil clone.
It is possible cause i saw a russian release of the game translated by fans so let me explain...
As i was checking the files from the game just to realize that the game uses images for the text like this one:



I can find a lot of the texts-images of the game files but not all of them.

Maybe some of the bin files are compressed in a different way, i dunno.
A guy created an extractor for one of the files but its impossible to download right now... (http://lgt.createaforum.com/tools-45/cvbinextractor-a-tool-to-extract-bin-files/msg416/#msg416)

I found a way to see some files inside but even if i get to extract them i know that i wont be able to inject them again without corrupting the files so.

Can anyone help me out with the task?

Thanks in advance.

« Last Edit: January 18, 2018, 02:50:23 am by Mr.Nobody »

weissvulf

  • Sr. Member
  • ****
  • Posts: 324
  • Good news! An anomaly solved the enigma.
    • View Profile
Re: Help with Countdown Vampires (Extract & Inject Tim Files)
« Reply #1 on: January 16, 2018, 07:18:45 pm »
Hello Mr.Somebody  ;)
If your disk image is in a format like BIN+CUE, then you should use a tool like CDMage to extract/insert files from the image. You won't have much luck extracting the TIM graphics directly out of the disk image because they will be broken up by the CD sector data.

Once you extract the file that contains the graphics out of the CD image, try to scan the file with a TIM ripper like TIMviewer HERE. It can extract/insert standard TIM files.

If TIMviewer doesn't find the graphics, they are probably non-standard images or compressed. If they are NOT compressed, you should be able to use nana HERE and RawToTIM HERE to find and extract/insert them.

Mr.Nobody

  • Jr. Member
  • **
  • Posts: 13
    • View Profile
Re: Help with Countdown Vampires (Extract & Inject Tim Files)
« Reply #2 on: January 17, 2018, 10:55:20 am »
Thanks Weissvulf!

Well, i scanned the bin+cue file and extracted most of the files, then i used the timviewer and extracted most of the text images from some bin files but the problem is exactly with the images that i am not able to see/extract which I guess that they are compressed  orI can't figure out on how to extract them so I dunno how to continue from here...

Thanks anyways!

PS. Downloaded the ps1 tools you made!

weissvulf

  • Sr. Member
  • ****
  • Posts: 324
  • Good news! An anomaly solved the enigma.
    • View Profile
Re: Help with Countdown Vampires (Extract & Inject Tim Files)
« Reply #3 on: January 17, 2018, 07:23:11 pm »
You're welcome :). Countdown Vampires is one I have in my library so I checked it out disk 1. I'm almost certain there are no compressed images in the game.These files have lots of text in standard TIMs:
SIGE_TIM.BIN, MENU.BIN, K_DISC1.BIN, H_DATA.BIN, CHAR_EFF.BIN

These files have RAW images (mostly background screens):
PEONODAT.BIN
CAMDATA.BIN

Most of the RAW graphics are 320x240 8bit and they all can be extracted/inserted with RawToTIM. If you are a novice, it will take some learning to find the image-start location for RawToTIM. To get that information, you can use nana, tileMolestor or similar.The palettes for 8bit images appear to be at -20C (aka 0x20C before the image) so that makes things considerably easier. I didn't see much text in those background images though. Do you really need to edit them for a translation?
HERE is a project file for use with RawToTIM. It lists some of the images in PEONODAT.BIN. To use it, put it in the same folder with PEONODAT.BIN, and then 'load' PEONODAT.BIN in RawToTIM. The images in the project file will be listed in the dropdown.

« Last Edit: January 17, 2018, 07:35:43 pm by weissvulf »

Mr.Nobody

  • Jr. Member
  • **
  • Posts: 13
    • View Profile
Re: Help with Countdown Vampires (Extract & Inject Tim Files)
« Reply #4 on: January 18, 2018, 02:34:52 am »
Thanks a lot man! I saw the images and i learn how to use your program properly!!

And as you said, those aren't the images i was talking about...

I can find most of these images which contains the text to translate:



So let's be specific:

This is the first line of dialog to translate in the game:



So i search around using tim2view, timviewer and jpsxdec with the game files and I can't find it so i use No$Psx with the debugger and i see that it has loaded correctly:



and it looks like to me that there are 2 images there:



So i tried to search/extract the image from the save state and can't find it either so I'm still unable to locate it inside the game files.
And I have contemplate the idea of this being plain text too and i did a search in most of the files searching for something that lead me to text but this doesn't seem the case...

You were absolutely right, in those files you can only find backgrounds so those don't matter much in the translation.And those files are in MENU.BIN as well so...

Most of text tim files are shown on those bin files but it seems that I can't find the ones from the cutscenes (like the first dialog example).

I'm going to redo a search inside the bin files again trying to search for it.

Should i use  nana on the big files and check one by one? Cause we're talking about 1065 tims on tim2view...
If tim2view it's not showing everything this is going to be crazy.

Thanks for the help man! Appreciated it a lot!
« Last Edit: January 18, 2018, 02:49:43 am by Mr.Nobody »

weissvulf

  • Sr. Member
  • ****
  • Posts: 324
  • Good news! An anomaly solved the enigma.
    • View Profile
Re: Help with Countdown Vampires (Extract & Inject Tim Files)
« Reply #5 on: January 18, 2018, 07:05:29 am »
Here is the process I use to find such image data:
Spoiler:
1 Get a small sample of the RAW image data
 You can do this by loading a non-compressed emulator save-state in nana. Emulators may differ a little, but pSX v1.13 saves the Video-RAM near the end of the save. This V-RAM is best viewed at 'raw:byte' 2048 wide. You want to locate a sample of the text-graphic from it's middle, and NOT just blank-black pixels. It should look something like this, note the location:


Copy RAW data segment
Open the save-state in a Hex Editor and go to this location and copy a SMALL segment of hex data from the location. This data should be segment from a line of pixels. Copy it:


Search CD image for data segment
Next, open the BIN disk image in the hex editor and search for the copied data. If all goes right you should find it:


Calculate which file
Next, you need calculate which file this data is in. To do that, take the location in the CD image and divide it by 0x930.
Example: 0x7b37d48 divided by 0x930 = 0xd695 = 54933.
This result (54933) is data's LBA. Open the CD image in a program like CDmage and sort the files by LBA. Look for the file whose starting LBA is just below the data's LBA:


Locate RAW segment in file
This is the file where the image is located. Open that file in a Hex Editor and search for the same hex data. Note it's location:


Now, open SIGE_TIM.BIN in nana and go the noted location. The text you're looking for is there.


Luckily for you, these text-images are standard TIMs but missing a header tag. You could extract them 1 by one with RawToTIM, but it would take quite a lot of patience. So I have a suggestion: "Search and Replace" in a hex editor.

First search for 10000000 08000000 2C000000 and replace it with 12345678 12345678 12345678. This replaces existing TIM headers with a byte sequence not found in the file.

Next search for 08000000 2C000000 and replace it with 10000000 08000000 2C000000. This will add the missing tag to the text-graphics TIMs which should make them show up in TIM-viewer:


When you are done with your edits, reverse the procedure.
Search for 10000000 08000000 2C000000 and replace with 08000000 2C000000. Next, search for 12345678 12345678 12345678 and replace with 10000000 08000000 2C000000 to restore the original TIM files.
Complicated but doable  :angel:

Mr.Nobody

  • Jr. Member
  • **
  • Posts: 13
    • View Profile
Re: Help with Countdown Vampires (Extract & Inject Tim Files)
« Reply #6 on: January 18, 2018, 08:50:33 am »
OMG! You're the best!
Thank you very much for the explanation, i'm going to follow your process.
I will keep you updated on my progress.

Are you on the discord channel?

January 18, 2018, 01:57:08 pm - (Auto Merged - Double Posts are not allowed before 7 days.)
https://www.youtube.com/watch?v=yHuq54SIU30&feature=youtu.be

First test passed!
It's a slow process but it's better than nothing. Thanks again!
« Last Edit: January 18, 2018, 01:57:08 pm by Mr.Nobody »

weissvulf

  • Sr. Member
  • ****
  • Posts: 324
  • Good news! An anomaly solved the enigma.
    • View Profile
Re: Help with Countdown Vampires (Extract & Inject Tim Files)
« Reply #7 on: January 19, 2018, 02:54:26 am »
Are you on the discord channel?
No, I'm barely online; think Amish but without the beard  :laugh:. Video looks nice, font matches perfectly - good job. :thumbsup:

Mr.Nobody

  • Jr. Member
  • **
  • Posts: 13
    • View Profile
Re: Help with Countdown Vampires (Extract & Inject Tim Files)
« Reply #8 on: January 19, 2018, 03:50:58 am »
Well, thanks anyway i will add you as a contributor when the patch is released since you showed me how to get it done.

Mr.Nobody

  • Jr. Member
  • **
  • Posts: 13
    • View Profile
Re: Help with Countdown Vampires (Extract & Inject Tim Files)
« Reply #9 on: March 07, 2018, 08:15:09 am »
Almost 100% with the translation of the game but I've have one more doubt, I am able to extract the videos from the game and my plan was to put subtitles on them, but from the info I found it's a difficult task on the ps1.

It's there an tutorial or a program that can help me achieve this specific task?

I'm trying with jpsxdec and I like the idea of just inserting frames inside the video without reducing quality but, can't seem to get it to work.

Need help!!

weissvulf

  • Sr. Member
  • ****
  • Posts: 324
  • Good news! An anomaly solved the enigma.
    • View Profile
Re: Help with Countdown Vampires (Extract & Inject Tim Files)
« Reply #10 on: March 25, 2018, 03:42:32 pm »
I was never able to get jpsxdec's partial-frame replace to fully work. The resulting videos would not play on actual hardware. However, the full-frame replace seems to work well. I don't know of a step-by step tutorial, but if you tell me where you are running into trouble, maybe I can offer advice.

Mr.Nobody

  • Jr. Member
  • **
  • Posts: 13
    • View Profile
Re: Help with Countdown Vampires (Extract & Inject Tim Files)
« Reply #11 on: April 18, 2018, 04:43:57 am »
Hi again weissvulf, I finally get it to work and I've done a 100% complete translation, I have used jpsxdec to extract the frames and STR Converter (http://www.romhacking.net/utilities/878/).
The file was kind of a container with audio and video files and I did not found a way to recompile the file correctly with jpsxdec.
So it was like almost 4000 frames injected manually with this tool and works like a charm (Yes, manually...one by one  :cookie:).
I will upload the translation soon and of course you'll be in the credits, thanks for all the help!
« Last Edit: April 18, 2018, 04:49:47 am by Mr.Nobody »