1
0
Fork 0

add video state functionality

Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@2996
This commit is contained in:
Sebastian Strohhäcker 2007-09-25 17:46:18 +00:00
parent d64648208a
commit 9c45a245e8
5 changed files with 439 additions and 5 deletions

View file

@ -424,9 +424,29 @@ graphics_chars:
}
break;
case 0x1C: /* Video Save Area */
if (IS_VGA_ARCH) break;
if (reg_al==0) reg_bx = 0;
reg_al = 0x1C;
if (!IS_VGA_ARCH) break;
switch (reg_al) {
case 0: {
Bitu ret=INT10_VideoState_GetSize(reg_cx);
if (ret) {
reg_al=0x1c;
reg_bx=ret;
} else reg_al=0;
}
break;
case 1:
if (INT10_VideoState_Save(reg_cx,RealMake(SegValue(es),reg_bx))) reg_al=0x1c;
else reg_al=0;
break;
case 2:
if (INT10_VideoState_Restore(reg_cx,RealMake(SegValue(es),reg_bx))) reg_al=0x1c;
else reg_al=0;
break;
default:
if (svgaCard==SVGA_TsengET4K) reg_ax=0;
else reg_al=0;
break;
}
break;
case 0x4f: /* VESA Calls */
if ((!IS_VGA_ARCH) || (svgaCard==SVGA_None)) break;
@ -447,6 +467,30 @@ graphics_chars:
reg_al=0x4f;
reg_ah=VESA_GetSVGAMode(reg_bx);
break;
case 0x04: /* Save/restore state */
reg_al=0x4f;
switch (reg_dl) {
case 0: {
Bitu ret=INT10_VideoState_GetSize(reg_cx);
if (ret) {
reg_ah=0;
reg_bx=ret;
} else reg_ah=1;
}
break;
case 1:
if (INT10_VideoState_Save(reg_cx,RealMake(SegValue(es),reg_bx))) reg_ah=0;
else reg_ah=1;
break;
case 2:
if (INT10_VideoState_Restore(reg_cx,RealMake(SegValue(es),reg_bx))) reg_ah=0;
else reg_ah=1;
break;
default:
reg_ah=1;
break;
}
break;
case 0x05:
if (reg_bh==0) { /* Set CPU Window */
reg_ah=VESA_SetCPUWindow(reg_bl,reg_dl);