├── .gitignore
├── README.md
├── Resources
└── AppIcon.ico
├── Properties
├── Settings.settings
├── Settings.Designer.cs
├── AssemblyInfo.cs
├── Resources.Designer.cs
└── Resources.resx
├── app.config
├── Forms
├── Entities
│ ├── GsDlls.cs
│ ├── GsDumpFile.cs
│ ├── GsDumps.cs
│ ├── GsFile.cs
│ └── GsFiles.cs
├── Helper
│ ├── ILogger.cs
│ ├── IFolderWithFallBackFinder.cs
│ ├── IGsDumpFinder.cs
│ ├── IGsdxDllFinder.cs
│ ├── FolderWithFallBackFinder.cs
│ ├── GsdxDllFinder.cs
│ ├── RichTextBoxLogger.cs
│ ├── ExtensionMethods.cs
│ └── GsDumpFinder.cs
└── SettingsProvider
│ └── PortableXmlSettingsProvider.cs
├── Library
├── GSDump
│ ├── GSData
│ │ ├── GIFPacket
│ │ │ ├── GIFReg
│ │ │ │ ├── IGifData.cs
│ │ │ │ ├── GifImage.cs
│ │ │ │ ├── GIFRegAD.cs
│ │ │ │ ├── GIFRegUnimpl.cs
│ │ │ │ ├── GIFRegNOP.cs
│ │ │ │ ├── GIFRegFOG.cs
│ │ │ │ ├── GIFRegUV.cs
│ │ │ │ ├── GIFRegST.cs
│ │ │ │ ├── GIFRegRGBAQ.cs
│ │ │ │ ├── GIFRegPrim.cs
│ │ │ │ ├── GIFReg.cs
│ │ │ │ ├── GIFRegXYZF.cs
│ │ │ │ └── GIFRegTEX0.cs
│ │ │ ├── GIFPrim.cs
│ │ │ └── GIFTag.cs
│ │ ├── GIFUtil.cs
│ │ ├── GSData.cs
│ │ └── GSTransfer.cs
│ └── GSDump.cs
├── TCPLibrary
│ ├── Base
│ │ ├── Data.cs
│ │ ├── CancelArgs.cs
│ │ ├── ClientS.cs
│ │ ├── Client.cs
│ │ └── Server.cs
│ └── Message
│ │ ├── BaseMessageClientS.cs
│ │ ├── TCPMessage.cs
│ │ ├── BaseMessageClient.cs
│ │ └── BaseMessageServer.cs
├── NativeMethods.cs
└── GSDXWrapper.cs
├── GSDumpGUI.sln
└── GSDumpGUI.csproj
/.gitignore:
--------------------------------------------------------------------------------
1 | /bin
2 | /obj
3 | .vs
4 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # GSDumpGUI
2 | A tool used for GSdx debugging.
3 |
--------------------------------------------------------------------------------
/Resources/AppIcon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PCSX2/GSDumpGUI/HEAD/Resources/AppIcon.ico
--------------------------------------------------------------------------------
/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/app.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/Forms/Entities/GsDlls.cs:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2009-2019 PCSX2 Dev Team
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy
5 | * of this software and associated documentation files (the "Software"), to deal
6 | * in the Software without restriction, including without limitation the rights
7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | * copies of the Software, and to permit persons to whom the Software is
9 | * furnished to do so, subject to the following conditions:
10 | *
11 | * The above copyright notice and this permission notice shall be included in
12 | * all copies or substantial portions of the Software.
13 | *
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20 | * THE SOFTWARE.
21 | */
22 |
23 | namespace GSDumpGUI.Forms.Entities
24 | {
25 | public sealed class GsDlls : GsFiles { }
26 | }
--------------------------------------------------------------------------------
/Forms/Entities/GsDumpFile.cs:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2009-2019 PCSX2 Dev Team
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy
5 | * of this software and associated documentation files (the "Software"), to deal
6 | * in the Software without restriction, including without limitation the rights
7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | * copies of the Software, and to permit persons to whom the Software is
9 | * furnished to do so, subject to the following conditions:
10 | *
11 | * The above copyright notice and this permission notice shall be included in
12 | * all copies or substantial portions of the Software.
13 | *
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20 | * THE SOFTWARE.
21 | */
22 |
23 | using System.IO;
24 |
25 | namespace GSDumpGUI.Forms.Entities
26 | {
27 | public sealed class GsDumpFile : GsFile
28 | {
29 | public FileInfo PreviewFile { get; set; }
30 | }
31 | }
--------------------------------------------------------------------------------
/Forms/Entities/GsDumps.cs:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2009-2019 PCSX2 Dev Team
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy
5 | * of this software and associated documentation files (the "Software"), to deal
6 | * in the Software without restriction, including without limitation the rights
7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | * copies of the Software, and to permit persons to whom the Software is
9 | * furnished to do so, subject to the following conditions:
10 | *
11 | * The above copyright notice and this permission notice shall be included in
12 | * all copies or substantial portions of the Software.
13 | *
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20 | * THE SOFTWARE.
21 | */
22 |
23 | using System.IO;
24 |
25 | namespace GSDumpGUI.Forms.Entities
26 | {
27 | public sealed class GsDumps : GsFiles
28 | {
29 | private FileInfo GsDumpPreviewFile { get; set; }
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/Forms/Entities/GsFile.cs:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2009-2019 PCSX2 Dev Team
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy
5 | * of this software and associated documentation files (the "Software"), to deal
6 | * in the Software without restriction, including without limitation the rights
7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | * copies of the Software, and to permit persons to whom the Software is
9 | * furnished to do so, subject to the following conditions:
10 | *
11 | * The above copyright notice and this permission notice shall be included in
12 | * all copies or substantial portions of the Software.
13 | *
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20 | * THE SOFTWARE.
21 | */
22 |
23 | using System.IO;
24 |
25 | namespace GSDumpGUI.Forms.Entities
26 | {
27 | public class GsFile
28 | {
29 | public FileInfo File { get; set; }
30 | public string DisplayText { get; set; }
31 | }
32 | }
--------------------------------------------------------------------------------
/Forms/Helper/ILogger.cs:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2009-2019 PCSX2 Dev Team
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy
5 | * of this software and associated documentation files (the "Software"), to deal
6 | * in the Software without restriction, including without limitation the rights
7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | * copies of the Software, and to permit persons to whom the Software is
9 | * furnished to do so, subject to the following conditions:
10 | *
11 | * The above copyright notice and this permission notice shall be included in
12 | * all copies or substantial portions of the Software.
13 | *
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20 | * THE SOFTWARE.
21 | */
22 |
23 | namespace GSDumpGUI.Forms.Helper
24 | {
25 | public interface ILogger
26 | {
27 | void Information(string line = null);
28 | void Warning(string line = null);
29 | void Error(string line = null);
30 | }
31 | }
--------------------------------------------------------------------------------
/Forms/Helper/IFolderWithFallBackFinder.cs:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2009-2019 PCSX2 Dev Team
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy
5 | * of this software and associated documentation files (the "Software"), to deal
6 | * in the Software without restriction, including without limitation the rights
7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | * copies of the Software, and to permit persons to whom the Software is
9 | * furnished to do so, subject to the following conditions:
10 | *
11 | * The above copyright notice and this permission notice shall be included in
12 | * all copies or substantial portions of the Software.
13 | *
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20 | * THE SOFTWARE.
21 | */
22 |
23 | using System.IO;
24 |
25 | namespace GSDumpGUI.Forms.Helper
26 | {
27 | public interface IFolderWithFallBackFinder
28 | {
29 | DirectoryInfo GetViaPatternWithFallback(string defaultDir, string filePattern, params string[] fallBackFolder);
30 | }
31 | }
--------------------------------------------------------------------------------
/Library/GSDump/GSData/GIFPacket/GIFReg/IGifData.cs:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2009-2011 Ferreri Alessio
3 | * Copyright (C) 2009-2018 PCSX2 Dev Team
4 | *
5 | * Permission is hereby granted, free of charge, to any person obtaining a copy
6 | * of this software and associated documentation files (the "Software"), to deal
7 | * in the Software without restriction, including without limitation the rights
8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | * copies of the Software, and to permit persons to whom the Software is
10 | * furnished to do so, subject to the following conditions:
11 | *
12 | * The above copyright notice and this permission notice shall be included in
13 | * all copies or substantial portions of the Software.
14 | *
15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | * THE SOFTWARE.
22 | */
23 |
24 | using System;
25 | using System.Collections.Generic;
26 | using System.Text;
27 |
28 | namespace GSDumpGUI
29 | {
30 | public interface IGifData
31 | {
32 | String ToString();
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/Forms/Helper/IGsDumpFinder.cs:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2009-2019 PCSX2 Dev Team
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy
5 | * of this software and associated documentation files (the "Software"), to deal
6 | * in the Software without restriction, including without limitation the rights
7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | * copies of the Software, and to permit persons to whom the Software is
9 | * furnished to do so, subject to the following conditions:
10 | *
11 | * The above copyright notice and this permission notice shall be included in
12 | * all copies or substantial portions of the Software.
13 | *
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20 | * THE SOFTWARE.
21 | */
22 |
23 | using System.Collections.Generic;
24 | using System.IO;
25 | using GSDumpGUI.Forms.Entities;
26 |
27 | namespace GSDumpGUI.Forms.Helper
28 | {
29 | public interface IGsDumpFinder
30 | {
31 | IEnumerable GetValidGsdxDumps(DirectoryInfo directory);
32 | }
33 | }
--------------------------------------------------------------------------------
/GSDumpGUI.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio Version 16
4 | VisualStudioVersion = 16.0.28803.352
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GSDumpGUI", "GSDumpGUI.csproj", "{825E4311-652D-4A1E-8AA1-F6D81B186E33}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|x64 = Debug|x64
11 | Debug|x86 = Debug|x86
12 | Release|x64 = Release|x64
13 | Release|x86 = Release|x86
14 | EndGlobalSection
15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
16 | {825E4311-652D-4A1E-8AA1-F6D81B186E33}.Debug|x64.ActiveCfg = Debug|x64
17 | {825E4311-652D-4A1E-8AA1-F6D81B186E33}.Debug|x64.Build.0 = Debug|x64
18 | {825E4311-652D-4A1E-8AA1-F6D81B186E33}.Debug|x86.ActiveCfg = Debug|x86
19 | {825E4311-652D-4A1E-8AA1-F6D81B186E33}.Debug|x86.Build.0 = Debug|x86
20 | {825E4311-652D-4A1E-8AA1-F6D81B186E33}.Release|x64.ActiveCfg = Release|x64
21 | {825E4311-652D-4A1E-8AA1-F6D81B186E33}.Release|x64.Build.0 = Release|x64
22 | {825E4311-652D-4A1E-8AA1-F6D81B186E33}.Release|x86.ActiveCfg = Release|x86
23 | {825E4311-652D-4A1E-8AA1-F6D81B186E33}.Release|x86.Build.0 = Release|x86
24 | EndGlobalSection
25 | GlobalSection(SolutionProperties) = preSolution
26 | HideSolutionNode = FALSE
27 | EndGlobalSection
28 | GlobalSection(ExtensibilityGlobals) = postSolution
29 | SolutionGuid = {19DB287E-B866-4E97-B0AE-95CF54B00134}
30 | EndGlobalSection
31 | EndGlobal
32 |
--------------------------------------------------------------------------------
/Forms/Helper/IGsdxDllFinder.cs:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2009-2019 PCSX2 Dev Team
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy
5 | * of this software and associated documentation files (the "Software"), to deal
6 | * in the Software without restriction, including without limitation the rights
7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | * copies of the Software, and to permit persons to whom the Software is
9 | * furnished to do so, subject to the following conditions:
10 | *
11 | * The above copyright notice and this permission notice shall be included in
12 | * all copies or substantial portions of the Software.
13 | *
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20 | * THE SOFTWARE.
21 | */
22 |
23 | using System.Collections.Generic;
24 | using System.IO;
25 | using GSDumpGUI.Forms.Entities;
26 |
27 | namespace GSDumpGUI.Forms.Helper
28 | {
29 | public interface IGsdxDllFinder
30 | {
31 | IEnumerable GetEnrichedPathToValidGsdxDlls(DirectoryInfo directory);
32 | }
33 | }
--------------------------------------------------------------------------------
/Library/GSDump/GSData/GIFUtil.cs:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2009-2011 Ferreri Alessio
3 | * Copyright (C) 2009-2018 PCSX2 Dev Team
4 | *
5 | * Permission is hereby granted, free of charge, to any person obtaining a copy
6 | * of this software and associated documentation files (the "Software"), to deal
7 | * in the Software without restriction, including without limitation the rights
8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | * copies of the Software, and to permit persons to whom the Software is
10 | * furnished to do so, subject to the following conditions:
11 | *
12 | * The above copyright notice and this permission notice shall be included in
13 | * all copies or substantial portions of the Software.
14 | *
15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | * THE SOFTWARE.
22 | */
23 |
24 | using System;
25 |
26 | namespace GSDumpGUI
27 | {
28 | [Serializable]
29 | public class GIFUtil
30 | {
31 | public static UInt64 GetBit(UInt64 value, int lower, int count)
32 | {
33 | return (value >> lower) & (ulong)((1ul << count) - 1);
34 | }
35 | }
36 | }
--------------------------------------------------------------------------------
/Library/GSDump/GSData/GSData.cs:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2009-2011 Ferreri Alessio
3 | * Copyright (C) 2009-2018 PCSX2 Dev Team
4 | *
5 | * Permission is hereby granted, free of charge, to any person obtaining a copy
6 | * of this software and associated documentation files (the "Software"), to deal
7 | * in the Software without restriction, including without limitation the rights
8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | * copies of the Software, and to permit persons to whom the Software is
10 | * furnished to do so, subject to the following conditions:
11 | *
12 | * The above copyright notice and this permission notice shall be included in
13 | * all copies or substantial portions of the Software.
14 | *
15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | * THE SOFTWARE.
22 | */
23 |
24 | using System;
25 | using System.Collections.Generic;
26 | using System.Text;
27 |
28 | namespace GSDumpGUI
29 | {
30 | public class GSData
31 | {
32 | public GSType id;
33 | public byte[] data;
34 | }
35 |
36 | public enum GSType
37 | {
38 | Transfer = 0,
39 | VSync = 1,
40 | ReadFIFO2 = 2,
41 | Registers = 3
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/Library/GSDump/GSData/GSTransfer.cs:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2009-2011 Ferreri Alessio
3 | * Copyright (C) 2009-2018 PCSX2 Dev Team
4 | *
5 | * Permission is hereby granted, free of charge, to any person obtaining a copy
6 | * of this software and associated documentation files (the "Software"), to deal
7 | * in the Software without restriction, including without limitation the rights
8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | * copies of the Software, and to permit persons to whom the Software is
10 | * furnished to do so, subject to the following conditions:
11 | *
12 | * The above copyright notice and this permission notice shall be included in
13 | * all copies or substantial portions of the Software.
14 | *
15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | * THE SOFTWARE.
22 | */
23 |
24 | using System;
25 | using System.Collections.Generic;
26 | using System.Text;
27 |
28 | namespace GSDumpGUI
29 | {
30 | public class GSTransfer : GSData
31 | {
32 | public GSTransferPath Path;
33 | }
34 |
35 | public enum GSTransferPath
36 | {
37 | Path1Old = 0,
38 | Path2 = 1,
39 | Path3 = 2,
40 | Path1New = 3
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/Library/GSDump/GSData/GIFPacket/GIFReg/GifImage.cs:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2009-2011 Ferreri Alessio
3 | * Copyright (C) 2009-2018 PCSX2 Dev Team
4 | *
5 | * Permission is hereby granted, free of charge, to any person obtaining a copy
6 | * of this software and associated documentation files (the "Software"), to deal
7 | * in the Software without restriction, including without limitation the rights
8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | * copies of the Software, and to permit persons to whom the Software is
10 | * furnished to do so, subject to the following conditions:
11 | *
12 | * The above copyright notice and this permission notice shall be included in
13 | * all copies or substantial portions of the Software.
14 | *
15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | * THE SOFTWARE.
22 | */
23 |
24 | using System;
25 | using System.Collections.Generic;
26 | using System.Text;
27 |
28 | namespace GSDumpGUI
29 | {
30 | [Serializable]
31 | public class GifImage : IGifData
32 | {
33 | public byte[] Data;
34 |
35 | public override string ToString()
36 | {
37 | return "IMAGE@" + Data.Length.ToString() + " bytes";
38 | }
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/Library/GSDump/GSData/GIFPacket/GIFReg/GIFRegAD.cs:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2009-2011 Ferreri Alessio
3 | * Copyright (C) 2009-2018 PCSX2 Dev Team
4 | *
5 | * Permission is hereby granted, free of charge, to any person obtaining a copy
6 | * of this software and associated documentation files (the "Software"), to deal
7 | * in the Software without restriction, including without limitation the rights
8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | * copies of the Software, and to permit persons to whom the Software is
10 | * furnished to do so, subject to the following conditions:
11 | *
12 | * The above copyright notice and this permission notice shall be included in
13 | * all copies or substantial portions of the Software.
14 | *
15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | * THE SOFTWARE.
22 | */
23 |
24 | using System;
25 | using System.Collections.Generic;
26 | using System.Text;
27 |
28 | namespace GSDumpGUI
29 | {
30 | [Serializable]
31 | public static class GIFRegAD
32 | {
33 | static public GIFReg Unpack(GIFTag tag, byte addr, UInt64 LowData, UInt64 HighData, bool PackedFormat)
34 | {
35 | byte reg = (byte)GIFReg.GetBit(HighData, 0, 8);
36 | if (reg == (byte)GIFRegDescriptor.AD)
37 | return GIFRegNOP.Unpack(tag, reg, LowData, HighData, PackedFormat);
38 | return GIFTag.GetUnpack(reg)(tag, reg, LowData, HighData, false);
39 | }
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/Library/GSDump/GSData/GIFPacket/GIFReg/GIFRegUnimpl.cs:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2009-2011 Ferreri Alessio
3 | * Copyright (C) 2009-2018 PCSX2 Dev Team
4 | *
5 | * Permission is hereby granted, free of charge, to any person obtaining a copy
6 | * of this software and associated documentation files (the "Software"), to deal
7 | * in the Software without restriction, including without limitation the rights
8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | * copies of the Software, and to permit persons to whom the Software is
10 | * furnished to do so, subject to the following conditions:
11 | *
12 | * The above copyright notice and this permission notice shall be included in
13 | * all copies or substantial portions of the Software.
14 | *
15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | * THE SOFTWARE.
22 | */
23 |
24 | using System;
25 | using System.Collections.Generic;
26 | using System.Text;
27 |
28 | namespace GSDumpGUI
29 | {
30 | [Serializable]
31 | public class GIFRegUnimpl : GIFReg
32 | {
33 | public GIFRegUnimpl(byte addr, UInt64 LowData, UInt64 HighData, bool PackedFormat) : base(addr, LowData, HighData, PackedFormat) { }
34 |
35 | static public GIFReg Unpack(GIFTag tag, byte addr, UInt64 LowData, UInt64 HighData, bool PackedFormat)
36 | {
37 | GIFRegUnimpl u = new GIFRegUnimpl(addr, LowData, HighData, PackedFormat);
38 | u.Descriptor = (GIFRegDescriptor)addr;
39 | return u;
40 | }
41 |
42 | public override string ToString()
43 | {
44 | return Descriptor.ToString();
45 | }
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.42000
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace GSDumpGUI.Properties {
12 |
13 |
14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.9.0.0")]
16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
17 |
18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
19 |
20 | public static Settings Default {
21 | get {
22 | return defaultInstance;
23 | }
24 | }
25 |
26 | [global::System.Configuration.UserScopedSettingAttribute()]
27 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
28 | [global::System.Configuration.DefaultSettingValueAttribute("")]
29 | public string GSDXDir {
30 | get {
31 | return ((string)(this["GSDXDir"]));
32 | }
33 | set {
34 | this["GSDXDir"] = value;
35 | }
36 | }
37 |
38 | [global::System.Configuration.UserScopedSettingAttribute()]
39 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
40 | [global::System.Configuration.DefaultSettingValueAttribute("")]
41 | public string DumpDir {
42 | get {
43 | return ((string)(this["DumpDir"]));
44 | }
45 | set {
46 | this["DumpDir"] = value;
47 | }
48 | }
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/Library/GSDump/GSData/GIFPacket/GIFReg/GIFRegNOP.cs:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2009-2011 Ferreri Alessio
3 | * Copyright (C) 2009-2018 PCSX2 Dev Team
4 | *
5 | * Permission is hereby granted, free of charge, to any person obtaining a copy
6 | * of this software and associated documentation files (the "Software"), to deal
7 | * in the Software without restriction, including without limitation the rights
8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | * copies of the Software, and to permit persons to whom the Software is
10 | * furnished to do so, subject to the following conditions:
11 | *
12 | * The above copyright notice and this permission notice shall be included in
13 | * all copies or substantial portions of the Software.
14 | *
15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | * THE SOFTWARE.
22 | */
23 |
24 | using System;
25 | using System.Collections.Generic;
26 | using System.Text;
27 |
28 | namespace GSDumpGUI
29 | {
30 | [Serializable]
31 | public class GIFRegNOP : GIFReg
32 | {
33 | public byte addr;
34 |
35 | public GIFRegNOP(byte addr, UInt64 LowData, UInt64 HighData, bool PackedFormat) : base(addr, LowData, HighData, PackedFormat) { }
36 |
37 | static public GIFReg Unpack(GIFTag tag, byte addr, UInt64 LowData, UInt64 HighData, bool PackedFormat)
38 | {
39 | GIFRegNOP nop = new GIFRegNOP(addr, LowData, HighData, PackedFormat);
40 | nop.Descriptor = GIFRegDescriptor.NOP;
41 |
42 | return nop;
43 | }
44 |
45 | public override string ToString()
46 | {
47 | return Descriptor.ToString() + " (0x" + addr.ToString("X2") + ")";
48 | }
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/Library/TCPLibrary/Base/Data.cs:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2009-2011 Ferreri Alessio
3 | * Copyright (C) 2009-2018 PCSX2 Dev Team
4 | *
5 | * Permission is hereby granted, free of charge, to any person obtaining a copy
6 | * of this software and associated documentation files (the "Software"), to deal
7 | * in the Software without restriction, including without limitation the rights
8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | * copies of the Software, and to permit persons to whom the Software is
10 | * furnished to do so, subject to the following conditions:
11 | *
12 | * The above copyright notice and this permission notice shall be included in
13 | * all copies or substantial portions of the Software.
14 | *
15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | * THE SOFTWARE.
22 | */
23 |
24 | using System;
25 | using System.Collections.Generic;
26 | using System.Text;
27 |
28 | namespace TCPLibrary.Core
29 | {
30 | ///
31 | /// Structure for containing the data to be sent over a base client/server
32 | ///
33 | public class Data
34 | {
35 | ///
36 | /// Data to be sent.
37 | ///
38 | private byte[] _message;
39 |
40 | ///
41 | /// Get/set the data to be sent.
42 | ///
43 | public byte[] Message
44 | {
45 | get { return _message; }
46 | set { _message = value; }
47 | }
48 |
49 | ///
50 | /// Base constructor of the class.
51 | ///
52 | /// Data to be sent.
53 | public Data(byte[] msg)
54 | {
55 | this._message = msg;
56 | }
57 | }
58 | }
59 |
--------------------------------------------------------------------------------
/Library/GSDump/GSData/GIFPacket/GIFReg/GIFRegFOG.cs:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2009-2011 Ferreri Alessio
3 | * Copyright (C) 2009-2018 PCSX2 Dev Team
4 | *
5 | * Permission is hereby granted, free of charge, to any person obtaining a copy
6 | * of this software and associated documentation files (the "Software"), to deal
7 | * in the Software without restriction, including without limitation the rights
8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | * copies of the Software, and to permit persons to whom the Software is
10 | * furnished to do so, subject to the following conditions:
11 | *
12 | * The above copyright notice and this permission notice shall be included in
13 | * all copies or substantial portions of the Software.
14 | *
15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | * THE SOFTWARE.
22 | */
23 |
24 | using System;
25 | using System.Collections.Generic;
26 | using System.Text;
27 |
28 | namespace GSDumpGUI
29 | {
30 | [Serializable]
31 | public class GIFRegFOG : GIFReg
32 | {
33 | public double F;
34 |
35 | public GIFRegFOG(byte addr, UInt64 LowData, UInt64 HighData, bool PackedFormat) : base(addr, LowData, HighData, PackedFormat) { }
36 |
37 | static public GIFReg Unpack(GIFTag tag, byte addr, UInt64 LowData, UInt64 HighData, bool PackedFormat)
38 | {
39 | GIFRegFOG u = new GIFRegFOG(addr, LowData, HighData, PackedFormat);
40 | u.Descriptor = (GIFRegDescriptor)addr;
41 | if (PackedFormat)
42 | u.F = (UInt16)(GetBit(HighData, 36, 8));
43 | else
44 | u.F = GetBit(LowData, 56, 8);
45 | return u;
46 | }
47 |
48 | public override string ToString()
49 | {
50 | return Descriptor.ToString() + "@F : " + F.ToString();
51 | }
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/Library/TCPLibrary/Base/CancelArgs.cs:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2009-2011 Ferreri Alessio
3 | * Copyright (C) 2009-2018 PCSX2 Dev Team
4 | *
5 | * Permission is hereby granted, free of charge, to any person obtaining a copy
6 | * of this software and associated documentation files (the "Software"), to deal
7 | * in the Software without restriction, including without limitation the rights
8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | * copies of the Software, and to permit persons to whom the Software is
10 | * furnished to do so, subject to the following conditions:
11 | *
12 | * The above copyright notice and this permission notice shall be included in
13 | * all copies or substantial portions of the Software.
14 | *
15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | * THE SOFTWARE.
22 | */
23 |
24 | using System;
25 | using System.Collections.Generic;
26 | using System.Text;
27 |
28 | namespace TCPLibrary.Core
29 | {
30 | ///
31 | /// Class for containing information regarding the acceptance of a determinate situation.
32 | ///
33 | public class CancelArgs
34 | {
35 | ///
36 | /// Whether the operation should be cancelled.
37 | ///
38 | private Boolean _cancel;
39 | ///
40 | /// Get/set the flag that determines if the operation should be cancelled.
41 | ///
42 | public Boolean Cancel
43 | {
44 | get { return _cancel; }
45 | set { _cancel = value; }
46 | }
47 |
48 | ///
49 | /// Base constructor of the class.
50 | ///
51 | /// Whether the operation should be cancelled.
52 | public CancelArgs(Boolean cancel)
53 | {
54 | this._cancel = cancel;
55 | }
56 | }
57 | }
58 |
--------------------------------------------------------------------------------
/Library/TCPLibrary/Message/BaseMessageClientS.cs:
--------------------------------------------------------------------------------
1 | /*
2 | The MIT License
3 |
4 | Copyright (c) 2008 Ferreri Alessio
5 |
6 | Permission is hereby granted, free of charge, to any person obtaining a copy
7 | of this software and associated documentation files (the "Software"), to deal
8 | in the Software without restriction, including without limitation the rights
9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | copies of the Software, and to permit persons to whom the Software is
11 | furnished to do so, subject to the following conditions:
12 |
13 | The above copyright notice and this permission notice shall be included in
14 | all copies or substantial portions of the Software.
15 |
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | THE SOFTWARE.
23 | */
24 |
25 | using System.Net.Sockets;
26 | using TCPLibrary.Core;
27 | using TCPLibrary.MessageBased.Core;
28 |
29 | namespace TCPLibrary.MessageBased.Core
30 | {
31 | ///
32 | /// Class that manages the single connection between a client and the server based
33 | /// on Message structures.
34 | ///
35 | public class BaseMessageClientS : ClientS
36 | {
37 | ///
38 | /// Base constructor of the class.
39 | ///
40 | /// Server to which this client is linked to.
41 | /// Socket of the client.
42 | protected internal BaseMessageClientS(Server server, TcpClient client)
43 | : base(server, client)
44 | {
45 |
46 | }
47 |
48 | ///
49 | /// Send a Message structure to the client.
50 | ///
51 | /// Message to be sent.
52 | ///
53 | public void Send(TCPMessage msg)
54 | {
55 | ((BaseMessageServer)_server).RaiseBeforeMessageSentEvent(this, msg);
56 | base.Send(new Data(msg.ToByteArray()));
57 | }
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/Library/GSDump/GSData/GIFPacket/GIFReg/GIFRegUV.cs:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2009-2011 Ferreri Alessio
3 | * Copyright (C) 2009-2018 PCSX2 Dev Team
4 | *
5 | * Permission is hereby granted, free of charge, to any person obtaining a copy
6 | * of this software and associated documentation files (the "Software"), to deal
7 | * in the Software without restriction, including without limitation the rights
8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | * copies of the Software, and to permit persons to whom the Software is
10 | * furnished to do so, subject to the following conditions:
11 | *
12 | * The above copyright notice and this permission notice shall be included in
13 | * all copies or substantial portions of the Software.
14 | *
15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | * THE SOFTWARE.
22 | */
23 |
24 | using System;
25 | using System.Collections.Generic;
26 | using System.Text;
27 |
28 | namespace GSDumpGUI
29 | {
30 | [Serializable]
31 | public class GIFRegUV : GIFReg
32 | {
33 | public double U;
34 | public double V;
35 |
36 | public GIFRegUV(byte addr, UInt64 LowData, UInt64 HighData, bool PackedFormat) : base(addr, LowData, HighData, PackedFormat) { }
37 |
38 | static public GIFReg Unpack(GIFTag tag, byte addr, UInt64 LowData, UInt64 HighData, bool PackedFormat)
39 | {
40 | GIFRegUV uv = new GIFRegUV(addr, LowData, HighData, PackedFormat);
41 | uv.Descriptor = (GIFRegDescriptor)addr;
42 | if (PackedFormat)
43 | {
44 | uv.U = GetBit(LowData, 0, 14) / 16d;
45 | uv.V = GetBit(LowData, 32, 14) / 16d;
46 | }
47 | else
48 | {
49 | uv.U = GetBit(LowData, 0, 14) / 16d;
50 | uv.V = GetBit(LowData, 16, 14) / 16d;
51 | }
52 | return uv;
53 | }
54 |
55 | public override string ToString()
56 | {
57 | return Descriptor.ToString() + "@U : " + U.ToString("F4") + "@V : " + V.ToString("F4");
58 | }
59 | }
60 | }
61 |
--------------------------------------------------------------------------------
/Library/GSDump/GSData/GIFPacket/GIFReg/GIFRegST.cs:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2009-2011 Ferreri Alessio
3 | * Copyright (C) 2009-2018 PCSX2 Dev Team
4 | *
5 | * Permission is hereby granted, free of charge, to any person obtaining a copy
6 | * of this software and associated documentation files (the "Software"), to deal
7 | * in the Software without restriction, including without limitation the rights
8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | * copies of the Software, and to permit persons to whom the Software is
10 | * furnished to do so, subject to the following conditions:
11 | *
12 | * The above copyright notice and this permission notice shall be included in
13 | * all copies or substantial portions of the Software.
14 | *
15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | * THE SOFTWARE.
22 | */
23 |
24 | using System;
25 | using System.Collections.Generic;
26 | using System.Text;
27 |
28 | namespace GSDumpGUI
29 | {
30 | [Serializable]
31 | public class GIFRegST : GIFReg
32 | {
33 | public float S;
34 | public float T;
35 | public float Q;
36 |
37 | public bool isSTQ;
38 |
39 | public GIFRegST(byte addr, UInt64 LowData, UInt64 HighData, bool PackedFormat) : base(addr, LowData, HighData, PackedFormat) { }
40 |
41 | static public GIFReg Unpack(GIFTag tag, byte addr, UInt64 LowData, UInt64 HighData, bool PackedFormat)
42 | {
43 | GIFRegST st = new GIFRegST(addr, LowData, HighData, PackedFormat);
44 | st.Descriptor = (GIFRegDescriptor)addr;
45 |
46 | st.S = BitConverter.ToSingle(BitConverter.GetBytes(LowData), 0);
47 | st.T = BitConverter.ToSingle(BitConverter.GetBytes(LowData), 4);
48 | if (PackedFormat)
49 | {
50 | st.Q = BitConverter.ToSingle(BitConverter.GetBytes(HighData), 0);
51 | tag.Q = st.Q;
52 | st.isSTQ = true;
53 | }
54 | else
55 | st.isSTQ = false;
56 |
57 | return st;
58 | }
59 |
60 | public override string ToString()
61 | {
62 | return Descriptor.ToString() + "@S : " + S.ToString("F8") + "@T : " + T.ToString("F8") + (isSTQ ? "@Q : " + Q.ToString("F8") : "");
63 | }
64 | }
65 | }
66 |
--------------------------------------------------------------------------------
/Forms/Helper/FolderWithFallBackFinder.cs:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2009-2019 PCSX2 Dev Team
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy
5 | * of this software and associated documentation files (the "Software"), to deal
6 | * in the Software without restriction, including without limitation the rights
7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | * copies of the Software, and to permit persons to whom the Software is
9 | * furnished to do so, subject to the following conditions:
10 | *
11 | * The above copyright notice and this permission notice shall be included in
12 | * all copies or substantial portions of the Software.
13 | *
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20 | * THE SOFTWARE.
21 | */
22 |
23 | using System;
24 | using System.IO;
25 | using System.Linq;
26 |
27 | namespace GSDumpGUI.Forms.Helper
28 | {
29 | public class FolderWithFallBackFinder : IFolderWithFallBackFinder
30 | {
31 | public DirectoryInfo GetViaPatternWithFallback(string defaultDir, string filePattern, params string[] fallBackFolder)
32 | {
33 | if (!string.IsNullOrWhiteSpace(defaultDir))
34 | return new DirectoryInfo(defaultDir);
35 |
36 | DirectoryInfo gsdxDllDirectory;
37 | if (TryGetExistingDirectory(fallBackFolder, filePattern, out gsdxDllDirectory))
38 | return gsdxDllDirectory;
39 | return new DirectoryInfo(AppDomain.CurrentDomain.BaseDirectory);
40 | }
41 |
42 | private static bool TryGetExistingDirectory(string[] relativePaths, string pattern, out DirectoryInfo validDirectory)
43 | {
44 | if (relativePaths == null)
45 | throw new ArgumentNullException(nameof(relativePaths));
46 | foreach (var relativePath in relativePaths)
47 | {
48 |
49 | var candidate = new DirectoryInfo(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, relativePath));
50 | if (candidate.Exists && candidate.GetFiles(pattern).Any())
51 | {
52 | validDirectory = candidate;
53 | return true;
54 | }
55 | }
56 |
57 | validDirectory = null;
58 | return false;
59 | }
60 | }
61 | }
62 |
--------------------------------------------------------------------------------
/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2009-2011 Ferreri Alessio
3 | * Copyright (C) 2009-2018 PCSX2 Dev Team
4 | *
5 | * Permission is hereby granted, free of charge, to any person obtaining a copy
6 | * of this software and associated documentation files (the "Software"), to deal
7 | * in the Software without restriction, including without limitation the rights
8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | * copies of the Software, and to permit persons to whom the Software is
10 | * furnished to do so, subject to the following conditions:
11 | *
12 | * The above copyright notice and this permission notice shall be included in
13 | * all copies or substantial portions of the Software.
14 | *
15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | * THE SOFTWARE.
22 | */
23 |
24 | using System.Reflection;
25 | using System.Runtime.CompilerServices;
26 | using System.Runtime.InteropServices;
27 |
28 | // General Information about an assembly is controlled through the following
29 | // set of attributes. Change these attribute values to modify the information
30 | // associated with an assembly.
31 | [assembly: AssemblyTitle("GSDumpGUI")]
32 | [assembly: AssemblyDescription("")]
33 | [assembly: AssemblyConfiguration("")]
34 | [assembly: AssemblyCompany("PCSX2 Team")]
35 | [assembly: AssemblyProduct("GSDumpGUI")]
36 | [assembly: AssemblyCopyright("")]
37 | [assembly: AssemblyTrademark("")]
38 | [assembly: AssemblyCulture("")]
39 |
40 | // Setting ComVisible to false makes the types in this assembly not visible
41 | // to COM components. If you need to access a type in this assembly from
42 | // COM, set the ComVisible attribute to true on that type.
43 | [assembly: ComVisible(false)]
44 |
45 | // The following GUID is for the ID of the typelib if this project is exposed to COM
46 | [assembly: Guid("ff0f400c-a2cc-4d81-be4a-43c53eed5025")]
47 |
48 | // Version information for an assembly consists of the following four values:
49 | //
50 | // Major Version
51 | // Minor Version
52 | // Build Number
53 | // Revision
54 | //
55 | // You can specify all the values or you can default the Build and Revision Numbers
56 | // by using the '*' as shown below:
57 | // [assembly: AssemblyVersion("1.0.*")]
58 | [assembly: AssemblyVersion("1.0.0.0")]
59 | [assembly: AssemblyFileVersion("1.0.0.0")]
60 |
--------------------------------------------------------------------------------
/Forms/Helper/GsdxDllFinder.cs:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2009-2011 Ferreri Alessio
3 | * Copyright (C) 2009-2019 PCSX2 Dev Team
4 | *
5 | * Permission is hereby granted, free of charge, to any person obtaining a copy
6 | * of this software and associated documentation files (the "Software"), to deal
7 | * in the Software without restriction, including without limitation the rights
8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | * copies of the Software, and to permit persons to whom the Software is
10 | * furnished to do so, subject to the following conditions:
11 | *
12 | * The above copyright notice and this permission notice shall be included in
13 | * all copies or substantial portions of the Software.
14 | *
15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | * THE SOFTWARE.
22 | */
23 |
24 | using System.Collections.Generic;
25 | using System.IO;
26 | using GSDumpGUI.Forms.Entities;
27 |
28 | namespace GSDumpGUI.Forms.Helper
29 | {
30 | public class GsdxDllFinder : IGsdxDllFinder
31 | {
32 | private readonly ILogger _logger;
33 |
34 | public GsdxDllFinder(ILogger logger)
35 | {
36 | _logger = logger;
37 | }
38 |
39 | public IEnumerable GetEnrichedPathToValidGsdxDlls(DirectoryInfo directory)
40 | {
41 | var availableDlls = directory.GetFiles("*.dll", SearchOption.TopDirectoryOnly);
42 |
43 | var wrap = new GSDXWrapper();
44 | foreach (var availableDll in availableDlls)
45 | {
46 | GsFile dll;
47 | try
48 | {
49 | wrap.Load(availableDll.FullName);
50 |
51 | dll = new GsFile
52 | {
53 | DisplayText = availableDll.Name + " | " + wrap.PS2EGetLibName(),
54 | File = availableDll
55 | };
56 | _logger.Information($"'{availableDll}' correctly identified as '{wrap.PS2EGetLibName()}'");
57 |
58 | wrap.Unload();
59 | }
60 | catch (InvalidGSPlugin)
61 | {
62 | _logger.Warning($"Failed to load '{availableDll}'. Is it really a GSdx DLL?");
63 | continue;
64 | }
65 |
66 | yield return dll;
67 | }
68 | }
69 | }
70 | }
71 |
--------------------------------------------------------------------------------
/Forms/Helper/RichTextBoxLogger.cs:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2009-2019 PCSX2 Dev Team
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy
5 | * of this software and associated documentation files (the "Software"), to deal
6 | * in the Software without restriction, including without limitation the rights
7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | * copies of the Software, and to permit persons to whom the Software is
9 | * furnished to do so, subject to the following conditions:
10 | *
11 | * The above copyright notice and this permission notice shall be included in
12 | * all copies or substantial portions of the Software.
13 | *
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20 | * THE SOFTWARE.
21 | */
22 |
23 | using System;
24 | using System.Drawing;
25 | using System.Windows.Forms;
26 |
27 | namespace GSDumpGUI.Forms.Helper
28 | {
29 | public class RichTextBoxLogger : ILogger
30 | {
31 | private readonly RichTextBox _richTextBox;
32 | public RichTextBoxLogger(RichTextBox richTextBox)
33 | {
34 | _richTextBox = richTextBox;
35 | _richTextBox.BackColor = Color.White;
36 | _richTextBox.Focus();
37 | _richTextBox.HideSelection = false;
38 | }
39 |
40 | private void WriteLine(Color color, string line = null)
41 | {
42 | _richTextBox.Invoke(new MethodInvoker(delegate
43 | {
44 | ThreadLocalWrite(color, line);
45 | }));
46 | }
47 |
48 | private void ThreadLocalWrite(Color color, string line)
49 | {
50 | if (line == null)
51 | {
52 | _richTextBox.AppendText(Environment.NewLine);
53 | return;
54 | }
55 |
56 | _richTextBox.SelectionStart = _richTextBox.TextLength;
57 | _richTextBox.SelectionLength = 0;
58 |
59 | _richTextBox.SelectionColor = color;
60 | _richTextBox.AppendText(line);
61 | _richTextBox.SelectionColor = _richTextBox.ForeColor;
62 |
63 | _richTextBox.AppendText(Environment.NewLine);
64 | }
65 |
66 | public void Information(string line = null) => WriteLine(Color.Black, line);
67 | public void Warning(string line = null) => WriteLine(Color.DarkGoldenrod, line);
68 | public void Error(string line = null) => WriteLine(Color.DarkRed, line);
69 | }
70 | }
71 |
--------------------------------------------------------------------------------
/Library/GSDump/GSData/GIFPacket/GIFReg/GIFRegRGBAQ.cs:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2009-2011 Ferreri Alessio
3 | * Copyright (C) 2009-2018 PCSX2 Dev Team
4 | *
5 | * Permission is hereby granted, free of charge, to any person obtaining a copy
6 | * of this software and associated documentation files (the "Software"), to deal
7 | * in the Software without restriction, including without limitation the rights
8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | * copies of the Software, and to permit persons to whom the Software is
10 | * furnished to do so, subject to the following conditions:
11 | *
12 | * The above copyright notice and this permission notice shall be included in
13 | * all copies or substantial portions of the Software.
14 | *
15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | * THE SOFTWARE.
22 | */
23 |
24 | using System;
25 | using System.Collections.Generic;
26 | using System.Text;
27 |
28 | namespace GSDumpGUI
29 | {
30 | [Serializable]
31 | public class GIFRegRGBAQ : GIFReg
32 | {
33 | public byte R;
34 | public byte G;
35 | public byte B;
36 | public byte A;
37 | public float Q;
38 |
39 | public GIFRegRGBAQ(byte addr, UInt64 LowData, UInt64 HighData, bool PackedFormat) : base(addr, LowData, HighData, PackedFormat) { }
40 |
41 | static public GIFReg Unpack(GIFTag tag, byte addr, UInt64 LowData, UInt64 HighData, bool PackedFormat)
42 | {
43 | GIFRegRGBAQ r = new GIFRegRGBAQ(addr, LowData, HighData, PackedFormat);
44 | r.Descriptor = (GIFRegDescriptor)addr;
45 | if (PackedFormat)
46 | {
47 | r.R = (byte)GetBit(LowData, 0, 8);
48 | r.G = (byte)GetBit(LowData, 32, 8);
49 | r.B = (byte)GetBit(HighData, 0, 8);
50 | r.A = (byte)GetBit(HighData, 32, 8);
51 | r.Q = tag.Q;
52 | }
53 | else
54 | {
55 | r.R = (byte)GetBit(LowData, 0, 8);
56 | r.G = (byte)GetBit(LowData, 8, 8);
57 | r.B = (byte)GetBit(LowData, 16, 8);
58 | r.A = (byte)GetBit(LowData, 24, 8);
59 | r.Q = BitConverter.ToSingle(BitConverter.GetBytes(LowData), 4);
60 | }
61 | return r;
62 | }
63 |
64 | public override string ToString()
65 | {
66 | return Descriptor.ToString() + "@Red : " + R.ToString() + "@Green : " + G.ToString() + "@Blue : " + B.ToString() + "@Alpha : " + A.ToString();
67 | }
68 | }
69 | }
70 |
--------------------------------------------------------------------------------
/Forms/Entities/GsFiles.cs:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2009-2019 PCSX2 Dev Team
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy
5 | * of this software and associated documentation files (the "Software"), to deal
6 | * in the Software without restriction, including without limitation the rights
7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | * copies of the Software, and to permit persons to whom the Software is
9 | * furnished to do so, subject to the following conditions:
10 | *
11 | * The above copyright notice and this permission notice shall be included in
12 | * all copies or substantial portions of the Software.
13 | *
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20 | * THE SOFTWARE.
21 | */
22 |
23 | using System;
24 | using System.ComponentModel;
25 |
26 | namespace GSDumpGUI.Forms.Entities
27 | {
28 | public abstract class GsFiles
29 | where TUnderlying : GsFile
30 | {
31 | private int _selectedFileIndex = -1;
32 |
33 | public class SelectedIndexUpdatedEventArgs
34 | {
35 | public SelectedIndexUpdatedEventArgs(int formerIndex, int updatedIndex)
36 | {
37 | FormerIndex = formerIndex;
38 | UpdatedIndex = updatedIndex;
39 | }
40 |
41 | public int FormerIndex { get; }
42 | public int UpdatedIndex { get; }
43 | }
44 |
45 | public delegate void SelectedIndexUpdateEventHandler(object sender, SelectedIndexUpdatedEventArgs args);
46 |
47 | public event SelectedIndexUpdateEventHandler OnIndexUpdatedEvent;
48 | public BindingList Files { get; } = new BindingList();
49 |
50 | public int SelectedFileIndex
51 | {
52 | get
53 | {
54 | return _selectedFileIndex;
55 | }
56 | set
57 | {
58 | var oldValue = _selectedFileIndex;
59 | _selectedFileIndex = value;
60 | OnIndexUpdatedEvent?.Invoke(this, new SelectedIndexUpdatedEventArgs(oldValue, value));
61 | }
62 | }
63 |
64 | public bool IsSelected => SelectedFileIndex != -1 && Files.Count > SelectedFileIndex;
65 |
66 | public TUnderlying Selected
67 | {
68 | get
69 | {
70 | return SelectedFileIndex >= 0 ? Files[SelectedFileIndex] : null;
71 | }
72 | set
73 | {
74 | SelectedFileIndex = Files.IndexOf(value);
75 | }
76 | }
77 | }
78 | }
--------------------------------------------------------------------------------
/Forms/Helper/ExtensionMethods.cs:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2009-2020 PCSX2 Dev Team
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy
5 | * of this software and associated documentation files (the "Software"), to deal
6 | * in the Software without restriction, including without limitation the rights
7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | * copies of the Software, and to permit persons to whom the Software is
9 | * furnished to do so, subject to the following conditions:
10 | *
11 | * The above copyright notice and this permission notice shall be included in
12 | * all copies or substantial portions of the Software.
13 | *
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20 | * THE SOFTWARE.
21 | */
22 |
23 | using System.Windows.Forms;
24 |
25 | // Important ! Create the ExtensionMethods class as a "public static" class
26 | public static class ExtensionMethods
27 | {
28 | public static void EnableContextMenu(this RichTextBox rtb)
29 | {
30 | if (rtb.ContextMenuStrip == null)
31 | {
32 | // Create a ContextMenuStrip without icons
33 | ContextMenuStrip cms = new ContextMenuStrip();
34 | cms.ShowImageMargin = false;
35 |
36 | // Add the Copy option (copies the selected text inside the richtextbox)
37 | ToolStripMenuItem tsmiCopy = new ToolStripMenuItem("Copy");
38 | tsmiCopy.Click += (sender, e) => rtb.Copy();
39 | cms.Items.Add(tsmiCopy);
40 |
41 | // Add the Clear option (clears the text inside the richtextbox)
42 | ToolStripMenuItem tsmiClear = new ToolStripMenuItem("Clear Log");
43 | tsmiClear.Click += (sender, e) => rtb.Clear();
44 | cms.Items.Add(tsmiClear);
45 |
46 | // Add a Separator
47 | cms.Items.Add(new ToolStripSeparator());
48 |
49 | // Add the Select All Option (selects all the text inside the richtextbox)
50 | ToolStripMenuItem tsmiSelectAll = new ToolStripMenuItem("Select All");
51 | tsmiSelectAll.Click += (sender, e) => rtb.SelectAll();
52 | cms.Items.Add(tsmiSelectAll);
53 |
54 | // When opening the menu, check if the condition is fulfilled
55 | // in order to enable the action
56 | cms.Opening += (sender, e) =>
57 | {
58 | tsmiCopy.Enabled = rtb.SelectionLength > 0;
59 | tsmiClear.Enabled = rtb.TextLength > 0;
60 | tsmiSelectAll.Enabled = rtb.TextLength > 0 && rtb.SelectionLength < rtb.TextLength;
61 | };
62 |
63 | rtb.ContextMenuStrip = cms;
64 | }
65 | }
66 | }
67 |
--------------------------------------------------------------------------------
/Library/GSDump/GSData/GIFPacket/GIFPrim.cs:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2009-2011 Ferreri Alessio
3 | * Copyright (C) 2009-2018 PCSX2 Dev Team
4 | *
5 | * Permission is hereby granted, free of charge, to any person obtaining a copy
6 | * of this software and associated documentation files (the "Software"), to deal
7 | * in the Software without restriction, including without limitation the rights
8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | * copies of the Software, and to permit persons to whom the Software is
10 | * furnished to do so, subject to the following conditions:
11 | *
12 | * The above copyright notice and this permission notice shall be included in
13 | * all copies or substantial portions of the Software.
14 | *
15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | * THE SOFTWARE.
22 | */
23 |
24 | using System;
25 | using System.Collections.Generic;
26 | using System.Text;
27 |
28 | namespace GSDumpGUI
29 | {
30 | [Serializable]
31 | public class GIFPrim : GIFUtil
32 | {
33 | public GS_PRIM PrimitiveType;
34 | public GSIIP IIP;
35 | public bool TME;
36 | public bool FGE;
37 | public bool ABE;
38 | public bool AA1;
39 | public GSFST FST;
40 | public GSCTXT CTXT;
41 | public GSFIX FIX;
42 |
43 | static internal GIFPrim ExtractGIFPrim(UInt32 LowData)
44 | {
45 | GIFPrim pr = new GIFPrim();
46 | pr.PrimitiveType = (GS_PRIM)GetBit(LowData, 0, 3);
47 | pr.IIP = (GSIIP)GetBit(LowData, 3, 1);
48 | pr.TME = Convert.ToBoolean(GetBit(LowData, 4, 1));
49 | pr.FGE = Convert.ToBoolean(GetBit(LowData, 5, 1));
50 | pr.ABE = Convert.ToBoolean(GetBit(LowData, 6, 1));
51 | pr.AA1 = Convert.ToBoolean(GetBit(LowData, 7, 1));
52 | pr.FST = (GSFST)(GetBit(LowData, 8, 1));
53 | pr.CTXT = (GSCTXT)(GetBit(LowData, 9, 1));
54 | pr.FIX = (GSFIX)(GetBit(LowData, 10, 1));
55 | return pr;
56 | }
57 |
58 | public override string ToString()
59 | {
60 | return "Primitive Type : " + PrimitiveType.ToString() + "@IIP : " + IIP.ToString() + "@TME : " + TME.ToString() + "@FGE : " + FGE.ToString()
61 | + "@ABE : " + ABE.ToString() + "@AA1 : " + AA1.ToString() + "@FST : " + FST.ToString() + "@CTXT : " + CTXT.ToString() + "@FIX : " + FIX.ToString();
62 | }
63 | }
64 |
65 | public enum GS_PRIM
66 | {
67 | GS_POINTLIST = 0,
68 | GS_LINELIST = 1,
69 | GS_LINESTRIP = 2,
70 | GS_TRIANGLELIST = 3,
71 | GS_TRIANGLESTRIP = 4,
72 | GS_TRIANGLEFAN = 5,
73 | GS_SPRITE = 6,
74 | GS_INVALID = 7,
75 | }
76 | }
77 |
--------------------------------------------------------------------------------
/Properties/Resources.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.42000
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace GSDumpGUI.Properties {
12 | using System;
13 |
14 |
15 | ///
16 | /// A strongly-typed resource class, for looking up localized strings, etc.
17 | ///
18 | // This class was auto-generated by the StronglyTypedResourceBuilder
19 | // class via a tool like ResGen or Visual Studio.
20 | // To add or remove a member, edit your .ResX file then rerun ResGen
21 | // with the /str option, or rebuild your VS project.
22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")]
23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
25 | internal class Resources {
26 |
27 | private static global::System.Resources.ResourceManager resourceMan;
28 |
29 | private static global::System.Globalization.CultureInfo resourceCulture;
30 |
31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
32 | internal Resources() {
33 | }
34 |
35 | ///
36 | /// Returns the cached ResourceManager instance used by this class.
37 | ///
38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
39 | internal static global::System.Resources.ResourceManager ResourceManager {
40 | get {
41 | if (object.ReferenceEquals(resourceMan, null)) {
42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("GSDumpGUI.Properties.Resources", typeof(Resources).Assembly);
43 | resourceMan = temp;
44 | }
45 | return resourceMan;
46 | }
47 | }
48 |
49 | ///
50 | /// Overrides the current thread's CurrentUICulture property for all
51 | /// resource lookups using this strongly typed resource class.
52 | ///
53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
54 | internal static global::System.Globalization.CultureInfo Culture {
55 | get {
56 | return resourceCulture;
57 | }
58 | set {
59 | resourceCulture = value;
60 | }
61 | }
62 |
63 | ///
64 | /// Looks up a localized resource of type System.Drawing.Icon similar to (Icon).
65 | ///
66 | internal static System.Drawing.Icon AppIcon {
67 | get {
68 | object obj = ResourceManager.GetObject("AppIcon", resourceCulture);
69 | return ((System.Drawing.Icon)(obj));
70 | }
71 | }
72 | }
73 | }
74 |
--------------------------------------------------------------------------------
/Forms/Helper/GsDumpFinder.cs:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2009-2011 Ferreri Alessio
3 | * Copyright (C) 2009-2019 PCSX2 Dev Team
4 | *
5 | * Permission is hereby granted, free of charge, to any person obtaining a copy
6 | * of this software and associated documentation files (the "Software"), to deal
7 | * in the Software without restriction, including without limitation the rights
8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | * copies of the Software, and to permit persons to whom the Software is
10 | * furnished to do so, subject to the following conditions:
11 | *
12 | * The above copyright notice and this permission notice shall be included in
13 | * all copies or substantial portions of the Software.
14 | *
15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | * THE SOFTWARE.
22 | */
23 |
24 | using System.Collections.Generic;
25 | using System.IO;
26 | using GSDumpGUI.Forms.Entities;
27 |
28 | namespace GSDumpGUI.Forms.Helper
29 | {
30 | public class GsDumpFinder : IGsDumpFinder
31 | {
32 | private readonly ILogger _logger;
33 |
34 | public GsDumpFinder(ILogger logger)
35 | {
36 | _logger = logger;
37 | }
38 |
39 | public IEnumerable GetValidGsdxDumps(DirectoryInfo directory)
40 | {
41 | var dumps = new FileInfo[0];
42 |
43 | try
44 | {
45 | dumps = directory.GetFiles("*.gs", SearchOption.TopDirectoryOnly);
46 | }
47 | catch (DirectoryNotFoundException)
48 | {
49 | _logger.Warning($"Failed to open folder '{directory}'.");
50 | yield break;
51 | }
52 |
53 | foreach (var dump in dumps)
54 | {
55 | int crc;
56 | using (var fileStream = File.OpenRead(dump.FullName))
57 | {
58 | using (var br = new BinaryReader(fileStream))
59 | {
60 | crc = br.ReadInt32();
61 | br.Close();
62 | }
63 | }
64 |
65 | var extensions = new[] {".png", ".bmp"};
66 | var dumpPreview = default(FileInfo);
67 | foreach (var extension in extensions)
68 | {
69 | var imageFile = new FileInfo(Path.ChangeExtension(dump.FullName, extension));
70 | if (!imageFile.Exists)
71 | continue;
72 | dumpPreview = imageFile;
73 | break;
74 | }
75 |
76 | _logger.Information($"Identified Dump for game ({crc:X}) with filename '{dump}'");
77 | yield return new GsDumpFile
78 | {
79 | DisplayText = dump.Name + " | CRC : " + crc.ToString("X"),
80 | File = dump,
81 | PreviewFile = dumpPreview
82 | };
83 | }
84 | }
85 | }
86 | }
87 |
--------------------------------------------------------------------------------
/Library/GSDump/GSData/GIFPacket/GIFReg/GIFRegPrim.cs:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2009-2011 Ferreri Alessio
3 | * Copyright (C) 2009-2018 PCSX2 Dev Team
4 | *
5 | * Permission is hereby granted, free of charge, to any person obtaining a copy
6 | * of this software and associated documentation files (the "Software"), to deal
7 | * in the Software without restriction, including without limitation the rights
8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | * copies of the Software, and to permit persons to whom the Software is
10 | * furnished to do so, subject to the following conditions:
11 | *
12 | * The above copyright notice and this permission notice shall be included in
13 | * all copies or substantial portions of the Software.
14 | *
15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | * THE SOFTWARE.
22 | */
23 |
24 | using System;
25 | using System.Collections.Generic;
26 | using System.Text;
27 |
28 | namespace GSDumpGUI
29 | {
30 | [Serializable]
31 | public class GIFRegPRIM : GIFReg
32 | {
33 | public GS_PRIM PrimitiveType;
34 | public GSIIP IIP;
35 | public bool TME;
36 | public bool FGE;
37 | public bool ABE;
38 | public bool AA1;
39 | public GSFST FST;
40 | public GSCTXT CTXT;
41 | public GSFIX FIX;
42 |
43 | public GIFRegPRIM(byte addr, UInt64 LowData, UInt64 HighData, bool PackedFormat) : base(addr, LowData, HighData, PackedFormat) { }
44 |
45 | static public GIFReg Unpack(GIFTag tag, byte addr, UInt64 LowData, UInt64 HighData, bool PackedFormat)
46 | {
47 | GIFRegPRIM pr = new GIFRegPRIM(addr, LowData, HighData, PackedFormat);
48 | pr.Descriptor = (GIFRegDescriptor)addr;
49 | pr.PrimitiveType = (GS_PRIM)GetBit(LowData, 0, 3);
50 | pr.IIP = (GSIIP)GetBit(LowData, 3, 1);
51 | pr.TME = Convert.ToBoolean(GetBit(LowData, 4, 1));
52 | pr.FGE = Convert.ToBoolean(GetBit(LowData, 5, 1));
53 | pr.ABE = Convert.ToBoolean(GetBit(LowData, 6, 1));
54 | pr.AA1 = Convert.ToBoolean(GetBit(LowData, 7, 1));
55 | pr.FST = (GSFST)(GetBit(LowData, 8, 1));
56 | pr.CTXT = (GSCTXT)(GetBit(LowData, 9, 1));
57 | pr.FIX = (GSFIX)(GetBit(LowData, 10, 1));
58 | return pr;
59 | }
60 |
61 | public override string ToString()
62 | {
63 | return Descriptor.ToString() + "@Primitive Type : " + PrimitiveType.ToString() + "@IIP : " + IIP.ToString() + "@TME : " + TME.ToString() + "@FGE : " + FGE.ToString()
64 | + "@ABE : " + ABE.ToString() + "@AA1 : " + AA1.ToString() + "@FST : " + FST.ToString() + "@CTXT : " + CTXT.ToString() + "@FIX : " + FIX.ToString();
65 | }
66 | }
67 |
68 | public enum GSIIP
69 | {
70 | FlatShading=0,
71 | Gouraud=1
72 | }
73 |
74 | public enum GSFST
75 | {
76 | STQValue=0,
77 | UVValue=1
78 | }
79 |
80 | public enum GSCTXT
81 | {
82 | Context1 =0,
83 | Context2 =1
84 | }
85 |
86 | public enum GSFIX
87 | {
88 | Unfixed =0,
89 | Fixed = 1
90 | }
91 | }
92 |
--------------------------------------------------------------------------------
/Library/GSDump/GSData/GIFPacket/GIFReg/GIFReg.cs:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2009-2011 Ferreri Alessio
3 | * Copyright (C) 2009-2018 PCSX2 Dev Team
4 | *
5 | * Permission is hereby granted, free of charge, to any person obtaining a copy
6 | * of this software and associated documentation files (the "Software"), to deal
7 | * in the Software without restriction, including without limitation the rights
8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | * copies of the Software, and to permit persons to whom the Software is
10 | * furnished to do so, subject to the following conditions:
11 | *
12 | * The above copyright notice and this permission notice shall be included in
13 | * all copies or substantial portions of the Software.
14 | *
15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | * THE SOFTWARE.
22 | */
23 |
24 | using System;
25 | using System.Collections.Generic;
26 | using System.Text;
27 |
28 | namespace GSDumpGUI
29 | {
30 | [Serializable]
31 | abstract public class GIFReg : GIFUtil, IGifData
32 | {
33 | public GIFRegDescriptor Descriptor;
34 | public UInt64 LowData, HighData;
35 | public bool PackedFormat;
36 |
37 | private GIFReg() { }
38 |
39 | public GIFReg(byte addr, UInt64 LowData, UInt64 HighData, bool PackedFormat)
40 | {
41 | this.LowData = LowData;
42 | this.HighData = HighData;
43 | this.PackedFormat = PackedFormat;
44 | }
45 |
46 | abstract public new String ToString();
47 | }
48 |
49 | public enum GIFRegDescriptor
50 | {
51 | PRIM = 0x00,
52 | RGBAQ = 0x01,
53 | ST = 0x02,
54 | UV = 0x03,
55 | XYZF2 = 0x04,
56 | XYZ2 = 0x05,
57 | TEX0_1 = 0x06,
58 | TEX0_2 = 0x07,
59 | CLAMP_1 = 0x08,
60 | CLAMP_2 = 0x09,
61 | FOG = 0x0a,
62 | XYZF3 = 0x0c,
63 | XYZ3 = 0x0d,
64 | AD = 0x0e,
65 | NOP = 0x0f, // actually, 0xf is the standard GIF NOP and 0x7f is the standard GS NOP, but all unregistered addresses act as NOPs... probably
66 | TEX1_1 = 0x14,
67 | TEX1_2 = 0x15,
68 | TEX2_1 = 0x16,
69 | TEX2_2 = 0x17,
70 | XYOFFSET_1 = 0x18,
71 | XYOFFSET_2 = 0x19,
72 | PRMODECONT = 0x1a,
73 | PRMODE = 0x1b,
74 | TEXCLUT = 0x1c,
75 | SCANMSK = 0x22,
76 | MIPTBP1_1 = 0x34,
77 | MIPTBP1_2 = 0x35,
78 | MIPTBP2_1 = 0x36,
79 | MIPTBP2_2 = 0x37,
80 | TEXA = 0x3b,
81 | FOGCOL = 0x3d,
82 | TEXFLUSH = 0x3f,
83 | SCISSOR_1 = 0x40,
84 | SCISSOR_2 = 0x41,
85 | ALPHA_1 = 0x42,
86 | ALPHA_2 = 0x43,
87 | DIMX = 0x44,
88 | DTHE = 0x45,
89 | COLCLAMP = 0x46,
90 | TEST_1 = 0x47,
91 | TEST_2 = 0x48,
92 | PABE = 0x49,
93 | FBA_1 = 0x4a,
94 | FBA_2 = 0x4b,
95 | FRAME_1 = 0x4c,
96 | FRAME_2 = 0x4d,
97 | ZBUF_1 = 0x4e,
98 | ZBUF_2 = 0x4f,
99 | BITBLTBUF = 0x50,
100 | TRXPOS = 0x51,
101 | TRXREG = 0x52,
102 | TRXDIR = 0x53,
103 | HWREG = 0x54,
104 | SIGNAL = 0x60,
105 | FINISH = 0x61,
106 | LABEL = 0x62,
107 | }
108 |
109 | }
110 |
--------------------------------------------------------------------------------
/Library/GSDump/GSData/GIFPacket/GIFReg/GIFRegXYZF.cs:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2009-2011 Ferreri Alessio
3 | * Copyright (C) 2009-2018 PCSX2 Dev Team
4 | *
5 | * Permission is hereby granted, free of charge, to any person obtaining a copy
6 | * of this software and associated documentation files (the "Software"), to deal
7 | * in the Software without restriction, including without limitation the rights
8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | * copies of the Software, and to permit persons to whom the Software is
10 | * furnished to do so, subject to the following conditions:
11 | *
12 | * The above copyright notice and this permission notice shall be included in
13 | * all copies or substantial portions of the Software.
14 | *
15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | * THE SOFTWARE.
22 | */
23 |
24 | using System;
25 | using System.Collections.Generic;
26 | using System.Text;
27 |
28 | namespace GSDumpGUI
29 | {
30 | [Serializable]
31 | public class GIFRegXYZF : GIFReg
32 | {
33 | public double X;
34 | public double Y;
35 | public UInt32 Z;
36 | public UInt16 F;
37 |
38 | public bool IsXYZF;
39 |
40 | public GIFRegXYZF(byte addr, UInt64 LowData, UInt64 HighData, bool PackedFormat) : base(addr, LowData, HighData, PackedFormat) { }
41 |
42 | static public GIFReg UnpackXYZ(GIFTag tag, byte addr, UInt64 LowData, UInt64 HighData, bool PackedFormat)
43 | {
44 | GIFRegXYZF xyzf = new GIFRegXYZF(addr, LowData, HighData, PackedFormat);
45 |
46 | xyzf.IsXYZF = false;
47 | if (PackedFormat && addr == (int)GIFRegDescriptor.XYZ2 && GetBit(HighData, 47, 1) == 1)
48 | xyzf.Descriptor = GIFRegDescriptor.XYZ3;
49 | else
50 | xyzf.Descriptor = (GIFRegDescriptor)addr;
51 |
52 | if (PackedFormat)
53 | {
54 | xyzf.X = GetBit(LowData, 0, 16) / 16d;
55 | xyzf.Y = GetBit(LowData, 32, 16) / 16d;
56 | xyzf.Z = (UInt32)(GetBit(HighData, 0, 32));
57 | }
58 | else
59 | {
60 | xyzf.X = GetBit(LowData, 0, 16) / 16d;
61 | xyzf.Y = GetBit(LowData, 16, 16) / 16d;
62 | xyzf.Z = (UInt32)(GetBit(LowData, 32, 32));
63 | }
64 | return xyzf;
65 | }
66 |
67 | static public GIFReg Unpack(GIFTag tag, byte addr, UInt64 LowData, UInt64 HighData, bool PackedFormat)
68 | {
69 | GIFRegXYZF xyzf = new GIFRegXYZF(addr, LowData, HighData, PackedFormat);
70 |
71 | xyzf.IsXYZF = true;
72 | if (PackedFormat && addr == (int)GIFRegDescriptor.XYZF2 && GetBit(HighData, 47, 1) == 1)
73 | xyzf.Descriptor = GIFRegDescriptor.XYZF3;
74 | else
75 | xyzf.Descriptor = (GIFRegDescriptor)addr;
76 |
77 | if (PackedFormat)
78 | {
79 | xyzf.X = GetBit(LowData, 0, 16) / 16d;
80 | xyzf.Y = GetBit(LowData, 32, 16) / 16d;
81 | xyzf.Z = (UInt32)(GetBit(HighData, 4, 24));
82 | xyzf.F = (UInt16)(GetBit(HighData, 36, 8));
83 | }
84 | else
85 | {
86 | xyzf.X = GetBit(LowData, 0, 16) / 16d;
87 | xyzf.Y = GetBit(LowData, 16, 16) / 16d;
88 | xyzf.Z = (UInt32)(GetBit(LowData, 32, 24));
89 | xyzf.F = (UInt16)(GetBit(LowData, 56, 8));
90 | }
91 | return xyzf;
92 | }
93 |
94 | public override string ToString()
95 | {
96 | return Descriptor.ToString() + "@X : " + X.ToString("F4") + "@Y : " + Y.ToString("F4") + "@Z : " + Z.ToString() + (IsXYZF ? "@F : " + F.ToString() : "");
97 | }
98 | }
99 | }
100 |
--------------------------------------------------------------------------------
/Library/TCPLibrary/Message/TCPMessage.cs:
--------------------------------------------------------------------------------
1 | /*
2 | The MIT License
3 |
4 | Copyright (c) 2008 Ferreri Alessio
5 |
6 | Permission is hereby granted, free of charge, to any person obtaining a copy
7 | of this software and associated documentation files (the "Software"), to deal
8 | in the Software without restriction, including without limitation the rights
9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | copies of the Software, and to permit persons to whom the Software is
11 | furnished to do so, subject to the following conditions:
12 |
13 | The above copyright notice and this permission notice shall be included in
14 | all copies or substantial portions of the Software.
15 |
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | THE SOFTWARE.
23 | */
24 |
25 | using System;
26 | using System.Collections.Generic;
27 | using System.Xml.Serialization;
28 | using System.IO;
29 | using System.Runtime.Serialization.Formatters.Binary;
30 |
31 | namespace TCPLibrary.MessageBased.Core
32 | {
33 | ///
34 | /// Message structure that contains all the information of the message exchanged between
35 | /// Message driven server/client.
36 | ///
37 | [Serializable]
38 | public class TCPMessage
39 | {
40 | ///
41 | /// Message Type.
42 | ///
43 | private MessageType _messageType;
44 | ///
45 | /// Messages parameters.
46 | ///
47 | private List