📄 init.h
字号:
#ifndef _INIT_#define _INIT_#include "osdef.h"#include "initdef.h"#include "vgatypes.h"#include "vstruct.h"#ifdef TC#include <stdio.h>#include <string.h>#include <conio.h>#include <dos.h>#include <stdlib.h>#endif#ifdef LINUX_XF86#include "xf86.h"#include "xf86Pci.h"#include "xf86PciInfo.h"#include "xf86_OSproc.h"#include "sis.h"#include "sis_regs.h"#endif#ifdef LINUX_KERNEL#include <linux/types.h>#include <asm/io.h>#include <linux/sisfb.h>#endif#ifdef WIN2000#include <stdio.h>#include <string.h>#include <miniport.h>#include "dderror.h"#include "devioctl.h"#include "miniport.h"#include "ntddvdeo.h"#include "video.h"#include "sisv.h"#include "tools.h"#endifconst USHORT SiS_DRAMType[17][5]={ {0x0C,0x0A,0x02,0x40,0x39}, {0x0D,0x0A,0x01,0x40,0x48}, {0x0C,0x09,0x02,0x20,0x35}, {0x0D,0x09,0x01,0x20,0x44}, {0x0C,0x08,0x02,0x10,0x31}, {0x0D,0x08,0x01,0x10,0x40}, {0x0C,0x0A,0x01,0x20,0x34}, {0x0C,0x09,0x01,0x08,0x32}, {0x0B,0x08,0x02,0x08,0x21}, {0x0C,0x08,0x01,0x08,0x30}, {0x0A,0x08,0x02,0x04,0x11}, {0x0B,0x0A,0x01,0x10,0x28}, {0x09,0x08,0x02,0x02,0x01}, {0x0B,0x09,0x01,0x08,0x24}, {0x0B,0x08,0x01,0x04,0x20}, {0x0A,0x08,0x01,0x02,0x10}, {0x09,0x08,0x01,0x01,0x00}};const USHORT SiS_SDRDRAM_TYPE[13][5] ={ { 2,12, 9,64,0x35}, { 1,13, 9,64,0x44}, { 2,12, 8,32,0x31}, { 2,11, 9,32,0x25}, { 1,12, 9,32,0x34}, { 1,13, 8,32,0x40}, { 2,11, 8,16,0x21}, { 1,12, 8,16,0x30}, { 1,11, 9,16,0x24}, { 1,11, 8, 8,0x20}, { 2, 9, 8, 4,0x01}, { 1,10, 8, 4,0x10}, { 1, 9, 8, 2,0x00}};const USHORT SiS_DDRDRAM_TYPE[4][5] ={ { 2,12, 9,64,0x35}, { 2,12, 8,32,0x31}, { 2,11, 8,16,0x21}, { 2, 9, 8, 4,0x01}};const USHORT SiS_MDA_DAC[] ={ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15, 0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15, 0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15, 0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15, 0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F};const USHORT SiS_CGA_DAC[] ={ 0x00,0x10,0x04,0x14,0x01,0x11,0x09,0x15, 0x00,0x10,0x04,0x14,0x01,0x11,0x09,0x15, 0x2A,0x3A,0x2E,0x3E,0x2B,0x3B,0x2F,0x3F, 0x2A,0x3A,0x2E,0x3E,0x2B,0x3B,0x2F,0x3F, 0x00,0x10,0x04,0x14,0x01,0x11,0x09,0x15, 0x00,0x10,0x04,0x14,0x01,0x11,0x09,0x15, 0x2A,0x3A,0x2E,0x3E,0x2B,0x3B,0x2F,0x3F, 0x2A,0x3A,0x2E,0x3E,0x2B,0x3B,0x2F,0x3F};const USHORT SiS_EGA_DAC[] ={ 0x00,0x10,0x04,0x14,0x01,0x11,0x05,0x15, 0x20,0x30,0x24,0x34,0x21,0x31,0x25,0x35, 0x08,0x18,0x0C,0x1C,0x09,0x19,0x0D,0x1D, 0x28,0x38,0x2C,0x3C,0x29,0x39,0x2D,0x3D, 0x02,0x12,0x06,0x16,0x03,0x13,0x07,0x17, 0x22,0x32,0x26,0x36,0x23,0x33,0x27,0x37, 0x0A,0x1A,0x0E,0x1E,0x0B,0x1B,0x0F,0x1F, 0x2A,0x3A,0x2E,0x3E,0x2B,0x3B,0x2F,0x3F};const USHORT SiS_VGA_DAC[] ={ 0x00,0x10,0x04,0x14,0x01,0x11,0x09,0x15, 0x2A,0x3A,0x2E,0x3E,0x2B,0x3B,0x2F,0x3F, 0x00,0x05,0x08,0x0B,0x0E,0x11,0x14,0x18, 0x1C,0x20,0x24,0x28,0x2D,0x32,0x38,0x3F, 0x00,0x10,0x1F,0x2F,0x3F,0x1F,0x27,0x2F, 0x37,0x3F,0x2D,0x31,0x36,0x3A,0x3F,0x00, 0x07,0x0E,0x15,0x1C,0x0E,0x11,0x15,0x18, 0x1C,0x14,0x16,0x18,0x1A,0x1C,0x00,0x04, 0x08,0x0C,0x10,0x08,0x0A,0x0C,0x0E,0x10, 0x0B,0x0C,0x0D,0x0F,0x10};void SiS_SetReg1(USHORT, USHORT, USHORT);void SiS_SetReg2(SiS_Private *, USHORT, USHORT, USHORT);void SiS_SetReg3(USHORT, USHORT);void SiS_SetReg4(USHORT, ULONG);UCHAR SiS_GetReg1(USHORT, USHORT);UCHAR SiS_GetReg2(USHORT);ULONG SiS_GetReg3(USHORT);void SiS_ClearDAC(SiS_Private *SiS_Pr, ULONG);void SiS_SetMemoryClock(SiS_Private *SiS_Pr, UCHAR *ROMAddr,PSIS_HW_DEVICE_INFO HwDeviceExtension);void SiS_SetDRAMModeRegister(SiS_Private *SiS_Pr, UCHAR *ROMAddr,PSIS_HW_DEVICE_INFO HwDeviceExtension);BOOLEAN SiS_SearchVBModeID(SiS_Private *SiS_Pr, UCHAR *ROMAddr, USHORT *ModeNo);void SiS_IsLowResolution(SiS_Private *SiS_Pr, UCHAR *ROMAddr,USHORT ModeNo,USHORT ModeIdIndex);ULONG GetDRAMSize(SiS_Private *SiS_Pr, PSIS_HW_DEVICE_INFO HwDeviceExtension);#ifdef SIS300void InitTo300Pointer(SiS_Private *SiS_Pr, PSIS_HW_DEVICE_INFO HwDeviceExtension);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -