Redirect all reads and writes to VGA controller to VGA emulation.

Catch and report 16/32-bit reads/writes to VGA controller.
Use correct flags when creating full screen DirectDraw window for
VGA.
This commit is contained in:
Jukka Heinonen 2002-06-24 22:57:28 +00:00 committed by Alexandre Julliard
parent d19a64eafa
commit 97a003fc37
2 changed files with 71 additions and 1 deletions

View File

@ -24,7 +24,9 @@
#include "windef.h" #include "windef.h"
#include "dosexe.h" #include "dosexe.h"
#include "vga.h" #include "vga.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(int);
/********************************************************************** /**********************************************************************
* DOSVM_inport * DOSVM_inport
@ -42,7 +44,40 @@ BOOL WINAPI DOSVM_inport( int port, int size, DWORD *res )
*res = (DWORD)SB_ioport_in( port ); *res = (DWORD)SB_ioport_in( port );
break; break;
case 0x3ba: case 0x3ba:
case 0x3c0:
case 0x3c1:
case 0x3c2:
case 0x3c3:
case 0x3c4:
case 0x3c5:
case 0x3c6:
case 0x3c7:
case 0x3c8:
case 0x3c9:
case 0x3ca:
case 0x3cb:
case 0x3cc:
case 0x3cd:
case 0x3ce:
case 0x3cf:
case 0x3d0:
case 0x3d1:
case 0x3d2:
case 0x3d3:
case 0x3d4:
case 0x3d5:
case 0x3d6:
case 0x3d7:
case 0x3d8:
case 0x3d9:
case 0x3da: case 0x3da:
case 0x3db:
case 0x3dc:
case 0x3dd:
case 0x3de:
case 0x3df:
if(size > 1)
FIXME("Trying to read more than one byte from VGA!\n");
*res = (DWORD)VGA_ioport_in( port ); *res = (DWORD)VGA_ioport_in( port );
break; break;
case 0x00: case 0x00:
@ -102,8 +137,40 @@ BOOL WINAPI DOSVM_outport( int port, int size, DWORD value )
case 0x22c: case 0x22c:
SB_ioport_out( port, (BYTE)value ); SB_ioport_out( port, (BYTE)value );
break; break;
case 0x3c0:
case 0x3c1:
case 0x3c2:
case 0x3c3:
case 0x3c4:
case 0x3c5:
case 0x3c6:
case 0x3c7:
case 0x3c8: case 0x3c8:
case 0x3c9: case 0x3c9:
case 0x3ca:
case 0x3cb:
case 0x3cc:
case 0x3cd:
case 0x3ce:
case 0x3cf:
case 0x3d0:
case 0x3d1:
case 0x3d2:
case 0x3d3:
case 0x3d4:
case 0x3d5:
case 0x3d6:
case 0x3d7:
case 0x3d8:
case 0x3d9:
case 0x3da:
case 0x3db:
case 0x3dc:
case 0x3dd:
case 0x3de:
case 0x3df:
if(size > 1)
FIXME("Trying to write more than one byte to VGA!\n");
VGA_ioport_out( port, (BYTE)value ); VGA_ioport_out( port, (BYTE)value );
break; break;
case 0x00: case 0x00:

View File

@ -269,7 +269,7 @@ static void WINAPI VGA_DoSetMode(ULONG_PTR arg)
return; return;
} }
if (!vga_hwnd) { if (!vga_hwnd) {
vga_hwnd = CreateWindowExA(0,"STATIC","WINEDOS VGA",WS_POPUP|WS_BORDER|WS_CAPTION|WS_SYSMENU,0,0,par->Xres,par->Yres,0,0,0,NULL); vga_hwnd = CreateWindowExA(0,"STATIC","WINEDOS VGA",WS_POPUP|WS_VISIBLE,0,0,par->Xres,par->Yres,0,0,0,NULL);
if (!vga_hwnd) { if (!vga_hwnd) {
ERR("Failed to create user window.\n"); ERR("Failed to create user window.\n");
IDirectDraw_Release(lpddraw); IDirectDraw_Release(lpddraw);
@ -768,6 +768,8 @@ void VGA_ioport_out( WORD port, BYTE val )
palcnt=0; palcnt=0;
} }
break; break;
default:
FIXME("Unsupported VGA register: 0x%04x (value 0x%02x)\n", port, val);
} }
} }
@ -789,6 +791,7 @@ BYTE VGA_ioport_in( WORD port )
break; break;
default: default:
ret=0xff; ret=0xff;
FIXME("Unsupported VGA register: 0x%04x\n", port);
} }
return ret; return ret;
} }