Maybe your card does dynamic resampling like my Yamaha ? This plays very low quality files like very high quality files.Fonzie wrote:On megadrive, a 1khz sample would sound horrible, what does my soundcart do to avoid that?
how can i do music on megadrive?
Moderator: BigEvilCorporation
-
- Very interested
- Posts: 2442
- Joined: Tue Dec 05, 2006 1:37 pm
- Location: Estonia, Rapla City
- Contact:
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
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen
Yeah... and there is no way to resample with Z80? I mean, playing a 4khz sample on my sound card is pretty okay... 8khz is almost good
About the 4bit samples, no clues why i get a "CHHHHHHH" background by removing the 4 lower bits of a 8bit sample?
Thanx for your answer.
Quickman : Some games uses 68K for drumps & other sounds... Maybe not sonic, yeah.
About the 4bit samples, no clues why i get a "CHHHHHHH" background by removing the 4 lower bits of a 8bit sample?
Thanx for your answer.
Quickman : Some games uses 68K for drumps & other sounds... Maybe not sonic, yeah.
-
- Very interested
- Posts: 2442
- Joined: Tue Dec 05, 2006 1:37 pm
- Location: Estonia, Rapla City
- Contact:
Warm reccomendation: don't attempt any resampling on Z80, it can't process the numbers fast enough
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
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen
Hello,
there is something I really don't understand...
perhaps it's because of my poor sound (hardware or sofware) knowledge but how can you control the sample rate ?
I mean, how can you play a sample at 12khz, 5Khz or any value ?
I though I must adapt the sample to the z80 speed....
When I used P.Lee z80 driver to play sample, I used 8KHz sample...why 8Khz ? which relation with the 3.58Mhz of the Z80 ???
I know it's perhaps a dumb question, but it seems this is something I can't understand...
there is something I really don't understand...
perhaps it's because of my poor sound (hardware or sofware) knowledge but how can you control the sample rate ?
I mean, how can you play a sample at 12khz, 5Khz or any value ?
I though I must adapt the sample to the z80 speed....
When I used P.Lee z80 driver to play sample, I used 8KHz sample...why 8Khz ? which relation with the 3.58Mhz of the Z80 ???
I know it's perhaps a dumb question, but it seems this is something I can't understand...
-
- Very interested
- Posts: 2442
- Joined: Tue Dec 05, 2006 1:37 pm
- Location: Estonia, Rapla City
- Contact:
In a plain "bomb DAC with PCM samples" loop, you can achieve ~32KHz but if you add a little checking (to know when to stop) and bank changing when required I couldn't get over ~16KHz
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
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen
So it's what I was afraid of...
the more code you have between each write, lower is the sample rate...
Ok, so how do you know the sample rate needed...?
I looked at TmEE source code and so you made 4 loop between each write
How do you know 4 loop is for 12KHz ?
I don't think you count how much cpu cycle is used by each line of your code...so you found it by multi tries ?
I don't see the 'easy' way to get a constant DAC update.
For the FM, I use the INT38h but it's far to be enought for the DAC part
the more code you have between each write, lower is the sample rate...
Ok, so how do you know the sample rate needed...?
I looked at TmEE source code and so you made 4 loop between each write
How do you know 4 loop is for 12KHz ?
I don't think you count how much cpu cycle is used by each line of your code...so you found it by multi tries ?
I don't see the 'easy' way to get a constant DAC update.
For the FM, I use the INT38h but it's far to be enought for the DAC part
-
- Very interested
- Posts: 3131
- Joined: Thu Nov 30, 2006 9:46 pm
- Location: France - Sevres
- Contact:
You put the finger on the worst point of genesis hardware.
There is no smart way of playing a sample. The YM2612 has 2 timers, they can both be connected to IRQ but unfortunatly they aren't in genesis.
That would be *very* helpfull to have one connected to Z80...
Unfortunatly we have to do with that, the best synchronisation process is to use the YM2612 timers and check status flag.
Another bad point is the bank setting register : having to write it bit per bit is really a waste of time :-/
There is no smart way of playing a sample. The YM2612 has 2 timers, they can both be connected to IRQ but unfortunatly they aren't in genesis.
That would be *very* helpfull to have one connected to Z80...
Unfortunatly we have to do with that, the best synchronisation process is to use the YM2612 timers and check status flag.
Another bad point is the bank setting register : having to write it bit per bit is really a waste of time :-/
Last edited by Stef on Mon Jan 22, 2007 12:48 pm, edited 1 time in total.
happy to see my question wasn't so dumbStef wrote:You put the finger on the worst point of genesis hardware.
There is no smart way of playing a sample.
yeah...MVSTracker use this methodThe YM2612 has 2 timers, they can both be conneted to IRQ but unfortunatly they aren't in genesis.
That would be *very* helpfull to have one connected to Z80...
so 2 possibilities :Unfortunatly we have to do with that, the best synchronisation process is to use the YM2612 timers and check status flag.
- play with the timers (hard when you already using it for FM)
- use a minimal code to be sure DAC write will be done as often as needed
yes...I hate this part...Another bad point is the bank setting register : having to write it bit per bit is really a waste of time :-/
even you can avoid this with <64k in a same bank at a specific address of the MD rom...
but since I want to play DAC at a specific address and FM song at another one, I switch bank every dac or fm update...
-
- Very interested
- Posts: 3131
- Joined: Thu Nov 30, 2006 9:46 pm
- Location: France - Sevres
- Contact:
definitly nothappy to see my question wasn't so dumb
Yep, the second way is preferable in case of "aside computing" as basic sample decompression but it can't guarant a correct sample rate (if you want 16 Khz, you'll maybe have 15,2 Khz or something like that). Anyway, not very importantso 2 possibilities :
- play with the timers (hard when you already using it for FM)
- use a minimal code to be sure DAC write will be done as often as needed
Switching each time is a big waste of time :-/ but we don't have choice here...yes...I hate this part...
even you can avoid this with <64k in a same bank at a specific address of the MD rom...
but since I want to play DAC at a specific address and FM song at another one, I switch bank every dac or fm update...
-
- Very interested
- Posts: 2442
- Joined: Tue Dec 05, 2006 1:37 pm
- Location: Estonia, Rapla City
- Contact:
Actually I don't know it, but my estimations are quite accurate. For example if I play 8KHz sample, optimize the code and it plays little faster I can say, that it plays ~9Khz.KanedaFr wrote:Ok, so how do you know the sample rate needed...?
I looked at TmEE source code and so you made 4 loop between each write
How do you know 4 loop is for 12KHz ?
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
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen
-
- Very interested
- Posts: 3131
- Joined: Thu Nov 30, 2006 9:46 pm
- Location: France - Sevres
- Contact:
Then it's why i said the rate is somewhat not very correct.TmEE co.(TM) wrote:Actually I don't know it, but my estimations are quite accurate. For example if I play 8KHz sample, optimize the code and it plays little faster I can say, that it plays ~9Khz.KanedaFr wrote:Ok, so how do you know the sample rate needed...?
I looked at TmEE source code and so you made 4 loop between each write
How do you know 4 loop is for 12KHz ?
That affects the pitch but generally nobody can really heard it
-
- Very interested
- Posts: 2442
- Joined: Tue Dec 05, 2006 1:37 pm
- Location: Estonia, Rapla City
- Contact:
I guess they would have connected IRQ lines of Ym2612 and Z80 but it starts to mess up Vint (one IRQ on Z80) which is little more important. Now I wonder why they didn't use 68K for int handling, it has 4 more ints available...Stef wrote:The YM2612 has 2 timers, they can both be connected to IRQ but unfortunatly they aren't in genesis.
That would be *very* helpfull to have one connected to Z80...
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
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen
When I sampled the sounds for Berzerk, I found 8Mhz to be the best sounding without taking too much space. But like it has been said, you can speed/slow the playback by adjusting the delay in the driver.KanedaFr wrote:Hello,
there is something I really don't understand...
perhaps it's because of my poor sound (hardware or sofware) knowledge but how can you control the sample rate ?
I mean, how can you play a sample at 12khz, 5Khz or any value ?
I though I must adapt the sample to the z80 speed....
When I used P.Lee z80 driver to play sample, I used 8KHz sample...why 8Khz ? which relation with the 3.58Mhz of the Z80 ???
I know it's perhaps a dumb question, but it seems this is something I can't understand...
-
- Very interested
- Posts: 3131
- Joined: Thu Nov 30, 2006 9:46 pm
- Location: France - Sevres
- Contact:
IMO a YM2612 timer interrupt would have been more usefull than VInt for Z80. 68000 receive VInt and can give it to Z80 (setting a Z80 ram byte to 1 when happened or something like that).TmEE co.(TM) wrote:I guess they would have connected IRQ lines of Ym2612 and Z80 but it starts to mess up Vint (one IRQ on Z80) which is little more important. Now I wonder why they didn't use 68K for int handling, it has 4 more ints available...Stef wrote:The YM2612 has 2 timers, they can both be connected to IRQ but unfortunatly they aren't in genesis.
That would be *very* helpfull to have one connected to Z80...
Anyway, we have to do with what we have