Changeset 554
- Timestamp:
- Jul 27, 2011, 8:04:07 PM (14 years ago)
- Location:
- cmedia/trunk
- Files:
-
- 5 added
- 8 edited
-
Bin/Debug (added)
-
Bin/Release (added)
-
Drv16/commdbg.c (modified) (2 diffs)
-
Include/sbversion.h (modified) (1 diff)
-
Include/version.mak (modified) (1 diff)
-
Install/audfiles.scr (modified) (2 diffs)
-
Install/control.scr (modified) (1 diff)
-
Install/makefile.os2 (modified) (2 diffs)
-
Lib (added)
-
Lib/Debug (added)
-
Lib/Release (added)
-
Lib32/irq.c (modified) (1 diff)
-
Makefile.inc (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
cmedia/trunk/Drv16/commdbg.c
r354 r554 52 52 53 53 static 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 - 75 void 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 82 ReadyCheck: 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 - 107 void 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 54 119 55 120 //-------------------- DecWordToASCII - … … 243 308 244 309 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); // linefeed255 }256 }257 #endif258 259 260 #ifdef DEBUG261 #define MAGIC_COMM_PORT 0x3f8 // pulled from word ptr 40:0262 //#define MAGIC_COMM_PORT 0x2f8 // pulled from word ptr 40:0263 264 265 #define UART_DATA 0x00 // UART Data port266 #define UART_INT_ENAB 0x01 // UART Interrupt enable267 #define UART_INT_ID 0x02 // interrupt ID268 #define UART_LINE_CTRL 0x03 // line control registers269 #define UART_MODEM_CTRL 0x04 // modem control register270 #define UART_LINE_STAT 0x05 // line status register271 #define UART_MODEM_STAT 0x06 // modem status regiser272 #define UART_DIVISOR_LO 0x00 // divisor latch least sig273 #define UART_DIVISOR_HI 0x01h // divisor latch most sig274 275 #define DELAY nop276 #endif277 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 port284 add dx, UART_LINE_STAT285 286 ReadyCheck:287 in al, dx // wait for comm port ready signal288 289 DELAY290 DELAY291 DELAY292 293 test al, 020h294 jz ReadyCheck295 296 // Send the character297 298 add dx, UART_DATA - UART_LINE_STAT299 mov al,c300 out dx, al301 302 DELAY303 DELAY304 DELAY305 }306 }307 #endif308 -
cmedia/trunk/Include/sbversion.h
r354 r554 37 37 #define VENDOR_NAME "C-Media Electronics Inc." 38 38 39 #define PRODUCT_VERSION "0.2. 1" // version40 #define PRODUCT_TIMESTAMP 20 051207L // YYYYMMDD39 #define PRODUCT_VERSION "0.2.3" // version 40 #define PRODUCT_TIMESTAMP 20110727L // YYYYMMDD 41 41 42 42 -
cmedia/trunk/Include/version.mak
r354 r554 12 12 BLDLVL_PRODUCT = C-Media 8738 13 13 BLDLVL_REVISION = 0.2 14 BLDLVL_FILEVER = 115 BLDLVL_DATETIME = 07.12.2005 13:22:2716 BLDLVL_MACHINE = Rudi 414 BLDLVL_FILEVER = 3 15 BLDLVL_DATETIME = 27.07.2011 19:59:49 16 BLDLVL_MACHINE = Rudi6 -
cmedia/trunk/Install/audfiles.scr
r354 r554 1 1 /* Number of files */ 2 82 9 3 3 /* Disk Group Dest Source Filename */ 4 4 0 17 0 0 "CMPCI16.SYS" … … 10 10 0 17 4 0 "midiplay.ico" 11 11 0 17 7 0 "audhelp.hlp" 12 0 17 4 0 "updini.scr" -
cmedia/trunk/Install/control.scr
r354 r554 26 26 ssgroup=17 27 27 ssname="C-Media 8738 Audio" 28 ssversion="0.2. 1"28 ssversion="0.2.3" 29 29 sssize=200 30 30 ssdll="genin.dll" -
cmedia/trunk/Install/makefile.os2
r354 r554 162 162 audfiles.scr: $(DEF_DEP) 163 163 @%write $^@ /* Number of files */ 164 @%write $^@ 8164 @%write $^@ 9 165 165 @%write $^@ /* Disk Group Dest Source Filename */ 166 166 @%write $^@ 0 17 0 0 "$(DRIVER16_FILE)" … … 172 172 @%write $^@ 0 17 4 0 "midiplay.ico" 173 173 @%write $^@ 0 17 7 0 "audhelp.hlp" 174 @%write $^@ 0 17 4 0 "updini.scr" 174 175 175 176 -
cmedia/trunk/Lib32/irq.c
r354 r554 155 155 156 156 157 158 159 160 161 #if 0162 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 #endif249 -
cmedia/trunk/Makefile.inc
r354 r554 1 1 ################################################################################ 2 # Generated by R:\Usr\Rudi\OS2-PR\Drivers2\CMedia\CMI8738\configure.cmd2 # Generated by E:\Work\cmedia\configure.cmd 3 3 ################################################################################ 4 4 … … 7 7 # Note! These should be absolute paths! 8 8 ################################################################################ 9 SBLIVE_BASE = R:\Usr\Rudi\OS2-PR\Drivers2\CMedia\CMI873810 SBLIVE_SRC = R:\Usr\Rudi\OS2-PR\Drivers2\CMedia\CMI8738\src11 SBLIVE_LIB_ = R:\Usr\Rudi\OS2-PR\Drivers2\CMedia\CMI8738\lib12 SBLIVE_BIN_ = R:\Usr\Rudi\OS2-PR\Drivers2\CMedia\CMI8738\bin13 SBLIVE_INCLUDE = R:\Usr\Rudi\OS2-PR\Drivers2\CMedia\CMI8738\include14 SBLIVE_TOOLS = R:\Usr\Rudi\OS2-PR\Drivers2\CMedia\CMI8738\tools9 SBLIVE_BASE = E:\Work\cmedia 10 SBLIVE_SRC = E:\Work\cmedia\src 11 SBLIVE_LIB_ = E:\Work\cmedia\lib 12 SBLIVE_BIN_ = E:\Work\cmedia\bin 13 SBLIVE_INCLUDE = E:\Work\cmedia\include 14 SBLIVE_TOOLS = E:\Work\cmedia\tools 15 15 16 16 ################################################################################ … … 18 18 ################################################################################ 19 19 !ifdef 32BIT 20 !include R:\Usr\Rudi\OS2-PR\Drivers2\CMedia\CMI8738\include\sblive32.mk20 !include E:\Work\cmedia\include\sblive32.mk 21 21 !else 22 !include R:\Usr\Rudi\OS2-PR\Drivers2\CMedia\CMI8738\include\sblive16.mk22 !include E:\Work\cmedia\include\sblive16.mk 23 23 !endif 24 24
Note:
See TracChangeset
for help on using the changeset viewer.
