Pixel 250->256 change

Discuss emulation of the Nintendo Entertainment System and Famicom.

Moderator: Moderators

tepples
Posts: 22708
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Pixel 250->256 change

Post by tepples »

I've used the terminology "at x=256". Is that unambiguous?
User avatar
tokumaru
Posts: 12427
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Re: Pixel 250->256 change

Post by tokumaru »

tepples wrote:I've used the terminology "at x=256". Is that unambiguous?
That would be the 257th pixel, right?
User avatar
rainwarrior
Posts: 8732
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: Pixel 250->256 change

Post by rainwarrior »

I kinda wondered why we didn't start numbering at the left edge of the screen/signal. I don't know exactly what clock it's on, but there's a region at the start of the line before it starts rendering any sprite or nametable pixels that it will output the background colour.
tepples
Posts: 22708
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Pixel 250->256 change

Post by tepples »

Probably because the earliest we can detect within the scanline with sprite 0 is x=0 (the first rendered pixel).
User avatar
Dwedit
Posts: 4924
Joined: Fri Nov 19, 2004 7:35 pm
Contact:

Re: Pixel 250->256 change

Post by Dwedit »

Because of NMI, that's what defined pixel 0.
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!
User avatar
thefox
Posts: 3134
Joined: Mon Jan 03, 2005 10:36 am
Location: 🇫🇮
Contact:

Re: Pixel 250->256 change

Post by thefox »

Yeah, the left border of the very first rendered scanline is the hblank of the pre-render scanline.
Download STREEMERZ for NES from fauxgame.com! — Some other stuff I've done: fo.aspekt.fi
User avatar
Zepper
Formerly Fx3
Posts: 3262
Joined: Fri Nov 12, 2004 4:59 pm
Location: Brazil
Contact:

Re: Pixel 250->256 change

Post by Zepper »

That's the point I disagree. Anyway, here my last $0.02:

a) Is there a special reason for using the word "dot" instead of "cycle"?
b) The word "pixel" would count effective pixels from 1, and not from zero.

I suggest to abandon the usage of "dot" as "ppu cycles"; just "cycle" is good enough, and it counts from zero. When saying "pixel", it's always from 1.
tepples wrote:I've used the terminology "at x=256". Is that unambiguous?
Since x can be zero, you mean the 257th rendered pixel.
tepples
Posts: 22708
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Pixel 250->256 change

Post by tepples »

Does "cycle" refer to CPU cycles (1.8 MHz), PPU cycles (5.4 MHz), or master clock cycles (21.5 MHz)? "Dot" is less ambiguous. I seem to remember someone finally nailing down the terminology as "cycles" for the CPU, "dots" or "pixels" for the PPU, and "clocks" for the master clock. As for "dot" vs. "pixel", I'll look into that too.

EDIT: It was this post by blargg.
The term "dot clock" is used in an X server HOWTO.
User avatar
blargg
Posts: 3715
Joined: Mon Sep 27, 2004 8:33 am
Location: Central Texas, USA
Contact:

Re: Pixel 250->256 change

Post by blargg »

To me dots are the timebase of the PPU, while pixels are the dots that actually paint something on screen, though I suppose that the video signal is always outputting something for every dot, like the background color, or the sync pulse. I think most people refer to only 256 of the 341 dots of a scanline as pixels.

The benefit of "dot" over "ppu cycle" is that the latter is more verbose, not entirely clear, and will be shortened to "cycle" in discussion, which might then be confused with the CPU.
Post Reply