Eccentric pedantic "monochrome" glitch

Discuss hardware-related topics, such as development cartridges, CopyNES, PowerPak, EPROMs, or whatever.

Moderators: B00daW, Moderators

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

Re: Eccentric pedantic "monochrome" glitch

Post by lidnariq » Fri Oct 02, 2020 10:32 pm

I guess it's pedantically OR(φ2, m2mask), not OR(φ0, m2mask), so there's whatever propagation delay through the 6502 core delaying the falling edge of M2.

Fiskbit
Posts: 265
Joined: Sat Nov 18, 2017 9:15 pm

Re: Eccentric pedantic "monochrome" glitch

Post by Fiskbit » Sun Feb 14, 2021 7:17 pm

Kitrinx found another interesting quirk: reading from palette RAM at the same time as the greyscale dot on the left edge of the NTSC border disables the forced greyscale for that dot. I've written a test for this in the rendering-disabled case and confirmed it works on rev H-0. The test stops while A is held, for comparison. Supposedly this works while rendering is enabled, but I haven't written anything to test that yet. Presumably this only works on G-0 and H-0 PPUs, since palette RAM cannot be read on E-0 and earlier PPUs.

Kitrinx also thinks that colors $xE and $xF use blanking voltage in the border region, but this is unconfirmed.

[Edit: See replies regarding struck-out text.]
Attachments
greyscale_column_sparkle_test.zip
(1.59 KiB) Downloaded 25 times
Last edited by Fiskbit on Sun Feb 14, 2021 8:59 pm, edited 1 time in total.

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

Re: Eccentric pedantic "monochrome" glitch

Post by lidnariq » Sun Feb 14, 2021 7:27 pm

Fiskbit wrote:
Sun Feb 14, 2021 7:17 pm
Supposedly this works while rendering is enabled, but I haven't written anything to test that yet.
It's not possible to read from palette RAM while rendering is active, because nothing will drive $3F onto the upper 6 bits of the PPU address during rendering.
Fiskbit wrote:
Sun Feb 14, 2021 7:17 pm
Kitrinx also thinks that colors $xE and $xF use blanking voltage in the border region, but this is unconfirmed.
Er. I'm confused, don't they do that already? And not just in the border?

Fiskbit
Posts: 265
Joined: Sat Nov 18, 2017 9:15 pm

Re: Eccentric pedantic "monochrome" glitch

Post by Fiskbit » Sun Feb 14, 2021 8:57 pm

Sorry, you're correct; Kitrinx and I had misinterpreted each other. The standard $xE/$xF blanking behavior is applied in the borders, so there's nothing special there. The forced-greyscale-override quirk won't work when rendering is enabled, but it appears to be because there's a specific check against an is-rendering condition (~rendering_disabled && ~vpos_eq_240_to_260). You should be able to set the appropriate bits of v with $2006 or even by waiting for the PPU to increment it to the value you want, so I don't quite follow what you mean. Kitrinx thinks reading from $2007 while rendering is enabled should work as a normal read (plus the extra fine y increment) except that reads to the palette region will go through to normal VRAM, though the greyscale override occurs based on the bits of v, not whether the read actually went to palette RAM.

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

Re: Eccentric pedantic "monochrome" glitch

Post by lidnariq » Sun Feb 14, 2021 9:08 pm

Fiskbit wrote:
Sun Feb 14, 2021 8:57 pm
the greyscale override occurs based on the bits of v, not whether the read actually went to palette RAM.
... a side effect of nodes "vramaddr_v_vpos_overflow_and_not_rendering" and "vramaddr_v_vpos_29_to_30_transition_and_rendering" ?

User avatar
kitrinx
Posts: 3
Joined: Mon Feb 04, 2019 10:28 pm

Re: Eccentric pedantic "monochrome" glitch

Post by kitrinx » Sun Feb 14, 2021 9:27 pm

If you follow in_draw_range you will find the logic. It's ((/in_draw_range && /r2007_output_palette) || greyscale). r2007_output_palette finds its way back to ab_palette_in_range_and_not_rendering which appears to just be looking at whatever might be on the address bus. The vram address while rendering logic is pretty convoluted, switching through the normal nametable and patterns etc, so I don't want to commit to much there, but don't think it's possible for the top two bits to both be high while rendering.

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

Re: Eccentric pedantic "monochrome" glitch

Post by lidnariq » Sun Feb 14, 2021 9:46 pm

kitrinx wrote:
Sun Feb 14, 2021 9:27 pm
I don't want to commit to much there, but don't think it's possible for the top two bits to both be high while rendering.
Yeah, I'm pretty certain that's true. I tracked this down a couple years ago: viewtopic.php?p=232963#p232963 and I don't think it's possible either.

Interestingly, I think the other address lines can leak through by starting a carefully-timed $2007 read, but I don't think 'v' A12 or A13 can.

Post Reply