I can’t get the noise channel to work properly, all I get is clicking sounds and a constant low humming… What am I doing wrong?
//Use a mid-range frequency
u16 freq = 0x3FF;
//Set the frequency
SND_REGS[5].SxFQH = freq >> 8;
SND_REGS[5].SxFQL = freq & 0xFF;
//Set maximum volume
SND_REGS[5].SxLRV = 0xFF;
//Set the envelope to fade out in about 2 seconds
//Also selects one of the 8 noise types
SND_REGS[5].SxEV0 = 0xF7;
SND_REGS[5].SxEV1 = 0x31;
//Start the sound. No interval (uses envelope)
SND_REGS[5].SxINT = 0x9F;
I’m doing the same for the “normal” channels, and they work fine…
Heh, my bad… that code actually does work on hardware. I was fiddling with different values that didn’t work, then eventually I only tried stuff in rb, where it doesn’t π
There’s also a convenient (but probably useless to a beginner) quick reference to the relevant I/O (well, technically just “O” ;-)) ports in the Wiki, thanks to yours truly π
I really need to get busy putting the rest up, but I didn’t want to just plagiarize the manual–if for no other reason than the typos and slightly “engrish” grammar choices! π Plus, I think the organization could be better.
I could, however, provide my OCR’d version so you could make a new (smaller) PDF, but you’d have to reverse some changes I’ve already made and restore the page headers/footers. PM/email me if you want it… I’ve also got the NVC and VIP sections OCR’d, though the latter hasn’t been completely proofread yet.