From: OCEAN.Long on 18 Mar 2010 13:16 I have modify my ISA driver like a Pnp dirver according to some good heart' advice Then , I make a ISA.inf file for my ISA.sys, and installed into the XP. Then ,there is a new prolbem, The XP does gives the ISA card the memory resource I configured in the ISA.inf. The hardware resource I set in the ISA.inf is like these: ConfigPriority=DESIRED MemConfig=d800-dB00 ; MK_FP(0xd800,0x0000); IRQconfig=11 ; 11=0Xb The following source code is a test program for this card runs under the Windows 98, and I think the most crucial information is unsigned char far *v1=MK_FP(0xd800,0x0000); setvect(0x0b,addr); Both the Windows 98 and XP runs at the same PC . /*************************************************************/ void interrupt load_image(void); void interrupt (*old)(void); void install(void interrupt(*addr)(void)); unsigned char far *v1=MK_FP(0xd800,0x0000); static unsigned char v2[512]; static char flag = 0; int main(void) { FILE *fp = fopen("c:\\test.raw", "wb"); int count = 1024; int loop = 0; flag = 0; old = getvect(0x0b); install(load_image); while(loop < count) { if(flag) { disable(); / *install(old);*/ fwrite(v2, sizeof(char), 512, fp); loop++; / *install(load_image);*/ enable(); /*printf("Loop = %d\n", loop);*/ } } install(old); fclose(fp); } void interrupt load_image(void) { int x; flag = 0; disable(); for(x=0;x<512;x++) { v2[x]=*(v1+x); } outportb(0x20,0x20); flag = 1; enable(); } void install(void interrupt (*addr)()) { disable(); setvect(0x0b,addr); outportb(0x21,0); enable(); } / *************************************************************/
From: OCEAN.Long on 18 Mar 2010 13:18 sorry, the source code is here : / *****************************************************************************************************************************/ void interrupt load_image(void); void interrupt (*old)(void); void install(void interrupt(*addr)(void)); unsigned char far *v1=MK_FP(0xd800,0x0000); static unsigned char v2[512]; static char flag = 0; int main(void) { FILE *fp = fopen("c:\\test.raw", "wb"); int count = 1024; int loop = 0; flag = 0; old = getvect(0x0b); install(load_image); while(loop < count) { if(flag) { disable(); /*install(old);*/ fwrite(v2, sizeof(char), 512, fp); loop++; /*install(load_image);*/ enable(); /*printf("Loop = %d\n", loop);*/ } } install(old); fclose(fp); } void interrupt load_image(void) { int x; flag = 0; disable(); for(x=0;x<512;x++) { v2[x]=*(v1+x); } outportb(0x20,0x20); flag = 1; enable(); } void install(void interrupt (*addr)()) { disable(); setvect(0x0b,addr); outportb(0x21,0); enable(); } / *****************************************************************************************************************************/
From: OCEAN.Long on 18 Mar 2010 13:42 to be continue The problem now is when I installed my driver , I can see the resource was not assigned in the device manage. the fragment in my inf file: /************************************************/ [Aicr.Files.Driver] isadriver.sys [Aicr.LogConfig] MemConfig=d800-dB00 IRQconfig=3 [Aicr.LogConfig0] ConfigPriority=DESIRED MemConfig=d800-dB00 IRQconfig=11 [Aicr.LogConfig1] ConfigPriority=NORMAL IOConfig=18c-18f; /************************************************/ the device manage give me the IO reource 18c-18f , when I want reassign the d800-dB00, it seems that the address has been occupied
From: Tim Roberts on 18 Mar 2010 23:42 "OCEAN.Long" <heartofdra(a)gmail.com> wrote: > >to be continue > > The problem now is when I installed my driver , I can see the >resource was not assigned in the device manage. > >the fragment in my inf file: > >/************************************************/ >[Aicr.Files.Driver] >isadriver.sys > >[Aicr.LogConfig] >MemConfig=d800-dB00 >IRQconfig=3 > >[Aicr.LogConfig0] >ConfigPriority=DESIRED >MemConfig=d800-dB00 >IRQconfig=11 Since you posted this both here and in ntdev, I'll point out that the problem here is not enough zeros in your address. The physical address is D8000. -- Tim Roberts, timr(a)probo.com Providenza & Boekelheide, Inc.
From: OCEAN.Long on 21 Mar 2010 13:34 Is the IRQ number can be just set as 11 ( 0Xb , from setvect(0x0b,addr); ) in the LogConfig ? My ISR doesn't respons . what a pitty . On Mar 19, 11:42 am, Tim Roberts <t...(a)probo.com> wrote: > "OCEAN.Long" <heartof...(a)gmail.com> wrote: > > >to be continue > > > The problem now is when I installed my driver , I can see the > >resource was not assigned in the device manage. > > >the fragment in my inf file: > > >/************************************************/ > >[Aicr.Files.Driver] > >isadriver.sys > > >[Aicr.LogConfig] > >MemConfig=d800-dB00 > >IRQconfig=3 > > >[Aicr.LogConfig0] > >ConfigPriority=DESIRED > >MemConfig=d800-dB00 > >IRQconfig=11 > > Since you posted this both here and in ntdev, I'll point out that the > problem here is not enough zeros in your address. The physical address is > D8000. > -- > Tim Roberts, t...(a)probo.com > Providenza & Boekelheide, Inc.
|
Pages: 1 Prev: Virtual Soundcard Driver Next: Character that can be used for DeviceDesc |