Flashing pixels in 8 color mode

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

Flashing pixels in 8 color mode

Postby keith56 » Sat Mar 16, 2019 7:32 am

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
Aurora
Posts: 771
Joined: Tue Dec 14, 2010 9:04 am
Location: Leeds, West Yorkshire, UK
Contact:

Re: Flashing pixels in 8 color mode

Postby NormanDunbar » Sat Mar 16, 2019 8:12 am

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

Cheers,
Norm.


Why do they put lightning conductors on churches?
If at first you don't succeed, don't take up skydiving!
If you think your job is pointless, remember, there's someone in Germany who fits indicators to BMWs.
User avatar
tofro
QL Wafer Drive
Posts: 1647
Joined: Sun Feb 13, 2011 10:53 pm
Location: SW Germany

Re: Flashing pixels in 8 color mode

Postby tofro » Sat Mar 16, 2019 8:28 am

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

Postby keith56 » Sat Mar 16, 2019 9:05 am

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

Postby keith56 » Sat Mar 16, 2019 9:28 am

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
QL Wafer Drive
Posts: 1647
Joined: Sun Feb 13, 2011 10:53 pm
Location: SW Germany

Re: Flashing pixels in 8 color mode

Postby tofro » Sat Mar 16, 2019 11:10 am

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
Super Gold Card
Posts: 644
Joined: Mon Feb 16, 2015 1:40 pm
Location: Veneto

Re: Flashing pixels in 8 color mode

Postby Cristian » Sat Mar 16, 2019 11:56 am

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



Who is online

Users browsing this forum: No registered users and 5 guests