Page 7 of 20

Posted: Fri Feb 02, 2007 1:07 pm
by KanedaFr
Stef wrote:FXaddr++ ? are you coding the Z80 in C ? that explain some stuff :)
Maybe your Z80 C compiler isn't a good optimiser...
of course not!!! :)
it was a simple to write the full code....
I checked TmEE z80WAV code, he did the same...
too bad :(

I optimized some code reading z80 optimisation trick on the web+some rewriting...
I'm now at 8.1KHz ;)

Posted: Fri Feb 02, 2007 1:13 pm
by TmEE co.(TM)
Is your modded KMod available ?

That new feature is really useful.

Posted: Fri Feb 02, 2007 1:18 pm
by Stef
TmEE co.(TM) wrote:Why do you need to access YM2612 with 68K and z80 at the same time ?
Because i'm using the Z80 to play sample and i don't want to interrupt it to keep a good playback quality.
We can use the 68000 to handle MIDI YM2612 playing and the Z80 for DAC playing but if we need to halt the Z80 during 68000 YM2612 access, there is no more point of doing that :-/

Posted: Fri Feb 02, 2007 1:26 pm
by KanedaFr
TmEE co.(TM) wrote:Is your modded KMod available ?

That new feature is really useful.
well, it's a hybrid version badly coded from 0.6_beta
you could download it from
http://www.spritesmind.net/share/gens_DACFreq.zip
look at where the DAC value was written, it's now the frequency (so you loose the DAC value..)


I'll delete it when I'll release next KMod (I hope next week)

Posted: Fri Feb 02, 2007 1:58 pm
by Stef
KanedaFr wrote:
TmEE co.(TM) wrote:Is your modded KMod available ?

That new feature is really useful.
well, it's a hybrid version badly coded from 0.6_beta
you could download it from
http://www.spritesmind.net/share/gens_DACFreq.zip
look at where the DAC value was written, it's now the frequency (so you loose the DAC value..)


I'll delete it when I'll release next KMod (I hope next week)
Thanks ! very nice feature !
It's good to spy the DAC rate used in each game :) and even more usefull for our dev ;)

Posted: Fri Feb 02, 2007 2:08 pm
by TmEE co.(TM)
KanedaFr wrote:
TmEE co.(TM) wrote:Is your modded KMod available ?

That new feature is really useful.
well, it's a hybrid version badly coded from 0.6_beta
you could download it from
http://www.spritesmind.net/share/gens_DACFreq.zip
look at where the DAC value was written, it's now the frequency (so you loose the DAC value..)


I'll delete it when I'll release next KMod (I hope next week)
Badly coded or not, still better than nothing. I don't care about the DAC value so no problem.

Posted: Fri Feb 02, 2007 2:19 pm
by TmEE co.(TM)
I guess 2 PCM channels mixed together are enough. My future (distant future) music driver will do 2 Ch, 1 for drums, 1 for sfx and drums (sfx have priority). I need 2 ch because I'm going to make metal like music and metal consists of heavy drum and cymbal action, just drums are not that good.

Posted: Fri Feb 02, 2007 2:35 pm
by Stef
Yep 2 channels isn't bad after all.
But i had a quick look on genesis games (Thanks again Kaneda :p), it appears that beats and/or drums often need a high rate, i saw some 22 Khz rate used here and there... it would be very difficult to maintain 22 Khz with 2 samples played at the same time !

Posted: Sat Feb 03, 2007 2:19 am
by KanedaFr
I'm suprised looking at Mick & Mack...the freq change a lot during fx....
some kind of delta ???

Posted: Sat Feb 03, 2007 10:24 am
by TmEE co.(TM)
Stef wrote:Yep 2 channels isn't bad after all.
But i had a quick look on genesis games (Thanks again Kaneda :p), it appears that beats and/or drums often need a high rate, i saw some 22 Khz rate used here and there... it would be very difficult to maintain 22 Khz with 2 samples played at the same time !
I need at least 11KHz because cymbals don't sound good if lower sampling rate. 11KHz (or more) can be achieved very well, if all the samples you use are in the same 32K segment so you need to change bank only once.

Posted: Sat Feb 03, 2007 11:46 am
by Stef
Actually my code just handle 2 samples at 11 Khz (and not 8 Khz as i first though) =) but i've to do some changes since when only 1 sample is played, it's played at 14 Khz (i've to add a wait loop somewhere).

Posted: Sat Feb 03, 2007 4:41 pm
by TmEE co.(TM)
I would mix dummy bytes together not sit in delayloop. How do you mix stuff ? My method is (Byte1+Byte2)/2 but two 8 bit values overflow the register. (Byte1/2)+(Byte2/2) is an option too, now I'm thinking, that all PCM data should be less than 128 so no shifts need to be done.

Posted: Sat Feb 03, 2007 8:59 pm
by Stef
For now i'm doing (byte + byte) and i don't check for carry.
The normal way is just (byte + byte) then limit result if carry happen.
Using / 2 will limit your maximum volume for each channel, that give too quiet sound.
I'm also mixing dummy bytes but i bypass some others part as address increment... anyway not very difficult to fix ;)

Posted: Mon Feb 05, 2007 6:36 am
by TmEE co.(TM)
Ok, no shifting at all

Posted: Mon Feb 05, 2007 3:22 pm
by Stef
nope =)
but normally you should check for carry occuring and fixe value if happened.