Castlevania II (Simon's Quest) - Multilingual enhancement

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

Previous topic - Next topic

Bisqwit

Quote from: cralso on July 25, 2020, 06:31:11 PMHi Bisqwit, I'm glad know now we have this in spanish, however I download the patch in spanish and is some other languague, not spanish :S

Maybe something is wrong with the download links?

Sorry about that! I had forgotten to update the backend when this language was added. Try re-downloading now (using the form).

raven2061

Quote from: ifightdragons on July 25, 2020, 05:55:09 PM
That was most likely me. I tried downloading again, but now the ROM simply goes black after trying to start a game from the title screen.
Worked fine on the previous iteration I downloaded a few hours ago.

Confirm. Retroarch + FCEUmm, black screen after "Game start Player 3". The previous patch works correctly. NTSC, MMC4 and all options "Yes".
Rom - Castlevania II - Simon's Quest (U) [!]
CRC32: A9C2C503
MD5: 1B827C602C904D8C846499C9F54B93E0

ifightdragons

Quote from: Bisqwit on July 25, 2020, 06:05:36 PM
Unable to reproduce this observation. Make sure you do not have cheats active.

I use FCEUX to test ROMs, and I promise that your latest build has suddenly rendered it impossible to go past the title screen.
No cheats activated, using standard No-Intro version.

Bisqwit

Thanks for the reports. I think it's because I had forgotten to install newly added binary files in the vending machine, so it generated incorrect patches. I have installed them now. Can you try again?

ifightdragons

Quote from: Bisqwit on July 26, 2020, 10:07:49 AM
Thanks for the reports. I think it's because I had forgotten to install newly added binary files in the vending machine, so it generated incorrect patches. I have installed them now. Can you try again?

Now it works again, like a charm  :thumbsup:

raven2061

Quote from: Bisqwit on July 26, 2020, 10:07:49 AM
Thanks for the reports. I think it's because I had forgotten to install newly added binary files in the vending machine, so it generated incorrect patches. I have installed them now. Can you try again?

Yes, its works. Thanks.

ShadowOne333

I've seen some people wanting the classic "What a horrible night to have a curse." line back with this hack.
It's fairly easy to add it back tbh.

Here's a quick tuto on how to add it:

1)
First off, you will need to create a new text file, copy-paste the following table and save it as "cv2.tbl"

FE=*
FF=/
00=
01=J
02=K
03=U
04=V
05=b
06=c
07=h
08=j
09=k
0A=p
0B=q
0C=r
0D=s
0E=v
0F=w
10=P
11=S
12=Y
13=C
14=H
15=f
16=o
17=n
18=t
19=R
1A=A
1B=M
1C=z
1D=v
1E=.
1F='
20=D
21=u
22=l
23=y
24=T
25=E
26=X
27=m
28=e
29=x
2A=G
2B=O
2C=B
2D=L
2E=I
2F=N
30=F
31=i
32=g
33=W
34=a
35=d
36=0
37=1
38=2
39=3
3A=4
3B=5
3C=6
3D=7
3E=8
3F=9
40=!
41=,
46=-
5D=?
62=:
63=..


2) Download FCEUX 2.2.3, open up your already patched CV2.
Go to Debug -> Hex Editor. Once the Hex editor opens up, go to View -> ROM File.
After that, inside the Hex Editor, go to File -> Load *.TBL File, then select the cv2.tbl that you just created.

3) Now, press Ctrl+F while in the Hex Editor. This will open up the search for the editor, type in "horrible night" (or just "horrible" or "night") until you get to the line you want to change. In this case, the new line is "And then descends a horrible night."
Take note of the asterisk before the "And" in the Hex Editor. It should appear like this:
*And then descends*a horrible night/
Take note of the address where the asterisk before "And" is located.
For version 2.11.0, the asterisk corresponds to Hex $FE. And it begins at 0x1F0E7 in the ROM.

4) With the address where the text begins, we then need to look for another place where the new text can be, since the original line won't fit in place of the new one. We need search for the pointer that loads said text, and make it point to our new one. But first, let us create the new text.
Around 0xF3D0 in the ROM, you should see a bunch of $FF bytes in succession. This is free space that we can use for our new text.
In there, simply click on the right table (where the characters are seen) in the Hex Editor, and type the following:
*What a horrible night*to have a curse./
REMEMBER THE EXACT LOCATION WHERE YOU PUT THE LINE!
I added it exactly at 0xF3D0.

5) That should be our new text, but we still need to change the pointer so the text loaded is now our added line.
Remember the location of the line we want to change (not the one we want to add)? At 0x1F0E7. We need to convert this to NES address to find the pointer for the precise line.
Given how the location where the text is located is loaded as bank 7 by the game, we strip the first character of the address (the 1 from 0x1F0E7), leaving us with $F0E7. Now, we substract 0x10 in Hex from $F0E7, giving us $F0D7.
Now we flip the bytes in pairs, leaving us with D7 F0. We do a Hex search for D7 F0, and this gives us a few results, but the one we want should be within the 0xCXXX range. For me, the exact location of the pointer is in 0xCB92 in the ROM.

6) Now, we need to change the pointer to instead point to where the line we just added is located at.
I added the line at 0xF3D0, but we need to convert the address to NES format. Address 0xF3D0 is located at bank 3 in the ROM, so the F3D0 is converted to B3D0 when the address is in a bank other than bank 7. Then we remove 0x10 from the address, and flip the bytes, giving us C0 B3.
Now type in C0 B3 at 0xCB92, and that should change the pointer to instead load the line we just added.


That's it!
I do this for my own build of CV2, since I like the original line quite a lot, and hopefully this helps others that want the line back as well.

Rodimus Primal

Quote from: ShadowOne333 on July 26, 2020, 05:02:21 PM
I've seen some people wanting the classic "What a horrible night to have a curse." line back with this hack.
It's fairly easy to add it back tbh.

Here's a quick tuto on how to add it:

1)
First off, you will need to create a new text file, copy-paste the following table and save it as "cv2.tbl"

FE=*
FF=/
00=
01=J
02=K
03=U
04=V
05=b
06=c
07=h
08=j
09=k
0A=p
0B=q
0C=r
0D=s
0E=v
0F=w
10=P
11=S
12=Y
13=C
14=H
15=f
16=o
17=n
18=t
19=R
1A=A
1B=M
1C=z
1D=v
1E=.
1F='
20=D
21=u
22=l
23=y
24=T
25=E
26=X
27=m
28=e
29=x
2A=G
2B=O
2C=B
2D=L
2E=I
2F=N
30=F
31=i
32=g
33=W
34=a
35=d
36=0
37=1
38=2
39=3
3A=4
3B=5
3C=6
3D=7
3E=8
3F=9
40=!
41=,
46=-
5D=?
62=:
63=..


2) Download FCEUX 2.2.3, open up your already patched CV2.
Go to Debug -> Hex Editor. Once the Hex editor opens up, go to View -> ROM File.
After that, inside the Hex Editor, go to File -> Load *.TBL File, then select the cv2.tbl that you just created.

3) Now, press Ctrl+F while in the Hex Editor. This will open up the search for the editor, type in "horrible night" (or just "horrible" or "night") until you get to the line you want to change. In this case, the new line is "And then descends a horrible night."
Take note of the asterisk before the "And" in the Hex Editor. It should appear like this:
*And then descends*a horrible night/
Take note of the address where the asterisk before "And" is located.
For version 2.11.0, the asterisk corresponds to Hex $FE. And it begins at 0x1F0E7 in the ROM.

4) With the address where the text begins, we then need to look for another place where the new text can be, since the original line won't fit in place of the new one. We need search for the pointer that loads said text, and make it point to our new one. But first, let us create the new text.
Around 0xF3D0 in the ROM, you should see a bunch of $FF bytes in succession. This is free space that we can use for our new text.
In there, simply click on the right table (where the characters are seen) in the Hex Editor, and type the following:
*What a horrible night*to have a curse./
REMEMBER THE EXACT LOCATION WHERE YOU PUT THE LINE!
I added it exactly at 0xF3D0.

5) That should be our new text, but we still need to change the pointer so the text loaded is now our added line.
Remember the location of the line we want to change (not the one we want to add)? At 0x1F0E7. We need to convert this to NES address to find the pointer for the precise line.
Given how the location where the text is located is loaded as bank 7 by the game, we strip the first character of the address (the 1 from 0x1F0E7), leaving us with $F0E7. Now, we substract 0x10 in Hex from $F0E7, giving us $F0D7.
Now we flip the bytes in pairs, leaving us with D7 F0. We do a Hex search for D7 F0, and this gives us a few results, but the one we want should be within the 0xCXXX range. For me, the exact location of the pointer is in 0xCB92 in the ROM.

6) Now, we need to change the pointer to instead point to where the line we just added is located at.
I added the line at 0xF3D0, but we need to convert the address to NES format. Address 0xF3D0 is located at bank 3 in the ROM, so the F3D0 is converted to B3D0 when the address is in a bank other than bank 7. Then we remove 0x10 from the address, and flip the bytes, giving us C0 B3.
Now type in C0 B3 at 0xCB92, and that should change the pointer to instead load the line we just added.


That's it!
I do this for my own build of CV2, since I like the original line quite a lot, and hopefully this helps others that want the line back as well.


THANK YOU! I'm going to have to do this myself. I prefer that line as well.

ifightdragons

Thanks, Shadow! Always wanted this to be part of the fantastic vending machine options, but finally I am able to change it myself :)

Bisqwit

#1109
Version 2.11.1 has been released.
https://bisqwit.iki.fi/cv2fin/

Bugfixes:
— Combination of Spanish credits + VRAM option was fixed. (Patch would overwrite some of the credits data with the VRAM engine.)
— Legacy day-night transition dialog box bug fix (2.11.0 regression). If you were standing near a merchant when a night falls, the night narration would appear as a merchant box.
— The "fix" to make SRAM confirm button be B, wasn't working. Fixed for real now (amended release).*

Changes:
— Internal changes: Improved substring compression.


*) Incidentally, this seems to add a new bug: If you enter the save menu while in vicinity of an NPC, and you exit the screen with the B button, you will get a dialog box immediately when exiting the save screen, before the screen has scrolled properly. The same bug has of course existed all the time, and even with the map screen. Exit the map screen holding B, and it will occur...

nosynose

While I could understand that some regard "what a horrible night to have a curse" as iconic or nostalgic or even amusing, that sentence is plainly wrong and misleading. Perhaps "such a curse to have the night" is a better compromise here?


storall

Is password screen broken?
cv2eng-2_11_1-ntsc-stm1mwfmFrup4-ips

Bisqwit

Quote from: storall on July 28, 2020, 08:00:46 AMIs password screen broken?
cv2eng-2_11_1-ntsc-stm1mwfmFrup4-ips

Confirmed. Thanks for the report.

storall

#1114
A small update to your CV2 disassembly project:


_data_C1E3
$81E3               .byte $81,$A2,$00,$4C,$2A,$DD


==>


_data_C1E3
$81E3               .byte $81
_code_C1E4
$81E4  A2 00:       ldx #$00
$81E6  4C 2A DD:    jmp ObjectLoadAutomaticSpriteNumber



About the 3-pillar jump, it fails to apply gravity for 1 frame when you do the jump-whip.


SimonExecuteCurrentAction2_Jumping_5_Falling
$89CD  A5 F5:       lda Input_NewJoyButtonsWork
$89CF  29 40:       and #$40
$89D1  F0 03:       beq UnknownContextCAD9_JoyButtons_80_A_pressed_Jump
$89D3  4C 2E 89:    jmp ---- ; $892E
;------------------------------------------
UnknownContextCAD9_JoyButtons_80_A_pressed_Jump
$89D6  AD 6C 03:    lda ObjectYSpeed



For Fall Floors Fix by @binarck, game sets $0390 = $05 when normally falling so I guess it's okay.



Private build fixes


arch nes.cpu
norom

banksize $4000
header $10



; ///////////////////////////////////////////



; Fall Floors fix  (@binarck)

bank 3 : org $86ea
jmp Fall_Floors_Fix



; ///////////////////////////////////////////



; Jump Wall fix

bank 3 : org $89cd
jsr Jump_Wall_Fix
bpl +
jmp $892e ; joypad action code
+ rts


warnpc $89d6


; ///////////////////////////////////////////


bank 3 : org $b9f0


Jump_Wall_Fix:
jsr $89d6

lda.b $f5 ; detect joypad B
asl
rts


; ------------------------------------------


Fall_Floors_Fix:
sta.w $0390 ; trigger falling collision detection
jmp $debd


warnpc $ba00


July 29, 2020, 02:36:38 PM - (Auto Merged - Double Posts are not allowed before 7 days.)

cv2eng-2_11_1-ntsc-stm1mwfmFrup4-ips = broken in-game save game
cv2eng-2_11_1-ntsc-stm10mwfmFrup4-ips = in-game save game okay

Bisqwit

Quote from: storall on July 29, 2020, 01:40:49 PM_code_C1E4
$81E4  A2 00:       ldx #$00
$81E6  4C 2A DD:    jmp ObjectLoadAutomaticSpriteNumber
Can you find where this code is getting invoked? The disassembler automatically generates code for it as long as it's getting referred to from somewhere.

Quote from: storall on July 29, 2020, 01:40:49 PMcv2eng-2_11_1-ntsc-stm1mwfmFrup4-ips = broken in-game save game
cv2eng-2_11_1-ntsc-stm10mwfmFrup4-ips = in-game save game okay
Thank you for the report. The difference between these two is the mapper number. I will check it out.

storall

Quote from: Bisqwit
Can you find where this code is getting invoked? The disassembler automatically generates code for it as long as it's getting referred to from somewhere.



$81BC  AD E3 81:    lda _data_C1E3
$81BF  48:          pha
$81C0  AD E2 81:     lda _data_C1E2
$81C3  48:           pha
$81C4  AD D8 03:      lda ObjectCurrentActionType
$81C7  20 BB C5:      jsr JumpWithParams

..

$03:81E4: A2 00     LDX #$00
$03:81E6: 4C 2A DD  JMP $DD2A

Bisqwit

Quote from: storall on July 29, 2020, 03:32:13 PM
$81BC  AD E3 81:    lda _data_C1E3
$81BF  48:          pha
$81C0  AD E2 81:     lda _data_C1E2
$81C3  48:           pha
$81C4  AD D8 03:      lda ObjectCurrentActionType
$81C7  20 BB C5:      jsr JumpWithParams

..

$03:81E4: A2 00     LDX #$00
$03:81E6: 4C 2A DD  JMP $DD2A
Thanks. Update: https://bisqwit.iki.fi/src/clever-disasm-example/cv2u.lst

storall

Quote from: Bisqwit
*) Incidentally, this seems to add a new bug: If you enter the save menu while in vicinity of an NPC, and you exit the screen with the B button, you will get a dialog box immediately when exiting the save screen, before the screen has scrolled properly. The same bug has of course existed all the time, and even with the map screen. Exit the map screen holding B, and it will occur...

Addendum bug. Keep holding B even after dialog box closes. Another will open immediately after.
cv2eng-2_11_1-ntsc-stm1mwfmFrup4-ips
cv2eng-2_11_1-ntsc-stm10mwfmFrup4-ips

Does not happen in vanilla though.

nosynose

Quote from: Vanya on July 28, 2020, 12:42:24 AM
See "spoony bard".
Yeah, I learned this from RHDN/Personal Projects/TWUE plentiful pages.
However, in the case of FF3U, Woolsey's "Spoony Bard" more or less matches the context. It's not hard to imagine for Sage Tellah to actually say such thing ("damn you the hopelessly romantic (poor) bard for seducing my daughter to elope with you!") eventhough Woolsey just made it up.

While this one is supposed to be informative, but instead it's cryptic and confusing. "What a horrible night to have a curse?" What curse? The story intro's curse? Or is there another curse inflicted in-game? And will the effect be only felt on certain night(s)?
Also, the sentence doesn't seem to be intentional like "Spoony Bard". So my previous suggestion "such a curse to have the night" is meant to reach some kind of compromise between authenticity and correctness.

Just want to state an alternate point of view, that's all. I have no problem either way.