Double buffer grey scale?
-
- Posts: 2173
- Joined: Sat Nov 26, 2016 2:42 am
Double buffer grey scale?
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
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
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
Re: Double buffer grey scale?
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
"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
http://zx81.ddns.net/ZxTeaM
-
- Posts: 325
- Joined: Sat Sep 27, 2014 8:02 pm
- Location: Stockholm, Sweden
Re: Double buffer grey scale?
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.
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
Re: Double buffer grey scale?
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/
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
Re: Double buffer grey scale?
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
- 1024MAK
- Posts: 5118
- Joined: Mon Sep 26, 2011 10:56 am
- Location: Looking forward to summer in Somerset, UK...
Re: Double buffer grey scale?
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
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.
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.
Re: Double buffer grey scale?
There's a bit in 25thanni demo which uses the alternate frames greyscale flicker technique. I just remembered.
-
- Posts: 2173
- Joined: Sat Nov 26, 2016 2:42 am
Re: Double buffer grey scale?
Thanks all. Interesting explanation about the TV flicker Mark!
I suspected at the start the idea wasn't going to work.
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
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
Re: Double buffer grey scale?
I tried this with mixed results, seegammaray 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/
viewtopic.php?f=11&t=1705
Re: Double buffer grey scale?
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
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