Relationship between VDP and User/Kernel Mode?

For anything related to VDP (plane, color, sprite, tiles)

Moderators: BigEvilCorporation, Mask of Destiny

Gigasoft
Very interested
Posts: 95
Joined: Fri Jan 01, 2010 2:24 am

Post by Gigasoft » Sun Jan 03, 2010 8:53 pm

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.

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

Post by Stef » Sun Jan 03, 2010 9:42 pm

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...
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.

And yeah, basically i'm the creator of Gens, i'm an inconditionnal sega genesis fan :p

eteream
Very interested
Posts: 81
Joined: Tue Dec 22, 2009 2:13 pm

Post by eteream » Tue Jan 05, 2010 3:58 am

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.
That timers sounds interesting...
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).
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?
Stef wrote:And yeah, basically i'm the creator of Gens, i'm an inconditionnal sega genesis fan :p
you are awesome man! wow!
Last edited by eteream on Tue Jan 05, 2010 5:12 pm, edited 1 time in total.

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

Post by TmEE co.(TM) » Tue Jan 05, 2010 4:03 am

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

tomaitheous
Very interested
Posts: 256
Joined: Tue Sep 11, 2007 9:10 pm

Post by tomaitheous » Tue Jan 05, 2010 5:45 am

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?
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
Very interested
Posts: 81
Joined: Tue Dec 22, 2009 2:13 pm

Post by eteream » Tue Jan 05, 2010 1:04 pm

Ok, I got it. When you speak about DAC you include PCM sound in it. Z80 is more slow than it seems. All it sounds very hard.

¿Do you know if old comercial games uses PCM+FM to do sound effects+music?

Flygon
Very interested
Posts: 60
Joined: Mon Sep 28, 2009 11:26 am
Contact:

Post by Flygon » Tue Jan 05, 2010 1:47 pm

Commercial games did indeed do PCM and FM at the same time (Such as Shining Force or Sonic the Hedgehog), in fact, I'm sure most of the games released for the console did.

Unless I've missed the point of the question completely, in which case, ignore this post.

eteream
Very interested
Posts: 81
Joined: Tue Dec 22, 2009 2:13 pm

Post by eteream » Tue Jan 05, 2010 5:14 pm

This is it. Thanks!

Post Reply