| Navigation:First_Community->Science&technology->Electronic | Goto:New Topic•Setting•Search | |
CopyRight owned by the original author.--(www.MegaEntry.com)
:[Version]Signature=$CHICAGO$ ;必须这么写Class=PLX ;可以自己改Provider=%SHENLI% ;制作者MegaEntry - Social networking and discussion site!
[Manufacturer]%Manufacture%=SECTION0[SECTION0]%my_card%=my.install,PCI\VEN_10b5&DEV_9050 ;my.install表示了安装过程所要做的事,MegaEntry - Social networking and discussion site!
[my.install]CopyFiles=CopyFiles_PLX10b5 ;主要做拷贝文件和注册表添加AddReg=AddReg_PLX10b5[CopyFiles_PLX10b5]MegaEntry - Social networking and discussion site!
Vxd8_25.vxd[AddReg_PLX10b5]HKR,,DevLoader,0,Vxd8_25.vxdCopyRight owned by the original author.--(www.MegaEntry.com)
[Strings]Manufacture="BUAA202" ;这些信息会在安装时显示my_card="PLX9052"下面提供了vxd中查询pci卡的代码,这个代码是参考清华bbs驱动版精华区huyuguang大虾的大作,他提供了更详细的代码有兴趣可以参考。MegaEntry - Social networking and discussion site!
BOOL findpci(DWORD DeviceVendor,PCIINF *pciinf)//我的卡的DeviceVendor=0x905210b5{DWORD io_cf8;DWORD io_cfc;int i;DWORD buf[16];CopyRight owned by the original author.--(www.MegaEntry.com)
io_cf8=0x80000000;for(;;){ DWORD_OUT(0xcf8,io_cf8);//向0xcf8输出双字 io_cf8 io_cfc=DWORD_IN(0xcfc); //从0xcfc读入双字CopyRight owned by the original author.--(www.MegaEntry.com)
if(io_cfc==DeviceVendor)//find pci9052 { for(i=0;i<16;i ) { DWORD_OUT(0xcf8,io_cf8 4*i); buf[i]=DWORD_IN(0xcfc);MegaEntry - Social networking and discussion site!
} pciinf->VendorID=(WORD)(buf[0]&0xffff); pciinf->DeviceID=(WORD)((buf[0]&0xffff0000)/0x10000); pciinf->Command=(WORD)(buf[1]&0xffff); pciinf->Status=(WORD)((buf[1]&0xffff0000)/0x10000); pciinf->RevisionID=(UCHAR)(buf[2]&0xff);MegaEntry - Social networking and discussion site!
pciinf->CacheLineSize=(UCHAR)(buf[3]&0xff); pciinf->LatencyTimer=(UCHAR)((buf[3]&0xff00)/0x100); pciinf->HeaderType=(UCHAR)((buf[3]&0xff0000)/0x10000); pciinf->BIST=(UCHAR)((buf[3]&0xff000000)/0x1000000); pciinf->BaseAddresses[0]=buf[4]; pciinf->BaseAddresses[1]=buf[5];CopyRight owned by the original author.--(www.MegaEntry.com)
pciinf->BaseAddresses[2]=buf[6]; pciinf->BaseAddresses[3]=buf[7]; pciinf->BaseAddresses[4]=buf[8]; pciinf->BaseAddresses[5]=buf[9]; pciinf->SubsystemVendorID=(USHORT)(buf[11]&0xffff); pciinf->SubsystemID=(USHORT)((buf[12]&0xffff0000)/0x10000);CopyRight owned by the original author.--(www.MegaEntry.com)
pciinf->InterruptLine=(UCHAR)(buf[15]&0xff); pciinf->InterruptPin=(UCHAR)((buf[15]&0xff00)/0x100); pciinf->MinimumGrant=(UCHAR)((buf[15]&0xff0000)/0x10000); pciinf->MaximumLatency=(UCHAR)((buf[15]&0xff000000)/0x1000000); break; }MegaEntry - Social networking and discussion site!
else io_cf8 =0x800; if(io_cf8>=0x80ffff00) return 1;}return 0;CopyRight owned by the original author.--(www.MegaEntry.com)
} 以上都是我这次制作卡的一些心得,还有很多不清楚的地方,写出来只是想让感兴趣的pci门外汉了解一下,但愿能有所帮助。肯定有很多错误,希望各位大虾指正,但求不会误人子弟。pci大虾见笑了 Edited 1 times. Last edit at 06/27/06 05:20PM by bigman.