First post, by zerker
- Rank
- Member
So a little while ago I converted some images to the CGA color palettes for fun. Now, I'm playing around with DOS programming (via Open Watcom C) and wanted to draw these bitmaps in real hardware. That part works fine.
The problem I'm having is that I can't seem to change to the Brown/Green/Yellow color palette. I've downloaded the old IBM CGA Options and Adaptors manual, as well as located a decent CGA information page.
Looking at the CGA manual, it implies that setting 0 to bit 5 at address 0x3D9 should change to the desired palette. But the following has no effect for me:
regs.h.ah = 0x00;
regs.h.al = 0x04;
int86(0x10,®s,®s);
outp(0x3D9, 0x00);
The information page implies that video mode 5 has an alternate palette on an RGB monitor, but I still get Cyan when I do the following:
regs.h.ah = 0x00;
regs.h.al = 0x05;
int86(0x10,®s,®s);
I've heard information that it's a bit different when using EGA or VGA cards, but I can't find anything more concrete than that. I would have expected that if I was do it the 'proper' way, it would still be compatible. Pharoah's Tomb and Monuments of Mars don't revert to the cyan palette on a VGA card after all.
EDIT: I also found information on the "Set Color Palette" Video BIOS service, but I can't get it to work either. Here's what I tried there:
regs.h.ah = 0x00;
regs.h.al = 0x04;
int86(0x10,®s,®s);
regs.h.ah = 0x0B;
regs.h.al = 0x00;
int86(0x10,®s,®s);