Double buffer grey scale?

Any discussions related to the creation of new hardware or software for the ZX80 or ZX81
Lardo Boffin
Posts: 2160
Joined: Sat Nov 26, 2016 2:42 am

Double buffer grey scale?

Post by Lardo Boffin »

I was playing around with double buffering in low res mode to get smoother animation and had an attack of the blindingly obvious - if I have a dark image in one buffer and a light image in the other is it possible to switch between them fast enough to fool the eye into thinking it is grey scale? Presumably you could vary the relative times the images are displayed to get a few different shades?
I gave it a go (emulator only so far) and the results varied from an almost reasonable grey scale one moment to a seizure inducing flashing pattern the other. I still have a headache...
Is this one of those ideas that sounds great but doesn't work? Given how obvious it is I would have assumed we would be knee deep in grey scale games by now if it did work.
Has anyone tried this and got anywhere?

Lardo
ZX80
ZX81 iss 1 (bugged ROM, kludge fix, normal, rebuilt)
TS 1000 iss 3, ZXPand AY and +, ZX8-CCB, ZX-KDLX & ChromaSCART
Tatung 81 + Wespi
TS 1500 & 2000
Spectrum 16k (iss 1 s/n 862)
Spectrum 48ks plus a DIVMMC future and SPECTRA
User avatar
siggi
Posts: 988
Joined: Thu May 08, 2008 9:30 am
Location: Wetterau, Germany
Contact:

Re: Double buffer grey scale?

Post by siggi »

Hi Lardo
"grey" is possible and is a standard feature of the Z88DK graphic libs. But on ZX81, the screen flickers:

https://www.z88dk.org/wiki/doku.php?id=library:graylib

Regards
Siggi
My ZX81 web-server: online since 2007, running since dec. 2020 using ZeddyNet hardware
http://zx81.ddns.net/ZxTeaM
nollkolltroll
Posts: 325
Joined: Sat Sep 27, 2014 8:02 pm
Location: Stockholm, Sweden

Re: Double buffer grey scale?

Post by nollkolltroll »

It works, but it will always flash badly. On a proper CRT it looks slightly better than on the emulator though.
Z88dk has support for 2-bit greyscale according to their documentation, which gives 4 greyscales. Unfortunately it does this at a third of the basic framerate, so 50/3=16,67fps or 60/3=20fps. Seriously bad for your eyes.
/Adam
User avatar
gammaray
Posts: 590
Joined: Sun Apr 17, 2016 2:44 am
Location: Texas

Re: Double buffer grey scale?

Post by gammaray »

I remember back in the day someone was selling a game that flashed to create colors by stimulating the retina at different frequencies.

May be like when you stare at a an image for some time and then move to another the impression of color is given off.

https://petapixel.com/2015/11/16/trick- ... ull-color/
5-TS1000,UK ZX81<-Sheelagh, US ZX81, 2-TS1500/KDLX , 3-TS2040 printer, 2-TS2020 cassette decks, ZXPAND+AY, ZeddyNET, ZXBlast, UDG, ZX8CCB, AERCO, BUILDS/REPAIRS ZX Spectrum, ZX80 Minstrel, ZXMAX48 v1 v2, 2-TS-2068, ROM, 16kRAM
User avatar
marste
Posts: 250
Joined: Sun Aug 10, 2014 9:58 pm
Location: Italy
Contact:

Re: Double buffer grey scale?

Post by marste »

I think that the display screen change should be sincronized with the real display similarly as it is done in the flicker free tecnique used for ZX80
User avatar
1024MAK
Posts: 5102
Joined: Mon Sep 26, 2011 10:56 am
Location: Looking forward to summer in Somerset, UK...

Re: Double buffer grey scale?

Post by 1024MAK »

This idea of displaying different content for each pass of the "electron beam" (if a CRT) has been tried on various computers to increase the number of colours or shades.

The trouble is, how well or not it works does rather depend on the actual display (some CRTs work better than others, LCD displays usually give worse results) and the human looking at the display.

So often after the idea gets rediscovered, soon after, when it becomes clear that the flickering/flashing problem cannot be solved for most users, it gets abandoned again.

Things to keep in mind: the analogue TV system is full of compromises and is really only barely adequate to display moving pictures when the intensity of the "beam" (and hence the the intensity of a pixel) is continuously variable. The phosphor coating on a CRT is only designed to "hold" an image for long enough before the electron beam passes again. If phosphor coating had a longer persistence (like old style oscilloscopes or radar screens), moving TV images would become blurred.

So if you try to use the multiple pass technique so that an average pixel intensity is produced, by the time of your last pass, the amount of light from the CRT phosphor coating of the first pass will have decayed substantially. You are effectively reducing the displayed frame rate. Hence the flicker.

Mark
ZX81 Variations
ZX81 Chip Pin-outs
ZX81 Video Transistor Buffer Amp

:!: Standby alert :!:
There are four lights!
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb :!:
Looking forward to summer later in the year.
sirmorris
Posts: 2811
Joined: Thu May 08, 2008 5:45 pm

Re: Double buffer grey scale?

Post by sirmorris »

There's a bit in 25thanni demo which uses the alternate frames greyscale flicker technique. I just remembered.
Lardo Boffin
Posts: 2160
Joined: Sat Nov 26, 2016 2:42 am

Re: Double buffer grey scale?

Post by Lardo Boffin »

Thanks all. Interesting explanation about the TV flicker Mark!

I suspected at the start the idea wasn't going to work.
ZX80
ZX81 iss 1 (bugged ROM, kludge fix, normal, rebuilt)
TS 1000 iss 3, ZXPand AY and +, ZX8-CCB, ZX-KDLX & ChromaSCART
Tatung 81 + Wespi
TS 1500 & 2000
Spectrum 16k (iss 1 s/n 862)
Spectrum 48ks plus a DIVMMC future and SPECTRA
User avatar
GCHarder
Posts: 427
Joined: Sat Dec 14, 2013 7:46 pm

Re: Double buffer grey scale?

Post by GCHarder »

gammaray wrote: Wed May 10, 2017 12:51 am I remember back in the day someone was selling a game that flashed to create colors by stimulating the retina at different frequencies.

May be like when you stare at a an image for some time and then move to another the impression of color is given off.

https://petapixel.com/2015/11/16/trick- ... ull-color/
I tried this with mixed results, see

viewtopic.php?f=11&t=1705
User avatar
GCHarder
Posts: 427
Joined: Sat Dec 14, 2013 7:46 pm

Re: Double buffer grey scale?

Post by GCHarder »

See Fred Nachbaur's "Bi-Plot Demo" at

Http//www.pictureviewerpro.com/hosting/zx81/fredn.htm

"Bi-Plot demo" (16, WRX) This is a demonstration of a cool WRX16 display option. The 8K hi-res display file is divided into two 4K chunks, which are displayed on alternate frames to give a neat overlay effect. The lower six lines are standard low-res. Doesn't work as expected on ZX Emulator, needs a real ZX81 or TS1000/1500.

It does work in EO as I recall.

Regards;

Greg
Post Reply