Merged some Vibra16 code from Peter_S.
Implemented Opcodes 0bh, 1bh, and 2bh for the DSP1
This commit is contained in:
@@ -958,31 +958,48 @@ short Op0BX;
|
|||||||
short Op0BY;
|
short Op0BY;
|
||||||
short Op0BZ;
|
short Op0BZ;
|
||||||
short Op0BS;
|
short Op0BS;
|
||||||
|
|
||||||
|
void DSPOp0B()
|
||||||
|
{
|
||||||
|
Op0BS=(short)Op0BX*matrixA[0][0]+Op0BY*matrixA[0][1]+Op0BZ*matrixA[0][2];
|
||||||
|
#ifdef DebugDSP1
|
||||||
|
Log_Message("OP0B X: %d Y: %d Z: %d S: %d", Op0BX,Op0BY,Op0BZ,Op0BS);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
short Op1BX;
|
short Op1BX;
|
||||||
short Op1BY;
|
short Op1BY;
|
||||||
short Op1BZ;
|
short Op1BZ;
|
||||||
short Op1BS;
|
short Op1BS;
|
||||||
|
|
||||||
|
void DSPOp1B()
|
||||||
|
{
|
||||||
|
Op1BS=(short)Op1BX*matrixA2[0][0]+Op1BY*matrixA2[0][1]+Op1BZ*matrixA2[0][2];
|
||||||
|
#ifdef DebugDSP1
|
||||||
|
Log_Message("OP1B X: %d Y: %d Z: %d S: %d", Op1BX,Op1BY,Op1BZ,Op1BS);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
short Op2BX;
|
short Op2BX;
|
||||||
short Op2BY;
|
short Op2BY;
|
||||||
short Op2BZ;
|
short Op2BZ;
|
||||||
short Op2BS;
|
short Op2BS;
|
||||||
|
|
||||||
void DSPOp0B()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void DSPOp1B()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void DSPOp2B()
|
void DSPOp2B()
|
||||||
{
|
{
|
||||||
|
Op2BS=(short)Op2BX*matrixA3[0][0]+Op2BY*matrixA3[0][1]+Op2BZ*matrixA3[0][2];
|
||||||
|
#ifdef DebugDSP1
|
||||||
|
Log_Message("OP2B X: %d Y: %d Z: %d S: %d", Op2BX,Op2BY,Op2BZ,Op2BS);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
short Op08X,Op08Y,Op08Z,Op08Ll,Op08Lh;
|
short Op08X,Op08Y,Op08Z,Op08Ll,Op08Lh;
|
||||||
|
|
||||||
void DSPOp08()
|
void DSPOp08()
|
||||||
{
|
{
|
||||||
|
#ifdef DebugDSP1
|
||||||
|
Log_Message("OP08");
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
short Op18X,Op18Y,Op18Z,Op18R,Op18D;
|
short Op18X,Op18Y,Op18Z,Op18R,Op18D;
|
||||||
|
|||||||
@@ -1599,6 +1599,12 @@ NEWSYM SBHDMA, db 0
|
|||||||
NEWSYM SBHDMAPage, db 0
|
NEWSYM SBHDMAPage, db 0
|
||||||
NEWSYM vibracard, db 0
|
NEWSYM vibracard, db 0
|
||||||
|
|
||||||
|
; ViBRA16X fixes!
|
||||||
|
EXTSYM MsgCount ; points to counter
|
||||||
|
EXTSYM MessageOn ; points to "message" delay counter
|
||||||
|
EXTSYM Msgptr ; points to the message to be displayed
|
||||||
|
NEWSYM vibmsg, db 'VIBRA16X MODE ENABLED', 0
|
||||||
|
|
||||||
NEWSYM ResetSBDSP
|
NEWSYM ResetSBDSP
|
||||||
mov dx,[SBPort]
|
mov dx,[SBPort]
|
||||||
add dl,06h
|
add dl,06h
|
||||||
@@ -5063,7 +5069,10 @@ NEWSYM SBHandler16
|
|||||||
push es
|
push es
|
||||||
inc dword[sbhandexec]
|
inc dword[sbhandexec]
|
||||||
|
|
||||||
|
cmp byte [vibracard], 1
|
||||||
|
je .donotcallcmdapos
|
||||||
call GetCDMAPos
|
call GetCDMAPos
|
||||||
|
.donotcallcmdapos
|
||||||
|
|
||||||
cmp byte[csounddisable],1
|
cmp byte[csounddisable],1
|
||||||
je near stopsbsound16
|
je near stopsbsound16
|
||||||
@@ -5583,6 +5592,13 @@ NEWSYM initSB
|
|||||||
; and modified it.
|
; and modified it.
|
||||||
|
|
||||||
.vibrafix2
|
.vibrafix2
|
||||||
|
; notify user that we're in ViBRA16x mode..
|
||||||
|
push eax
|
||||||
|
mov dword [Msgptr], vibmsg
|
||||||
|
mov eax, [MsgCount]
|
||||||
|
mov [MessageOn], eax
|
||||||
|
pop eax
|
||||||
|
|
||||||
; Set Time-Constant Data ( = 256 - (1000000/sampling rate) )
|
; Set Time-Constant Data ( = 256 - (1000000/sampling rate) )
|
||||||
; 8000=131, 22050=210, 44100=233, 11025=165
|
; 8000=131, 22050=210, 44100=233, 11025=165
|
||||||
|
|
||||||
|
|||||||
@@ -133,8 +133,7 @@ NEWSYM outofmem, db 'You don',39,'t have enough memory to run this program!',13,
|
|||||||
NEWSYM vibradetect
|
NEWSYM vibradetect
|
||||||
db 'Creative ViBRA16X PnP card detected (support coded by Peter Santing)', 13, 10
|
db 'Creative ViBRA16X PnP card detected (support coded by Peter Santing)', 13, 10
|
||||||
db 'High-DMA is below dma #4', 13, 10
|
db 'High-DMA is below dma #4', 13, 10
|
||||||
db 13,10, 'you have now full 16-bit stereo sound with the surround option!', 13, 10
|
db 13,10, 'you have now full 16-bit stereo sound with the surround option!', 13, 10, 0
|
||||||
db 13,10, 'Press any key to continue', 13, 10,0
|
|
||||||
|
|
||||||
NEWSYM welcome
|
NEWSYM welcome
|
||||||
|
|
||||||
@@ -676,7 +675,7 @@ NEWSYM getblaster
|
|||||||
push edx
|
push edx
|
||||||
mov edx, vibradetect
|
mov edx, vibradetect
|
||||||
call PrintStr
|
call PrintStr
|
||||||
call WaitForKey
|
;call WaitForKey
|
||||||
pop edx
|
pop edx
|
||||||
|
|
||||||
; ********** END OF ViBRA16X implementation code **********
|
; ********** END OF ViBRA16X implementation code **********
|
||||||
|
|||||||
Reference in New Issue
Block a user