3-lace

Any discussions related to the creation of new hardware or software for the ZX80 or ZX81
Post Reply
nollkolltroll
Posts: 268
Joined: Sat Sep 27, 2014 8:02 pm
Location: Stockholm, Sweden

3-lace

Post by nollkolltroll » Sat Jan 12, 2019 1:22 pm

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
Attachments
3-lace.zip
(34.78 KiB) Downloaded 66 times
/Adam

User avatar
Andy Rea
Posts: 1518
Joined: Fri May 09, 2008 2:48 pm
Location: notts UK

Re: 3-lace

Post by Andy Rea » Sat Jan 12, 2019 8:01 pm

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
6 x ZX81, 1 x TS1500 , 1 x +3e, 1 x timex 2040 printer, 1 x timex 2020 cassette deck, siclair printer and some spectrum

Bukster
Posts: 27
Joined: Wed Sep 12, 2018 9:44 am

Re: 3-lace

Post by Bukster » 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?

nollkolltroll
Posts: 268
Joined: Sat Sep 27, 2014 8:02 pm
Location: Stockholm, Sweden

Re: 3-lace

Post by nollkolltroll » Sun Jan 13, 2019 10:19 am

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.
/Adam

nollkolltroll
Posts: 268
Joined: Sat Sep 27, 2014 8:02 pm
Location: Stockholm, Sweden

Re: 3-lace

Post by nollkolltroll » Sun Jan 13, 2019 10:51 am

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.
/Adam

Bukster
Posts: 27
Joined: Wed Sep 12, 2018 9:44 am

Re: 3-lace

Post by Bukster » Tue Jan 15, 2019 6:48 am

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.

nollkolltroll
Posts: 268
Joined: Sat Sep 27, 2014 8:02 pm
Location: Stockholm, Sweden

Re: 3-lace

Post by nollkolltroll » Tue Jan 15, 2019 10:20 am

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...
/Adam

nollkolltroll
Posts: 268
Joined: Sat Sep 27, 2014 8:02 pm
Location: Stockholm, Sweden

Re: 3-lace

Post by nollkolltroll » 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.
/Adam

User avatar
Andy Rea
Posts: 1518
Joined: Fri May 09, 2008 2:48 pm
Location: notts UK

Re: 3-lace

Post by Andy Rea » Tue Jan 15, 2019 5:10 pm

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 :)
6 x ZX81, 1 x TS1500 , 1 x +3e, 1 x timex 2040 printer, 1 x timex 2020 cassette deck, siclair printer and some spectrum

Post Reply