Z80 driver - 4 channels player with volume control.

Announce (tech) demos or games releases

Moderator: Mask of Destiny

Stef
Very interested
Posts: 2982
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Z80 driver - 4 channels player with volume control.

Post by Stef » Sun Feb 22, 2009 4:24 pm

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
Last edited by Stef on Sun Feb 22, 2009 4:56 pm, edited 1 time in total.

mic_
Very interested
Posts: 265
Joined: Tue Aug 12, 2008 12:26 pm
Location: Sweden
Contact:

Post by mic_ » Sun Feb 22, 2009 4:47 pm

You can download the rom here.
The page briefly displays some message in french, then it goes blank and nothing happens.

Shiru
Very interested
Posts: 786
Joined: Sat Apr 07, 2007 3:11 am
Location: Russia, Moscow
Contact:

Re: Z80 driver - 4 channels player with volume control.

Post by Shiru » Sun Feb 22, 2009 4:48 pm

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.
Last edited by Shiru on Sun Feb 22, 2009 4:48 pm, edited 1 time in total.

TmEE co.(TM)
Very interested
Posts: 2373
Joined: Tue Dec 05, 2006 1:37 pm
Location: Estonia, Rapla City
Contact:

Post by TmEE co.(TM) » Sun Feb 22, 2009 4:55 pm

Also cannot get anything :/
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

Stef
Very interested
Posts: 2982
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Post by Stef » Sun Feb 22, 2009 4:56 pm

sorry, i fixed the link !

Stef
Very interested
Posts: 2982
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Re: Z80 driver - 4 channels player with volume control.

Post by Stef » Sun Feb 22, 2009 4:58 pm

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 ;)

mic_
Very interested
Posts: 265
Joined: Tue Aug 12, 2008 12:26 pm
Location: Sweden
Contact:

Post by mic_ » Sun Feb 22, 2009 5:10 pm


Stef
Very interested
Posts: 2982
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Post by Stef » Sun Feb 22, 2009 5:16 pm

mic_ wrote:
Does MOD support all that ??
http://www.k9spud.com/traxmod/modplayer/effects.php
hmmm ok so MOD won't be that easy ^^

TmEE co.(TM)
Very interested
Posts: 2373
Joined: Tue Dec 05, 2006 1:37 pm
Location: Estonia, Rapla City
Contact:

Post by TmEE co.(TM) » Sun Feb 22, 2009 5:20 pm

now it works, pretty nice, and quality is very good too :D
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

Shiru
Very interested
Posts: 786
Joined: Sat Apr 07, 2007 3:11 am
Location: Russia, Moscow
Contact:

Re: Z80 driver - 4 channels player with volume control.

Post by Shiru » Sun Feb 22, 2009 5:40 pm

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)

Stef
Very interested
Posts: 2982
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Re: Z80 driver - 4 channels player with volume control.

Post by Stef » Sun Feb 22, 2009 5:56 pm

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 :)

Stef
Very interested
Posts: 2982
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Post by Stef » Sun Feb 22, 2009 5:59 pm

TmEE co.(TM) wrote:now it works, pretty nice, and quality is very good too :D
Thanks :D
Strangely the quality is better than my first driver which was using similar code at the same output rate :-/

TmEE co.(TM)
Very interested
Posts: 2373
Joined: Tue Dec 05, 2006 1:37 pm
Location: Estonia, Rapla City
Contact:

Post by TmEE co.(TM) » Sun Feb 22, 2009 8:12 pm

http://www.fileden.com/files/2008/4/21/ ... 4ch_01.rar

a mirror, for people who might get further trouble accessing Stef's link :)
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

Stef
Very interested
Posts: 2982
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Post by Stef » Mon Feb 23, 2009 2:05 pm

Thanks ;)
Unfortunatly i lost my password for my usual FTP so i had to do with this crappy stuff.

Snake
Very interested
Posts: 203
Joined: Sat Sep 13, 2008 1:01 am

Post by Snake » Thu Feb 26, 2009 11:54 pm

Stef wrote:
TmEE co.(TM) wrote:now it works, pretty nice, and quality is very good too :D
Thanks :D
Strangely the quality is better than my first driver which was using similar code at the same output rate :-/
:D

I often find I write something better the second time around ;) Probably some bug, typo, or timing error that was too easy to miss.

Post Reply