King's Valley 2 enhancement patches

by sd_snatcher on 03-07-2011, 11:50
Topic: Software

After a lot of hard work, combined with efforts from the MSX community, Brazilian MSX fan sd_snatcher offers his latest work to the community: enhancement patches for Konami's classic puzzle platform game King's Valley 2. The patch implements a lot of enhancements, bug fixes and also translates both MSX2 versions. New features in the MSX1, MSX2 and MSX2-Gold versions:

  • DynamicVsync, that both TurboFixes the game and makes it run better on Z80A/3.57MHz machines.
  • Hold TAB to throttle the game speed
  • Automatically sets the VDP to 60Hz on boot, to play the game at the correct speed even played on European machines. If you have an old European TV that doesn't support this, keep SELECT pressed during boot to disable this feature.
  • Enhanced sprite cycling: if you have a turbo machine, the sprite cycling routine will now take advantage of that and the flickering of the sprites will occur at a higher frame rate, dynamically adjusted as high as your CPU supports it.
  • Many small optimizations on the jukebox, reducing the CPU usage
  • Pausing the game don't stop the sprite flickering anymore

Specific bug fixes and enhancements for each individual version:

  • KV21/KV22: Now both cold boot and warm boot are supported. This means that the ROM not only boots as a cartridge, but also detects if it was booted from MSX-DOS and boots correctly with disk support on both cases. This allow you to load the games under the MSX-DOS2 using your favorite ROM loader and use the harddisk for loading/saving custom stages.
  • KV21/KV22: Finally it's possible to set the desired theme for a stage. The six original themes are supported and two "new" themes (see below) are supported, which along with the second palette supported for each theme supported by the KV22 version results in 32 different possibilities.
  • KV22: Two 'new' themes were created by combining two of the themes with the palette of each other.
  • KV21/KV22: Fixed the bug that allowed files with spaces in the name to be saved on disk. This resulted in files that could not be handled properly by MSX-DOS. The spaces in the filename are now replaced with underscores. The stage title will continue to be shown with spaces.
  • KV22: Translated the intro screen logo
  • KV2G: Translated the intro screen logo, certificate screen and the menus
  • KV22/KV2G: Much faster routine for picking a tool or weapon. 128KB of VRAM is now a requirement however.
  • KV22/KV2G: Smarter routine for refreshing objects on screen. It's much faster and the objects don't flicker anymore
  • KV21: In the fifth theme, the decorative beetle eyes now blink at the right place.
  • KV21: Fixed the disk routines, now harddisks are supported for loading/saving stages (KV22 didn't had this bug and supported harddisks from the beginning)
  • KV21: Fixed the 'GameMaster on lower slot disables disk support' bug
  • KV21: Fixed the bug that caused the player sprite to appear on the wrong side of the screen for 1 frame on screen changes.
  • KV21: The TMS9918 palette is loaded on MSX2 and higher, instead of CoolColors because there's already an MSX2 version of the game. So the TMS9918 palette would be more faithful for comparisons between the two versions.
  • KV22/KV2G: Modified to use the HKEYI hook instead of HTIMI, just like any other Konami game
  • KV22/KV2G: Relocated a variable that was placed on the HTIMI hook

Relevant link: The King's Valley II enhancement patches

Comments (21)

By ro

Scribe (4911)

ro's picture

03-07-2011, 16:41


By Ivan

Ascended (9341)

Ivan's picture

03-07-2011, 22:52

Impressive! My favourite MSX1 game gets better!

By Sarcasmic

Master (149)

Sarcasmic's picture

04-07-2011, 06:28

Holy **** who could think that in 2010/2011 so much konami's got patched BRAVO!!!Running Naked in a Field of Flowers keep up the good work mr Snatcher!

By Huey

Prophet (2694)

Huey's picture

04-07-2011, 11:28

[+ like]

Good work!!!!

By max_iwamoto

Hero (628)

max_iwamoto's picture

04-07-2011, 14:43

Woow! This is a lot of work!

By Metalion

Paragon (1622)

Metalion's picture

04-07-2011, 14:59

Great Smile
Keep up the good work !
Running Naked in a Field of Flowers

By PingPong

Prophet (4093)

PingPong's picture

04-07-2011, 15:25

honestly, i cannot figure why this game is soooooo much cpu intensive. i've seen other games, apparently with more action in place or spectrum convertions. this appear a game with very low cpu usage. what is taking so much cpu time?

By sd_snatcher

Prophet (3645)

sd_snatcher's picture

04-07-2011, 16:38

It has to control all enemies and all weapons on all rooms simultaneouslly. And there can be up to 6 rooms.

But after the patches the game became very light, with very subtle slowdowns. Try it and you'll see! Its much better, but Of course when you run it on a turbo machine things get a lot smoother. Smile

By Manuel

Ascended (19298)

Manuel's picture

04-07-2011, 19:49

Hm, MSX1 title screen wasn't translated?

By sd_snatcher

Prophet (3645)

sd_snatcher's picture

04-07-2011, 21:39


The MSX1 title was already translated on the original: but you need to run it on a non-jp machine. Then the English logo will be shown.

By Manuel

Ascended (19298)

Manuel's picture

04-07-2011, 21:42

Yeah, but I only have a turboR close by... Also, with the MSX2 version you always get the English titles, right? Even on a JP MSX2?

By the way, it's a very cool effort, thanks a LOT! Smile It also plays quite smoothly on a turboR indeed.

By syn

Prophet (2114)

syn's picture

05-07-2011, 12:16

How many hours of work did this cost you? Seems a lot of work digging into a game making all these adjustments/fixes. (from a beginner-programmers point of view). Nice job, going to check it out later this evening Wink

By mesiasmsx

Prophet (3441)

mesiasmsx's picture

05-07-2011, 12:20

Thanks for your works sd_snatcher i´m happy Running Naked in a Field of FlowersRunning Naked in a Field of FlowersRunning Naked in a Field of FlowersRunning Naked in a Field of Flowers

By iamweasel2

Paladin (709)

iamweasel2's picture

06-07-2011, 19:56

Thanks FRS for improving another MSX classic for us. Smile

Manuel: I believe if you use Execrom after patching the rom, you can force the game to run JP or english...

By sd_snatcher

Prophet (3645)

sd_snatcher's picture

07-07-2011, 12:06


iamweasel2 is right. Is did left it this way because ExecROM and many other ROM loaders offer the option to force a specific language to be selected by the game.

By snakepow

Champion (295)

snakepow's picture

09-07-2011, 12:26

Hello, this is a very good job , thank you for it.

Only a little comment, I've tested the game on One Chip MSX, running it using ROMLOAD. I don't know why improved MSX2 version works bad when using a custom stage. First time you load (from HDD) this stage all works good. But if you die and continue (F5), the game loads automatically the stage an other time and this second time is a disordered bad stage. Also if you game over instead of continue (F5), the next time you load a stage from disk, the game crashes. This does not happen on improved MSX1 version.

I think, due to other tests made using EP and a custom DSK file with stages inside, that the game writes to disk when you load a custom stage. (EP says : "Illegal FAT chain" when you load a DSK file than has been used in Kings Valley 2 MSX2 improved)

I wonder if it can be fixed, if you don't have work, sd_snatcher

Thank you

By sd_snatcher

Prophet (3645)

sd_snatcher's picture

10-07-2011, 04:03


Please try it without the EP disk emulation, as it isn't needed. Just load your custom stages directly from the SD card.

By snakepow

Champion (295)

snakepow's picture

11-07-2011, 01:16

Hello, sorry for my bad explanation. This try is made without EP (as It didn't work, later also tried with EP) .

So I just type : " romload kv3msx2.rom /s " on the directory containing custom stages ( *.elg ) . Is curious see that the MSX2 game applying enhancement doesn't work (second time it reads a custom stage, falls). But MSX2 game without enhancement and MSX1 game with enhancement YES work.

Thank you

By sd_snatcher

Prophet (3645)

sd_snatcher's picture

11-07-2011, 13:57


What's the SHA1 checksum of the original rom you used for patching?

Also, could you send me some ELG files that are having trouble? Did you test the game on another MSX machine? Does the problem only happens on the OCM?

Please answer the questions this forum thread, as it's easier to follow.

By Imanok

Paragon (1198)

Imanok's picture

13-07-2011, 16:45

Great work, man!! Smile

By Manuel

Ascended (19298)

Manuel's picture

09-01-2019, 16:48

I just enjoyed the game again with this patch Smile Runs really smooth Smile