Author Topic: Xanadu II Translation Development Blog  (Read 39402 times)

SamIAm

  • Hero Member
  • *****
  • Posts: 1835
Re: Xanadu II Translation Development Blog
« Reply #195 on: March 16, 2016, 11:09:02 AM »
Wonderful!

When I load up Mednafen on my laptop and do some testing there, the original colors are never a problem. If you're using real hardware with a composite video connection, the blues are softened and blended somewhat, and again, it's not a big deal. But if you're using an RGB modded system and a CRT, the background pattern is harsh. It kind of reminds me of old TV static. The brightest color in the blue palette especially can really make some things hard to look at depending on what letters fall where.

This will definitely be an improvement. I can't wait to try it! Hooray, elmer!

Johnpv

  • Sr. Member
  • ****
  • Posts: 257
Re: Xanadu II Translation Development Blog
« Reply #196 on: March 16, 2016, 12:15:11 PM »
I REALLY dig the high contrast version.  To me it just pops so much more.

seieienbu

  • Hero Member
  • *****
  • Posts: 1986
Re: Xanadu II Translation Development Blog
« Reply #197 on: March 16, 2016, 12:33:19 PM »
Both look fine from here but if one looks better on a CRT then by all means go with that one!
Current want list:  Bomberman 93

Black Tiger

  • Hero Member
  • *****
  • Posts: 11242
Re: Xanadu II Translation Development Blog
« Reply #198 on: March 16, 2016, 02:10:29 PM »
Here's a version that balances the color of the original and is darker overall, while preserving the original artwork:






I didn't adjust the text and drop shadow colors, so it doesn't show how readable it could be. Using text colored similar to that high contrast pic should be readable using various video connections.


EDIT: here's the balanced color version shifted down a shade darker:



« Last Edit: March 16, 2016, 02:24:27 PM by Black Tiger »
http://www.superpcenginegrafx.net/forum

Active and drama free PC Engine forum

elmer

  • Hero Member
  • *****
  • Posts: 2153
Re: Xanadu II Translation Development Blog
« Reply #199 on: March 16, 2016, 02:53:49 PM »
I didn't actually change the text colors at all ... just the background colors.

And the thing is, I don't get full freedom over what color is used for what.

The drop-shadow has to be color 8, because that's the only one that's a dark background color in all the different palettes (in-game, pause-menu, and Weapon Shop), and the code to draw the drop-shadow has to use a consistent color.

So, for the in-game palette, all I did was to change ...

          G R B
color 8 - 1 1 2 - background pattern color 1 (also drop-shadow)
color a - 3 0 4 - background pattern color 4 (highlight)
color c - 2 1 3 - background pattern color 3
color e - 1 1 1 - background pattern color 2


to ...

          G R B
color 8 - 0 0 1 - background pattern color 1 (also drop-shadow)
color a - 2 0 3 - background pattern color 4 (highlight)
color c - 1 0 2 - background pattern color 3
color e - 0 0 2 - background pattern color 2


I'm open to other color suggestions, but I'm pretty limited on how much I can change.

SamIAm

  • Hero Member
  • *****
  • Posts: 1835
Re: Xanadu II Translation Development Blog
« Reply #200 on: March 16, 2016, 03:25:43 PM »
Quote
So, for the in-game palette, all I did was to change ...

What you've done seems very reasonable. I'm sure it will look good.

I'm just happy that this can work at all. Thanks so much for looking into it! :D

This is seriously going to be one of those things where once you try it, you won't be able to go back.

Xanadu 1 looks great in RGB, but I'm starting to get the feeling that Xanadu 2 might be better overall in composite, at least on a CRT. I think the artists made a lot of decisions both to accommodate and to take advantage of the PCE's composite signal quirks. I haven't honestly seen that much of it in RGB, though, so I'll wait to pass full judgement.

Thanks for the screenshots, Black Tiger. :)

elmer

  • Hero Member
  • *****
  • Posts: 2153
Re: Xanadu II Translation Development Blog
« Reply #201 on: May 05, 2016, 08:18:19 AM »
There's not been anything interesting to "blog" about on the Xanadu translations for a while, but SamIAm finally reported a problem that needed to be fixed.

The problem was in Xanadu 2 when you get a message box that prompts you to make a choice ... the highlighting was totally messed up.

Figuring out what was going on showed that Falcom are doing something really quite cunning to get those options dialogs to work.


Here's what was going wrong ...




The game wasn't crashing, so it obviously wasn't anything going too horribly wrong ... but WTF???

This is the piece of script that SamIAm has translated into English ...

.scriptA6BA:
  _enable_8x12_font()
  _set_pen_then_call_then_eol( orange, .scriptB4BE )
  _disable_8x12_font()
  [Lord Areios, I can send you to anywhere from the Prologue to Chapter Three.]
  _wait_for_keypress_then_clear()

  [What will you do?]*
  _choose_option_then_clear( $01, $01 )
  [ Continue]
  _next_option()
  [ Never mind]
  _end_of_options()
  _conditional_jump( $c9, $f0, $02, $9c63, .scriptA8BB )
  _conditional_jump( $c9, $f0, $01, $9c63, .scriptA72C )



Well, that looks simple, and there's nothing obviously wrong with it, so it was time to actually take a look at the code that process those options boxes.

That's something that I'd been hoping that I wouldn't ever need to do, because I just figured out that the code was doing some smart stuff behind-the-scenes to remember where each string in the options was, and to just redraw each string when the highlight changes.

Once I found the code (which just took setting a VRAM-write breakpoint in Mednafen), it looked a bit simpler that I expected.

But it was quickly obvious that is was using some hard-coded coordinates, and that it was yet-another thing that my shift to using a VWF had broken.  #-o


Changing the coordinates from the original 4-pixel increments to 1-pixel increments resulted in ...




Definitely better ... but WTF is going on with all of those little dots?

Looking deeper into the code, it turns out that Falcom aren't redrawing the text at all to change the highlighted option, they are just doing a bunch of simple writes to VRAM.

Now the entire message box is made up of a bunch of 32x64 pixel sprites, and they call these routines to change 2 sprite-lines at-a-time of the whole 224x14-pixel block of a text line.

Y = vram-addr-lo
A = vram-addr-hi

set_hilite_2lines: tya
                   clc
                   adc  #$10
                   sta  self_modify+1
                   sei
                   st0  #VDC_MAWR
                   sty  video_data_l
                   sta  video_data_h
                   st0  #VDC_MARR
self_modify:       st1  #$nn
                   sta  video_data_h
                   cli
                   st0  #VDC_DATA
                   cla
                   tsb  video_data_l
                   tsb  video_data_h
                   tsb  video_data_l
                   tsb  video_data_h
                   rts


Y = vram-addr-lo
A = vram-addr-hi

set_normal_2lines: lda  $3e
                   sei
                   st0  #VDC_MAWR
                   sty  video_data_l
                   sta  video_data_h
                   cli
                   st0  #VDC_DATA
                   st1  #$00
                   st2  #$00
                   st1  #$00
                   st2  #$00
                   tya
                   clc
                   adc  #$10
                   tay
                   rts



Looking at that left me totally shocked ... I couldn't see how-on-Earth that code could change the text from cyan to white, and then change it back again?

So I had to seriously think about what that code was doing.

When highlighting an option, it's doing a really neat trick with the VRAM and the TSB instruction to copy the 2nd bitplane of the sprite data into the 1st bitplane of the sprite data.


Now saying that is one thing ... but it makes no real sense until you actually look at the colors that everything is drawn in ...

Color: 6 -> 7 (0110 -> 0111)   Effect: ------   Usage: text cyan
Color: 7 -> 7 (0111 -> 0111)   Effect: hilite   Usage: text white
Color: 8 -> 8 (1000 -> 1000)   Effect: hilite   Usage: background pattern 1
Color: 9 -> 9 (1001 -> 1000)   Effect: -LOST-   Usage: box border lite color
Color: A -> B (1010 -> 1011)   Effect: ------   Usage: background pattern 2
Color: B -> B (1011 -> 1011)   Effect: hilite   Usage: background pattern 2
Color: C -> C (1100 -> 1100)   Effect: hilite   Usage: background pattern 3
Color: D -> D (1101 -> 1100)   Effect: -LOST-   Usage: box border dark color
Color: E -> F (1110 -> 1111)   Effect: ------   Usage: background pattern 4
Color: F -> F (1111 -> 1111)   Effect: hilite   Usage: background pattern 4


When you look at it that way, you can see that copying bit-1 to bit-0 changes the text from cyan to white, and it changes the background colors, too ... but since some of the background colors are duplicated in the palette, you don't actually see the background change on the screen.


When setting an option back to normal, it's just setting the 1st bitplane of the sprite data to zero.

Huh??? How can that work if it's so different to what it does to set the highlight in the first place???


Once again, it makes no real sense until you actually look at the colors that everything is drawn in ...

Color: 6 -> 6 (0110 -> 0110)   Effect: normal   Usage: text cyan
Color: 7 -> 6 (0111 -> 0110)   Effect: ------   Usage: text white
Color: 8 -> 8 (1000 -> 1000)   Effect: normal   Usage: background pattern 1
Color: 9 -> 8 (1001 -> 1000)   Effect: -LOST-   Usage: box border lite color
Color: A -> A (1010 -> 1010)   Effect: normal   Usage: background pattern 2
Color: B -> A (1011 -> 1010)   Effect: ------   Usage: background pattern 2
Color: C -> C (1100 -> 1100)   Effect: normal   Usage: background pattern 3
Color: D -> C (1101 -> 1100)   Effect: -LOST-   Usage: box border dark color
Color: E -> E (1110 -> 1110)   Effect: normal   Usage: background pattern 4
Color: F -> E (1111 -> 1110)   Effect: ------   Usage: background pattern 4


When you look at it that way, you can see that clearing bit-0 changes the text from white to cyan, and it changes the background colors, too ... but, again, since some of the background colors are duplicated in the palette, you don't actually see the background change on the screen.

Now that's really, really cunning!  8)

A clever organization of the color palette and the colors that are used in the message box allows Falcom to change the highlight in the options dialog without caring what the text actually says.

But wait ... why does that mean that those dots appear?

Well, that's because we changed the background colors to make them darker so that the text stands out more.

But I didn't realize that those "duplicate" colors needed to be changed, too, so I left them at their original colors, and that's what those dots are.  :oops:


Once I figured that out, I just set the "duplicate" colors in the palette to our new darker colors, and ...




The problem is fixed, but there's one more question ... if you look at the two color tables, then you can see that changing to hilite or a normal both change the colors that the border of the message box is drawn in.

So the question is, why don't they?

The screen is 256-pixels wide, and the message box is 248-pixels wide, and the code that's shown above changes the background in 16-pixel wide strips. That should guarantee that the right-hand-edge of the message box is overwritten, just like the left-hand-edge was in SamIAm's original report of the bug.

But in reality, the last screenshot shows that it doesn't get destroyed.

Well, it turns out that Falcom must have had the same problem, and that they came up with another cunning solution.

They shifted the entire message box graphics over by a few pixels in VRAM, and so the right-hand-edge of the visible message box is actually at the left-hand-edge of a mostly-blank and off-screen sprite.

That means that the highlighting code doesn't actually overwrite that sprite at all ... just everything right up to the edge of it.

Once more, that's a really cunning solution to the problem.

Those Falcom guys really deserve a few beers, I wonder if they celebrate Cinco De Mayo?  :wink:


Anyway, here's one last screenshot of the everything working properly ...



« Last Edit: May 05, 2016, 03:56:59 PM by elmer »

Black Tiger

  • Hero Member
  • *****
  • Posts: 11242
Re: Xanadu II Translation Development Blog
« Reply #202 on: May 05, 2016, 09:29:30 AM »
As much as it sucks that more language heavy games didn't make it over here bitd, I really am thankful that the LoX games didn't. Just so that things have played out the way they have and these guys are delivering a localization far beyond the quality of anything else at the time they came out.

Even if you gave me the choice back then, if I'd been informed of difference in quality, I'd have been happy to wait 20 years.

I'd of course still have had as much fun as I have with the Japanese versions in the meantime. :)
http://www.superpcenginegrafx.net/forum

Active and drama free PC Engine forum

elmer

  • Hero Member
  • *****
  • Posts: 2153
Re: Xanadu II Translation Development Blog
« Reply #203 on: May 09, 2016, 09:17:44 AM »
Latest update : I've started extracting the graphics that we need to change, and converting them into editable PNG files.







SamIAm

  • Hero Member
  • *****
  • Posts: 1835
Re: Xanadu II Translation Development Blog
« Reply #204 on: May 09, 2016, 06:33:19 PM »
Yay! Nice work!  :D

elmer

  • Hero Member
  • *****
  • Posts: 2153
Re: Xanadu II Translation Development Blog
« Reply #205 on: May 10, 2016, 06:08:55 PM »
And here are the first of the English graphics for Xanadu 1 actually working in the game ...







I'm sure that things will get tweaked a bit more before we're ready to release everything, but I think that it's looking pretty decent.

Figuring out how to fix the centering of the options on the Main Menu took almost as long figuring out which of the 5000+ data chunks actually contained the graphics themselves!  :roll:

<EDIT>

I couldn't resist a bit more tweaking!
« Last Edit: May 11, 2016, 08:54:22 AM by elmer »

SignOfZeta

  • Hero Member
  • *****
  • Posts: 8497
Re: Xanadu II Translation Development Blog
« Reply #206 on: May 10, 2016, 06:42:57 PM »
Man this is AWESOME!!!

Phase

  • Sr. Member
  • ****
  • Posts: 356
Re: Xanadu II Translation Development Blog
« Reply #207 on: May 10, 2016, 08:30:24 PM »
Looking good, can't wait to play these.  8)

Johnpv

  • Sr. Member
  • ****
  • Posts: 257
Re: Xanadu II Translation Development Blog
« Reply #208 on: May 10, 2016, 11:25:18 PM »
Looking great!

LentFilms

  • Jr. Member
  • **
  • Posts: 58
Re: Xanadu II Translation Development Blog
« Reply #209 on: May 11, 2016, 01:40:45 AM »
Really amazing to see all those graphics in sexy English! Keep up the awesome work guys!