Mike Chambers
Veteran Member
- Joined
- Sep 2, 2006
- Messages
- 2,621
i don't own any CGA cards, but i have noticed some minor snow on my monochrome ibm card sometimes, during screen updates. it's independent of what program i'm running. is this normal?
i don't own any CGA cards, but i have noticed some minor snow on my monochrome ibm card sometimes, during screen updates. it's independent of what program i'm running. is this normal?
Monochrome cards and monitors don't have a snow problem, unless your "monochrome" system is emulating CGA. My Panasonic Sr. Partner does this (monochrome monitor but it does CGA with shades of green) as well as my PC 6300 with a mono monitor.
If your system truly is mono (ie. video base is $b000 instead of $b800) then your monitor is starting to develop a problem
if i'm not mistaken, hercules cards work on b8000 right?
SUB VidDetect
SCREEN 0: COLOR 0, 0: CLS : LOCATE 1, 1: PRINT "VIDEO TEST";
DEF SEG = &HB800
chk1$ = ""
FOR nchk = 0 TO 9
chk1$ = chk1$ + CHR$(PEEK(nchk * 2))
NEXT nchk
DEF SEG = &HB000
chk2$ = ""
FOR nchk = 0 TO 9
chk2$ = chk2$ + CHR$(PEEK(nchk * 2))
NEXT nchk
IF chk1$ = "VIDEO TEST" THEN vidtype = 1
IF chk2$ = "VIDEO TEST" THEN vidtype = 2
COLOR 7,0: CLS
END SUB
I'm sure there is a better way to do this, but this is the code i came up with.
If Mem[$0000:$0449]=7 Then
VideoSegment:=$b000
Else
VideoSegment:=$b800
// What video mode are we in?
union REGS inregs, outregs;
inregs.h.ah = 0x0f;
uint16_t ax = int86( 0x10, &inregs, &outregs );
uint8_t mode = ax & 0xFF;
if ( mode == MONO ) {
// Monochrome is current
colorCard = 0;
Screen_base = (uint8_t far *)MK_FP( 0xb000, 0 );
}
else {
colorCard = 1;
Screen_base = (uint8_t far *)MK_FP( 0xb800, 0 );
if ( mode == BW40 ) {
// If in BW40 then go to BW80
textmode( BW80 );
}
else {
// You are in CO40 or an unknown mode (but we know you are not MONO)
textmode( C80 );
}
}