Cycle times of common things reference

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

Moderator: Moderators

User avatar
Sumez
Posts: 909
Joined: Thu Sep 15, 2016 6:29 am
Location: Denmark (PAL)

Re: Cycle times of common things reference

Post by Sumez » Tue Nov 20, 2018 12:31 am

This is great!

hblank length could be useful, but more than anything I think what's useful is how to time a PPU write guaranteed to hit hblank in combination with something like the MMC3 scanline counter. I think such examples already exist on the Wiki?

User avatar
koitsu
Posts: 4215
Joined: Sun Sep 19, 2004 9:28 pm
Location: A world gone mad

Re: Cycle times of common things reference

Post by koitsu » Tue Nov 20, 2018 12:36 am

Banshaku wrote:Should hblank be added too? I think it was useful information when timing raster.
Most definitely; there have been a couple threads where this has come up (to do something like palette changes, IIRC). I've added a (blank) row for HBlank if someone wishes to fill that out.

User avatar
rainwarrior
Posts: 7669
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: Cycle times of common things reference

Post by rainwarrior » Tue Nov 20, 2018 2:18 am

Just FYI, when creating a redirect, you can use # in the redirect link if you want it to go to a subsection of the target article, you don't have to update every single link to it elsewhere in the wiki to accomplish that.

Normally when a page is moved on a wiki, the only links you need to fix are "double redirects", i.e. links to an article that already redirected to the one you're now replacing with a redirect. Regular links that went straight to that article don't need to be updated. ("Clock rate" didn't have any prior redirects though, so there wasn't any possible of double redirects here. You can click "what links here" on the left hand sidebar to check.)

User avatar
tokumaru
Posts: 11465
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Re: Cycle times of common things reference

Post by tokumaru » Tue Nov 20, 2018 2:23 am

I think it's important to note that hblank is *NOT* idle PPU time that can be used for all kinds of raster effects indiscriminately. The PPU is very much busy during hblank, updating the VRAM address, fetching sprite patterns, fetching data to start drawing the background... Depending on what kind of raster effect you want to pull off, you need to "dodge" these operations accordingly.

User avatar
koitsu
Posts: 4215
Joined: Sun Sep 19, 2004 9:28 pm
Location: A world gone mad

Re: Cycle times of common things reference

Post by koitsu » Tue Nov 20, 2018 2:27 am

rainwarrior wrote:Just FYI, when creating a redirect, you can use # in the redirect link if you want it to go to a subsection of the target article, you don't have to update every single link to it elsewhere in the wiki to accomplish that.
Thanks, I didn't know that. I was going purely off of what https://www.mediawiki.org/wiki/Help:Redirects demonstrates.

User avatar
Bregalad
Posts: 7766
Joined: Fri Nov 12, 2004 2:49 pm
Location: Chexbres, VD, Switzerland

Re: Cycle times of common things reference

Post by Bregalad » Tue Nov 20, 2018 2:44 am

pubby wrote: Do these numbers look right? Most of them I had to calculate myself because I couldn't find them on the wiki, and I'm pretty sure I made mistakes.
To be honnest, I think you should use fractions rather than floating points value, whenever possible. For instance, 133+2/3 is the exact amount of CPU cycles per NTSC scan line is the correct value, 133.666 is only an aproximation and looks ugly. Same for PAL CPU cycles / PPU cycles which should be 16/5 instead of the confusing 3.2 value. Same for all other values.

lidnariq
Posts: 8768
Joined: Sun Apr 13, 2008 11:12 am
Location: Seattle

Re: Cycle times of common things reference

Post by lidnariq » Tue Nov 20, 2018 11:56 am

With the exception of 3.2, where the decimal value is as clear and also shorter, the frame rates, and the NTSC & PAL clock references rates where the decimal expansion is the industry-preferred version, I have converted the rest to fractions.

(Expanding PAL's colorburst frequency — 15625 × 1153 ÷ 4 + 25 — is a wild tangent and obfuscatory)

NewRisingSun
Posts: 1045
Joined: Thu May 19, 2005 11:30 am

Re: Cycle times of common things reference

Post by NewRisingSun » Tue Nov 20, 2018 12:04 pm

The NTSC color burst frequency is defined in SMPTE 170M as 5 MHz * 63/88, not as 3.58 MHz, so it's not obfuscatory to state it exactly. It's desirable since the exact value is a periodic decimal fraction.

As for PAL, given the terminating decimal fraction, there is no hurt in specifying it as 4,433,618.75 Hz.

Post Reply