mirror of
https://github.com/reactos/reactos.git
synced 2025-05-10 12:23:25 +00:00
[PC98VID] Fix MSVC 2015 build for PC-98 target
Addendum to 3adf450867
Also isolate the constant structures into page section
and restore the previous sections for start IO and entrypoint routines.
This commit is contained in:
parent
0bd8a2110b
commit
f7d825e620
3 changed files with 25 additions and 3 deletions
|
@ -206,6 +206,7 @@ Pc98VidGetChildState(
|
||||||
return NO_ERROR;
|
return NO_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CODE_SEG("PAGE")
|
||||||
BOOLEAN
|
BOOLEAN
|
||||||
NTAPI
|
NTAPI
|
||||||
Pc98VidStartIO(
|
Pc98VidStartIO(
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
|
|
||||||
/* GLOBALS ********************************************************************/
|
/* GLOBALS ********************************************************************/
|
||||||
|
|
||||||
|
DATA_SEG("PAGECONS")
|
||||||
const VIDEOMODE VideoModes[] =
|
const VIDEOMODE VideoModes[] =
|
||||||
{
|
{
|
||||||
{640, 480, GRAPH_HF_31KHZ, GDC2_CLOCK1_5MHZ, GDC2_CLOCK2_5MHZ,
|
{640, 480, GRAPH_HF_31KHZ, GDC2_CLOCK1_5MHZ, GDC2_CLOCK2_5MHZ,
|
||||||
|
@ -18,7 +19,8 @@ const VIDEOMODE VideoModes[] =
|
||||||
{0, 80, 12, 2, 4, 4, 6, 480, 37}, {0, 80, 12, 2, 4, 132, 6, 480, 37}}
|
{0, 80, 12, 2, 4, 4, 6, 480, 37}, {0, 80, 12, 2, 4, 132, 6, 480, 37}}
|
||||||
};
|
};
|
||||||
|
|
||||||
static VIDEO_ACCESS_RANGE LegacyRangeList[] =
|
DATA_SEG("PAGECONS")
|
||||||
|
const VIDEO_ACCESS_RANGE LegacyRangeList[] =
|
||||||
{
|
{
|
||||||
{ {{0x60, 0}}, 0x00000001, 1, 1, 1, 0 },
|
{ {{0x60, 0}}, 0x00000001, 1, 1, 1, 0 },
|
||||||
{ {{0x62, 0}}, 0x00000001, 1, 1, 1, 0 },
|
{ {{0x62, 0}}, 0x00000001, 1, 1, 1, 0 },
|
||||||
|
@ -72,7 +74,7 @@ Pc98VidFindAdapter(
|
||||||
|
|
||||||
Status = VideoPortVerifyAccessRanges(DeviceExtension,
|
Status = VideoPortVerifyAccessRanges(DeviceExtension,
|
||||||
RTL_NUMBER_OF(LegacyRangeList),
|
RTL_NUMBER_OF(LegacyRangeList),
|
||||||
LegacyRangeList);
|
(PVIDEO_ACCESS_RANGE)LegacyRangeList);
|
||||||
if (Status != NO_ERROR)
|
if (Status != NO_ERROR)
|
||||||
{
|
{
|
||||||
VideoDebugPrint((Error, "%s() Resource conflict was found\n", __FUNCTION__));
|
VideoDebugPrint((Error, "%s() Resource conflict was found\n", __FUNCTION__));
|
||||||
|
@ -193,6 +195,15 @@ Pc98VidGetVideoChildDescriptor(
|
||||||
return ERROR_NO_MORE_DEVICES;
|
return ERROR_NO_MORE_DEVICES;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(_MSC_VER)
|
||||||
|
/*
|
||||||
|
* Avoid C2983 error for MSVC 2015. There is no such thing
|
||||||
|
* as DRIVER_INITIALIZE for video miniport drivers.
|
||||||
|
*/
|
||||||
|
#pragma alloc_text(INIT, DriverEntry)
|
||||||
|
#else
|
||||||
|
CODE_SEG("INIT")
|
||||||
|
#endif
|
||||||
ULONG
|
ULONG
|
||||||
NTAPI
|
NTAPI
|
||||||
DriverEntry(
|
DriverEntry(
|
||||||
|
@ -227,7 +238,7 @@ DriverEntry(
|
||||||
InitData.HwGetVideoChildDescriptor = Pc98VidGetVideoChildDescriptor;
|
InitData.HwGetVideoChildDescriptor = Pc98VidGetVideoChildDescriptor;
|
||||||
}
|
}
|
||||||
|
|
||||||
InitData.HwLegacyResourceList = LegacyRangeList;
|
InitData.HwLegacyResourceList = (PVIDEO_ACCESS_RANGE)LegacyRangeList;
|
||||||
InitData.HwLegacyResourceCount = RTL_NUMBER_OF(LegacyRangeList);
|
InitData.HwLegacyResourceCount = RTL_NUMBER_OF(LegacyRangeList);
|
||||||
|
|
||||||
InitData.AdapterInterfaceType = Isa;
|
InitData.AdapterInterfaceType = Isa;
|
||||||
|
|
|
@ -22,6 +22,10 @@
|
||||||
#define READ_PORT_UCHAR(p) VideoPortReadPortUchar(p)
|
#define READ_PORT_UCHAR(p) VideoPortReadPortUchar(p)
|
||||||
#include <drivers/pc98/video.h>
|
#include <drivers/pc98/video.h>
|
||||||
|
|
||||||
|
#if defined(_MSC_VER)
|
||||||
|
#pragma section("PAGECONS", read)
|
||||||
|
#endif
|
||||||
|
|
||||||
#define MONITOR_HW_ID 0x1033FACE /* Dummy */
|
#define MONITOR_HW_ID 0x1033FACE /* Dummy */
|
||||||
|
|
||||||
typedef struct _VIDEOMODE
|
typedef struct _VIDEOMODE
|
||||||
|
@ -54,23 +58,27 @@ NTAPI
|
||||||
HasPegcController(
|
HasPegcController(
|
||||||
_In_ PHW_DEVICE_EXTENSION DeviceExtension);
|
_In_ PHW_DEVICE_EXTENSION DeviceExtension);
|
||||||
|
|
||||||
|
CODE_SEG("PAGE")
|
||||||
BOOLEAN
|
BOOLEAN
|
||||||
NTAPI
|
NTAPI
|
||||||
Pc98VidStartIO(
|
Pc98VidStartIO(
|
||||||
_In_ PVOID HwDeviceExtension,
|
_In_ PVOID HwDeviceExtension,
|
||||||
_Inout_ PVIDEO_REQUEST_PACKET RequestPacket);
|
_Inout_ PVIDEO_REQUEST_PACKET RequestPacket);
|
||||||
|
|
||||||
|
CODE_SEG("PAGE")
|
||||||
VP_STATUS
|
VP_STATUS
|
||||||
FASTCALL
|
FASTCALL
|
||||||
Pc98VidSetCurrentMode(
|
Pc98VidSetCurrentMode(
|
||||||
_In_ PHW_DEVICE_EXTENSION DeviceExtension,
|
_In_ PHW_DEVICE_EXTENSION DeviceExtension,
|
||||||
_In_ PVIDEO_MODE RequestedMode);
|
_In_ PVIDEO_MODE RequestedMode);
|
||||||
|
|
||||||
|
CODE_SEG("PAGE")
|
||||||
VP_STATUS
|
VP_STATUS
|
||||||
FASTCALL
|
FASTCALL
|
||||||
Pc98VidSetColorRegisters(
|
Pc98VidSetColorRegisters(
|
||||||
_In_ PVIDEO_CLUT ColorLookUpTable);
|
_In_ PVIDEO_CLUT ColorLookUpTable);
|
||||||
|
|
||||||
|
CODE_SEG("PAGE")
|
||||||
VP_STATUS
|
VP_STATUS
|
||||||
NTAPI
|
NTAPI
|
||||||
Pc98VidGetPowerState(
|
Pc98VidGetPowerState(
|
||||||
|
@ -78,6 +86,7 @@ Pc98VidGetPowerState(
|
||||||
_In_ ULONG HwId,
|
_In_ ULONG HwId,
|
||||||
_In_ PVIDEO_POWER_MANAGEMENT VideoPowerControl);
|
_In_ PVIDEO_POWER_MANAGEMENT VideoPowerControl);
|
||||||
|
|
||||||
|
CODE_SEG("PAGE")
|
||||||
VP_STATUS
|
VP_STATUS
|
||||||
NTAPI
|
NTAPI
|
||||||
Pc98VidSetPowerState(
|
Pc98VidSetPowerState(
|
||||||
|
@ -85,6 +94,7 @@ Pc98VidSetPowerState(
|
||||||
_In_ ULONG HwId,
|
_In_ ULONG HwId,
|
||||||
_In_ PVIDEO_POWER_MANAGEMENT VideoPowerControl);
|
_In_ PVIDEO_POWER_MANAGEMENT VideoPowerControl);
|
||||||
|
|
||||||
|
DATA_SEG("PAGECONS")
|
||||||
extern const VIDEOMODE VideoModes[];
|
extern const VIDEOMODE VideoModes[];
|
||||||
|
|
||||||
#endif /* _PC98VID_PCH_ */
|
#endif /* _PC98VID_PCH_ */
|
||||||
|
|
Loading…
Reference in a new issue