mirror of
https://github.com/reactos/reactos.git
synced 2024-09-08 11:50:08 +00:00
Get MS 16 color driver to work under Bochs
svn path=/trunk/; revision=4232
This commit is contained in:
parent
31ed89a07f
commit
1b48f7d941
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: videoprt.c,v 1.3 2003/02/25 23:08:52 gvg Exp $
|
/* $Id: videoprt.c,v 1.4 2003/03/03 00:17:24 gvg Exp $
|
||||||
*
|
*
|
||||||
* VideoPort driver
|
* VideoPort driver
|
||||||
* Written by Rex Jolliff
|
* Written by Rex Jolliff
|
||||||
|
@ -337,35 +337,6 @@ VideoPortGetRegistryParameters(IN PVOID HwDeviceExtension,
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
typedef struct _VIDEO_PORT_CONFIG_INFO_TODO {
|
|
||||||
ULONG Length;
|
|
||||||
ULONG SystemIoBusNumber;
|
|
||||||
INTERFACE_TYPE AdapterInterfaceType;
|
|
||||||
ULONG BusInterruptLevel;
|
|
||||||
ULONG BusInterruptVector;
|
|
||||||
KINTERRUPT_MODE InterruptMode;
|
|
||||||
ULONG NumEmulatorAccessEntries;
|
|
||||||
PEMULATOR_ACCESS_ENTRY EmulatorAccessEntries;
|
|
||||||
ULONG_PTR EmulatorAccessEntriesContext;
|
|
||||||
PHYSICAL_ADDRESS VdmPhysicalVideoMemoryAddress;
|
|
||||||
ULONG VdmPhysicalVideoMemoryLength;
|
|
||||||
ULONG HardwareStateSize;
|
|
||||||
ULONG DmaChannel;
|
|
||||||
ULONG DmaPort;
|
|
||||||
UCHAR DmaShareable;
|
|
||||||
UCHAR InterruptShareable;
|
|
||||||
BOOLEAN Master;
|
|
||||||
DMA_WIDTH DmaWidth;
|
|
||||||
DMA_SPEED DmaSpeed;
|
|
||||||
BOOLEAN bMapBuffers;
|
|
||||||
BOOLEAN NeedPhysicalAddresses;
|
|
||||||
BOOLEAN DemandMode;
|
|
||||||
ULONG MaximumTransferLength;
|
|
||||||
ULONG NumberOfPhysicalBreaks;
|
|
||||||
BOOLEAN ScatterGather;
|
|
||||||
ULONG MaximumScatterGatherChunkSize;
|
|
||||||
} VIDEO_PORT_CONFIG_INFO_TODO, *PVIDEO_PORT_CONFIG_INFO_TODO;
|
|
||||||
|
|
||||||
ULONG STDCALL
|
ULONG STDCALL
|
||||||
VideoPortInitialize(IN PVOID Context1,
|
VideoPortInitialize(IN PVOID Context1,
|
||||||
IN PVOID Context2,
|
IN PVOID Context2,
|
||||||
|
@ -380,7 +351,7 @@ VideoPortInitialize(IN PVOID Context1,
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
PDRIVER_OBJECT MPDriverObject = (PDRIVER_OBJECT) Context1;
|
PDRIVER_OBJECT MPDriverObject = (PDRIVER_OBJECT) Context1;
|
||||||
PDEVICE_OBJECT MPDeviceObject;
|
PDEVICE_OBJECT MPDeviceObject;
|
||||||
VIDEO_PORT_CONFIG_INFO_TODO ConfigInfo;
|
VIDEO_PORT_CONFIG_INFO ConfigInfo;
|
||||||
PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension;
|
PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension;
|
||||||
ULONG DeviceNumber = 0;
|
ULONG DeviceNumber = 0;
|
||||||
UNICODE_STRING DeviceName;
|
UNICODE_STRING DeviceName;
|
||||||
|
@ -455,8 +426,8 @@ VideoPortInitialize(IN PVOID Context1,
|
||||||
HwInitializationData->HwDeviceExtensionSize);
|
HwInitializationData->HwDeviceExtensionSize);
|
||||||
DPRINT("Searching on bus %d\n", DeviceExtension->SystemIoBusNumber);
|
DPRINT("Searching on bus %d\n", DeviceExtension->SystemIoBusNumber);
|
||||||
/* Setup configuration info */
|
/* Setup configuration info */
|
||||||
RtlZeroMemory(&ConfigInfo, sizeof(VIDEO_PORT_CONFIG_INFO_TODO));
|
RtlZeroMemory(&ConfigInfo, sizeof(VIDEO_PORT_CONFIG_INFO));
|
||||||
ConfigInfo.Length = sizeof(VIDEO_PORT_CONFIG_INFO_TODO);
|
ConfigInfo.Length = sizeof(VIDEO_PORT_CONFIG_INFO);
|
||||||
ConfigInfo.AdapterInterfaceType = DeviceExtension->AdapterInterfaceType;
|
ConfigInfo.AdapterInterfaceType = DeviceExtension->AdapterInterfaceType;
|
||||||
ConfigInfo.SystemIoBusNumber = DeviceExtension->SystemIoBusNumber;
|
ConfigInfo.SystemIoBusNumber = DeviceExtension->SystemIoBusNumber;
|
||||||
ConfigInfo.InterruptMode = (PCIBus == DeviceExtension->AdapterInterfaceType) ?
|
ConfigInfo.InterruptMode = (PCIBus == DeviceExtension->AdapterInterfaceType) ?
|
||||||
|
@ -905,9 +876,7 @@ STDCALL
|
||||||
VideoPortWritePortUlong(IN PULONG Port,
|
VideoPortWritePortUlong(IN PULONG Port,
|
||||||
IN ULONG Value)
|
IN ULONG Value)
|
||||||
{
|
{
|
||||||
#ifdef TODO
|
|
||||||
DPRINT("VideoPortWritePortUlong\n");
|
DPRINT("VideoPortWritePortUlong\n");
|
||||||
#endif
|
|
||||||
WRITE_PORT_ULONG(Port, Value);
|
WRITE_PORT_ULONG(Port, Value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1148,7 +1117,6 @@ InternalMapMemory(IN PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension,
|
||||||
ULONG AddressSpace;
|
ULONG AddressSpace;
|
||||||
PVOID MappedAddress;
|
PVOID MappedAddress;
|
||||||
PLIST_ENTRY Entry;
|
PLIST_ENTRY Entry;
|
||||||
INTERFACE_TYPE BusType = PCIBus;
|
|
||||||
|
|
||||||
if (0 != (InIoSpace & VIDEO_MEMORY_SPACE_P6CACHE))
|
if (0 != (InIoSpace & VIDEO_MEMORY_SPACE_P6CACHE))
|
||||||
{
|
{
|
||||||
|
@ -1174,7 +1142,7 @@ InternalMapMemory(IN PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension,
|
||||||
}
|
}
|
||||||
|
|
||||||
AddressSpace = (ULONG)InIoSpace;
|
AddressSpace = (ULONG)InIoSpace;
|
||||||
if (HalTranslateBusAddress(BusType,
|
if (HalTranslateBusAddress(DeviceExtension->AdapterInterfaceType,
|
||||||
DeviceExtension->SystemIoBusNumber,
|
DeviceExtension->SystemIoBusNumber,
|
||||||
IoAddress,
|
IoAddress,
|
||||||
&AddressSpace,
|
&AddressSpace,
|
||||||
|
@ -1233,7 +1201,7 @@ InternalUnmapMemory(IN PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension,
|
||||||
MmUnmapIoSpace(AddressMapping->MappedAddress,
|
MmUnmapIoSpace(AddressMapping->MappedAddress,
|
||||||
AddressMapping->NumberOfUchars);
|
AddressMapping->NumberOfUchars);
|
||||||
#else
|
#else
|
||||||
DPRINT1("MmUnmapIoSpace(0x%08x, 0x%08x)\n", AddressMapping->MappedAddress, AddressMapping->NumberOfUchars);
|
DPRINT("MmUnmapIoSpace(0x%08x, 0x%08x)\n", AddressMapping->MappedAddress, AddressMapping->NumberOfUchars);
|
||||||
#endif
|
#endif
|
||||||
RemoveEntryList(Entry);
|
RemoveEntryList(Entry);
|
||||||
ExFreePool(AddressMapping);
|
ExFreePool(AddressMapping);
|
||||||
|
|
|
@ -209,6 +209,16 @@ typedef struct _VIDEO_PORT_CONFIG_INFO
|
||||||
ULONG DmaPort;
|
ULONG DmaPort;
|
||||||
UCHAR DmaShareable;
|
UCHAR DmaShareable;
|
||||||
UCHAR InterruptShareable;
|
UCHAR InterruptShareable;
|
||||||
|
BOOLEAN Master;
|
||||||
|
DMA_WIDTH DmaWidth;
|
||||||
|
DMA_SPEED DmaSpeed;
|
||||||
|
BOOLEAN bMapBuffers;
|
||||||
|
BOOLEAN NeedPhysicalAddresses;
|
||||||
|
BOOLEAN DemandMode;
|
||||||
|
ULONG MaximumTransferLength;
|
||||||
|
ULONG NumberOfPhysicalBreaks;
|
||||||
|
BOOLEAN ScatterGather;
|
||||||
|
ULONG MaximumScatterGatherChunkSize;
|
||||||
} VIDEO_PORT_CONFIG_INFO, *PVIDEO_PORT_CONFIG_INFO;
|
} VIDEO_PORT_CONFIG_INFO, *PVIDEO_PORT_CONFIG_INFO;
|
||||||
|
|
||||||
typedef VP_STATUS STDCALL
|
typedef VP_STATUS STDCALL
|
||||||
|
|
Loading…
Reference in a new issue