Author Topic: Cyber Knight translation  (Read 10344 times)

Bonknuts

  • Hero Member
  • *****
  • Posts: 3292
Re: Cyber Knight translation
« Reply #225 on: November 19, 2016, 08:14:57 AM »
elmer beat me to it. That's a common trick: hardcoded vwf stuff in tiles no longer needed.

megatron-uk

  • Full Member
  • ***
  • Posts: 219
Re: Cyber Knight translation
« Reply #226 on: November 20, 2016, 06:55:44 AM »
There's an interesting string hidden amongst those that are used for the main menu and player creation screen.

Hidden at 0x1c086 there is this sequence of bytes:
["20", "20", "be", "b2", "cd", "de", "c2", "3a", "02", "20", "b5", "dd", "c5", "20", "20", "b5", "c4", "ba"]

Translated, this is:
"  せいべつ:\n おんな  おとこ"

In English, this seems to be:
" Sex: Male Female"

It would appear that at some point, Cyber Knight perhaps was planned to allow the player to choose the sex of the character they played, but that string is never shown and there isn't any option to select a gender at character creation time. It's odd, as it's between strings that construct the player creation screen, so I would have expected it to be shown on that screen.

There are a few other bits and pieces like this that I've spotted, a sound menu is the other interesting one, which, if we could figure out how to access it, would be fantastic.

On translation news, I've got most of the battle menu text back in, and having figured out more of the control codes along the way, it's shaping up to be nicer looking that the previous version. In pure numbers I've got about 50% of the ~3000 strings translated so far (many are just control codes, so it's not all printable). The big job is jumping back and forth between savegames to make sure that inserted text doesn't break things... it often does!

esteban

  • Hero Member
  • *****
  • Posts: 24063
Cyber Knight translation
« Reply #227 on: November 20, 2016, 11:08:47 AM »
I don't care what gender I adopt when I play Cyber Knight—it's gonna be great!

:)

Also, I have suggestions for the names, should we limit them to only four characters (I know a solution was already found, humor me):

Leif
Pewk
Slam
Torn
Dr.B
Kawk
Tawk
Bono
Edge
Lynk
Lugi
Luge
« Last Edit: November 20, 2016, 11:11:40 AM by esteban »
  |    | 

megatron-uk

  • Full Member
  • ***
  • Posts: 219
Re: Cyber Knight translation
« Reply #228 on: November 20, 2016, 07:23:41 PM »
There are actually only a few cases where NPC's having names longer than 4 characters makes a difference:

Team menu - selecting the two active members of your squad. Only 4 tiles of space is present between the 'selector' buttons, so anything longer gets cropped.

Battle menu - in the right hand stats column there is a space of 6 tiles between the border of the column and the current HP of the character. When you first start the game you only have a double-digit amount of HP, so 5 characters in your squadmates names will fit early on, with a space between the values, but later in the game they will overlap the displayed HP.

Mecha-equip menu - 4 characters width in the box to select the mecha to view. If longer, then the team mates name overflows the selection box.

At the moment I'm using 'Rx78', 'Wasp', 'Seta', 'Ogre' and 'Soru' as the mecha/combat suit names to simplify display issues.
There's nothing that 'breaks' the game as such, but it's a bit messy.

megatron-uk

  • Full Member
  • ***
  • Posts: 219
Re: Cyber Knight translation
« Reply #229 on: November 20, 2016, 08:18:58 PM »
One thing I've been thinking about is trying to work out how the portraits of the various characters are displayed. There is also some code somewhere that displays a graphic when you find an 'item', whatever that widget is - for instance in the first world, when the Professor gives you his Star Map, it pops up a little window with a start chart inside it; there are lots of items in the game to acquire, so I would think this will be consistent throughout the code.

It would be great to be able to do that throughout the game - pop up a window in the corner of the screen for whoever is speaking, for example. As well as reference any items when they are discussed on other worlds.

I thought there may have been some control codes embedded in the script that did this, but it doesn't appear to be the case.

elmer

  • Hero Member
  • *****
  • Posts: 2153
Re: Cyber Knight translation
« Reply #230 on: November 20, 2016, 08:18:59 PM »
At the moment I'm using 'Rx78', 'Wasp', 'Seta', 'Ogre' and 'Soru' as the mecha/combat suit names to simplify display issues.

Here are some others ... can you guess the theme?  :wink:

ErNy
KrMt
MsPg
KuKi
GrVr
BgBd

Too much? :roll:

megatron-uk

  • Full Member
  • ***
  • Posts: 219
Re: Cyber Knight translation
« Reply #231 on: November 20, 2016, 08:22:06 PM »
I should try to extract these graphic assets... I haven't seen any images of NPC's you talk to, and getting them in to the game, alongside the portraits of your team would be a fantastic achievement.

This is probably going to be a side-project alongside the translation. Need to track the existing graphic assets down first!

Necromancer

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 21366
Re: Cyber Knight translation
« Reply #232 on: November 21, 2016, 01:18:48 AM »
Here are some others ... can you guess the theme?  :wink:

ErNy
KrMt
MsPg
KuKi
GrVr
BgBd

Too much? :roll:

No OsCr?
U.S. Collection: 97% complete    155/159 titles

elmer

  • Hero Member
  • *****
  • Posts: 2153
Re: Cyber Knight translation
« Reply #233 on: November 21, 2016, 05:02:27 AM »

Punch

  • Hero Member
  • *****
  • Posts: 3278
Re: Cyber Knight translation
« Reply #234 on: November 21, 2016, 06:31:13 AM »
レックス,REX
ウイナー,ACE
シェリフ,STAR/CAPT
タイタン,HULK
サウルス,DINO

I tried.


megatron-uk

  • Full Member
  • ***
  • Posts: 219
Re: Cyber Knight translation
« Reply #235 on: November 25, 2016, 09:14:27 PM »
I keep coming across 'weird' behaviour in the new expanded ROM. There are certain bits of dialogue that I know are in one bank (the NPC text for the first world - Farworld, for example), that when triggered, display a partial string from a completely different bank.

Here's an example:

The first NPC triggers a string that was originally in bank 0x0a, asset ID 01 located at 0x1403e, and is now in bank 0x4c, asset ID 01 at ROM location 0x9805a:


But then this second NPC is supposed to trigger a string that was in the same bank (it was the next string in fact - seperated only by a single 0x00 delimeter [and still is] and started a dialogue about robots going around kidnapping people), but instead triggers one that is in fact located in another bank completely now. It triggers a string from bank 0x41, asset ID 01 (originally bank 0x14, asset ID 0x83) way, way off at 0x94004:


There's also the fact that whenever the save/load game screen is shown it gets corrupted with some of 'test screen' text that is normally never shown in the game:


I've even tried getting rid of every single byte of translated text and simply re-inserting the original japanese script (as raw hex bytes) as-is, in the new asset banks. I get the same result in this case, as well as a weird 'off by one string' error as shown here in the original, unaltered Japanese ROM:


... and here with the same data, but relocated to the new banks:


I'm starting to think that there may be some other logic to loading the script assets going on here. But I'm out of my depth when it comes to assembler.

I'm starting to tear my hair out with this now, actually.

elmer

  • Hero Member
  • *****
  • Posts: 2153
Re: Cyber Knight translation
« Reply #236 on: November 26, 2016, 04:00:25 AM »
I've even tried getting rid of every single byte of translated text and simply re-inserting the original japanese script (as raw hex bytes) as-is, in the new asset banks. I get the same result in this case, as well as a weird 'off by one string' error as shown here in the original, unaltered Japanese ROM:


... and here with the same data, but relocated to the new banks:


I'm starting to think that there may be some other logic to loading the script assets going on here. But I'm out of my depth when it comes to assembler.

I'm starting to tear my hair out with this now, actually.

This is the test to concentrate on for the moment ... insert all of the original Japanese text chunks (as binary blobs) into the new banks.

If you do that and get "off-by-one" errors like that, then I suspect that you could be constructing the new banks incorrectly.

Thinks to look at would be not putting in the beyond-the-last-chunk offset correctly (that's needed to calculate the length of a chunk), getting an off-by-one in the actual length of the text chunk (i.e. missing the last string, or the text-chunk-terminator).

The off-by-one of the text in those screens suggests that the game is looking for the strings correctly, but that it's missing one string in the count and so displaying stuff one string too soon.

That could easily be a missing terminator on the previous chunk, or the structure of the bank not pointing to the beginning of the chunk properly.


But then this second NPC is supposed to trigger a string that was in the same bank (it was the next string in fact - seperated only by a single 0x00 delimeter [and still is] and started a dialogue about robots going around kidnapping people), but instead triggers one that is in fact located in another bank completely now. It triggers a string from bank 0x41, asset ID 01 (originally bank 0x14, asset ID 0x83) way, way off at 0x94004:

Hold on ... ...  :-k

It could be as simple as a misunderstanding of the bank structure.

The game uses pairs of banks per 16KB block, starting at an even bank number ... so originally banks $0A+$0B, $0C+$0D, $0E+$0F, $14+$15.

So ... how come you've got a string in bank $41? Are you not putting things in 16KB blocks?

<EDIT>

Hmmm ... a quick look at my disassembly suggests that the code *should* handle data blocks on odd banks, but the game never does it, so I'd be worried about something in the code that I've not seen yet.
« Last Edit: November 26, 2016, 05:07:46 AM by elmer »

megatron-uk

  • Full Member
  • ***
  • Posts: 219
Re: Cyber Knight translation
« Reply #237 on: November 26, 2016, 11:29:01 AM »
I'm remapping to 8kb banks for all assets apart from the one originally located in bank 0x14, asset ID 0x83, which is ~10KByte in size, so spans two banks (16KB).

So, for example, I'll have assets in bank 0x49, then one in 0x49, then my 16kb bank starting at 0x4a, then the next 8kb bank is 0x4c. The asset table at 0x2939 is modified to point to the correct one - i.e. anything originally referencing 0x14 is modified to reference 0x4a. All offset pointers in the pointer table are set to 0x1, as there is only one asset in each bank now (in fact, the header of each asset table in each bank is as simple as <bank_id> 0x03 0x40... as it always only has one asset entry that immediately follows at offset +3).

The asset bank table used to look like this:
Code: [Select]
0002930: aa7a 6020 46c7 4cb0 c50e 0e0e 0e0e 0e0c  .z` F.L....
0002940: 0e0e 0000 0000 0000 0014 0a0a 0a0a 0a0c  ...........
0002950: 0c0c 0c0c 0c0c 0c0c 0c0c 0103 0507 090b  ...........
0002960: 170d 0f00 0000 0000 0000 8301 0305 0709  ...........
0002970: 0103 0507 090b 0d0f 1113 1511 1111 1111  ...........

It now looks like this:
Code: [Select]
0002930: aa7a 6020 46c7 4cb0 c541 4243 4445 4647  .z` F.L..AB
0002940: 4849 0000 0000 0000 004a 4c4d 4e4f 5051  HI.......JL
0002950: 5253 5455 5657 5859 5a5b 0101 0101 0101  RSTUVWXYZ[.
0002960: 0101 0100 0000 0000 0000 0101 0101 0101  ...........
0002970: 0101 0101 0101 0101 0101 0111 1111 1111  ...........
« Last Edit: November 26, 2016, 11:32:21 AM by megatron-uk »

megatron-uk

  • Full Member
  • ***
  • Posts: 219
Re: Cyber Knight translation
« Reply #238 on: November 26, 2016, 11:36:19 AM »
I could go to a 16kb pair of banks per asset scheme, though that would take me straight to a 1MB ROM, as there are 27 individual assets that need to go in the new banks, using 16kb for each that's 54 x 8kb, rounding up to 64 to make it 512KBytes.

Potentially, that might be relatively easy to try.

EDIT: Nope, using 2 banks per asset and keeping it aligned on even bank numbers didn't make a difference.
« Last Edit: November 26, 2016, 11:44:45 AM by megatron-uk »

megatron-uk

  • Full Member
  • ***
  • Posts: 219
Re: Cyber Knight translation
« Reply #239 on: November 27, 2016, 04:24:53 AM »
Okay, some good news, some bad news.

The good news is that I've figured out what is causing the 'jump to other asset string' behaviour that I've been seeing. Here's that second NPC that you talk to, he's the one who expressed shock at your 'robot costume'. Remember it was showing this dialogue, in error:


Here's what he should be saying (and now does!):


The bad news come from the realisation that the dialogue box display codes now appear to be game-area dependent. So I had changed the dialogue box from his Japanese text:

<1a><22>よくできた ぬいぐるみだなお。<pause><1E> え?<pause><1E> ほんもの?<wait>

Where the control codes "1a" "22" generated a 25x1 text box in the middle of the screen.

To my desired english translation:
<1a><70>Man: This robot really\nlooks real!<pause><1E>\nEh?<pause><1E> It IS real!!!<wait>

Where "1a" "70" displayed a 26x3 text box at the top of the screen. Only in this case, it didn't, it caused the game to jump to another bank and load an asset from the ship-based dialogue (i.e. the bit about a lava planet).

I just tried change the dialogue box codes to "1a" "1e" (24x2 box, top centred), thus:

<1a><1e>Man: This robot really\nlooks real!<pause><1E>\nEh?<pause><1E> It IS real!!!<wait>

...and that works, as seen in the image above.

So, the bad news is that I'll need to go through each dialogue box display, in turn, and work out which ones actually work in the overworld, in town, in the ship, during cinemas, etc and change the english translation to suit. What a goddamn pain.

It isn't the problem affecting the savescreen, that seems to be something else. At least this solves one problem, though generates quite a bit of work to go back through all the asset data and check if I'm using dialogue box codes that don't work in that particular section (and bearing in mind I've not played through the bulk of the game, a lot of that I'm simply not going to know, yet).