ZackAttack Posted December 14, 2017 Share Posted December 14, 2017 What's the best way to implement an interlaced display? Is adding an extra scanline on odd frames all you need to do or is it something more complicated with vsync timing. Or something else? Quote Link to comment Share on other sites More sharing options...
+SpiceWare Posted December 14, 2017 Share Posted December 14, 2017 From 2002 - http://www.atariage.com/news/Interlacing/index.html 1 Quote Link to comment Share on other sites More sharing options...
ZackAttack Posted December 14, 2017 Author Share Posted December 14, 2017 If I understand this correctly you need to delay vsync half a scanline and add an extra scanline every other field. This results in each field having a length of 262.5 scanlines. Normal V123 4567 V123 4567 Interlaced V123 4567 89V1 <- vsync (v) delayed to mid point 2345 6789 <- Extra scanline 1 Quote Link to comment Share on other sites More sharing options...
Omegamatrix Posted December 15, 2017 Share Posted December 15, 2017 I could never get any of the demos to display a cleanly interlaced image. There was always some distortion. You might want to try playing around with RSYNC. 1 Quote Link to comment Share on other sites More sharing options...
alex_79 Posted December 15, 2017 Share Posted December 15, 2017 (edited) Using RSYNC it would be hard (if possible at all) to timing writes to the register so that the total lenght of the scanlies is constant at 228 color clocks. And if you can't achieve that, you will most probably have distorsions in the image caused by temporary loss of horizontal sync. They might be more or less noticeable depending on the TV set, but it's something you have to consider.I did a few experiments some time ago, just turning VSYNC on and off in the middle of the scanline on the second field and they seem to mostly work.This is a simple test rom: interlace.asm interlace_NTSC.bin interlace_PAL.bin It just displays vertical bands which are different color (or different luma with TV TYPE switch in B/W position) offset horizontally on each field.Left difficulty switch enables/disables interlacing of the second field: A = 525lines 60Hz / 625lines 50Hz interlaced B = 262lines 60Hz / 312lines 50Hz progressive This picture shows the progressive mode (with TV TYpe switch in B/W). This is what 's used in all 2600 games (and basically all computer and consoles of the '70s and '80s). You can see the gaps between the scanlines (that is, with a reasonably well working and on focus CRT. If the TV is in bad shape you might not see the scanlies at all. Decreasing brightness might help). The brighter area in the middle is where the two stripes (which alternate on each field) overlap. This is the interlaced mode. Now you can see the second field moved down half of a scanline. This is only achieved by the sligtly different timing of VSYNC. Everything else is the same.It works on most TVs I tried, altough it causes PAL color loss. I don't know if there's a way to avoid that.I also tried using 2.5 lines of VSYNC in PAL (as that's what is defined in PAL specifications), but it doesn't seem to make any difference, so I kept the 3 lines VSYNC as it's used in NTSC.Note that the Vsync pulses generated by the VCS aren't really on specs: on a standard TV signal, VSYNC pulses are obtained by prolonging the HSYNC ones, and there are two of them on each scanline separated by a gap that is half the length of an Hsync pulse. On the VCS, when you set VSYNC, the HSYNC output is just inverted, so there's only one long VSYNC pulse per scanline, and it starts a bit later (by the leght of a standard HSYNC pulse) than on a standard signal.Moreover the VCS doesn't generate any of the "field syncronization pulses" that should precede and follow the VSYNC ones, which might cause problems on very old TV sets. Here is a page showing the shape of the various synchronization pulses in TV analog signals: http://martin.hinner.info/vga/pal.html Edited December 15, 2017 by alex_79 3 Quote Link to comment Share on other sites More sharing options...
ZackAttack Posted December 15, 2017 Author Share Posted December 15, 2017 Sounds like I should stick to varying the vsync timing and make it possible to switch it on or off in case it doesn't work for some. Thanks everyone for the great info! Quote Link to comment Share on other sites More sharing options...
flickertail Posted December 16, 2017 Share Posted December 16, 2017 Thanks for asking this question, I am thinking about attempting an interlaced display in order to have a shadow for the playball without affecting the color of playfield goal posts. Having read up on some other posts, I didn't realize that an additional scan line had to be added. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.