Solved

Greater than 256 colours

Posted on 1998-12-03
16
202 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
  • 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
 
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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Find out what Office 365 Transport Rules are, how they work and their limitations managing Office 365 signatures.
A safe way to clean winsxs folder from your windows server 2008 R2 editions
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

706 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now