SCC HW bug: update

Página 1/2
| 2

Por ARTRAG

Enlighted (6923)

imagem de ARTRAG

11-11-2008, 14:31

As many times marked in this forum, SCC would be a nice piece of HW if it not were for all its damn bugs and strange behaviours.

It happens that we are developing a piece of SW for playing PT3 songs on SCC.
The idea is old: the PSG plays its piece, if the SCC is present its channels are used to enrich the PSG sound by directly converting AY8910 registers into SCC values.

The problem rises with volumes:

PSG has logarithmic volumes according to y = 2^-((15-n)/2)
SCC has linear volumes in 0-15

now the HW bug:
when we use this small look up table to convert volumes from psg to scc

VolConv:
        and 15
        ret z       ;   psg 0 -> scc 0
        ld  e,a
        ld  d,0
        ld  hl,VolumTab
        add hl,de
        ld  a,(hl)
        ret         ;   psg 1-15 -> scc 1-15
VolumTab:   db  1, 1, 1, 1, 1, 1, 1, 2, 3, 4, 5, 7,10,14,15
;               1  2  3  4  5  6  7  8  9 10 11 12 13 14 15

the SCC music sounds NOISY as the HELL
if we use no mapping the SCC music seems to have no noise,
but naturally SCC channels are too high and cover the PSG

Has anyone already faced this NEW amazing feature of the SCC chip ?

Hints or workaround?

I cannot imagine why changing the volume while the SCC plays can disrupt the output,
anyway this happens.

My guesses are
1: some volume levels of scc are buggy and thy occurs in my table (eg. 1) more than in the original song
2: the noise is there also with linear volumes (i.e. no conversion) but covered by the music that is louder
3: no hint!

QuestionQuestionQuestion

Entrar ou registrar-se para comentar

Por flyguille

Prophet (3031)

imagem de flyguille

11-11-2008, 15:11

try to check: if the current volume results not only of the new value inputed, also if the previous volume value has effect.

Por ARTRAG

Enlighted (6923)

imagem de ARTRAG

11-11-2008, 15:14

? What you mean ?
I do not understand what you say I should test
flyguille are you using some sort of cyphered language ?
Tongue

Por flyguille

Prophet (3031)

imagem de flyguille

11-11-2008, 15:17

well, if the noice is inserted when you jump from 3 to 7 but not from 4 to 7... thinks like that

or maybe it has certain inertia in the circuit, like if you want to do square waves, just jumping from 3 to 15 and back to 3 ... then 15... it will do spikes biggers than 15 ... thinks like that...

Offcoutse you needs an osciloscope view to check where is inserted the noice... but.. with just listening is more hard but not impossible

Por wouter_

Champion (508)

imagem de wouter_

11-11-2008, 16:47

VolConv:
        and 15
        ret z       ;   psg 0 -> scc 0
        ld  e,a
        ld  d,0
        ld  hl,VolumTab
        add hl,de
        ld  a,(hl)
        ret         ;   psg 1-15 -> scc 1-15
VolumTab:   db  1, 1, 1, 1, 1, 1, 1, 2, 3, 4, 5, 7,10,14,15
;               1  2  3  4  5  6  7  8  9 10 11 12 13 14 15

the SCC music sounds NOISY as the HELL

There's a bug in this code: when the input is 15, you read past the end of VolumTab. Maybe this can explain the noise?

Por ARTRAG

Enlighted (6923)

imagem de ARTRAG

11-11-2008, 16:59

going to see

Por ARTRAG

Enlighted (6923)

imagem de ARTRAG

11-11-2008, 17:06

Nope.....
New code

VolConv:
        and 15
        ld  e,a
        ld  d,0
        ld  hl,VolumTab
        add hl,de
        ld  a,(hl)
        ret         ;   psg 1-15 -> scc 1-15

VolumTab:   db  0, 1, 1, 1, 1, 1, 1, 1, 2, 3, 4, 5, 7,10,14,15
;               0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15

same HW noise in teh SCC music....
Thanks for fixing the bug, but it does not affect the problem i mention

Crying

Por ARTRAG

Enlighted (6923)

imagem de ARTRAG

11-11-2008, 17:10

The sole code that SEEMS to make the noise disappear is

VolConv:
        ret

but as said before, this could be a sort of masking effect
as the volumes, without log/lin conversion, sound very loud

Por ARTRAG

Enlighted (6923)

imagem de ARTRAG

11-11-2008, 17:34

testing here and there it seems that all the low volumes on the scc are very noisy...

e.g. this table sounds almost good

VolumTab:   db  0, 1, 2, 2, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12,13
;               0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15

Por dvik

Prophet (2200)

imagem de dvik

11-11-2008, 18:03

Is it just noisy or do you hear spikes, like that other bug?

If its just noise its probably the quality of the da converter and not necessarily a bug.

Por ARTRAG

Enlighted (6923)

imagem de ARTRAG

11-11-2008, 21:46

It is not a simple problem of DAC
It is, by far, the closest thing to what we hear when we change the waves while the channel is active.
I was planning to pay a sample wave and change the volume by pressing a key...
This would definitely say what volume levels are broken.

Página 1/2
| 2