Page 1 of 2
Z80 driver - 4 channels player with volume control.
Posted: Sun Feb 22, 2009 4:24 pm
by Stef
Lately i had to rewrite my 4ch player Z80 driver as i lost some sources :-/ Wasn't that bad after all as i was capable to improve it and get more "free time" than my first shoot. I have about 48 free slots (/256), a bit less than 20% of Z80 time which is enough to handle some YM2612 or/and PSG command
Finally i decided to add volume control with this available time.
I couldn't do more than 16 levels volume control because of Z80 ram limitation. The driver is only handling channel volume for now but i think i can add global volume with the 8 free slots leaving :p
You can download the rom
here (the rom name is pl4ch_01.bin)
This driver gimme some ideas as doing a MOD converter : we can build samples at all needed rates and handle ADSR envelop "in software" by adjusting envelop on the fly (once by frame should be ok) X'D
Posted: Sun Feb 22, 2009 4:47 pm
by mic_
You can download the rom here.
The page briefly displays some message in french, then it goes blank and nothing happens.
Re: Z80 driver - 4 channels player with volume control.
Posted: Sun Feb 22, 2009 4:48 pm
by Shiru
Link does not work, empty page.
Stef wrote:we can build samples at all needed rates
No pitch effects then (arpeggio, slides, portamento, vibrato), or you'll need very many samples.
Posted: Sun Feb 22, 2009 4:55 pm
by TmEE co.(TM)
Also cannot get anything :/
Posted: Sun Feb 22, 2009 4:56 pm
by Stef
sorry, i fixed the link !
Re: Z80 driver - 4 channels player with volume control.
Posted: Sun Feb 22, 2009 4:58 pm
by Stef
Shiru wrote:Link does not work, empty page.
Stef wrote:we can build samples at all needed rates
No pitch effects then (arpeggio, slides, portamento, vibrato), or you'll need very many samples.
Does MOD support all that ?? well i suppose i've been optimist :p
anyway we can have a sort of very simple MOD player i guess

Posted: Sun Feb 22, 2009 5:10 pm
by mic_
Posted: Sun Feb 22, 2009 5:16 pm
by Stef
hmmm ok so MOD won't be that easy ^^
Posted: Sun Feb 22, 2009 5:20 pm
by TmEE co.(TM)
now it works, pretty nice, and quality is very good too

Re: Z80 driver - 4 channels player with volume control.
Posted: Sun Feb 22, 2009 5:40 pm
by Shiru
Stef wrote:anyway we can have a sort of very simple MOD player i guess ;)
Yes, but it will barely usable because of many drawbacks:
- It will require to write new music for it (taking all limitations in account)
- To compensate lack of pitch effects longer samples will be needed (takes more memory itself, and much more when duplicated with all pitches)
- Music data will be large anyway
- Not very suitable for games, because no sampled sound effects (or muting music channels, which is sounds bad, or 2-3 channels music, or lower quality of sound to make additional channels for effects)
Re: Z80 driver - 4 channels player with volume control.
Posted: Sun Feb 22, 2009 5:56 pm
by Stef
Shiru wrote:Stef wrote:anyway we can have a sort of very simple MOD player i guess

Yes, but it will barely usable because of many drawbacks:
- It will require to write new music for it (taking all limitations in account)
- To compensate lack of pitch effects longer samples will be needed (takes more memory itself, and much more when duplicated with all pitches)
- Music data will be large anyway
- Not very suitable for games, because no sampled sound effects (or muting music channels, which is sounds bad, or 2-3 channels music, or lower quality of sound to make additional channels for effects)
True, not very suitable for real use afaik... just a proof of concept

Posted: Sun Feb 22, 2009 5:59 pm
by Stef
TmEE co.(TM) wrote:now it works, pretty nice, and quality is very good too

Thanks

Strangely the quality is better than my first driver which was using similar code at the same output rate :-/
Posted: Sun Feb 22, 2009 8:12 pm
by TmEE co.(TM)
http://www.fileden.com/files/2008/4/21/ ... 4ch_01.rar
a mirror, for people who might get further trouble accessing Stef's link

Posted: Mon Feb 23, 2009 2:05 pm
by Stef
Thanks

Unfortunatly i lost my password for my usual FTP so i had to do with this crappy stuff.
Posted: Thu Feb 26, 2009 11:54 pm
by Snake
Stef wrote:TmEE co.(TM) wrote:now it works, pretty nice, and quality is very good too

Thanks

Strangely the quality is better than my first driver which was using similar code at the same output rate :-/
I often find I write something better the second time around

Probably some bug, typo, or timing error that was too easy to miss.