[我注意到在DOSBox中使用VGA / VESA编程时有些混乱。
运行VESA BIOS函数01h,然后将偏移量为14的值所指向的列表的条目打印到缓冲区中,直到达到-1为止,打印以下条目:
Modes: 100, 101, 102, 103, 104, 105, 106, 107, 10d, 10e, 10f, 110, 111, 112, 113, 114, 115, 116, 117, 150,
151, 152, 153, 160, 161, 162, 165, 170, 171, 172, 175, 190, 191, 192, 207, 209, 20a, 213, 222, 223, 224, 225
在DOS的TurboC ++中,执行此操作的代码是:
union REGS regs;
struct SREGS sregs;
byte buffer[1024];
word far *modes, far *mptr;
regs.x.ax = 0x4f00;
sregs.es = FP_SEG(buffer);
regs.x.di = FP_OFF(buffer);
int86x(0x10, ®s, ®s, &sregs);
modes = *(word far**)(buffer + 14);
printf("Modes: ");
for(mptr = modes; *mptr != -1; mptr++){
printf("%02x, ", *mptr);
}
printf("\n");
基本上,我不了解的是这些模式中有很多。其中一些,例如直到117,我都可以找到有关这些模式的文档,但是对于许多此类文档(例如150年代和200年代以后的所有作品),我找不到这些模式实际上是什么的迹象。谁能帮我解决这个问题?
Values for S3 OEM video mode:[18]
201h 640x480x256
202h 800x600x16
203h 800x600x256
204h 1024x768x16
205h 1024x768x256
206h 1280x960x16
207h 1152x864x256 (Diamond Stealth 64)
208h 1280x1024x16
209h 1152x864x32K
20Ah 1152x864x64K (Diamond Stealth 64)
20Bh 1152x864x4G
211h 640x480x64K (Diamond Stealth 24)
211h 640x400x4G (Diamond Stealth64 Video / Stealth64 Graphics)
212h 640x480x16M (Diamond Stealth 24)
301h 640x480x32K
看起来好像它们与S3 gfx卡有关... IIRC他们需要在DOS下使用特殊的gfx驱动程序来工作,这与标准VGA / VESA卡不同,后者无需在本地运行任何驱动程序(除非您需要像UNIVBE这样的VBE扩展)。