Solved

Greater than 256 colours

Posted on 1998-12-03
16
206 Views
Last Modified: 2010-04-16
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
Comment
Question by:VIBESPRO
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 7
  • 6
  • 3
16 Comments
 
LVL 2

Author Comment

by:VIBESPRO
ID: 1216313
Edited text of question
0
 
LVL 2

Author Comment

by:VIBESPRO
ID: 1216314
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
 
LVL 5

Expert Comment

by:scrapdog
ID: 1216315
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: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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.

 
LVL 5

Expert Comment

by:scrapdog
ID: 1216316
>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
 
LVL 2

Author Comment

by:VIBESPRO
ID: 1216317
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
 
LVL 2

Author Comment

by:VIBESPRO
ID: 1216318
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
 
LVL 5

Expert Comment

by:scrapdog
ID: 1216319
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
 
LVL 5

Accepted Solution

by:
scrapdog earned 60 total points
ID: 1216320
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
 
LVL 2

Author Comment

by:VIBESPRO
ID: 1216321
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
 
LVL 5

Expert Comment

by:scrapdog
ID: 1216322
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
 
LVL 2

Author Comment

by:VIBESPRO
ID: 1216323
So what does 640x480x65535 uses?
0
 
LVL 5

Expert Comment

by:scrapdog
ID: 1216324
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
 
LVL 4

Expert Comment

by:jack_p50
ID: 1216325
Try this great unit (up-to hi-color in any resolution) :
http://www.geocities.com/SiliconValley/Bay/9553/
0
 
LVL 4

Expert Comment

by:jack_p50
ID: 1216326
Try this great unit (up-to hi-color in any resolution) :
http://www.geocities.com/SiliconValley/Bay/9553/
0
 
LVL 4

Expert Comment

by:jack_p50
ID: 1216327
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
 
LVL 2

Author Comment

by:VIBESPRO
ID: 1216328
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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Tstream to hex 1 1,750
Indy TIdHTTP POSTs getting slow responses 6 1,082
How to capture screen window of a process 4 412
Inno Setup -> Add App Pin to Task Bar 1 783
While it may be true that the internet is a place of possibilities, it is also a hostile environment lurking with many dangers. By clicking on the wrong link, trusting the wrong person or using a weak password, you are virtually inviting hackers to …
In order to fulfill our mission of inspiring learning in the technology community, Experts Exchange is launching a Course of the Month program. Premium and Team Account members will have access to one course per month as a part of their membership, …
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question