SCREEN1 = SYSVAR @ JSROM

Anything QL Software or Programming Related.
User avatar
tofro
QL Wafer Drive
Posts: 1660
Joined: Sun Feb 13, 2011 10:53 pm
Location: SW Germany

Re: SCREEN1 = SYSVAR @ JSROM

Postby tofro » Fri Jul 12, 2019 10:16 am

Does the very same POKE, just hidden in a BASIC extension.

Tobias


ʎɐqǝ ɯoɹɟ ǝq oʇ ƃuᴉoƃ ʇou sᴉ pɹɐoqʎǝʞ ʇxǝu ʎɯ 'ɹɐǝp ɥO
User avatar
janbredenbeek
Gold Card
Posts: 334
Joined: Wed Jan 21, 2015 4:54 pm
Location: Hilversum, The Netherlands

Re: SCREEN1 = SYSVAR @ JSROM

Postby janbredenbeek » Fri Jul 12, 2019 2:44 pm

tofro wrote:Does the very same POKE, just hidden in a BASIC extension.

And less flexible. It only allows for square-shaped pixels or the standard 512x256 on a 3:2 screen.
What if you have a Q68 with 1024x768 on a 16:9 monitor?
(the value to POKE can be calculated by dividing (Xresolution/Yresolution) by the width/height ratio of your monitor, so 1024x768 on a 16:9 monitor would yield 1.33/1.78 = 0.75).

Jan


tcat
Super Gold Card
Posts: 558
Joined: Fri Jan 18, 2013 5:27 pm
Location: Prague, Czech Republic

Re: SCREEN1 = SYSVAR @ JSROM

Postby tcat » Mon Jul 15, 2019 11:21 am

Hi,

I am thinking of some simple graphics format.

I have started with the one below, making use of the simple raster ops, I have coded so far. With a certain level of detail however, the data may become increasingly big. Then perhaps some RLE encoded bitmap image would be taking less space? Seeking advice.

Code: Select all

gfx_dta  dc.w     0,0               ;x,y offset
         dc.b     'f',1             ;fill on
         dc.b     'p',7             ;poly
         dc.b     40,54,20,60
         dc.b     40,66,60,60
         dc.b     40,54,-1
         dc.b     'f',0,7           ;fill off
         dc.b     'p',1             ;poly
         dc.b     40,54,20,60
         dc.b     40,66,60,60
         dc.b     40,54,-1
         dc.b     'f',1             ;fill on
         dc.b     'p',2             ;poly
         dc.b     40,20,36,60
         dc.b     40,100,44,60
         dc.b     40,20,-1
         dc.b     'f',0,2           ;fill off
         dc.b     'p',1             ;poly
         dc.b     40,20,36,60
         dc.b     40,100,44,60
         dc.b     40,20,-1
         dc.b     'a',40,20,5,'N'   ;alpha char
         dc.b     'a',35,90,5,'S'   
         dc.b     'a',20,50,5,'W'   
         dc.b     'a',52,64,5,'E'   
         dc.b     -1                ;gfx dta end

When processed in a loop (sort of simple gfx interpreter), it renders this. I try to keep in bytes (rather than words), and apply offsets during rendering which I hope can save on memory space. Looking for a better idea.

gfx.png
graphics
gfx.png (9.44 KiB) Viewed 712 times

Many thanks.
Tomas


tcat
Super Gold Card
Posts: 558
Joined: Fri Jan 18, 2013 5:27 pm
Location: Prague, Czech Republic

Re: SCREEN1 = SYSVAR @ JSROM

Postby tcat » Tue Jul 16, 2019 7:43 pm

Hi,

Testing the graphics interpreter, can now process all elements by definition, including new lines in strings, glad I have learnt how to add. I know, is not exactly a stunning hi-res image, but is best, I can do at the moment.

Code: Select all

         ...
         dc.b     's',72,20,7       ;string
         dc.b     'Compass rose',10,10
         dc.b     'bearings to North',10
         dc.b     'bearings to East',10
         dc.b     'bearings to West',10
         dc.b     'bearings to South',0
         ...

rose.png
compass rose

The `gfx_dta' is some 240 bytes for the above, sligthly bigger to teh earlier one with just 80 bytes. I wonder what it takes to make a simple editor, outputting `gfx_dta' format. Not sure I can do in assembly, but will try in SuperBASIC.

Tomas



Who is online

Users browsing this forum: No registered users and 1 guest