[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Problem Converting Apple IIgs' RGB to VGA?



    You may already know 16 RGB colors from Call A.P.P.L.E. article and 
Apple IIgs' Hardware manual below.

Black:       000 -> 000000 -> 000000 -> 0000

Deep Red:    D03 -> DD0033 -> D00030 -> D806

Dark Blue:   009 -> 000099 -> 000090 -> 0013

Purple:      D2D -> DD22DD -> D020D0 -> D91B

Dark Green:  072 -> 007722 -> 007020 -> 03A4

Dark Gray:   555 -> 555555 -> 505050 -> 52AA

Medium Blue: 22F -> 2222FF -> 2020F0 -> 211F

Light Blue:  6AF -> 66AAFF -> 60A0F0 -> 655F

Brown:       850 -> 885500 -> 805000 -> 8AA0

Orange:      F60 -> FF6600 -> F06000 -> FB20

Light Gray:  AAA -> AAAAAA -> A0A0A0 -> AD55

Pink:        F98 -> FF9988 -> F09080 -> FCD1

Green:       1D0 -> 11DD00 -> 10D000 -> 16E0

Yellow:      FF0 -> FFFF00 -> F0F000 -> FFE0

Aquamarine:  4F9 -> 44FF99 -> 40F090 -> 47F3

White:       FFF -> FFFFFF -> F0F0F0 -> FFFF


    First column is from CALL A.P.P.L.E. article and Apple IIgs' hardware 
manual.  It is 12 bit RGB.  Second column is 24 bit RGB.  How did someone 
know to convert from 12 bit RGB to 24 bit RG?  I have seen some emulators 
which they claim to use 24 bit RGB.  High nibble is duplicated to low 
nibble.  Look at third column.  It has all high nibbles for 12 bit RGB and 
zero on all low nibbles.
    If you try to guess to put $0 through $F in each low nibbles while 
leaving high nibbles unchanged, you may notice little brighter or darker in 
16 colors.  It is not noticeable when you look at screen closely.  Fourth 
column is 16 bit RGB.  I am able to divide high nibble with data and low 
nibble with zero by eight into 5 bit RED and 5 bit BLUE, and divide them by 
four into six bit GREEN to create 16 bit RGB.  Then 16 bit RGB is converted 
back to 24 bit RGB before you may see high nibbles are still the same and 
low nibbles have data from $0 through $F instead of zero.
    You may wish to convert from 24 bit RGB to 30 bit RGB (32 bits data with 
zero bit on first and second MSB).  It is ten bit in RED, GREEN, and BLUE. 
Some newer video cards support 30 bit RGB.
    Do you have your opinion?  Do you think that wrong palettes to convert 
4,096 colors to 16.7M colors are not important which it is close to be 
accurate.
    I think that 16 bit RGB screen is better for speed with small size of 
video buffers than 24 bit RGB so emulators can run smoothly using 16 bit RGB 
screen in 640x480x16 (614400 bytes).  Too huge data size in video buffer 
such as 1024x768x32 (3MB) may slow to update 60 frames per second.  It is 
sad that 8 bit RGB is no longer supported in Microsoft DirectX 9.0  What do 
you think?

Bryan Parkoff