Page 10 of 20

Posted: Sat Feb 17, 2007 6:36 pm
by Stef
TmEE co.(TM) wrote:I'll check it out ... on monday, I have dial up at home and downloading 1MB is pain but to talk about 13MB !
Yeah sorry for the size :-/
In fact the mini dev kit still ask about 6 MB but the example files has some insane .c files which contains WAV definitions... that explains the huge archive size.

Posted: Sat Feb 17, 2007 7:05 pm
by TmEE co.(TM)
there's WAVs in the dev kit ?

Posted: Sat Feb 17, 2007 10:52 pm
by Stef
TmEE co.(TM) wrote:there's WAVs in the dev kit ?
Just in example to demonstrate use of Z80 drivers...
and not exactly wav, it's raw sound sample but it's almost the same.

Posted: Sun Feb 18, 2007 4:29 pm
by TmEE co.(TM)
Ok, I'll see tomorrow

I started to write my own 2ch mixer, this time I won't use WAVs but more game friendly format :)

Posted: Mon Feb 19, 2007 3:48 pm
by Pascal
i tried to compile it with "asmz80 z80_drv2.s80"

but it failed

Code: Select all

S80 Assembler for i8080-Z180 [1.09].  Copyright 1994-95, Frank A. Vorstenbosch
1:YMPORT0     EQU $4000   ; YM2612 port 0
"z80_drv2.s80",1 : Invalid mnemonic.
2:YMPORT1     EQU $4001   ; YM2612 port 1
"z80_drv2.s80",2 : Invalid mnemonic.
3:YMPORT2     EQU $4002   ; YM2612 port 2
"z80_drv2.s80",3 : Invalid mnemonic.
4:YMPORT3     EQU $4003   ; YM2612 port 3
"z80_drv2.s80",4 : Invalid mnemonic.
5:PSGPORT     EQU $7F11   ; PSG port
"z80_drv2.s80",5 : Invalid mnemonic.
6:BANKREG     EQU $6000   ; Bank register
"z80_drv2.s80",6 : Invalid mnemonic.

Posted: Mon Feb 19, 2007 4:19 pm
by Stef
Use this command line (as in the makefile) :
asmz80 -c -i -x1 -x2 -x3 -z -lnul <source.z80>

The -c or -i parameter is necessary to ignore case and you need it ;)

Posted: Mon Feb 19, 2007 4:23 pm
by Stef
TmEE co.(TM) wrote:Ok, I'll see tomorrow

I started to write my own 2ch mixer, this time I won't use WAVs but more game friendly format :)
More game friendly format ? except pur raw data sample you don't have many choices. Mixing 2 channels take more cycles and left quite a few ones for some sort of unpacking stuff...

Posted: Mon Feb 19, 2007 5:00 pm
by Pascal
Stef wrote:Use this command line (as in the makefile) :
asmz80 -c -i -x1 -x2 -x3 -z -lnul -o <source.z80>

The -c or -i parameter is necessary to ignore case and you need it ;)
silly me , thanks :))

Posted: Mon Feb 19, 2007 5:00 pm
by TmEE co.(TM)
I should have written my Z80 driver friendly, it is basically RAW data, but it has some "header" data in it so it's easy to get all required info on the sample.

Posted: Mon Feb 19, 2007 6:25 pm
by Stef
TmEE co.(TM) wrote:I should have written my Z80 driver friendly, it is basically RAW data, but it has some "header" data in it so it's easy to get all required info on the sample.
ah ok i see ;)

Posted: Mon Feb 19, 2007 6:27 pm
by Stef
Pascal wrote:
Stef wrote:Use this command line (as in the makefile) :
asmz80 -c -i -x1 -x2 -x3 -z -lnul -o <source.z80>

The -c or -i parameter is necessary to ignore case and you need it ;)
silly me , thanks :))
You're welcome ;)
I did a small mistake about the -o <source.z80> but i guess you got it ;)

Posted: Tue Feb 20, 2007 6:24 am
by TmEE co.(TM)
I looked at your 2ch mixer code, and I looked at it again, and I must say, that I didn't get it :cry:

Posted: Tue Feb 20, 2007 10:03 am
by RedAngel

Posted: Tue Feb 20, 2007 10:30 am
by TmEE co.(TM)
RedAngel wrote:Some links:
ADPCM routine
PSG samples
Cool stuff :D

Posted: Tue Feb 20, 2007 12:01 pm
by Pascal
Stef, i'm trying to use your driver in asm program, i converted my samples to 14000khz being 8 bit unsigned.

now for playing , i just got a huge scratch sound at the beginning and then nothing (sample is 50 secs length). I look & relook at my playing sample code and i don't see what's i'm doing wrong :s here's my code (i'm not a too gud asm coder ^^)

EDIT: ok i figured it out , i forgot to add 1 to the address after i set the sample address , why is pb[3] missing ? Also what's the best frequency & setting for the sample (i'm right with uint8) ? which one did u used for particle ?

thanks

Code: Select all

 // sample address
    pb[0] = addr >> 0;
    pb[1] = addr >> 8;
    pb[2] = addr >> 16;

    pb[3] ??? why not use pb[3] directly ??

    // sample length
    pb[4] = len >> 0;
    pb[5] = len >> 8;
    pb[6] = len >> 16;