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

Author Topic: Castlevania II (Simon's Quest) - Multilingual enhancement  (Read 417513 times)

M-Tee

  • Hero Member
  • *****
  • Posts: 595
  • One pixel at a timeā€¦
    • View Profile
    • M-Tee Retro Graphics
Re: Castlevania II (Simon's Quest) - Multilingual enhancement
« Reply #760 on: December 30, 2013, 02:42:16 am »
Interesting program you have there. It can't happen to simply analyze an image and provide how many unique 8x8 pixel tiles there are in it, could it? If so, that could be very helpful for me in other projects.

As for the map editing, I'll let Vanya take a stab at it. I would have possibly seen what type of image I could produce under the restrictions, but having a program convert for me isn't the type of work I'm looking for. (Although, there's certainly nothing wrong with it when the results look that good.)

Bisqwit

  • Sr. Member
  • ****
  • Posts: 369
  • Polite, but politically incorrect.
    • View Profile
    • http://iki.fi/bisqwit/
Re: Castlevania II (Simon's Quest) - Multilingual enhancement
« Reply #761 on: December 30, 2013, 03:01:16 am »
Interesting program you have there. It can't happen to simply analyze an image and provide how many unique 8x8 pixel tiles there are in it, could it? If so, that could be very helpful for me in other projects.

It's actually a set of programs. The first program decides the best possible palette (i.e. eight 3-color palettes) using a genetic algorithm, and it also tries to generate a given number of 8x16 sprites that would improve the quality of the picture. Aside from the sprites, the only "tileization" it does is to assign each 16x16 square of the picture a particular palette out of those four that it generated, and quantize the square using that palette with dithering. It does not care how many distinct 8x8 tiles there end up being. The palette algorithm is aware of the dithering as well as the display gamma, and tries to choose palettes that best present the original picture when dithering is used. I.e. it doesn't worry about not having a certain tone in the palette if the tone can be nearly achieved by mixing two existing entries in that palette.
The next program in the chain then takes a slice from the first program's outcome (such as scanlines 0-79), divides the slice into 8x8 tiles, and keeps reducing the set of distinct tiles until a required maximum is met. After it reaches the limit, it writes its tile indices into a text file and the bitmaps in binary format (CHR data) into another file. A third program reads the data generated by the second program(s), and writes the the tile indices & attributes (nametables) into a file that can be inserted into a ROM. It also converts the sprite data and palettes from the first program's output into data that can be written directly into the ROM, without any reductions. These binary files generated by programs two and three are then inserted into the ROM either through ca65's .incbin directive, or by the insertor directly.

You can find the source code of one old version of this toolchain in ppu_read_buffer: http://bisqwit.iki.fi/src/nes_tests/ppu_read_buffer.zip
« Last Edit: December 30, 2013, 03:14:59 am by Bisqwit »

NecrotizingFasciitis

  • Jr. Member
  • **
  • Posts: 7
    • View Profile
Re: Castlevania II (Simon's Quest) - Multilingual enhancement
« Reply #762 on: December 30, 2013, 04:40:26 pm »
Are you, like, dead set against using proper pixel graphics? I dunno, even your properly displayed example looks pretty bad to me.

Here's 2 tiles of forest:


*shrugs*

Bisqwit

  • Sr. Member
  • ****
  • Posts: 369
  • Polite, but politically incorrect.
    • View Profile
    • http://iki.fi/bisqwit/
Re: Castlevania II (Simon's Quest) - Multilingual enhancement
« Reply #763 on: December 31, 2013, 05:16:23 am »
Are you, like, dead set against using proper pixel graphics? I dunno, even your properly displayed example looks pretty bad to me.
Yes.

What is the properly displayed example you refer to? This?



Because I think it's pretty good.

MechanicalPen

  • Jr. Member
  • **
  • Posts: 8
    • View Profile
Re: Castlevania II (Simon's Quest) - Multilingual enhancement
« Reply #764 on: January 13, 2014, 09:20:23 pm »
I edited the map to see if reusing tiles manually would help your programs output (for example: there's only four water tiles now, not counting shorelines). I'm curious to see if this improves the quality of the resulting CHR-RAM version.


Bisqwit

  • Sr. Member
  • ****
  • Posts: 369
  • Polite, but politically incorrect.
    • View Profile
    • http://iki.fi/bisqwit/
Re: Castlevania II (Simon's Quest) - Multilingual enhancement
« Reply #765 on: January 13, 2014, 11:16:47 pm »
I edited the map to see if reusing tiles manually would help your programs output (for example: there's only four water tiles now, not counting shorelines). I'm curious to see if this improves the quality of the resulting CHR-RAM version.


Thank you for your effort.
The only change I can see in your image is that you used the same little line for all the waves in the sea. Additionally, you used BRPXQZME's edge-resized version which I do not want to use.

However, there are two problems with the waves change:
- Unless the waves are all aligned in the same 8x8 global grid of the image, it is no benefit at all. All the differently aligned waves require different tiles.
- The waves seem to be currently removed for the CHR-RAM version in any case...

Here is the outcome from your picture for the CHR-RAM version. For some merit, at least the mansion in the lower right corner of the map is now better detailed than it was before. But this is a very miniscule improvement.

Left: Screen split at 144 (as before). Right: Screen split at 128. (More tiles for top, fewer tiles for bottom.)

« Last Edit: January 13, 2014, 11:27:56 pm by Bisqwit »

MechanicalPen

  • Jr. Member
  • **
  • Posts: 8
    • View Profile
Re: Castlevania II (Simon's Quest) - Multilingual enhancement
« Reply #766 on: January 14, 2014, 01:42:07 pm »
Thank you for your effort.
The only change I can see in your image is that you used the same little line for all the waves in the sea. Additionally, you used BRPXQZME's edge-resized version which I do not want to use.

However, there are two problems with the waves change:
- Unless the waves are all aligned in the same 8x8 global grid of the image, it is no benefit at all. All the differently aligned waves require different tiles.
- The waves seem to be currently removed for the CHR-RAM version in any case...

Here is the outcome from your picture for the CHR-RAM version. For some merit, at least the mansion in the lower right corner of the map is now better detailed than it was before. But this is a very miniscule improvement.

Left: Screen split at 144 (as before). Right: Screen split at 128. (More tiles for top, fewer tiles for bottom.)


I did align the waves in 8x8 tiles, to my knowledge. I also duplicated a bridge, used Bodley Mansion tiles to assemble Laruba Mansion, reused a town, bumped the Lauber Mansion up 4 pixels to lie inside 8x8 tiles, edited the shoreline to not cross 8x8 boundaries where it was easy, and reused parchment boarder tiles whenever possible.

The fact that you didn't notice most of these changes is a good thing; it means my changes were subtle enough. Sadly they did not help the quality much. I'd be willing to give it another shot; common tree and mountain tiles will go a long way towards reducing the tile count, but the shoreline may need to be completely redone.

Could you explain what you meant by 8x8 global grid? I cut the map image into 8x8 pieces and edited a few of these pieces so they could be used in multiple places. If that is not a global grid you'll have to explain how I can divide up the map for editing.

Bisqwit

  • Sr. Member
  • ****
  • Posts: 369
  • Polite, but politically incorrect.
    • View Profile
    • http://iki.fi/bisqwit/
Re: Castlevania II (Simon's Quest) - Multilingual enhancement
« Reply #767 on: January 14, 2014, 02:42:49 pm »
Could you explain what you meant by 8x8 global grid? I cut the map image into 8x8 pieces and edited a few of these pieces so they could be used in multiple places. If that is not a global grid you'll have to explain how I can divide up the map for editing.
Thank you for your reply. I think I spoke in haste about the grid. You are probably right. It just appeared to me at first as if the waves were at random places and not aligned properly. So what you did was actually good. I really did not notice the changed mansion, bridge, and town. Very good.

However, I would still like to use the picture border as it were before: To keep a few pixels of margin to the left of the picture... Because of overscan and things. Let's see if I can do that by using the scrolling registers instead though.

Do note however, that the bottom and top parts of the picture (as explained in the "split" in my previous post) use a completely separate set of tiles. Therefore the merging of those two bridges brought no benefit at all, despite being well-intentioned.

MechanicalPen

  • Jr. Member
  • **
  • Posts: 8
    • View Profile
Re: Castlevania II (Simon's Quest) - Multilingual enhancement
« Reply #768 on: January 14, 2014, 05:38:09 pm »
Thank you for your reply. I think I spoke in haste about the grid. You are probably right. It just appeared to me at first as if the waves were at random places and not aligned properly. So what you did was actually good. I really did not notice the changed mansion, bridge, and town. Very good.

However, I would still like to use the picture border as it were before: To keep a few pixels of margin to the left of the picture... Because of overscan and things. Let's see if I can do that by using the scrolling registers instead though.

Do note however, that the bottom and top parts of the picture (as explained in the "split" in my previous post) use a completely separate set of tiles. Therefore the merging of those two bridges brought no benefit at all, despite being well-intentioned.

Cool. If you could tell me exactly where the split occurs, I'll try to optimize the picture as two sets instead of one. 144 horizontal?

Bisqwit

  • Sr. Member
  • ****
  • Posts: 369
  • Polite, but politically incorrect.
    • View Profile
    • http://iki.fi/bisqwit/
Re: Castlevania II (Simon's Quest) - Multilingual enhancement
« Reply #769 on: January 14, 2014, 09:51:32 pm »
I avoid using the terms "horizontal split" or "vertical split" because of their ambiguous nature.

The split occurs on screen scanline 144. Because the map picture is located on the 48th scanline of the screen,
at the screen scanline 144 there is the picture scanline number 96.

The top 96 scanlines of the picture belong into the first portion, and the rest at the bottom belong to the second portion.
The top part shares the tile number limitation with the game's logo, which takes the topmost 48 scanlines of the screen.
The bottom part shares the tile number limitation with the map screen's alphabet, which are never compromised of.

MechanicalPen

  • Jr. Member
  • **
  • Posts: 8
    • View Profile
Re: Castlevania II (Simon's Quest) - Multilingual enhancement
« Reply #770 on: January 15, 2014, 06:14:47 pm »
Here's a work in progress, to see if I am on the right track. Trees and mountains tiled, repeated another town. If this works out I'll combine some more tiles and see about switching over to the old map boarder.

« Last Edit: January 15, 2014, 07:36:35 pm by MechanicalPen »

Bisqwit

  • Sr. Member
  • ****
  • Posts: 369
  • Polite, but politically incorrect.
    • View Profile
    • http://iki.fi/bisqwit/
Re: Castlevania II (Simon's Quest) - Multilingual enhancement
« Reply #771 on: January 15, 2014, 09:06:02 pm »
Here's a work in progress, to see if I am on the right track. Trees and mountains tiled, repeated another town. If this works out I'll combine some more tiles and see about switching over to the old map boarder.

This is most definitely a step towards the right direction for the CHR-RAM version map. It is exactly what I was requesting earlier.


(Split is at scanline 144.)

Still needs a bit more at the top of the screen though... Maybe I should move the split up by 8 lines? 128 was too much, but maybe 136..?
Or maybe the game's logo should be simplified too?

Let's try 136. Hmm... (EDIT: On the right, a version made from the image in your edited post.)

How about 128, again? (EDIT: On the right, as above.)

120?

Yep, it's beginning to degrade the coastline in the bottom region now. One of these is starting to look like a proper compromise.
Awesome work, MechanicalPen!
« Last Edit: January 15, 2014, 09:39:46 pm by Bisqwit »

MechanicalPen

  • Jr. Member
  • **
  • Posts: 8
    • View Profile
Re: Castlevania II (Simon's Quest) - Multilingual enhancement
« Reply #772 on: January 15, 2014, 10:02:29 pm »
Hey look at that we got some waves back! I think I can save some more tiles in the upper marsh, and try to optimize the logo so it is (at least) legible. And try to get a consistent ground color. Which do you prefer, sand yellow or grass green?

Edit: Here's probably the last version of the map from me. If you need the logo optimized feel free to ask. (though I think the only savings you can get there is to remove the decorative leaves, and possibly reshape the 'u' so its bottom half can be reused for the 'o')
« Last Edit: January 15, 2014, 11:35:09 pm by MechanicalPen »

Bisqwit

  • Sr. Member
  • ****
  • Posts: 369
  • Polite, but politically incorrect.
    • View Profile
    • http://iki.fi/bisqwit/
Re: Castlevania II (Simon's Quest) - Multilingual enhancement
« Reply #773 on: January 16, 2014, 12:03:05 am »
Hey look at that we got some waves back! I think I can save some more tiles in the upper marsh, and try to optimize the logo so it is (at least) legible. And try to get a consistent ground color. Which do you prefer, sand yellow or grass green?

I don't think it matters much if there are both, since they are pretty much getting optimized into solid colors anyway. However, if you have to choose, sand yellow probably. (Or in terms of the palettized version, pink. Whatever color in the original becomes that color.)

But the coastline can be changed to save quite a few additional tiles.

In fact, the coastline already includes some such changes, which you see if you pay attention when comparing to the Japanese manual. I made those changes when I first created the CHR-ROM version, to assist in getting better boundaries between different palette regions in the image. I also placed the shore closer to the Belasco swamp to better reflect the geography of the actual game.

EDIT: I re-enabled dithering for CHR-RAM (using your latest picture) and look what happened!



I think I'm ready to call this a victory, despite the few remaining errors.
EDIT: Oh. I forgot that the image is still shifted +2 pixels wrong (+48, +0). Here's what happens when I put it back in intended coordinates, i.e. the same coordinates where the CHR-ROM version is (+50, +2)...

While the horizontal position can be worked around with scrolling registers, the vertical positioning cannot, because I want to keep a certain level of margin between the title, the map and the location name printed below the map.
« Last Edit: January 16, 2014, 12:25:36 am by Bisqwit »

MechanicalPen

  • Jr. Member
  • **
  • Posts: 8
    • View Profile
Re: Castlevania II (Simon's Quest) - Multilingual enhancement
« Reply #774 on: January 16, 2014, 01:04:44 pm »
Yeah, if you shift the image like that the tiles no longer repeat over the 8x8 blocks, which is going to increase the tiles used. Would shifting the map border down 2 pixels be acceptable? That way it's still aligned where you need it and none of the tiles are disturbed.

Edit: Like this.
« Last Edit: January 17, 2014, 06:14:20 pm by MechanicalPen »

ShadowOne333

  • Hero Member
  • *****
  • Posts: 1204
    • View Profile
Re: Castlevania II (Simon's Quest) - Multilingual enhancement
« Reply #775 on: January 29, 2014, 09:45:01 pm »
The option to enable or disable the added dialog does not work in the website.
I tried with both options and they both re-translate the game despite of my selection.

Also, can there be an option to include the fading palette for the day/night transitions but keeping the dialogue box like they were intended originally?
I want to play the game with as the text and in-game graphics intact but with all the bonus that were introduces.

Bisqwit

  • Sr. Member
  • ****
  • Posts: 369
  • Polite, but politically incorrect.
    • View Profile
    • http://iki.fi/bisqwit/
Re: Castlevania II (Simon's Quest) - Multilingual enhancement
« Reply #776 on: January 30, 2014, 07:04:59 am »
The option to enable or disable the added dialog does not work in the website.
I tried with both options and they both re-translate the game despite of my selection.

Sorry, but you have misunderstood the meaning of that option.
The optional "added dialog" option covers a few easter eggs and other parts of dialog that did not exist in the game originally, such as the ferryman delivering different dialog depending on which direction you sail.

There is no option for keeping the text of the commercial USA English release in the game, nor do I intend to provide such an option any time soon.

Also, can there be an option to include the fading palette for the day/night transitions but keeping the dialogue box like they were intended originally?

What do you mean by "keeping the dialogue box like they were intended originally"?
Do you mean keeping the USA English text, that strips the dialog devoid of meaning present in the original version i.e. Japanese?
I do not intend to provide such an option. The very purpose of the retranslation is to bring back the originally intended meaning.
« Last Edit: January 30, 2014, 07:17:59 am by Bisqwit »

ShadowOne333

  • Hero Member
  • *****
  • Posts: 1204
    • View Profile
Re: Castlevania II (Simon's Quest) - Multilingual enhancement
« Reply #777 on: January 30, 2014, 08:47:47 pm »
Sorry, but you have misunderstood the meaning of that option.
The optional "added dialog" option covers a few easter eggs and other parts of dialog that did not exist in the game originally, such as the ferryman delivering different dialog depending on which direction you sail.

There is no option for keeping the text of the commercial USA English release in the game, nor do I intend to provide such an option any time soon.

What do you mean by "keeping the dialogue box like they were intended originally"?
Do you mean keeping the USA English text, that strips the dialog devoid of meaning present in the original version i.e. Japanese?
I do not intend to provide such an option. The very purpose of the retranslation is to bring back the originally intended meaning.

Oh, I am sorry.

I was completely wrong with what I understood from this Hack.
I would like to see the original English game with the SRAM and the map features added, that would suffice for me, but though luck.
I am even struggling just to hack the Title Screen of Akumajou Densetsu and even changing some text, not even close to adding maps and such, so I have to take into consideration the amount of work and detail it takes to do a hack of your level.

Thanks for providing the community with an enhanced experience for such an old game!

Bisqwit

  • Sr. Member
  • ****
  • Posts: 369
  • Polite, but politically incorrect.
    • View Profile
    • http://iki.fi/bisqwit/
Re: Castlevania II (Simon's Quest) - Multilingual enhancement
« Reply #778 on: January 31, 2014, 09:01:04 pm »
Version 2.9.8.9 has been released. Changes:
-- The map in the CHR-RAM version no longer looks ugly. Thanks MechanicalPen for the great help!

I also did plenty of internal changes to prepare for the increase of available translation languages, which may have caused some new bugs.
As always, please report here any oddities you find so they can get fixed!

MechanicalPen

  • Jr. Member
  • **
  • Posts: 8
    • View Profile
Re: Castlevania II (Simon's Quest) - Multilingual enhancement
« Reply #779 on: February 12, 2014, 07:19:15 pm »
Got around to trying this patch out and I found a bug. On my first game over with the newest version it stated that "Number of Continues Used" was 37. Clearly that is not correct.

I was using the cv2eng-2_9_8_9-ntsc-stm10mwfmFrup4-ips version, if it helps.