Flashing pixels in 8 color mode

Anything QL Software or Programming Related.
Post Reply
User avatar
keith56
ROM Dongle
Posts: 7
Joined: Wed Feb 20, 2019 10:50 am
Contact:

Flashing pixels in 8 color mode

Post 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!


User avatar
NormanDunbar
Forum Moderator
Posts: 2251
Joined: Tue Dec 14, 2010 9:04 am
Location: Leeds, West Yorkshire, UK
Contact:

Re: Flashing pixels in 8 color mode

Post by NormanDunbar »

Silly question, does flash work from SuperBASIC? If not, its probably the emulator.

Cheers,
Norm.


Why do they put lightning conductors on churches?
Author of Arduino Software Internals
Author of Arduino Interrupts

No longer on Twitter, find me on https://mastodon.scot/@NormanDunbar.
User avatar
tofro
Font of All Knowledge
Posts: 2685
Joined: Sun Feb 13, 2011 10:53 pm
Location: SW Germany

Re: Flashing pixels in 8 color mode

Post 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


ʎɐqǝ ɯoɹɟ ǝq oʇ ƃuᴉoƃ ʇou sᴉ pɹɐoqʎǝʞ ʇxǝu ʎɯ 'ɹɐǝp ɥO
User avatar
keith56
ROM Dongle
Posts: 7
Joined: Wed Feb 20, 2019 10:50 am
Contact:

Re: Flashing pixels in 8 color mode

Post by keith56 »

I'm using Q-emulator (unregistered) but neither of those examples are flashing anything!


User avatar
keith56
ROM Dongle
Posts: 7
Joined: Wed Feb 20, 2019 10:50 am
Contact:

Re: Flashing pixels in 8 color mode

Post 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!


User avatar
tofro
Font of All Knowledge
Posts: 2685
Joined: Sun Feb 13, 2011 10:53 pm
Location: SW Germany

Re: Flashing pixels in 8 color mode

Post 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


ʎɐqǝ ɯoɹɟ ǝq oʇ ƃuᴉoƃ ʇou sᴉ pɹɐoqʎǝʞ ʇxǝu ʎɯ 'ɹɐǝp ɥO
User avatar
Cristian
Aurora
Posts: 960
Joined: Mon Feb 16, 2015 1:40 pm
Location: Veneto

Re: Flashing pixels in 8 color mode

Post by Cristian »

In Windows (XP) Qemulator does support FLASH, but only in fulscreen mode and the magnification filter must be set to OFF


Post Reply