ParaJVE : Parabellum's Java Vectrex Emulator   

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

Wednesday, March 09, 2011  

One more defect added !

A new feature has just been added to ParaJVE : the emulation of the famous Vectrex buzz noise.

The happy few having the chance to own a real system will know what I'm talking about. This buzz noise is a very typical sound pattern produced by the machine when it is operating. It is caused by a design flaw (the sound line lies too close from the board, and gets plagued by interferences due to its nearby activity).

Well, the very first implementation is now completed, and it is quite straightforward at the moment (a mere noise sample looping). The buzz sound can be turned on/off (independently of the vectrex "normal" sound), and its volume can also be adjusted independently.

Below is a small video whose goal is to let you enjoy the audio result - the framerate is capped 10 FPS, so don't really expect a smooth video ;-)



As you can hear, the result is quite acceptable already. However, a more interesting implementation would be to dynamically modulate the PCM wave, depending on the current program activity. This would require quite a lot of investigations on a real vectrex, in order to define which hardware parameters are significant, and how they can be integrated into the final noise generation algorithm.

I'm not sure I can bide enough time to tackle this task ; still, this is very tantalizing...

Labels: ,

Friday, December 01, 2006  

Eek Help Spike !

Right, it's been nearly a whole month without any WIP update, so I thought I'd give you some fresh news... Yep, ParaJVE is still in active development!

Well, active may not be the appropriate word at the moment, as other things strongly diverted me from coding as much as I'd like, but still, some work has been done ; here is a short list :

  • Fixed a regression introduced in 0.3.2, where the command line argument "-GAME=xxx" was not handled correctly anymore (the game's cartridge ROM would not be loaded).
    Thanks to Damian for reporting this bug!

  • Added an option to remember the user choice when it comes to resetting the emulator after reloading/rebuilding the rom. End of the annoying yes/no dialog poping around again and again! :)

  • Implemented VIA6522 SR Mode 101 (Shift Out Under T2 control). It was not handled yet, as I thought this ACR mode was never set ... until I saw it used in the Test Cartridge (rev.4), in the "Adjust DAC offset" part.

  • Finally implemented what I'd call "Direct DAC Sound output", ie. the MC1408-P8 writing directly to the sound output line through the MUX (when PB1 and PB2 are high).

    By constantly writing to the sound line, a program can actually generate a waveform using the CPU alone (without the help of the PSG hardware). This is what makes the game "Spike" speak ... Here's the result within ParaJVE : Eek help Spike ... Oh no, Molly!

  • I've also had fun -- go figure ;) -- while starting to emulate several hardware peripherals. More about that later, when I'm sure it will make it to the final release...

  • In the background, I've started to test several Java Docking Libraries, as I will need one for a related side project (A developer's oriented version of ParaJVE, name-coded "ParaJVD" at the moment). So far, it looks like VLDocking by VLSolutions is going to get my vote.

Labels:

Tuesday, October 24, 2006  

Version 0.3.1 - Sound fix release

Although the sound emulation is still broken on Linux, the annoying sound bug that emitted High-Frequency garbage on the channels in some games has just been corrected, thus a new minor release has been built.

John Dondzila allowed me to include his games in the packaging, so I've added a whole bunch of new excellent entries to the list of available roms.

This version also comes with two additional display features that could come in handy if ParaJVE was to be used in arcade cabinets like environments :

  • Full-screen mode support

    In the game selector dialog, you can select a checkbox to make ParaJVE run in full-screen mode. Of course, pressing F1 (by default) still hides the menu-bar, so it's the way to go if you want each pixel of your screen to be dedicated to the vectrex graphics rendering! :)

    I've made a few tests on a Linux box, and it seems that full-screen mode is not supported by the 1.5 JRE on such platforms (in such a case, the full-screen checkbox will be disabled). From what I've read here and there, it should work with a 1.6 JRE, though...

  • Display rotation

    I've added a menu to select the current orientation of the rendering. By default it's still 0° (standard display), but you can also select 90° (left rotated), 270° (right rotated), or even 180° (top-down). I'm not sure it will of any use, but as it cost virtually nothing to implement, there it is...

As for the near future of ParaJVE's development, I'd now like to focus on the graphics rendering for a month or two. Especially, I'm currently in the process of learning GLSL (OpengGL Shading Language), in order to experiment how fragment shaders could help the emulation to become more visually attractive.

That's why, unless I find some nasty bug to fix, I do not foresee any new release anytime soon (that is, until I'm satisfied with the graphics results).

But until then, I'll keep this blog updated with the experiments :)

Labels: , , ,

Wednesday, October 11, 2006  

Dolby Surround Pro Logic ... -not-

Better late than never, ParaJVE now comes with a proper sound emulation!

Since I finally managed to get rid of the off-putting bug in the PSG code, the sound now seems to work quite accurately in the emulator. If there are any residual bugs they're not that obvious to spot (at least, nothing that can be heard easily).

Sound routines debugging proves to be especially tedious (IMO), and as I rapidly got tired of crawling through huge arrays of numbers -- Sampling 3 channels at 44kHz brings quite a lot ;) -- I had to implement some kind of visual tool to try and comprehend them in a more intuitive way.

Once coded, the new "samples monitor" immediately pointed out the problem, as you can see in this screenshot :

    The yellow/white lines reflect the samples average, while the blue ones are the current maximum. The top channel (yellow) is the overall mixing of the 3 PSG channels (white)
Quite obviously, the problem came from some kind of saturation in the channel's output at some point... After looking for the probable root causes in the code, it turned out to be a pathetic sign mistake, buried somewhere in the periods computing... With this single line fixed, the sound output for the same "soundtrack" magically became :


Which clearly makes me happy ... oh well ... call me geek if you want ;)

Right, there's still some work to do on the audio : adding user options (enable switch, sampling rate, overall volume, ...) ; fixing the timing problems (the sound plays at the game's speed, which is too fast - see the previous post) ; the speech in Spike is not implemented (not planed yet) ; etc...

But all in all, with this part working, I feel that the next significant milestone has been reached. And as I'm quite satisfied with the current emulator status, a release should not be too far now...

Labels: ,