View Single Post
Old 07 November 2009, 16:36   #200
Registered User

8bitbubsy's Avatar
Join Date: Sep 2009
Location: Norway
Age: 28
Posts: 1,255
Send a message via MSN to 8bitbubsy
Originally Posted by TheCyberDruid View Post
Didn't Dan say that you could easily overcome that problem by using the cartrigde rom memory? The original song has under 256 KB, so that isn't that much
Well, that wouldn't be easy! Remember that the sound CPU can't read directly from the mapped cart ROM The main CPU need to move it first.
First, you say to the CPU that it should send the music data (player code, pattern + samples) to the sound RAM... I think the sound RAM is mapped as a $0000-$FFFF (65535) range somewhere in the local SNES RAM... Then you need to tell the sound CPU to get his ass off the couch and start processing the data (for a normal "tracker like" player: read patterns, update channels, mix it)... Then the sound DSP filters and converts the mixed sound to analog output and sends it to the outter world for pure pleasure!

The problem here is that the sound CPU is always processing the code in sound RAM... So dropfeeding new samples etc is an advanced thing to do... You have to make sure that the stored sound sample of choice is done playing (precise timing), then you can read the new one from cart_address + sample_offset to sound_ram_address + sample_offset, quick as hell.. (or some other smart way, all depending on your player code). "Why not tell the sound CPU to read the sample from another memory address?" Because you only have 64kB, d'oh!!
Another problem is the limitation of controlling the sound CPU... I think you can only access it through an 8 bit bus, which makes the whole thing even more of a pain!

But! If you don't need to dropfeed samples (e.g. just live with the 64kB limitation), it's all good and nice.

Last edited by 8bitbubsy; 07 November 2009 at 17:01.
8bitbubsy is offline  
Page generated in 0.05028 seconds with 9 queries