how can i do music on megadrive?

For anything related to sound (YM2612, PSG, Z80, PCM...)

Moderator: BigEvilCorporation

Stef
Very interested
Posts: 3131
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Post 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.
TmEE co.(TM)
Very interested
Posts: 2452
Joined: Tue Dec 05, 2006 1:37 pm
Location: Estonia, Rapla City
Contact:

Post by TmEE co.(TM) »

there's WAVs in the dev kit ?
Mida sa loed ? Nagunii aru ei saa ;)
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen
Stef
Very interested
Posts: 3131
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Post 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.
TmEE co.(TM)
Very interested
Posts: 2452
Joined: Tue Dec 05, 2006 1:37 pm
Location: Estonia, Rapla City
Contact:

Post 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 :)
Mida sa loed ? Nagunii aru ei saa ;)
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen
Pascal
Very interested
Posts: 200
Joined: Wed Nov 29, 2006 11:29 am
Location: Belgium
Contact:

Post 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.
Stef
Very interested
Posts: 3131
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Post 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 ;)
Last edited by Stef on Mon Feb 19, 2007 6:26 pm, edited 1 time in total.
Stef
Very interested
Posts: 3131
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Post 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...
Pascal
Very interested
Posts: 200
Joined: Wed Nov 29, 2006 11:29 am
Location: Belgium
Contact:

Post 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 :))
TmEE co.(TM)
Very interested
Posts: 2452
Joined: Tue Dec 05, 2006 1:37 pm
Location: Estonia, Rapla City
Contact:

Post 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.
Mida sa loed ? Nagunii aru ei saa ;)
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen
Stef
Very interested
Posts: 3131
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Post 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 ;)
Stef
Very interested
Posts: 3131
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Post 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 ;)
TmEE co.(TM)
Very interested
Posts: 2452
Joined: Tue Dec 05, 2006 1:37 pm
Location: Estonia, Rapla City
Contact:

Post 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:
Mida sa loed ? Nagunii aru ei saa ;)
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen
RedAngel
Interested
Posts: 14
Joined: Wed Feb 07, 2007 7:29 pm

Post by RedAngel »

TmEE co.(TM)
Very interested
Posts: 2452
Joined: Tue Dec 05, 2006 1:37 pm
Location: Estonia, Rapla City
Contact:

Post by TmEE co.(TM) »

RedAngel wrote:Some links:
ADPCM routine
PSG samples
Cool stuff :D
Mida sa loed ? Nagunii aru ei saa ;)
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen
Pascal
Very interested
Posts: 200
Joined: Wed Nov 29, 2006 11:29 am
Location: Belgium
Contact:

Post 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;
Post Reply