Author Topic: Touhou Project for NEC PC-98 - Request help for Korean translation  (Read 17201 times)

xJeePx

  • Danmaku Aesthete
  • 夢幻王子
Re: Touhou Project for NEC PC-98 - Request help for Korean translation
« Reply #30 on: January 02, 2016, 03:08:43 PM »
Happy New Year.

Ah yes, Mystic Square's .TX2 files are very tricky. The corruption of those files can lead to some... interesting results.


There might be an easier way to edit those files, but here's how I did it:

First of all, make a copy of the original .TX2 files - it can be helpful later on for reference.

I would recommend preparing an already aligned script in advance (the rules are the same as LLS - 3 lines of 30 bytes per line, custom 2-byte graphics/Gaiji characters should be placed in odd-even byte pattern (e.g.: 1st & 2nd, 11th and 12th, 29th and 30th bytes of the line, etc.)).


Open _DM00.TX2 with WinHex.

Replace the original script with translated text, one line at a time. Pay close attention to the number of bytes for each line (30 max).

If you can't type or paste Korean (or Japanese in this case, as you use a modified font) in WinHex, there is a way around that. Download GetMyHex by Ryusui and paste the first line of translated Reimu's dialog in there. Now you can copy the hex values of that line and paste them into the .TX2 file in WinHex. Ctrl+V it where the line should be (select ASCII Hex when asked), and delete the original Japanese hex values of that line. Be careful not to delete any Gaiji characters or commands though.


You can find the list of Gaiji characters' hex values (0CXX) in the Pastebin link I posted earlier:
http://pastebin.com/Uq8uA1N6

If for some reason you need extra space for a line, you can use Edit->Paste Zero Bytes option and replace zero bytes with text or commands.

Here's some commands that can help you with inserting new lines or text boxes, and better understanding how .TX2 files work in general:

0B0D - next line
0BFF0X0D - next text box (0X: 00 - player, 01 - boss)

0BFF0X020Y0D - next text box (0X - player/boss switch, 0Y - portrait change)

Portrait codes:

Reimu: 00 - normal, 01 - wink (gohei wield), 02 - smile, 03 - sweat, 04 - angry
Marisa: 00 - normal, 01 - raised hand, 02 - angry, 03 - sweat, 04 - lightning
Mima: 00 - normal, 01 - closed eyes, 02 - angry, 03 - sweat, 04 - rapeface (unused; I made some use of it in the English patch. If you are curious and want to use it as well, check out the modified files from the English patch.)
Yuuka: 00 - normal, 01 - smile, 02 - smile & closed eyes, 03 - sweat
Sara: 00 - normal, 01 - raised eyebrow, 02 - closed eyes, 03 - defeated
Louise: 00 - normal, 01 - open mouth, 02 - wink, 03 - defeated
Alice: 00 - normal, 01 - open mouth, 02 - defeated
Yuki & Mai: 00 - normal (Yuki), 01 - normal (Mai), 02 - smirk (Mai), 03 - angry (Yuki), 04 - defeated (Mai), 05 - defeated (Yuki)
Yumeko & Shinki - 00 - normal (Yumeko), 01 - raised hand (Yumeko), 02 - defeated (Yumeko), 03 - normal (Shinki), 04 - raised hand (Shinki), 05 - both hands raised (Shinki)
EX Alice: 00 - looking in the book, 01 - open mouth, 02 - smile, 03 - defeated


Now that you've edited the script, let's finish it up with one last thing. See those first 10 bytes in the very beginning of the file? Those are pointers, 5 reversed byte pairs. The first pointer is always 000A (0A00) - the beginning of Reimu's dialog. The second pointer is the end of Reimu's dialog (and beginning of Marisa's), the third pointer is the end of Marisa's dialog, the fourth pointer is the end of Mima's dialog, and the fifth poiner is the end Yuuka's dialog (and the end of the file).

All you have to do is compare the location of the pointers in the original file to your modified file, and type in the location of the pointers (reversed) at the beginning of the file.  Here's a comparison image of the original file and file from the English patch:
http://imgur.com/pnuWWu6

And that's it. What a nightmare, I know.

Good luck!
« Last Edit: January 02, 2016, 07:25:37 PM by xJeePx »

Re: Touhou Project for NEC PC-98 - Request help for Korean translation
« Reply #31 on: January 28, 2016, 03:26:48 AM »
I HAVE ANOTHER QUESTION!
(I'm sorry to just quest only)

I can't find MIKOFT.BTF at TH05
I unpacked first Dat file and second dat file
but there is no MIKOFT.BFT

Where is it?

xJeePx

  • Danmaku Aesthete
  • 夢幻王子
Re: Touhou Project for NEC PC-98 - Request help for Korean translation
« Reply #32 on: January 28, 2016, 11:08:32 AM »
It's okay.

If you're searching for the game's custom font and HUD, try opening ZUN.COM with YY-CHR.

Re: Touhou Project for NEC PC-98 - Request help for Korean translation
« Reply #33 on: January 28, 2016, 12:37:02 PM »
Thank you!

Ah, There is another one

when I opened _ED00.TXT
Quote
\c=靈,15 \c=神,11
\t0 \p,white.pi \p= \fi1
\t200 \p,edbk0.pi \p= \p,ed01.pi \wi2
\==0,2

first 4 lines like this
I think \c=靈,15 \c=神,11 is imfortant
Should I modify 靈and 神 to another text?

xJeePx

  • Danmaku Aesthete
  • 夢幻王子
Re: Touhou Project for NEC PC-98 - Request help for Korean translation
« Reply #34 on: January 28, 2016, 02:32:40 PM »
Quote
Should I modify 靈and 神 to another text?
No need for that. That first line is a memo which color is used for which character (夢 / Reimu - \c15, 綺 / Shinki - \c11, etc).

Edit:
Actually, wait a sec. IIRC, because of that first line, the translated text wasn't colored correctly, so I deleted it and re-did the whole coloring code from scratch in similar fashion to the text files from PoDD and LLS.
Since you're using Kanji (full-width characters), try changing 靈, 神 and other Kanji/Kana from the first line of the _EDxx.TXT files to the first letter you use for Reimu and others' names in your custom font.

傾戚巷
靈 -> 傾
\c=傾,15
« Last Edit: January 28, 2016, 05:41:10 PM by xJeePx »

Re: Touhou Project for NEC PC-98 - Request help for Korean translation
« Reply #35 on: January 28, 2016, 11:05:49 PM »
Thank you, I will do like that

And~
THERE IS ALSO ANOTHER QUESTION(SORRY)

I remember this text was located in MAIN.EXE when I translated TH02 and TH04
But there is nothing in MAIN.EXE (JUST Score Screen and Yuki and Mai's Music name)
Where are they?

xJeePx

  • Danmaku Aesthete
  • 夢幻王子
Re: Touhou Project for NEC PC-98 - Request help for Korean translation
« Reply #36 on: January 28, 2016, 11:19:20 PM »
Stage and BGM titles are located in .STD files in 怪綺談2.DAT. You can edit them with Winhex, just like the .TX2 files (don't forget about the pointer).

Re: Touhou Project for NEC PC-98 - Request help for Korean translation
« Reply #37 on: April 22, 2016, 06:03:38 AM »
Long time no see~ :D

I'm going to two things in may.(Because, the mid-term test ends in 5/1!)

First is to translate "The Phantasmagoria of Dim. Dream (th03)" into korean.

Second is to make "Lotus Land Story (th04)" like "the Embodiment of Scarlet Devil (th06)"

I think second thing will be fun.
LLS have similar story way(?) with EoSD
So I am thinking about change texture and messages LLS into EoSD
But I (think that) can modify character's standing CG, message, title screen.
but I have no idea to modify music, background, character's sprite.
Do you know how to modify this?

Also Before I tanslate th03, i think it will be good if i take advice to you.
(Like when i translate th05...)

Is there anything I should take care about it?

xJeePx

  • Danmaku Aesthete
  • 夢幻王子
Re: Touhou Project for NEC PC-98 - Request help for Korean translation
« Reply #38 on: April 23, 2016, 04:42:03 PM »
Hey, how is it going? :)

Quote
Also Before I tanslate th03, i think it will be good if i take advice to you.
(Like when i translate th05...)

Is there anything I should take care about it?

You shouldn't have much problem with PoDD.

The main script, music comments and win quotes are located in .TXT files - just make sure that full-length (2-byte) characters (Kana, Kanji, Gaiji characters, etc) are placed in odd-even pattern (1st & 2nd, 3rd & 4th bytes of the line, etc).

You can find the main menu text in MIKOFT.BFT (夢時空1.DAT) with YY-CHR (1BPP 16x16 format).

Images are stored in .PI and .CDG formats - you can edit those with ViX and CDG converter.

You can edit character names from the character selection screen (CHNAME.BFT) with Tile Molester (2-Dimensional mode, 2bpp linear codec).


Quote
So I am thinking about change texture and messages LLS into EoSD

Heh, good luck with that. I'm currently working on a similar secret project for another bonus patch, and I gotta say that editing over pre-existing stuff is not that easy. Also, since this is PC-98, there are more restrictions, like the limited number of colors you can use and such, so keep that in mind.

Quote
but I have no idea to modify music, background, character's sprite.
Do you know how to modify this?

Modifying the music is very easy - just replace the original .M86/.M26 files with the music files you would like to use. However, you need to have the whole EoSD OST in PMD (.M/.M2) format to do that. You can listen to PMD music with FMPMD.

The bosses' background pictures are located in ST0xBK.CDG files; you can extract and replace them with Nmlgc's CDG converter.

If you want to change the stage layout, this is going to be much more difficult. I don't know of a convenient way to edit it, but I can point out that the tiles are located in .MPN files (you can view them in YY-CHR), and tile maps are located in .MAP files.

Character sprites are located in .BBx files; midbosses' sprites are located in .BMT files. You can edit them with Tile Molester (2-Dimenional Mode; try experimenting with the Codec (it's usually 4bbp linear though) and Width).

Danmaku data seems to be located in .STD files, but good luck figuring out how that works. lol


If you have more questions, feel free to ask. :)
« Last Edit: April 23, 2016, 05:33:14 PM by xJeePx »

Re: Touhou Project for NEC PC-98 - Request help for Korean translation
« Reply #39 on: April 24, 2016, 09:20:32 AM »

(th04's title screen)
I tried!
I think I need to learn photoshop to make more colorful with 16 colors!  :V

Re: Touhou Project for NEC PC-98 - Request help for Korean translation
« Reply #40 on: April 28, 2016, 03:06:51 AM »


Hmm... this is a question which is not about data file
I making touhou allstar version (which can play all touhou pc98 version)
So i maked the menu but it look empty



This picture is th05's install disk's install's background image(which fomat is .pi)




I want to print like this. How can i do that?
(I think iT is possible)

xJeePx

  • Danmaku Aesthete
  • 夢幻王子
Re: Touhou Project for NEC PC-98 - Request help for Korean translation
« Reply #41 on: April 28, 2016, 04:28:16 AM »
I'm not very experienced with creating installation packages (especially for DOS), so I don't think I can help you with this one, sorry.

Btw, I've never seen this picture before. Nice find! :)

Re: Touhou Project for NEC PC-98 - Request help for Korean translation
« Reply #42 on: June 04, 2016, 10:01:54 AM »
I have Too much bugs  in translation th03 :(

first, i worte to much text in a line. So it makes a crash.
How much text of byte in a line?


Secound, if i choose 18th and 19th music in the music room.
The music comment is not printed.



Third, If i choose CPUvsCPU Mode and choose 1p to chiyuri and 2p to yumemi
the game makes crash

Can you help me this three things?

xJeePx

  • Danmaku Aesthete
  • 夢幻王子
Re: Touhou Project for NEC PC-98 - Request help for Korean translation
« Reply #43 on: June 04, 2016, 08:50:47 PM »
first, i worte to much text in a line. So it makes a crash.
How much text of byte in a line?
3 lines of 58 bytes for each win quote.

Quote
Secound, if i choose 18th and 19th music in the music room.
The music comment is not printed.

Third, If i choose CPUvsCPU Mode and choose 1p to chiyuri and 2p to yumemi
the game makes crash
Could you upload the modified MUSIC.TXT and .EXE files at Mediafire or Dropbox and send me a PM with the links?

Re: Touhou Project for NEC PC-98 - Request help for Korean translation
« Reply #44 on: June 05, 2016, 12:47:02 AM »
https://drive.google.com/open?id=0B0teE949m5M4TnpDTmlIRGRreWM

here, because i don't use mega drive or mediafire.

SO i used google drive.

xJeePx

  • Danmaku Aesthete
  • 夢幻王子
Re: Touhou Project for NEC PC-98 - Request help for Korean translation
« Reply #45 on: June 05, 2016, 02:23:48 AM »
Okay, after some searching I found that you tried to rename the DAT files from 夢時空x.DAT to YUMEx.DAT, and that's probably what was the cause of the freeze. I know it might be tempting to make your life easier like that, but I'd suggest to keep the original names for such vital files.  :)

Here's the modified Korean .EXE files (everything works just fine):
http://www.mediafire.com/download/u1zhkr3h3543yh5

Re: Touhou Project for NEC PC-98 - Request help for Korean translation
« Reply #46 on: June 09, 2016, 01:11:08 AM »
Okay I see

I also have problems :derp:

Because I need I tried to extract th02's dat file which I modified to korean
And thtk called a error

Quote
thdat.exe :thtk_io_read: invalid parameter passed

e:\v1.1\Bin\02>

Why I can't extract this?
(in game, this file works well)

And I need sff1.pal for zunsoft_gfx_tools to modify th04's ending scroll to korean....

xJeePx

  • Danmaku Aesthete
  • 夢幻王子
Re: Touhou Project for NEC PC-98 - Request help for Korean translation
« Reply #47 on: June 10, 2016, 10:57:45 AM »
Because I need I tried to extract th02's dat file which I modified to korean
And thtk called a error

Why I can't extract this?
(in game, this file works well)

I'm not sure what may cause this error, but I can recommend renaming the .DAT file so it has Latin characters only in its file name (e.g. 東方封魔.録 to fuuma.DAT; "thdat x2 fuuma.dat").

Quote
And I need sff1.pal for zunsoft_gfx_tools to modify th04's ending scroll to korean

Alright, I think I figured out how it works. Here's the updated archive. Use sff1.pal for converting SFF1.CDG, SFF2.CDG and SFF3.CDG to PNG format. Use sff2.pal for the other SFFx.CDG files. I haven't tested it in-game, but I assume that SFFxB.CDG files are used for alpha channels, so use sffb.pal for editing those.

Re: Touhou Project for NEC PC-98 - Request help for Korean translation
« Reply #48 on: June 17, 2016, 09:17:16 AM »
Quote
I'm not sure what may cause this error, but I can recommend renaming the .DAT file so it has Latin characters only in its file name (e.g. 東方封魔.録 to fuuma.DAT; "thdat x2 fuuma.dat").
Thanks for advice but I found the file was crash.
With this file, I couldn't play extra stage., because the file is crash
so I solved this problem with modifiy old patch. Thanks.

Quote
Alright, I think I figured out how it works. Here's the updated archive. Use sff1.pal for converting SFF1.CDG, SFF2.CDG and SFF3.CDG to PNG format. Use sff2.pal for the other SFFx.CDG files. I haven't tested it in-game, but I assume that SFFxB.CDG files are used for alpha channels, so use sffb.pal for editing those.
Thank you so much!

Poison Cat

Re: Touhou Project for NEC PC-98 - Request help for Korean translation
« Reply #49 on: October 26, 2017, 05:39:43 PM »
.MDT files are the game's music files, so there is really no need to modify them.

.GRP files are essentially .PI files, just like the ones found in other PC-98 Touhou games. To edit those, you'll need a hex editor and ViX.

1) Open GRP file with a hex editor;
2) For comparison purposes you can open a PI file from any other Touhou game with a hex editor;
3) Change the first 12 values of the GRP file (ZN  PC98 / 5A4E1A000000000450433938) to those of the PI file (Pi  WIN* / 50691A000000000457494E2A), save;
4) Change the file extension from GRP to PI;
5) Now you can convert the PI file to PNG format with ViX and edit it;
6) After editing, convert the PNG file back to PI, open the converted PI file with a hex editor and change the values at offset 0x5 from 0101 to 0000;
7) Change back the first 12 hex values from step 3 (ZN PC98), and change the file extension back to GRP;
8) Replace the GRP file with EditDisk and run the game to try it out.

The main title screen is located in REIIDEN3.GRP.

By the way, I managed to fix Kongara's Siddham characters, so if you want to use those in your patch, feel free to add them:



Download.

Is it normal for the image to look this dark when I view it with ViX?