Module music in my programm.
Moderator: Stef
Module music in my programm.
Whether there is a module player compatible with SGDK ?
For now I found only injectror, which allows to replace the standard music to custom.
http://oerg866.tototek.com/toy.html
For now I found only injectror, which allows to replace the standard music to custom.
http://oerg866.tototek.com/toy.html
-
- Very interested
- Posts: 3131
- Joined: Thu Nov 30, 2006 9:46 pm
- Location: France - Sevres
- Contact:
Re: Module music in my programm.
I think he's looking for a real MOD player for Megadrive. And except the one borrowed from ToyStory game i don't know any other.
Re: Module music in my programm.
And this -> http://www.pouet.net/prod.php?which=64438Stef wrote:And except the one borrowed from ToyStory game i don't know any other.
-
- Very interested
- Posts: 3131
- Joined: Thu Nov 30, 2006 9:46 pm
- Location: France - Sevres
- Contact:
Re: Module music in my programm.
As far I can tell this is just a simple music player for Megadrive with Megadrive designed musics, nothing common with MOD musics.
-
- Very interested
- Posts: 616
- Joined: Thu Nov 30, 2006 6:30 am
Re: Module music in my programm.
Stuck Somewhere in Time uses an actual MOD player, the caveat is that it runs almost entirely on the 68K (and chews up a fair bit of CPU time IIRC) with the Z80 only handling delivery of samples to the DAC from a buffer in its RAM.Stef wrote:As far I can tell this is just a simple music player for Megadrive with Megadrive designed musics, nothing common with MOD musics.
EDIT: Here's the Spritesmind thread about it.
-
- Very interested
- Posts: 3131
- Joined: Thu Nov 30, 2006 9:46 pm
- Location: France - Sevres
- Contact:
Re: Module music in my programm.
Oh i completely forgot it was a MOD player :p 26 Khz playback, that is definitely interesting.
About having it running on the 68k, well i believe it would be hard to have it running on the Z80 only anyway, the best we can do is to share the work: maybe using 20% of 68k time to pre compute some parts then send final mixing operations to Z80.
About having it running on the 68k, well i believe it would be hard to have it running on the Z80 only anyway, the best we can do is to share the work: maybe using 20% of 68k time to pre compute some parts then send final mixing operations to Z80.
-
- Very interested
- Posts: 616
- Joined: Thu Nov 30, 2006 6:30 am
Re: Module music in my programm.
Yeah, it's really hard to resample and mix more than 2 channels simultaneously on just the Z80 at any reasonable sample rate.Stef wrote:About having it running on the 68k, well i believe it would be hard to have it running on the Z80 only anyway,
Yeah, mixing 4 channels is obviously possible since you've done it. I imagine volume should be possible to do on the Z80 side as well. I do wonder if you can reasonably keep the 68K time down to 20% though. Hard to push samples through efficiently when you can only pause the Z80 for a relatively short period at a time without overly interfering with playback.Stef wrote:the best we can do is to share the work: maybe using 20% of 68k time to pre compute some parts then send final mixing operations to Z80.
-
- Very interested
- Posts: 3131
- Joined: Thu Nov 30, 2006 9:46 pm
- Location: France - Sevres
- Contact:
Re: Module music in my programm.
In fact I have a driver doing 4pcm mixing + volume/envelop (16 levels) but it supports envelop change once per frame and I'm not sure that enough to produce acceptable ADSR env reproduction.
About 68k <---> Z80 communication, you always have the SRAM possibility. To be honest I never tried it but I see no reason why it wouldn't work
About 68k <---> Z80 communication, you always have the SRAM possibility. To be honest I never tried it but I see no reason why it wouldn't work
Re: Module music in my programm.
Z80 qualitatively mixes samples
ZX-spectrum 48k (3 channel's 4 bit's):
https://youtu.be/3MNHP-hBMLI?t=46
ZX-spectrum 48k (3 channel's 4 bit's):
https://youtu.be/3MNHP-hBMLI?t=46
-
- Very interested
- Posts: 3131
- Joined: Thu Nov 30, 2006 9:46 pm
- Location: France - Sevres
- Contact:
Re: Module music in my programm.
Does it really mix samples ? 3x4 bit channel sounds like it's using the AY channels (which make sense of course). We could also do that on MD (use the PSG) to lower Z80 CPU usage.
-
- Very interested
- Posts: 616
- Joined: Thu Nov 30, 2006 6:30 am
Re: Module music in my programm.
It does seem likely that it's using the AY hardware to handle the mixing. That said, mixing isn't all that expensive compared to the other stuff you need to do. The problem we have on the Gen/MD is that it's rather expensive to switch banks and you have to avoid doing any access to the 68K's bus while DMA is running. If you don't mind to limiting yourself to what will fit in the meager RAM of the Z80, then I suspect you could resample and mix 3 channels without too much trouble.