VOGONS


First post, by unclejed613

User metadata
Rank Newbie
Rank
Newbie

way back when i wrote a video test pattern generator program. after installing DOSBOX, i began tinkering with MS Basic Compiler again, and decided to re-release it as freeware. there was some interest in it on an electronics forum i frequent, so i edited the program and re-released it as freeware.

since i don't have the original hardware (486 machine with a multifunction video card), i tested it in DOSBOX using the various "machine=" settings.

there is one question i have about dosbox's hardware emulation. my test pattern software does a peek at a couple of memory locations and an interrupt call to DOS interrupt &H10 to determine what type of card is installed. this is a read of the video hardware bits in CMOS. with mono, EGA, and VGA, the software read the proper configuration and came up in the correct menu, but in CGA mode (machine=cga), the software comes up in the EGA menu.

Reply 1 of 2, by unclejed613

User metadata
Rank Newbie
Rank
Newbie

here's the card ID routine:

0354   0016    CardTst:
035E 0016 ON ERROR GOTO Whoa
036D 0016 DEF SEG = 0
037A 0016 vid1 = PEEK(1123) + 256 * PEEK(1124)
03B0 0018 vid2 = PEEK(1159)
03C6 001A DIM reg AS RegType
03CB 002A reg.ax = &H1A00
03D6 002A CALL INTERRUPT(&H10, reg, reg)
03EF 002C vid3 = reg.bx AND &HFF
03FD 002E IF vid1 = 948 THEN GOTO MonoMenu
0415 002E IF vid1 = 980 AND vid2 = 0 THEN GOTO CgaMenu
0442 002E IF vid1 = 980 AND vid2 = 96 AND vid3 = 0 THEN GOTO EgaMenu
047C 002E IF vid1 = 980 AND vid2 = 96 AND vid3 = 8 THEN GOTO VgaMenu

Reply 2 of 2, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

40:87 may indeed be zero on non-ega/vga systems.