SCC channel 4 with wavetable value 0 > 0x3F channel doesn't work

Por imqqmi

Supporter (12)

imagem de imqqmi

05-04-2021, 00:14

Hi!

I've been working on a hardware VGMPlayer with YM2413, AY-3-8910 and SCC1 amongst other synth chips. At some point, and this could be a bug in my firmware somehow, or because of using breadboard for now, a really weird issue cropped up.

I'm not sure if it's with any other music, but when I try to play Parodius, Extra stage theme, channel 4 isn't playing any sound (it plays the main melody). I've fault checked my code, I've edited the vgm file and found out that the channel 4/5 wavetable first value is set to anything other than 00-3Fh it's not playing, but channel 5 is playing.

Can anyone please confirm on real hardware if this is also the case? It could also be an issue with VGM optimization that's often done to the files. The file plays fine in emulation, ie with VGMPlay.exe in windows.
The vgm I used can be downloaded here:
https://vgmrips.net/packs/pack/parodius-msx

For now I've fixed it by checking a write to this register and anding it with 0x3F but it may influence the way it's supposed to sound. Help is greatly appreciated!

Entrar ou registrar-se para comentar

Por gdx

Enlighted (4479)

imagem de gdx

05-04-2021, 10:45

I played this file with Grauw's VGM player v1.3 using the Konami Sound Cartridge. Music is played normally. Same with the Popolon Sound Cartridge. Where can I find your player?

Por Grauw

Ascended (9899)

imagem de Grauw

05-04-2021, 11:56

imqqmi wrote:

I'm not sure if it's with any other music, but when I try to play Parodius, Extra stage theme, channel 4 isn't playing any sound (it plays the main melody). I've fault checked my code, I've edited the vgm file and found out that the channel 4/5 wavetable first value is set to anything other than 00-3Fh it's not playing, but channel 5 is playing.

I’ve never heard of such an effect… I think if that was really a limitation of the SCC hardware it would be more widely known. So I suspect some other factor is in play.

The VGM encoding of SCC is quite weird, instead of a plain register number reflecting the memory I/O address LSB, it splits it up into 5 different “ports”. Probably there is an off-by-one issue somewhere in your code which translates those ports back to their appropriate memory locations.

Por imqqmi

Supporter (12)

imagem de imqqmi

05-04-2021, 12:58

Thanks, good to know it's not some issue with the SCC. I've dumped a vgm myself today using nezplayer and that plays fine, even if the address 60h is A0h (>3Fh).

I haven't posted about my player yet (other than here), it's still in a very early breadboard stage but it can play YM2413, YM3812, YM2151, AY-3-8910, SID and SCC and all combinations so far. I might add more later if I like the sound of the synth :). It's using an 8 bit mcu, the PIC16F1938 with data from the PC using a serial link. I plan to replace it with a Teensy 4.1, I can add playback for samples as well, and play from sd card. Once that works I'll design a PCB and post about it.
I'm working on the analog mixing section now, getting everything in balance gain wise and without distortion, applying some filtering to get rid of high frequency noise etc.

I've noticed that too about the scc encoding, it was probably done to be able to support multiple scc chips. I've also experimented with the offsets, but that makes the audio much worse, also the other channels play weird when I do that. I've also experimented with timing writing to the scc. Adding command 70 (delay 1/44100 of a second) but that didn't seem to solve it. Could be glitchy breadboard wiring, though I've tried pulling out the data or address bits that seem to match channel 4 but that screwed up the playback even more.

Man I'm really chuffed about getting the SCC and AY-3-8910 working :) It was a bit of a challenge to get the AY recognize some kind of chip select signal without having to add more hardware. The PSG would play normally with PSG only music but give garbled sound with SCC playing, but it's fixed now. And the SCC DAC I got (DAC7621) works very well, nice and clean sound.

Anyway thinks for your input, much appreciated!