Commit 53268a54 authored by Christian Costa's avatar Christian Costa Committed by Alexandre Julliard

Added DMA and SoundBlaster emulation.

parent a60d05b4
......@@ -7,8 +7,9 @@ IMPORTS = user32 kernel32 ntdll
LDIMPORTS = user32.dll kernel32.dll ntdll.dll
C_SRCS = \
dosaspi.c \
devices.c \
dma.c \
dosaspi.c \
dosvm.c \
int09.c \
int10.c \
......@@ -23,6 +24,7 @@ C_SRCS = \
int67.c \
ioports.c \
module.c \
soundblaster.c \
vga.c \
xms.c
......
......@@ -72,6 +72,11 @@ extern int DOSDEV_Write(DWORD dev, DWORD buf, int buflen, int verify);
extern int DOSDEV_IoctlRead(DWORD dev, DWORD buf, int buflen);
extern int DOSDEV_IoctlWrite(DWORD dev, DWORD buf, int buflen);
/* dma.c */
extern int DMA_Transfer(int channel,int reqlength,void* buffer);
extern void DMA_ioport_out( WORD port, BYTE val );
extern BYTE DMA_ioport_in( WORD port );
/* int09.c */
extern void WINAPI DOSVM_Int09Handler(CONTEXT86*);
extern void WINAPI DOSVM_Int09SendScan(BYTE scan,BYTE ascii);
......@@ -113,6 +118,10 @@ extern void WINAPI DOSVM_Int33Console(MOUSE_EVENT_RECORD*);
extern void WINAPI DOSVM_Int67Handler(CONTEXT86*);
extern void WINAPI EMS_Ioctl_Handler(CONTEXT86*);
/* soundblaster.c */
extern void SB_ioport_out( WORD port, BYTE val );
extern BYTE SB_ioport_in( WORD port );
/* xms.c */
extern void WINAPI XMS_Handler(CONTEXT86*);
......
......@@ -36,10 +36,51 @@ BOOL WINAPI DOSVM_inport( int port, int size, DWORD *res )
case 0x60:
*res = DOSVM_Int09ReadScan(NULL);
break;
case 0x22a:
case 0x22c:
case 0x22e:
*res = (DWORD)SB_ioport_in( port );
break;
case 0x3ba:
case 0x3da:
*res = (DWORD)VGA_ioport_in( port );
break;
case 0x00:
case 0x01:
case 0x02:
case 0x03:
case 0x04:
case 0x05:
case 0x06:
case 0x07:
case 0xC0:
case 0xC2:
case 0xC4:
case 0xC6:
case 0xC8:
case 0xCA:
case 0xCC:
case 0xCE:
case 0x87:
case 0x83:
case 0x81:
case 0x82:
case 0x8B:
case 0x89:
case 0x8A:
case 0x487:
case 0x483:
case 0x481:
case 0x482:
case 0x48B:
case 0x489:
case 0x48A:
case 0x08:
case 0xD0:
case 0x0D:
case 0xDA:
*res = (DWORD)DMA_ioport_in( port );
break;
default:
return FALSE; /* not handled */
}
......@@ -57,10 +98,62 @@ BOOL WINAPI DOSVM_outport( int port, int size, DWORD value )
case 0x20:
DOSVM_PIC_ioport_out( port, (BYTE)value );
break;
case 0x226:
case 0x22c:
SB_ioport_out( port, (BYTE)value );
break;
case 0x3c8:
case 0x3c9:
VGA_ioport_out( port, (BYTE)value );
break;
case 0x00:
case 0x01:
case 0x02:
case 0x03:
case 0x04:
case 0x05:
case 0x06:
case 0x07:
case 0xC0:
case 0xC2:
case 0xC4:
case 0xC6:
case 0xC8:
case 0xCA:
case 0xCC:
case 0xCE:
case 0x87:
case 0x83:
case 0x81:
case 0x82:
case 0x8B:
case 0x89:
case 0x8A:
case 0x487:
case 0x483:
case 0x481:
case 0x482:
case 0x48B:
case 0x489:
case 0x48A:
case 0x08:
case 0xD0:
case 0x0B:
case 0xD6:
case 0x0A:
case 0xD4:
case 0x0F:
case 0xDE:
case 0x09:
case 0xD2:
case 0x0C:
case 0xD8:
case 0x0D:
case 0xDA:
case 0x0E:
case 0xDC:
DMA_ioport_out( port, (BYTE)value );
break;
default:
return FALSE; /* not handled */
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment