VOGONS

Common searches


First post, by mills26

User metadata
Rank Newbie
Rank
Newbie

Hi. I started this thread on another forum but I want to post it here just in case, and also to share some info I found.

I wanted to redefine the windows 3.1 system palette with the VGA driver (640x480 16 colors), to set the pico-8 one, (it looks awesome for everything). Windows itself can change the 16 color palette when loading the startup logo, but once it starts there is no way to edit the colors themselves.

On vintage computer federation they suggested me to look inside vga.drv, because it seems to define the 16 colors there, and I found RGB tables with the values for the palette used in VGA 😀.
The bad news is, I edited the values using a hex editor, and it did not change the rgb values, just uses that tables to look for the closest color in the fixed palette, and rearranges the same 16 ugly colors 🙁.

Someone could make a windows program which changes VGA registers, but I think that will only work while the program is running, also windows will reset it every time it loads a dos program.

Is there any other way to change the system palette?.

I don't think there is a windows 3.1 source code, that would be awesome, rgb values for the palette are surely stored somewhere. Maybe they are not stored, and windows just resets the VGA card and uses the default EGA palette.

Reply 2 of 6, by Jo22

User metadata
Rank l33t++
Rank
l33t++

Hi there!

From what I remember, the VGA driver uses mode 12h and the same 16c palette as EGA.

Here's a Wikipedia entry about the palette.
Edit: https://en.wikipedia.org/wiki/List_of_software_palettes
- Also note the "static" colours. They're 20 in total, if, say, a 256c colour driver is used.

If you like to experiment, there's also the Windows 3.0 VGA driver and the Windows 3.0 MME VGA driver.
The latter one is palettized, ie. the 16c colours can be altered by application.

I've attached it to this reply, hope that's okay to do.
To use it, just copy it into SYSTEM directory and alter SYSTEM.INI to have display.drv=vgapal.drv.

Good luck!

PS: This might also be interesting!
Washed out colors in Windows 3.

Edit: I'm sorry, I was a bit too late. 😅

Attachments

  • Filename
    vgapal.zip
    File size
    35.94 KiB
    Downloads
    70 downloads
    File comment
    Experimental VGA driver (Win 3.0 MME)
    File license
    Fair use/fair dealing exception

"Time, it seems, doesn't flow. For some it's fast, for some it's slow.
In what to one race is no time at all, another race can rise and fall..." - The Minstrel

//My video channel//

Reply 3 of 6, by mills26

User metadata
Rank Newbie
Rank
Newbie
Jo22 wrote on 2022-05-04, 10:01:
Hi there! […]
Show full quote

Hi there!

From what I remember, the VGA driver uses mode 12h and the same 16c palette as EGA.

Here's a Wikipedia entry about the palette.
Edit: https://en.wikipedia.org/wiki/List_of_software_palettes
- Also note the "static" colours. They're 20 in total, if, say, a 256c colour driver is used.

If you like to experiment, there's also the Windows 3.0 VGA driver and the Windows 3.0 MME VGA driver.
The latter one is palettized, ie. the 16c colours can be altered by application.

I've attached it to this reply, hope that's okay to do.
To use it, just copy it into SYSTEM directory and alter SYSTEM.INI to have display.drv=vgapal.drv.

Good luck!

PS: This might also be interesting!
Washed out colors in Windows 3.

Edit: I'm sorry, I was a bit too late. 😅

Thanks, I'll try it.

I just discovered the default vga driver sets a palette choosing from the 64 ega colors, I found some neat colors there, much better than the default ones, now I have to edit the drv values again and hope that also works.

EGA_Pal.png
Filename
EGA_Pal.png
File size
192 Bytes
Views
987 views
File license
CC-BY-4.0

Reply 4 of 6, by Jo22

User metadata
Rank l33t++
Rank
l33t++

Cool, good luck! 😎👍

@bakemono Thanks for the tip! 🙂

"Time, it seems, doesn't flow. For some it's fast, for some it's slow.
In what to one race is no time at all, another race can rise and fall..." - The Minstrel

//My video channel//

Reply 5 of 6, by mills26

User metadata
Rank Newbie
Rank
Newbie

The generic VGA driver has a table containing the EGA color indexes to be used (from the 64 colors available in EGA), replacing this hex string changes the colors:

Original: 000c0a0e011523070f241236092D1B3F
Custom: 00040214193536070F24122609272B3F

You can use these custom 16 color with no problem, but windows won't recognize some of them if it loads .bmp or .ico files created with modern software.
To use images with that palette draw an image with "EGA_Nice_Palette", and set "EGA_Export_Palette" before you save it.

EGA_Nice_Palette
#000000 #aa0000 #00aa00 #aa5500 #ffff00 #ff55aa #0055aa #808080 #c0c0c0 #ff0000 #00ff00 #ffaa00 #0000ff #ffaaaa #55aaff #ffffff

EGA_Export_Palette
#000000 #aa0000 #00aa00 #bfa940 #0c6f8b #820080 #5555aa #808080 #c0c0c0 #ff0000 #00ff00 #ffaa00 #0000ff #ff00ff #55ccff #ffffff
Sample0.png
Filename
Sample0.png
File size
27.88 KiB
Views
919 views
File license
Fair use/fair dealing exception
Sample1.png
Filename
Sample1.png
File size
25.81 KiB
Views
919 views
File license
Fair use/fair dealing exception
Sample3.png
Filename
Sample3.png
File size
25.49 KiB
Views
919 views
File license
Fair use/fair dealing exception

I think it looks awesome for VGA machines stuck in the 16 color mode 😀.

Attachments

  • Filename
    VGA_DRIVER.zip
    File size
    33.29 KiB
    Downloads
    82 downloads
    File license
    Public domain

Reply 6 of 6, by Jo22

User metadata
Rank l33t++
Rank
l33t++
mills26 wrote on 2022-05-05, 21:55:
The generic VGA driver has a table containing the EGA color indexes to be used (from the 64 colors available in EGA), replacing […]
Show full quote

The generic VGA driver has a table containing the EGA color indexes to be used (from the 64 colors available in EGA), replacing this hex string changes the colors:

Original: 000c0a0e011523070f241236092D1B3F
Custom: 00040214193536070F24122609272B3F

You can use these custom 16 color with no problem, but windows won't recognize some of them if it loads .bmp or .ico files created with modern software.
To use images with that palette draw an image with "EGA_Nice_Palette", and set "EGA_Export_Palette" before you save it.

EGA_Nice_Palette
#000000 #aa0000 #00aa00 #aa5500 #ffff00 #ff55aa #0055aa #808080 #c0c0c0 #ff0000 #00ff00 #ffaa00 #0000ff #ffaaaa #55aaff #ffffff

EGA_Export_Palette
#000000 #aa0000 #00aa00 #bfa940 #0c6f8b #820080 #5555aa #808080 #c0c0c0 #ff0000 #00ff00 #ffaa00 #0000ff #ff00ff #55ccff #ffffff

Sample0.png

Sample1.png

Sample3.png

I think it looks awesome for VGA machines stuck in the 16 color mode 😀.

Yay! This looks really, really good! 😀
Congratulations on a job well done! 🙂👍

"Time, it seems, doesn't flow. For some it's fast, for some it's slow.
In what to one race is no time at all, another race can rise and fall..." - The Minstrel

//My video channel//