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 FamiTracker
Login:
Menu:
Post: Author:
FamiTracker > General > Bug Reports & Feature Requests > Feature request: DPCM generated waveforms. Owner: Im_a_Track_Man New post
Page 1 of 1 Sort:  
Feature request: DPCM generated waveforms. Posted: 2012-09-17 18:35 Reply | Quote
Im_a_Track_Man

Avatar

Member for: 4137 days
Location: Plantation, Florida
Status: Offline

#39646
I've been thinking about asking about this since I came across it a few months ago. Since a DMC sample is made up of various stepped levels, it is possible to internally modify the step values to produce a crude custom waveform like pulses, "sharkfins", and sawtooths... sawtee- \\\ <those.

This was apparently [url=http://famitracker.com/forum/posts.php?id=171]previously discussed although the Gameboy is somehow involved.

And a link to the page where an explanation was [url=http://slack.net/~ant/misc/nes-saw/]given by kreese, but here's [url=http://slack.net/~ant/misc/nes-saw/old-saw.html]the older one as well.

_______________________
[BURNING LOVE]
[url=http://www.youtube.com/user/ImATrackMan]YouTube
[url=https://twitter.com/ImATrackMan]Twitter (Stay off my lawn, kids)
Posted: 2012-09-17 19:04 Reply | Quote
za909

Avatar

Member for: 3962 days
Location: Hungary
Status: Offline

#39648
A sawtooth would be nice, if it's possible to reset the delta counter to 0 every time a looped ramp-sample would complete a cycle. But I guess that's only possible with overclocking.

_______________________
Rectangular sh*t ©
Posted: 2012-09-17 19:17  (Last Edited: 2012-09-17 19:25) Reply | Quote
Im_a_Track_Man

Avatar

Member for: 4137 days
Location: Plantation, Florida
Status: Offline

#39649
There are actually a couple of .NESs (not NSFs) on nesdev that show this is very possible on a normal NES (Not to mention the fact that both of mine ran them). No overclocking necessary.


[edited to clarify.]

_______________________
[BURNING LOVE]
[url=http://www.youtube.com/user/ImATrackMan]YouTube
[url=https://twitter.com/ImATrackMan]Twitter (Stay off my lawn, kids)
Posted: 2012-09-17 19:21 Reply | Quote
rainwarrior

Avatar

Member for: 4150 days
Location: Canada
Status: Offline

#39651
That is exactly how SuperNSF and other PCM playback works.

If you're talking about Blargg's crude sawtooth demo, that requires IRQs, which are outside the NSF spec.

Running the NSF at a high update rate can sort of let you do it manually, but you will run out of CPU at a relatively low frequency on a real NES.

Posted: 2012-09-17 19:48 Reply | Quote
B00daW

Avatar

Member for: 4986 days
Status: Offline

#39657
Im_a_Track_Man: A few points of clarification. What you're seeing there is in fact 7-bit PCM directly written to the DAC. Blargg is calling it "DMC" because that's what the register is called. One of the bits is used to decode 1-bit DPCM to 7-bit PCM. A lot of players currently use PCM: MuseTracker, SuperNSF, and DefleMask.
SuperNSF is superior to the others. jsr would have to totally rewrite his player code to include PCM. It's a very cycle-based and exact process that the entire engine has to be based around. Basically you get PCM to play first, then you write the rest of the engine around it.

DPCM sample generation is possible. It's even possible to draw DPCM samples. It's kind of a mucky process; plus you still have to use the DPCM frequency divider. You'd have to draw three samples off by a half-step each and then have a look up table to fill in the blanks to have a couple full octaves.

I'm not saying it's not feasible or possible. I think we have a lot of other interesting DPCM ideas on the table and this could be one of the good ones after some others are implemented.

Posted: 2012-09-17 20:21  (Last Edited: 2012-09-17 20:26) Reply | Quote
za909

Avatar

Member for: 3962 days
Location: Hungary
Status: Offline

#39662
Interesting, I made saw waves in FT but obviously this method is of no use.
Although if you use higher pitches for the sample you can turn it into a low duty- pulse kind of wave.

_______________________
Rectangular sh*t ©
Attachments:
useless_saw.ftm (1 Kb)
Page 1 of 1 Sort: