diff --git a/Console/App.config b/Console/App.config
deleted file mode 100644
index f2a756c23..000000000
--- a/Console/App.config
+++ /dev/null
@@ -1,32 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
- 0
-
-
- 0
-
-
- 1024
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Console/Console.csproj b/Console/Console.csproj
index cc5ea778b..43083029a 100644
--- a/Console/Console.csproj
+++ b/Console/Console.csproj
@@ -1,218 +1,46 @@
-
-
-
-
- Debug
- x86
- {82B73D4F-B16C-4684-B96B-249F6D35C3CF}
- Exe
- Properties
- DmdExt
- dmdext
- v4.5.2
- 512
- true
-
-
-
-
-
- DmdExt.DmdExt
-
-
- true
- bin\x86\Debug\
- DEBUG;TRACE
- full
- x86
- prompt
- MinimumRecommendedRules.ruleset
- true
-
-
- bin\x86\Release\
- TRACE;PLATFORM_X86
- true
- pdbonly
- x86
- prompt
- MinimumRecommendedRules.ruleset
- true
-
-
- bin\x86\Release\
- TRACE;PLATFORM_X86
- true
- pdbonly
- x86
- prompt
- MinimumRecommendedRules.ruleset
- true
-
-
- true
- bin\x64\Debug\
- DEBUG;TRACE
- full
- x64
- prompt
- MinimumRecommendedRules.ruleset
- true
-
-
- bin\x64\Release\
- TRACE;PLATFORM_X64
- true
- pdbonly
- x64
- prompt
- MinimumRecommendedRules.ruleset
- true
-
-
- bin\x64\Release\
- TRACE;PLATFORM_X64
- true
- pdbonly
- x64
- prompt
- MinimumRecommendedRules.ruleset
- true
-
-
- icon.ico
-
-
-
- ..\packages\CommandLineParser.1.9.71\lib\net45\CommandLine.dll
- True
-
-
- ..\packages\Mindscape.Raygun4Net.5.5.1\lib\net40\Mindscape.Raygun4Net.dll
- True
-
-
- ..\packages\Mindscape.Raygun4Net.5.5.1\lib\net40\Mindscape.Raygun4Net4.dll
- True
-
-
- ..\packages\NLog.4.4.12\lib\net45\NLog.dll
- True
-
-
-
-
-
-
- ..\packages\Rx-Core.2.2.5\lib\net45\System.Reactive.Core.dll
- True
-
-
- ..\packages\Rx-Interfaces.2.2.5\lib\net45\System.Reactive.Interfaces.dll
- True
-
-
- ..\packages\Rx-Linq.2.2.5\lib\net45\System.Reactive.Linq.dll
- True
-
-
-
-
-
-
-
-
-
-
-
-
- Properties\VersionAssemblyInfo.cs
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Always
-
-
-
- Always
-
-
- Designer
-
-
-
-
-
- {0318cc71-57c6-4f46-9495-6cacf0cf1505}
- LibDmd
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ();
-var attribute = config.Attribute("ExcludeAssemblies");
-if (attribute != null)
- foreach (var item in attribute.Value.Split('|').Select(x => x.Trim()).Where(x => x != string.Empty))
- excludedAssemblies.Add(item);
-var element = config.Element("ExcludeAssemblies");
-if (element != null)
- foreach (var item in element.Value.Split(new[] { "\r\n", "\n" }, StringSplitOptions.RemoveEmptyEntries).Select(x => x.Trim()).Where(x => x != string.Empty))
- excludedAssemblies.Add(item);
-
-var filesToCleanup = Files.Select(f => f.ItemSpec).Where(f => !excludedAssemblies.Contains(Path.GetFileNameWithoutExtension(f), StringComparer.InvariantCultureIgnoreCase));
-
-foreach (var item in filesToCleanup)
- File.Delete(item);
-]]>
-
-
-
-
-
-
-
-
- This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
-
-
-
-
+
+
+ netcoreapp3.1
+ x86;x64
+ true
+ Exe
+ DmdExt
+ dmdext
+ false
+ icon.ico
+ DmdExt.DmdExt
+ true
+ {82B73D4F-B16C-4684-B96B-249F6D35C3CF}
+ Properties
+ 512
+ true
+ MinimumRecommendedRules.ruleset
+ ru;en-US
+
+
+ TRACE;PLATFORM_X86
+
+
+ TRACE;PLATFORM_X86
+ true
+
+
+ TRACE;PLATFORM_X64
+
+
+ TRACE;PLATFORM_X64
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Console/FodyWeavers.xml b/Console/FodyWeavers.xml
deleted file mode 100644
index e50199e90..000000000
--- a/Console/FodyWeavers.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
-
-
-
- ProPinballBridge
- ftd2xx
-
-
-
\ No newline at end of file
diff --git a/Console/Properties/PublishProfiles/win-x64.pubxml b/Console/Properties/PublishProfiles/win-x64.pubxml
new file mode 100644
index 000000000..429b1941f
--- /dev/null
+++ b/Console/Properties/PublishProfiles/win-x64.pubxml
@@ -0,0 +1,19 @@
+
+
+
+
+ Release
+ x64
+ win-x64
+ publish\win-x64\
+ FileSystem
+ false
+ true
+
+ true
+ True
+
+
\ No newline at end of file
diff --git a/Console/Properties/PublishProfiles/win-x86.pubxml b/Console/Properties/PublishProfiles/win-x86.pubxml
new file mode 100644
index 000000000..4778ad2fa
--- /dev/null
+++ b/Console/Properties/PublishProfiles/win-x86.pubxml
@@ -0,0 +1,19 @@
+
+
+
+
+ Release
+ x86
+ win-x86
+ publish\win-x86\
+ FileSystem
+ false
+ true
+
+ true
+ True
+
+
\ No newline at end of file
diff --git a/Console/Properties/launchSettings.json b/Console/Properties/launchSettings.json
new file mode 100644
index 000000000..1efa86a73
--- /dev/null
+++ b/Console/Properties/launchSettings.json
@@ -0,0 +1,8 @@
+{
+ "profiles": {
+ "Console": {
+ "commandName": "Project",
+ "commandLineArgs": "test"
+ }
+ }
+}
\ No newline at end of file
diff --git a/Console/packages.config b/Console/packages.config
deleted file mode 100644
index 0f2d56c59..000000000
--- a/Console/packages.config
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/DmdExtensions.sln b/DmdExtensions.sln
index 894c8d7c5..ba1e942e3 100644
--- a/DmdExtensions.sln
+++ b/DmdExtensions.sln
@@ -133,7 +133,7 @@ Global
{C8368102-F2C5-4E0E-A378-7AACFF97FBD0}.Release|x64.Build.0 = Release|x64
{C8368102-F2C5-4E0E-A378-7AACFF97FBD0}.Release|x86.ActiveCfg = Release|x86
{C8368102-F2C5-4E0E-A378-7AACFF97FBD0}.Release|x86.Build.0 = Release|x86
- {F9E767AC-BD5B-48F0-B988-1D3B53BA29FF}.Debug|x64.ActiveCfg = Debug|x86
+ {F9E767AC-BD5B-48F0-B988-1D3B53BA29FF}.Debug|x64.ActiveCfg = Debug|x64
{F9E767AC-BD5B-48F0-B988-1D3B53BA29FF}.Debug|x86.ActiveCfg = Debug|x86
{F9E767AC-BD5B-48F0-B988-1D3B53BA29FF}.Debug|x86.Build.0 = Debug|x86
{F9E767AC-BD5B-48F0-B988-1D3B53BA29FF}.Release - Coloring Disabled|x64.ActiveCfg = Release|x86
@@ -144,11 +144,12 @@ Global
{F9E767AC-BD5B-48F0-B988-1D3B53BA29FF}.Release|x64.Build.0 = Release|x64
{F9E767AC-BD5B-48F0-B988-1D3B53BA29FF}.Release|x86.ActiveCfg = Release|x86
{F9E767AC-BD5B-48F0-B988-1D3B53BA29FF}.Release|x86.Build.0 = Release|x86
- {61B45FDE-2ABA-4EBA-99BB-08ED91F911F4}.Debug|x64.ActiveCfg = Debug|x86
+ {61B45FDE-2ABA-4EBA-99BB-08ED91F911F4}.Debug|x64.ActiveCfg = Debug|x64
+ {61B45FDE-2ABA-4EBA-99BB-08ED91F911F4}.Debug|x64.Build.0 = Debug|x64
{61B45FDE-2ABA-4EBA-99BB-08ED91F911F4}.Debug|x86.ActiveCfg = Debug|x86
{61B45FDE-2ABA-4EBA-99BB-08ED91F911F4}.Debug|x86.Build.0 = Debug|x86
- {61B45FDE-2ABA-4EBA-99BB-08ED91F911F4}.Release - Coloring Disabled|x64.ActiveCfg = Release|x86
- {61B45FDE-2ABA-4EBA-99BB-08ED91F911F4}.Release - Coloring Disabled|x64.Build.0 = Release|x86
+ {61B45FDE-2ABA-4EBA-99BB-08ED91F911F4}.Release - Coloring Disabled|x64.ActiveCfg = Release|x64
+ {61B45FDE-2ABA-4EBA-99BB-08ED91F911F4}.Release - Coloring Disabled|x64.Build.0 = Release|x64
{61B45FDE-2ABA-4EBA-99BB-08ED91F911F4}.Release - Coloring Disabled|x86.ActiveCfg = Release|x86
{61B45FDE-2ABA-4EBA-99BB-08ED91F911F4}.Release - Coloring Disabled|x86.Build.0 = Release|x86
{61B45FDE-2ABA-4EBA-99BB-08ED91F911F4}.Release|x64.ActiveCfg = Release|x64
diff --git a/Installer/Installer.wixproj b/Installer/Installer.wixproj
index 0e564cd99..26d642c4c 100644
--- a/Installer/Installer.wixproj
+++ b/Installer/Installer.wixproj
@@ -97,7 +97,7 @@
-
+
diff --git a/LibDmd/Converter/ColorizerGray4.cs b/LibDmd/Converter/ColorizerGray4.cs
deleted file mode 100644
index 67a4e362f..000000000
--- a/LibDmd/Converter/ColorizerGray4.cs
+++ /dev/null
@@ -1,21 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using LibDmd.Input;
-using LibDmd.Output;
-
-namespace LibDmd.Converter
-{
- public class ColorizerGray4 : IConverter
- {
- public RenderBitLength From { get; } = RenderBitLength.Gray4;
- public RenderBitLength To { get; } = RenderBitLength.Rgb24;
-
- public void Convert(byte[] from, byte[] to)
- {
- throw new NotImplementedException();
- }
- }
-}
diff --git a/LibDmd/FodyWeavers.xml b/LibDmd/FodyWeavers.xml
index 24d236f27..8e32cd8c2 100644
--- a/LibDmd/FodyWeavers.xml
+++ b/LibDmd/FodyWeavers.xml
@@ -1,11 +1,13 @@
-
-
-
-
-
- ProPinballBridge
- ftd2xx
-
-
+
+
+
+ ProPinballBridge
+ ftd2xx
+
+
+ ProPinballBridge
+ ftd2xx
+
+
\ No newline at end of file
diff --git a/LibDmd/FodyWeavers.xsd b/LibDmd/FodyWeavers.xsd
new file mode 100644
index 000000000..05e92c114
--- /dev/null
+++ b/LibDmd/FodyWeavers.xsd
@@ -0,0 +1,141 @@
+
+
+
+
+
+
+
+
+
+
+
+ A list of assembly names to exclude from the default action of "embed all Copy Local references", delimited with line breaks
+
+
+
+
+ A list of assembly names to include from the default action of "embed all Copy Local references", delimited with line breaks.
+
+
+
+
+ A list of runtime assembly names to exclude from the default action of "embed all Copy Local references", delimited with line breaks
+
+
+
+
+ A list of runtime assembly names to include from the default action of "embed all Copy Local references", delimited with line breaks.
+
+
+
+
+ A list of unmanaged 32 bit assembly names to include, delimited with line breaks.
+
+
+
+
+ A list of unmanaged 64 bit assembly names to include, delimited with line breaks.
+
+
+
+
+ The order of preloaded assemblies, delimited with line breaks.
+
+
+
+
+
+ This will copy embedded files to disk before loading them into memory. This is helpful for some scenarios that expected an assembly to be loaded from a physical file.
+
+
+
+
+ Controls if .pdbs for reference assemblies are also embedded.
+
+
+
+
+ Controls if runtime assemblies are also embedded.
+
+
+
+
+ Controls whether the runtime assemblies are embedded with their full path or only with their assembly name.
+
+
+
+
+ Embedded assemblies are compressed by default, and uncompressed when they are loaded. You can turn compression off with this option.
+
+
+
+
+ As part of Costura, embedded assemblies are no longer included as part of the build. This cleanup can be turned off.
+
+
+
+
+ Costura by default will load as part of the module initialization. This flag disables that behavior. Make sure you call CosturaUtility.Initialize() somewhere in your code.
+
+
+
+
+ Costura will by default use assemblies with a name like 'resources.dll' as a satellite resource and prepend the output path. This flag disables that behavior.
+
+
+
+
+ A list of assembly names to exclude from the default action of "embed all Copy Local references", delimited with |
+
+
+
+
+ A list of assembly names to include from the default action of "embed all Copy Local references", delimited with |.
+
+
+
+
+ A list of runtime assembly names to exclude from the default action of "embed all Copy Local references", delimited with |
+
+
+
+
+ A list of runtime assembly names to include from the default action of "embed all Copy Local references", delimited with |.
+
+
+
+
+ A list of unmanaged 32 bit assembly names to include, delimited with |.
+
+
+
+
+ A list of unmanaged 64 bit assembly names to include, delimited with |.
+
+
+
+
+ The order of preloaded assemblies, delimited with |.
+
+
+
+
+
+
+
+ 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.
+
+
+
+
+ A comma-separated list of error codes that can be safely ignored in assembly verification.
+
+
+
+
+ 'false' to turn off automatic generation of the XML Schema file.
+
+
+
+
+
\ No newline at end of file
diff --git a/LibDmd/LibDmd.csproj b/LibDmd/LibDmd.csproj
index 490fff803..1547d3805 100644
--- a/LibDmd/LibDmd.csproj
+++ b/LibDmd/LibDmd.csproj
@@ -1,555 +1,157 @@
-
-
-
-
- Debug
- AnyCPU
- {0318CC71-57C6-4F46-9495-6CACF0CF1505}
- Library
- Properties
- LibDmd
- LibDmd
- v4.5.2
- 512
-
-
-
-
-
- true
- bin\x86\Debug\
- DEBUG;TRACE
- true
- full
- x86
- prompt
- MinimumRecommendedRules.ruleset
-
-
- true
- bin\x86\Release\
- TRACE;PLATFORM_X86
- true
- true
- full
- x86
- prompt
- MinimumRecommendedRules.ruleset
-
-
- true
- bin\x86\Release\
- TRACE;PLATFORM_X86
- true
- true
- full
- x86
- prompt
- MinimumRecommendedRules.ruleset
-
-
- true
- bin\x64\Debug\
- DEBUG;TRACE
- true
- full
- x64
- prompt
- MinimumRecommendedRules.ruleset
-
-
- true
- bin\x64\Release\
- TRACE;PLATFORM_X64
- true
- true
- full
- x64
- prompt
- MinimumRecommendedRules.ruleset
-
-
- true
- bin\x64\Release\
- TRACE;PLATFORM_X64
- true
- true
- full
- x64
- prompt
- MinimumRecommendedRules.ruleset
-
-
-
- ..\packages\CommandLineParser.1.9.71\lib\net45\CommandLine.dll
-
-
- ..\packages\EngineIoClientDotNet.0.9.22\lib\net45\EngineIoClientDotNet.dll
- True
-
-
- ..\packages\FTD2XX.Net.1.0.14\lib\FTD2XX_NET.dll
- True
-
-
- ..\packages\ini-parser.2.3.0\lib\net20\INIFileParser.dll
-
-
- ..\packages\LibUsbDotNet.2.2.8\lib\LibUsbDotNet.dll
- True
-
-
- ..\packages\MediaTypeMap.2.1.0.0\lib\net40\MimeTypeMap.dll
- True
-
-
- ..\packages\Mindscape.Raygun4Net.5.5.1\lib\net40\Mindscape.Raygun4Net.dll
- True
-
-
- ..\packages\Mindscape.Raygun4Net.5.5.1\lib\net40\Mindscape.Raygun4Net4.dll
- True
-
-
- ..\packages\Newtonsoft.Json.8.0.1\lib\net45\Newtonsoft.Json.dll
- True
-
-
- ..\packages\NLog.4.4.12\lib\net45\NLog.dll
- True
-
-
-
-
- ..\packages\SharpAvi.2.1.0\lib\net45\SharpAvi.dll
- True
-
-
- ..\packages\SharpGL.3.1.1\lib\net45\SharpGL.dll
-
-
- ..\packages\SharpGL.SceneGraph.3.1.1\lib\net45\SharpGL.SceneGraph.dll
-
-
- ..\packages\SharpGL.WPF.3.1.1\lib\net45\SharpGL.WPF.dll
-
-
- ..\packages\SkiaSharp.1.68.0-preview28\lib\net45\SkiaSharp.dll
-
-
- ..\packages\SkiaSharp.Svg.1.60.0\lib\portable-net45+win8+wp8+wpa81\SkiaSharp.Extended.Svg.dll
-
-
- ..\packages\SkiaSharp.Views.1.68.0-preview28\lib\net45\SkiaSharp.Views.Desktop.dll
-
-
- ..\packages\SkiaSharp.Views.1.68.0-preview28\lib\net45\SkiaSharp.Views.Gtk.dll
-
-
- ..\packages\SkiaSharp.Views.1.68.0-preview28\lib\net45\SkiaSharp.Views.WPF.dll
-
-
- ..\packages\SocketIoClientDotNet.0.9.13\lib\net45\SocketIoClientDotNet.dll
- True
-
-
-
-
-
- ..\packages\Rx-Core.2.2.5\lib\net45\System.Reactive.Core.dll
- True
-
-
- ..\packages\Rx-Interfaces.2.2.5\lib\net45\System.Reactive.Interfaces.dll
- True
-
-
- ..\packages\Rx-Linq.2.2.5\lib\net45\System.Reactive.Linq.dll
- True
-
-
-
-
-
-
-
-
-
-
-
- ..\packages\WebSocketSharp.1.0.3-rc11\lib\websocket-sharp.dll
- True
-
-
- ..\packages\WebSocket4Net.0.14.1\lib\net45\WebSocket4Net.dll
- True
-
-
-
- ..\packages\WriteableBitmapEx.1.5.0.0\lib\net40\WriteableBitmapEx.Wpf.dll
-
-
- ..\packages\Extended.Wpf.Toolkit.3.4.0\lib\net40\Xceed.Wpf.AvalonDock.dll
-
-
- ..\packages\Extended.Wpf.Toolkit.3.4.0\lib\net40\Xceed.Wpf.AvalonDock.Themes.Aero.dll
-
-
- ..\packages\Extended.Wpf.Toolkit.3.4.0\lib\net40\Xceed.Wpf.AvalonDock.Themes.Metro.dll
-
-
- ..\packages\Extended.Wpf.Toolkit.3.4.0\lib\net40\Xceed.Wpf.AvalonDock.Themes.VS2010.dll
-
-
- ..\packages\Extended.Wpf.Toolkit.3.4.0\lib\net40\Xceed.Wpf.DataGrid.dll
-
-
- ..\packages\Extended.Wpf.Toolkit.3.4.0\lib\net40\Xceed.Wpf.Toolkit.dll
-
-
-
-
- Properties\VersionAssemblyInfo.cs
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- AlphaNumericLayerSetting.xaml
-
-
-
- AlphaNumericSettings.xaml
-
-
- VirtualAlphaNumericDisplay.xaml
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- VirtualDmd.xaml
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- AlphanumericControl.xaml
-
-
- OpenGLControlExt.xaml
-
-
- SliderValueSetting.xaml
-
-
- DmdPaddingSetting.xaml
-
-
- DmdSettings.xaml
-
-
-
-
- VirtualDmdControl.xaml
-
-
-
-
-
-
-
- GrabberWindow.xaml
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Designer
-
-
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Designer
- MSBuild:Compile
-
-
- Designer
- MSBuild:Compile
-
-
- MSBuild:Compile
- Designer
-
-
- MSBuild:Compile
- Designer
-
-
- MSBuild:Compile
- Designer
-
-
- Designer
- MSBuild:Compile
-
-
- Designer
- MSBuild:Compile
-
-
- MSBuild:Compile
- Designer
-
-
- MSBuild:Compile
- Designer
-
-
- MSBuild:Compile
- Designer
-
-
- MSBuild:Compile
- Designer
-
-
-
-
- {668cdaaf-49e4-4b01-bd9d-37d5ae89ddac}
- ProPinballBridge
- True
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
-
-
-
-
-
-
+
+
+ netcoreapp3.1
+ x86;x64
+ Library
+ true
+ LibDmd
+ true
+ false
+ ru;en-US
+ MinimumRecommendedRules.ruleset
+ prompt
+ true
+ full
+
+
+ DEBUG;TRACE
+
+
+ TRACE;PLATFORM_X86
+ true
+
+
+ TRACE;PLATFORM_X86
+ true
+
+
+ DEBUG;TRACE
+
+
+ TRACE;PLATFORM_X64
+ true
+
+
+ TRACE;PLATFORM_X64
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/LibDmd/Properties/PublishProfiles/FolderProfile.pubxml b/LibDmd/Properties/PublishProfiles/FolderProfile.pubxml
new file mode 100644
index 000000000..d96673c98
--- /dev/null
+++ b/LibDmd/Properties/PublishProfiles/FolderProfile.pubxml
@@ -0,0 +1,14 @@
+
+
+
+
+ Release
+ x64
+ bin\x64\Release\netcoreapp3.1\publish\
+ true
+ FileSystem
+ true
+
+
\ No newline at end of file
diff --git a/LibDmd/app.config b/LibDmd/app.config
deleted file mode 100644
index 56bd5d9cb..000000000
--- a/LibDmd/app.config
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/LibDmd/packages.config b/LibDmd/packages.config
deleted file mode 100644
index 25afc4b14..000000000
--- a/LibDmd/packages.config
+++ /dev/null
@@ -1,28 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/PinMameDevice/FodyWeavers.xml b/PinMameDevice/FodyWeavers.xml
index e0a35bd2b..a5dcf04fd 100644
--- a/PinMameDevice/FodyWeavers.xml
+++ b/PinMameDevice/FodyWeavers.xml
@@ -1,4 +1,4 @@
-
-
+
+
\ No newline at end of file
diff --git a/PinMameDevice/FodyWeavers.xsd b/PinMameDevice/FodyWeavers.xsd
new file mode 100644
index 000000000..05e92c114
--- /dev/null
+++ b/PinMameDevice/FodyWeavers.xsd
@@ -0,0 +1,141 @@
+
+
+
+
+
+
+
+
+
+
+
+ A list of assembly names to exclude from the default action of "embed all Copy Local references", delimited with line breaks
+
+
+
+
+ A list of assembly names to include from the default action of "embed all Copy Local references", delimited with line breaks.
+
+
+
+
+ A list of runtime assembly names to exclude from the default action of "embed all Copy Local references", delimited with line breaks
+
+
+
+
+ A list of runtime assembly names to include from the default action of "embed all Copy Local references", delimited with line breaks.
+
+
+
+
+ A list of unmanaged 32 bit assembly names to include, delimited with line breaks.
+
+
+
+
+ A list of unmanaged 64 bit assembly names to include, delimited with line breaks.
+
+
+
+
+ The order of preloaded assemblies, delimited with line breaks.
+
+
+
+
+
+ This will copy embedded files to disk before loading them into memory. This is helpful for some scenarios that expected an assembly to be loaded from a physical file.
+
+
+
+
+ Controls if .pdbs for reference assemblies are also embedded.
+
+
+
+
+ Controls if runtime assemblies are also embedded.
+
+
+
+
+ Controls whether the runtime assemblies are embedded with their full path or only with their assembly name.
+
+
+
+
+ Embedded assemblies are compressed by default, and uncompressed when they are loaded. You can turn compression off with this option.
+
+
+
+
+ As part of Costura, embedded assemblies are no longer included as part of the build. This cleanup can be turned off.
+
+
+
+
+ Costura by default will load as part of the module initialization. This flag disables that behavior. Make sure you call CosturaUtility.Initialize() somewhere in your code.
+
+
+
+
+ Costura will by default use assemblies with a name like 'resources.dll' as a satellite resource and prepend the output path. This flag disables that behavior.
+
+
+
+
+ A list of assembly names to exclude from the default action of "embed all Copy Local references", delimited with |
+
+
+
+
+ A list of assembly names to include from the default action of "embed all Copy Local references", delimited with |.
+
+
+
+
+ A list of runtime assembly names to exclude from the default action of "embed all Copy Local references", delimited with |
+
+
+
+
+ A list of runtime assembly names to include from the default action of "embed all Copy Local references", delimited with |.
+
+
+
+
+ A list of unmanaged 32 bit assembly names to include, delimited with |.
+
+
+
+
+ A list of unmanaged 64 bit assembly names to include, delimited with |.
+
+
+
+
+ The order of preloaded assemblies, delimited with |.
+
+
+
+
+
+
+
+ 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.
+
+
+
+
+ A comma-separated list of error codes that can be safely ignored in assembly verification.
+
+
+
+
+ 'false' to turn off automatic generation of the XML Schema file.
+
+
+
+
+
\ No newline at end of file
diff --git a/PinMameDevice/PinMameDevice.csproj b/PinMameDevice/PinMameDevice.csproj
index c8a91b7b6..7218983f1 100644
--- a/PinMameDevice/PinMameDevice.csproj
+++ b/PinMameDevice/PinMameDevice.csproj
@@ -1,210 +1,72 @@
-
-
-
-
- Debug
- x86
- {3E9138DA-A0A5-449E-BFD2-965E38B9182E}
- Library
- Properties
- PinMameDevice
- DmdDevice
- v4.5.2
- 512
-
-
-
-
-
- true
- bin\x86\Debug\
- DEBUG;TRACE
- full
- x86
- prompt
- MinimumRecommendedRules.ruleset
-
-
- bin\x86\Release\
- TRACE
- true
- pdbonly
- x86
- prompt
- MinimumRecommendedRules.ruleset
-
-
- bin\x86\Release-NoColor\
- TRACE;DISABLE_COLORING
- true
- pdbonly
- x86
- prompt
- MinimumRecommendedRules.ruleset
-
-
- true
- bin\x64\Debug\
- DEBUG;TRACE
- full
- x64
- prompt
- MinimumRecommendedRules.ruleset
-
-
- bin\x64\Release\
- TRACE
- true
- pdbonly
- x64
- prompt
- MinimumRecommendedRules.ruleset
-
-
- bin\x64\Release-NoColor\
- TRACE;DISABLE_COLORING
- true
- pdbonly
- x64
- prompt
- MinimumRecommendedRules.ruleset
-
-
-
- ..\packages\NLog.4.4.12\lib\net45\NLog.dll
- True
-
-
-
-
- ..\packages\UnmanagedExports.1.2.7\lib\net\RGiesecke.DllExport.Metadata.dll
- False
-
-
-
-
- ..\packages\Rx-Core.2.2.5\lib\net45\System.Reactive.Core.dll
- True
-
-
- ..\packages\Rx-Interfaces.2.2.5\lib\net45\System.Reactive.Interfaces.dll
- True
-
-
- ..\packages\Rx-Linq.2.2.5\lib\net45\System.Reactive.Linq.dll
- True
-
-
-
-
-
-
-
-
-
- ..\packages\WebSocketSharp.1.0.3-rc11\lib\websocket-sharp.dll
-
-
-
-
-
- Properties\VersionAssemblyInfo.cs
-
-
-
-
-
-
- Always
-
-
-
-
-
-
-
-
-
-
-
- {0318CC71-57C6-4F46-9495-6CACF0CF1505}
- LibDmd
-
-
-
-
-
-
- This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
-
-
-
-
- if "$(Platform)"=="x64" (
- copy /Y "$(TargetDir)$(TargetName).dll" "$(TargetDir)$(TargetName)64.dll"
-)
-
-if not exist "%25VPM_HOME%25" goto done
-
-if "$(Platform)"=="x64" (
- echo Copying $(TargetName).dll to %25VPM_HOME%25\$(TargetName)64.dll...
- copy /Y "$(TargetDir)$(TargetName).dll" "%25VPM_HOME%25\$(TargetName)64.dll"
-) else (
- echo Copying $(TargetName).dll to %25VPM_HOME%25...
- copy /Y "$(TargetDir)$(TargetName).dll" "%25VPM_HOME%25"
- copy /Y "$(TargetDir)$(TargetName).pdb" "%25VPM_HOME%25"
- copy /Y "$(TargetDir)LibDMD.dll" "%25VPM_HOME%25"
- copy /Y "$(TargetDir)LibDMD.pdb" "%25VPM_HOME%25"
-
-)
-echo Copying DmdDevice.log.config to %25VPM_HOME%25...
-copy /Y "$(TargetDir)DmdDevice.log.config" "%25VPM_HOME%25"
-
-:done
-
-
- 91FC0343-29D4-45DB-97A1-458B52834E48
- DllExport.dll
- PinMameDevice
- true
- false
- Auto
- 1
- false
- false
- false
- false
- 30000
- 2
- 0
- 0
- 0
-
-
-
-
-
-
-
-
-
-
-
-
- $(SolutionDir)packages\DllExport.1.7.4\gcache\$(DllExportMetaXBase)\$(DllExportNamespace)\$(DllExportMetaLibName)
- False
- False
-
-
-
-
-
-
-
+
+
+ netcoreapp3.1
+ x86;x64
+ Library
+ PinMameDevice
+ DmdDevice
+ {3E9138DA-A0A5-449E-BFD2-965E38B9182E}
+ Properties
+ 512
+ true
+ false
+
+
+
+
+
+
+ 1.7.4
+ false
+ 1
+
+
+
+
+
+
+
+
+
+
+ 91FC0343-29D4-45DB-97A1-458B52834E48
+ DllExport.dll
+ PinMameDevice
+ true
+ false
+ Auto
+ 1
+ false
+ false
+ false
+ false
+ 30000
+ 2
+ 0
+ 0
+ 0
+
+
+
+
+
+
+
+
+
+
+
+
+ $(SolutionDir)packages\DllExport.1.7.4\gcache\$(DllExportMetaXBase)\$(DllExportNamespace)\$(DllExportMetaLibName)
+ False
+ False
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/PinMameDevice/app.config b/PinMameDevice/app.config
deleted file mode 100644
index 56bd5d9cb..000000000
--- a/PinMameDevice/app.config
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/PinMameDevice/packages.config b/PinMameDevice/packages.config
deleted file mode 100644
index 9eb9dd6f9..000000000
--- a/PinMameDevice/packages.config
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/PinMameTest/App.config b/PinMameTest/App.config
deleted file mode 100644
index d740e8860..000000000
--- a/PinMameTest/App.config
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/PinMameTest/App.xaml b/PinMameTest/App.xaml
deleted file mode 100644
index a20b39179..000000000
--- a/PinMameTest/App.xaml
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-
-
diff --git a/PinMameTest/App.xaml.cs b/PinMameTest/App.xaml.cs
deleted file mode 100644
index a3a3b7765..000000000
--- a/PinMameTest/App.xaml.cs
+++ /dev/null
@@ -1,17 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Configuration;
-using System.Data;
-using System.Linq;
-using System.Threading.Tasks;
-using System.Windows;
-
-namespace Example
-{
- ///
- /// Interaction logic for App.xaml
- ///
- public partial class App : Application
- {
- }
-}
diff --git a/PinMameTest/DMDDeviceDll.cs b/PinMameTest/DMDDeviceDll.cs
new file mode 100644
index 000000000..6ba67ff38
--- /dev/null
+++ b/PinMameTest/DMDDeviceDll.cs
@@ -0,0 +1,238 @@
+using NLog;
+using System;
+using System.IO;
+using System.Reflection;
+using System.Runtime.InteropServices;
+
+namespace PinMameTest
+{
+ public static class NativeLibrary
+ {
+ [DllImport("kernel32.dll")]
+ public static extern IntPtr LoadLibrary(string dllToLoad);
+
+ [DllImport("kernel32.dll")]
+ public static extern IntPtr GetProcAddress(IntPtr hModule, string procedureName);
+
+ [DllImport("kernel32.dll")]
+ public static extern bool FreeLibrary(IntPtr hModule);
+ }
+
+ /* Unimplemented methods:
+ [DllImport("dmddevice", EntryPoint = "Console_Data", CallingConvention = CallingConvention.Cdecl)]
+ public static extern void ConsoleData(byte data);
+
+ [DllImport("dmddevice", EntryPoint = "Render_PM_Alphanumeric_Frame", CallingConvention = CallingConvention.Cdecl)]
+ public static extern void RenderAlphaNum(NumericalLayout numericalLayout, IntPtr seg_data, IntPtr seg_data2);
+
+ [DllImport("dmddevice", EntryPoint = "Set_4_Colors_Palette", CallingConvention = CallingConvention.Cdecl)]
+ public static extern void SetGray2Palette(Rgb24 color0, Rgb24 color33, Rgb24 color66, Rgb24 color100);
+
+ [DllImport("dmddevice", EntryPoint = "Set_16_Colors_Palette", CallingConvention = CallingConvention.Cdecl)]
+ public static extern void SetGray4Palette(IntPtr palette);
+ */
+
+ public class DMDDeviceDll : IDisposable
+ {
+ [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
+ delegate int OpenCloseDelegate();
+
+ [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
+ delegate void RenderDelegate(ushort width, ushort height, IntPtr currbuffer);
+
+ [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
+ delegate void RenderAlphaNumericDelegate(NumericalLayout numericalLayout, IntPtr seg_data, IntPtr seg_data2);
+
+ [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
+ delegate void GameSettingsDelegate(string gameName, ulong hardwareGeneration, IntPtr options);
+
+ [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
+ delegate int CreateDeviceDelegate();
+
+ [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
+ delegate int OpenCloseDeviceDelegate(int id);
+
+ [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
+ delegate void RenderDeviceDelegate(int id, ushort width, ushort height, IntPtr currbuffer);
+
+ [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
+ delegate void RenderAlphaNumericDeviceDelegate(int id, NumericalLayout numericalLayout, IntPtr seg_data, IntPtr seg_data2);
+
+ [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
+ delegate void GameSettingsDeviceDelegate(int id, string gameName, ulong hardwareGeneration, IntPtr options);
+
+ private IntPtr _dllhandle = IntPtr.Zero;
+ private readonly OpenCloseDelegate _open = null;
+ private readonly OpenCloseDelegate _close = null;
+ private readonly RenderDelegate _renderRgb24 = null;
+ private readonly RenderDelegate _renderGray4 = null;
+ private readonly RenderDelegate _renderGray2 = null;
+ private readonly RenderAlphaNumericDelegate _renderAlphaNumeric = null;
+ private readonly GameSettingsDelegate _gameSettings = null;
+ private readonly CreateDeviceDelegate _createDevice = null;
+ private readonly OpenCloseDeviceDelegate _openDevice = null;
+ private readonly OpenCloseDeviceDelegate _closeDevice = null;
+ private readonly RenderDeviceDelegate _renderRgb24Device = null;
+ private readonly RenderDeviceDelegate _renderGray4Device = null;
+ private readonly RenderDeviceDelegate _renderGray2Device = null;
+ private readonly RenderAlphaNumericDeviceDelegate _renderAlphaNumericDevice = null;
+ private readonly GameSettingsDeviceDelegate _gameSettingsDevice = null;
+ private int _id = -1;
+
+ public DMDDeviceDll(string basename = "dmddevice", bool errorOnMissing = true)
+ {
+ string libraryName = basename + ".dll";
+ // if (Environment.Is64BitProcess) libraryName = basename + "64.dll";
+ var fullPath = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), libraryName);
+ _dllhandle = NativeLibrary.LoadLibrary(fullPath);
+ if (_dllhandle != IntPtr.Zero)
+ {
+ LogManager.GetCurrentClassLogger().Info("Loaded {0} from {1} to create a virtual DMD", libraryName, fullPath);
+ var openHandle = NativeLibrary.GetProcAddress(_dllhandle, "Open");
+ if (openHandle != IntPtr.Zero) _open = (OpenCloseDelegate)Marshal.GetDelegateForFunctionPointer(openHandle, typeof(OpenCloseDelegate));
+ var closeHandle = NativeLibrary.GetProcAddress(_dllhandle, "Close");
+ if (closeHandle != IntPtr.Zero) _close = (OpenCloseDelegate)Marshal.GetDelegateForFunctionPointer(closeHandle, typeof(OpenCloseDelegate));
+ var renderGray2Handle = NativeLibrary.GetProcAddress(_dllhandle, "Render_4_Shades");
+ if (renderGray2Handle != IntPtr.Zero) _renderGray2 = (RenderDelegate)Marshal.GetDelegateForFunctionPointer(renderGray2Handle, typeof(RenderDelegate));
+ var renderGray4Handle = NativeLibrary.GetProcAddress(_dllhandle, "Render_16_Shades");
+ if (renderGray4Handle != IntPtr.Zero) _renderGray4 = (RenderDelegate)Marshal.GetDelegateForFunctionPointer(renderGray4Handle, typeof(RenderDelegate));
+ var renderRgb24Handle = NativeLibrary.GetProcAddress(_dllhandle, "Render_RGB24");
+ if (renderRgb24Handle != IntPtr.Zero) _renderRgb24 = (RenderDelegate)Marshal.GetDelegateForFunctionPointer(renderRgb24Handle, typeof(RenderDelegate));
+ var renderAlphaNumericHandle = NativeLibrary.GetProcAddress(_dllhandle, "Render_PM_Alphanumeric_Frame");
+ if (renderAlphaNumericHandle != IntPtr.Zero) _renderAlphaNumeric = (RenderAlphaNumericDelegate)Marshal.GetDelegateForFunctionPointer(renderAlphaNumericHandle, typeof(RenderAlphaNumericDelegate));
+ var gameSettingsHandle = NativeLibrary.GetProcAddress(_dllhandle, "PM_GameSettings");
+ if (gameSettingsHandle != IntPtr.Zero) _gameSettings = (GameSettingsDelegate)Marshal.GetDelegateForFunctionPointer(gameSettingsHandle, typeof(GameSettingsDelegate));
+ var createDeviceHandle = NativeLibrary.GetProcAddress(_dllhandle, "Create_Device");
+ if (createDeviceHandle != IntPtr.Zero) _createDevice = (CreateDeviceDelegate)Marshal.GetDelegateForFunctionPointer(createDeviceHandle, typeof(CreateDeviceDelegate));
+ var openDeviceHandle = NativeLibrary.GetProcAddress(_dllhandle, "Open_Device");
+ if (openDeviceHandle != IntPtr.Zero) _openDevice = (OpenCloseDeviceDelegate)Marshal.GetDelegateForFunctionPointer(openDeviceHandle, typeof(OpenCloseDeviceDelegate));
+ var closeDeviceHandle = NativeLibrary.GetProcAddress(_dllhandle, "Close_Device");
+ if (closeDeviceHandle != IntPtr.Zero) _closeDevice = (OpenCloseDeviceDelegate)Marshal.GetDelegateForFunctionPointer(closeDeviceHandle, typeof(OpenCloseDeviceDelegate));
+ var renderGray2DeviceHandle = NativeLibrary.GetProcAddress(_dllhandle, "Render_4_Shades_Device");
+ if (renderGray2DeviceHandle != IntPtr.Zero) _renderGray2Device = (RenderDeviceDelegate)Marshal.GetDelegateForFunctionPointer(renderGray2DeviceHandle, typeof(RenderDeviceDelegate));
+ var renderGray4DeviceHandle = NativeLibrary.GetProcAddress(_dllhandle, "Render_16_Shades_Device");
+ if (renderGray4DeviceHandle != IntPtr.Zero) _renderGray4Device = (RenderDeviceDelegate)Marshal.GetDelegateForFunctionPointer(renderGray4DeviceHandle, typeof(RenderDeviceDelegate));
+ var renderRgb24DeviceHandle = NativeLibrary.GetProcAddress(_dllhandle, "Render_RGB24_Device");
+ if (renderRgb24DeviceHandle != IntPtr.Zero) _renderRgb24Device = (RenderDeviceDelegate)Marshal.GetDelegateForFunctionPointer(renderRgb24DeviceHandle, typeof(RenderDeviceDelegate));
+ var renderAlphaNumericDeviceHandle = NativeLibrary.GetProcAddress(_dllhandle, "Render_PM_Alphanumeric_Frame_Device");
+ if (renderAlphaNumericDeviceHandle != IntPtr.Zero) _renderAlphaNumericDevice = (RenderAlphaNumericDeviceDelegate)Marshal.GetDelegateForFunctionPointer(renderAlphaNumericDeviceHandle, typeof(RenderAlphaNumericDeviceDelegate));
+ var gameSettingsDeviceHandle = NativeLibrary.GetProcAddress(_dllhandle, "PM_GameSettings_Device");
+ if (gameSettingsDeviceHandle != IntPtr.Zero) _gameSettingsDevice = (GameSettingsDeviceDelegate)Marshal.GetDelegateForFunctionPointer(gameSettingsDeviceHandle, typeof(GameSettingsDeviceDelegate));
+ }
+ else
+ {
+ if (errorOnMissing)
+ {
+ LogManager.GetCurrentClassLogger().Error("Failed to load {0} from {1}", libraryName, fullPath);
+ }
+ else
+ {
+ LogManager.GetCurrentClassLogger().Info("{0} was not loaded since it is not available from {1}", libraryName, fullPath);
+ }
+ }
+ }
+
+ public void Dispose()
+ {
+ if (_dllhandle != IntPtr.Zero)
+ {
+ LogManager.GetCurrentClassLogger().Info("Disposing DMD dynamic link library");
+ NativeLibrary.FreeLibrary(_dllhandle);
+ }
+ _dllhandle = IntPtr.Zero;
+ }
+
+ ~DMDDeviceDll()
+ {
+ if (_dllhandle != IntPtr.Zero)
+ LogManager.GetCurrentClassLogger().Error("DMD dynamic link library was not disposed before destructor call");
+ Dispose();
+ }
+
+ public int Open()
+ {
+ if (_createDevice != null && _openDevice != null)
+ {
+ _id = _createDevice();
+ return _openDevice(_id);
+ }
+ if (_open != null) return _open();
+ return 0;
+ }
+
+ public int Close()
+ {
+ if (_id >= 0 && _closeDevice != null) return _closeDevice(_id);
+ if (_close != null) return _close();
+ return 0;
+ }
+
+ public void RenderRgb24(ushort width, ushort height, IntPtr currbuffer)
+ {
+ if (_id >= 0) _renderRgb24Device?.Invoke(_id, width, height, currbuffer); else _renderRgb24?.Invoke(width, height, currbuffer);
+ }
+
+ public void RenderGray4(ushort width, ushort height, IntPtr currbuffer)
+ {
+ if (_id >= 0) _renderGray4Device?.Invoke(_id, width, height, currbuffer); else _renderGray4?.Invoke(width, height, currbuffer);
+ }
+
+ public void RenderGray2(ushort width, ushort height, IntPtr currbuffer)
+ {
+ if (_id >= 0) _renderGray2Device?.Invoke(_id, width, height, currbuffer); else _renderGray2?.Invoke(width, height, currbuffer);
+ }
+
+ public void RenderAlphaNumeric(NumericalLayout numericalLayout, IntPtr seg_data, IntPtr seg_data2)
+ {
+ if (_id >= 0) _renderAlphaNumericDevice?.Invoke(_id, numericalLayout, seg_data, seg_data2); else _renderAlphaNumeric?.Invoke(numericalLayout, seg_data, seg_data2);
+ }
+
+ public void GameSettings(string gameName, ulong hardwareGeneration, PMoptions options)
+ {
+ IntPtr ptr = Marshal.AllocHGlobal(19 * sizeof(int));
+ Marshal.StructureToPtr(options, ptr, true);
+ if (_id >= 0) _gameSettingsDevice?.Invoke(_id, gameName, hardwareGeneration, ptr); else _gameSettings?.Invoke(gameName, hardwareGeneration, ptr);
+ Marshal.FreeHGlobal(ptr);
+ }
+
+ public enum NumericalLayout
+ {
+ None,
+ __2x16Alpha,
+ __2x20Alpha,
+ __2x7Alpha_2x7Num,
+ __2x7Alpha_2x7Num_4x1Num,
+ __2x7Num_2x7Num_4x1Num,
+ __2x7Num_2x7Num_10x1Num,
+ __2x7Num_2x7Num_4x1Num_gen7,
+ __2x7Num10_2x7Num10_4x1Num,
+ __2x6Num_2x6Num_4x1Num,
+ __2x6Num10_2x6Num10_4x1Num,
+ __4x7Num10,
+ __6x4Num_4x1Num,
+ __2x7Num_4x1Num_1x16Alpha,
+ __1x16Alpha_1x16Num_1x7Num
+ }
+
+ [StructLayout(LayoutKind.Sequential)]
+ public struct PMoptions
+ {
+ public int Red, Green, Blue;
+ public int Perc66, Perc33, Perc0;
+ public int DmdOnly, Compact, Antialias;
+ public int Colorize;
+ public int Red66, Green66, Blue66;
+ public int Red33, Green33, Blue33;
+ public int Red0, Green0, Blue0;
+ }
+
+ [StructLayout(LayoutKind.Sequential), Serializable]
+ public struct Rgb24
+ {
+ public char Red;
+ public char Green;
+ public char Blue;
+ }
+
+ }
+}
diff --git a/PinMameTest/Example.csproj.DotSettings b/PinMameTest/Example.csproj.DotSettings
deleted file mode 100644
index 6e7fff86a..000000000
--- a/PinMameTest/Example.csproj.DotSettings
+++ /dev/null
@@ -1,2 +0,0 @@
-
- No
\ No newline at end of file
diff --git a/PinMameTest/MainWindow.xaml b/PinMameTest/MainWindow.xaml
deleted file mode 100644
index 6556c0956..000000000
--- a/PinMameTest/MainWindow.xaml
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
diff --git a/PinMameTest/MainWindow.xaml.cs b/PinMameTest/MainWindow.xaml.cs
deleted file mode 100644
index 1ff8b61ee..000000000
--- a/PinMameTest/MainWindow.xaml.cs
+++ /dev/null
@@ -1,33 +0,0 @@
-using System;
-using System.Threading;
-using System.Windows;
-using System.Windows.Media;
-
-namespace PinMameTest
-{
- ///
- /// Interaction logic for MainWindow.xaml
- ///
- /// !!! DisconnectedContext can be ignored (don't break) !!!
- ///
- ///
- public partial class MainWindow : Window
- {
- private VPinMameController Controller;
-
- public MainWindow()
- {
- InitializeComponent();
-
- Console.WriteLine("[{0}] Starting...", Thread.CurrentThread.ManagedThreadId);
-
- Controller = new VPinMameController();
- //Controller.Run("sshtl_l7").Subscribe(status => {
- //Controller.Run("sprk_103").Subscribe(status => {
- Controller.Run("tz_92").Subscribe(status => {
-
- Console.WriteLine("[{0}] Game status: {1}", Thread.CurrentThread.ManagedThreadId, status);
- });
- }
- }
-}
diff --git a/PinMameTest/PinMameTest.csproj b/PinMameTest/PinMameTest.csproj
index 2f1d360fa..372004b5f 100644
--- a/PinMameTest/PinMameTest.csproj
+++ b/PinMameTest/PinMameTest.csproj
@@ -1,186 +1,41 @@
-
-
-
-
- Debug
- x86
- {C8368102-F2C5-4E0E-A378-7AACFF97FBD0}
- WinExe
- Properties
- PinMameTest
- PinMameTest
- v4.5.2
- 512
- {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
- 4
- true
-
-
-
- true
- bin\x86\Debug\
- DEBUG;TRACE
- true
- full
- x86
- prompt
- MinimumRecommendedRules.ruleset
- true
-
-
- bin\x86\Release\
- TRACE
- true
- pdbonly
- x86
- prompt
- MinimumRecommendedRules.ruleset
- true
-
-
- bin\x86\Release - Coloring Disabled\
- TRACE
- true
- pdbonly
- x86
- prompt
- MinimumRecommendedRules.ruleset
- true
-
-
- true
- bin\x64\Debug\
- DEBUG;TRACE
- true
- full
- x64
- prompt
- MinimumRecommendedRules.ruleset
- true
-
-
- bin\x64\Release\
- TRACE
- true
- pdbonly
- x64
- prompt
- MinimumRecommendedRules.ruleset
- true
-
-
- bin\x64\Release - Coloring Disabled\
- TRACE
- true
- pdbonly
- x64
- prompt
- MinimumRecommendedRules.ruleset
- true
-
-
-
-
-
- ..\packages\Rx-Core.2.2.5\lib\net45\System.Reactive.Core.dll
- True
-
-
- ..\packages\Rx-Interfaces.2.2.5\lib\net45\System.Reactive.Interfaces.dll
- True
-
-
- ..\packages\Rx-Linq.2.2.5\lib\net45\System.Reactive.Linq.dll
- True
-
-
- ..\packages\Rx-PlatformServices.2.2.5\lib\net45\System.Reactive.PlatformServices.dll
- True
-
-
-
-
-
-
-
-
- 4.0
-
-
-
-
-
-
-
- MSBuild:Compile
- Designer
-
-
- MSBuild:Compile
- Designer
-
-
- App.xaml
- Code
-
-
- MainWindow.xaml
- Code
-
-
- MSBuild:Compile
- Designer
-
-
-
-
-
- Code
-
-
- True
- True
- Resources.resx
-
-
- True
- Settings.settings
- True
-
-
- ResXFileCodeGenerator
- Resources.Designer.cs
-
-
- Always
-
-
-
- SettingsSingleFileGenerator
- Settings.Designer.cs
-
-
-
-
-
-
-
-
- {57270B76-C846-4B1E-88D4-53C8337A0623}
- 1
- 0
- 0
- tlbimp
- False
- True
-
-
-
-
+
+
+ netcoreapp3.1
+ x86;x64
+ Exe
+ true
+ false
+ MinimumRecommendedRules.ruleset
+
+
+
+
+
+
+
+ Always
+
+
+
+
+
+ {57270B76-C846-4B1E-88D4-53C8337A0623}
+ 1
+ 0
+ 0
+ tlbimp
+ False
+ True
+
+
+
+
+
\ No newline at end of file
diff --git a/PinMameTest/Program.cs b/PinMameTest/Program.cs
new file mode 100644
index 000000000..67225014c
--- /dev/null
+++ b/PinMameTest/Program.cs
@@ -0,0 +1,67 @@
+using System;
+using System.Runtime.InteropServices;
+using System.Threading;
+using PinMameDevice;
+
+namespace PinMameTest
+{
+ class Program
+ {
+ static void Main(string[] args)
+ {
+ byte[] bytes = new byte[128 * 32 * 3];
+ IntPtr frame = Marshal.AllocHGlobal(bytes.Length);
+ for (int y = 0; y < 32; y++)
+ {
+ for (int x = 0; x < 128; x++)
+ {
+ bytes[x * 3 + y * 128 * 3] = (byte)(x * 2);
+ bytes[x * 3 + y * 128 * 3 + 1] = (byte)(y * 4);
+ }
+ }
+ Marshal.Copy(bytes, 0, frame, bytes.Length);
+ var options = new DMDDeviceDll.PMoptions();
+ IntPtr optPtr = Marshal.AllocHGlobal(Marshal.SizeOf(options));
+ Marshal.StructureToPtr(options, optPtr, true);
+
+ if (args.Length == 0 || args[0].Equals("VPinMame"))
+ {
+ Console.WriteLine("Testing PinMame device access through VPinMame COM object.");
+ Console.WriteLine("[{0}] Starting...", Thread.CurrentThread.ManagedThreadId);
+ var controller = new VPinMameController();
+ //Controller.Run("sshtl_l7").Subscribe(status => {
+ //Controller.Run("sprk_103").Subscribe(status => {
+ controller.Run("tz_92").Subscribe(status =>
+ {
+ Console.WriteLine("[{0}] Game status: {1}", Thread.CurrentThread.ManagedThreadId, status);
+ });
+ Thread.Sleep(10000);
+ }
+ else if (args.Length >= 1 && args[0].Equals("Project"))
+ {
+ Console.WriteLine("Testing PinMame device access through direct project reference (embedding).");
+ var dmdId = DmdDevice.CreateDevice();
+ DmdDevice.OpenDevice(dmdId);
+ DmdDevice.GameSettingsDevice(dmdId, "test_direct", 0, optPtr);
+ DmdDevice.RenderRgb24Device(dmdId, 128, 32, frame);
+ Thread.Sleep(10000);
+ DmdDevice.CloseDevice(dmdId);
+ }
+ else if (args.Length >= 1 && args[0].Equals("DLL"))
+ {
+ Console.WriteLine("Testing PinMame device access through DLL loading.");
+ var dmdFromDll = new DMDDeviceDll("DmdDevice", true);
+ dmdFromDll.Open();
+ dmdFromDll.GameSettings("test_dll", 0, options);
+ dmdFromDll.RenderRgb24(128, 32, frame);
+ Thread.Sleep(10000);
+ dmdFromDll.Close();
+ dmdFromDll.Dispose();
+ }
+
+ Console.WriteLine("Done.");
+ Marshal.FreeHGlobal(optPtr);
+ Marshal.FreeHGlobal(frame);
+ }
+ }
+}
diff --git a/PinMameTest/Properties/AssemblyInfo.cs b/PinMameTest/Properties/AssemblyInfo.cs
index 5585d2f16..2b3c03a35 100644
--- a/PinMameTest/Properties/AssemblyInfo.cs
+++ b/PinMameTest/Properties/AssemblyInfo.cs
@@ -7,11 +7,11 @@
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
-[assembly: AssemblyTitle("Example")]
+[assembly: AssemblyTitle("PinMameTest")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("Example")]
+[assembly: AssemblyProduct("PinMameTest")]
[assembly: AssemblyCopyright("Copyright © 2016")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
@@ -31,14 +31,14 @@
//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
-[assembly: ThemeInfo(
+/* FIXME [assembly: ThemeInfo(
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
//(used if a resource is not found in the page,
// or application resource dictionaries)
ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
//(used if a resource is not found in the page,
// app, or any theme specific resource dictionaries)
-)]
+)]*/
// Version information for an assembly consists of the following four values:
diff --git a/PinMameTest/Properties/Resources.Designer.cs b/PinMameTest/Properties/Resources.Designer.cs
deleted file mode 100644
index 293cd6619..000000000
--- a/PinMameTest/Properties/Resources.Designer.cs
+++ /dev/null
@@ -1,63 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by a tool.
-// Runtime Version:4.0.30319.42000
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-namespace PinMameTest.Properties {
- using System;
-
-
- ///
- /// A strongly-typed resource class, for looking up localized strings, etc.
- ///
- // This class was auto-generated by the StronglyTypedResourceBuilder
- // class via a tool like ResGen or Visual Studio.
- // To add or remove a member, edit your .ResX file then rerun ResGen
- // with the /str option, or rebuild your VS project.
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- internal class Resources {
-
- private static global::System.Resources.ResourceManager resourceMan;
-
- private static global::System.Globalization.CultureInfo resourceCulture;
-
- [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
- internal Resources() {
- }
-
- ///
- /// Returns the cached ResourceManager instance used by this class.
- ///
- [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
- internal static global::System.Resources.ResourceManager ResourceManager {
- get {
- if (object.ReferenceEquals(resourceMan, null)) {
- global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("PinMameTest.Properties.Resources", typeof(Resources).Assembly);
- resourceMan = temp;
- }
- return resourceMan;
- }
- }
-
- ///
- /// Overrides the current thread's CurrentUICulture property for all
- /// resource lookups using this strongly typed resource class.
- ///
- [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
- internal static global::System.Globalization.CultureInfo Culture {
- get {
- return resourceCulture;
- }
- set {
- resourceCulture = value;
- }
- }
- }
-}
diff --git a/PinMameTest/Properties/Resources.resx b/PinMameTest/Properties/Resources.resx
deleted file mode 100644
index ffecec851..000000000
--- a/PinMameTest/Properties/Resources.resx
+++ /dev/null
@@ -1,117 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- text/microsoft-resx
-
-
- 2.0
-
-
- System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
\ No newline at end of file
diff --git a/PinMameTest/Properties/Settings.Designer.cs b/PinMameTest/Properties/Settings.Designer.cs
deleted file mode 100644
index 6a613bfd0..000000000
--- a/PinMameTest/Properties/Settings.Designer.cs
+++ /dev/null
@@ -1,26 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by a tool.
-// Runtime Version:4.0.30319.42000
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-namespace PinMameTest.Properties {
-
-
- [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "14.0.0.0")]
- internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
-
- private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
-
- public static Settings Default {
- get {
- return defaultInstance;
- }
- }
- }
-}
diff --git a/PinMameTest/Properties/Settings.settings b/PinMameTest/Properties/Settings.settings
deleted file mode 100644
index 8f2fd95d6..000000000
--- a/PinMameTest/Properties/Settings.settings
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/PinMameTest/Properties/launchSettings.json b/PinMameTest/Properties/launchSettings.json
new file mode 100644
index 000000000..438f7387e
--- /dev/null
+++ b/PinMameTest/Properties/launchSettings.json
@@ -0,0 +1,8 @@
+{
+ "profiles": {
+ "PinMameTest": {
+ "commandName": "Project",
+ "commandLineArgs": "VPinMame"
+ }
+ }
+}
\ No newline at end of file
diff --git a/PinMameTest/Themes/Generic.xaml b/PinMameTest/Themes/Generic.xaml
deleted file mode 100644
index 704b5246f..000000000
--- a/PinMameTest/Themes/Generic.xaml
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
diff --git a/PinMameTest/packages.config b/PinMameTest/packages.config
deleted file mode 100644
index 985bef339..000000000
--- a/PinMameTest/packages.config
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/ProPinballBridge/ProPinballBridge.vcxproj b/ProPinballBridge/ProPinballBridge.vcxproj
index e92c18284..8bfb3b7ba 100644
--- a/ProPinballBridge/ProPinballBridge.vcxproj
+++ b/ProPinballBridge/ProPinballBridge.vcxproj
@@ -28,53 +28,35 @@
{668CDAAF-49E4-4B01-BD9D-37D5AE89DDAC}
- v4.5.2
+ DynamicLibrary
+ NetCore
+ netcoreapp3.1
ManagedCProj
ProPinballBridge
10.0
+
+
+ v142
+ Unicode
- DynamicLibrary
true
- v142
- true
- Unicode
- DynamicLibrary
false
- v142
- true
- Unicode
- DynamicLibrary
false
- v142
- true
- Unicode
- DynamicLibrary
true
- v142
- true
- Unicode
- DynamicLibrary
false
- v142
- true
- Unicode
- DynamicLibrary
false
- v142
- true
- Unicode
@@ -99,7 +81,6 @@
-
true
$(Configuration)\$(Platform)\
diff --git a/ProPinballDmdSlave/App.config b/ProPinballDmdSlave/App.config
deleted file mode 100644
index d740e8860..000000000
--- a/ProPinballDmdSlave/App.config
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/ProPinballDmdSlave/ProPinballDmdSlave.csproj b/ProPinballDmdSlave/ProPinballDmdSlave.csproj
index d53b7e628..254ac6eaf 100644
--- a/ProPinballDmdSlave/ProPinballDmdSlave.csproj
+++ b/ProPinballDmdSlave/ProPinballDmdSlave.csproj
@@ -1,92 +1,36 @@
-
-
-
+
- Debug
- x86
- {A4568212-D058-419F-A328-CFF92BD666CE}
+ netcoreapp3.1
+ x86;x64
+
Exe
- Properties
- ProPinballDmdSlave
- ProPinballDmdSlave
- v4.5.2
- 512
- true
-
+ false
+ true
-
- true
+
-
+
-
- {668cdaaf-49e4-4b01-bd9d-37d5ae89ddac}
- ProPinballBridge
-
+
+
-
-
\ No newline at end of file
diff --git a/ProPinballSlave/ProPinballSlave.vcxproj b/ProPinballSlave/ProPinballSlave.vcxproj
index 5921a28cc..f1c0986c7 100644
--- a/ProPinballSlave/ProPinballSlave.vcxproj
+++ b/ProPinballSlave/ProPinballSlave.vcxproj
@@ -40,7 +40,7 @@
{AD8F664A-B792-4D67-BAAB-F19654A59697}
- v4.6.1
+ netcoreapp3.1
ManagedCProj
ProPinballSlave
10.0
@@ -141,7 +141,6 @@
-
true