Moved in

I got my new place and starting moving stuff out of storage. PCE and SGX+SCD are setup. Just need to setup my dev PC.

7 Responses to “Moved in”

    • I tried emailing you but your email is outdated. The original email had to do with PCM, but I’m canceling the original question.

      Instead, I’d like to first ask you about the following — I am playing the top 5 bits of an 8-bit unsigned PCM sample thru the PCE — this means the sample data for 0 or no sound is “$10” — and the sample plays fine — but when the DDA is turned off there is a popping sound — I noticed that if the DDA is turned off with the last sample written as 0, then there is no pop (of course I get a pop by writing 0 itself though). Thus, my problem is how to translate from $10 to 0 without any audibles.

      I tried instead to fade the channel volume out, but that also has audibles (even at reduced fade rates)..

      I also tried decrementing steadily from $10 to 0 but that also has audibles.

      Anyways, I’m wondering if you have experience with this issue, and if you know how to get the DDA to turn off without exhibiting a popping click. Thanks

      • Welp, I’ve discovered the knowledge, and I’m going to leave the knowledge here. This is loose knowledge from Rypecha over in #mednafen

        “HuC6280 waveform “center point” is at 0x00, HuC6280A center point is at 0x10.”

        That being said, I also ran a couple games in a debugger and noticed they use a permanent DDA channel (F), which means no click/pop since they never turn it off.

      • Which email is that? My account is suspended (need to pay the bill), but should be back up in a few days.

        The popping comes from when a channel goes from a high volume to a low volume, or vice-versa. This also happens when you turn the channel ‘off’. This is much more pronounced on the 6280 than the 6280A. The direction of the pop on the output is directly related to the transition (no volume to high volume, or high volume to no volume). The amplitude of the pop is related to the difference in change. So slower incremental fades (up or down) shouldn’t be noticeable. On the 6280A, this should be an issue at all because the biggest pop amplitude is relatively tiny. I was able to do a ~40khz sample stream using the 32byte waveform as a buffer and just refill it. On the 6280A, it works fine but on the 6280 it has that terrible buzzing sound because of the high rate of ‘popping’. On way to negate the pop on the 6280 (non A), is use two channels (assuming said trick from above). As one channel goes to max volume and the other channel goes to Zero, the pop’s cancel each other out. You alternate between which channel is playing. You can gain back the additional channel by interleaving the sound data in the 32byte waveform buffer with two streams. Probably needs to be something above 16khz for it to sound blended. Or more channels if you’re up to it.

        It’s been a couple of years since I messed with work arounds for switching between normal and DDA stuffs. I don’t remember all the tricks off hand.

        What is it that you’re trying to do?

  1. Well I’m writing a game. The email I sent you has to do with PCM playing back amidst a game loop unevenly. I’ve cleaned it up since I originally emailed you, such that the uneven playback is only noticeable if no other music is playing, and it comes thru as mostly mid-to-high pitched noise factor. In it’s worst conditions I’ve experienced in the past, it can come across as blatant buzzing.

    In my experiments with this issue, it seems that just by accessing the VDC in any way in my main loop, that introduces some static into the PCM playback.. I even try waiting until end-of-satb-dma interrupt before accessing VDC, but still, I’m hearing the artifacts. *sigh* I really want that perfect playback I can hear in official games… but unless you have critical feedback I’m really stumped for now. On the bright side, at least it’s mostly unnoticeable, yet I’m still dissatisfied. I really want to solve this.

    • Without looking at your code, it’s difficult to say what’s actually going on. By accessing the VDC, are you using Txx instructions? If you are, they will stall any/all interrupts while the transfer is taking place. I’m assuming by static you mean extreme ‘jitter’. But other than that, I can’t see where this static/artifact is coming from. I know if you run vdc interrupts and timer interrupts at the same time, you have to immediately re-enable interrupts at the start of the timer routine code in order to not delay the VDC interrupt stuff. This can cause some jitter on a handful of samples (of the 116 per frame), but it shouldn’t be noticeable. Is it possible you can share just the binary? I can take a look at it in the debugger and see if I notice anything.

      • After a couple days torturing myself whether to share the code/bin, I’ve decided not to. I’ve also decided to put off any problems we have discussed so that I can stay focused on the real top priorities I have for this game. Thanks for the insight you provided — which, to be precise, only the knowledge of the 2-channel canceling was new to me. The other things you mentioned I am already aware of, and they do not complete the solution to my problem.

        I’m a pretty deep person, or personal might be a precise word, that’s not an opinion. I’m not trying to make a statement here, but rather I want to explain to you (God knows why… I’m not a religious fanatic) that I know deep down that my infatuation with PCM solving with my PCE project is actually my downfall — and that I must let it go to continue on, the right way. Anyways, file this PCM tackle under “Interesting problems I wish to solve but really should leave alone”

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: