Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

2048383 colours in screen 12! 3

Status
Not open for further replies.

qbasicking

Programmer
Aug 19, 2001
628
US
Using the out statement you could theoretically use hundreds of thousands or millions of colours in screen 12
this is the code that you should use:

'I& = variable, R&,G&,B& = red, green, blue
OUT &H3C8, I&
OUT &H3C9, R&
OUT &H3C9, G&
OUT &H3C9, B&

each value (R&,G&,B&) can be anything from 0 to 127 giving you 2048383 possible colours which would be useful for a movie player, a GUI...
 
I realized thaa I was not very clear when I posted this. Here is a further explaination. R& is the intensity of the red in the new colour, G& is the intensity of the green and B& is blue.
Also you can not have 2 million colours defined at the same time, but you can be contantly switching them - this is what I am going to do in my GUI, if you are going to use this tip for something that doesn't need very good resolution, use screen 13 sot hat you can define 256 colours at the same time
 
Ahhh... that's the rub. (As the Bard would put it.)

You can't squeeze blood from a turnip (they are bloodless). You can't squeeze more from the system than it is capable of giving. You can fool the user by tricking his eye but the illusion will never be persistent.

Keep at it. The latest archetecture was based on the hard work of people like you and me. (Don't be bitter. As the years go by, enjoy seeing the young rise to the challenge and contest the presumptions of the old.)
VCA.gif
 
In some programs that i have seen the screen has phenominal resolution, I have seen GUIs with resolution of 800*600*256, anybody know how they did this?
 
You can obtain a screen resolution of 800x600 with 16 to 24 bit color. In Qbasic this has been achieved through the use of libraries. The one of choice right now is the Future Library found at I'm currently using this library in building my GUI for a graphic editor for use with that library.
 
thank you - i will get the library and use it. Send me a demo of your GUI (as a .exe), I'm always interested in checking out new ones. weirdorcrazy@aol.com
 
True, you can set the palette RRGGBB for one of the 16 colors, but you can only display 16 colors at the same time.
 
@qbasicking
You can use 256,32000 or 2.000.000.000 colors in 640X480 resolution without all these acrobacies, you must just call interrupt 10h to setup a VESA mode (assuming you're in a windows dos box). But then all QB graphic functions (pset, line,get/put,circle, and in some cards event print) stops working and you must write your own functions. Some libraries as Future, UGL or Zephir have it done for you.
If you want pure qbasic examples using VESA modes, check
There you can find some classic demos translated to 640x480x256 or my jpeg viewer, where you can select the VESA mode you want to use.
I don't post direct links because geocities does'nt allow them. Antoni
 
To agual:

Holy Crap! Those pure QB resoultions are incredible! To heck with all my librarys... I going pure!

Well... I keep 'em for a few features like sound and XMS but SVGA... Pure QB man. That is incredible.

I givin' you my vote.
 
To agual:

I just re-read your message - you mean to tell me your SVGA functions don't work in Real-DOS mode? Dangit. I guess I retract my previous statement about my librarys. I'm going to keep them for SVGA.
 
Nyaj2k1:
VESA is an standard DOS API extension that makes all SVGA cards look the same to the DOS program. (a sort of what DirectX is for Win but with only a minimum of functions)

My programs will work for sure in a Windows DOS box because Win supplies a VESA driver.
You havs many chances they work in pure DOS:
-Your card implements VESA functions in it's own BIOS (Just try it and see what happens)
or:
-You load a manufacturer supplied VESA driver for DOS before running my program. Card makers not implementing VESA in bios "should" supply it.
or:
-If none of these is your case, there are general VESA drivers as UNIVBE, but i don't know where to find them.
Antoni
 
Nyaj2k1
I read your previous message:
Don't thrash your SVGA libraries :) Just stop and see my programs are only POKING single pixels to screen. No line or circle drawing, nor sprite get and put. You will have to implement it all! Antoni
 
That's what I'm going to end up doing for my QBasic GUI anyway... Poking each pixel to make sure that windows above that application's zOrder index are not written on. Some allready do that...
 
A GUI means text!
Be careful, not all SVGA cards can display DOS text. (There's a bit telling it you can check in the VESA init)
If card is not able to display text you will need to draw it pixel by pixel!
(There's a routine in my jpeg viewer that also scales the text) Antoni
 
nobody uses DOS text for GUI's anyway, we all make our own text writers and fonts.
 
Yeah... That's the only way to make our text pixel-by-pixel insted of row-by-row and colemn-by-colemn. I do, however, use the standard system font "images" when my GUI can't find the nicer fonts I created for it.
 
I can do pixel by pixel text scrolling (sort of?) in screen 7. Save a font in binary format and use BLOAD to call a letter (0 to 25, or more if there is more characters) draw to a backpage, GET and PUT, but only GET a piece of the font (Good for TT fonts) HELP: can't use ModeX, want help and a UniVBE 5.1 compatable library if any.
 
I wrote my own font format... I wanted a non-monospaced font and could not find any decent non-monospaced font routiens...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top