It is currently Wed Jan 16, 2019 7:16 pm

All times are UTC - 7 hours

Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Thu Sep 18, 2014 9:41 pm 
Formerly ~J-@D!~
User avatar

Joined: Sun Mar 12, 2006 12:36 am
Posts: 479
Location: Rive nord de Montréal
Hey, I just thought of a way to silence the triangle channel using $4015 without having trouble with the DMC. That's pretty simple:

  • After you start a (non-looped) DPCM sample, write 0 to $4013 and optionally write to $4012 the sample "address" of a silent byte ($55 or $AA);
  • Silence the triangle channel with a read/clear bit 2/write to $4015.

Note that only the 1 -> 0 transition of $4015.4 can be asynchronous. So between the read/write of $4015, $4015 might get clear by hardware then set by our write, triggering a sample start; but because we wrote 0 to $4013, it will only play a 1-byte sample that will go unnoticed. Furthermore, even at the slowest rate, the sample will finish much quickly than a frame, so the 1-byte sample will play 0 or 1 times, never more.

((λ (x) (x x)) (λ (x) (x x)))

PostPosted: Thu Oct 23, 2014 10:09 pm 
User avatar

Joined: Sun Jan 22, 2012 12:03 pm
Posts: 7106
Location: Canada
Interesting way to deal with that edge case.

I've always preferred to silence the triangle by loading the length counter with 0. It has a 1/4 frame delay, I guess, but I've never found that unacceptable and it completely obviates this issue. (Also lets me use $4015 bits for a global silence control.)

Alternatively you can set it to the highest frequency as a form of silence, but this tends to make a more prominent pop than the regular halt, I find, and also may cause aliasing instead of silence on emulators that don't hack the high frequency triangle to silent.

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 7 hours

Who is online

Users browsing this forum: No registered users and 1 guest

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group