pixeladdress = (char *)0xA0000;
pixeladdress = pixeladdress + ((640 * posy) + posx) / 8;
bitoffs = ((640 * posy) + posx) % 8;
bitoffs &= 0x7;
*pixeladdress = (1 << bitoffs);
I have a feeling Ive done something stupid

Code: Select all
*pointer = (*pointer) & (~(1<<shift)) | (newval << shift)
1. Yes I used the BIOS while I was in real modeCandy wrote: 1. Mode 12h is actually enabled
2. You have mapped 0xA0000 to the physical 0xA0000
3. Your video card is VGA compatible
4. The two colors you're using are actually distinguishable (you're not trying to see the difference between two blacks, should normally not be a problem)
5. You're writing to a valid bit plane
The question wasn't as cynical as it seemed. Since about 99% of all video cards will not be used as VGA card anymore, there (I have heard) are cards that aren't VGA compatible anymore, since it isn't used and just about all customers don't care.REV wrote: 3. What year is this? (in short yes)
You can solve nr 4 by writing all colors to be very different. However, if you haven't written any colors, they should be distinguishable in any case (iirc, they are the full color spectrum you map with RGB + brightness, each either off or on).I assume 4 and 5 are my proublem.
What can I do to fix this?
hope their video driver never crashes or anything because windows actually relies on vga as a backup video driverthere (I have heard) are cards that aren't VGA compatible anymore
Still an "I've heard", not an "I've seen"... Am going to be looking out for those cards actively now. AFAIK, the PC text output was more like the Hercules cards, using int10 in textmode only. Windows uses this text output doesn't it?Jordan3 wrote:hope their video driver never crashes or anything because windows actually relies on vga as a backup video driverthere (I have heard) are cards that aren't VGA compatible anymore
actually, this is only true for win9x -- winXP safe mode (and with no drivers installed) uses 800x600x16bit (iirc) (prob vbe3 if its availible, though i dont know that for certain -- winXP is capable of using higher modes without drivers also -- that is why i asume it falls back on vbe) -- though it is possible to enable VGA mode, its a separate option -- not defaulthope their video driver never crashes or anything because windows actually relies on vga as a backup video driver