;----------------------------------------------------------------------------
[Version]
Signature="$WINDOWS NT$"
Class	  = MTD
ClassGuid = {4D36E970-E325-11CE-BFC1-08002BE10318}
Provider=%VENDOR%
CatalogFile=AmPeStorU.cat
DriverVer=08/12/2021,1.19.06.2400


;----------------------------------------------------------------------------
;   CopyFile Sections
;----------------------------------------------------------------------------
[SourceDisksFiles]
AmPeStorU.sys = 1
AmPciIco.icl = 1


[SourceDisksNames]
1 = %DISK_NAME%


[DestinationDirs]
CopyFilesSYS = 10, system32\drivers
CopyFilesIcon = 11


;----------------------------------------------------------------------------
;   Manufacturer and Product Information
;----------------------------------------------------------------------------
[Manufacturer]
%VENDOR%     = DeviceList    , NTamd64.10
%VENDOR_GEN% = DeviceList_Gen, NTamd64.10


[DeviceList.NTamd64.10]
; For XP and later
%AMPCIECR% = DriverInstall_6601, PCI\VEN_1AEA&DEV_6601&CC_FF00
%AMPCIECR% = DriverInstall_6601, PCI\VEN_1AEA&DEV_6601&SUBSYS_00010001
%AMPCIECR% = DriverInstall_6601, PCI\VEN_1AEA&DEV_6601&SUBSYS_66011AEA
%AMPCIECR% = DriverInstall_6601, PCI\VEN_1AEA&DEV_6601&SUBSYS_F9001179
%AMPCIECR% = DriverInstall_6601, PCI\VEN_1AEA&DEV_6601&SUBSYS_F9401179


%AMPCIECR% = DriverInstall_6621, PCI\VEN_1AEA&DEV_6621&CC_FF00
%AMPCIECR% = DriverInstall_6621, PCI\VEN_1AEA&DEV_6621&SUBSYS_66211AEA


%AMPCIECR% = DriverInstall_6625, PCI\VEN_1AEA&DEV_6625&CC_FF00
%AMPCIECR% = DriverInstall_6625, PCI\VEN_1AEA&DEV_6625&SUBSYS_66251AEA

%AMPCIECR% = DriverInstall_6625, PCI\VEN_1AEA&DEV_6625&SUBSYS_8349103C
%AMPCIECR% = DriverInstall_6625, PCI\VEN_1AEA&DEV_6625&SUBSYS_834A103C
%AMPCIECR% = DriverInstall_6625, PCI\VEN_1AEA&DEV_6625&SUBSYS_834B103C
%AMPCIECR% = DriverInstall_6625, PCI\VEN_1AEA&DEV_6625&SUBSYS_834C103C
%AMPCIECR% = DriverInstall_6625, PCI\VEN_1AEA&DEV_6625&SUBSYS_838D103C
%AMPCIECR% = DriverInstall_6625, PCI\VEN_1AEA&DEV_6625&SUBSYS_838E103C

%AMPCIECR% = DriverInstall_6625, PCI\VEN_1AEA&DEV_6625&SUBSYS_8477103C
%AMPCIECR% = DriverInstall_6625, PCI\VEN_1AEA&DEV_6625&SUBSYS_8478103C
%AMPCIECR% = DriverInstall_6625, PCI\VEN_1AEA&DEV_6625&SUBSYS_8479103C

%AMPCIECR% = DriverInstall_6625, PCI\VEN_1AEA&DEV_6625&SUBSYS_85FA103C ;HP
%AMPCIECR% = DriverInstall_6625, PCI\VEN_1AEA&DEV_6625&SUBSYS_85FB103C ;HP
%AMPCIECR% = DriverInstall_6625, PCI\VEN_1AEA&DEV_6625&SUBSYS_85FC103C ;HP
%AMPCIECR% = DriverInstall_6625, PCI\VEN_1AEA&DEV_6625&SUBSYS_85FD103C ;HP
%AMPCIECR% = DriverInstall_6625, PCI\VEN_1AEA&DEV_6625&SUBSYS_85FE103C ;HP
%AMPCIECR% = DriverInstall_6625, PCI\VEN_1AEA&DEV_6625&SUBSYS_85FF103C ;HP

%AMPCIECR% = DriverInstall_6625, PCI\VEN_1AEA&DEV_6625&SUBSYS_8740103C ;HP
%AMPCIECR% = DriverInstall_6625, PCI\VEN_1AEA&DEV_6625&SUBSYS_8741103C ;HP
%AMPCIECR% = DriverInstall_6625, PCI\VEN_1AEA&DEV_6625&SUBSYS_8742103C ;HP
%AMPCIECR% = DriverInstall_6625, PCI\VEN_1AEA&DEV_6625&SUBSYS_8744103C ;HP
%AMPCIECR% = DriverInstall_6625, PCI\VEN_1AEA&DEV_6625&SUBSYS_8745103C ;HP

%AMPCIECR% = DriverInstall_6625, PCI\VEN_1AEA&DEV_6625&SUBSYS_88E4103C ;HP
%AMPCIECR% = DriverInstall_6625, PCI\VEN_1AEA&DEV_6625&SUBSYS_88E5103C ;HP
%AMPCIECR% = DriverInstall_6625, PCI\VEN_1AEA&DEV_6625&SUBSYS_88E6103C ;HP
%AMPCIECR% = DriverInstall_6625, PCI\VEN_1AEA&DEV_6625&SUBSYS_88E7103C ;HP

%AMPCIECR% = DriverInstall_6625, PCI\VEN_1AEA&DEV_6625&SUBSYS_20728086 ;Intel


%AMPCIECR% = DriverInstall_6627, PCI\VEN_1AEA&DEV_6627&CC_FF00


[DeviceList_Gen.NTamd64.10]
; For XP and later
%AMPCIECR_GEN% = DriverInstall_Gen, PCI\VEN_105B&DEV_0EF6&CC_FF00
%AMPCIECR_GEN% = DriverInstall_Gen, PCI\VEN_105B&DEV_0EF7&CC_FF00



;----------------------------------------------------------------------------
;
;----------------------------------------------------------------------------
[DriverInstall_6601]
CopyFiles=CopyFilesSYS, CopyFilesIcon

[DriverInstall_6621]
CopyFiles=CopyFilesSYS, CopyFilesIcon

[DriverInstall_6625]
CopyFiles=CopyFilesSYS, CopyFilesIcon

[DriverInstall_6627]
CopyFiles=CopyFilesSYS, CopyFilesIcon

[DriverInstall_Gen]
CopyFiles=CopyFilesSYS, CopyFilesIcon


;--------------------------------------
[CopyFilesSYS]
AmPeStorU.sys


[CopyFilesIcon]
AmPciIco.icl


;----------------------------------------------------------------------------
; Hardware Key
;----------------------------------------------------------------------------
[DriverInstall_6601.HW]
AddReg = MsiInterruptConfig, AK6601_Config

[DriverInstall_6621.HW]
AddReg = MsiInterruptConfig, AK6621_Config

[DriverInstall_6625.HW]
AddReg = MsiInterruptConfig, AK6625_Config

[DriverInstall_6627.HW]
AddReg = MsiInterruptConfig, AK6627_Config

[DriverInstall_Gen.HW]
AddReg = MsiInterruptConfig, AK6621_Config



;--------------------------------------
[MsiInterruptConfig]
HKR, "Interrupt Management",,0x00000010
HKR, "Interrupt Management\MessageSignaledInterruptProperties",,0x00000010
HKR, "Interrupt Management\MessageSignaledInterruptProperties", "MSISupported", 0x00010001, 1
HKR, "e5b3b5ac-9725-4f78-963f-03dfb1d828c7", "D3ColdSupported", 0x00010001, 0



;----------------------------------------------------------------------------
;   Configuration
;----------------------------------------------------------------------------
;--------------------------------------
[AK6601_Config]
HKR, , "sExtCardIconsSd"	, %REG_SZ%, "%%SystemRoot%%\system32\AmPciIco.icl,21"
HKR, , "sExtCardIconsSdhc"	, %REG_SZ%, "%%SystemRoot%%\system32\AmPciIco.icl,23"
HKR, , "sExtCardIconsSdxc"	, %REG_SZ%, "%%SystemRoot%%\system32\AmPciIco.icl,25"
HKR, , "sExtCardIconsSdmmc"	, %REG_SZ%, "%%SystemRoot%%\system32\AmPciIco.icl,9"
HKR, , "sExtCardIconsMs"	, %REG_SZ%, "%%SystemRoot%%\system32\AmPciIco.icl,13"


;--------------------------------------
[AK6621_Config]
HKR, , "sExtCardIconsSd"	, %REG_SZ%, "%%SystemRoot%%\system32\AmPciIco.icl,21"
HKR, , "sExtCardIconsSdhc"	, %REG_SZ%, "%%SystemRoot%%\system32\AmPciIco.icl,23"
HKR, , "sExtCardIconsSdxc"	, %REG_SZ%, "%%SystemRoot%%\system32\AmPciIco.icl,25"
HKR, , "sExtCardIconsSdmmc"	, %REG_SZ%, "%%SystemRoot%%\system32\AmPciIco.icl,9"
HKR, , "sExtCardIconsMs"	, %REG_SZ%, "%%SystemRoot%%\system32\AmPciIco.icl,13"


;--------------------------------------
[AK6625_Config]

HKR, , "sExtCardIconsSd"	, %REG_SZ%, "%%SystemRoot%%\system32\AmPciIco.icl,21"
HKR, , "sExtCardIconsSdhc"	, %REG_SZ%, "%%SystemRoot%%\system32\AmPciIco.icl,23"
HKR, , "sExtCardIconsSdxc"	, %REG_SZ%, "%%SystemRoot%%\system32\AmPciIco.icl,25"
HKR, , "sExtCardIconsSdmmc"	, %REG_SZ%, "%%SystemRoot%%\system32\AmPciIco.icl,9"
HKR, , "sExtCardIconsMs"	, %REG_SZ%, "%%SystemRoot%%\system32\AmPciIco.icl,13"


HKR, , "uExtRtd3Enable"		, %REG_DWORD%, 0x00
HKR, , "uExtCheckExtRtd3Setting", %REG_DWORD%, 0x01


HKR, , "uSdExtPadDrive0Sdr100"	, %REG_DWORD%, 0x43
HKR, , "uSdExtPadDrive1Sdr100"	, %REG_DWORD%, 0x04
HKR, , "uSdExtPadDrive0Sdr50"	, %REG_DWORD%, 0x22
HKR, , "uSdExtPadDrive1Sdr50"	, %REG_DWORD%, 0x02

HKR, , "uSdExtPadDrive0Sdr25"	, %REG_DWORD%, 0x01

HKR, , "uMsExtPadDrive0"	, %REG_DWORD%, 0x11
HKR, , "uMsExtPadDrive1"	, %REG_DWORD%, 0x01

HKR, , "uExtPllSscEnable"	, %REG_DWORD%, 0x01
HKR, , "uExtPllSdmSel416"	, %REG_DWORD%, 0x40
HKR, , "uExtPllUpdnCntInitCtrl416", %REG_DWORD%, 0x6e98

HKR, , "uSdExt200TimingMode"	, %REG_DWORD%, 0x01
HKR, , "uSdExtInitClkDelay"	, %REG_DWORD%, 0x10

HKR, , "uExtPllUpdnCntStepCtrl"	, %REG_DWORD%, 0x2de4

HKR, , "uExtCardDetectPullDown"	, %REG_DWORD%, 0x00
HKR, , "uExtWriteProtectPullUp"	, %REG_DWORD%, 0x01

HKR, , "uSdExtDisableMmc"	, %REG_DWORD%, 0x01

HKR, , "uExtForceModifyHostAdvErrReportEn"	, %REG_DWORD%, 0x01
HKR, , "uExtForceModifyHostAdvErrReportValue"	, %REG_DWORD%, 0x1101


HKR, , "uExtEnableS0IdleMode"	, %REG_DWORD%, 0x00

HKR, , "uExtSetPdoRemovableMediaChar"	, %REG_DWORD%,  0x01


;--------------------------------------
[AK6627_Config]

HKR, , "sExtCardIconsSd"	, %REG_SZ%, "%%SystemRoot%%\system32\AmPciIco.icl,21"
HKR, , "sExtCardIconsSdhc"	, %REG_SZ%, "%%SystemRoot%%\system32\AmPciIco.icl,23"
HKR, , "sExtCardIconsSdxc"	, %REG_SZ%, "%%SystemRoot%%\system32\AmPciIco.icl,25"
HKR, , "sExtCardIconsSdmmc"	, %REG_SZ%, "%%SystemRoot%%\system32\AmPciIco.icl,9"
HKR, , "sExtCardIconsMs"	, %REG_SZ%, "%%SystemRoot%%\system32\AmPciIco.icl,13"


HKR, , "uExtRtd3Enable"		, %REG_DWORD%, 0x00
HKR, , "uExtCheckExtRtd3Setting", %REG_DWORD%, 0x01


HKR, , "uSdExtPadDrive0Sdr100"	, %REG_DWORD%, 0x43
HKR, , "uSdExtPadDrive1Sdr100"	, %REG_DWORD%, 0x04
HKR, , "uSdExtPadDrive0Sdr50"	, %REG_DWORD%, 0x22
HKR, , "uSdExtPadDrive1Sdr50"	, %REG_DWORD%, 0x02

HKR, , "uSdExtPadDrive0Sdr25"	, %REG_DWORD%, 0x01

HKR, , "uMsExtPadDrive0"	, %REG_DWORD%, 0x11
HKR, , "uMsExtPadDrive1"	, %REG_DWORD%, 0x01

HKR, , "uExtPllSscEnable"	, %REG_DWORD%, 0x01
HKR, , "uExtPllSdmSel416"	, %REG_DWORD%, 0x40
HKR, , "uExtPllUpdnCntInitCtrl416", %REG_DWORD%, 0x6e98

HKR, , "uSdExt200TimingMode"	, %REG_DWORD%, 0x01
HKR, , "uSdExtInitClkDelay"	, %REG_DWORD%, 0x10

HKR, , "uExtPllUpdnCntStepCtrl"	, %REG_DWORD%, 0x2de4

HKR, , "uExtCardDetectPullDown"	, %REG_DWORD%, 0x00
HKR, , "uExtWriteProtectPullUp"	, %REG_DWORD%, 0x01

HKR, , "uSdExtDisableMmc"	, %REG_DWORD%, 0x01

HKR, , "uExtForceModifyHostAdvErrReportEn"	, %REG_DWORD%, 0x01
HKR, , "uExtForceModifyHostAdvErrReportValue"	, %REG_DWORD%, 0x1101


HKR, , "uExtEnableS0IdleMode"	, %REG_DWORD%, 0x00

HKR, , "uExtSetPdoRemovableMediaChar"	, %REG_DWORD%,  0x01


;----------------------------------------------------------------------------
;   Serives Key
;----------------------------------------------------------------------------
[DriverInstall_6601.Services]
Addservice = AmPeStorU, 0x00000002, DriverService

[DriverInstall_6621.Services]
Addservice = AmPeStorU, 0x00000002, DriverService

[DriverInstall_6625.Services]
Addservice = AmPeStorU, 0x00000002, DriverService

[DriverInstall_6627.Services]
Addservice = AmPeStorU, 0x00000002, DriverService

[DriverInstall_Gen.Services]
Addservice = AmPeStorU, 0x00000002, DriverService



;--------------------------------------
[DriverService]
DisplayName    = "Alcorlink PCIE Card Reader Universal Driver"
ServiceType    = %SERVICE_TYPE_KERNEL_DRIVER%
StartType      = %SERVICE_DEMAND_START%
ErrorControl   = %SERVICE_ERROR_NORMAL%
ServiceBinary  = %10%\system32\drivers\AmPeStorU.sys







;----------------------------------------------------------------------------
;   String Definitions
;----------------------------------------------------------------------------
[Strings]
DISK_NAME    = "Alcorlink PCIE Storage Driver Source Disk"
VENDOR       = "Alcorlink Corp."
AMPCIECR     = "Alcorlink PCIE Card Reader"
SERVICE_NAME = "Alcorlink PCIE Card Reader Driver"

VENDOR_GEN       = "Generic"
AMPCIECR_GEN     = "Generic PCIE Card Reader"


SERVICE_TYPE_KERNEL_DRIVER  = 0x1

SERVICE_BOOT_START     = 0x0
SERVICE_SYSTEM_START   = 0x1
SERVICE_AUTO_START     = 0x2
SERVICE_DEMAND_START   = 0x3
SERVICE_DISABLED       = 0x4

SERVICE_ERROR_IGNORE   = 0x0
SERVICE_ERROR_NORMAL   = 0x1
SERVICE_ERROR_SEVERE   = 0x2
SERVICE_ERROR_CRITICAL = 0x3

REG_EXPAND_SZ          = 0x00020000
REG_DWORD              = 0x00010001
REG_MULTI_SZ           = 0x00010000
REG_BINARY             = 0x00000001
REG_SZ                 = 0x00000000




