Post subject: [PATCH] snes9x-sound channels disabling - nitsuja work ...
Joined: 12/17/2004
Posts: 99
Location: Karlsruhe, Germany
Hi, here is a quick hack for snes9x, which disables sound channels 1-5 ...
--- soundux.cpp.old     2004-07-11 23:51:00.000000000 +0200
+++ soundux.cpp 2006-04-26 00:41:55.000000000 +0200
@@ -153,6 +153,8 @@
 #define VOL_DIV16 0x0080
 #define ENVX_SHIFT 24

+static bool enabled_channels[NUM_CHANNELS];
+
 extern "C" void DecodeBlockAsm (int8 *, int16 *, int32 *, int32 *);
 extern "C" void DecodeBlockAsm2 (int8 *, int16 *, int32 *, int32 *);

@@ -1140,9 +1142,12 @@

                if (pitch_mod & (1 << (J + 1)))
                        wave [I / 2] = ch->sample * ch->envx;
-
-               MixBuffer [I      ^ Settings.ReverseStereo] += VL;
-               MixBuffer [I + (1 ^ Settings.ReverseStereo)] += VR;
+
+               if (enabled_channels[J])
+               {
+                       MixBuffer [I      ^ Settings.ReverseStereo] += VL;
+                       MixBuffer [I + (1 ^ Settings.ReverseStereo)] += VR;
+               }
                ch->echo_buf_ptr [I      ^ Settings.ReverseStereo] += VL;
                ch->echo_buf_ptr [I + (1 ^ Settings.ReverseStereo)] += VR;
         }
@@ -1425,7 +1430,8 @@
                        }
                }

-               MixBuffer [I] += V;
+               if (enabled_channels[J])
+                       MixBuffer [I] += V;
                ch->echo_buf_ptr [I] += V;

                if (pitch_mod & (1 << (J + 1)))
@@ -1856,6 +1862,11 @@
     so.stereo = stereo;
     so.sixteen_bit = Settings.SixteenBitSound;
     so.encoded = FALSE;
+    for (uint32 J = 0; J < NUM_CHANNELS; J++)
+       enabled_channels[J]=1;
+    // HACK
+    for (uint32 J = 0; J <= 4; J++)
+       enabled_channels[J]=0;

     S9xResetSound (TRUE);
I'm sure nitsuja can code a beautiful GUI for that ... But here is the general idea ... cu Fabian
Player (209)
Joined: 2/18/2005
Posts: 1451
Thanks for the code fabian. I would like to suggest to add a system where the user can decide himself which channels to enable and which to disable just like in ZSNES (its's more user-friendly and handy this way). It would require 8 more hotkeys but with the combination of the shift button for example it surely would be possible to find some room there. It seem to be one of the last major features Snes9x is missing for now.
See my perfect 100% movie-walkthroughs of the best RPG games on http://www.freewebs.com/saturnsmovies/index.htm Current TAS project (with new videos): Super Metroid Redesign, any% speedrun
Post subject: Re: [PATCH] snes9x-sound channels disabling - nitsuja work .
Editor, Active player (296)
Joined: 3/8/2004
Posts: 7469
Location: Arzareth
Fabianx wrote:
Hi, here is a quick hack for snes9x, which disables sound channels 1-5 ...
You should know that snes9x already has a mechanism of enabling/disabling individual sound channels. Have a look at S9xToggleSoundChannel() in unix/unix.cpp. After that, have a look at S9xSetSoundControl() in soundux.cpp. (The X11 and MS-DOS interfaces of snes9x have had this function for around 10 years I guess.)
Player (209)
Joined: 2/18/2005
Posts: 1451
Bisqwit wrote:
You should know that snes9x already has a mechanism of enabling/disabling individual sound channels.
This is twice good news. Then the only thing left is to just add hotkeys or menu-options to be able to switch the channels directly in Snes9x when running because not everybody who don't have programming knowledge would understand how to do otherwise.
See my perfect 100% movie-walkthroughs of the best RPG games on http://www.freewebs.com/saturnsmovies/index.htm Current TAS project (with new videos): Super Metroid Redesign, any% speedrun
JXQ
Experienced player (750)
Joined: 5/6/2005
Posts: 3132
I've tried to put this sound-toggle option into 1.43 for a while with no success. I'd go into detail but it'd just be a whinefest. The only important part is that I have utterly failed at getting a working compiler on my system. This feature in particular would allow me to make cool AVIs for existing Super Metroid runs, removing inactive scenes, but keeping the music and sound effects in sync. Fabianx's patch does work here, but the problem is that the game doesn't always use the first five channels exclusively for music, nor the last three for sound effects. It doesn't have to be pretty, or customizable, or user friendly, or efficient, or well-written - it just has to stay in sync with the current version. If someone could code and compile toggles for all the sound channels, I'd be in their debt.
<Swordless> Go hug a tree, you vegetarian (I bet you really are one)
Emulator Coder, Skilled player (1301)
Joined: 12/21/2004
Posts: 2687
Yeah, I've been meaning to do this sort of thing for a while, but you probably know by now I never get anything done.
Player (209)
Joined: 2/18/2005
Posts: 1451
That would be so great. You are probably the only experienced enough person to do stuff like that in a pretty short time, nitsuja, so I hope you will find some interest and little time to get it done someday.
See my perfect 100% movie-walkthroughs of the best RPG games on http://www.freewebs.com/saturnsmovies/index.htm Current TAS project (with new videos): Super Metroid Redesign, any% speedrun
JXQ
Experienced player (750)
Joined: 5/6/2005
Posts: 3132
I realize that dev on a deprecated version of software isn't exactly the best way to go, so I'm not surprised there is very little motivation for this request to be fulfilled. SO, I'm now willing to compensate the person who takes the time to do this change. Please send me a PM if that is something that you are interested in, and we can discuss it further.
<Swordless> Go hug a tree, you vegetarian (I bet you really are one)
upthorn
He/Him
Emulator Coder, Active player (388)
Joined: 3/24/2006
Posts: 1802
I have got this done. Here is the source diff
diff -rdu c:\Share\old\snes9xw-improvement9-src/resource.h c:\Share\snes9xw-improvement9-src\snes9xw-improvement9-src/resource.h
--- c:\Share\old\snes9xw-improvement9-src/resource.h	2006-02-12 01:10:00.000000000 -0800
+++ c:\Share\snes9xw-improvement9-src\snes9xw-improvement9-src/resource.h	2007-07-13 15:33:37.859375000 -0700
@@ -483,7 +483,14 @@
 #define ID_TURBO_UP                     40125
 #define ID_TURBO_RIGHT                  40126
 #define ID_TURBO_DOWN                   40127
-
+#define ID_SOUND_TOGGLECHANNEL0			40200
+#define ID_SOUND_TOGGLECHANNEL1			40201
+#define ID_SOUND_TOGGLECHANNEL2			40202
+#define ID_SOUND_TOGGLECHANNEL3			40203
+#define ID_SOUND_TOGGLECHANNEL4			40204
+#define ID_SOUND_TOGGLECHANNEL5			40205
+#define ID_SOUND_TOGGLECHANNEL6			40206
+#define ID_SOUND_TOGGLECHANNEL7			40207
 // Next default values for new objects
 // 
 #ifdef APSTUDIO_INVOKED
diff -rdu c:\Share\old\snes9xw-improvement9-src/snes9x/gfx.cpp c:\Share\snes9xw-improvement9-src\snes9xw-improvement9-src/snes9x/gfx.cpp
--- c:\Share\old\snes9xw-improvement9-src/snes9x/gfx.cpp	2006-02-12 14:52:04.000000000 -0800
+++ c:\Share\snes9xw-improvement9-src\snes9xw-improvement9-src/snes9x/gfx.cpp	2007-03-08 10:10:49.093000000 -0800
@@ -3608,7 +3608,7 @@
 			{
 				int j = KeyOrder[i];
 				int mask = (1 << (j+1));
-				string[strlen("P?: ")+i]= ((IPPU.Joypads[J] & mask)!=0 || (IPPU.Joypads[J+5] & mask)!=0) ? KeyMap[j] : ' ';
+				string[strlen("P?: ")+i]= ((IPPU.Joypads[J] & mask)!=0) ? KeyMap[j] : ' '; // fix the input display for p4 and p5
 			}
 		    
 			len=strlen(string);
diff -rdu c:\Share\old\snes9xw-improvement9-src/snes9x/globals.cpp c:\Share\snes9xw-improvement9-src\snes9xw-improvement9-src/snes9x/globals.cpp
--- c:\Share\old\snes9xw-improvement9-src/snes9x/globals.cpp	2004-07-11 21:50:58.000000000 -0700
+++ c:\Share\snes9xw-improvement9-src\snes9xw-improvement9-src/snes9x/globals.cpp	2007-07-14 02:51:36.468750000 -0700
@@ -130,6 +130,7 @@
 struct SSA1 SA1;
 
 SSoundData SoundData;
+bool8 ChannelEnabled[NUM_CHANNELS] = {1,1,1,1,1,1,1,1};
 
 SnesModel M1SNES={1,3,2};
 SnesModel M2SNES={2,4,3};
diff -rdu c:\Share\old\snes9xw-improvement9-src/snes9x/snapshot.cpp c:\Share\snes9xw-improvement9-src\snes9xw-improvement9-src/snes9x/snapshot.cpp
diff -rdu c:\Share\old\snes9xw-improvement9-src/snes9x/soundux.cpp c:\Share\snes9xw-improvement9-src\snes9xw-improvement9-src/snes9x/soundux.cpp
--- c:\Share\old\snes9xw-improvement9-src/snes9x/soundux.cpp	2005-03-09 23:43:54.000000000 -0800
+++ c:\Share\snes9xw-improvement9-src\snes9xw-improvement9-src/snes9x/soundux.cpp	2007-07-14 03:00:49.281250000 -0700
@@ -1149,11 +1149,15 @@
 		
 		if (pitch_mod & (1 << (J + 1)))
 			wave [I / 2] = ch->sample * ch->envx;
-		
-		MixBuffer [I      ^ Settings.ReverseStereo] += VL;
-		MixBuffer [I + (1 ^ Settings.ReverseStereo)] += VR;
-		ch->echo_buf_ptr [I      ^ Settings.ReverseStereo] += VL;
-		ch->echo_buf_ptr [I + (1 ^ Settings.ReverseStereo)] += VR;
+
+		if (ChannelEnabled[J])
+		{
+			MixBuffer [I      ^ Settings.ReverseStereo] += VL;
+			MixBuffer [I + (1 ^ Settings.ReverseStereo)] += VR;
+
+			ch->echo_buf_ptr [I      ^ Settings.ReverseStereo] += VL;
+			ch->echo_buf_ptr [I + (1 ^ Settings.ReverseStereo)] += VR;
+		}
         }
 stereo_exit: ;
     }
@@ -1437,8 +1441,11 @@
 			}
 		}
 		
-		MixBuffer [I] += V;
-		ch->echo_buf_ptr [I] += V;
+		if (ChannelEnabled[J])
+		{
+			MixBuffer [I] += V;
+			ch->echo_buf_ptr [I] += V;
+		}
 		
 		if (pitch_mod & (1 << (J + 1)))
 			wave [I] = ch->sample * ch->envx;
diff -rdu c:\Share\old\snes9xw-improvement9-src/snes9x/soundux.h c:\Share\snes9xw-improvement9-src\snes9xw-improvement9-src/snes9x/soundux.h
--- c:\Share\old\snes9xw-improvement9-src/snes9x/soundux.h	2004-07-11 21:51:00.000000000 -0700
+++ c:\Share\snes9xw-improvement9-src\snes9xw-improvement9-src/snes9x/soundux.h	2007-07-14 02:51:36.531250000 -0700
@@ -181,6 +181,7 @@
     uint32 dummy [8];
 //	unsigned short last_valid_header;
 } Channel;
+extern bool8 ChannelEnabled[NUM_CHANNELS];
 
 typedef struct
 {
diff -rdu c:\Share\old\snes9xw-improvement9-src/snes9x.rc c:\Share\snes9xw-improvement9-src\snes9xw-improvement9-src/snes9x.rc
--- c:\Share\old\snes9xw-improvement9-src/snes9x.rc	2006-02-12 01:09:58.000000000 -0800
+++ c:\Share\snes9xw-improvement9-src\snes9xw-improvement9-src/snes9x.rc	2007-07-13 15:47:02.234375000 -0700
@@ -1436,6 +1436,17 @@
             MENUITEM "&320ms",                      ID_SOUND_1S, GRAYED
             MENUITEM "64&0ms",                      ID_SOUND_2S, GRAYED
         END
+        POPUP "&Channels"
+        BEGIN
+            MENUITEM "Channel &0",					ID_SOUND_TOGGLECHANNEL0, CHECKED
+            MENUITEM "Channel &1",					ID_SOUND_TOGGLECHANNEL1, CHECKED
+            MENUITEM "Channel &2",					ID_SOUND_TOGGLECHANNEL2, CHECKED
+            MENUITEM "Channel &3",					ID_SOUND_TOGGLECHANNEL3, CHECKED
+            MENUITEM "Channel &4",					ID_SOUND_TOGGLECHANNEL4, CHECKED
+            MENUITEM "Channel &5",					ID_SOUND_TOGGLECHANNEL5, CHECKED
+            MENUITEM "Channel &6",					ID_SOUND_TOGGLECHANNEL6, CHECKED
+			MENUITEM "Channel &7",					ID_SOUND_TOGGLECHANNEL7, CHECKED
+        END
         MENUITEM "&16-Bit Sound",               ID_SOUND_16BIT
         MENUITEM "&Stereo",                     ID_SOUND_STEREO
         MENUITEM "&Reverse Stereo\tAlt+R",      ID_SOUND_REVERSE_STEREO
diff -rdu c:\Share\old\snes9xw-improvement9-src/wsnes9x.cpp c:\Share\snes9xw-improvement9-src\snes9xw-improvement9-src/wsnes9x.cpp
--- c:\Share\old\snes9xw-improvement9-src/wsnes9x.cpp	2006-02-12 16:30:28.000000000 -0800
+++ c:\Share\snes9xw-improvement9-src\snes9xw-improvement9-src/wsnes9x.cpp	2007-07-14 03:02:32.265625000 -0700
@@ -113,6 +113,7 @@
 #include "snes9x/movie.h"
 #include "AVIOutput.h"
 #include "InputCustom.h"
+#include "snes9x/soundux.h"
 #include <vector>
 
 #include <TCHAR.H>
@@ -473,6 +474,14 @@
 	 {0,0}, // Select save slot 7
 	 {0,0}, // Select save slot 8
 	 {0,0}}, // Select save slot 9
+	{{0,0}, // Toggle sound channel 0
+	 {0,0}, // Toggle sound channel 1
+	 {0,0}, // Toggle sound channel 2
+	 {0,0}, // Toggle sound channel 3
+	 {0,0}, // Toggle sound channel 4
+	 {0,0}, // Toggle sound channel 5
+	 {0,0}, // Toggle sound channel 6
+	{0,0}}, // Toggle sound channel 7
 };
 
 
@@ -1241,6 +1250,20 @@
 						hitHotKey = true;
 					}
 				}
+				for(int i = 0 ; i < 8 ; i++)
+				{
+					if(wParam == CustomKeys.ToggleSound[i].key && modifiers == CustomKeys.ToggleSound[i].modifiers)
+					{
+						ChannelEnabled[i] =! ChannelEnabled[i];
+
+						static char str [64];
+						sprintf(str, "Sound Channel %d %sabled", i, (ChannelEnabled[i])?"en":"dis");
+						CheckMenuItem(GUI.hMenu, ID_SOUND_TOGGLECHANNEL0 + i, (ChannelEnabled[i])?MFS_CHECKED:MFS_UNCHECKED);
+//						S9xSetInfoString(str);
+
+						hitHotKey = true;
+					}
+				}
 
 				if(wParam == CustomKeys.Transparency.key
 				&& modifiers == CustomKeys.Transparency.modifiers)
@@ -1803,7 +1826,21 @@
             SetupSound (Settings.SoundPlaybackRate, 
 				Settings.SixteenBitSound, Settings.Stereo);
             break;
-			
+		case ID_SOUND_TOGGLECHANNEL0:
+		case ID_SOUND_TOGGLECHANNEL1:
+		case ID_SOUND_TOGGLECHANNEL2:
+		case ID_SOUND_TOGGLECHANNEL3:
+		case ID_SOUND_TOGGLECHANNEL4:
+		case ID_SOUND_TOGGLECHANNEL5:
+		case ID_SOUND_TOGGLECHANNEL6:
+		case ID_SOUND_TOGGLECHANNEL7:
+			ChannelEnabled[wParam - ID_SOUND_TOGGLECHANNEL0] = !ChannelEnabled[wParam - ID_SOUND_TOGGLECHANNEL0];
+			static char str [64];
+			sprintf(str, "Sound Channel %d %sabled", wParam - ID_SOUND_TOGGLECHANNEL0, ((ChannelEnabled[wParam - ID_SOUND_TOGGLECHANNEL0])?"en":"dis"));
+			CheckMenuItem(GUI.hMenu, wParam, (ChannelEnabled[wParam - ID_SOUND_TOGGLECHANNEL0])?MFS_CHECKED:MFS_UNCHECKED);
+//			S9xSetInfoString(str);
+			break;
+
         case ID_SOUND_STEREO:
             Settings.Stereo = !Settings.Stereo;
             SetupSound (Settings.SoundPlaybackRate, 
@@ -8477,6 +8514,10 @@
 		for(int i = 0 ; i < 10 ; i++)
 			SendDlgItemMessage(hDlg,IDC_HOTKEY1+i,WM_USER+44,CustomKeys.SelectSave[i].key,CustomKeys.SelectSave[i].modifiers);
 		break;
+	case 4:
+		for(int i = 0 ; i < 8 ; i++)
+			SendDlgItemMessage(hDlg,IDC_HOTKEY1+i,WM_USER+44,CustomKeys.ToggleSound[i].key,CustomKeys.ToggleSound[i].modifiers);
+		break;
 	}
 
 	SendDlgItemMessage(hDlg,IDC_SLOTPLUS,WM_USER+44,CustomKeys.SlotPlus.key,CustomKeys.SlotPlus.modifiers);
@@ -8548,6 +8589,17 @@
 			SetDlgItemText(hDlg,IDC_LABEL_HK1+i,INPUTCONFIG_LABEL_UNUSED);
 		
 		break;
+	case 4:
+		for(int i = 0 ; i < 8 ; i++)
+		{
+			char temp [128];
+			sprintf(temp, "Toggle Sound %d", i);
+			SetDlgItemText(hDlg,IDC_LABEL_HK1+i,temp);
+		}
+		for(int i = 8 ; i < 13 ; i++)
+			SetDlgItemText(hDlg,IDC_LABEL_HK1+i,INPUTCONFIG_LABEL_UNUSED);
+		
+		break;
 	}
 }
 
@@ -8577,7 +8629,7 @@
 		SetWindowText(hDlg,HOTKEYS_TITLE);
 
 		// insert hotkey page list items
-		for(i=1 ; i <= 4 ; i++)
+		for(i=1 ; i <= 5 ; i++)
 		{
 			char temp[256];
 			sprintf(temp,HOTKEYS_HKCOMBO,i);
@@ -8633,48 +8685,56 @@
 			if(index == 1) CustomKeys.BGL1.key = wParam,    CustomKeys.BGL1.modifiers = modifiers;
 			if(index == 2) CustomKeys.TurboA.key = wParam,    CustomKeys.TurboA.modifiers = modifiers;
 			if(index == 3) CustomKeys.SelectSave[0].key = wParam,	CustomKeys.SelectSave[0].modifiers = modifiers;	
+			if(index == 4) CustomKeys.ToggleSound[0].key = wParam,	CustomKeys.ToggleSound[0].modifiers = modifiers;	
 			break;
 		case IDC_HOTKEY2:
 			if(index == 0) CustomKeys.SpeedDown.key = wParam, CustomKeys.SpeedDown.modifiers = modifiers;
 			if(index == 1) CustomKeys.BGL2.key = wParam,      CustomKeys.BGL2.modifiers = modifiers;
 			if(index == 2) CustomKeys.TurboB.key = wParam,    CustomKeys.TurboB.modifiers = modifiers;
 			if(index == 3) CustomKeys.SelectSave[1].key = wParam,	CustomKeys.SelectSave[1].modifiers = modifiers;	
+			if(index == 4) CustomKeys.ToggleSound[1].key = wParam,	CustomKeys.ToggleSound[1].modifiers = modifiers;
 			break;
 		case IDC_HOTKEY3:
 			if(index == 0) CustomKeys.Pause.key = wParam, CustomKeys.Pause.modifiers = modifiers;
 			if(index == 1) CustomKeys.BGL3.key = wParam,  CustomKeys.BGL3.modifiers = modifiers;
 			if(index == 2) CustomKeys.TurboY.key = wParam,    CustomKeys.TurboY.modifiers = modifiers;
 			if(index == 3) CustomKeys.SelectSave[2].key = wParam,	CustomKeys.SelectSave[2].modifiers = modifiers;	
+			if(index == 4) CustomKeys.ToggleSound[2].key = wParam,	CustomKeys.ToggleSound[2].modifiers = modifiers;	
 			break;
 		case IDC_HOTKEY4:
 			if(index == 0) CustomKeys.FrameAdvance.key = wParam, CustomKeys.FrameAdvance.modifiers = modifiers;
 			if(index == 1) CustomKeys.BGL4.key = wParam,         CustomKeys.BGL4.modifiers = modifiers;
 			if(index == 2) CustomKeys.TurboX.key = wParam,    CustomKeys.TurboX.modifiers = modifiers;
 			if(index == 3) CustomKeys.SelectSave[3].key = wParam,	CustomKeys.SelectSave[3].modifiers = modifiers;	
+			if(index == 4) CustomKeys.ToggleSound[3].key = wParam,	CustomKeys.ToggleSound[3].modifiers = modifiers;	
 			break;
 		case IDC_HOTKEY5:
 			if(index == 0) CustomKeys.FastForward.key = wParam, CustomKeys.FastForward.modifiers = modifiers;
 			if(index == 1) CustomKeys.BGL5.key = wParam,        CustomKeys.BGL5.modifiers = modifiers;
 			if(index == 2) CustomKeys.TurboL.key = wParam,    CustomKeys.TurboL.modifiers = modifiers;
 			if(index == 3) CustomKeys.SelectSave[4].key = wParam,	CustomKeys.SelectSave[4].modifiers = modifiers;	
+			if(index == 4) CustomKeys.ToggleSound[4].key = wParam,	CustomKeys.ToggleSound[4].modifiers = modifiers;	
 			break;
 		case IDC_HOTKEY6:
 			if(index == 0) CustomKeys.SkipUp.key = wParam,          CustomKeys.SkipUp.modifiers = modifiers;
 			if(index == 1) CustomKeys.ClippingWindows.key = wParam, CustomKeys.ClippingWindows.modifiers = modifiers;
 			if(index == 2) CustomKeys.TurboR.key = wParam,    CustomKeys.TurboR.modifiers = modifiers;
-			if(index == 3) CustomKeys.SelectSave[5].key = wParam,	CustomKeys.SelectSave[5].modifiers = modifiers;	
+			if(index == 3) CustomKeys.SelectSave[5].key = wParam,	CustomKeys.SelectSave[5].modifiers = modifiers;
+			if(index == 4) CustomKeys.ToggleSound[5].key = wParam,	CustomKeys.ToggleSound[5].modifiers = modifiers;	
 			break;
 		case IDC_HOTKEY7:
 			if(index == 0) CustomKeys.SkipDown.key = wParam, CustomKeys.SkipDown.modifiers = modifiers;
 			if(index == 1) CustomKeys.BGLHack.key = wParam,  CustomKeys.BGLHack.modifiers = modifiers;
 			if(index == 2) CustomKeys.TurboStart.key = wParam,    CustomKeys.TurboStart.modifiers = modifiers;
 			if(index == 3) CustomKeys.SelectSave[6].key = wParam,	CustomKeys.SelectSave[6].modifiers = modifiers;	
+			if(index == 4) CustomKeys.ToggleSound[6].key = wParam,	CustomKeys.ToggleSound[6].modifiers = modifiers;	
 			break;
 		case IDC_HOTKEY8:
 			if(index == 0) CustomKeys.ScopeTurbo.key = wParam,  CustomKeys.ScopeTurbo.modifiers = modifiers;
 			if(index == 1) CustomKeys.Transparency.key = wParam, CustomKeys.Transparency.modifiers = modifiers;
 			if(index == 2) CustomKeys.TurboSelect.key = wParam,    CustomKeys.TurboSelect.modifiers = modifiers;
 			if(index == 3) CustomKeys.SelectSave[7].key = wParam,	CustomKeys.SelectSave[7].modifiers = modifiers;	
+			if(index == 4) CustomKeys.ToggleSound[7].key = wParam,	CustomKeys.ToggleSound[7].modifiers = modifiers;	
 			break;		
 		case IDC_HOTKEY9:
 			if(index == 0) CustomKeys.ScopePause.key = wParam, CustomKeys.ScopePause.modifiers = modifiers;
diff -rdu c:\Share\old\snes9xw-improvement9-src/wsnes9x.h c:\Share\snes9xw-improvement9-src\snes9xw-improvement9-src/wsnes9x.h
--- c:\Share\old\snes9xw-improvement9-src/wsnes9x.h	2006-02-12 00:39:10.000000000 -0800
+++ c:\Share\snes9xw-improvement9-src\snes9xw-improvement9-src/wsnes9x.h	2007-07-13 15:08:14.734375000 -0700
@@ -270,6 +270,7 @@
 	SCustomKey SwitchControllers;
 	SCustomKey TurboA, TurboB, TurboY, TurboX, TurboL, TurboR, TurboStart, TurboSelect, TurboLeft, TurboUp, TurboRight, TurboDown;
 	SCustomKey SelectSave [10];
+	SCustomKey ToggleSound [8];
 };
 
 struct SJoypad {
And a link to the executables http://jxq.skuzz.com/tas/snes9x-soundmod.zip
How fleeting are all human passions compared with the massive continuity of ducks.
Player (209)
Joined: 2/18/2005
Posts: 1451
Upthorn, you are the hero of this day! Thank you very very much for doing such a valuable and exceptional work, man! This is definitely one of the finest things that could happen to the fans of the classic Snes9x v1.43 in a long time. :-) Also thank you very much JXQ, for bringing this up again and motivating upthorn to do this. Such truly helpful contributions really don't happen that often in this days. You guys rock!
See my perfect 100% movie-walkthroughs of the best RPG games on http://www.freewebs.com/saturnsmovies/index.htm Current TAS project (with new videos): Super Metroid Redesign, any% speedrun
JXQ
Experienced player (750)
Joined: 5/6/2005
Posts: 3132
Thanks very much Upthorn. Now I can continue this video and show everyone why I'm excited about this feature :)
<Swordless> Go hug a tree, you vegetarian (I bet you really are one)
P.JBoy
Any
Editor
Joined: 3/25/2006
Posts: 850
Location: stuck in Pandora's box HELLPP!!!
Apparently this screws up the memory watch by adding 00 at the start and cropping the last to digits. eg. 7E6C54 becomes 007E6C
Post subject: Re: [PATCH] snes9x-sound channels disabling - nitsuja work .
Joined: 12/17/2004
Posts: 99
Location: Karlsruhe, Germany
Bisqwit wrote:
Fabianx wrote:
Hi, here is a quick hack for snes9x, which disables sound channels 1-5 ...
You should know that snes9x already has a mechanism of enabling/disabling individual sound channels. Have a look at <code>S9xToggleSoundChannel()</code> in unix/unix.cpp. After that, have a look at <code>S9xSetSoundControl()</code> in soundux.cpp. (The X11 and MS-DOS interfaces of snes9x have had this function for around 10 years I guess.)
Ha ha, now that I've come across this patch again I can finally counter this argument. ;-) Nope, S9xToggleSoundChannel could lead to desync in Movies as the APU is not called for processing these toggled channels. The way Upthorn (and I) did it, we do only skip the Mix stage so its correct to add this new option. Toggle = On / Off, our option is more like "Silence" / "Unsilence" a channel. Anyway I am glad this patch was finally implemented :-) and I am really looking forward to what wonders JXQ will now go again. Take care, cu Fabian PS: @P.JBoy: Yes, it probably does as a new variable is added to the global memory region the memwatch needs to be adjusted for those 2 bytes. Just ask the author to add a "offset" option for custom builds that is added ...
Skilled player (1432)
Joined: 7/15/2007
Posts: 1468
Location: Sweden
Does any one have the possibility to give me a link to the soundmod snes9x upthorn made? His link does not work anymore and I would very much like to have it.
Agare Bagare Kopparslagare
P.JBoy
Any
Editor
Joined: 3/25/2006
Posts: 850
Location: stuck in Pandora's box HELLPP!!!
Skilled player (1432)
Joined: 7/15/2007
Posts: 1468
Location: Sweden
Thanks.
Agare Bagare Kopparslagare
Joined: 1/22/2008
Posts: 319
Location: Brasil
can i have the link working again ? i cant get it from megaupload
Run..Run...Run.....
upthorn
He/Him
Emulator Coder, Active player (388)
Joined: 3/24/2006
Posts: 1802
Snes9x improvement 11 includes this, and does not have any downsides (unlike Snes9x 1.51 which breaks emulation sync). I would strongly recommend that version over this one.
How fleeting are all human passions compared with the massive continuity of ducks.