Code update

This commit is contained in:
pagefault
2001-09-23 21:30:26 +00:00
parent e641aa0416
commit ad1fbdebd3

View File

@@ -171,10 +171,12 @@ tempstuff resb 0
; If A is not zero, goto FFD6 ; If A is not zero, goto FFD6
; Jump to Address [0000] ; Jump to Address [0000]
section .data section .bss
DSPInterP: DSPInterP:
times 1024 dw 0 resw 1024
section .data
Gaussian: Gaussian:
dw 1305,1305,1304,1304,1304,1304,1304,1303 dw 1305,1305,1304,1304,1304,1304,1304,1303
@@ -510,6 +512,7 @@ NEWSYM conv2speed
jnz .next jnz .next
ret ret
NEWSYM AdjustFrequency NEWSYM AdjustFrequency
mov al,[SoundInterpType] mov al,[SoundInterpType]
or al,al or al,al
@@ -520,14 +523,16 @@ NEWSYM AdjustFrequency
; Copy from Gaussian to DSPInterP ; Copy from Gaussian to DSPInterP
mov ebx,DSPInterP mov ebx,DSPInterP
mov edx,DSPInterP+2046 mov edx,DSPInterP+2046
mov esi,Gaussian+1022
mov ecx,512 mov ecx,512
.intrploop .intrploop
xor eax,eax xor eax,eax
mov ax,[edx+1024] mov ax,[esi]
mov [edx],ax mov [edx],ax
mov [ebx],ax mov [ebx],ax
add ebx,2 add ebx,2
sub edx,2 sub edx,2
sub esi,2
dec ecx dec ecx
jnz .intrploop jnz .intrploop
jmp .notgaussian jmp .notgaussian
@@ -551,6 +556,7 @@ NEWSYM AdjustFrequency
jnz .intrploopb jnz .intrploopb
.notgaussian .notgaussian
cmp byte[StereoSound],1 cmp byte[StereoSound],1
jne .nostereo8b jne .nostereo8b
cmp byte[SBHDMA],0 cmp byte[SBHDMA],0
@@ -5329,7 +5335,7 @@ NEWSYM handlersbseg
cmp byte[Surround],0 cmp byte[Surround],0
je .nosurround je .nosurround
cmp byte[StereoSound],0 cmp byte[StereoSound],0
jne near .surroundstereo je .surroundmono
; jmp .surroundmono ; jmp .surroundmono
.nosurround .nosurround
.loopb .loopb
@@ -5349,6 +5355,7 @@ NEWSYM handlersbseg
dec ecx dec ecx
jnz .loopb jnz .loopb
jmp .sbend jmp .sbend
%ifdef _I_LIKE_SUCKY_FILTERS_ ;bwahaha
.surroundstereo .surroundstereo
shr ecx,1 shr ecx,1
.loopbs .loopbs
@@ -5380,6 +5387,7 @@ NEWSYM handlersbseg
dec ecx dec ecx
jnz .loopbs jnz .loopbs
jmp .sbend jmp .sbend
%endif
.surroundmono .surroundmono
cmp byte[SBswitch],0 cmp byte[SBswitch],0
je .1stblock je .1stblock
@@ -5542,7 +5550,8 @@ NEWSYM SBHandler16
cmp byte[Surround],0 cmp byte[Surround],0
je .nosurround je .nosurround
cmp byte[StereoSound],0 cmp byte[StereoSound],0
jne near .surroundstereo ; jne near .surroundstereo
je .surroundmono
; jmp .surroundmono ; jmp .surroundmono
.nosurround .nosurround
.loopb .loopb
@@ -5561,6 +5570,7 @@ NEWSYM SBHandler16
dec ecx dec ecx
jnz .loopb jnz .loopb
jmp .sbend jmp .sbend
%ifdef _I_LIKE_SUCKY_FILTERS_ ;bwahaha
.surroundstereo .surroundstereo
shr ecx,1 shr ecx,1
.loopbs .loopbs
@@ -5590,6 +5600,7 @@ NEWSYM SBHandler16
dec ecx dec ecx
jnz .loopbs jnz .loopbs
jmp .sbend jmp .sbend
%endif
.surroundmono .surroundmono
cmp byte[SBswitch],0 cmp byte[SBswitch],0
je .1stblock je .1stblock
@@ -5804,7 +5815,7 @@ NEWSYM LPFstereoloop
mov [LPFsample2],edx mov [LPFsample2],edx
NEWSYM LPFexit NEWSYM LPFexit
%ifndef __MSDOS__ ; %ifndef __MSDOS__ ; wtf ... the other surround filter sucks anyway ;P
cmp byte[Surround],1 cmp byte[Surround],1
jnz near .nosurround jnz near .nosurround
cmp byte[StereoSound],1 cmp byte[StereoSound],1
@@ -5818,33 +5829,33 @@ NEWSYM LPFexit
add edx,eax add edx,eax
sar edx,1 sar edx,1
sub eax,edx ; possibly eliminate center sub eax,edx
shl eax,3 ; shl eax,1
mov ebx,[esi+4] mov ebx,[esi+4]
sub [esi+4],eax sub [esi+4],eax
sub ebx,edx ; possibly eliminate center sub ebx,edx
shl ebx,3 ; shl ebx,1
sub [esi],ebx sub [esi],ebx
sar dword[esi],1 ; sar dword[esi],1
sar dword[esi+4],1 ; sar dword[esi+4],1
mov eax,[esi] ; mov eax,[esi]
mov edx,[esi+4] ; mov edx,[esi+4]
add edx,eax ; add edx,eax
sar edx,1 ; sar edx,1
add [esi],edx ; add [esi],edx
add [esi+4],edx ; add [esi+4],edx
add esi,8 add esi,8
dec ecx dec ecx
jnz near .loop jnz near .loop
.nosurround .nosurround
%endif ;%endif
ret ret
NEWSYM stopsbsound16 NEWSYM stopsbsound16
@@ -5976,7 +5987,7 @@ NEWSYM initSB
mov al,40h mov al,40h
call WriteDSP call WriteDSP
cmp byte[Surround],0 ; cmp byte[Surround],0
; jne .surround8b ; jne .surround8b
cmp byte[StereoSound],1 cmp byte[StereoSound],1
jne .nostereo8b jne .nostereo8b