Castlevania II (Simon's Quest) - Multilingual enhancement

Started by Bisqwit, December 19, 2012, 01:38:36 PM

Previous topic - Next topic

Vanya

Quote from: Bisqwit on February 21, 2013, 01:10:43 PM
One thing that I could consider, though, is to add an escape button to the password entry screen. It has been in the designs (thanks to Bob Forgan) for quite some time, but I have not gotten around to doing it.

OMG! YES! PLEASE DO!

Bisqwit

You can now possess version 2.3.1.

Changes:
-- The limit of carried hearts is now increased from 256. Find out what's the new limit!
-- The cursor on the password entry screen is now a lot more responsive. It no longer limits the input to once per every 8 frames.
-- The password entry screen can now be exited.
-- You also now get to fix your typo in a password a bit faster after the error nag.

Making it possible to exit the password entry screen involved surprisingly much work. In fact, it took me over 8 hours to write. To make it happen, I had to rewrite the PPU whole-screen graphics transfer mechanism, and the associated compression method, in order to fit another screenful of data in PRG-ROM bank 4. And I had to split the decompressor (123 bytes without split) in two pieces (89 and 42 bytes), because the largest contiguous free block in the common ROM bank was not large enough, even with my dynamic linker that is a standard part of the translation tool suite. There's just a lot of code that wants to be in the common ROM bank, and I have to always consider the most crowded option (which happens to be VRAM + NTSC + MMC3 + all toys and trinkets). And NTSC and PAL have different ROM addresses, but some of the modules still must be placed in the same address in both versions, because either they are allergic to page-crossings, or I'm stingy with adding new files... It gets complicated.

In comparison, making the password screen cursor slicker to handle took about 10 minutes.

The PPU whole-screen graphics transfer mechanism is used in the ending, in screen blanks, in the title screen, and in the password screens, so report to me if you notice any new oddities in any of these. In addition, the decompressor is and has been used in all the additional screens that I have added (credits, map, SRAM-save).

Hit the "END" label to exit the password screen. It brings up a menu from which you can select whether you want to continue trying to input a password, or if you want to exit to the main menu. I'm not much a graphics artist, so I did what I could: Some bricks and some snakes, again.

The compression format, basically RLE with tweaks, is documented below:
        ; LIT: Input byte c = 0..3F:
        ;        Put next c+0x01 bytes verbatim, except BACKWARDS
        ; END: Input byte c = 40:
        ;        End stream
        ; SEQ: Input byte c = 41..7F:
        ;        Read byte b, put byte b
        ;        Put next c-0x40 bytes increasing b by 1 before every write
        ; DBL: Input byte c = 80..9F:
        ;        Read byte b1
        ;        Read byte b2
        ;        Put b1, (c-0x7D) times; swap b2 and b1 after each iteration
        ; RUN: Input byte c = A0..FF:
        ;        Read byte b
        ;        Put b, (0x101-c) times
The target memory address is hardcoded as $2000. (Map etc. use other addresses as well.)

In versions 1.3.8 through 2.3.0, the compression format was similar, but with RUN indicated by 80..FF and DBL not being implemented. This decompressor weighed 92 bytes. These versions used this decompressor only for the new screens that I added, and the game's original method was used for the other screens I listed earlier.

What the game originally had was:
# Direct PPU data format (Konami's format):
#  First, 2 bytes PPU memory offset (little-endian)
#   $00-$7E = RLE: byte to be sent N times will follow. $00 is interpreted as $100.
#   $7F     = goto beginning (2 bytes PPU offset will follow)
#   $80-$FE = put next N bytes verbatim, where N = (this byte - $80).
#   $FF     = end of data
(For 106 bytes of code.)

EDIT: Just for fun, I tried out and compared a few compression methods using the actual data from this translation project.
The methods listed in the bottom of this table are from Bregalad's CompressionTools version 1.1. The others are Konami's format (original compressor and my compressor), and the version numbers stand for the compressors in specified Retranslation versions.
FILE#:          0       1       2       3       4       5       6       7       9       10      11      13      14      15
FILE:           blank   title   ending  passwd  passwd2 menu    crPalFI crNtaFI crNtaEN srPalFI srNtaFI srNtaEN mapPAL  mapNTA  TOTAL:
--------------- --------------------------------------------    ----------------------- ----------------------- --------------  ------
Uncompressed:   2048    2048    1024    2048    1024    1016    32      1024    1024    32      2048    2048    32      2048    17496
--------------- --------------------------------------------    ----------------------- ----------------------- --------------  ------
Konami:         40      -       532     -       -       -       -       -       -       -       -       -       -       -       -
Konami+improve: 17      799     532     1524    706     546     -       -       -       -       -       -       -       -       -
--------------- --------------------------------------------    ----------------------- ----------------------- --------------  ------
2.3.0:          65      700     472     1491    613     486     34      618     627     33      880     879     34      533     7465
2.3.0+fix:      33      679     467     1487    613     484     34      616     625     33      880     879     34      525     7389
2.3.1:          45      377     467     1168    532     311     21      616     625     33      870     869     34      525     6493
--------------- --------------------------------------------    ----------------------- ----------------------- --------------  ------
RLE:            32      802     531     1524    705     545     33      635     644     32      920     919     33      1266    8621
BitpackRLE:     16      -       -       -       -       -       32      -       -       27      -       -       32      -       -   
EscapeRLE:      24      ERROR   547     1530    709     549     32      640     649     32      922     921     32      1266    -
BytePair:       1026    -       685     1275    662     632     23      681     690     31      1247    1247    31      1585    -
RecBytePair:    22      -       469     865     386     344     21      464     484     31      682     682     31      1294    -
TinyHuff:       520     949     610     1409    536     567     23      621     630     27      1155    1155    29      1476    9707 
TinyHuffFixed:  514     985     612     1449    575     577     18      682     691     24      1293    1292    26      1486    10224
Huffman:        -       1070    799     1450    717     734     67      721     731     53      1185    1184    56      1686    -
ROM_LZ77:       128     772     690     1148    542     619     32      648     669     34      1040    1036    34      923     8315 
ROM_7bit_LZ77   68      -       -       -       -       -       28      -       -       32      -       -       32      -       -   
RAM_LZ77:       34      554     557     728     410     395     26      555     572     34      704     703     34      808     6114
StaticDic:      145     -       524     943     500     428     24      550     565     32      799     799     32      1191    -
--------------- --------------------------------------------    ----------------------- ----------------------- --------------  ------
Deflate:        16      435     418     468     324     259     20      384     397     32      492     491     703     435     4523
--------------- --------------------------------------------    ----------------------- ----------------------- --------------  ------

(crPalFI & crNtaFI = credits palette & nametables for Finnish. Similarly sr stands for SRAM-save engine.)

Deflate is provided for curiosity only. Like RAM_LZ77, it is way too complex to be implemented on NES.


As such, it appears that my compressor is not too bad general-purpose compressor. From the CompressTools selection, there were quite a few codecs that failed to apply to one or more files, and as such they cannot be said to be general-purpose. And EscapeRLE got a "verify error" for file 1.
If you wish to perform independent tests, you can download the files I used for testing here.

Da_GPer

Quote from: Bisqwit on February 21, 2013, 01:10:43 PM
One thing that I could consider, though, is to add an escape button to the password entry screen. It has been in the designs (thanks to Bob Forgan) for quite some time, but I have not gotten around to doing it.

:D

TheWhipperSnapper

I would like to offer help in your project but I need to learn how to use debuggers and hex editors semi efficiently and hopefully learn how to do dissassembly and programming. I am glad to see that there are people working on Simon's Quest. Just to show you that I am not blowing smoke I will post some images on rough hacks I am working on currently. Unfortunately I am using a library computer so my ability to post replies is limited. I will check up regularly on this site via my android.

MathUser2929

Here's an idea. How about adding a level up message when the level goes up? Apparently there's unused text for it but it's never triggered in game:

http://www.vgmuseum.com/mrp/cv2/game-castlevaniasq.htm

Bisqwit

Quote from: MathUser2929 on March 01, 2013, 01:39:57 PM
Here's an idea. How about adding a level up message when the level goes up? Apparently there's unused text for it but it's never triggered in game: http://www.vgmuseum.com/mrp/cv2/game-castlevaniasq.htm

They indeed planned the messages for up to level 7 (level 6 is the maximum possible in the game), but in my opinion they made the right choice in not actually implementing the dialog box. Especially if the same dialogbox engine is used as for everything else. You don't want more letter-by-letter delays in the middle of your gameplay, given that the HP refilling also incurs a pixel by pixel delay.

MathUser2929

The later games have Level up simply appear on screen if you don't wanna bring up a whole dialogue box.

Bisqwit

Quote from: MathUser2929 on March 01, 2013, 03:53:08 PMThe later games have Level up simply appear on screen if you don't wanna bring up a whole dialogue box.
Unfortunately that is not possible on NES, due to its lack of layers.
The text could be implemented with sprites instead, but there's no room in the tilemaps for ~16 new 8x8 tiles (eight 8x16 sprites) in every possible scene that monsters can appear in.

TheWhipperSnapper

Is there a way to change the scrolling so that when you go up/down the stairs you can actually go into another screen. I had a code like that somewhere but I lost it and it was too gltichy. Also is there a way to fix the knock back gravity and jump descent? As promised my proof of work







I have a pic of the castle alter but I am only gonna submit that upon request (spoilers).
The hacks are slight modifications of redacted and moody I think. I basically did a lot of editing the platforms and enemy placement to make it more challenging but it's still not where I wish it was at. Also a FCUEX win was used as well as CursEd. My wish is to incorporate some of the Dr. Jeckyll and Mr. Hyde graphics as they are in the wrong game. Other than that I want to learn more about making codes that have no glitches or bugs and make a superb hack.

Bisqwit

Quote from: TheWhipperSnapper on March 02, 2013, 10:55:56 AMIs there a way to change the scrolling so that when you go up/down the stairs you can actually go into another screen.

You mean for romhack purposes, to make it possible for some stairs to work like they do in Castlevania 1, such as in its first scene where you encounter the mermen?
Sure, but it would involve quite a bit of research. Most significantly, Simon's Quest can only do scene transitions at the left & right edges of the screen. And at doors. This is probably also codified into the level data format.
There is no need for this research in the Retranslation patch, so you should not expect it from me.


QuoteAlso is there a way to fix the knock back gravity and jump descent?

What do you mean by "fix"? These things are characteristic to how physics works in Simon's Quest. It was somewhat changed from Castlevania 1, i.e. now when you fall off an edge, you don't immediately plummet at terminal velocity, but accelerate the same way as when you jump. As far as I know, the knock-back also obeys the same gravity rules. It is therefore consistent in all situations.


QuoteI basically did a lot of editing the platforms and enemy placement

Heh. I still haven't figured out the platform/levelmap data. I only recently understood the enemy/object tables.


Now technically, your post was in a wrong thread. None of what you wrote concerned my retranslation patch.

TheWhipperSnapper

Yeah, sorry  post  to the wrong thread. I played your translation and I was impressed with
the work you did on the map. Considering what you've done, it should be possible to hack the game extensively. In any case how can I help?

Pikachumanson

Unless you know 6502 real well I don't think you'll be of any use to Bisquit.

granz

Wow. This hack has certainly grown quite a bit. I especially like the new SRAM feature. :thumbsup:
I'm no longer active on RHDN, but I keep coming back to troll, whee!

Bisqwit

Thanks.
I just released version 2.3.2. This one has just a few minor stylistic fixes.
For instance I reintroduced the "YOUR" font hack (from the original NAR release) for the NTSC password screen. It no longer looks ugly. I also removed the irregular shadowing from the status screen colon character that I pondered aloud here a few posts earlier, and fixed a bug in the password input slickness from the previous release.

MathUser2929

You should work the max heart increase into a patch soon.

Bisqwit


PhyChris

I just had to post to say thank you on this excellent work on my favorite Castlevania game! keep it up,

Rhetorical

Been waiting 20+ years to play through this, and your patch was enough to get it out of my backlog.  The map and improved translations were a big help in figuring this game out.  Are you still making additions and updates to the patch?  I found a few spelling and grammar errors if you are still making changes.  Like in the 12 day ending I got, it says COES where I believe it should say COMES.  Also in English using "gift" as a verb is awkward and uncommon.  Some minor things like that.

The kneeling on the cliff with the red crystal was something I never would have figured out, but it got spoiled for me a few years ago and I remembered it when I hit the dead end.  Maybe change the relevant clue to "Kneeling in prayer at Debra's Cliff with the red crystall will blah blah blah" if you want a little more clarity.  And maybe a "If you show the ferryman pieces of Dracula, he will help you on your quest."  Some of the stuff is really obscure, I probably could have done the trial-and-error thing when I was 10, but gaming has come a long way since then!

Thanks for the great patch, really enjoyed playing through this, and I've completed almost every home console Castlevania release now as a result.

Bisqwit

I have slated the fix for "COES" for the next release. Thank you for that. If you have more -- typos or odd wordings -- I would appreciate receiving more error reports.

Using the word "gift"as a verb may be rare, but it is found in Merriam-Webster dictionary, so I used it. Other users of this verb include the popular website Reddit, which says e.g. "A redditor has gifted reddit gold to xx for this comment".

The Japanese version of this game has a lot of odd language, and the English version could in fact use a lot more. But I am not good at ye olde english, so in using arhaic expressions I went by a relatively tempered or conservative route.

Quote from: Rhetorical on March 06, 2013, 11:33:59 PMMaybe change the relevant clue to "Kneeling in prayer at Debra's Cliff with the red crystall will blah blah blah" if you want a little more clarity.
The current version of string 36 (clue 10 @ Brahm's mansion) is "Press a ruby against the Deborah cliff, kneel, and wait for a whirlwind.", which is both an accurate translation of the original text and very clear explanation of what you are expected to do.
(The original game does use the term "red crystal" rather than "ruby", but I added the gemstone meanings to make the traders' lines a bit more interesting, and used them consistently.)

QuoteAnd maybe a "If you show the ferryman pieces of Dracula, he will help you on your quest."  Some of the stuff is really obscure, I probably could have done the trial-and-error thing when I was 10, but gaming has come a long way since then!
The ferryman thing admittedly has a touch of Nintendo-hardness to it, but all the pieces to the puzzle are there.  I can see what the original authors of the game were thinking, and I do not see a reason to compromise my translations here. I did add him a special response if you happen to act upon the townsman's tip in Jova.

Rhetorical

1. I'll play through again getting the good ending and see if I find anything.  I'll take some notes this time as I go.

2. Any time I've heard it used it would be like "gift TO you" or "gifted to him/her" when used as a verb, instead of "gift you" if that makes sense.  The "gift" thing kind of came across as engrish to me, but its not terribly out of place or anything among the verbose Olde English that is thrown around.  "To you, I gift this silk bag" would fit how it is used when I've heard it, but I'm no expert on Ye Olde English to be sure.

3. Also, I wasn't clear about the whirlwind in my post.  YOUR translation of the red ruby clue would certainly have showed me what to do.  But the original would not have.  Sorry about that, yours is a welcome and very clear clue.  My actual thought was maybe to add a little flavor to make it fit the setting a little more.  Not for clarity on what to do, your clue covers that, but an explanation of why it happens.  Probably too much to ask from a single dialogue box anyway.

4. I think my confusion about the heart thing is that you have to use it from the correct side, and there isn't an indication that he's taking you some place because its the heart.  Probably minor nitpicks, your changes make the game a LOT more playable than the original English translation.