I finished writing an APU last weekend, and during that process I discovered what appears, at least from my perception, to be a discrepancy on the wiki.
https://wiki.nesdev.com/w/index.php/APU shows this (which originally comes from apu_ref.txt):
Which is different from this concerning 5-step mode: https://wiki.nesdev.com/w/index.php/APU_Frame_Counter
When implemented in code, I discovered that I had my 5-step mode wrong, resulting in warped and cut off sounds in 5-step mode in my emulator. So, I changed it to be something more like this, which matches up with the APU Frame Counter wiki page:
Am I just misinterpreting this? The way I have things implemented now, everything sounds perfect.
https://wiki.nesdev.com/w/index.php/APU shows this (which originally comes from apu_ref.txt):
Code:
mode 0: mode 1: function
--------- ----------- -----------------------------
- - - f - - - - - IRQ (if bit 6 is clear)
- l - l l - l - - Length counter and sweep
e e e e e e e e - Envelope and linear counter
--------- ----------- -----------------------------
- - - f - - - - - IRQ (if bit 6 is clear)
- l - l l - l - - Length counter and sweep
e e e e e e e e - Envelope and linear counter
Which is different from this concerning 5-step mode: https://wiki.nesdev.com/w/index.php/APU_Frame_Counter
When implemented in code, I discovered that I had my 5-step mode wrong, resulting in warped and cut off sounds in 5-step mode in my emulator. So, I changed it to be something more like this, which matches up with the APU Frame Counter wiki page:
Code:
mode 0: mode 1: function
--------- ----------- -----------------------------
- - - f - - - - - IRQ (if bit 6 is clear)
- l - l - l - - l Length counter and sweep
e e e e e e e - e Envelope and linear counter
--------- ----------- -----------------------------
- - - f - - - - - IRQ (if bit 6 is clear)
- l - l - l - - l Length counter and sweep
e e e e e e e - e Envelope and linear counter
Am I just misinterpreting this? The way I have things implemented now, everything sounds perfect.