Monday, February 27, 2006



Here's another work in progress report:

* I've created some interfacing code so that non-arcade drivers can be used in the applet version as well. This involved remapping from AWT event codes to LWJGL event codes. The next version, MSX games will be playable in the applet as well.

* The sprite colours of the MSX2 video modes are fixed now. One feature of the V9938 video display processor was missing which apparently was used a lot in MSX2 games to create multi-coloured sprites.

Tuesday, February 14, 2006


Source code release imminent!

Currently I'm finishing the distribution of the complete JEmu2 source code.

The source will be released under a license which, in short allows for reuse of components in other non-commercial open source projects, but strictly forbids hosting of JEmu2 on any other site than

Why this restriction?
The reason is simple. I don't want multiple versions of JEmu2 floating around, and everybody should be using the latest version. This will help keeping the high score tables maintainable, for example, and keeping up to date was one of the reasons to use Java Web Start in the first place.

It isn't such a bad restriction, though.
Everybody will be allowed to put up links on their own (non-commercial) web site to the JNLP files which start JEmu2, on the condition that there will be a clear link to the official JEmu2 homepage as well ( and a clear mention of the JEmu2 name. A little note to me, mentioning the links to JEmu2 will be appreciated too.
This will save anyone the trouble to keep JEmu2 up to date, and of course it saves a lot of bandwidth too!

There are more things to reckon with in the license, so read it carefully before you use anything from the JEmu2 source code.

Sunday, February 12, 2006


Enhancing games using specialized drivers

Some really great classics have been produced for the MSX system. Take for example the Nemesis saga, or Knightmare. All fantastic games, but they did reveal a very important technical shortcoming of the MSX(1) system: The inability to create colourful graphics and having a smooth scroll.
So the MSX1 gamers just had to settle with jerky background scrolling. Although the gameplay was still fantastic, it did influence the whole experience.

So, what would be cooler than be able to replay those exact same games using emulation, but with a specialed driver which makes the games' backgrounds scroll smoothly?
That's exactly what I've been working on.

The idea is to separate the background rendering and the sprite rendering, and introduce a pixel offset for the playfield.
In Knightmare, I found a memory location which seems to keep track of the vertical background position, which I use to sync the pixel offset with. When that value in RAM changes, the pixel offset is reset to 0, otherwise it's increased every 8 frames. So, 64 frames are needed to 'blend' from one background scroll position to the next.
One thing I had to take care of; the pixel offset only had to be updated when the memory location was changing so in the end the code looks something like this:

mem_old = mem;
mem = RAM[background_pos];
if (mem_old != mem) {
timer = 0;
scroll = 0;
if (timer < 64) { // stop scrolling when the background pos. isn't updated
updateBackgroundPosition(scroll / 8);

In Knightmare, it works a treat and the background scrolls as smoothly as a baby's bum in the new specialized driver.

In the Nemesis games however, things are more complicated.
For example, there are the background stars which do scroll smoothly in the originals. Actually, it's a trick, but they are part of the background so if I start implementing the smooth scroll on top of that, the background stars don't move so great anymore.

The answer is to patch the rom to make the stars scroll jerky, together with the rest of the background.
Today an MSX user (BiFi) mailed me with patched roms of the whole nemesis saga where he disabled the trick of smoothly moving the background stars!

There are however more hurdles to overcome... More later.

Monday, February 06, 2006


MSX-2 progress

Finally, I've got some MSX-2 emulation progress to show.
The V9938 is now partially implemented and MSX-2 is booting. Some games are now even fully playable, including the classic Metal Gear and Vampire Killer (a.k.a. 'Castlevania' on other platforms).
At this moment, only SCREEN 0-3 and SCREEN 5 are implemented, and some VDP opcodes and features are missing so not all games are working yet.
Furthermore, the sprite colours are not 100% correct yet.
The V9938 Video Display Processor is actually a quite interesting chip and a good challenge to emulate properly. You could say that it's an early GPU, because it can really process instructions in parallel to the CPU (things like line drawing and blitting).

Here are some screenshots:

Vampire Killer (a.k.a. Castlevania)

Vampire Killer (a.k.a. Castlevania)

Metal Gear

Metal Gear 2: Solid Snake

Hinotori (a.k.a. Fire Bird)

Wednesday, February 01, 2006


Welcome to the JEmu2 development blog

Well, you have to start somewhere. Before, I used to post WIP updates on the official JEmu2 site (, but I decided to only post the most important news on the official site, and blog about JEmu2 development here.

At this point I'm still working on MSX emulation. Although MSX1 emulation seems to work fine, there are still a few roms that don't work.
I'm replacing the TMS9928A (the MSX1 video chip) emulator with a new V9938 (the MSX2 video chip) emulator which I'm currently writing. The TMS9928A emulator was based on the TMS9928A emulator as found in the java version of VirtualColeco by Neal Danner, but with some bugs fixed.

With this new V9938 emulator, I hope to get MSX2 roms to work anytime soon.

This page is powered by Blogger. Isn't yours?