Author Topic: Cyber Knight translation  (Read 10372 times)

ccovell

  • Hero Member
  • *****
  • Posts: 2245
Re: Cyber Knight translation
« Reply #195 on: October 26, 2016, 12:15:51 PM »
"Wait... that's not a serif.  Dammit, elmer, zip up!"

And you would be his sidekick, "Iota".

esteban

  • Hero Member
  • *****
  • Posts: 24063
Cyber Knight translation
« Reply #196 on: October 26, 2016, 12:42:51 PM »
"Wait... that's not a serif.  Dammit, elmer, zip up!"

And you would be his sidekick, "Iota".

And your nemesis, Signor SanSerif, would go by the nickname "Eunuch".
  |    | 

elmer

  • Hero Member
  • *****
  • Posts: 2153
Re: Cyber Knight translation
« Reply #197 on: October 26, 2016, 02:18:11 PM »
"Wait... that's not a serif.  Dammit, elmer, zip up!"

You mean that I couldn't walk around and say "Don't you want to touch my dangling serif?"  #-o

But it would still be better to go, in costume, as the intrepid Financial Times reporters (with name badges), Harry Chad, and his wife Penny. After Harry's investigation of the Clinton Foundation, they're now just know to the police as "Hanging Chad" and "Pregnant Chad".

Ba...da...boooom!  :wink: ...  :roll:

« Last Edit: October 26, 2016, 02:19:51 PM by elmer »

NightWolve

  • Hero Member
  • *****
  • Posts: 5277
Re: Cyber Knight translation
« Reply #198 on: October 26, 2016, 02:58:06 PM »
Wow, didn't expect all that help by elmer! Looks like megatron is on his way!

spenoza

  • Hero Member
  • *****
  • Posts: 2751
Re: Cyber Knight translation
« Reply #199 on: October 27, 2016, 05:39:42 AM »
Files are named as ASSETBANK.ASSETCHUNK.dat.

Don't be like me and misread that as ASSBANK.ASSCHUNK

Unless you like to giggle like a child.

Totally understand the reason you'll be out of the game for 18 years or so. I just killed my free time for the same reason this month.
<a href="http://www.pcedaisakusen.net/2/34/103/show-collection.htm" class="bbc_link" target="_blank">My meager PC Engine Collection so far.</a><br><a href="https://www.pcenginefx.com/forums/" class="bbc_link" target="_blank">PC Engine Software Bible</a><br><a href="http://www.racketboy.com/forum/" c

johnnykonami

  • Hero Member
  • *****
  • Posts: 1350
Re: Cyber Knight translation
« Reply #200 on: October 27, 2016, 07:50:01 AM »
Don't be like me and misread that as ASSBANK.ASSCHUNK

Unless you like to giggle like a child.

Totally understand the reason you'll be out of the game for 18 years or so. I just killed my free time for the same reason this month.

I'm learning some programming now, and I'm officially moving learning about using ASSBANK.ASSCHUNK to the top of my list.

megatron-uk

  • Full Member
  • ***
  • Posts: 219
Re: Cyber Knight translation
« Reply #201 on: October 27, 2016, 10:15:06 AM »
Quote
Totally understand the reason you'll be out of the game for 18 years or so. I just killed my free time for the same reason this month.

Commiserations  :wink:

megatron-uk

  • Full Member
  • ***
  • Posts: 219
Re: Cyber Knight translation
« Reply #202 on: October 28, 2016, 05:27:12 AM »
New commits to Github (https://github.com/megatron-uk/cyberknight-pce) - replaced the old script extractor with extractAssets.py and a translator/splitter named splitAssets.py. If you want to give it a go, run the former, then the latter, just make sure you have your "Cyber Knight (J).pce" rom in the same directory.

This should result in a directory of JSON files (under assets/raw and assets/split), split by asset bank and chunk (no, I refuse to stoop to calling them Assbank and Asschunk you bunch of lowlifes!) with translations using my old lookup tables. I've also been able to embed a few more special byte sequences; some missing NPC names and the like.

It's a much cleaner data set to work with now.

Next step is to run through the SNES translation and re-insert the strings again where they match.

Then write a patcher to expand the ROM, update the main bank asset map with the new ROM bank numbers to suit.

Perhaps a week until I can inject the output in to the ROM again and do a playtest? Hopefully, at that point we'll find those bits that were broken are no longer broken!

elmer

  • Hero Member
  • *****
  • Posts: 2153
Re: Cyber Knight translation
« Reply #203 on: October 28, 2016, 11:52:32 AM »
Perhaps a week until I can inject the output in to the ROM again and do a playtest? Hopefully, at that point we'll find those bits that were broken are no longer broken!

Great news! I hope it all works properly now.  :D

You're doing excellent work getting everything refactored so quickly.

FYI ... It looks like it's possible to move the English font up by a pixel so that the lower-case descenders actually drop below the baseline (even if only by 1 pixel).  :-"

megatron-uk

  • Full Member
  • ***
  • Posts: 219
Re: Cyber Knight translation
« Reply #204 on: October 28, 2016, 09:56:10 PM »
So, as part of cleaning things up and trying to get to 100% on working out the remaining control bytes I've decided to try and work out the dialogue window control codes.

0x1a is the control code to open a dialogue window, it is then followed by a single byte that controls the size and placement of the window.

Recording the location of the dialogue windows and altering the second byte I get the following:

















The control codes that start with 0x5 seem to be 2-line windows, and those that start with 0x7 are 1-line. I can't figure out how the length of the window is set, as the control code 0x74 is a tiny, 1-line box used for the jumpdrive countdown timer in the intro cinema, so it's not as if the lower 4 bits of this byte are width.

I can't work out how the second byte can encode the window position and size - I'm leaning more towards the fact that there may be a list of window position and sizes stored somewhere in the ROM and this byte is perhaps a lookup code.

If we want to control the size and location of the dialogue boxes for the expanded English translation, then I need to get a much more extensive lookup table of the boxes that these control codes produce. The intro and initial world get me some of them, but there will be lots more.

megatron-uk

  • Full Member
  • ***
  • Posts: 219
Re: Cyber Knight translation
« Reply #205 on: October 28, 2016, 09:59:47 PM »
Looks like the images are not coming through. Must be a problem with my router.

megatron-uk

  • Full Member
  • ***
  • Posts: 219
Re: Cyber Knight translation
« Reply #206 on: October 29, 2016, 02:04:32 AM »
Okay, no height/width link to the value of the second byte, that I can determine. I'm fairly sure that the value of this second byte is a lookup to a table of pre-set dialogue box dimensions.

I've been through about 50 or 60 variations of the second byte and although there is some similarity between some values and their nearest neighbours, ultimately it just seems to be a series of variations.

I'll upload a screen grab of all the working second byte values I've found so far a little later today. At least that will give me a manual look-up of whether I want to change the dialogue box for a given script segment or not.

megatron-uk

  • Full Member
  • ***
  • Posts: 219
Re: Cyber Knight translation
« Reply #207 on: October 29, 2016, 02:25:12 AM »
Here are all the 0x1a 0x?? dialogue box control codes that I've been able to find in the game.



I've tried variations on the second byte for codes that don't appear in the game, but I get weird results, so it would appear that this is the limit of what is used in the normal dialogue code. There are quite a few other instances that this doesn't cover:

- In-and-out of battle menus
- Planet names
- Discussions with crew

The above don't appear to use the same display code; the script for much of the above doesn't begin with the same control codes as elsewhere in the game. Much of this isn't a problem, but there are a few areas (ship locations, dialogue snippets with the crew) that would benefit from alternative text box location and/or sizes.

megatron-uk

  • Full Member
  • ***
  • Posts: 219
Re: Cyber Knight translation
« Reply #208 on: October 29, 2016, 03:50:42 AM »
Small commit to github. The splitAssets.py script now embeds dialogue box information into the extracted Japanese text.

Each of the text strings in a given asset chunk now looks something like this:

Code: [Select]
{
                        "string_number" : 2,
                        "string_size" : 59,
                        "start_pos" : 0x28086,
                        "bytes" : ["1a", "4f", "10", "30", "a2", "cb", "ae", "b3", "d2", "dd", "b5", "dd", "c4", "de", "20", "31", "30", "30", "30", "20", "df", "43", "20", "b2", "bc", "de", "ae", "b3", "a1", "03", "d6", "b3", "b6", "de", "dd", "c6", "20", "b5", "b5", "dc", "da", "c0", "20", "c1", "b2", "bb", "c5", "20", "dc", "b8", "be", "b2", "03", "c3", "de", "bd", "a1", "a3", "08"],
                        "PCE_japanese" : "<newbox><24x3@bottom_centred><NPC_Mica>『ひょうめんおんど 1000゜C いじょう。\nようがんに おおわれた ちいさな わくせい\nです。』<wait>",
                        "SNES_english" : "",
                        "SNES_accuracy" : 0.0,
                        "PCE_english" : "",
                        "notes" : "",
},

elmer

  • Hero Member
  • *****
  • Posts: 2153
Re: Cyber Knight translation
« Reply #209 on: October 29, 2016, 05:46:10 AM »
Okay, no height/width link to the value of the second byte, that I can determine. I'm fairly sure that the value of this second byte is a lookup to a table of pre-set dialogue box dimensions.

I've been through about 50 or 60 variations of the second byte and although there is some similarity between some values and their nearest neighbours, ultimately it just seems to be a series of variations.
Here are all the 0x1a 0x?? dialogue box control codes that I've been able to find in the game.

Excellent work!  :D

It's great to see your posts and follow your investigations.

You and I approach the investigation process in different ways, and I find it fascinating to see how you're so successfully coming up with all this critically-important information.

My approach is more of "dive into the code and see what it's doing", which takes a lot longer to get any results, and can easily lead to lot of unnecessary disassembly.



Small commit to github. The splitAssets.py script now embeds dialogue box information into the extracted Japanese text.

I absolutely love your JSON-format extraction with all of its extra meta-data.

It presents the information in a way that's easy to read and modify (especially by automated tools).