[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 218
  • Last Modified:

Greater than 256 colours

Does anyone know how to get into a higher colour mode AND plot a pixel to the screen?  Also, is this higher colour mode able to display ALL the colours at the same time?  
0
VIBESPRO
Asked:
VIBESPRO
  • 7
  • 6
  • 3
1 Solution
 
VIBESPROAuthor Commented:
Edited text of question
0
 
VIBESPROAuthor Commented:
I know how to get into 256 colour modes.  For example I use
Port[$3C8] like this :

var
 N: Byte;

begin
 for N:= 0 to 255 do Port[$3C8]:= N;
end;

I would like Port[$3C8] to have a greater range like this:

var
 N: Word;

begin
 for N:= 0 to 65535 do Port[$3C8]:= N;
end;

I also used PortW[$3C8] but I can't get red, only green and blue.
0
 
scrapdogCommented:
Your question is "Greater than 256 colours".  What color mode do you want to go into?  Different modes have different ways of interpretting the colors.  If you are using 24-bit colors, a word can't store this.  The reason you are not getting red is because bits 16-23 are the red component of the color...you are only accessing bits 15-0 with a word...therefore the red component will always be 0.  I need to know what color mode you are in.
0
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
scrapdogCommented:
>Also, is this higher colour mode able to display ALL the
>colours at the same time?  

Any color mode that doesn't use a palette will allow you to display all colors at the same time.  Most likely any mode greater than 256 colors DOESN'T use a palette, so yes, all colors can be displayed at once.
0
 
VIBESPROAuthor Commented:
SCRAPDOG, I am in mode 112h and could you show me how to get
into mode 640x480 with 65535 colours.  Also could you go over the reason why I can't get red.  I don't quit understand.
0
 
VIBESPROAuthor Commented:
Oh yes.  And you said that ALL colours greater than 256 can be displayed at once, BUT WITHOUT A PALETTE.  Explain this.
Do you mean instead of 'palette : array[0..65535, 0..2] of byte'
the colours are stored in the memory.
0
 
scrapdogCommented:
In 65536 color mode, the colors are stored in 16 bits.  5 bits for red, 6 bits for green, and 5 bits for blue.  The actual color is stored in memory, NOT an index to a palette.

I have tried playing around with different 640x480 modes in DOS but fried my monitor.
0
 
scrapdogCommented:
Try this site for more info on 640x480x65536.  You can download source code here.

http://kyuss.artis.uni-oldenburg.de/virtual_technologies/index_toolkits.html
0
 
VIBESPROAuthor Commented:
O.K SCRAPDOG.  I found the web-site you gave me and found what I was looking for.   Thank You.
But there was NO procedure that sets a certain colour.  Example:
Port[$3C8]:= ColourNumber;
Port[$3C9]:= R;
Port[$3C9]:= G;
Port[$3C9]:= B;

Could you show how.
Thanx.
0
 
scrapdogCommented:
Port[$3C8]:= ColourNumber;
Port[$3C9]:= R;
Port[$3C9]:= G;
Port[$3C9]:= B;

This code is to set a palette register.  640x480x65536 doesn't use palettes.

0
 
VIBESPROAuthor Commented:
So what does 640x480x65535 uses?
0
 
scrapdogCommented:
The color is stored directly in memory.  The value of the pixel IS the color, not a reference to a palette.  To change a pixel's color, you directly alter the memory location which corresponds to that particular pixel.  You don't have to access the ports at all.

I am sure that in the code you downloaded, the Mem or MemW array is used to store the color.
0
 
jack_p50Commented:
Try this great unit (up-to hi-color in any resolution) :
http://www.geocities.com/SiliconValley/Bay/9553/
0
 
jack_p50Commented:
Try this great unit (up-to hi-color in any resolution) :
http://www.geocities.com/SiliconValley/Bay/9553/
0
 
jack_p50Commented:
in hi-color mode screen is divided into 64k "banks". you can do all grafx things by vesa functions, but they are doing only in one bank, so you need to switch banks too. this unit does that, and uses accellerated gfx-card functions for more speed
0
 
VIBESPROAuthor Commented:
Sorry JACK_P50.  SRAPDOG gave me that already.  Thanx any way.
And thank you SCRAPDOG the unit was SUPERB. I did find out all what I needed, so far...
0

Featured Post

The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

  • 7
  • 6
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now