Gfa init a high res Truecolor or 256c mode on falcon

GFA BASIC-related articles in here please

Moderators: exxos, simonsunnyboy, Mug UK, Zorro 2, Moderator Team

User avatar
hylst
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 133
Joined: Wed Apr 27, 2011 6:22 pm
Location: France : Strasbourg
Contact:

Gfa init a high res Truecolor or 256c mode on falcon

Postby hylst » Thu Sep 05, 2013 11:35 am

Hello !

I've read from Simmon Sunny Boy website and atari forum some post about pi9 loader, and st cooper back to st low 'rout' on falcon.
I wanted to use the higher 256c & truecolor resolution possible that i could call on a standard falcon from gfa.
I imagine most of falcon user use vga, older rvb screens being more resolution limited.
I hardly remember xbios fonction that change the resolution. But which one & how does it works (parameters). Better videl direct access ?
Can we still change resolution many time without having to reboot ?
Does Xbios 5 to set new physical / logical screen adresses works still on falcon ?
I cannot find again falcon video memory structure, where could i find such a doc ? ( colour coding in TC mode, planar structure of 256c mode with palette adresse, ...)

Thank you !

PS . Is hardware scrolling still possible on falcon ? If positive, same registers ?
Falcon CT60 +CENTRAM14 - 520 STE 4M - 1040 STf
Let's visit my Personal website http://hylst.t15.org !
The new website of my productions (French for the moment)

User avatar
Omikronman
Atari Super Hero
Atari Super Hero
Posts: 525
Joined: Wed Dec 01, 2004 12:13 am
Location: Germany
Contact:

Re: Gfa init a high res Truecolor or 256c mode on falcon

Postby Omikronman » Thu Sep 05, 2013 2:49 pm

I strongy avoided to use automatic switching screen modes. Some graphcis/musics demos liked to switch the screen mode by itself. It sometimes went wrong and nearly burned my Atari screen. That´s why I personally did not use a function like that. :?

User avatar
shoggoth
Nature
Nature
Posts: 848
Joined: Tue Aug 01, 2006 9:21 am
Location: Halmstad, Sweden
Contact:

Re: Gfa init a high res Truecolor or 256c mode on falcon

Postby shoggoth » Thu Sep 05, 2013 3:07 pm

VsetMode() to save/set/restore screenmode.
Physbase() to save physical screen address.
Vsetscreen() to set/restore physical screen address.

256 color mode is planar like ST resolutions, but with 8 planes. Use VsetRGB() to save/set/restore palette.

Hicolor is one word per pixel (rrrrrggggggbbbbb). Use VsetRGB() to save/set/restore border color.

EDIT: Hardware scrolling is possible. Same registers.
Last edited by shoggoth on Thu Sep 05, 2013 6:08 pm, edited 1 time in total.
Ain't no space like PeP-space.

User avatar
simonsunnyboy
Moderator
Moderator
Posts: 4774
Joined: Wed Oct 23, 2002 4:36 pm
Location: Friedrichshafen, Germany
Contact:

Re: Gfa init a high res Truecolor or 256c mode on falcon

Postby simonsunnyboy » Thu Sep 05, 2013 3:25 pm

The utility screenspain can generate code to setup the VIDEL for a particular mode. It can output assembly language aswell as GFA POKE statements.
My Truecolor mode package actually uses configurations generated by screenspain so you can likely tweak it to produce different video modes.
Simon Sunnyboy/Paradize - http://paradize.atari.org/ - STOT: http://www.npoi.de/stot/

Stay cool, stay Atari!

1x2600jr, 1x1040STFm, 1x1040STE 4MB+TOS2.06+SatanDisk, 1xF030 14MB+FPU+NetUS-Bee

Jabber: simonsunnyboy@atari-jabber.org

User avatar
hylst
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 133
Joined: Wed Apr 27, 2011 6:22 pm
Location: France : Strasbourg
Contact:

Re: Gfa init a high res Truecolor or 256c mode on falcon

Postby hylst » Thu Sep 05, 2013 7:36 pm

simonsunnyboy wrote:The utility screenspain can generate code to setup the VIDEL for a particular mode. It can output assembly language aswell as GFA POKE statements.
My Truecolor mode package actually uses configurations generated by screenspain so you can likely tweak it to produce different video modes.


Excellent ! http://www.pouet.net/prod.php?which=51188
I've found it on pouet. I'll try it !

Thx Simon !
Falcon CT60 +CENTRAM14 - 520 STE 4M - 1040 STf
Let's visit my Personal website http://hylst.t15.org !
The new website of my productions (French for the moment)

User avatar
hylst
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 133
Joined: Wed Apr 27, 2011 6:22 pm
Location: France : Strasbourg
Contact:

Re: Gfa init a high res Truecolor or 256c mode on falcon

Postby hylst » Thu Sep 05, 2013 7:52 pm

shoggoth wrote:VsetMode() to save/set/restore screenmode.
Physbase() to save physical screen address.
Vsetscreen() to set/restore physical screen address.

256 color mode is planar like ST resolutions, but with 8 planes. Use VsetRGB() to save/set/restore palette.

Hicolor is one word per pixel (rrrrrggggggbbbbb). Use VsetRGB() to save/set/restore border color.

EDIT: Hardware scrolling is possible. Same registers.


Thank you Shoggot. I've found after a better googling http://www.atari-forum.com/wiki/index.php?title=Changing_video_mode_using_the_Falcon_XBIOS
that describes quite welle the xbios function you advised. I ve yet discovered this vey well done website : http://toshyp.atari.org/en/004014.html.
So many infos that was not easy to get 15 years ago ! Now i have the info, just the time lacks =D

About 256c mode, 16 pixel wide blocks too ? X 8 planes (8bits to code the colour number) ?

So in truecolor, hue more accurate in green 6 bits, thant in red and blue (5 bits) ? Each pixel coded in a word.
Border color is the first entry when using vsetrgb ? because, there is no palette in this mode, so...
Falcon CT60 +CENTRAM14 - 520 STE 4M - 1040 STf
Let's visit my Personal website http://hylst.t15.org !
The new website of my productions (French for the moment)

User avatar
shoggoth
Nature
Nature
Posts: 848
Joined: Tue Aug 01, 2006 9:21 am
Location: Halmstad, Sweden
Contact:

Re: Gfa init a high res Truecolor or 256c mode on falcon

Postby shoggoth » Fri Sep 06, 2013 1:49 pm

hylst wrote:About 256c mode, 16 pixel wide blocks too ? X 8 planes (8bits to code the colour number) ?


Yes.

So in truecolor, hue more accurate in green 6 bits, thant in red and blue (5 bits) ? Each pixel coded in a word.


Yup. It's an RrrrrGgggggBbbbb mode. Gradients look better if you skip the lsb on the green channel though (banding becomes too obvious otherwise).

Border color is the first entry when using vsetrgb ? because, there is no palette in this mode, so...


Yes. It only affects the border in hicolor mode. First entry.
Ain't no space like PeP-space.

User avatar
hylst
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 133
Joined: Wed Apr 27, 2011 6:22 pm
Location: France : Strasbourg
Contact:

Re: Gfa init a high res Truecolor or 256c mode on falcon

Postby hylst » Sat Sep 07, 2013 7:00 pm

Thank you !
Falcon CT60 +CENTRAM14 - 520 STE 4M - 1040 STf
Let's visit my Personal website http://hylst.t15.org !
The new website of my productions (French for the moment)

User avatar
Jorstad
Retro freak
Retro freak
Posts: 16
Joined: Tue Apr 21, 2009 8:39 pm
Location: Sweden
Contact:

Re: Gfa init a high res Truecolor or 256c mode on falcon

Postby Jorstad » Tue Apr 05, 2016 11:55 pm

Sorry for reviving an old thread but sort of on topic :?

Shouldn't VsetMode (or xbios(88)) return the same value every time i inquire it (without changing the resolution of course) ?
If i save it more than once, the second time and beyond it returns a value ten times a word?? (Second and on stays the same though)
I would like to verify the screenmode i've set but this bug or whatever it is makes it impossible :(
I haven't tried to compile (yet) so I don't know if it would behave differently compiled..

I have managed to do 640*480*8bp a long time ago so it does work but it bothers me that
I don't understand this :lol:

I run GFA 3.55 and i have TOS 4.01 in case there is some bug lurking around..

Thanks!

User avatar
lp
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2233
Joined: Wed Nov 12, 2003 11:09 pm
Location: GFA Headquarters
Contact:

Re: Gfa init a high res Truecolor or 256c mode on falcon

Postby lp » Wed Apr 06, 2016 1:32 am

Can you post your binding for Vsetmode() or the code that calls xbios(88) ?

User avatar
Jorstad
Retro freak
Retro freak
Posts: 16
Joined: Tue Apr 21, 2009 8:39 pm
Location: Sweden
Contact:

Re: Gfa init a high res Truecolor or 256c mode on falcon

Postby Jorstad » Wed Apr 06, 2016 6:53 am

I just save the modecode to a variable the same way I've seen in all examples

mode%=XBIOS(88,-1)

Then i print the value to screen and first time i get the correct decimal value (434 if in st-low for example).

I tried this too

Code: Select all

for i=0 to 10
mode%=(xbios(88,w:-1))
print mode%
next i


First one is actual modecode in decimal every run but number 2 to 10 is constant 31xxxx something
Maybe it is because i actually use the screen? :?:

User avatar
mjvans
Atari User
Atari User
Posts: 34
Joined: Thu Dec 31, 2015 2:08 pm
Location: Netherlands
Contact:

Re: Gfa init a high res Truecolor or 256c mode on falcon

Postby mjvans » Wed Apr 06, 2016 8:07 am

maybe it is because you use mode% as integer (4 bytes) and not 2 byte word mode& as I see in most examples but it is not logical it should not make difference.
I can't run your code at the moment my Falcon is not in working state.

User avatar
lp
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2233
Joined: Wed Nov 12, 2003 11:09 pm
Location: GFA Headquarters
Contact:

Re: Gfa init a high res Truecolor or 256c mode on falcon

Postby lp » Wed Apr 06, 2016 9:09 am

It seem to do this on aranym as well, interesting. Firstly the documentation states the parameter should be word and not long, even though it appears not to matter. It also states the return value is a word and not a long. So this seems to fix it:

Code: Select all

FOR i=0 TO 10
  mode&=WORD((XBIOS(88,W:-1)))  !drop the upper word of result!
  PRINT mode&
NEXT i


I looked at the compiled code with a dis-assembler and appears to me there is garbage left in the upper word of d0.

User avatar
Jorstad
Retro freak
Retro freak
Posts: 16
Joined: Tue Apr 21, 2009 8:39 pm
Location: Sweden
Contact:

Re: Gfa init a high res Truecolor or 256c mode on falcon

Postby Jorstad » Wed Apr 06, 2016 10:10 am

Will try later when i get home, but if the upper word is dropped you'll miss the doubleline bit no? I've seen that the bits 2-8 (or 1-7 i dont know wich is the right way to count :)) are reserved so i guess that it is there the garbage is showing up..

Thanks anyhow, it"s not that important but it made me curious.. and now i am really curious of the reserved bits and what they are used for heh :P

User avatar
shoggoth
Nature
Nature
Posts: 848
Joined: Tue Aug 01, 2006 9:21 am
Location: Halmstad, Sweden
Contact:

Re: Gfa init a high res Truecolor or 256c mode on falcon

Postby shoggoth » Wed Apr 06, 2016 11:11 am

Jorstad wrote:Will try later when i get home, but if the upper word is dropped you'll miss the doubleline bit no? I've seen that the bits 2-8 (or 1-7 i dont know wich is the right way to count :)) are reserved so i guess that it is there the garbage is showing up..

Thanks anyhow, it"s not that important but it made me curious.. and now i am really curious of the reserved bits and what they are used for heh :P


The mode code parameter used for VsetMode()/VsetScreen(,,3,)/VgetSize() etc is a 16-bit value; the upper word is not used and must be discarded.
Ain't no space like PeP-space.

User avatar
Jorstad
Retro freak
Retro freak
Posts: 16
Joined: Tue Apr 21, 2009 8:39 pm
Location: Sweden
Contact:

Re: Gfa init a high res Truecolor or 256c mode on falcon

Postby Jorstad » Wed Apr 06, 2016 11:36 am

@shoggoth; I may be out on thin ice here but if I add up the bits value in the first result (434 dec for st-low) it makes sense, if I discard the upper word it would equal 434-256 or am I totally wrong? Still wonder why i get different results from the first read when all i do is read :/

Ahem, and I've got no coding skills to speak of so this is a learning process :)

seedy1812
Atari User
Atari User
Posts: 33
Joined: Tue May 18, 2010 2:04 pm

Re: Gfa init a high res Truecolor or 256c mode on falcon

Postby seedy1812 » Wed Apr 06, 2016 12:30 pm

Jorstad , the lower word is the range 0 -> 65535 ( $ffff )

User avatar
Jorstad
Retro freak
Retro freak
Posts: 16
Joined: Tue Apr 21, 2009 8:39 pm
Location: Sweden
Contact:

Re: Gfa init a high res Truecolor or 256c mode on falcon

Postby Jorstad » Wed Apr 06, 2016 4:13 pm

Ok so now I've tried and it's all good :) now it's just a matter off wrappin my mind around how it works so i wont get confused again :) thank you all!

User avatar
arcx
Retro freak
Retro freak
Posts: 16
Joined: Tue Jan 19, 2016 12:13 am

Re: Gfa init a high res Truecolor or 256c mode on falcon

Postby arcx » Sat Apr 16, 2016 10:39 am



Social Media

     

Return to “GFA BASIC”

Who is online

Users browsing this forum: No registered users and 1 guest