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

Video output is slanted / skewed #1173

Open
ryandesign opened this issue Oct 17, 2023 · 4 comments
Open

Video output is slanted / skewed #1173

ryandesign opened this issue Oct 17, 2023 · 4 comments

Comments

@ryandesign
Copy link
Contributor

On my machine (a 2012 15" MacBook Pro with Retina Display running macOS Monterey 12.6.8) Clock Signal (currently version 2023-09-10 but it has been the same in all versions I tried) has slanted or skewed output. Lines which should be horizontal aren't; they are slightly diagonal. It happens in both Apple II and Macintosh emulation; I haven't tried others.

appleii
macintosh

@ryandesign
Copy link
Contributor Author

I also saw this problem on a 2016 15" MacBook Pro with Touch Bar running macOS Sonoma 14.0. (The screenshots in #1181 were taken on that machine.) However, it must not affect all machines, since the screenshots in the README do not exhibit this problem.

I tried to reproduce the problem on a late-2011 13" MacBook Pro but it cannot run Clock Signal because it does not support Metal.

@ryandesign
Copy link
Contributor Author

The SDL/OpenGL version doesn't have this problem running on the same Mac.

@TomHarte
Copy link
Owner

Yeah, this is a design issue; the CRT emulation because it is really, really emulating a flying dot, actually generates a slightly lower coordinate on the right than on the left.

The OpenGL outputter internally applies a reverse skew that approximately levels them out (as in: hopefully to within a whole subsampled pixel), with the 'approximately' bit being because e.g. an Atari 2600 cartridge that generates a full display of 259 lines is going to produce scans that are slightly more slanted than one which generates 263.

Will need to rethink where proper responsibility should lie for this; I guess the scan target should be able to indicate that it needs truly-horizontal scans and the CRT should deal with it.

@ryandesign
Copy link
Contributor Author

Yeah, this is a design issue; the CRT emulation because it is really, really emulating a flying dot, actually generates a slightly lower coordinate on the right than on the left.

Are you saying real CRTs have slanted lines? I've never noticed that, though the way that Clock Signal has to draw its slanted lines on an existing operating system's straight lines of pixels certainly would make it much more noticeable.

The OpenGL outputter internally applies a reverse skew that approximately levels them out (as in: hopefully to within a whole subsampled pixel), with the 'approximately' bit being because e.g. an Atari 2600 cartridge that generates a full display of 259 lines is going to produce scans that are slightly more slanted than one which generates 263.

I admit zero familiarity with the Atari 2600, real or emulated. I do see now that different cartridges used different numbers of scanlines and that TVs were apparently fine with that. But why does different numbers of scanlines require that they be slanted?

Will need to rethink where proper responsibility should lie for this; I guess the scan target should be able to indicate that it needs truly-horizontal scans and the CRT should deal with it.

Under what circumstances would you actually want non-horizontal scans?

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