Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: add support for 240p #42

Open
jburks opened this issue Mar 16, 2023 · 4 comments
Open

Feature Request: add support for 240p #42

jburks opened this issue Mar 16, 2023 · 4 comments

Comments

@jburks
Copy link
Contributor

jburks commented Mar 16, 2023

This request originates from Adrian Black. This causes old "Arcade" monitors (and the venerable Commodore 1084) to skip painting odd scanlines producing a visible raster line effect very reminiscent of early displays.

The attached sample was rendered on a VERA that I had modified to render 240p.
image

@jburks
Copy link
Contributor Author

jburks commented Mar 17, 2023

The proposed mechanism to support this is to re-purpose the lower 4 bits of the DC_VIDEO register in a backwards compatible way.

Here is an initial proposal I have come up with which retains backwards compatibility with the Output Mode and Chroma Enable bits:

DC_VIDEO mode bits

Bit | Description
----+------------------------------------------------
 0  | RGB mode (0=luma/chroma, 1=RGB)
 1  | Sync mode (0=separate, 1=composite)
 2  | Monochrome Flag (0=color, 1=monochrome)
 3  | Line mode Flag (0=480, 1=240)


Mode Bits | Mode Description
 LMCR     |
----------+-----------------------------------------
 0000     | Off
 0001     | VGA 480p
 0010     | Composite 480i
 0011     | 15KHz RGB 480i composite sync
 0100     |
 0101     |
 0110     | Composite 480i Monochrome
 0111     | 15KHz RGB 480i composite sync
 1000     |
 1001     | 15KHz RGB 240p separate sync
 1010     | Composite 240p
 1011     | 15KHz RGB 240p composite sync 
 1100     |
 1101     | 
 1110     | Composite 240p Monochrome
 1111     |

@misterblack1
Copy link

This also applies to Composite/S-Video output modes

@misterblack1
Copy link

Small correction Joe: the VERA still paints both odd and even scan lines, but it does them in a way that instructs the display to not shift down half a line. This results in it drawing exactly over the previous field, resulting in a 59.5hz progressive scan image. If you do try to display something using 480 lines, it will paint both fields on top of each other, resulting in noticeable flicker.

Also, any use of V-scaling to shrink the image vertically will result in visible flicker. (Along with scaling artifacts)

@jburks
Copy link
Contributor Author

jburks commented Mar 17, 2023

Small correction Joe: the VERA still paints both odd and even scan lines, but it does them in a way that instructs the display to not shift down half a line. This results in it drawing exactly over the previous field, resulting in a 59.5hz progressive scan image. If you do try to display something using 480 lines, it will paint both fields on top of each other, resulting in noticeable flicker.

One of the community members on Discord has already come up with an idea for using this effect as a temporal dither to get interesting color effects.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants