APU Book

Discuss technical or other issues relating to programming the Nintendo Entertainment System, Famicom, or compatible systems.

Moderator: Moderators

Post Reply
User avatar
org
Posts: 106
Joined: Tue Aug 07, 2012 12:27 pm

APU Book

Post by org »

A new book is out, this time about the APU design.

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

Enjoy! :)
User avatar
Quietust
Posts: 1840
Joined: Sun Sep 19, 2004 10:59 pm
Contact:

Re: APU Book

Post 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.
Quietust, QMT Productions
P.S. If you don't get this note, let me know and I'll write you another.
dink
Posts: 120
Joined: Sun Jan 12, 2020 8:42 pm

Re: APU Book

Post by dink »

org, this is very nice, thank you!
User avatar
org
Posts: 106
Joined: Tue Aug 07, 2012 12:27 pm

Re: APU Book

Post 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
User avatar
org
Posts: 106
Joined: Tue Aug 07, 2012 12:27 pm

Re: APU Book

Post 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"?
Attachments
nes_scans_apu.png
User avatar
Quietust
Posts: 1840
Joined: Sun Sep 19, 2004 10:59 pm
Contact:

Re: APU Book

Post 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.
Quietust, QMT Productions
P.S. If you don't get this note, let me know and I'll write you another.
User avatar
org
Posts: 106
Joined: Tue Aug 07, 2012 12:27 pm

Re: APU Book

Post 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
Post Reply