Relationship between VDP and User/Kernel Mode?
Moderators: BigEvilCorporation, Mask of Destiny
I use VINT as a timer, and I decrement each channel's timer according to an overflow value made by adding the song's speed to a global timer. That works out well. The YM2612 also has two programmable timers that you can poll. You don't need to share addresses between the two programs. You can just include the file with your music at an aligned, known address.
-
- Very interested
- Posts: 3131
- Joined: Thu Nov 30, 2006 9:46 pm
- Location: France - Sevres
- Contact:
As far you're going on Z80, i think you should stay with asm. You have limited memory space and limited cpu time (if you want to deal with DAC stuff). Also that permit you to calculate all your loop cycle to assure good timing without pooling YM2612 timers.eteream wrote: The only thing that is mising is a C compiler for Z80... and well, a method to share real address between the two compilations (for music mapping from Z80 to ROM).
I'm tring the SDCC compiler for C for Z80, but it generates some king of hexadecimal code, i'm working on it...
EDIT:
Now I see that since there is no kind of timers on the z80, the timing of cicles of instructions are used to do the 'timing'. Well, you can use VINT as a timers, if you find music at 60hz... So doing it with C sounds crazy... well, unless you modify the compiler...
And yeah, basically i'm the creator of Gens, i'm an inconditionnal sega genesis fan :p
That timers sounds interesting...Gigasoft wrote:I use VINT as a timer, and I decrement each channel's timer according to an overflow value made by adding the song's speed to a global timer. That works out well. The YM2612 also has two programmable timers that you can poll.
I'm lost at this point. Why is DAC difficult? As far as I know PCM seems to be the hardest part, the most consuming resources thing.Stef wrote: As far you're going on Z80, i think you should stay with asm. You have limited memory space and limited cpu time (if you want to deal with DAC stuff).
By limited cpu time, do you mean response time? or not so much instructions per second?
you are awesome man! wow!Stef wrote:And yeah, basically i'm the creator of Gens, i'm an inconditionnal sega genesis fan :p
Last edited by eteream on Tue Jan 05, 2010 5:12 pm, edited 1 time in total.
-
- Very interested
- Posts: 2440
- Joined: Tue Dec 05, 2006 1:37 pm
- Location: Estonia, Rapla City
- Contact:
Doing PCM is very simple, its that if you use C you will maybe reach 8KHz sample rate and have no time for doing other things without major negative consequences on PCM playback quality..... Z80 is not exactly fast, and C is not really meant for slow stuff.... so slow + slow = very slow.
Here is small example of what my MD Z80 sound engine can do :
http://8bitcollective.com/music/TmEE/Wi ... tter+(MD)/
...all 100% ASM, 100% real HW recording...
Here is small example of what my MD Z80 sound engine can do :
http://8bitcollective.com/music/TmEE/Wi ... tter+(MD)/
...all 100% ASM, 100% real HW recording...
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
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen
-
- Very interested
- Posts: 256
- Joined: Tue Sep 11, 2007 9:10 pm
No interrupts to feed the DAC. And the DAC isn't self feeding. Those two things make it a pain in the ass. If it weren't for the Z80 (being a separate processor to dedicate to pure timing via instructions), samples would pretty much null on the system.eteream wrote: I'm lost at this point. Why is DAC difficult? As far as I know PCM seems to be the hardest part, the most consuming resources thing.
By limited cpu time, do you mean response time? or not so much instructions per second?