Ignore:
Timestamp:
Sep 9, 2001, 5:31:35 PM (24 years ago)
Author:
sandervl
Message:

joystick reactivated; version increase; Rudi's fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sbliveos2/trunk/drv16/init.cpp

    r178 r188  
    6565#define PCI_DEVICE_ID_CREATIVE_EMU10K1 0x0002UL
    6666#endif
    67 #define PCI_ID  ((PCI_DEVICE_ID_CREATIVE_EMU10K1<<16UL)|PCI_VENDOR_ID_CREATIVE)
     67
     68#ifndef PCI_DEVICE_ID_CREATIVE_EMU10K1_JOYSTICK
     69#define PCI_DEVICE_ID_CREATIVE_EMU10K1_JOYSTICK 0x7002
     70#endif
     71
     72#define PCI_ID     ((PCI_DEVICE_ID_CREATIVE_EMU10K1<<16UL)|PCI_VENDOR_ID_CREATIVE)
     73#define PCI_IDJOY  ((PCI_DEVICE_ID_CREATIVE_EMU10K1_JOYSTICK<<16UL)|PCI_VENDOR_ID_CREATIVE)
    6874
    6975// Default MIDI timer interval, milliseconds.
     
    7682static char szSBLiveAllocResFailed1[] = "Another device driver was granted exclusive access to IRQ ";
    7783static char szSBLiveAllocResFailed2[] = "Unable to allocate hardware resources! Aborting...";
    78 static char szSBLiveConfig1[]  = "SB Live! configuration: IRQ ";
    79 static char szSBLiveConfig2[]  = ", IO Port 0x";
    80 
     84static char szSBLiveConfig1[]   = "SB Live! configuration: IRQ ";
     85static char szSBLiveConfig2[]   = ", IO Port 0x";
     86static char szSBLiveConfigJoy[] = "SB Live! Joystick     : IO Port 0x";
    8187
    8288//
     
    183189        HexWordToASCII(digit, pResources->uIOBase[0], 0);
    184190        DosWrite(1, (VOID FAR*)digit, strlen(digit), &result);
    185 
    186         DosWrite(1, (VOID FAR*)NEWLINE, sizeof(NEWLINE)-1, &result);
    187         DosWrite(1, (VOID FAR*)NEWLINE, sizeof(NEWLINE)-1, &result);
    188191   }
    189192   delete pResources;
     193
     194   //Joystick detection
     195   if(pRM->bIsDevDetected(PCI_IDJOY, SEARCH_ID_DEVICEID, TRUE))
     196   {
     197       pResources = pRM->pGetDevResources(PCI_IDJOY, SEARCH_ID_DEVICEID, TRUE, TRUE);
     198       if((pResources) && !pResources->isEmpty() && fVerbose) {
     199           USHORT result;
     200           DosWrite(1, (VOID FAR*)NEWLINE, sizeof(NEWLINE)-1, &result);
     201           DosWrite(1, (VOID FAR*)szSBLiveConfigJoy, sizeof(szSBLiveConfigJoy)-1, &result);
     202           HexWordToASCII(digit, pResources->uIOBase[0], 0);
     203           DosWrite(1, (VOID FAR*)digit, strlen(digit), &result);
     204       }
     205       delete pResources;
     206   }
     207   if (fVerbose) {
     208        USHORT result;
     209        DosWrite(1, (VOID FAR*)NEWLINE, sizeof(NEWLINE)-1, &result);
     210        DosWrite(1, (VOID FAR*)NEWLINE, sizeof(NEWLINE)-1, &result);
     211   }
    190212
    191213   // Build the MPU401 object only if we got a good 2115 init.
Note: See TracChangeset for help on using the changeset viewer.