Blarrg, I've got a question on how to do this like int Tri_wave.nes so that I can make it into a sample to use with MCK. You seem to have $4012 loaded with ram $0007 (which toggles between $80 and $81). $4012 is loaded with #$00 so it's exactly a 1 byte sample.
Both areas that $4012 point to is $e000 (value of $00, DMC address when $4012 = $80) and $e040 (value of $ff, DMC address when $4012 = $81). You keep toggling between them with the DPCM to produve triangle waves.
And also $4010 has playback mode IRQ generating after the 1-byte sample has finished (in which stuff happens and eventually loads $0007 with either $80 or $81 depending on $0003 and some rom value that is dependant on $0003).
You see I need to get this working in MCK. I just need to know (as I'm too lazy to figure out the rest of your rom) how much $0007/$4012 is toggled so that I can figure out the exact waveform. I've tried to get this working in MCK, but the triangle waves I produce usually don't sound anything like the native 2A03 triangle wave (I've tried $FF, $00, $00, $FF....$F0, $F0, $F0, F0....$00, $00, $FF, $FF....you know loops like those, but they don't work) like your does.
And also you seem to have more frequencies then 16....how'd you do that?
In MCK I've "hacked" a way to get DMC frquency control + playback control so I would like to get some waves playin on the DMC at different frequencies and have them keep looping (so like 4 byte dmc files that keep looping...so you know have the very end of the file end at where the beggining of the file starts and loop it).....and my first one is the triangle wave.
If you (or anyone) could help me out I'd be grateful. :-)