Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /storage/content/49/145849/famitracker.com/public_html/forum/classes/dbHandler.php on line 29
I know this might be better suited for the nesdev forums but I'm not sure if sound is of primary importance there.
Is this possible?
Now this is just me thinking what I'd like to attempt in the future, and seeing how only Rockman 4 MI was the only Mega Man hack to do it, (Only used the common Konami kick drum) it might be a very difficult thing to do (even though it doesn't seem like it) but once I get familiar with 6502 asm, I might try to modify the sound engine to allow DPCM samples (just two very short and basic drums would take less than 350 bytes).
It's very easy to move all the pointer and instrument tables in the sound engine to squeeze in the samples to the right place in PRG-ROM.
Based on this documentation it would be really easy to set this up, I'd just have to make a fifth similar "channel data checking" routine that handles the data similarly to the other 4 channels.
[i]The DMC channel, commonly referred to as the 'PCM' channel, uses two
methods of digital audio playback: DMA and RAW.
The DMA method is most commonly used. The steps for playback are as
follows:
1) Set $4012 (DMC Address Register) to the 64-byte aligned offset
within PRG-ROM $C000-FFFF. For instance, if $8E is written here,
the sample data will be loaded from ($8E*64)+C000, or $E380.
2) Set $4013 (DMC Length Register) to the length of the sample data.
The sample length is defined as (16*x)+1, where x is the value
written.
3) Set $4010 (DMC Frequency Register) to whatever 4-bit frequency
you desire.
4) Set Bit #4 of $4015 (Channel Control) to 1, enabling the DMC
channel.[/i]
This looks like I could very easily LDA & STA the correct values to these registers. Could it be that easy? (Of course I'd stick two lines in to write to $4011 just like konami did)
The hard part is finding empty space in memory to put your samples.
In an NSF I'd say you might be able to do it. In an NES ROM, it'd be much harder. The problem with DPCM is you need the sample banked in all the time. Other stuff like code you can just bankswitch in as needed.