Interlaced sync

Started by nikoniko, April 09, 2007, 01:07 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

nikoniko

From the 128 PRG chapter about the VDC:

QuoteIn the interlaced sync mode [R8(l-0) = 01], even and odd fields alternate to
generate frames. The same information is displayed in both odd and even fields but the
vertical sync timing causes the scan lines in the odd fields to be displaced from those in
the even fields by one-half scan line. The spaces between adjacent scan lines are filled,
resulting in a higher-quality character on monitors designed to receive interlaced video.
Has anyone ever tried this? Does it look good? Seems to me like there might be a tiny amount of flicker, but nothing nearly as bad as normal interlacing where you'd have different odd and even fields.

hydrophilic

I like it.  Well interlace sync and video.  Actually I think that is referring to the other interlace mode.  Sync and no video? :/ The no-video being no extra video, the rasters are just repeated each frame.  Due to the harsh contrast (bright cyan on black) the flicker is really annoying for no extra content (programming wise, its easy to do).

Interlace sync and video is really nice.  Create a 80x50 character display!  I've heard of programs that actually do this.  It seems to flicker less, go figure.  Programming wise it is tricker becasue there is a bug or mis-documentation regarding the VDC.  For some reason you have to change the horizontal timing (?!) and changes to vertical timing aren't inline with the PRG's claims.  Also, the KERNAL cannot handle more than 25 lines so you have to write your own screen editor!

In either case, selecting a color palette with a lower contrast reduces flicker.  That is the principle behind anti-aliasing, a concept familiar to Amiga owners (well the ones with video toasters!)

nikoniko

Yeah, I was quoting the part about interlaced sync and no video, as I've never heard any mention of someone using it for anything.

Somewhere I have code from, I think, Fred Bowen which does interlace sync and video in text mode for an 80x50 display, but I've never been able to test it since it doesn't work in VICE. I wish I understood the workings of VICE and the VDC well enough to fix it.

I'll see if I can dig it up.

Ah, here it is. And he also posted code for setting up an interlaced bitmap display. If I remember correctly, interlaced bitmaps somewhat work in VICE, but VICE has issues with displays that are taller than it's expecting, interlaced or not, and they end up being clipped. At one point I came up with a kludgy fix, which even had the benefit of improving Risen from Oblivion (there are some lines at the bottom of a couple screens that are cut off), but I removed it due to some unintended side effects. I haven't bothered to try again since I know I'm not smart enough to do it properly. :/

---------------------------------------------------------------------------
Interlaced Text
 
1 REM 80X50 TEXT SCREEN   F.BOWEN 9/88
10 SYSDEC("cdcc"),DEC("34"),4
20 SYSDEC("cdcc"),DEC("32"),6
30 SYSDEC("cdcc"),DEC("33"),7
40 SYSDEC("cdcc"),3        ,8
50 SYSDEC("cdcc"),DEC("EA"),9
55 :   rem  Double screen & attribute areas and clear them
60 POKEDEC("A2F"),16:SYSDEC("cdcc"),16,20
70 POKEDEC("A2E"),8 :SYSDEC("cdcc"),8, 12:SCNCLR
80 POKEDEC("A2E"),0 :SYSDEC("cdcc"),0, 12:SCNCLR
90 LIST
 
---------------------------------------------------------------------------
Interlaced Bitmap
 
100 REM 640X480 BMM (REQ. 64K VIDEO RAM!)   F.BOWEN 9/88
110 :
120 FAST: TRAP410
130 SYSDEC("cdcc"),DEC("7e"),0
140 SYSDEC("cdcc"),DEC("50"),1
150 SYSDEC("cdcc"),DEC("66"),2
160 SYSDEC("cdcc"),DEC("4c"),4
170 SYSDEC("cdcc"),6        ,5
180 SYSDEC("cdcc"),DEC("4c"),6
190 SYSDEC("cdcc"),DEC("47"),7
200 SYSDEC("cdcc"),3        ,8
210 SYSDEC("cdcc"),6        ,9
220 SYSDEC("cdcc"),0        ,24
230 SYSDEC("cdcc"),128+7    ,25
240 SYSDEC("cdcc"),0        ,27
250 SYSDEC("cdcc"),16       ,28
260 SYSDEC("cdcc"),0,12 :SYSDEC("cdcc"),0,13 :SYSDEC("cdcc"),240,26
270 :   rem  Clear the bitmap using block fills
280 SYSDEC("cdcc"),0,18 :SYSDEC("cdcc"),0,19 :SYSDEC("cdcc"),0,31
290 FORI=0TO255:SYSDEC("cdcc"),0,30 :NEXT
300 :   rem  Draw a box around the border, rendering into odd & even frames
310 FORI=1TO480/2: EVEN=0+I*80-1:   EH=INT(EV/256):EW=(EV-EH*256)
320 :              ODD=21360+I*80-1:OH=INT(OD/256):OL=(OD-OH*256)
330 :SYSDEC("cdcc"),OH,18:SYSDEC("cdcc"),OL,19:SYSDEC("cdca"),1:SYSDEC("cdca"),
128
340 :SYSDEC("cdcc"),EH,18:SYSDEC("cdcc"),EW,19:SYSDEC("cdca"),1:SYSDEC("cdca"),
128
350 :NEXT
360 SYSDEC("cdcc"),0,18:SYSDEC("cdcc"),0,19
370 SYSDEC("cdcc"),255,31 :SYSDEC("cdcc"),79,30:  rem use block fill for top of
box
380 SYSDEC("cdcc"),OH,18:SYSDEC("cdcc"),OL+1,19
390 SYSDEC("cdcc"),255,31 :SYSDEC("cdcc"),79,30:  rem ditto for bottom of box
400 GETKEYA$
410 SYSDEC("e179") :SYSDEC("ff62"): SCNCLR     :  rem restore screen, d/l chr
def's