Page 1 of 1

3-lace

Posted: Sat Jan 12, 2019 1:22 pm
by nollkolltroll
I happened to read a description of interlaced video (again) when it dawned on me that interlacing is simply an analog function of the TV synchronisation hardware. The way interlacing works is by delaying the start of VSYNC for half a line period, every other frame. The delay shifts the start of the frame by half a line in height.
In this demo I use three different delays: none, 1/3 line or 2/3 line. This creates a frame with three fields, which for the ZX81 leads to:
- a VERY flickery display
- either a much higher resolution (up to at least 720 lines!)
- or a height-compressed picture with many more free CPU cycles because of the extra empty rasters per field

Tested on several ZX81:s with my cheap 5" B/W TV and 9" Sony PVM8045Q. Both original ULA:s (2C184E and 2C210E) work, as well as Andy Reas new ULA replacement.

Source code is enclosed, plus several executables with different refresh rates. All use WRX high resolution mode. Pseudo-hires mode would be possible, but not plain text-mode.

Stair-stepped test pattern:
- 3lace50.p for 312-line 50 Hz mode
- 3lace60.p for 262-line 60 Hz mode
- 3lace70.p for 224-line 70 Hz mode
- 3lace75.p for 209-line 75 Hz mode

Lena test picture, 256x480 in three 160-line fields:
- 3lace312.p for 312-line 50 Hz mode
- 3lace262.p for 262-line 60 Hz mode

In summary I'd say 3-lace really is not very useful other than as a proof of concept and for understanding interlacing on old TV:s. And forget about running this correctly on any emulator. Also, it highlights the extreme flexibility of the ZX81 HW :D

Re: 3-lace

Posted: Sat Jan 12, 2019 8:01 pm
by Andy Rea
very cool indeed, seems to work well with my 15" Sanyo b+w cctv monitor. Flickry as ever but hey oh...

Image
more pixels than you can imagine.

regards Andy

Re: 3-lace

Posted: Sat Jan 12, 2019 9:09 pm
by Bukster
Thanks for the source code. I've been able to compile it with Flat Assembler. As you predicted, it does not work with an emulator.

So I take it the 'none' mode is just straight pseudo hi-res?

Re: 3-lace

Posted: Sun Jan 13, 2019 10:19 am
by nollkolltroll
Bukster wrote: Sat Jan 12, 2019 9:09 pm Thanks for the source code. I've been able to compile it with Flat Assembler. As you predicted, it does not work with an emulator.

So I take it the 'none' mode is just straight pseudo hi-res?
Yes, the source is made in ZX-IDE (flat assembler), sorry I forgot to mention that.
What do you mean by 'none'? The simple stair-step pattern is made in WRX mode, I was too lazy to make source for pseudo-hires. This is only a quick proof of concept.

Re: 3-lace

Posted: Sun Jan 13, 2019 10:51 am
by nollkolltroll
I forgot to mention that it will most probably not work properly on any LCD-screens either. They will only work with standard 2-field interlace.

Re: 3-lace

Posted: Tue Jan 15, 2019 6:48 am
by Bukster
nollkolltroll wrote: Sun Jan 13, 2019 10:19 am Yes, the source is made in ZX-IDE (flat assembler), sorry I forgot to mention that.
What do you mean by 'none'? The simple stair-step pattern is made in WRX mode, I was too lazy to make source for pseudo-hires. This is only a quick proof of concept.
I was secretly hoping I could use this for my next game and not bother developing my own hi-res code. If the 'none' mode was that, then it could save me a lot of bother. However, you say this isn't usable for games, so I'll keep looking for code examples and reading up on how it works so I can do it myself.

Re: 3-lace

Posted: Tue Jan 15, 2019 10:20 am
by nollkolltroll
Bukster wrote: Tue Jan 15, 2019 6:48 am I was secretly hoping I could use this for my next game and not bother developing my own hi-res code. If the 'none' mode was that, then it could save me a lot of bother. However, you say this isn't usable for games, so I'll keep looking for code examples and reading up on how it works so I can do it myself.
Send me a PM with details of what you think you need from the hires/pseudo-hires code and I'll see what I have to offer. I do have a lot of example code...

Re: 3-lace

Posted: Tue Jan 15, 2019 11:27 am
by nollkolltroll
A tip for viewing interlaced pictures, both standard and 3-lace: lower the contrast and brightness and the flickering will be reduced A LOT.

Re: 3-lace

Posted: Tue Jan 15, 2019 5:10 pm
by Andy Rea
nollkolltroll wrote: Tue Jan 15, 2019 11:27 am A tip for viewing interlaced pictures, both standard and 3-lace: lower the contrast and brightness and the flickering will be reduced A LOT.
+1 thats how i took a picture :)