Jump to content
IGNORED

Real Interlaced graphics on the A8 - getting closer


Rybags

Recommended Posts

For the last day, I've been trying a different approach to try to get real interlaced video on my 130XE using the "Hires on scanline 240 bug", or should I say a variation of it.

 

With experimentation, I've found that you can alter the folding/rolling effect you experience by dynamically changing DMACTL in the scanlines leading up to and just after VBlank. This is performed every second frame, in an attempt to get the first Sync pulse to occur half a scanline early.

 

I think I'm a bit away from "perfection" here. I've tried all manner of DMACTL combinations, in some cases I get horizontal jitter, in others the colours get messed in the first third of the screen. Also I sometimes get a display that looks great on my 34cm TV, but doesn't look good on my capture card or 51 cm TV.

 

Here's a couple of pics... I've got 2 copies of the character set with some custom characters. They're toggled each VBI, and I've defined some to give 16 pixel high characters in the normal 8 pixel space.

 

 

post-7804-1232105480_thumb.jpg

 

 

Digital photo of TV display. A right pain to get a decent photo, so I've got a partial screen grab below from my capture card.

 

 

post-7804-1232105490_thumb.jpg

 

Note that this card blends 2 fields anyway, so it's not really validation of this method. But, it does show a better closeup of what's going on.

I've redefined some characters. The ">" looking thing is diagonal lines in single steps. A letter "A" in 16 pixels shown next to the default "A" from the Atari charset.

 

Then part of an acute diagonal line. All of those steps are within the space of 8 "normal" scanlines (16 interlaced).

Link to comment
Share on other sites

That could be the tricky part.

 

Seems like sometimes I'm getting nice vertical seperation but it jitters horizontally. Others I get the top half of the screen behaving but the bottom one looks like nothings happening. Probably be a big help if I could analyse the signal.

 

I suspect this bug must cause Antic to not create proper sized scanlines in the area outside the normal 240-line display. Changing DMA width in the "non-display" area alters it more.

 

It's been handy using the capture card since you see virtually everything - overscan area, full 625 scanlines etc.

Link to comment
Share on other sites

I used interlacing on my C= 128's 80 column display all the time as the VDC directly supported it. A lot of the monitors didn't support it, but mine did (probably because it was a TV with connections for CGA and chroma/luma).

 

I wrote a short program that turned it on and patched the kernal for 80x50 support. Writing code with twice the lines visible was really handy. The flicker was annoying, though I discovered that wearing polarized sunglasses reduced the flicker enough to be tolerable.

 

One thing I didn't like about the 80 column display was they still used the "fat" font from the 64. I preferred the thin-line font front found in the PET and VIC 20, so my 80x50 program also loaded that font into the VDC(the font used by the VDC was stored in it's video RAM, so it was easy to change).

Link to comment
Share on other sites

I unrolled a piture in the 90s and got a GR.6 scroller above the first scanline but it only worked on my TV...so how can you make sure that it works on all different TV sets & sizes?

 

 

I guess, the "interlace" isn't that timing critical as the trick with the scroller is. And ofcourse the timing will be different on 50Hz and 60Hz display.

Link to comment
Share on other sites

Excellent work! The possibilities are endless here. Could prove useful for an 80 column "flickerterm" type display: in theory, you could have 80x48 character cells...

You could do that, but it would make the flicker twice as bad. Flickerterm alternates between even and odd columns every video frame. Interlaced video alternates between even and odd rows every video frame. To get solid interlaced characters on a Flickerterm-type display, you'd have to display each column for two frames at a time instead of one. This would suck.

Link to comment
Share on other sites

Excellent work! The possibilities are endless here. Could prove useful for an 80 column "flickerterm" type display: in theory, you could have 80x48 character cells...

You could do that, but it would make the flicker twice as bad. Flickerterm alternates between even and odd columns every video frame. Interlaced video alternates between even and odd rows every video frame. To get solid interlaced characters on a Flickerterm-type display, you'd have to display each column for two frames at a time instead of one. This would suck.

Yes it would... "Flickerterm" was the wrong way to describe it. What I was actually thinking was using only the horizontal interlacing with something like the ACE-80 system or LW80, which run in graphics 8. I think that would work well, providing we could still use a dynamic display list for scrolling, etc. :)

Edited by flashjazzcat
Link to comment
Share on other sites

Well, it might mean 160 x 480.

 

And it'll be very interesting to see what I can get stuff like APAC and TIP to look like.

In theory it should mean it still flickers, but should be able to eliminate the blank lines.

 

You would need to know the odd/even frames to extend resolution to 480...

 

Yep. Sometimes I need to swap the order of character set switching.

 

Right now I've got the TV going fine, but the capture card thinks it's the other way around and everything's arse-about.

 

So, if this thing gets to a workable state, it might require a user-intervention to get it to change the field order.

Link to comment
Share on other sites

This reminds me about Pokey.... just playing two channels side a side results always in different sounds, because the generators do not start correctly and synchronized ...

The whole hardsynthsounds even don't work correctly after adjusting the sounds one time. Adjusting the main voice and the filter voice 2 times results in 100% reconstructable sounds.

 

To have the interlace work, it is necessary to find where to assure the reconstruction of the interlace.

I don't know how you create the interlace exactly. But to assure the interlace, it is recommended to have something like a common "high peek" where the signal is counting down from...

Link to comment
Share on other sites

My understanding is that the half-scanlines are used to skew each field by a scanline either way.

 

I'm whipping together a program that I'll upload so others can test it on their own machines.

 

My theory about this whole process is that the scanline-240 bug must somehow cause Antic to get confused and not generate proper sized horizontal lines in the normally "always black" part of the screen (top and bottom extremes).

 

By tweaking DMACTL along the way, it seems I'm re-aligning the sync pulses and if it's done right it creates an interlaced picture.

 

Anyway, I hope to have something up in a while... be interesting to see if we can figure this thing out and get it going.

Link to comment
Share on other sites

My understanding is that the half-scanlines are used to skew each field by a scanline either way.

You want to skew by a half-scanline so one field's lines appear to be between the other field's lines. By resetting the horizontal sync half-way through a scanline (followed by normal syncs from then on) you move the entire picture down half of the line-to-line distance.

Edited by Bryan
Link to comment
Share on other sites

post-7804-1232209718_thumb.jpg

 

OK. I've got a BASIC program with the test stuff embedded.

 

Just Load/Run it - downloads are disk image or just the program itself.

 

How to use the program:

 

"I" turns the Interlace on and off. Ensure it's "ON" before proceding further.

"F" toggles the field order. If the stepped line doesn't look right, then try this.

"R" generates a new set of DMACTL values. If the display is warped, jittering too much or just not working, keep trying this. It might take a dozen or more tries before you get something workable. The values are displayed onscreen.

 

"D" resets the DMACTL values to defaults. The defaults I've supplied are the ones I have working with my old TV.

 

Note: naturally, this program will do nothing special in the emulator, must be run on a real machine.

It's only been tested on PAL, and probably won't do much yet for NTSC users, but might be worth a try anyway.

 

If you're using an LCD monitor or capture card, there's a chance it'll work without even having to turn on the Interlace. Also a chance it'll not work either since both can be fussy about the type of signal they're receiving.

 

I'm just running it now through my RF to TV and S-Video to my capture card.

 

INTEST_prog.zip (program, run from H: or APE Mirror)

Interlace_ATR.zip (ATR image, mount in APE)

Link to comment
Share on other sites

As I expected... some LCDs just build a 25/30 fps display from the 2 fields and display it even if it's not a proper interlaced signal.

 

Can you try on a CRT type TV? Although if your system is NTSC I don't know how it'll go - you can alter the code a bit and see how it goes...

 

For NTSC, try adding line:

 

45 POKE 16656,234:POKE 16657,234

Link to comment
Share on other sites

I tried it on my ATARI 800XL PAL and some 72cm TV THOMSON connected via RF cable and it doesn't work. There are two parts of the line on the same scanline. And I see on the right side of screen the left side again... Saw inverse I and F from Interlace and Field order.

 

EDIT: the picture is taken with my mobile phone, with just 1.3 Mpix I think. Tried with camera, but it was too fast and it took only one frame and I don't know how to make it longer.

post-3960-1232217294_thumb.jpg

Edited by MaPa
Link to comment
Share on other sites

As I expected... some LCDs just build a 25/30 fps display from the 2 fields and display it even if it's not a proper interlaced signal.

 

Can you try on a CRT type TV? Although if your system is NTSC I don't know how it'll go - you can alter the code a bit and see how it goes...

 

For NTSC, try adding line:

 

45 POKE 16656,234:POKE 16657,234

 

oh... for the moment i can't connect my Atari to a CRT TV, but someone could do the test on a NTSC TV.

Link to comment
Share on other sites

I tried it on my ATARI 800XL PAL and some 72cm TV THOMSON connected via RF cable and it doesn't work. There are two parts of the line on the same scanline. And I see on the right side of screen the left side again... Saw inverse I and F from Interlace and Field order.

 

Don't worry about the characters on the rhs of the screen - that's because I've got it in widescreen and the DList reorders it to look right.

 

Make sure Interlace is ON. Keep pressing R to get it to regenerate values until it starts to look right.

 

I've had it work on 2 TVs - old Rank Arena (made by NEC) from 1983, and my LG from ~ 1999.

Link to comment
Share on other sites

I tried it on my ATARI 800XL PAL and some 72cm TV THOMSON connected via RF cable and it doesn't work. There are two parts of the line on the same scanline. And I see on the right side of screen the left side again... Saw inverse I and F from Interlace and Field order.

 

Don't worry about the characters on the rhs of the screen - that's because I've got it in widescreen and the DList reorders it to look right.

 

Make sure Interlace is ON. Keep pressing R to get it to regenerate values until it starts to look right.

 

I've had it work on 2 TVs - old Rank Arena (made by NEC) from 1983, and my LG from ~ 1999.

 

I attached picture to my previous post. I tried several DMACTL values (don;t know how many of them are there?) but no success.

Link to comment
Share on other sites

My understanding is that the half-scanlines are used to skew each field by a scanline either way.

You want to skew by a half-scanline so one field's lines appear to be between the other field's lines. By resetting the horizontal sync half-way through a scanline (followed by normal syncs from then on) you move the entire picture down half of the line-to-line distance.

 

But all the other lines ANTIC is assuming a normally timed HSync. Ideally, you want to send HSync half-way through a scanline and then somehow RESET ANTIC at the correct point as if it's starting a new frame so all the HSyncs are in-line with that HSync. And then repeat that every field.

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...