Castlevania II (Simon's Quest) - Multilingual enhancement

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

Previous topic - Next topic

odditude

Quote from: Ok Impala! on June 20, 2022, 03:39:58 PM
Some other thing I don't understand. The clock in the inventory screen seems to go way too fast. I played for about an hour, but now it says I played for four hours.  :huh:

this is tracking the in-game time, not your play time. what you're interpreting as hours is actually the number of in-game days which have passed - which ending you get is determined by how many in-game days it takes to finish the game.

  • in-game time is shown in DD:HH:MM format (where DD is in-game days, HH is in-game hours, MM is in-game minutes)
  • in-game time starts at 00:12:00 (noon on the first day)
  • day is from 06:00 to 17:59, and night from 18:00 to 05:59
  • in-game time does not pass while in a building/mansion or in the menu
  • in-game time passes at a rate of 4 minutes for every 1 second of real time while outside and not in a menu (at least in the NTSC version, not sure if different on PAL)

BlackPaladin

I'm curious about something.  (This might sound strange coming from me.)  Would you consider using any material from the FDS version of the game?  (Dracula II: Noroi no Fuuin)  Stuff like uncensored graphics, music from the FDS ROM, etc.  (Or even considering working with the FDS ROM itself?)

Thank you for your time and keep up the good work!

Ok Impala!

Quote from: odditude on June 21, 2022, 03:54:05 PM
this is tracking the in-game time, not your play time. what you're interpreting as hours is actually the number of in-game days which have passed - which ending you get is determined by how many in-game days it takes to finish the game.

  • in-game time is shown in DD:HH:MM format (where DD is in-game days, HH is in-game hours, MM is in-game minutes)
  • in-game time starts at 00:12:00 (noon on the first day)
  • day is from 06:00 to 17:59, and night from 18:00 to 05:59
  • in-game time does not pass while in a building/mansion or in the menu
  • in-game time passes at a rate of 4 minutes for every 1 second of real time while outside and not in a menu (at least in the NTSC version, not sure if different on PAL)

Thanks! This explains it very clearly!  :)

Bisqwit

#1183
Quote from: BlackPaladin on June 21, 2022, 05:31:14 PMI'm curious about something.  (This might sound strange coming from me.)  Would you consider using any material from the FDS version of the game?  (Dracula II: Noroi no Fuuin)  Stuff like uncensored graphics, music from the FDS ROM, etc.  (Or even considering working with the FDS ROM itself?)

Thank you for your time and keep up the good work!

Yes, I am open to the idea. However, the only differences I am aware of between the NES and FDS versions are:
— The title screen
— The save/load screen
— Disk access pause screens
— Music
— Toast ending (and 69 days easter egg)

I already do the toast ending. I don't do the 69 days easter egg.

Music is a problem, because the two games operate on (slightly) different hardware. The NES simply does not have the extra sound channel that FDS provides. Other than that, the music on the FDS is more minimal likely for space-saving reasons. I don't know if the music engine is different or not.

The title screen is a good candidate, although I am not sure how much work it would involve.

Are there other changes? You mentioned uncensored graphics.


Quote from: Ok Impala! on June 20, 2022, 03:39:58 PMI encountered a bug in version 2.12.1 . When saving on the inventory screen using select the game will crash in Mesen. It will give an error message saying the game has crashed and throw you back to the title screen. After that the intro story scene is completely messed up. Also, when you start the game without a savefile and chose "load game" the game will reset and when you start the game after that, the graphics in the first town are messed up.

Thank you for the report. I will investigate this problem.

CyberTaco

Hello! I love this project; thank you for all of your hard work! I have two questions, if you'd be so kind:

1: I'm using an original MMC1 rom. If I pick a different mapper on the patch "vending machine", does it actually change the rom to use that mapper, or does the original rom have to use that mapper in the first place?

2: When I start a new game, press Start to bring up the subscreen, then press Select, the game either locks up or jumps to the title screen. Is this a known issue? (Starting a new game might not be necessary, I just haven't gotten any farther yet.)

If it helps any, I'm using the following -
Rom: Castlevania II - Simon's Quest (U) [!].nes , CRC is A9C2C503
Emulator: FCEUX 2.6.4 Win32 version
IPS Patcher: Floating IPS v1.31
Patch options: I've tried both MMC1 and MMC4, with all other options left at defaults. ( cv2eng-2_12_2-ntsc-stm10mwfmFruSp0-ips & cv2eng-2_12_2-ntsc-stm1mwfmFruSp0-ips )

InAnotherCastle

Amazing that this project is still receiving attention and updates going on 10 years. Coincidentally I just found a SKROM board in a drawer that could use some trace repairs and a new pair of ROMs ;-)

InAnotherCastle

Quote from: Bisqwit on June 24, 2022, 03:46:56 PMYes, I am open to the idea. However, the only differences I am aware of between the NES and FDS versions are:
— The title screen
— The save/load screen
— Disk access pause screens
— Music
— Toast ending (and 69 days easter egg)

I already do the toast ending. I don't do the 69 days easter egg.

Music is a problem, because the two games operate on (slightly) different hardware. The NES simply does not have the extra sound channel that FDS provides. Other than that, the music on the FDS is more minimal likely for space-saving reasons. I don't know if the music engine is different or not.

The title screen is a good candidate, although I am not sure how much work it would involve.

Are there other changes? You mentioned uncensored graphics.


Thank you for the report. I will investigate this problem.

I can confirm this on the latest release. Emulator or EverDrive and real NES. Using MMC1 version. Crash when loading without save and also when trying to save.

Bisqwit

Quote from: CyberTaco on June 28, 2022, 09:36:34 AMHello! I love this project; thank you for all of your hard work! I have two questions, if you'd be so kind:

1: I'm using an original MMC1 rom. If I pick a different mapper on the patch "vending machine", does it actually change the rom to use that mapper, or does the original rom have to use that mapper in the first place?
It changes the ROM to use the new mapper.

Quote from: CyberTaco on June 28, 2022, 09:36:34 AM2: When I start a new game, press Start to bring up the subscreen, then press Select, the game either locks up or jumps to the title screen. Is this a known issue? (Starting a new game might not be necessary, I just haven't gotten any farther yet.)

If it helps any, I'm using the following -
Rom: Castlevania II - Simon's Quest (U) [!].nes , CRC is A9C2C503
Emulator: FCEUX 2.6.4 Win32 version
IPS Patcher: Floating IPS v1.31
Patch options: I've tried both MMC1 and MMC4, with all other options left at defaults. ( cv2eng-2_12_2-ntsc-stm10mwfmFruSp0-ips & cv2eng-2_12_2-ntsc-stm1mwfmFruSp0-ips )
I will have to verify this. It does not happen in my development version. However, I found another bug. I will make a new release as soon as I can, although my days are starting to get quite busy once again...

8.bit.fan

Hi,

I've been a fan of this project since the beginning and it's great that it's still getting updates and new features!

One question/request: Would it be possible to add an option for the FDS soundtrack for the game? I know the NES lacks the proper sound channel but nowadays emulators and flashcarts support FDS and the FDS sound channels also.

Thanks again for this great hack! :beer:

8.bit.fan
In the year of 200X, a super robot named Mega Man...
http://www.8bitfan.info/
FF4 Ultima Discord: https://discord.gg/4MqjwJt

Rodimus Primal

Quote from: 8.bit.fan on August 16, 2022, 08:25:59 AMHi,

I've been a fan of this project since the beginning and it's great that it's still getting updates and new features!

One question/request: Would it be possible to add an option for the FDS soundtrack for the game? I know the NES lacks the proper sound channel but nowadays emulators and flashcarts support FDS and the FDS sound channels also.

Thanks again for this great hack! :beer:

8.bit.fan

Perhaps if there was a version of this translation using the FDS ROM.

Personally speaking I'd love to see the current version have music for the added story intro. Probably inserting the ending music from the first Castlevania in the same vein as Mega Man II did with the intro.

8.bit.fan

Quote from: Rodimus Primal on August 16, 2022, 11:18:43 AMPerhaps if there was a version of this translation using the FDS ROM.
Gotcha. That makes sense.  :thumbsup:
In the year of 200X, a super robot named Mega Man...
http://www.8bitfan.info/
FF4 Ultima Discord: https://discord.gg/4MqjwJt

Bisqwit

#1191
Does anyone have good ideas how to implement automated testing on ROM hacks?
My translation currently supports eight production-ready languages, eight mappers, each with VRAM or VROM, for both PAL and NTSC.
That is 256 different base models.

Each can be built with:
— With or without automap
— With or without SRAM support
— With or without password support
— With or without cinematic prologue
— With or without context sensitive dialog
— With or without toast ending
— With or without secret NPC
— With or without not-hiding actors during dialog
— Three options for dialog boxes: Keep NAR sizes, old retrans boxes, expanded boxes
— Three options for daynight transition: Smooth fade, dialog boxes, campy dialog boxes
— With or without Simon blinking when taking damage
— With or without falling from stairs hack (when pressing down+A)
— With or without staying on stairs hack (when taking damage)
— With or without multiwhip support
— With or without multiclue support
— With or without timer oneliner support
— With or without support for throwing away items
That's 294912 different combinations of options, on top of those 256 base models: A total of 75497472 different patches from one vending machine (although the UI doesn't expose all of those options separately).
Probably some options need to be only tested once. For example, it's probably enough to test that the toast ending works in every language on both PAL and NTSC on some mapper rather than on all of them. In other words, some options don't affect others, so their combinations don't have to be tested exhaustively. That's still far too much work to be done manually.

I would like some automated method for testing whether the patch works as intended.

I know I could build one. It would involve a starting condition:
— a TAS (input sequence) and RAM cheats, for example to force certain datetime condition, a certain equipment, boss to have 1 hp, invulnerability, certain location in the game

And an ending condition:
— game runs at least for certain number of frames, after which certain RAM addresses must contain some particular value, or the program counter (PC register) must hit a certain location a number of times within specified range, or certain tiles must found on the screen a precise number of times (to check that dialog box doesn't overflow).

Things to be tested would be like:
— No crash: Title screen, prologue, back to title from prologue, sram save, sram load, password, password exit, status screen, automap, gameover screen, daynight transition, ending, encountering every NPC in every situation that might affect their behavior, ...
— No graphical glitches: main menu, gameover menu, sramsave screen, password screen all have certain colors and shapes in certain places that are easy to mess up and easy to verify algorithmically.
— Dialog rendered correctly: All NPCs in every situation (for example, the ferryman has 27 different situations in which he can give one of six different lines), acquisition of items, daynight transition, ending, ...
— Functionally correct: Tossing works, item selection works, whip selection works, clue reading works, church refills hp, no townsfolk at nighttime, no zombies at daytime, ruins/lake/hidden vendor room scrolling works as intended, vendor sells or gives right item, ...

But building such a testing framework is a lot of work. Does a tool like this already exist?

I already have automated testing to verify that each patch builds successfully, but not whether each works as intended.

Bavi_H

#1192
Quote from: Bisqwit on August 18, 2022, 05:32:05 AMDoes anyone have good ideas how to implement automated testing on ROM hacks?

Mesen has a test runner mode:

QuoteTo start Mesen in headless mode, use the --testrunner command line option and specify both a game and a Lua script to run:

Mesen.exe --testrunner MyGame.nes MyTest.lua

This will start Mesen (headless), load the game and the Lua script and start executing the game at maximum speed until the Lua script calls the emu.stop() function. The emu.stop() function can specify an exit code, which will be returned by the Mesen process, which can be used to validate whether the test passed or failed.

It would be perfect if this test runner mode could also launch a Mesen movie (controller input recording) and start running that too, but when I did some quick testing right now, I couldn't figure out a way to get that to work. What I tried:

Spoiler
mesen --testrunner game.nes movie.mmo script.lua
mesen --testrunner game.nes script.lua movie.mmo

didn't run the movie, only the game and script.

mesen --testrunner movie.mmo script.lua
mesen --testrunner movie.mmo game.nes script.lua

crashed with this error message box:

---------------------------
Mesen
---------------------------
Critical error (UnexpectedError) System.AccessViolationException:
Attempted to read or write protected memory. This is often an
indication that other memory is corrupt.
   at Mesen.GUI.InteropEmu.DebugSetBreakpoints(InteropBreakpoint[] breakpoints, UInt32 length)
   at Mesen.GUI.Debugger.BreakpointManager.SetBreakpoints()
   at Mesen.GUI.Debugger.BreakpointManager.SetBreakpoints(List`1 breakpoints)
   at Mesen.GUI.Debugger.DebugWorkspaceManager.GetWorkspace()
   at Mesen.GUI.TestRunner.Run(String[] args)
   at Mesen.GUI.Program.Main(String[] args)
---------------------------
OK
---------------------------

[close]

However, if I drop the --testrunner commandline switch, Mesen does let you start a movie and lua script at the same time:

mesen movie.mmo script.lua

but then the windows are visible, the emulation runs at normal speed, and you can't get Mesen to close completely at the end and return an exit code. What I tested:

I recorded a few moments of playing Super Mario Bros. 3 as a Mesen movie. Then I wrote a script (shown below) that detects when Mario becomes super, then logs the current frame count to a file and stops emulation. When I used the command line to start both the movie and the script, the movie played until Mario became super, then wrote the file and closed to Mesen's initial screen.


-- Constants from https://datacrystal.romhacking.net/wiki/Super_Mario_Bros._3:RAM_map
CURRENT_FORM_ADDRESS = 0xED
SUPER_FORM = 1
RACCOON_FORM = 3


function LogFile(text)

  temp_file_name = emu.getScriptDataFolder().."\\temp.txt"
  temp_file = io.open(temp_file_name, "w")
  temp_file:write(text)
  temp_file:close()
  --os.execute(temp_file_name) -- display text file

end


function OnChangeForm(address, value)

  if value == SUPER_FORM then

    emu.removeMemoryCallback(the_callback, emu.memCallbackType.cpuWrite, CURRENT_FORM_ADDRESS)

    text = "" .. emu.getState().ppu.frameCount
    LogFile(text)

    emu.stop(1)

  end

end


the_callback = emu.addMemoryCallback(OnChangeForm, emu.memCallbackType.cpuWrite, CURRENT_FORM_ADDRESS)


Bavi_H

Quote from: Bisqwit on August 18, 2022, 05:32:05 AMDoes anyone have good ideas how to implement automated testing on ROM hacks?

On the NESdev Discord, I mentioned your question and mentioned I couldn't get movies to work with Mesen's test runner mode.

  • Sour (Mesen's developer) mentioned "there's no api for playing movies from lua in mesen [...] maybe bizhawk or fceux's lua apis can be used for this?", but confirms lua scripts in Mesen can press NES buttons.

  • cppchriscpp said "It won't help you run movies, but I made a tool for automated testing that wraps the lua scripts in something a bit more readable. (It also handles starting/stopping mesen) https://cppchriscpp.github.io/nes-test/ I've been using it to validate roms created with create-nes-game - tests include validating that the screen looks correct, and that certain variables are set/updated as expected"

Other things mentioned:

  • hxlnt's example NES github that automatically generates a screenshot when the code is updated.

  • Game Boy emulator SameBoy uses automated testing to confirm if 2790 games work with the emulator and generate screenshots (warning: page loads about 5600 images, 28.8 megabytes total).


Bisqwit

Finding the right emulator is not the issue. I would use either FCEUX or my own emulator (nesemu1) for the basis of running the tests, but that's not the biggest issue.

The biggest thing is the actual testing procedure: inputs, ram checking, conditions, all sorts of tests. I just laid out some ideas in my previous post, but I was interested to know if someone has taken it a step further and actually done the bulk of thinking already.

Vanya

Quote from: Rodimus Primal on August 16, 2022, 11:18:43 AMPerhaps if there was a version of this translation using the FDS ROM.

Personally speaking I'd love to see the current version have music for the added story intro. Probably inserting the ending music from the first Castlevania in the same vein as Mega Man II did with the intro.

I was just thinking about this. At this point any music would be great.

gnome_chomski

I've been enjoying this hack very much, but I've encountered some problems with the latest version when played via emulation.

I downloaded version 2.12.2-MMC4 via the vending machine from bisqwit.iki.fi, and then used Lunar IPS to patch it to a ROM with the proper CRC32 value. When patched with the latest version, after changing screens a few times, glitchy sprite tiles started appearing in the first town and on the map. The game also freezes when you attempt to use the SRAM saving function. I observed this in the latest versions of Nestopia, FCEUX, and Mesen.

I then patched the version available at RHDN (2.12.0.1-MMC4) via the browser patcher, and this version runs perfectly in all 3 emulators.

Thanks for this excellent romhack, I hope this report helps with future bug-fixing.