Changeset 561
- Timestamp:
- Jul 28, 2011, 11:16:56 AM (14 years ago)
- Location:
- sbliveos2/trunk
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
sbliveos2/trunk/drv16/commdbg.c
r152 r561 53 53 54 54 char hextab[]="0123456789ABCDEF"; 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 #ifdef DEBUG //------------------------- StringOut - 106 void StringOut(char far *DbgStr) 107 { 108 while (*DbgStr) 109 CharOut(*DbgStr++); 110 111 if (fLineTerminate) 112 { 113 CharOut(CR); // append carriage return, 114 CharOut(LF); // linefeed 115 } 116 } 117 #endif 55 118 56 119 //-------------------- DecWordToASCII - … … 330 393 #endif //DEBUG 331 394 332 333 #ifdef DEBUG //------------------------- StringOut -334 void StringOut(char far *DbgStr)335 {336 while (*DbgStr)337 CharOut(*DbgStr++);338 339 if (fLineTerminate)340 {341 CharOut(CR); // append carriage return,342 CharOut(LF); // linefeed343 }344 }345 #endif346 347 #ifdef DEBUG348 //#define MAGIC_COMM_PORT 0x3f8 // pulled from word ptr 40:0349 #define MAGIC_COMM_PORT 0x2f8 // pulled from word ptr 40:0350 351 352 #define UART_DATA 0x00 // UART Data port353 #define UART_INT_ENAB 0x01 // UART Interrupt enable354 #define UART_INT_ID 0x02 // interrupt ID355 #define UART_LINE_CTRL 0x03 // line control registers356 #define UART_MODEM_CTRL 0x04 // modem control register357 #define UART_LINE_STAT 0x05 // line status register358 #define UART_MODEM_STAT 0x06 // modem status regiser359 #define UART_DIVISOR_LO 0x00 // divisor latch least sig360 #define UART_DIVISOR_HI 0x01h // divisor latch most sig361 362 #define DELAY nop363 #endif364 365 #ifdef DEBUG //--------------------------- CharOut -366 void CharOut(char c)367 {368 _asm {369 370 mov dx, MAGIC_COMM_PORT // address of PS/2's first COM port371 add dx, UART_LINE_STAT372 373 ReadyCheck:374 in al, dx // wait for comm port ready signal375 376 DELAY377 DELAY378 DELAY379 380 test al, 020h381 jz ReadyCheck382 383 // Send the character384 385 add dx, UART_DATA - UART_LINE_STAT386 mov al,c387 out dx, al388 389 DELAY390 DELAY391 DELAY392 }393 }394 #endif -
sbliveos2/trunk/drv16/irq.hpp
r205 r561 47 47 #endif 48 48 49 // clude <stddef.h> //### NULL? to be removed50 51 // ###IHV: IRQ sharing flag. Set this to "0" for ISA bus, "1" for PCI52 // PCI and Microchannel environments (where hardware can share an IRQ level.53 const IRQ_HW_Sharing = 1; // 13 Jun 07 MF54 55 49 // Max num of int handlers per IRQ level. 56 const MAX_HandlersPerIRQLevel = 3;50 const int MAX_HandlersPerIRQLevel = 3; 57 51 58 52 // PFN_InterruptHandler: Pointer to an interrupt handler. This is a near -
sbliveos2/trunk/drv16/maudio.cpp
r205 r561 56 56 // if these haven't been redefined by the sub-classes. 57 57 58 virtualint MIDIAUDIO::writeByte(BYTE b)58 int MIDIAUDIO::writeByte(BYTE b) 59 59 { 60 60 return 0; // Failure. 61 61 } 62 62 63 virtualint MIDIAUDIO::readByte(void)63 int MIDIAUDIO::readByte(void) 64 64 { 65 65 return -1; // Failure. -
sbliveos2/trunk/drv16/midimsg.hpp
r142 r561 55 55 56 56 // Byte length of the IBM Sysex Signature (0xF000003A). 57 const IBMSysexSigLen = 4;57 const int IBMSysexSigLen = 4; 58 58 59 59 // Miscellaneous error codes, must be <0. … … 68 68 // Longest message at time of this writing is 4 byte IBM Sysex signature 69 69 // plus 4 bytes sysex command and data == 8 bytes. We'll tack on 2 extra. 70 const MAX_MidiMsgLen = (IBMSysexSigLen + 4 + 2);70 const int MAX_MidiMsgLen = (IBMSysexSigLen + 4 + 2); 71 71 72 72 // We use this class to build up MIDI messages as we receive the bytes. -
sbliveos2/trunk/drv16/midistrm.hpp
r142 r561 39 39 40 40 // Number of notes in the MIDI definition. 41 const NUM_MidiNotes = 128;41 const USHORT NUM_MidiNotes = 128; 42 42 43 43 // Number of channels in the MIDI definition. 44 const NUM_MidiChannels = 16;44 const USHORT NUM_MidiChannels = 16; 45 45 46 46 // The MIDI parser is always in one of the following states. -
sbliveos2/trunk/drv16/mpu401.cpp
r205 r561 63 63 } 64 64 65 v irtual void MPU_401::noteOff( BYTE mchan, BYTE note, BYTE velocity )65 void MPU_401::noteOff( BYTE mchan, BYTE note, BYTE velocity ) 66 66 { 67 67 writeByte( (BYTE) 0x80 | mchan ); … … 70 70 } 71 71 72 v irtual void MPU_401::noteOn( BYTE mchan, BYTE note, BYTE velocity )72 void MPU_401::noteOn( BYTE mchan, BYTE note, BYTE velocity ) 73 73 { 74 74 writeByte( (BYTE) 0x90 | mchan ); … … 77 77 } 78 78 79 v irtual void MPU_401::polyphonicPressure( BYTE mchan, BYTE note, BYTE value )79 void MPU_401::polyphonicPressure( BYTE mchan, BYTE note, BYTE value ) 80 80 { 81 81 writeByte( (BYTE) 0xA0 | mchan ); … … 84 84 } 85 85 86 v irtual void MPU_401::controlChange( BYTE mchan, BYTE control_number, BYTE value )86 void MPU_401::controlChange( BYTE mchan, BYTE control_number, BYTE value ) 87 87 { 88 88 writeByte( (BYTE) 0xB0 | mchan ); … … 91 91 } 92 92 93 v irtual void MPU_401::programChange( BYTE mchan, BYTE program_number )93 void MPU_401::programChange( BYTE mchan, BYTE program_number ) 94 94 { 95 95 writeByte( (BYTE) 0xC0 | mchan ); … … 97 97 } 98 98 99 v irtual void MPU_401::channelPressure( BYTE mchan, BYTE value )99 void MPU_401::channelPressure( BYTE mchan, BYTE value ) 100 100 { 101 101 writeByte( (BYTE) 0xD0 | mchan ); … … 103 103 } 104 104 105 v irtual void MPU_401::pitchBend( BYTE mchan, BYTE value_lsb, BYTE value_msb )105 void MPU_401::pitchBend( BYTE mchan, BYTE value_lsb, BYTE value_msb ) 106 106 { 107 107 writeByte( (BYTE) 0xE0 | mchan ); -
sbliveos2/trunk/drv16/sizedefs.h
r142 r561 24 24 #define SIZEDEFS_H 25 25 26 const NumLogicalDevices = 5; // Number of PNP logical devices on adapter.27 28 26 #define HEAP_SIZE 16384 // must be a multiple of 4 29 27 #define DEFAULT_HEAP 4096 -
sbliveos2/trunk/drv16/stream.cpp
r181 r561 189 189 190 190 #pragma off (unreferenced) 191 virtualULONG STREAM::Write(PSTREAMBUF pbuf, ULONG uLength, BOOL fLooping)191 ULONG STREAM::Write(PSTREAMBUF pbuf, ULONG uLength, BOOL fLooping) 192 192 #pragma on (unreferenced) 193 193 { -
sbliveos2/trunk/drv16/timer.cpp
r178 r561 250 250 * @notes Maps operation to _iStop (Stop and Pause are identical). 251 251 */ 252 virtualint TIMER::Stop( void )252 int TIMER::Stop( void ) 253 253 { 254 254 return _iStop(); … … 262 262 * @notes Maps operation to _iStop (Stop and Pause are identical). 263 263 */ 264 virtualint TIMER::Pause( void )264 int TIMER::Pause( void ) 265 265 { 266 266 return _iStop(); … … 274 274 * @notes Maps operation to _iStart (Start and Resume are identical). 275 275 */ 276 virtualint TIMER::Resume( void )276 int TIMER::Resume( void ) 277 277 { 278 278 return _iStart(); -
sbliveos2/trunk/drv16/waudio.cpp
r178 r561 291 291 */ 292 292 #pragma off (unreferenced) 293 v irtual void WAVEAUDIO::ConfigDev(STREAM *stream, PWAVECONFIGINFO pConfigInfo)293 void WAVEAUDIO::ConfigDev(STREAM *stream, PWAVECONFIGINFO pConfigInfo) 294 294 #pragma on (unreferenced) 295 295 { -
sbliveos2/trunk/drv16/waveplay.cpp
r142 r561 65 65 /* */ 66 66 /******************************************************************************/ 67 virtualint WAVEPLAY::Start(STREAM *stream)67 int WAVEPLAY::Start(STREAM *stream) 68 68 { 69 69 return OSS16_StartStream(stream) != TRUE; … … 74 74 /* */ 75 75 /******************************************************************************/ 76 virtualint WAVEPLAY::Stop(STREAM *stream)76 int WAVEPLAY::Stop(STREAM *stream) 77 77 { 78 78 return OSS16_StopStream(stream) != TRUE; 79 79 } 80 80 81 v irtual void WAVEPLAY::ConfigDev(STREAM *stream, PWAVECONFIGINFO pConfigInfo)81 void WAVEPLAY::ConfigDev(STREAM *stream, PWAVECONFIGINFO pConfigInfo) 82 82 { 83 83 FORMAT_INFO formatInfo; -
sbliveos2/trunk/drv16/waverec.cpp
r142 r561 65 65 /* */ 66 66 /******************************************************************************/ 67 virtualint WAVEREC::Start(STREAM *stream)67 int WAVEREC::Start(STREAM *stream) 68 68 { 69 69 return OSS16_StartStream(stream) != TRUE; … … 74 74 /* */ 75 75 /******************************************************************************/ 76 virtualint WAVEREC::Stop(STREAM *stream)76 int WAVEREC::Stop(STREAM *stream) 77 77 { 78 78 return OSS16_StopStream(stream) != TRUE; 79 79 } 80 80 81 v irtual void WAVEREC::ConfigDev(STREAM *stream, PWAVECONFIGINFO pConfigInfo)81 void WAVEREC::ConfigDev(STREAM *stream, PWAVECONFIGINFO pConfigInfo) 82 82 { 83 83 FORMAT_INFO formatInfo; -
sbliveos2/trunk/lib32/debug.c
r151 r561 50 50 51 51 char hextab[]="0123456789ABCDEF"; 52 53 #ifdef DEBUG //--------------------------- CharOut - 54 void CharOut(char c) 55 { 56 _asm { 57 58 mov dx, MAGIC_COMM_PORT // address of PS/2's first COM port 59 add dx, UART_LINE_STAT 60 61 ReadyCheck: 62 in al, dx // wait for comm port ready signal 63 64 DELAY 65 DELAY 66 DELAY 67 68 test al, 020h 69 jz ReadyCheck 70 71 // Send the character 72 73 add dx, UART_DATA - UART_LINE_STAT 74 mov al,c 75 out dx, al 76 77 DELAY 78 DELAY 79 DELAY 80 } 81 } 82 #endif 83 84 #ifdef DEBUG //------------------------- StringOut - 85 void StringOut(char *DbgStr) 86 { 87 while (*DbgStr) 88 CharOut(*DbgStr++); 89 90 if (fLineTerminate) 91 { 92 CharOut(CR); // append carriage return, 93 CharOut(LF); // linefeed 94 } 95 } 96 #endif 97 52 98 53 99 //-------------------- DecLongToASCII - … … 373 419 } 374 420 375 #ifdef DEBUG //------------------------- StringOut -376 void StringOut(char *DbgStr)377 {378 while (*DbgStr)379 CharOut(*DbgStr++);380 381 if (fLineTerminate)382 {383 CharOut(CR); // append carriage return,384 CharOut(LF); // linefeed385 }386 }387 #endif388 389 421 #ifdef DEBUG 390 422 //#define MAGIC_COMM_PORT 0x3f8 // pulled from word ptr 40:0 … … 405 437 #endif 406 438 407 #ifdef DEBUG //--------------------------- CharOut -408 void CharOut(char c)409 {410 _asm {411 412 mov dx, MAGIC_COMM_PORT // address of PS/2's first COM port413 add dx, UART_LINE_STAT414 415 ReadyCheck:416 in al, dx // wait for comm port ready signal417 418 DELAY419 DELAY420 DELAY421 422 test al, 020h423 jz ReadyCheck424 425 // Send the character426 427 add dx, UART_DATA - UART_LINE_STAT428 mov al,c429 out dx, al430 431 DELAY432 DELAY433 DELAY434 }435 }436 #endif
Note:
See TracChangeset
for help on using the changeset viewer.