ParaJVE : Parabellum's Java Vectrex Emulator   

Official Home of ParaJVE ... A travel through the programming of a freeware Vectrex emulator in java!

Wednesday, September 27, 2006  

Here and there

What have I been up to recently, concerning ParaJVE?
Well, lots of small things have been done, that may not necessarily shows right now, but that will come in handy in the future. Most notably:

  • Fixed a couple of bugs in the emulator's memory mapping :

    • Before, if the emulated program accessed an area of memory that does not exist on the real Vectrex, the emulator's VM would terminate execution - with a self explanatory "invalid memory access" exception, mind you ;)
      It appears that the Vectrex is quite relaxed regarding these accesses, so I finally redirected all the nonexistent memory address space to a NullMemory handler that returns 0 on reads, and discards writes.

    • Fixed a stupid bug where the emulated program could write into a read-only address space (ROM and CARTRIDGE areas) - Yes, there are ROMs around that have bugs causing this kind of behaviour ;) ... Needless to say, this was fixed in 2 minutes once the problem has been diagnosed.

    • Which leads us to the next point...
  • As I needed some kind of tool that would allow an easier diagnosis of crashes in the emulated program, I implemented a back-trace feature, along with its GUI.

    When back-trace recording is enabled (slows down the emulation a bit on "not-so-fast" computers), any crash in the VM immediately opens the back-trace window, that shows the history of executed instructions, along with the registers/stack content.

    In the end this module will also make a neat debugging addition (coupled with other stuff like breakpoints) when I'll start to implement a vectrex developer debug toolbox in ParaJVE.

  • Since the overlays rendering obviously appears way too dark, I started to try and make my own versions (Starting from an opaque picture of the overlay, I'm creating a picture made of several layers with different transparency).

    The few ones I completed look much better, so it sounds like I'll finally have to make them all (which is very time consuming, as I'm not that proficient in using GIMP) - Thus this task has been postponed...

  • The next version will include the games documentations, whose browsing will be triggered by a menu in the emulator... Thus I had to convert all the text docs into HTML. After having converted one by hand, I figured out rather quickly that it would be much more easy if this was performed by an automated program instead ;)

    Hence the conversion tool was coded in a rush, and all the HMTL documentations are now ready for inclusion. Maybe I will add them as standalone download package as well, since some people may be interested in grabbing these HTML docs alone.

  • I've started to ask several homebrew authors if I could include their games in the next version, and they kindly agreed -- so expect Thrust from Ville Krumlinde, Nebula Commander and Revector from Craig Aker to be embedded in the next packaging.

    As a consequence, I made a few modifications to the configuration file to support new information about the available games (release date and version, author's name and homepage URL, documentation path, and so on). Of course, the game selection dialog will display these pieces of information, but it's not implemented yet.

  • Last but not least, I lately started to work seriously on the sound emulation (based on a C source form MESS/MAME).

    I now have something that is roughly working, outside of ParaJVE (The sound "commands" & time stamps were previously recorded within ParaJVE, so that they can be played back later by the offline sound emulation routines).

    But for unknown reasons, the sound routines stop to work correctly as soon as they are embedded in the emulator. It seems that I'm having timing/threads problems again, but it needs more investigations.
And to finish, just an additional remark :

  I am well aware of the FPS problem that plagues the current version (eg. The FPS counter displays 60, but the games runs like it's 80 or even more). Although I don't consider it to be a top priority task at the moment, I'll eventually try and fix that sooner or later. :)


Sunday, September 10, 2006  

Version 0.2.0 released

It was about time! :)

The new release is ready for download here.

The good news is that the packaging embeds the roms and overlays, so no extra download is needed to install the emulator. It should be also easier to install since no manual edition of the launch scripts is needed anymore (well, in most situations).

I also added a few goodies that were not planned initially : a screenshot fonctionality (available only when the emulator is paused), and a menu item that checks online if a new version is available.

As said in the previous post, there are different packagings for different operating systems :
  • Windows
  • Linux i586 (generic linux bundle)
  • Linux for AMD64 (linux bundle optimised for AMD64)
As you can see, no release is available for the Mac plateform, due to the general lack of support. Maybe I'll build one eventually, if I have more time to investigate this OS.

The default keymapping is :
  • Joystick buttons 1 to 4 : Keys "1" to "4"
  • Joystick axis : direction keys
  • Pause = "ENTER"
  • Hide menu = "F1"
  • Exit = "ESCAPE"
It's likely that the first thing you may want to do is redefine this mapping. You can easily do that through the emulator's menu.



Tuesday, September 05, 2006  

Nearly there...

Well, it has been quite hard for me to find some time to work on ParaJVE these days, but the next release is almost ready in the end.

The loading and saving of the configuration in an XML file is done. This new file includes the games definitions (roms and overlay file paths, display settings, ...), as well as the emulator key bindings.

The GUI has also been partly rewritten (the debug controls of the previous release are not there anymore, and a new menu made its way into the emulator window). The emulator will now let you select the game to run through a game selection dialog, and you can also edit the key mappings using another dialog -- So it's not needed anymore to manually edit this in a text file :)

There's still some work to do on the timing (FPS) code : I tried several implementations and I'm really not sure what's the best one (depending on the runtime platform, some are better than others), so I guess I'll include them all in the emulator and let you choose eventually ;)

Once this is fixed, the only remaining thing to do is to think about a better packaging, in order to ease the install procedure.
It looks like I'll provide 2 different packagings : one for Windows, and another for Linux. No special packaging is planned for Mac, as I have not recieved any feedback from any Mac OS X user yet (as usual, feel free to contact me if you're willing to help on this matter).

So expect a release quite soon! (sometime around this week-end)

Here are some dialogs of the new GUI :