1
0
Fork 0

Fix set VESA set CPU window function to only use a bye value

Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@1558
This commit is contained in:
Sjoerd van der Berg 2004-01-11 09:27:52 +00:00
parent c6939434ae
commit 05f6c5bf9b
3 changed files with 8 additions and 9 deletions

View file

@ -330,7 +330,7 @@ graphics_chars:
break;
case 0x05:
if (reg_bh==0) { /* Set CPU Window */
reg_ah=VESA_SetCPUWindow(reg_bl,reg_dx);
reg_ah=VESA_SetCPUWindow(reg_bl,reg_dl);
reg_al=0x4f;
} else if (reg_bh == 1) { /* Get CPU Window */
reg_ah=VESA_GetCPUWindow(reg_bl,reg_dx);
@ -340,6 +340,10 @@ graphics_chars:
reg_ah=0x01;
}
break;
case 0x06:
reg_al=0x4f;
reg_ah=VESA_ScanLineLength(reg_al,reg_bx,reg_cx,reg_dx);
break;
case 0x07:
switch (reg_bl) {
case 0x80: /* Set Display Start during retrace ?? */

View file

@ -182,7 +182,7 @@ Bit8u VESA_GetSVGAInformation(Bit16u seg,Bit16u off);
Bit8u VESA_GetSVGAModeInformation(Bit16u mode,Bit16u seg,Bit16u off);
Bit8u VESA_SetSVGAMode(Bit16u mode);
Bit8u VESA_GetSVGAMode(Bit16u & mode);
Bit8u VESA_SetCPUWindow(Bit8u window,Bit16u address);
Bit8u VESA_SetCPUWindow(Bit8u window,Bit8u address);
Bit8u VESA_GetCPUWindow(Bit8u window,Bit16u & address);
Bit8u VESA_ScanLineLength(Bit8u subcall,Bit16u & bytes,Bit16u & pixels,Bit16u & lines);
Bit8u VESA_SetDisplayStart(Bit16u x,Bit16u y);

View file

@ -16,7 +16,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/* $Id: int10_vesa.cpp,v 1.6 2004-01-07 20:26:38 qbix79 Exp $ */
/* $Id: int10_vesa.cpp,v 1.7 2004-01-11 09:27:52 harekiet Exp $ */
#include <string.h>
#include <stddef.h>
@ -170,7 +170,7 @@ Bit8u VESA_GetSVGAMode(Bit16u & mode) {
return 0x00;
}
Bit8u VESA_SetCPUWindow(Bit8u window,Bit16u address) {
Bit8u VESA_SetCPUWindow(Bit8u window,Bit8u address) {
if (window) return 0x1;
if ((address<32)) {
IO_Write(0x3d4,0x6a);
@ -295,12 +295,8 @@ Bit8u VESA_GetDisplayStart(Bit16u & x,Bit16u & y) {
return 0x1;
}
return 0x00;
}
static Bitu SetWindowPositionHandler(void) {
if (reg_bh) reg_ah=VESA_GetCPUWindow(reg_bl,reg_dx);
else reg_ah=VESA_SetCPUWindow(reg_bl,reg_dx);
@ -308,7 +304,6 @@ static Bitu SetWindowPositionHandler(void) {
return 0;
}
void INT10_SetupVESA(void) {
/* Put the mode list somewhere in memory */
Bitu i;