About the scanline -1

This is an archive of a topic from NESdev BBS, taken in mid-October 2019 before a server upgrade.
View original topic
About the scanline -1
by on (#94461)
From the wiki, "With BG enabled, each odd PPU frame is one PPU clock shorter than normal. I've timed this to occur around PPU clock 328 on the pre-render scanline, but haven't written a test ROM for it yet" (in fact, there's a test ROM now).

That means if the CPU runs for 1 clock, the PPU still runs for 3 clocks, except the scanline -1 logic ends on cycle 340, instead of 341. Is this ok?

Plus, about the cycle 328, I get a "passed" only on cycle 338. Could someone else confirm it?
Re: About the scanline -1
by on (#94470)
Zepper wrote:
Plus, about the cycle 328, I get a "passed" only on cycle 338. Could someone else confirm it?

I observed the same about that test.

by on (#94479)
I doubt it helps but all tests pass with flying colors on the NES ;)

by on (#94505)
infiniteneslives wrote:
I doubt it helps but all tests pass with flying colors on the NES ;)


And sorry for disappointing you, but I don't think so... ^_^;;
Image

by on (#94507)
ppu_vbl_nmi.nes RIGHT?

If so I'm not sure what I should be disappointed about...

Image

EDIT: haha I think I get it now. You meant I was right when I said it doesn't help you ;)

by on (#94508)
infiniteneslives wrote:
ppu_vbl_nmi.nes

no he was showing you that not ALL tests pass on a real NES...but if I recall the tests he showed are known to be flaky.

by on (#94509)
Well I didn't have any issues after running in a dozen times or so. After your post I tried one more test just for fun and did get test 2 to fail.

I tried it a few more times following that and seemed like #2 failed about half the time. I guess I just got lucky during the first round I ran. #2 is all I've seen though after about 20 tests now. Seems like I'll get streaks where #2 fails or they all pass.

by on (#94512)
While a test that shows some pseudo-randomness on real hardware is interesting and could be fun to simulate; I really hope they are sequestered away from other tests. If not, someone should really document exactly which tests are known to fail on hardware.

For the purpose of strict pass and fail, such tests are very dangerous. Any hardware test that has even a 0.0001% chance of failing on any functional NES hardware unit of the same revision is only useful as a curiosity, and it's a bad idea to compare to emulation. At the very least, calling it "pass" or "fail" is clearly wrong, and they should be renamed to reflect their randomness. You could easily get caught up in a situation where passing one test causes another to fail and vice versa. And now you're in a situation where -nobody- could ever achieve a 100% on those silly "emulator benchmark scores."

by on (#94518)
infiniteneslives wrote:
ppu_vbl_nmi.nes RIGHT?


Nope, I mean oam_read.nes.

by on (#94522)
Zepper wrote:
Nope, I mean oam_read.nes.


That's not what you linked to...

But yes I could only pass that on the NES about 1 out 8 trys.

by on (#94523)
infiniteneslives wrote:
Zepper wrote:
Nope, I mean oam_read.nes.


That's not what you linked to...



http://blargg.parodius.com/nes-tests/oam_read_ntsc.png
Re: About the scanline -1
by on (#94529)
Zepper wrote:
That means if the CPU runs for 1 clock, the PPU still runs for 3 clocks, except the scanline -1 logic ends on cycle 340, instead of 341. Is this ok?


This is consistent with all of the PPU documentation I'm aware of.

by on (#94537)
Thanks.

About the oam_read test, it fails on resets/power off/on because of the sprite ram data degradation. Such behaviour is expected on hardware.

by on (#94540)
Zepper wrote:
About the oam_read test, it fails on resets/power off/on because of the sprite ram data degradation. Such behaviour is expected on hardware.

No. It (obviously) rewrites the OAM each time it runs, and rendering is kept on so the degradation doesn't occur. The reason for the "failing" of this "test" is that OAM reading is broken on NES/Famicom hardware, and that's that.

It's not a test of hardware accuracy. It just tests if OAM reading works like we have always expected it to, before we knew it was broken.

by on (#94543)
Hmm... I had remembered blargg about such sprite ram degradation (or near that), but ok. :)
Re: About the scanline -1
by on (#101779)
I also found that 10-even_odd_timing.nes only passed if I skipped pixel #338.