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

Interlace mode on Atari 8-bit #372

Open
c0pperdragon opened this issue Mar 19, 2024 · 5 comments
Open

Interlace mode on Atari 8-bit #372

c0pperdragon opened this issue Mar 19, 2024 · 5 comments

Comments

@c0pperdragon
Copy link
Contributor

I got some feedback from users of the GTIAdigitizer and besides some other bugs they also reported that there is actually a way that the Atari can produce an interlaced image with some extremely strange hacks. At least it shows as interlaced on normal TVs.
And my GTIAdigitizer did not support this.

After quite some reverse engineering, I can now also produce the same sync pulses as the original machine, but the RGBtoHDMI does not recognize this.
I made some signal screenshots of the vsync portion of both half-pictures. Yellow is the original Atari, Blue is the GTIAdigitizer.
voltcraft1395_4
voltcraft1395_3

As you see, the second sync pulse pattern is extremely weird. Do you think there is any chance that the RGBtoHDMI can interpret this als interlaced?

@IanSB
Copy link
Collaborator

IanSB commented Mar 20, 2024

@c0pperdragon
Can you do scope captures with both odd and even Vsync pulses but also Hsync pulses before Vsync and after Vsync.

Currently interlace or non interlace is determined by measuring the total time for two fields and dividing by the line length. If the answer is an odd number then it is interlaced.
Which field is odd or even is determined by measuring the time from the end of the Vsync pulse until the first Hsync pulse. On one field the time will be about half a line and on the other field it will be about a whole line.

However I have found a couple of examples that don't work with these methods:

  1. Commodore 128: This can generate "interlaced" video with one field longer than the other by 1 line so the total for two fields is an even number. There is a setting in geometry Vsync Type which can be set to "Force Interlaced" to work around that and I think this also happens with some Atari 2600 demos.
    The determination of odd/even field still works with the above very non standard signal.

  2. PAL Ti presenter: This generates an odd number of lines but outputs several half line equalising pulses after Vsync but before the first Hsync pulse so although the difference is still half a line the overall time for both is greater than one line and at the moment it can't cope with that.

When the Atari is in interlaced mode, what is the lines per frame value in the source summary page?
If it is still even then try the above 'Force Interlaced' setting.

@c0pperdragon
Copy link
Contributor Author

The scope traces already show both the even and the odd frame and also the two adjacent hsync pulses (together with the color burst). Before and after everything is completely regular with a hsync pulse every 64us.
Normally the GTIA just produces 3 long pulses (about 59,5 us) for vsync and everything else is just short hsyncs (4,5us).

This weird hack somehow interferes with the GTIA so it pulls the output line high during some part of the vsync without it knowing what it is doing. So there is no additional line for an odd frame or anything.

The RGBtoHDMI also just reports 312 lines as usual.

@c0pperdragon
Copy link
Contributor Author

Setting "forced interlace" does no help. If just makes the image stutter terribly instead.

@IanSB
Copy link
Collaborator

IanSB commented Mar 20, 2024

@c0pperdragon

The scope traces already show both the even and the odd frame and also the two adjacent hsync pulses
Before and after everything is completely regular with a hsync pulse every 64us.

I meant the next hsync after that which is cut off on the right hand edge to see if there was any difference in timing between the two fields but as you indicate above there isn't any difference.

It looks like the only effect of this 'hack' is to delay the start of the vsync pulse by half a line in one field and insert half line pulses in the vsync although the end time and the overall frame length remains the same.
It should be possible to decode this but I think it would probably require a dedicated vsync handler to ensure that it didn't break anything for other systems.

@c0pperdragon
Copy link
Contributor Author

I don't know if there are other possibilities to influence the vsync pattern, as this depends on what the ANTIC chip can be made to do.
Maybe the best course of action is to wait until one of the actual developers using this effect directly asks for RGBtoHDMI support. I will just redirect them to this issue thread if needed.

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