From 0670a01e8de853d21646f26f0b3fa02f65f9d712 Mon Sep 17 00:00:00 2001 From: pagefault <> Date: Thu, 30 Aug 2001 18:47:04 +0000 Subject: [PATCH] Lots of changes --- zsnes/src/gui/gui.asm | 1 + zsnes/src/gui/guikeys.inc | 46 +++++++++----------- zsnes/src/gui/guimouse.inc | 19 ++++---- zsnes/src/gui/guiwindp.inc | 89 +++++++++++++++++--------------------- zsnes/src/win/winlink.cpp | 6 --- 5 files changed, 68 insertions(+), 93 deletions(-) diff --git a/zsnes/src/gui/gui.asm b/zsnes/src/gui/gui.asm index 35bb5aae..3ed9618c 100644 --- a/zsnes/src/gui/gui.asm +++ b/zsnes/src/gui/gui.asm @@ -595,6 +595,7 @@ NEWSYM KeyQuickClock, dd 0 NEWSYM KeyQuickMinimize, dd 0 NEWSYM AutoIncSaveSlot, db 0 NEWSYM TCPIPAddress, db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 +NEWSYM SoundInterpType, db 2 GUIsave equ $-GUIRAdd diff --git a/zsnes/src/gui/guikeys.inc b/zsnes/src/gui/guikeys.inc index 1638284f..b4746259 100644 --- a/zsnes/src/gui/guikeys.inc +++ b/zsnes/src/gui/guikeys.inc @@ -1226,44 +1226,38 @@ GUISoundKeys: jne .notrevst xor byte[RevStereo],1 .notrevst -%ifdef __WIN32__ - cmp dh,'A' - jne .nolargebuffer - xor byte[LargeSoundBuf],1 -.nolargebuffer -%endif %ifdef __MSDOS__ cmp dh,'U' jne .nosurround xor byte[Surround],1 .nosurround %endif - cmp dh,'O' - jne .nointersound - xor byte[InterSound],1 -.nointersound - cmp dh,'L' - jne .nolowpass - xor byte[LowPassFilter],1 -.nolowpass - cmp dh,'B' - jne .nosoundbuf - xor byte[SoundBufEn],1 -.nosoundbuf - cmp dh,'C' - jne .nocubic - xor byte[UseCubicSpline],1 -.nocubic - cmp dh,'D' - jne .nospcdisable - xor byte[SPCDisable],1 -.nospcdisable %ifdef __WIN32__ cmp dh,'X' jne .noexclusivesound xor byte[ExclusiveSound],1 .noexclusivesound %endif + cmp dh,'B' + jne .nosoundbuf + xor byte[SoundBufEn],1 +.nosoundbuf + cmp dh,'D' + jne .nospcdisable + xor byte[SPCDisable],1 +.nospcdisable + cmp dh,'G' + jne .nogausseninterp + GUIkeystoggleoptn byte[SoundInterpType],1 +.nogausseninterp + cmp dh,'C' + jne .nocubicinterp + GUIkeystoggleoptn byte[SoundInterpType],2 +.nocubicinterp + cmp dh,'8' + jne .no8ptinterp + GUIkeystoggleoptn byte[SoundInterpType],3 +.no8ptinterp ret .sampratenext db 1,4,5,6,2,3,0,0,0,0 diff --git a/zsnes/src/gui/guimouse.inc b/zsnes/src/gui/guimouse.inc index c7b14898..f398268b 100644 --- a/zsnes/src/gui/guimouse.inc +++ b/zsnes/src/gui/guimouse.inc @@ -2326,18 +2326,15 @@ DisplayGUISoundClick: %ifdef __MSDOS__ GUIClickCButton 11,121,byte[Surround] %endif +%ifdef __WIN32__ + GUIClickCButton 11,121,byte[ExclusiveSound] +%endif ;.win32sound -%ifdef __WIN32__ - GUIClickCButton 11,121,byte[LargeSoundBuf] -%endif - GUIClickCButton 11,131,byte[InterSound] - GUIClickCButton 11,141,byte[LowPassFilter] - GUIClickCButton 11,151,byte[SoundBufEn] - GUIClickCButton 11,161,byte[UseCubicSpline] - GUIClickCButton 11,171,byte[SPCDisable] -%ifdef __WIN32__ - GUIClickCButton 11,181,byte[ExclusiveSound] -%endif + GUIClickCButton 11,131,byte[SoundBufEn] + GUIClickCButton 11,141,byte[SPCDisable] + GUIClickCButton6 11,161,byte[SoundInterpType],1 + GUIClickCButton6 11,171,byte[SoundInterpType],2 + GUIClickCButton6 11,181,byte[SoundInterpType],3 cmp eax,15 jl near .nosrate cmp edx,61 diff --git a/zsnes/src/gui/guiwindp.inc b/zsnes/src/gui/guiwindp.inc index d055cf29..4ce988a0 100644 --- a/zsnes/src/gui/guiwindp.inc +++ b/zsnes/src/gui/guiwindp.inc @@ -2176,16 +2176,13 @@ DisplayGUISound: %endif ;.win32s2 %ifdef __WIN32__ - GUIOuttextwin2u 6,26,126,GUISoundTextIb,1 + GUIOuttextwin2u 6,26,126,GUISoundTextO,1 %endif - GUIOuttextwin2u 6,26,136,GUISoundTextJ,1 + GUIOuttextwin2u 6,26,136,GUISoundTextJ,6 GUIOuttextwin2u 6,26,146,GUISoundTextK,0 - GUIOuttextwin2u 6,26,156,GUISoundTextL,6 - GUIOuttextwin2u 6,26,166,GUISoundTextM,0 - GUIOuttextwin2u 6,26,176,GUISoundTextN,0 -%ifdef __WIN32__ - GUIOuttextwin2u 6,26,186,GUISoundTextO,1 -%endif + GUIOuttextwin2u 6,26,166,GUISoundTextQ,0 + GUIOuttextwin2u 6,26,176,GUISoundTextR,0 + GUIOuttextwin2u 6,26,186,GUISoundTextS,0 add byte[GUItextcolor],15 GUIOuttextwin2 6,25,25,GUISoundText1 GUIOuttextwin2 6,25,34,GUISoundText3 @@ -2204,21 +2201,19 @@ DisplayGUISound: %endif ;.win32s %ifdef __WIN32__ - GUIOuttextwin2 6,25,125,GUISoundTextIb + GUIOuttextwin2 6,25,125,GUISoundTextO %endif GUIOuttextwin2 6,25,135,GUISoundTextJ GUIOuttextwin2 6,25,145,GUISoundTextK - GUIOuttextwin2 6,25,155,GUISoundTextL - GUIOuttextwin2 6,25,165,GUISoundTextM - GUIOuttextwin2 6,25,175,GUISoundTextN -%ifdef __WIN32__ - GUIOuttextwin2 6,25,185,GUISoundTextO -%endif + GUIOuttextwin2 6,25,165,GUISoundTextQ + GUIOuttextwin2 6,25,175,GUISoundTextR + GUIOuttextwin2 6,25,185,GUISoundTextS mov al,[GUIWincol] mov byte[GUItextcolor],al GUIOuttextwin2 6,6,16,GUISoundText6 GUIOuttextwin2u 6,6,53,GUISoundText2,9 GUIOuttextwin2 6,6,76,GUISoundText5 + GUIOuttextwin2 6,6,156,GUISoundTextP mov byte[GUItextcolor],163 cmp byte[GUIWincoladd],0 je .zero3 @@ -2227,6 +2222,7 @@ DisplayGUISound: GUIOuttextwin2 6,5,15,GUISoundText6 GUIOuttextwin2 6,5,52,GUISoundText2 GUIOuttextwin2 6,5,75,GUISoundText5 + GUIOuttextwin2 6,5,155,GUISoundTextP mov dword[GUITemp],GUIIconDataCheckBoxUC cmp byte[cfgsoundon],0 je .nocheckbox @@ -2262,6 +2258,14 @@ DisplayGUISound: mov dword[GUITemp],GUIIconDataCheckBoxC .nocheckbox3 GUIDisplayIconWin 6,11,111,[GUITemp] +%ifdef __WIN32__ + mov dword[GUITemp],GUIIconDataCheckBoxUC + cmp byte[ExclusiveSound],0 + je .nocheckbox32 + mov dword[GUITemp],GUIIconDataCheckBoxC +.nocheckbox32 + GUIDisplayIconWin 6,11,121,[GUITemp] +%endif ; cmp byte[OSPort],3 ; je near .nocheckbox42 %ifdef __MSDOS__ @@ -2272,53 +2276,36 @@ DisplayGUISound: .nocheckbox4 GUIDisplayIconWin 6,11,121,[GUITemp] %endif -.nocheckbox42 -%ifdef __WIN32__ mov dword[GUITemp],GUIIconDataCheckBoxUC - cmp byte[LargeSoundBuf],0 - je .nocheckbox43 - mov dword[GUITemp],GUIIconDataCheckBoxC -.nocheckbox43 - GUIDisplayIconWin 6,11,121,[GUITemp] -%endif - mov dword[GUITemp],GUIIconDataCheckBoxUC - cmp byte[InterSound],0 + cmp byte[SoundBufEn],0 je .nocheckbox5 mov dword[GUITemp],GUIIconDataCheckBoxC .nocheckbox5 GUIDisplayIconWin 6,11,131,[GUITemp] mov dword[GUITemp],GUIIconDataCheckBoxUC - cmp byte[LowPassFilter],0 + cmp byte[SPCDisable],0 je .nocheckbox6 mov dword[GUITemp],GUIIconDataCheckBoxC .nocheckbox6 GUIDisplayIconWin 6,11,141,[GUITemp] mov dword[GUITemp],GUIIconDataCheckBoxUC - cmp byte[SoundBufEn],0 - je .nocheckbox7 + cmp byte[SoundInterpType],1 + jne .nocheckbox7 mov dword[GUITemp],GUIIconDataCheckBoxC .nocheckbox7 - GUIDisplayIconWin 6,11,151,[GUITemp] - mov dword[GUITemp],GUIIconDataCheckBoxUC - cmp byte[UseCubicSpline],0 - je .nocheckbox8 - mov dword[GUITemp],GUIIconDataCheckBoxC -.nocheckbox8 GUIDisplayIconWin 6,11,161,[GUITemp] mov dword[GUITemp],GUIIconDataCheckBoxUC - cmp byte[SPCDisable],0 - je .nocheckbox9 + cmp byte[SoundInterpType],2 + jne .nocheckbox8 + mov dword[GUITemp],GUIIconDataCheckBoxC +.nocheckbox8 + GUIDisplayIconWin 6,11,171,[GUITemp] + mov dword[GUITemp],GUIIconDataCheckBoxUC + cmp byte[SoundInterpType],3 + jne .nocheckbox9 mov dword[GUITemp],GUIIconDataCheckBoxC .nocheckbox9 - GUIDisplayIconWin 6,11,171,[GUITemp] -%ifdef __WIN32__ - mov dword[GUITemp],GUIIconDataCheckBoxUC - cmp byte[ExclusiveSound],0 - je .nocheckbox10 - mov dword[GUITemp],GUIIconDataCheckBoxC -.nocheckbox10 GUIDisplayIconWin 6,11,181,[GUITemp] -%endif DrawGUIWinBox 6,15,61,69,69,167 mov dword[GUITemp],GUISoundText7 xor eax,eax @@ -2404,13 +2391,15 @@ GUISoundTextCb db '48000HZ',0 GUISoundTextD db '---%',0 GUISoundTextH db 'REVERSE STEREO',0 GUISoundTextI db 'SURROUND SOUND',0 -GUISoundTextIb db 'LARGE SOUND BUFFER',0 -GUISoundTextJ db 'SOUND INTERPOLATION',0 -GUISoundTextK db 'LOW PASS FILTER',0 -GUISoundTextL db 'SOUND BUFFERING',0 -GUISoundTextM db 'CUBIC SPLINE INTERP',0 -GUISoundTextN db 'DISABLE SPC EMU',0 +GUISoundTextJ db 'SOUND BUFFERING',0 +GUISoundTextK db 'DISABLE SPC EMU',0 GUISoundTextO db 'EXCLUSIVE MODE',0 +GUISoundTextP db 'INTERPOLATION :',0 +GUISoundTextQ db 'GAUSSEN',0 +GUISoundTextR db 'CUBIC SPLINE',0 +GUISoundTextS db '8-POINT',0 + + DisplayGUICheatConv: mov eax,[ccheatnpos] diff --git a/zsnes/src/win/winlink.cpp b/zsnes/src/win/winlink.cpp index 39b7d5ae..f71f2d0f 100644 --- a/zsnes/src/win/winlink.cpp +++ b/zsnes/src/win/winlink.cpp @@ -318,7 +318,6 @@ void DosExit(void); extern BYTE GUIOn2; extern BYTE StereoSound; extern DWORD SoundQuality; -extern BYTE LargeSoundBuf; extern BYTE ExclusiveSound; extern BYTE HighPriority; extern BYTE AlwaysOnTop; @@ -785,11 +784,6 @@ ReInitSound() SoundBufferSize=1024*2; } - if (LargeSoundBuf == 1) - { - SoundBufferSize*=2; - } - if (StereoSound==1) { wfx.nChannels = 2;