Page 1 of 1

My attempt at 2ch Z80 mixer

Posted: Sun Jun 24, 2007 8:51 pm
by TmEE co.(TM)
http://www.hot.ee/tmeeco/DWNLOADS/MSETEST.RAR

It can play 1ch @ 110KHz, and 2ch @ 52KHz.
This demo plays @ 22KHz or so.

2ch playback is little distorted because of extra jitter, and it sounds faster than 1ch on real HW (LDIR instruction executed faster ?) than on emulator where it sounds slower than 1ch.

A and B buttons make sound.

Thing is not finished though, need to work out sound effect stuff, and music part.

Posted: Sun Jun 24, 2007 9:07 pm
by evildragon
this is awesome :p i never thought this was even possible...

Posted: Sun Jun 24, 2007 9:12 pm
by TmEE co.(TM)
It is, and it sounds lot better on real HW, than on emulators (Fusion sounds nice though). 110KHz is achieved thanks to Stef's idea which he came quite some time ago (see the "How can I do music on MegaDrive" topic on MD stuff forum).

Posted: Mon Jun 25, 2007 12:28 pm
by TmEE co.(TM)
Updated the thing, now it sounds much more nicer.

A=Snare drum (ch1)
B=Bass drum (ch0)
C=Crash cymbal(ch1)

There is a weird pop when 2ch are playing, I couldn't get rid of it... any ideas anyone ?

I was drumming whole night yesterday...

Posted: Mon Jun 25, 2007 3:23 pm
by Shiru
TmEE co.(TM) wrote:There is a weird pop when 2ch are playing, I couldn't get rid of it... any ideas anyone ?
Record sound output from emulator to wav and look it in any sound editor, you understand this problem. It's a incorrect DC offset.

Posted: Tue Jun 26, 2007 8:14 am
by TmEE co.(TM)
Yes it was... I lowered the volume of one channel playback (so it is as loud as 2ch) but I forgot to add 64 to get "silence" position (128), it was 64, and when 2ch played, jump from 64 to 128 caused a pop. Now it is fixed and works great !!!

Upadated again.

Posted: Sun Jul 01, 2007 8:51 pm
by Stef
It's awesome to see how we progressed from our first attempt :)
just need to continu in this way and we will do our 4 ch MOD player on Z80 ;)

Posted: Mon Jul 02, 2007 6:22 am
by Fonzie
yeah ^^ Very impressive dudes :P
May i recall that the official sega driver supported "delta compressed samples" (ADPCM?) in top of FM/PSG ;) Haha :D I'm insane, I know :P

Anyway, nowadays, you may have 8Megabytes cartridges, so it is fine ;)

Posted: Mon Jul 02, 2007 6:59 am
by Shiru
DPCM and ADPCM is different things, DPCM is much simpler, it has fixed delta.

Posted: Mon Jul 02, 2007 3:20 pm
by TmEE co.(TM)
For a while, I was thinking about creating my own brand of ADPCM, but as Fonz said, size is no problem today :wink: