It is currently Tue May 22, 2018 3:24 am

All times are UTC - 7 hours





Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Sat Jan 27, 2018 10:52 am 
Offline
User avatar

Joined: Sun Nov 09, 2008 9:18 pm
Posts: 1079
Location: Pennsylvania, USA
I found some old code in ggsound that apparently does nothing to the sweep unit but set the negate flag. Removing all the code which references and uploads this register results in unchanged behavior. I can't remember why I have it in the codebase, except that it must have been something from MetalSlime's original audio tutorial from which I originally learned.

What is the behavior of the sweep unit if you do absolutely nothing to it from startup, or is it advised to at least set it to some nominal value?


Top
 Profile  
 
PostPosted: Sat Jan 27, 2018 11:31 am 
Offline
User avatar

Joined: Fri May 08, 2015 7:17 pm
Posts: 2050
Location: DIGDUG
You need to set the N flag of the sweep register in order for the lowest notes to play (even without a sweep)

Ive noticed that games set the sweep register to $7f, when sweeps are off.

_________________
nesdoug.com -- blog/tutorial on programming for the NES


Top
 Profile  
 
PostPosted: Sat Jan 27, 2018 11:43 am 
Offline
User avatar

Joined: Sun Jan 22, 2012 12:03 pm
Posts: 6289
Location: Canada
It's initialized at power on, BUT using a game genie will mess that up. Some of the Mega Man games never touch the sweep registers and have messed up music if you play with a Game Genie.


Top
 Profile  
 
PostPosted: Sun Jan 28, 2018 9:48 am 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 20061
Location: NE Indiana, USA (NTSC)
You can't play notes in the pulse channels' lowest octave (what FamiTracker calls A-0 through G#1) if the sweep is at the default ($00). From APU Sweep on NESdev Wiki:

If at any time the target period is greater than $7FF, the channel is muted. In particular, if the negate flag is false, the shift count is zero, and the current period is at least $400, the target period will be large enough to mute the channel. (This is why several publishers' NES games never seem to use the bottom octave of the pulse waves.)


Further reading: Google Search: lowest octave site:nesdev.com


Top
 Profile  
 
PostPosted: Mon Jan 29, 2018 12:32 am 
Offline
User avatar

Joined: Fri Nov 12, 2004 2:49 pm
Posts: 7432
Location: Chexbres, VD, Switzerland
rainwarrior wrote:
It's initialized at power on, BUT using a game genie will mess that up. Some of the Mega Man games never touch the sweep registers and have messed up music if you play with a Game Genie.

So this means Mega Man games using the old Capcom sound driver (Mega Man and Mega Man 2) cannot use the lowest octave with pulse waves?


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 14 guests


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