Page 1 of 1

APU Book

Posted: Fri Feb 25, 2022 9:20 am
by org
A new book is out, this time about the APU design.

https://github.com/emu-russia/breaks/re ... -book-revA

Enjoy! :)

Re: APU Book

Posted: Sat Feb 26, 2022 3:38 pm
by Quietust
In the "LFO" (Frame Counter) section, you describe the two Mode settings as "NTSC" and "PAL", but I'm not sure that makes sense - on the NTSC 2A03 mode 0 runs at 60Hz while mode 1 effectively runs at 48Hz (not 50Hz), and on the PAL 2A07 mode 0 runs at 50Hz while mode 1 effectively runs at 40Hz. In both cases, mode 0 will run at the "correct" framerate roughly matching the PPU (within ~50 cycles on NTSC and within ~7 cycles on PAL), while mode 1 runs 20% slower.

There's also the fact that IRQs are only generated in mode 0, while in mode 1 they are suppressed, and it wouldn't make much sense for an NTSC/PAL toggle to have that sort of side effect. It's my recollection that most games that use mode 0 simply write to $4017 once and then let the frame counter gradually drift from the PPU, while games that use mode 1 write to $4017 every frame (and thus keep it synchronized with the PPU) and don't actually allow the frame counter to reach the "5th" phase where it would automatically reload.

Re: APU Book

Posted: Sat Feb 26, 2022 6:22 pm
by dink
org, this is very nice, thank you!

Re: APU Book

Posted: Sun Feb 27, 2022 11:48 am
by org
In the "LFO" (Frame Counter) section, you describe the two Mode settings as "NTSC" and "PAL"...
Yes, there will need to be some revision there.

And the name "LFO" itself can also be controversial, because it is commonly considered that LFOs are frequencies of about 20 Hz.
But it's also not "Frame Counter" as they call it.
Anyway, we'll think of something.

As for the rest, all comments will be taken into account! Thank you)

In addition, the same section was recently updated on the nesdev Wiki: https://wiki.nesdev.org/w/index.php?tit ... me_Counter

Re: APU Book

Posted: Sun Feb 27, 2022 3:35 pm
by org
Studying the worn scans of the official documentation, I could only make out the mention of LFO as "Soft CLK".

Can anyone confirm that this is the official name for "Frame Counter"?

Re: APU Book

Posted: Sun Feb 27, 2022 4:59 pm
by Quietust
org wrote: Sun Feb 27, 2022 11:48 am In addition, the same section was recently updated on the nesdev Wiki: https://wiki.nesdev.org/w/index.php?tit ... me_Counter
Indeed - I just added the PAL timings from the delayered RP2A07 images you posted on Google Drive a few months ago.
org wrote: Sun Feb 27, 2022 3:35 pm Studying the worn scans of the official documentation, I could only make out the mention of LFO as "Soft CLK".
That image also identifies bit 7 as "EXT MODE", which I suppose could be "Extended Mode" since it lengthens the overall period of the clock.

Re: APU Book

Posted: Thu Jun 23, 2022 6:37 am
by org
Preparing for the great fusion of the three books.

Сonverted to A4 paper size and enlarged the font.

https://github.com/emu-russia/breaks/re ... book-revA6