Changeset 554


Ignore:
Timestamp:
Jul 27, 2011, 8:04:07 PM (14 years ago)
Author:
rudi
Message:

Update to version 0.2.3

Location:
cmedia/trunk
Files:
5 added
8 edited

Legend:

Unmodified
Added
Removed
  • cmedia/trunk/Drv16/commdbg.c

    r354 r554  
    5252
    5353static char hextab[]="0123456789ABCDEF";
     54
     55
     56#ifdef DEBUG
     57#define       MAGIC_COMM_PORT 0x3f8           // pulled from word ptr 40:0
     58//#define         MAGIC_COMM_PORT 0x2f8           // pulled from word ptr 40:0
     59
     60
     61#define UART_DATA               0x00            // UART Data port
     62#define UART_INT_ENAB           0x01            // UART Interrupt enable
     63#define UART_INT_ID             0x02            // interrupt ID
     64#define UART_LINE_CTRL          0x03            // line control registers
     65#define UART_MODEM_CTRL         0x04            // modem control register
     66#define UART_LINE_STAT          0x05            // line status register
     67#define UART_MODEM_STAT         0x06            // modem status regiser
     68#define UART_DIVISOR_LO         0x00            // divisor latch least sig
     69#define UART_DIVISOR_HI         0x01h           // divisor latch most sig
     70
     71#define DELAY   nop
     72#endif
     73
     74#ifdef DEBUG                            //--------------------------- CharOut -
     75void CharOut(char c)
     76{
     77        _asm    {
     78
     79        mov     dx, MAGIC_COMM_PORT     // address of PS/2's first COM port
     80        add     dx, UART_LINE_STAT
     81
     82ReadyCheck:
     83        in      al, dx                                                          // wait for comm port ready signal
     84
     85        DELAY
     86        DELAY
     87        DELAY
     88
     89        test    al, 020h
     90        jz      ReadyCheck
     91
     92        // Send the character
     93
     94        add     dx, UART_DATA - UART_LINE_STAT
     95        mov     al,c
     96        out     dx, al
     97
     98        DELAY
     99        DELAY
     100        DELAY
     101        }
     102}
     103#endif
     104
     105
     106#ifdef DEBUG                            //------------------------- StringOut -
     107void StringOut(char far *DbgStr)
     108{
     109   while (*DbgStr)
     110      CharOut(*DbgStr++);
     111
     112   if (fLineTerminate)
     113   {
     114      CharOut(CR);                              // append carriage return,
     115      CharOut(LF);                              // linefeed
     116   }
     117}
     118#endif
    54119
    55120                                        //-------------------- DecWordToASCII -
     
    243308
    244309
    245 #ifdef DEBUG                            //------------------------- StringOut -
    246 void StringOut(char far *DbgStr)
    247 {
    248    while (*DbgStr)
    249       CharOut(*DbgStr++);
    250 
    251    if (fLineTerminate)
    252    {
    253       CharOut(CR);                              // append carriage return,
    254       CharOut(LF);                              // linefeed
    255    }
    256 }
    257 #endif
    258 
    259 
    260 #ifdef DEBUG
    261 #define       MAGIC_COMM_PORT 0x3f8           // pulled from word ptr 40:0
    262 //#define         MAGIC_COMM_PORT 0x2f8           // pulled from word ptr 40:0
    263 
    264 
    265 #define UART_DATA               0x00            // UART Data port
    266 #define UART_INT_ENAB           0x01            // UART Interrupt enable
    267 #define UART_INT_ID             0x02            // interrupt ID
    268 #define UART_LINE_CTRL          0x03            // line control registers
    269 #define UART_MODEM_CTRL         0x04            // modem control register
    270 #define UART_LINE_STAT          0x05            // line status register
    271 #define UART_MODEM_STAT         0x06            // modem status regiser
    272 #define UART_DIVISOR_LO         0x00            // divisor latch least sig
    273 #define UART_DIVISOR_HI         0x01h           // divisor latch most sig
    274 
    275 #define DELAY   nop
    276 #endif
    277 
    278 #ifdef DEBUG                            //--------------------------- CharOut -
    279 void CharOut(char c)
    280 {
    281         _asm    {
    282 
    283         mov     dx, MAGIC_COMM_PORT     // address of PS/2's first COM port
    284         add     dx, UART_LINE_STAT
    285 
    286 ReadyCheck:
    287         in      al, dx                                                          // wait for comm port ready signal
    288 
    289         DELAY
    290         DELAY
    291         DELAY
    292 
    293         test    al, 020h
    294         jz      ReadyCheck
    295 
    296         // Send the character
    297 
    298         add     dx, UART_DATA - UART_LINE_STAT
    299         mov     al,c
    300         out     dx, al
    301 
    302         DELAY
    303         DELAY
    304         DELAY
    305         }
    306 }
    307 #endif
    308 
  • cmedia/trunk/Include/sbversion.h

    r354 r554  
    3737#define VENDOR_NAME             "C-Media Electronics Inc."
    3838
    39 #define PRODUCT_VERSION         "0.2.1"         // version
    40 #define PRODUCT_TIMESTAMP       20051207L       // YYYYMMDD
     39#define PRODUCT_VERSION         "0.2.3"         // version
     40#define PRODUCT_TIMESTAMP       20110727L       // YYYYMMDD
    4141
    4242
  • cmedia/trunk/Include/version.mak

    r354 r554  
    1212BLDLVL_PRODUCT = C-Media 8738
    1313BLDLVL_REVISION = 0.2
    14 BLDLVL_FILEVER = 1
    15 BLDLVL_DATETIME = 07.12.2005 13:22:27
    16 BLDLVL_MACHINE = Rudi4
     14BLDLVL_FILEVER = 3
     15BLDLVL_DATETIME = 27.07.2011 19:59:49
     16BLDLVL_MACHINE = Rudi6
  • cmedia/trunk/Install/audfiles.scr

    r354 r554  
    11/* Number of files */
    2    8
     2   9
    33/* Disk  Group Dest Source Filename */
    44   0     17    0    0      "CMPCI16.SYS"
     
    1010   0     17    4    0      "midiplay.ico"
    1111   0     17    7    0      "audhelp.hlp"
     12   0     17    4    0      "updini.scr"
  • cmedia/trunk/Install/control.scr

    r354 r554  
    2626ssgroup=17
    2727ssname="C-Media 8738 Audio"
    28 ssversion="0.2.1"
     28ssversion="0.2.3"
    2929sssize=200
    3030ssdll="genin.dll"
  • cmedia/trunk/Install/makefile.os2

    r354 r554  
    162162audfiles.scr: $(DEF_DEP)
    163163        @%write $^@ /* Number of files */
    164         @%write $^@    8
     164        @%write $^@    9
    165165        @%write $^@ /* Disk  Group Dest Source Filename */
    166166        @%write $^@    0     17    0    0      "$(DRIVER16_FILE)"
     
    172172        @%write $^@    0     17    4    0      "midiplay.ico"
    173173        @%write $^@    0     17    7    0      "audhelp.hlp"
     174        @%write $^@    0     17    4    0      "updini.scr"
    174175
    175176
  • cmedia/trunk/Lib32/irq.c

    r354 r554  
    155155
    156156
    157 
    158 
    159 
    160 
    161 #if     0
    162 
    163 static IRQHANDLER_INFO irqHandlers[MAX_IRQS][MAX_SHAREDIRQS] = {0};
    164 static ULONG           nrIrqHandlers[MAX_IRQS] = {0};
    165 static ULONG           eoiIrq[MAX_IRQS] = {0};
    166 
    167 //******************************************************************************
    168 //******************************************************************************
    169 int request_irq(unsigned int irq,
    170                 void (*handler)(int, void *, void *),
    171                 unsigned long x0, const char *x1, void *x2)
    172 {
    173  int i;
    174         if(irq > 0xF)
    175                 return 0;
    176 
    177         for(i=0;i<MAX_SHAREDIRQS;i++) {
    178                 if(irqHandlers[irq][i].handler == 0) {
    179                         irqHandlers[irq][i].handler = handler;
    180                         irqHandlers[irq][i].x0      = x0;
    181                         irqHandlers[irq][i].x1      = (char *)x1;
    182                         irqHandlers[irq][i].x2      = x2;
    183                         nrIrqHandlers[irq]++;
    184                         if(OSS32_SetIrq(irq, (ULONG)&oss_process_interrupt) == FALSE) {
    185                                 break;
    186                         }
    187                         return 0;
    188                 }
    189         }
    190         dprintf(("request_irq: Unable to register irq handler for irq %d\n", irq));
    191         return 1;
    192 }
    193 //******************************************************************************
    194 //******************************************************************************
    195 void free_irq(unsigned int irq, void *userdata)
    196 {
    197  int i;
    198         for(i=0;i<MAX_SHAREDIRQS;i++) {
    199                 if(irqHandlers[irq][i].x2 == userdata) {
    200                         irqHandlers[irq][i].handler = 0;
    201                         irqHandlers[irq][i].x0      = 0;
    202                         irqHandlers[irq][i].x1      = 0;
    203                         irqHandlers[irq][i].x2      = 0;
    204                         if(--nrIrqHandlers[irq] == 0) {
    205                                 OSS32_FreeIrq(irq);
    206                         }
    207                         break;
    208                 }
    209         }
    210 }
    211 //******************************************************************************
    212 //******************************************************************************
    213 void eoi_irq(unsigned int irq)
    214 {
    215         if(irq > 0xf) {
    216                 DebugInt3();
    217                 return;
    218         }
    219         eoiIrq[irq]++;
    220 }
    221 //******************************************************************************
    222 //******************************************************************************
    223 BOOL _cdecl oss_process_interrupt(int irq)
    224 {
    225 // BOOL rc;
    226  int  i;
    227         for(i=0;i<MAX_SHAREDIRQS;i++) {
    228                 if(irqHandlers[irq][i].handler != 0) {
    229                         irqHandlers[irq][i].handler(irq, irqHandlers[irq][i].x2, 0);
    230 
    231                         if( eoiIrq[irq] > 0 ) {
    232                           eoiIrq[irq] = 0;      return TRUE;
    233                         }
    234 /*
    235                         rc = (eoiIrq[irq] > 0);
    236                         if(rc) {
    237                                 eoiIrq[irq] = 0;
    238                                 return rc;
    239                         }
    240 */
    241                 }
    242         }
    243         return FALSE;
    244 }
    245 //******************************************************************************
    246 //******************************************************************************
    247 
    248 #endif
    249 
  • cmedia/trunk/Makefile.inc

    r354 r554  
    11################################################################################
    2 # Generated by R:\Usr\Rudi\OS2-PR\Drivers2\CMedia\CMI8738\configure.cmd
     2# Generated by E:\Work\cmedia\configure.cmd
    33################################################################################
    44
     
    77# Note! These should be absolute paths!
    88################################################################################
    9 SBLIVE_BASE      = R:\Usr\Rudi\OS2-PR\Drivers2\CMedia\CMI8738
    10 SBLIVE_SRC       = R:\Usr\Rudi\OS2-PR\Drivers2\CMedia\CMI8738\src
    11 SBLIVE_LIB_      = R:\Usr\Rudi\OS2-PR\Drivers2\CMedia\CMI8738\lib
    12 SBLIVE_BIN_      = R:\Usr\Rudi\OS2-PR\Drivers2\CMedia\CMI8738\bin
    13 SBLIVE_INCLUDE   = R:\Usr\Rudi\OS2-PR\Drivers2\CMedia\CMI8738\include
    14 SBLIVE_TOOLS     = R:\Usr\Rudi\OS2-PR\Drivers2\CMedia\CMI8738\tools
     9SBLIVE_BASE      = E:\Work\cmedia
     10SBLIVE_SRC       = E:\Work\cmedia\src
     11SBLIVE_LIB_      = E:\Work\cmedia\lib
     12SBLIVE_BIN_      = E:\Work\cmedia\bin
     13SBLIVE_INCLUDE   = E:\Work\cmedia\include
     14SBLIVE_TOOLS     = E:\Work\cmedia\tools
    1515
    1616################################################################################
     
    1818################################################################################
    1919!ifdef 32BIT
    20 !include R:\Usr\Rudi\OS2-PR\Drivers2\CMedia\CMI8738\include\sblive32.mk
     20!include E:\Work\cmedia\include\sblive32.mk
    2121!else
    22 !include R:\Usr\Rudi\OS2-PR\Drivers2\CMedia\CMI8738\include\sblive16.mk
     22!include E:\Work\cmedia\include\sblive16.mk
    2323!endif
    2424
Note: See TracChangeset for help on using the changeset viewer.