SENDING beeper music from Z80 to AY?
Hello.
According to http://z80.e-demo.pl/ Z80 sends music-data to ULA (the 1-bit transducer).
I was wondering if it's possible to send the same data to AY (instead of ULA).
At first, to make it simplier, to one channel of AY (not to change routines too much).
The chip is 4-bit transducer. We know that it is possible with 3 channels digital music. Z80 can send it to beeper or AY. I realize that.
But the question is related with chiptune/synthetic music from Z80. Is it possible to use AY to play that? And if so - will it sound better via 4-bit transducer?
Hm. Maybe somebody could tell.
According to http://z80.e-demo.pl/ Z80 sends music-data to ULA (the 1-bit transducer).
I was wondering if it's possible to send the same data to AY (instead of ULA).
At first, to make it simplier, to one channel of AY (not to change routines too much).
The chip is 4-bit transducer. We know that it is possible with 3 channels digital music. Z80 can send it to beeper or AY. I realize that.
But the question is related with chiptune/synthetic music from Z80. Is it possible to use AY to play that? And if so - will it sound better via 4-bit transducer?
Hm. Maybe somebody could tell.
Post edited by Mister Beep on
ZX Spectrum 48K BEEPER Music:
http://mister_beep.republika.pl/
http://mister_beep.republika.pl/
Comments
yes, 4-bit DA converter can easily acts as 1-bit DA. it should be very same quality like beeper, basically.
but i can see an issue: more advanced beeper drivers do not see beeper as an abstract 1-bit DA but rather as real physical device - just a membrane with inertia. when you change its state from off to on and back faster than membrane can do you get a "2-3 bit DA" device. this is used to emulate volume on beeper. and this can be hardly reproduced by setting AY channel in on/off state without complete reconstruction of beeper driver.
btw. look at Apology intro. it plays 6-channel tune on AY using such way you describe. and i would say that Digisid uses something very similar.
EDIT: drop me a PM if you are interested in subject. i have an insane idea.
However we have another idea too and this one seems to be better. :)
OK then, I will use the PM.
Thanks again.
http://mister_beep.republika.pl/
At last all sound is sent also to oudio-out (it takes a place in my Timex and ZX48K, and - as far as I know - also in 128K models) and the music sounds in the same way on my beeper and my hi-fi setup (well, more basses on hi-fi though. :) :) ). But well, you're surely right: membrane is still membrane, in a beeper or hifi speakers, afer all.
Hm, I'm not "tech" kind of person (sadly). I don't get it very well, I have to admit.
http://mister_beep.republika.pl/
Regarding membrane emulation/beep resolution: most routines are using so called PWM method (pulse width modulation) to generate "volume" on ZX's 1-bit beeper port.
Example explains everything: Simple 5kHz BEEP would have following sequence of bits to be sent to #fe port:
0101010101010101
One period is "01" (two states). We need to change this pair with frequenct of 5kHz => we need to change port @ 10kHz.
The same using PWM:
00 11 00 11 00 11 00 11 - Volume 100%
00 10 00 10 00 10 00 10 - Volume 50%
00 00 00 00 00 00 00 00 - Volume 0%
You can see two digits separated by space - this is one period of the player using PWM. It means that you need to run twice fast your player routine to play 5kHz tone ==> @ sample rate of your routine is 20 kHz. On the other hand, you got 1.5-bit resolution (0, 50, 100%).
It would be really interesting to reprogram some beeper routines in order to take advantage of real 4-bit D/A output instead of 1 bit PWM. I mean going vice versa now - replace PWM volume emulation by outing appropriate D/A level. Unfortunately it would mean complete retuning/timing of the player routine...
DigiSid is a bit different story, it combines AY tone generator with software PWM on the same channel's D/A output. All synced, uff.
I think the same. I wonder how it wold sound. Better? Theoretically it should.
But it's also possible it would sound worse, heh. ;)
Anyway worth to try one day, if anybody's in programming.
Hope somebody will give it a try. ;)
Heh. Well, DigiSid is fine engine. True.
However I would be more interested in software multiplying AY's channels (like in Gasman's prototype of engine - 6 chan).
It would be most interesting thing to write music in, if it had - except editor itself :)
- tuning problems solved, added some drum set and maybe some envelopes.
And then - who knows - maybe also some envelopes' editor for user? ;) ;)
http://mister_beep.republika.pl/