PSG samples

صفحة 7/15
1 | 2 | 3 | 4 | 5 | 6 | | 8 | 9 | 10 | 11 | 12

بواسطة [WYZ]

Champion (447)

صورة [WYZ]

03-06-2005, 18:42

Too much noisy. This is not the solution Sad

بواسطة ARTRAG

Enlighted (6844)

صورة ARTRAG

03-06-2005, 18:55

@WYZ
change the player using always the same delay between out instuctions
Replace the out part with this:

OUT (#A0),A
OUT (C),B
INC A
OUT (#A0),A
OUT (C),D
INC A
OUT (#A0),A
OUT (C),E

Moreover you need initialize register 7 disabling all channels!!!

Or you disable all the channels in the register 7 or you
set frequency 0 at all the channels and noise generators!!

A last (unuseful) advise... disable interrupts!

بواسطة [WYZ]

Champion (447)

صورة [WYZ]

03-06-2005, 19:17

That's already done, and nothing changes:

sound(6)=&b11111111
sound(7)=0

sound(8)=0
sound(9)=0
sound(10)=0

 

JPBC0:          CALL    PLAY_SAMPLE
                RET

;SOUND C,A

SOUND:          PUSH    AF
                LD      A,C
                OUT     [$A0],A
                POP     AF
                OUT     [$A1],A
                RET

PLAY_SAMPLE:

;       HL      = SAMPLE TO PLAY [8bit unsigned]
;       DE      = LENGHT TO PLAY
;       TABLE   = ADDRESS OF SAMPLE TABLE
;
        DI
        EXX
        LD C,$A1
        EXX
LOOP:
        LD A,[HL]
        EXX
        LD L,A
        LD H,0
        LD D,H
        LD E,L
        ADD HL,HL
        ADD HL,DE
        LD DE,TABLE
        ADD HL,DE
        LD B,[HL]
        INC HL
        LD D,[HL]
        INC HL
        LD E,[HL]
        LD A,8
        
OUT [$A0],A
OUT [C],B
INC A
OUT [$A0],A
OUT [C],D
INC A
OUT [$A0],A
OUT [C],E

        LD  B,8
DLYB0:  DJNZ DLYB0        
        
        EXX
        INC HL
        DEC DE
        LD A,D
        OR E
        JP NZ,LOOP
        RET

بواسطة NYYRIKKI

Enlighted (5918)

صورة NYYRIKKI

03-06-2005, 19:25

change the player using always the same delay between out instuctions

This actually makes things worse. There is only one way of making samples less noicy and that is to maximize speed.

First OUT only selects register, so it does not change yet anything. That is why it is irrelevant when it is done. For rest of the OUTs, faster is better because then speaker has less time to go to "wrong" position.

بواسطة ARTRAG

Enlighted (6844)

صورة ARTRAG

03-06-2005, 19:25

Try
START: di
XOR A
LD C,0
CALL SOUND
inc c ; 1
CALL SOUND
inc c ; 2
CALL SOUND
inc c ; 3
CALL SOUND
inc c ; 4
CALL SOUND
inc c ; 5
CALL SOUND
inc c ; 6
CALL SOUND
inc c ; 7
LD A,00111111B
CALL SOUND

LD HL,SAMPLE
LD DE,$4670

CALL PLAY_SAMPLE
ei

RET

بواسطة [WYZ]

Champion (447)

صورة [WYZ]

03-06-2005, 19:44

Tried. And this is the generated .bin file:

http://webs.ono.com/WYZ/8BIT_last.bin

No changes....

بواسطة NYYRIKKI

Enlighted (5918)

صورة NYYRIKKI

03-06-2005, 19:45

Upper two bits of Register 7 should always be %10xxxxxx

بواسطة [WYZ]

Champion (447)

صورة [WYZ]

03-06-2005, 19:46

Tried. And this is the generated .bin file:

http://webs.ono.com/WYZ/8BIT_last.bin

No changes....

the code:

http://webs.ono.com/WYZ/8BIT.ASM

بواسطة ARTRAG

Enlighted (6844)

صورة ARTRAG

03-06-2005, 19:47

I cannot understand why there is such a noise...

بواسطة Grauw

Ascended (10581)

صورة Grauw

03-06-2005, 19:49

Actually your best result is

Total error: 0,20568 (range: 1,31)

and not 1.328
No, 1.328 is, it’s just not in the list (which has 0,01 increments) but I did test it locally with 0.001 increments.

~Grauw

صفحة 7/15
1 | 2 | 3 | 4 | 5 | 6 | | 8 | 9 | 10 | 11 | 12