Page 1 of 1

Flashing pixels in 8 color mode

Posted: Sat Mar 16, 2019 7:32 am
by keith56
I'm playing around with QL bitmap graphics in assembly, and I'm a bit confused about the 'flashing' bits of 8 color mode... I can't seem to get them to do anything!
According to the documentation, setting a flashing bit to 1 will start the line flashing, and another will turn it off, but nothing seems to flash at all..

Firstly I'm using Qemulator - and I wonder, is it that the emulator doesn't support flashing graphics,
or Secondly, is the flashing a 'software' function... and it's that I need to do something like call a function to set flashing rate?

I'm probably being dumb, so any advice anyone can give!

Re: Flashing pixels in 8 color mode

Posted: Sat Mar 16, 2019 8:12 am
by NormanDunbar
Silly question, does flash work from SuperBASIC? If not, its probably the emulator.

Cheers,
Norm.

Re: Flashing pixels in 8 color mode

Posted: Sat Mar 16, 2019 8:28 am
by tofro
Keith,

flashing pixels is actually a hardware function on the real QL - When the flash bits are set, the pixels will start to flash in 50Hz intervals driven by the hardware. The flash bits are, other than any other screen bits on the QL, a sort of serial attribute - You only set them at the beginning and end of the area of the scan line you want flashing. The first set flash bit switches on flashing until the next occurrence (or end of scan line) switches it off.

Note you must be in mode 8 to use FLASH - it doesn't do anything in mode 4.

A simple BASIC example would be

MODE 8
FLASH #0,1
PRINT #0, "Hello, flashing"

or, closer to machine language

MODE 8
PRINT#2,"Hello QL, Flashing"
POKE 131072,255 : REM sets the flash bit in the uppermost scanline
REM should flash the first few pixels of the border of #2


This should work on any Emulator that supports flashing (Q-emulator and ZEsarUX do, QPC2 doesn't, to my knowledge)

Tobias

Re: Flashing pixels in 8 color mode

Posted: Sat Mar 16, 2019 9:05 am
by keith56
I'm using Q-emulator (unregistered) but neither of those examples are flashing anything!

Re: Flashing pixels in 8 color mode

Posted: Sat Mar 16, 2019 9:28 am
by keith56
Ok, scratch that - it works if I fullscreen Q-emulator on an XP VM!... it doesn't work in a window, and full-screen screws up windows 7 something proper..

It looks like the emulator is doing something pretty weird to effect the flash, as bits of windows are flashing at the same time!

So it's an emulator issue! my curiosity is satisfied, thanks!

Re: Flashing pixels in 8 color mode

Posted: Sat Mar 16, 2019 11:10 am
by tofro
Interesting.

Q-Emulator flashes the first few pixels nicely here with the example I provided on my Mac with Parallels and Windows 7, regardless of window or fullscreen mode. This is sometimes caused by Windows screen drivers that mess up Aqua mode.

Tobias

Re: Flashing pixels in 8 color mode

Posted: Sat Mar 16, 2019 11:56 am
by Cristian
In Windows (XP) Qemulator does support FLASH, but only in fulscreen mode and the magnification filter must be set to OFF