don't click here

Dual PCM - FlexEd

Discussion in 'Engineering & Reverse Engineering' started by MarkeyJester, Apr 13, 2019.

  1. MarkeyJester

    MarkeyJester

    Original, No substitute Resident Jester
    2,202
    432
    63
    Japan
    Welcome,

    Today I would like to release the new Dual PCM, code-named; "FlexEd" (Flexible Edition).



    [​IMG]



    This is an upgraded version of the original Dual PCM released in 2016.

    I have showcased versions of this new Dual PCM in a few videos on YouTube, unfortunately they are out of date. I showcased it's features here, this too is out of date, but it's similar to the final version.

    The plan was to make a tutorial on implementing it into Sonic 1, but the driver has become so complex that many routines had been rewritten, I don't think an "upgrade" is possible without headaches. I would also need a tutorial to upgrade from the previous version. So the plan has changed.

    Because of the complexity, I have written a manual for the driver instead (the download link for the sound driver is in the manual itself):

    Download PDF

    This is just the PCM driver though, there is no 68k driver, the manual explains how to control Dual PCM using the 68k, it is mostly for those who have a 68k driver and need a decent PCM driver to use.

    However, knowing many of you are not technically minded, I will at least release a version of Sonic 1 with Dual PCM implemented. Some of Sonic 1's music has been updated to play the Timpani's on the second channel, but there are also some new example music tracks I made to showcase the driver, you might have seen them in some of the YouTube videos I made? You'll also have a sound test to play with, as well as another standalone ROM built for testing Dual PCM with DMA transfers. Think of this as an "apology" for not releasingthe driver sooner or supplying any form of easy guide~

    Sonic 1 Test Driver

    Something to keep in mind!, many emulators are inaccurate, and due to inaccurate Z80 <-> 68k access timings, Dual PCM does not play at the correct pitch on many emulators, some even switching pitches extremely fast causing VHS like effects. Regen and the Gens series of emulators for example do not slow the Z80 down properly when it tries to access the window. BlastEm also has this issue, but it is mentioned in the emulators' "To-Do" list that this will be fixed, so I look forward to that~ (as luck would have it, he made a update about 3 weeks ago which resolves this issue, so there you go, move to BlastEm d=) Kega is one of the few that gets it right, but probably by accident. Bottom line, the driver was designed to sound good on hardware, and if the emulator does not emulate the timings right, it won't sound as good on the emulator, but that is unfortunately out of my hands, all I can recommend is... get a better emulator? *shrugs*

    --- --- --- --- --- --- --- ---

    Unfortunately, I don't think many will understand the power and significance this driver has, but I also don't want to oversell it either. It's not without its flaws, limitations have hit hard, but it's also not without its advances, and there is room for improvement. The one thing it does have an advantage over other drivers on, is its ability to avoid quality loss caused by DMA transfers, I've noticed many cool sound drivers being showcased in videos, but I've also noticed that they've neglected to showcase these sound drivers while a game is running in the background, one that use DMA transfers, so it paints a rather painful picture. Many sound drivers that play more than one sample neglect any sort of pitch/volume control or are 68k based. So this sound driver does have a place somewhere, unfortunately it's difficult to advertise it where its features make sense, but also without sounding like a pretentious fuck about it. As always, you'll have to make up your own mind.

    One thing I will say...

    I have rewritten this driver many times, and this latest incarnation is written carefully enough that adding a tracker system with FM and PSG playback (with the two PCM playback channels and all the features this driver has) should now be possible, and that will be my next goal. To have an entirely Z80 functional driver, with these powerful PCM playback channels. I know it'll work, but how long it'll take is another question, real life gets in the way, ya know? But I am optimistic.

    Anyways, if you are able to use this driver, then have fun~

    (Natsumi hes released her own 68k driver here, it uses this version of Dual PCM as its PCM playback driver, so if you want another option to use Dual PCM with, that will be another for you).
     
  2. Jason

    Jason

    *Results not lab tested. Member
    I can't say I would really know what to do with this, as I've never done any Genesis development, but I am intrigued at how far the hardware can be pushed with 30 years of tinkering. How does it compare to something like the XGM driver? That seems to be Gecko Yamori Savaged Regime's preferred driver.
     
  3. MarkeyJester

    MarkeyJester

    Original, No substitute Resident Jester
    2,202
    432
    63
    Japan
    I am actually not too familiar with XGM.

    Judging from what I've read up just now, it is a Z80 sound driver, capable of tracker FM and PSG playback, as well as 4 PCM playback at 14,000Hz. So the driver currently has those advantages over mine - as I said in the first post, I do plan on moving FM, PSG and tracker stuff over to the Z80, so the advantage the driver will end up having over mind once I'm finished, would be having four PCM channels instead of two. On the other hand, no-where does it mention pitch control, volume control, looping, reverse playback, filter effects, or any of those features, so I can only assume it does not have that kind of control, that is where my driver currently has the upper hand.

    However, it's very difficult to compare drivers when the negative aspects about the drivers are not mentioned, I also don't think the two would be comparable either, I think the driver chosen should be dependent on use, so it's entirely down to what you would want to use them for.

    EDIT: Sik has kindly provided an updated frequency table to be used, more accurate than the previous version. I have altered the driver a little to support pitches going up to $1000 rather than $0D00. The manual and example sources have been adjusted in the download.