Ghetto custom 31 kHz video mode

A place for your artistic side. Discuss techniques and tools for pixel art on the NES, GBC, or similar platforms.

Moderator: Moderators

Post Reply
User avatar
mikejmoffitt
Posts: 1353
Joined: Sun May 27, 2012 8:43 pm

Ghetto custom 31 kHz video mode

Post by mikejmoffitt »

In [url=http://forums.nesdev.com/viewtopic.php?p=131995#p131995]this post[/url], lidnariq wrote:Yeah, the NES only emits one voltage—color $1D—for blanking, black, &c.

On the bright side, it's not the hack that was video for the ZX80 (which by default assumed that the TV didn't do any normalizing at all and so just emitted full white during the back porch)
Could you output color $1D in the center of the screen for the same width as the sync pulse, surrounded by black for the porches, and enable a ghetto low-resolution ~30KHz refresh?
lidnariq
Posts: 11432
Joined: Sun Apr 13, 2008 11:12 am

Re: The Quest for the Perfect Palette Generator

Post by lidnariq »

Color $0D plus full darkening from all the color emphasis bits gets you something only half the depth of the NES's normal hsync pulse... so not clear whether that would work.

It's easy enough to make a test ROM, though. I just don't have a screen that parses 30kHz Sync-on-luma to test with. (Also, sprites become obnoxious and you lose color, but meh)
Drag
Posts: 1615
Joined: Mon Sep 27, 2004 2:57 pm
Contact:

Re: The Quest for the Perfect Palette Generator

Post by Drag »

mikejmoffitt wrote:Could you output color $1D in the center of the screen for the same width as the sync pulse, surrounded by black for the porches, and enable a ghetto low-resolution ~30KHz refresh?
I don't think so, because the line timing would be way out of spec for the NTSC signal, so most TVs would probably reject it, plus, the timing of all the signals is stuck in increments of 8 pixels, with the final nail in the coffin being that $0D isn't the sync level, the most it does is distort the picture on some monitors.
lidnariq
Posts: 11432
Joined: Sun Apr 13, 2008 11:12 am

Re: The Quest for the Perfect Palette Generator

Post by lidnariq »

Well, "distort the picture on some monitors" does mean "is being parsed as a sync pulse" ...
Drag
Posts: 1615
Joined: Mon Sep 27, 2004 2:57 pm
Contact:

Re: The Quest for the Perfect Palette Generator

Post by Drag »

The sync signal doesn't need to be active for the entire time in order to perform horizontal retrace, that's why it's sandwiched by the blanking periods. Color $0D as far as I know only slows the gun down, shrinking the scanline at that point; it doesn't trigger a full retrace. So yes, the monitor may be misinterpreting $0D as a weak sync, but it's never enough to actually trigger a new scanline.
lidnariq
Posts: 11432
Joined: Sun Apr 13, 2008 11:12 am

Re: The Quest for the Perfect Palette Generator

Post by lidnariq »

Televisions that could have done the right thing when given a 31kHz sync-on-luma input have only existed for the past 10 years or so, and it would be only likely to be discovered by accident with one of the new TVs that automatically switches between composite and component depending on the presence of red/blue cables. I really think a test is necessary before the possibility can be completely ruled out.

There are plenty of other reasons it might not function, but I'd personally be more suspicious of the vertical blanking time than of the too-high fake sync pulse.
User avatar
mikejmoffitt
Posts: 1353
Joined: Sun May 27, 2012 8:43 pm

Re: The Quest for the Perfect Palette Generator

Post by mikejmoffitt »

lidnariq wrote:Televisions that could have done the right thing when given a 31kHz sync-on-luma input have only existed for the past 10 years or so, and it would be only likely to be discovered by accident with one of the new TVs that automatically switches between composite and component depending on the presence of red/blue cables. I really think a test is necessary before the possibility can be completely ruled out.

There are plenty of other reasons it might not function, but I'd personally be more suspicious of the vertical blanking time than of the too-high fake sync pulse.
I should have been more clear. This is something I would want to test using a modern television that can accept a 31KHz sync-on-luma input, like the component input of an HD CRT or a flat panel display. It would be interesting to see if it is willing to sync to something kind of close to a 31KHz "480p" signal.

In a few weeks I will be picking up an everdrive N8. I might whip up a test ROM for this and give it a try.
lidnariq
Posts: 11432
Joined: Sun Apr 13, 2008 11:12 am

Re: The Quest for the Perfect Palette Generator

Post by lidnariq »

Doing some simple math: it looks like the "correct" place for the second fake Hsync pulse should be at x≈81, 24 or 25 pixels long, and should be followed by ≈65 blank pixels.
This leaves two ~80-pixel wide fields making up the visible width, if it works.
User avatar
mikejmoffitt
Posts: 1353
Joined: Sun May 27, 2012 8:43 pm

Re: The Quest for the Perfect Palette Generator

Post by mikejmoffitt »

lidnariq wrote:Doing some simple math: it looks like the "correct" place for the second fake Hsync pulse should be at x≈81, 24 or 25 pixels long, and should be followed by ≈65 blank pixels.
This leaves two ~80-pixel wide fields making up the visible width, if it works.
Neat! It would be neat to make the world's only 80px-wide "480p" NES game!
NewRisingSun
Posts: 1510
Joined: Thu May 19, 2005 11:30 am

Re: The Quest for the Perfect Palette Generator

Post by NewRisingSun »

Can we split off the "ghetto" custom video modes into a separate thread, please?
Drag
Posts: 1615
Joined: Mon Sep 27, 2004 2:57 pm
Contact:

Re: Ghetto custom 31 kHz video mode

Post by Drag »

Suppose this works and you get an 80x480@60hz picture which works on only a handful of TVs/monitors (and that's if and only if color $0D plus emphasis bits is strong enough to trigger horizontal retrace), which means a doubled vertical resolution at the expense of making pixels 3x wider, and every other scanline is grayscale due to a lack of a colorburst signal and possibly wiggly due to the lack of the pulse signal. Hurrah? Another accomplishment for nesdev?

I'm just saying don't be disappointed when this doesn't work, because it'd be just as disappointing if it did work.
User avatar
Myask
Posts: 965
Joined: Sat Jul 12, 2014 3:04 pm

Re: Ghetto custom 31 kHz video mode

Post by Myask »

And that's before you have the PPU-variant color-emphasis SNAFU.
Drag
Posts: 1615
Joined: Mon Sep 27, 2004 2:57 pm
Contact:

Re: Ghetto custom 31 kHz video mode

Post by Drag »

To be fair, that only (potentially) affects the red and green bits, so activating all three bits will always result in the darkening, except for RGB PPUs in which it results in complete white.
Post Reply