Page 1 of 1
How to clear APU sweep unit reload flag
Posted: Sat Mar 08, 2014 11:03 pm
by Boolean
wiki says(Sorry,I'm not sure it should be says or say or said) Each sweep unit contains the following: divider, reload flag.
The reload flag is set when write $4001 or $4005.
But when clear it?
Thanks for your answer.
Re: How to clear APU sweep unit reload flag
Posted: Sun Mar 09, 2014 12:24 am
by Disch
It gets reset (cleared) when the Sweep Unit is clocked by the Frame Sequencer.
Re: How to clear APU sweep unit reload flag
Posted: Sun Mar 09, 2014 12:36 am
by Boolean
Disch wrote:It gets reset (cleared) when the Sweep Unit is clocked by the Frame Sequencer.
It seems no. wiki describes
SET only. Please see the pic.
Re: How to clear APU sweep unit reload flag
Posted: Sun Mar 09, 2014 12:40 am
by lidnariq
nesdevwiki wrote:If the reload flag is set, the divider's counter is set to the period P. If the divider's counter was zero before the reload and the sweep is enabled, the pulse's period is also adjusted (if the target period is in range; see below).
I
think there is a missing "The reload flag is then cleared" after the above quoted text, but I am not familiar with the mechanism of the sweep units.
Re: How to clear APU sweep unit reload flag
Posted: Sun Mar 09, 2014 12:46 am
by Boolean
Thanks to everyone. I decide to read neswiki, 2A03 technical reference and apu_ref simultaneously to seek the result.
Re: How to clear APU sweep unit reload flag
Posted: Sun Mar 09, 2014 7:41 am
by rainwarrior
Yes, the reload flag is cleared when the sweep unit is clocked. I will add that to the text.
If you want to clear the reload flag, you can manually clock the APU frame sequencer by writing $4017 with bit 7 set.
Re: How to clear APU sweep unit reload flag
Posted: Sun Mar 09, 2014 9:44 am
by Boolean
rainwarrior wrote:Yes, the reload flag is cleared when the sweep unit is clocked. I will add that to the text.
If you want to clear the reload flag, you can manually clock the APU frame sequencer by writing $4017 with bit 7 set.
Thank you. Recently, I am implementing APU for my emulator, so I try my best to confirm any info about APU.