[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: JACE Mockingboard support... almost there...



YAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY!

It's not 100% done but after rewriting a lot of core bits and pieces of the sound and timing code (as well as the mixing code, which was not correct at all), now I can actually hear the Ultima soundtrack and the pitch is PERFECT.  There is something really wrong with the interrupt timer because it lurches horribly.  I know it's an interrupt timer issue because it alternates between too slow/too fast with the rhythm of the song (kind of a really bad shuffle, not a good feature).  Once I nail that sucker and clean up a few nagging things I will most definitely release this bad boy.

I am ecstatic that the oldest part of the emulator is now finally working (and, yes, the mockingboard sound routines predate even the 6502 implementation!)

-Brendan

On Monday, April 30, 2012 1:03:09 AM UTC-5, BLuRry wrote:
> I finally found the bugs that were preventing the emulated AY chips from getting their parameters.  Now Ultima V properly detects the presence of the card and there is some sort of sound coming out of it.  The sound is totally wrong (very buzzy and noisy, no sign of any pitch or timbre).  However, given the rhythm of the buzzing I can tell that the music routines in the game are properly addressing the card and that what I am hearing should be music.  Once I get the sound generators behaving properly, JACE will support Mockingboard and Phasor.  The SSI speech chip is something I might address in the distant future, but don't hold your breath.
> 
> If anyone wants to look over my shoulder to see if they can take a gander, I'm all ears.  The PSG is the main AY class, and it's responsible for managing the three sound generators (channels A, B and C) as well as the noise and envelope generators.  The emulation is designed to be flexible such that the clock rate of the AY and the sample rate of the output sound is configurable.  The overall goal is for the PSG.update method to generate buffers of PCM samples, one buffer for each sound generator.  Each device has a step function which is supposed to carry it from one sample to the next, but I suspect that I borked the logic in there somewhere.  I seem to remember that 4 years ago I took the source in AppleWin (which was borrowed from Mame) and refactored it to be object-oriented.  I've since refactored it again (well, PSG anyway) to take advantage of Java 5 data structures.  Anyway, given that I wrote most of it 4 years ago and am just now able to test it should indicate how little chance I had of it working as-is.  ;-D
> 
> The mockingboard emulation souce is viewable here:
> http://java-ace.svn.sourceforge.net/viewvc/java-ace/jace/src/jace/hardware/mockingboard/
> 
> Nearing another release!!!
> 
> -Brendan