diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index cceeb7203f5..ce9707d3f08 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -16,7 +16,7 @@ jobs:
- name: Install .NET SDK
uses: actions/setup-dotnet@v4
with:
- dotnet-version: "8"
+ dotnet-version: "10"
- name: Debug build with analyzers
run: Dist/BuildDebug.sh -p:ContinuousIntegrationBuild=true -warnaserror
@@ -40,10 +40,10 @@ jobs:
- name: Install .NET SDK
uses: actions/setup-dotnet@v4
with:
- dotnet-version: "8"
+ dotnet-version: "10"
- name: Test
- run: dotnet test BizHawk.sln -c Release -p:ContinuousIntegrationBuild=true -p:RunStyleCop=false
+ run: dotnet test BizHawk.slnx -c Release -p:ContinuousIntegrationBuild=true -p:RunStyleCop=false
shell: pwsh
package:
@@ -56,7 +56,7 @@ jobs:
- name: Install .NET SDK
uses: actions/setup-dotnet@v4
with:
- dotnet-version: "8"
+ dotnet-version: "10"
- name: Build solution
run: Dist/BuildRelease.sh
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index f21dbeb7e35..729419f467a 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -16,7 +16,7 @@ jobs:
- name: Install .NET SDK
uses: actions/setup-dotnet@v4
with:
- dotnet-version: "8"
+ dotnet-version: "10"
- name: Get BizHawk version
run: echo "BIZHAWK_VERSION=$(grep -Po "MainVersion = \"\K(.*)(?=\")" src/BizHawk.Common/VersionInfo.cs)" >> $GITHUB_ENV
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index e2352128f0f..0728e1df042 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -24,7 +24,7 @@ stages:
CACHIX_CACHE_NAME: mono-for-bizhawk
.with_dotnet_sdk:
- image: mcr.microsoft.com/dotnet/sdk:8.0
+ image: mcr.microsoft.com/dotnet/sdk:10.0
build_asms_debug:
artifacts:
diff --git a/BizHawk.sln b/BizHawk.sln
deleted file mode 100644
index 380906593ad..00000000000
--- a/BizHawk.sln
+++ /dev/null
@@ -1,136 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio Version 17
-VisualStudioVersion = 17.5.33627.172
-MinimumVisualStudioVersion = 16.0.28729.10
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BizHawk.Client.Common", "src\BizHawk.Client.Common\BizHawk.Client.Common.csproj", "{24A0AA3C-B25F-4197-B23D-476D6462DBA0}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BizHawk.Common", "src\BizHawk.Common\BizHawk.Common.csproj", "{866F8D13-0678-4FF9-80A4-A3993FD4D8A3}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BizHawk.Client.EmuHawk", "src\BizHawk.Client.EmuHawk\BizHawk.Client.EmuHawk.csproj", "{DD448B37-BA3F-4544-9754-5406E8094723}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BizHawk.Client.DiscoHawk", "src\BizHawk.Client.DiscoHawk\BizHawk.Client.DiscoHawk.csproj", "{C4366030-6D03-424B-AE53-F4F43BB217C3}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BizHawk.Emulation.DiscSystem", "src\BizHawk.Emulation.DiscSystem\BizHawk.Emulation.DiscSystem.csproj", "{F51946EA-827F-4D82-B841-1F2F6D060312}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BizHawk.Emulation.Common", "src\BizHawk.Emulation.Common\BizHawk.Emulation.Common.csproj", "{E1A23168-B571-411C-B360-2229E7225E0E}"
-EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Client", "Client", "{B51F1139-3D2C-41BE-A762-EF1F9B41EACA}"
-EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Emulation", "Emulation", "{3627C08B-3E43-4224-9DA4-40BD69495FBC}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BizHawk.Emulation.Cores", "src\BizHawk.Emulation.Cores\BizHawk.Emulation.Cores.csproj", "{197D4314-8A9F-49BA-977D-54ACEFAEB6BA}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BizHawk.Bizware.Audio", "src\BizHawk.Bizware.Audio\BizHawk.Bizware.Audio.csproj", "{9F84A0B2-861E-4EF4-B89B-5E2A3F38A465}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BizHawk.Bizware.Input", "src\BizHawk.Bizware.Input\BizHawk.Bizware.Input.csproj", "{17E7D20D-198C-4728-ACEC-065DE834FF02}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BizHawk.Bizware.Graphics", "src\BizHawk.Bizware.Graphics\BizHawk.Bizware.Graphics.csproj", "{368BC91D-48CD-492A-B6CF-B5B77F7FE7D4}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BizHawk.Bizware.Graphics.Controls", "src\BizHawk.Bizware.Graphics.Controls\BizHawk.Bizware.Graphics.Controls.csproj", "{3D050D35-B57D-4D14-BE0F-FD63552DADB0}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BizHawk.BizInvoke", "src\BizHawk.BizInvoke\BizHawk.BizInvoke.csproj", "{E5D76DC1-84A8-47AF-BE25-E76F06D2FBBC}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BizHawk.WinForms.Controls", "src\BizHawk.WinForms.Controls\BizHawk.WinForms.Controls.csproj", "{B5A2214B-3CB0-48C4-8DB1-98B38D48AC4A}"
-EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{74391239-9BC1-40CE-A3D7-180737C5302A}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BizHawk.Tests.Client.Common", "src\BizHawk.Tests.Client.Common\BizHawk.Tests.Client.Common.csproj", "{284E19E2-661D-4A7D-864A-AC2FC91E7C25}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BizHawk.Tests.Common", "src\BizHawk.Tests.Common\BizHawk.Tests.Common.csproj", "{39546396-C4D0-45D3-8C6A-D56D29B5BD72}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BizHawk.Tests.Emulation.Common", "src\BizHawk.Tests.Emulation.Common\BizHawk.Tests.Emulation.Common.csproj", "{D95E2B42-757A-4D19-8A76-84C6350BAD8D}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Any CPU = Debug|Any CPU
- Release|Any CPU = Release|Any CPU
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {24A0AA3C-B25F-4197-B23D-476D6462DBA0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {24A0AA3C-B25F-4197-B23D-476D6462DBA0}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {24A0AA3C-B25F-4197-B23D-476D6462DBA0}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {24A0AA3C-B25F-4197-B23D-476D6462DBA0}.Release|Any CPU.Build.0 = Release|Any CPU
- {866F8D13-0678-4FF9-80A4-A3993FD4D8A3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {866F8D13-0678-4FF9-80A4-A3993FD4D8A3}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {866F8D13-0678-4FF9-80A4-A3993FD4D8A3}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {866F8D13-0678-4FF9-80A4-A3993FD4D8A3}.Release|Any CPU.Build.0 = Release|Any CPU
- {DD448B37-BA3F-4544-9754-5406E8094723}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {DD448B37-BA3F-4544-9754-5406E8094723}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {DD448B37-BA3F-4544-9754-5406E8094723}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {DD448B37-BA3F-4544-9754-5406E8094723}.Release|Any CPU.Build.0 = Release|Any CPU
- {C4366030-6D03-424B-AE53-F4F43BB217C3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {C4366030-6D03-424B-AE53-F4F43BB217C3}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {C4366030-6D03-424B-AE53-F4F43BB217C3}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {C4366030-6D03-424B-AE53-F4F43BB217C3}.Release|Any CPU.Build.0 = Release|Any CPU
- {F51946EA-827F-4D82-B841-1F2F6D060312}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {F51946EA-827F-4D82-B841-1F2F6D060312}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {F51946EA-827F-4D82-B841-1F2F6D060312}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {F51946EA-827F-4D82-B841-1F2F6D060312}.Release|Any CPU.Build.0 = Release|Any CPU
- {E1A23168-B571-411C-B360-2229E7225E0E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {E1A23168-B571-411C-B360-2229E7225E0E}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {E1A23168-B571-411C-B360-2229E7225E0E}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {E1A23168-B571-411C-B360-2229E7225E0E}.Release|Any CPU.Build.0 = Release|Any CPU
- {197D4314-8A9F-49BA-977D-54ACEFAEB6BA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {197D4314-8A9F-49BA-977D-54ACEFAEB6BA}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {197D4314-8A9F-49BA-977D-54ACEFAEB6BA}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {197D4314-8A9F-49BA-977D-54ACEFAEB6BA}.Release|Any CPU.Build.0 = Release|Any CPU
- {9F84A0B2-861E-4EF4-B89B-5E2A3F38A465}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {9F84A0B2-861E-4EF4-B89B-5E2A3F38A465}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {9F84A0B2-861E-4EF4-B89B-5E2A3F38A465}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {9F84A0B2-861E-4EF4-B89B-5E2A3F38A465}.Release|Any CPU.Build.0 = Release|Any CPU
- {17E7D20D-198C-4728-ACEC-065DE834FF02}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {17E7D20D-198C-4728-ACEC-065DE834FF02}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {17E7D20D-198C-4728-ACEC-065DE834FF02}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {17E7D20D-198C-4728-ACEC-065DE834FF02}.Release|Any CPU.Build.0 = Release|Any CPU
- {368BC91D-48CD-492A-B6CF-B5B77F7FE7D4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {368BC91D-48CD-492A-B6CF-B5B77F7FE7D4}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {368BC91D-48CD-492A-B6CF-B5B77F7FE7D4}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {368BC91D-48CD-492A-B6CF-B5B77F7FE7D4}.Release|Any CPU.Build.0 = Release|Any CPU
- {3D050D35-B57D-4D14-BE0F-FD63552DADB0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {3D050D35-B57D-4D14-BE0F-FD63552DADB0}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {3D050D35-B57D-4D14-BE0F-FD63552DADB0}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {3D050D35-B57D-4D14-BE0F-FD63552DADB0}.Release|Any CPU.Build.0 = Release|Any CPU
- {E5D76DC1-84A8-47AF-BE25-E76F06D2FBBC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {E5D76DC1-84A8-47AF-BE25-E76F06D2FBBC}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {E5D76DC1-84A8-47AF-BE25-E76F06D2FBBC}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {E5D76DC1-84A8-47AF-BE25-E76F06D2FBBC}.Release|Any CPU.Build.0 = Release|Any CPU
- {B5A2214B-3CB0-48C4-8DB1-98B38D48AC4A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {B5A2214B-3CB0-48C4-8DB1-98B38D48AC4A}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {B5A2214B-3CB0-48C4-8DB1-98B38D48AC4A}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {B5A2214B-3CB0-48C4-8DB1-98B38D48AC4A}.Release|Any CPU.Build.0 = Release|Any CPU
- {284E19E2-661D-4A7D-864A-AC2FC91E7C25}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {284E19E2-661D-4A7D-864A-AC2FC91E7C25}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {284E19E2-661D-4A7D-864A-AC2FC91E7C25}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {284E19E2-661D-4A7D-864A-AC2FC91E7C25}.Release|Any CPU.Build.0 = Release|Any CPU
- {39546396-C4D0-45D3-8C6A-D56D29B5BD72}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {39546396-C4D0-45D3-8C6A-D56D29B5BD72}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {39546396-C4D0-45D3-8C6A-D56D29B5BD72}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {39546396-C4D0-45D3-8C6A-D56D29B5BD72}.Release|Any CPU.Build.0 = Release|Any CPU
- {D95E2B42-757A-4D19-8A76-84C6350BAD8D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {D95E2B42-757A-4D19-8A76-84C6350BAD8D}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {D95E2B42-757A-4D19-8A76-84C6350BAD8D}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {D95E2B42-757A-4D19-8A76-84C6350BAD8D}.Release|Any CPU.Build.0 = Release|Any CPU
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
- GlobalSection(NestedProjects) = preSolution
- {24A0AA3C-B25F-4197-B23D-476D6462DBA0} = {B51F1139-3D2C-41BE-A762-EF1F9B41EACA}
- {DD448B37-BA3F-4544-9754-5406E8094723} = {B51F1139-3D2C-41BE-A762-EF1F9B41EACA}
- {C4366030-6D03-424B-AE53-F4F43BB217C3} = {B51F1139-3D2C-41BE-A762-EF1F9B41EACA}
- {F51946EA-827F-4D82-B841-1F2F6D060312} = {3627C08B-3E43-4224-9DA4-40BD69495FBC}
- {E1A23168-B571-411C-B360-2229E7225E0E} = {3627C08B-3E43-4224-9DA4-40BD69495FBC}
- {197D4314-8A9F-49BA-977D-54ACEFAEB6BA} = {3627C08B-3E43-4224-9DA4-40BD69495FBC}
- {B5A2214B-3CB0-48C4-8DB1-98B38D48AC4A} = {B51F1139-3D2C-41BE-A762-EF1F9B41EACA}
- {284E19E2-661D-4A7D-864A-AC2FC91E7C25} = {74391239-9BC1-40CE-A3D7-180737C5302A}
- {39546396-C4D0-45D3-8C6A-D56D29B5BD72} = {74391239-9BC1-40CE-A3D7-180737C5302A}
- {D95E2B42-757A-4D19-8A76-84C6350BAD8D} = {74391239-9BC1-40CE-A3D7-180737C5302A}
- EndGlobalSection
- GlobalSection(ExtensibilityGlobals) = postSolution
- SolutionGuid = {9B9E4316-9185-412E-B951-A63355ACA956}
- EndGlobalSection
- GlobalSection(MonoDevelopProperties) = preSolution
- StartupItem = BizHawk.Client.EmuHawk\BizHawk.Client.EmuHawk.csproj
- EndGlobalSection
-EndGlobal
diff --git a/BizHawk.sln.DotSettings b/BizHawk.sln.DotSettings
deleted file mode 100644
index 6fba05cef2b..00000000000
--- a/BizHawk.sln.DotSettings
+++ /dev/null
@@ -1,620 +0,0 @@
-
- False
- True
- ExplicitlyExcluded
- DO_NOT_SHOW
- DO_NOT_SHOW
- DO_NOT_SHOW
- DO_NOT_SHOW
- DO_NOT_SHOW
- DO_NOT_SHOW
- DO_NOT_SHOW
- DO_NOT_SHOW
- DO_NOT_SHOW
- DO_NOT_SHOW
- DO_NOT_SHOW
- DO_NOT_SHOW
- DO_NOT_SHOW
- DO_NOT_SHOW
- DO_NOT_SHOW
- DO_NOT_SHOW
- DO_NOT_SHOW
- DO_NOT_SHOW
- DO_NOT_SHOW
- DO_NOT_SHOW
- DO_NOT_SHOW
- DO_NOT_SHOW
- DO_NOT_SHOW
- DO_NOT_SHOW
- DO_NOT_SHOW
- DO_NOT_SHOW
- DO_NOT_SHOW
- DO_NOT_SHOW
- DO_NOT_SHOW
- DO_NOT_SHOW
- DO_NOT_SHOW
- DO_NOT_SHOW
- DO_NOT_SHOW
- DO_NOT_SHOW
- DO_NOT_SHOW
- DO_NOT_SHOW
- DO_NOT_SHOW
- DO_NOT_SHOW
- DO_NOT_SHOW
- DO_NOT_SHOW
- DO_NOT_SHOW
- DO_NOT_SHOW
- DO_NOT_SHOW
- DO_NOT_SHOW
- HINT
- DO_NOT_SHOW
- 0
- None
- False
- False
- False
- USE_TABS_ONLY
- Tab
- NEXT_LINE
- True
- False
- True
- True
- CHOP_ALWAYS
- CHOP_ALWAYS
- CHOP_ALWAYS
- False
- False
- AF
- AL
- API
- AR
- ARGB
- AV
- BG
- BMP
- CDL
- CGB
- CRC
- DB
- DC
- DMG
- DS
- DX
- GB
- GBA
- GBC
- GBL
- GG
- GL
- GPGX
- ID
- II
- IO
- IPS
- IRQ
- LR
- MGBA
- NDS
- NES
- NMI
- NT
- NTSC
- OBJ
- OR
- OSD
- PAL
- PC
- PCE
- PCECD
- PPU
- PSP
- PSX
- RAM
- RL
- RTC
- SG
- SGB
- SGX
- SHA
- SNES
- SQ
- TA
- TAS
- TI
- TIA
- UI
- VBA
- ROM
- ZX
- <Policy Inspect="True" Prefix="" Suffix="" Style="AaBb_AaBb" />
- <Policy Inspect="True" Prefix="" Suffix="" Style="AA_BB"><ExtraRule Prefix="" Suffix="" Style="AaBb" /></Policy>
- <Policy Inspect="True" Prefix="_" Suffix="" Style="aaBb" />
- <Policy><Descriptor Staticness="Any" AccessRightKinds="Private" Description="Constant fields (private)"><ElementKinds><Kind Name="CONSTANT_FIELD" /></ElementKinds></Descriptor><Policy Inspect="True" Prefix="" Suffix="" Style="AA_BB"><ExtraRule Prefix="" Suffix="" Style="AaBb" /></Policy></Policy>
- <Policy><Descriptor Staticness="Instance" AccessRightKinds="Private" Description="Instance fields (private)"><ElementKinds><Kind Name="FIELD" /><Kind Name="READONLY_FIELD" /></ElementKinds></Descriptor><Policy Inspect="True" Prefix="_" Suffix="" Style="aaBb" /></Policy>
- <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" />
- <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" />
- <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" />
- <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" />
- <Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" />
- <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" />
- <Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" />
- <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" />
- <Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" />
- <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" />
- <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" />
- <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" />
- <Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" />
- <Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" />
- <Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" />
- <Policy Inspect="True" Prefix="I" Suffix="" Style="AaBb" />
- <Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" />
- <Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" />
- <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" />
- <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" />
- <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" />
- <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" />
- <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" />
- <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" />
- <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" />
- <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" />
- <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" />
- <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" />
- <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" />
- <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" />
- <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" />
- <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" />
- <Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" />
- <Policy Inspect="True" Prefix="T" Suffix="" Style="AaBb" />
- <Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" />
- <Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" />
- <Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" />
- <Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" />
- <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" />
- <Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" />
- <Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" />
- C:\Users\Andy Delikat\AppData\Local\JetBrains\Transient\ReSharperPlatformVs15\v11_5c6a09eb\SolutionCaches
- LIVE_MONITOR
- LIVE_MONITOR
- DO_NOTHING
- LIVE_MONITOR
- LIVE_MONITOR
- LIVE_MONITOR
- LIVE_MONITOR
- LIVE_MONITOR
- LIVE_MONITOR
- LIVE_MONITOR
- DO_NOTHING
- DO_NOTHING
- LIVE_MONITOR
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
-
-
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
-
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
-
\ No newline at end of file
diff --git a/BizHawk.slnx b/BizHawk.slnx
new file mode 100644
index 00000000000..03193280753
--- /dev/null
+++ b/BizHawk.slnx
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Common.props b/Common.props
index 1c211f9435a..63298e3ad33 100644
--- a/Common.props
+++ b/Common.props
@@ -17,7 +17,7 @@
strict
true
$(TargetFramework.StartsWith("net4"))
- 12.0
+ 14.0
true
$(NoWarn);CS1591
enable
diff --git a/Directory.Packages.props b/Directory.Packages.props
index a6e9f40d89c..c7037022933 100644
--- a/Directory.Packages.props
+++ b/Directory.Packages.props
@@ -12,8 +12,8 @@
-
-
+
+
@@ -34,7 +34,7 @@
-
+
diff --git a/Dist/.BuildInConfigX.sh b/Dist/.BuildInConfigX.sh
index fdcafac1997..33927f96fc8 100755
--- a/Dist/.BuildInConfigX.sh
+++ b/Dist/.BuildInConfigX.sh
@@ -1,6 +1,6 @@
#!/bin/sh
set -e
-if [ ! -e "BizHawk.sln" ]; then
+if [ ! -e "BizHawk.slnx" ]; then
printf "wrong cwd (ran manually)? exiting\n"
exit 1
fi
diff --git a/Dist/.BuildTestInConfigX.sh b/Dist/.BuildTestInConfigX.sh
index 1958ce13c54..2548cd2bcd5 100755
--- a/Dist/.BuildTestInConfigX.sh
+++ b/Dist/.BuildTestInConfigX.sh
@@ -1,5 +1,5 @@
#!/bin/sh
-if [ ! -e "BizHawk.sln" ]; then
+if [ ! -e "BizHawk.slnx" ]; then
printf "wrong cwd (ran manually)? exiting\n"
exit 1
fi
diff --git a/Dist/.InvokeCLIOnMainSln.sh b/Dist/.InvokeCLIOnMainSln.sh
index fa09f310984..7c907952e81 100755
--- a/Dist/.InvokeCLIOnMainSln.sh
+++ b/Dist/.InvokeCLIOnMainSln.sh
@@ -1,6 +1,6 @@
#!/bin/sh
set -e
-if [ ! -e "BizHawk.sln" ]; then
+if [ ! -e "BizHawk.slnx" ]; then
printf "wrong cwd (ran manually)? exiting\n"
exit 1
fi
@@ -12,4 +12,4 @@ if [ -z "$NUGET_PACKAGES" ]; then export NUGET_PACKAGES="$HOME/.nuget/packages";
printf "running 'dotnet %s' in %s configuration, extra args: %s\n" "$cmd" "$config" "$*"
version=$(grep -Po "MainVersion = \"\K(.*)(?=\")" src/BizHawk.Common/VersionInfo.cs)
git_hash="$(git rev-parse --verify HEAD 2>/dev/null || printf "0000000000000000000000000000000000000000")"
-dotnet "$cmd" BizHawk.sln -c "$config" -m -clp:NoSummary -p:Version="$version" -p:SourceRevisionId="$git_hash" "$@"
+dotnet "$cmd" BizHawk.slnx -c "$config" -m -clp:NoSummary -p:Version="$version" -p:SourceRevisionId="$git_hash" "$@"
diff --git a/Dist/QuickTestBuildAndPackage.bat b/Dist/QuickTestBuildAndPackage.bat
index 9ce22bf921f..388cb16006c 100644
--- a/Dist/QuickTestBuildAndPackage.bat
+++ b/Dist/QuickTestBuildAndPackage.bat
@@ -9,7 +9,7 @@ if "%1"=="" (
git --version > NUL
@if errorlevel 1 goto MISSINGGIT
-dotnet build ..\BizHawk.sln -c Release --no-incremental
+dotnet build ..\BizHawk.slnx -c Release --no-incremental
@if not errorlevel 0 goto DOTNETBUILDFAILED
rem -p:Platform="Any CPU"
diff --git a/Dist/historical.nix b/Dist/historical.nix
index c574c241f17..830476a89cd 100644
--- a/Dist/historical.nix
+++ b/Dist/historical.nix
@@ -9,6 +9,7 @@
, dotnet-sdk_5
, dotnet-sdk_6
, dotnet-sdk_8
+, dotnet-sdk_10
}: let
/**
* updating? make sure to hit the rest of this file, the hand-written deps `/Dist/deps-historical.nix`,
@@ -219,7 +220,7 @@ in {
inherit neededExtraManagedDepsApprox;
__contentAddressed = false; #TODO try w/ CA
copyingAssetsInEmuHawkProj = isVersionAtLeast "2.6.3" version;
- dotnet-sdk = dotnet-sdk_8;
+ dotnet-sdk = dotnet-sdk_10;
exePathRespectsEnvVar = isVersionAtLeast "2.9.2" version;
hasAssemblyResolveHandler = isVersionAtLeast "2.3.3" version;
hasAssetsInOutput = !isVersionAtLeast "2.6.1" version;
diff --git a/Dist/nix_expr_usage_docs.md b/Dist/nix_expr_usage_docs.md
index 850b74c88cd..f3755c7ebff 100644
--- a/Dist/nix_expr_usage_docs.md
+++ b/Dist/nix_expr_usage_docs.md
@@ -84,7 +84,7 @@ nix-build --pure -A emuhawk.fetch-deps && ./result
```sh
nix-shell # = `nix-shell -A emuhawk-latest`
# (in shell):
-Dist/BuildDebug.sh # = `dotnet build -c Debug BizHawk.sln`
+Dist/BuildDebug.sh # = `dotnet build -c Debug BizHawk.slnx`
emuhawk-monort-local # = `cd output && mono EmuHawk.exe`
# if deps (besides NuGet packages) have changed, may need to do this instead, but it will do a slow copy of the repo to the Nix store
diff --git a/ExternalProjects/BizHawk.Analyzer/BrokenCollectionExpressionAnalyzer.cs b/ExternalProjects/BizHawk.Analyzer/BrokenCollectionExpressionAnalyzer.cs
new file mode 100644
index 00000000000..9ea33e6d546
--- /dev/null
+++ b/ExternalProjects/BizHawk.Analyzer/BrokenCollectionExpressionAnalyzer.cs
@@ -0,0 +1,35 @@
+namespace BizHawk.Analyzers;
+
+using System.Collections.Immutable;
+
+[DiagnosticAnalyzer(LanguageNames.CSharp)]
+public sealed class BrokenCollectionExpressionAnalyzer : DiagnosticAnalyzer
+{
+ private static readonly DiagnosticDescriptor DiagBrokenCollectionExpression = new(
+ id: "BHI1234",
+ title: "don't this",
+ messageFormat: "don't this",
+ category: "Usage",
+ defaultSeverity: DiagnosticSeverity.Warning,
+ isEnabledByDefault: true);
+
+ public override ImmutableArray SupportedDiagnostics { get; }
+ = ImmutableArray.Create(/*HawkSourceAnalyzer.DiagWTF,*/ DiagBrokenCollectionExpression);
+
+ public override void Initialize(AnalysisContext context)
+ {
+ context.ConfigureGeneratedCodeAnalysis(GeneratedCodeAnalysisFlags.None);
+ context.EnableConcurrentExecution();
+ context.RegisterCompilationStartAction(initContext =>
+ {
+ var arraySegmentSym = initContext.Compilation.GetTypeByMetadataName("System.ArraySegment`1")!;
+ initContext.RegisterOperationAction(
+ oac =>
+ {
+ var operation = (ICollectionExpressionOperation) oac.Operation;
+ if (arraySegmentSym.Matches(operation.Type.OriginalDefinition)) DiagBrokenCollectionExpression.ReportAt(operation, oac);
+ },
+ OperationKind.CollectionExpression);
+ });
+ }
+}
diff --git a/README.md b/README.md
index b6e274dc970..056d0fbc595 100644
--- a/README.md
+++ b/README.md
@@ -218,7 +218,7 @@ See the [contributor guidelines](https://github.com/TASEmulators/BizHawk/blob/ma
tl;dr:
- On Unix, run `Dist/BuildRelease.sh` (uses .NET SDK CLI). You can also use Rider or VS Code.
-- On Windows, run in [VS2022](https://visualstudio.microsoft.com/vs/community). You can also use the command-line (`dotnet build BizHawk.sln`), Rider, or VS Code.
+- On Windows, run in [VS2022](https://visualstudio.microsoft.com/vs/community). You can also use the command-line (`dotnet build BizHawk.slnx`), Rider, or VS Code.
[to top](#bizhawk)
diff --git a/References/BizHawk.Analyzer.dll b/References/BizHawk.Analyzer.dll
index cc011cf95c9..adb62125635 100644
Binary files a/References/BizHawk.Analyzer.dll and b/References/BizHawk.Analyzer.dll differ
diff --git a/contributing.md b/contributing.md
index df08fbbf306..234e51edf74 100644
--- a/contributing.md
+++ b/contributing.md
@@ -67,9 +67,9 @@ It's probably a good idea to get the .NET SDK, even if you're not working on a .
## For any: .NET project
-Currently, you'll need version 8.x of the SDK.
+Currently, you'll need version 10.x of the SDK.
- Linux
- - Install the .NET SDK (package name is usually `dotnet-sdk-8.0`, see [full instructions](https://learn.microsoft.com/dotnet/core/install/linux)).
+ - Install the .NET SDK (package name is usually `dotnet-sdk-10.0`, see [full instructions](https://learn.microsoft.com/dotnet/core/install/linux)).
- VS Community isn't available for Linux, but Rider and VS Code are.
- Nix/NixOS users can get the .NET SDK ephemerally with the provided `shell.nix`. For IDE setup and more, see the [Nix-specific docs](Dist/nix_expr_usage_docs.md#ide-setup).
- macOS
@@ -113,10 +113,10 @@ Uses C#; you will need the .NET SDK or an IDE which includes it. See the [.NET s
Most projects target .NET Standard 2.0, with some targeting .NET Framework 4.8. It's written at the top of their project files, or you can check the [project graph](https://github.com/TASEmulators/BizHawk/wiki/Dependencies#main-solution).
The source for EmuHawk, plus DiscoHawk and the supporting libraries, is in `/src`, with a few extra files used by the build system elsewhere.
-EmuHawk's project file `/src/BizHawk.Client.EmuHawk/BizHawk.Client.EmuHawk.csproj` includes the other projects [in a tree](https://github.com/TASEmulators/BizHawk/wiki/Dependencies#main-solution), and they're all included in `/BizHawk.sln`.
+EmuHawk's project file `/src/BizHawk.Client.EmuHawk/BizHawk.Client.EmuHawk.csproj` includes the other projects [in a tree](https://github.com/TASEmulators/BizHawk/wiki/Dependencies#main-solution), and they're all included in `/BizHawk.slnx`.
-In VS2022, open `BizHawk.sln`, then select the "BizHawk.Client.EmuHawk | Release" configuration to build and run.
-To build from the command-line on Windows, simply run `dotnet build BizHawk.sln` from the repository's root, and then `output\EmuHawk.exe` will be available. Alternatively, you can run one of the existing build scripts that apply additional checks and configurations, such as `Dist\QuickTestBuildAndPackage_Release.bat`.
+In VS2022, open `BizHawk.slnx`, then select the "BizHawk.Client.EmuHawk | Release" configuration to build and run.
+To build from the command-line on Windows, simply run `dotnet build BizHawk.slnx` from the repository's root, and then `output\EmuHawk.exe` will be available. Alternatively, you can run one of the existing build scripts that apply additional checks and configurations, such as `Dist\QuickTestBuildAndPackage_Release.bat`.
To build from the command-line on Unix, run `Dist/BuildRelease.sh`, and then `output/EmuHawkMono.sh` will be available.
There are 2 build configurations. Besides `Release` there is `Debug`, which *does not run* bytecode optimisations, *does not remove* debugging symbols, *enables* additional logging and assertions, and *enables* some features. On Windows, a `Debug` executable will spawn a console window for stdout. Note there is also a "stronger" release build in the form of `VersionInfo.DeveloperBuild == false`, which is only used by GitLab CI for preparing a release (during `Dist/UpdateVersionInfoForRelease.sh`).
diff --git a/default.nix b/default.nix
index c70e1052c77..711aa318dbf 100644
--- a/default.nix
+++ b/default.nix
@@ -24,6 +24,7 @@ in {
src = builtins.path { path = ./.; name = "BizHawk-${version}"; }; # source derivation; did have filter here for speed, but it wasn't faster and it wasn't correct and it couldn't be made correct and I'm mad
}
# makedeps
+, dotnet-sdk_10 ? pkgs.dotnet-sdk_10
, dotnet-sdk_8 ? pkgs.dotnet-sdk_8
, dotnet-sdk_6 ? pkgs.dotnet-sdk_6
, dotnet-sdk_5 ? let result = builtins.tryEval pkgs.dotnet-sdk_5; in if result.success
@@ -91,7 +92,7 @@ in {
inherit lib
isVersionAtLeast replaceDotWithUnderscore
fetchFromGitHub fetchFromGitLab mkNugetDeps
- dotnet-sdk_5 dotnet-sdk_6 dotnet-sdk_8;
+ dotnet-sdk_5 dotnet-sdk_6 dotnet-sdk_8 dotnet-sdk_10;
}) depsForHistoricalRelease populateHawkSourceInfo releaseArtifactInfos releaseFrags releaseTagSourceInfos;
launchScriptsFor = bizhawkAssemblies: isManualLocalBuild: import Dist/launch-scripts.nix {
inherit lib
diff --git a/global.json b/global.json
index 8746d74b567..5fd1447a98f 100644
--- a/global.json
+++ b/global.json
@@ -1,7 +1,7 @@
{
"sdk": {
- "version": "8.0.0",
+ "version": "10.0.0",
"allowPrerelease": true,
- "rollForward": "latestMajor"
+ "rollForward": "latestMinor"
}
}
diff --git a/src/BizHawk.Bizware.Graphics/BitmapBuffer.cs b/src/BizHawk.Bizware.Graphics/BitmapBuffer.cs
index 510e23f39b4..c6c9c44dee5 100644
--- a/src/BizHawk.Bizware.Graphics/BitmapBuffer.cs
+++ b/src/BizHawk.Bizware.Graphics/BitmapBuffer.cs
@@ -10,8 +10,6 @@
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
-using BizHawk.Common.CollectionExtensions;
-
using SDGraphics = System.Drawing.Graphics;
namespace BizHawk.Bizware.Graphics
diff --git a/src/BizHawk.Bizware.Graphics/D3D11/D3D11GLInterop.cs b/src/BizHawk.Bizware.Graphics/D3D11/D3D11GLInterop.cs
index d445bc9085c..e80b188466b 100644
--- a/src/BizHawk.Bizware.Graphics/D3D11/D3D11GLInterop.cs
+++ b/src/BizHawk.Bizware.Graphics/D3D11/D3D11GLInterop.cs
@@ -182,7 +182,7 @@ static D3D11GLInterop()
if (vendor == Vendor.Intel)
{
- if (_blacklistedIntelDeviceIds.AsSpan().Contains(adapter.Description.DeviceId))
+ if (_blacklistedIntelDeviceIds.Contains(adapter.Description.DeviceId))
{
return;
}
diff --git a/src/BizHawk.Client.Common/RomLoader.cs b/src/BizHawk.Client.Common/RomLoader.cs
index f8064d82add..b74bd917cbf 100644
--- a/src/BizHawk.Client.Common/RomLoader.cs
+++ b/src/BizHawk.Client.Common/RomLoader.cs
@@ -557,7 +557,7 @@ private void LoadOther(
const string ERR_MSG_NOT_PSXEXE = "Got an .exe which is not in the PSX-EXE format!"
+ "\nIf you're trying to load a PE (Windows program), you need to load the unextracted disc image. See https://tasvideos.org/BizHawk/DOSBox for details." // sadly won't be clickable
+ "\n"; // extra blank line to separate from stacktrace below
- if (!rom.FileData.AsSpan().StartsWith("PS-X EXE"u8)) throw new /*NoAvailableCoreException*/InvalidOperationException(ERR_MSG_NOT_PSXEXE);
+ if (!rom.FileData.StartsWith("PS-X EXE"u8)) throw new /*NoAvailableCoreException*/InvalidOperationException(ERR_MSG_NOT_PSXEXE);
break;
}
var cip = new CoreInventoryParameters(this)
diff --git a/src/BizHawk.Client.Common/lua/LuaHelperLibs/EventsLuaLibrary.cs b/src/BizHawk.Client.Common/lua/LuaHelperLibs/EventsLuaLibrary.cs
index 706fd9dcbbe..56a44235b1f 100644
--- a/src/BizHawk.Client.Common/lua/LuaHelperLibs/EventsLuaLibrary.cs
+++ b/src/BizHawk.Client.Common/lua/LuaHelperLibs/EventsLuaLibrary.cs
@@ -351,6 +351,6 @@ private string ProcessScope(string scope)
private bool HasScope(string scope)
=> string.IsNullOrWhiteSpace(scope)
- || DebuggableCore.MemoryCallbacks.AvailableScopes.AsSpan().Contains(scope);
+ || DebuggableCore.MemoryCallbacks.AvailableScopes.Contains(scope);
}
}
diff --git a/src/BizHawk.Client.Common/movie/HeaderKeys.cs b/src/BizHawk.Client.Common/movie/HeaderKeys.cs
index 938bfa07d12..d7b260eb753 100644
--- a/src/BizHawk.Client.Common/movie/HeaderKeys.cs
+++ b/src/BizHawk.Client.Common/movie/HeaderKeys.cs
@@ -29,8 +29,6 @@ public static class HeaderKeys
public const string VsyncAttoseconds = "VsyncAttoseconds"; // used for Arcade due to it representing thousands of different systems with different vsync rates
public const string Core = "Core";
- private static FrozenSet field;
-
private static ISet AllValues
=> field ??= typeof(HeaderKeys).GetFields()
.Select(static fi => fi.GetValue(null).ToString())
diff --git a/src/BizHawk.Client.Common/movie/import/GmvImport.cs b/src/BizHawk.Client.Common/movie/import/GmvImport.cs
index a09fa906122..b971522426b 100644
--- a/src/BizHawk.Client.Common/movie/import/GmvImport.cs
+++ b/src/BizHawk.Client.Common/movie/import/GmvImport.cs
@@ -1,7 +1,6 @@
using System.IO;
using System.Text;
-using BizHawk.Common.CollectionExtensions;
using BizHawk.Emulation.Common;
using BizHawk.Emulation.Cores;
using BizHawk.Emulation.Cores.Consoles.Sega.gpgx;
diff --git a/src/BizHawk.Client.Common/movie/import/bkm/BkmControllerAdapter.cs b/src/BizHawk.Client.Common/movie/import/bkm/BkmControllerAdapter.cs
index c7979d9f033..ed73ed7055a 100644
--- a/src/BizHawk.Client.Common/movie/import/bkm/BkmControllerAdapter.cs
+++ b/src/BizHawk.Client.Common/movie/import/bkm/BkmControllerAdapter.cs
@@ -134,7 +134,7 @@ public void SetControllersAsMnemonic(string mnemonic)
SetFromMnemonic(mnemonic.AsSpan(3));
break;
case "Dual Gameboy Controller":
- SetFromMnemonic(mnemonic.AsSpan());
+ SetFromMnemonic(mnemonic);
break;
case "WonderSwan Controller":
SetFromMnemonic(mnemonic.AsSpan(1));
diff --git a/src/BizHawk.Client.EmuHawk/MainForm.cs b/src/BizHawk.Client.EmuHawk/MainForm.cs
index b79c806b86e..4115e3a9d42 100644
--- a/src/BizHawk.Client.EmuHawk/MainForm.cs
+++ b/src/BizHawk.Client.EmuHawk/MainForm.cs
@@ -3688,13 +3688,11 @@ private bool LoadRomInternal(string path, LoadRomArgs args, out bool failureIsFr
{
oaRetro.token.Path = loader.CanonicalFullPath;
}
-
- if (oaOpenrom != null)
+ else if (oaOpenrom is not null)
{
oaOpenrom.Path = loader.CanonicalFullPath;
}
-
- if (ioa is OpenAdvanced_MAME oaMame)
+ else if (ioa is OpenAdvanced_MAME oaMame)
{
oaMame.Path = loader.CanonicalFullPath;
}
diff --git a/src/BizHawk.Client.EmuHawk/tools/Lua/Libraries/TAStudioLuaLibrary.cs b/src/BizHawk.Client.EmuHawk/tools/Lua/Libraries/TAStudioLuaLibrary.cs
index a8b45ea4edf..cec87c21ded 100644
--- a/src/BizHawk.Client.EmuHawk/tools/Lua/Libraries/TAStudioLuaLibrary.cs
+++ b/src/BizHawk.Client.EmuHawk/tools/Lua/Libraries/TAStudioLuaLibrary.cs
@@ -425,10 +425,7 @@ public void SetBranchText(string text, int? index = null)
if (index != null)
{
var branch = Tastudio.CurrentTasMovie.Branches[index.Value];
- if (branch != null)
- {
- branch.UserText = text1;
- }
+ branch?.UserText = text1;
}
else
{
diff --git a/src/BizHawk.Client.EmuHawk/tools/SNES/SNESGraphicsDebugger.cs b/src/BizHawk.Client.EmuHawk/tools/SNES/SNESGraphicsDebugger.cs
index 975972f0f7a..40a196cb968 100644
--- a/src/BizHawk.Client.EmuHawk/tools/SNES/SNESGraphicsDebugger.cs
+++ b/src/BizHawk.Client.EmuHawk/tools/SNES/SNESGraphicsDebugger.cs
@@ -816,12 +816,7 @@ private void paletteViewer_MouseClick(object sender, MouseEventArgs e)
bool valid = TranslatePaletteCoord(e.Location, out var pt);
if (!valid) return;
selectedColorNum = pt.Y * 16 + pt.X;
-
- if (currTileDataState != null)
- {
- currTileDataState.Palette = currPaletteSelection.start;
- }
-
+ currTileDataState?.Palette = currPaletteSelection.start;
SyncColorSelection();
InternalUpdateValues();
}
diff --git a/src/BizHawk.Client.EmuHawk/tools/TAStudio/BookmarksBranchesBox.cs b/src/BizHawk.Client.EmuHawk/tools/TAStudio/BookmarksBranchesBox.cs
index da77a10f1bd..9eb72f1180f 100644
--- a/src/BizHawk.Client.EmuHawk/tools/TAStudio/BookmarksBranchesBox.cs
+++ b/src/BizHawk.Client.EmuHawk/tools/TAStudio/BookmarksBranchesBox.cs
@@ -27,9 +27,7 @@ public partial class BookmarksBranchesBox : UserControl, IDialogParent
private BranchUndo _branchUndo = BranchUndo.None;
public void SetBackupMaxSteps(int value)
- {
- if (_backupBranch != null) _backupBranch.ChangeLog.MaxSteps = value;
- }
+ => _backupBranch?.ChangeLog.MaxSteps = value;
private enum BranchUndo
{
@@ -353,11 +351,7 @@ private void UndoBranchToolStripMenuItem_Click(object sender, EventArgs e)
else if (_branchUndo == BranchUndo.Text)
{
var branch = Branches.SingleOrDefault(b => b.Uuid == _backupBranch.Uuid);
- if (branch != null)
- {
- branch.UserText = _backupBranch.UserText;
- }
-
+ branch?.UserText = _backupBranch.UserText;
Tastudio.MainForm.AddOnScreenMessage("Branch Text Edit canceled");
}
else if (_branchUndo == BranchUndo.Remove)
diff --git a/src/BizHawk.Common/BPSPatcher.cs b/src/BizHawk.Common/BPSPatcher.cs
index 68b0c50f8f4..9bf17f80bc9 100644
--- a/src/BizHawk.Common/BPSPatcher.cs
+++ b/src/BizHawk.Common/BPSPatcher.cs
@@ -205,7 +205,7 @@ internal void DoPatch(Span rom)
private const string ERR_MSG_UNINIT = "uninitialised struct";
private static bool CheckCRC(ReadOnlySpan data, ReadOnlySpan reversedChecksum)
- => ((ReadOnlySpan) CRC32Checksum.Compute(data)).ReversedSequenceEqual(reversedChecksum);
+ => CRC32Checksum.Compute(data).ReversedSequenceEqual(reversedChecksum);
public static bool IsBPSFile(ReadOnlySpan dataWithHeader, out BPSPayload patchStruct)
{
diff --git a/src/BizHawk.Common/Extensions/CollectionExtensions.cs b/src/BizHawk.Common/Extensions/CollectionExtensions.cs
index 6be01284502..069bf4df9f4 100644
--- a/src/BizHawk.Common/Extensions/CollectionExtensions.cs
+++ b/src/BizHawk.Common/Extensions/CollectionExtensions.cs
@@ -650,8 +650,5 @@ public static bool IsSortedDesc(this ReadOnlySpan span)
for (int i = 0, e = span.Length - 1; i < e; i++) if (span[i + 1].CompareTo(span[i]) > 0) return false;
return true;
}
-
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static bool SequenceEqual(this T[] a, ReadOnlySpan b) where T : IEquatable => a.AsSpan().SequenceEqual(b);
}
}
diff --git a/src/BizHawk.Emulation.Common/N3DSHasher.cs b/src/BizHawk.Emulation.Common/N3DSHasher.cs
index 953dabbce98..a2966984746 100644
--- a/src/BizHawk.Emulation.Common/N3DSHasher.cs
+++ b/src/BizHawk.Emulation.Common/N3DSHasher.cs
@@ -382,7 +382,7 @@ private void HashNCCH(FileStream romFile, IncrementalHash md5Inc, byte[] header,
if ((exeFsSectionSize & 0xF) != 0)
{
var ivCopy = new byte[iv.Length];
- iv.AsSpan().CopyTo(ivCopy);
+ iv.CopyTo(ivCopy);
exeFsSectionOffset &= ~0xFU;
// First decrypt these last bytes using the secondary key
@@ -390,11 +390,11 @@ private void HashNCCH(FileStream romFile, IncrementalHash md5Inc, byte[] header,
// Now re-encrypt these bytes using the primary key
aes.Key = primaryKey;
- ivCopy.AsSpan().CopyTo(iv);
+ ivCopy.CopyTo(iv);
AesCtrTransform(aes, iv, exeFsBuffer.AsSpan((int)exeFsSectionOffset, (int)(0x10 - (exeFsSectionSize & 0xF))));
// All of the padding can now be decrypted using the primary key
- ivCopy.AsSpan().CopyTo(iv);
+ ivCopy.CopyTo(iv);
exeFsSectionSize += 0x10 - (exeFsSectionSize & 0xF);
}
diff --git a/src/BizHawk.Emulation.Cores/Computers/AmstradCPC/Media/Disk/FloppyDisk.cs b/src/BizHawk.Emulation.Cores/Computers/AmstradCPC/Media/Disk/FloppyDisk.cs
index 581db2ef738..ec15ab67ec1 100644
--- a/src/BizHawk.Emulation.Cores/Computers/AmstradCPC/Media/Disk/FloppyDisk.cs
+++ b/src/BizHawk.Emulation.Cores/Computers/AmstradCPC/Media/Disk/FloppyDisk.cs
@@ -641,7 +641,7 @@ public byte[] ActualData
if (size > ActualDataByteLength)
{
var buf = new byte[SectorData.Length + size - ActualDataByteLength];
- SectorData.AsSpan().CopyTo(buf);
+ SectorData.CopyTo(buf);
// SectorData.AsSpan(start: 0, length: buf.Length - SectorData.Length)
// .CopyTo(buf.AsSpan(start: SectorData.Length));
buf.AsSpan(start: SectorData.Length).Fill(SectorData[SectorData.Length - 1]);
diff --git a/src/BizHawk.Emulation.Cores/Computers/AppleII/AppleII.ISaveRam.cs b/src/BizHawk.Emulation.Cores/Computers/AppleII/AppleII.ISaveRam.cs
index b686ccf80e9..cd45af3d5fa 100644
--- a/src/BizHawk.Emulation.Cores/Computers/AppleII/AppleII.ISaveRam.cs
+++ b/src/BizHawk.Emulation.Cores/Computers/AppleII/AppleII.ISaveRam.cs
@@ -69,7 +69,7 @@ private void LoadDelta(bool maybeDifferent)
}
else if (maybeDifferent)
{
- original.AsSpan().CopyTo(current);
+ original.CopyTo(current);
}
});
}
diff --git a/src/BizHawk.Emulation.Cores/Computers/Commodore64/C64.Motherboard.cs b/src/BizHawk.Emulation.Cores/Computers/Commodore64/C64.Motherboard.cs
index a2c5e3fa97c..0985d242f5c 100644
--- a/src/BizHawk.Emulation.Cores/Computers/Commodore64/C64.Motherboard.cs
+++ b/src/BizHawk.Emulation.Cores/Computers/Commodore64/C64.Motherboard.cs
@@ -147,10 +147,8 @@ public Motherboard(C64 c64, C64.VicType initRegion, C64.BorderType borderType, C
CharRom = new Chip23128();
KernalRom = new Chip23128();
- if (Cpu != null)
- Cpu.DebuggerStep = Execute;
- if (DiskDrive != null)
- DiskDrive.DebuggerStep = Execute;
+ Cpu?.DebuggerStep = Execute;
+ DiskDrive?.DebuggerStep = Execute;
}
public int ClockNumerator { get; }
diff --git a/src/BizHawk.Emulation.Cores/Computers/Commodore64/Cartridge/Am29F040B.cs b/src/BizHawk.Emulation.Cores/Computers/Commodore64/Cartridge/Am29F040B.cs
index 66470c29226..e20a647ed08 100644
--- a/src/BizHawk.Emulation.Cores/Computers/Commodore64/Cartridge/Am29F040B.cs
+++ b/src/BizHawk.Emulation.Cores/Computers/Commodore64/Cartridge/Am29F040B.cs
@@ -144,8 +144,8 @@ public void Reset()
_endAddress = ImageMask;
}
- public Span Data =>
- _data.AsSpan();
+ public Span Data
+ => _data;
public int Peek(int addr) =>
_data[addr & ImageMask] & 0xFF;
diff --git a/src/BizHawk.Emulation.Cores/Computers/Commodore64/Cartridge/Mapper0013.cs b/src/BizHawk.Emulation.Cores/Computers/Commodore64/Cartridge/Mapper0013.cs
index f3c19877cf2..5bd326fbc26 100644
--- a/src/BizHawk.Emulation.Cores/Computers/Commodore64/Cartridge/Mapper0013.cs
+++ b/src/BizHawk.Emulation.Cores/Computers/Commodore64/Cartridge/Mapper0013.cs
@@ -62,7 +62,7 @@ public Mapper0013(IEnumerable chips)
var bank = new byte[BankSize];
bank.AsSpan().Fill(DummyData);
- chip.ConvertDataToBytes().CopyTo(bank.AsSpan());
+ chip.ConvertDataToBytes().CopyTo(bank);
_banks[chip.Bank] = bank;
diff --git a/src/BizHawk.Emulation.Cores/Computers/Commodore64/Media/DiskTrack.cs b/src/BizHawk.Emulation.Cores/Computers/Commodore64/Media/DiskTrack.cs
index 9c5242669fa..2cea3881ec3 100644
--- a/src/BizHawk.Emulation.Cores/Computers/Commodore64/Media/DiskTrack.cs
+++ b/src/BizHawk.Emulation.Cores/Computers/Commodore64/Media/DiskTrack.cs
@@ -67,15 +67,13 @@ public DiskTrack Clone()
/// True only if the content differs.
///
public bool IsModified()
- => !_original.AsSpan().SequenceEqual(_bits);
+ => !_original.SequenceEqual(_bits);
///
/// Resets this track to the state of the original media.
///
public void Reset()
- {
- _original.CopyTo(_bits.AsSpan());
- }
+ => _original.CopyTo(_bits);
///
/// Write an entry to .
@@ -146,6 +144,6 @@ public void ReadFromGCR(int density, ReadOnlySpan bytes, int fluxBitOffset
}
}
- _bits.CopyTo(_original.AsSpan());
+ _bits.CopyTo(_original);
}
}
diff --git a/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Media/Disk/FloppyDisk.cs b/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Media/Disk/FloppyDisk.cs
index cbe56f61e13..934b92bdd26 100644
--- a/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Media/Disk/FloppyDisk.cs
+++ b/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Media/Disk/FloppyDisk.cs
@@ -644,7 +644,7 @@ public byte[] ActualData
if (size > ActualDataByteLength)
{
var buf = new byte[SectorData.Length + size - ActualDataByteLength];
- SectorData.AsSpan().CopyTo(buf);
+ SectorData.CopyTo(buf);
// SectorData.AsSpan(start: 0, length: buf.Length - SectorData.Length)
// .CopyTo(buf.AsSpan(start: SectorData.Length));
buf.AsSpan(start: SectorData.Length).Fill(SectorData[SectorData.Length - 1]);
diff --git a/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/ZXSpectrum.cs b/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/ZXSpectrum.cs
index 1932abe480c..46687c450ba 100644
--- a/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/ZXSpectrum.cs
+++ b/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/ZXSpectrum.cs
@@ -135,16 +135,8 @@ public ZXSpectrum(
ay38912.PanningConfiguration = settings.AYPanConfig;
ay38912.Volume = settings.AYVolume;
}
-
- if (_machine.BuzzerDevice != null)
- {
- _machine.BuzzerDevice.Volume = settings.EarVolume;
- }
-
- if (_machine.TapeBuzzer != null)
- {
- _machine.TapeBuzzer.Volume = settings.TapeVolume;
- }
+ _machine.BuzzerDevice?.Volume = settings.EarVolume;
+ _machine.TapeBuzzer?.Volume = settings.TapeVolume;
DCFilter dc = new DCFilter(SoundMixer, 512);
ser.Register(dc);
diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/BSNES/SNESGraphicsDecoder.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/BSNES/SNESGraphicsDecoder.cs
index 2d592059689..16a73163b9c 100644
--- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/BSNES/SNESGraphicsDecoder.cs
+++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/BSNES/SNESGraphicsDecoder.cs
@@ -386,7 +386,7 @@ public void RenderSpriteToScreen(
screen[dofs] = color;
Paletteize(screen, dofs, oamInfo.Palette * 16 + 128, 1);
Colorize(screen, dofs, 1);
- if (spriteMap != null) spriteMap[dx, dy] = (byte)spritenum;
+ spriteMap?[dx, dy] = (byte) spritenum;
}
}
}
diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/MGBAHawk.ISaveRam.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/MGBAHawk.ISaveRam.cs
index cade996e413..d5b567aa56d 100644
--- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/MGBAHawk.ISaveRam.cs
+++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/MGBAHawk.ISaveRam.cs
@@ -30,7 +30,7 @@ public byte[] CloneSaveRam(bool clearDirty)
public void StoreSaveRam(byte[] data)
{
- if (data.AsSpan().StartsWith("GBABATT\0"u8))
+ if (data.StartsWith("GBABATT\0"u8))
{
data = LegacyFix(data);
}
diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Mappers/Mapper_Default.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Mappers/Mapper_Default.cs
index 8f6560219bd..8705eb16cde 100644
--- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Mappers/Mapper_Default.cs
+++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Mappers/Mapper_Default.cs
@@ -66,10 +66,7 @@ public override void WriteMemory(ushort addr, byte value)
}
else
{
- if (Core.cart_RAM != null)
- {
- Core.cart_RAM[addr - 0xA000] = value;
- }
+ Core.cart_RAM?[addr - 0xA000] = value;
}
}
diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Mappers/Mapper_MBC6.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Mappers/Mapper_MBC6.cs
index 3611dd14138..7eaeb2d6afd 100644
--- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Mappers/Mapper_MBC6.cs
+++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Mappers/Mapper_MBC6.cs
@@ -73,10 +73,7 @@ public override void WriteMemory(ushort addr, byte value)
}
else
{
- if (Core.cart_RAM != null)
- {
- Core.cart_RAM[addr - 0xA000] = value;
- }
+ Core.cart_RAM?[addr - 0xA000] = value;
}
}
diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Mappers/Mapper_MMM01.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Mappers/Mapper_MMM01.cs
index d8047525605..b608ac4983b 100644
--- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Mappers/Mapper_MMM01.cs
+++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Mappers/Mapper_MMM01.cs
@@ -73,10 +73,7 @@ public override void WriteMemory(ushort addr, byte value)
}
else
{
- if (Core.cart_RAM != null)
- {
- Core.cart_RAM[addr - 0xA000] = value;
- }
+ Core.cart_RAM?[addr - 0xA000] = value;
}
}
diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NDS/MelonDS.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NDS/MelonDS.cs
index 17eed60594b..bc1a87c3026 100644
--- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NDS/MelonDS.cs
+++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NDS/MelonDS.cs
@@ -879,11 +879,7 @@ protected override void FrameAdvancePost()
_frameThreadEndEvent.Wait();
_renderThreadRanThisFrame = false;
}
-
- if (_glTextureProvider != null)
- {
- _glTextureProvider.VideoDirty = true;
- }
+ _glTextureProvider?.VideoDirty = true;
}
protected override void LoadStateBinaryInternal(BinaryReader reader)
diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NDS/NDSFirmware.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NDS/NDSFirmware.cs
index 1963b575d40..c9344b58404 100644
--- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NDS/NDSFirmware.cs
+++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NDS/NDSFirmware.cs
@@ -65,7 +65,7 @@ private static unsafe void CheckDecryptedCodeChecksum(
try
{
var hash = SHA1Checksum.ComputeDigestHex(Util.UnsafeSpanFromPointer(decryptedFw, decrypedFwLen));
- if (!_goodHashes.AsSpan().Contains(hash))
+ if (!_goodHashes.Contains(hash))
{
warningCallback($"Potentially bad firmware dump! Decrypted hash {hash} does not match known good dumps.");
}
diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/ExROM.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/ExROM.cs
index 1ca127d8ef0..c26d1a047fe 100644
--- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/ExROM.cs
+++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/ExROM.cs
@@ -396,8 +396,7 @@ public override void WritePpu(int addr, byte value)
{
if (addr < 0x2000)
{
- if (Vram != null)
- Vram[MapCHR(addr)] = value;
+ Vram?[MapCHR(addr)] = value;
}
else
{
diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper252.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper252.cs
index 2a00b6a2258..0e15ffd1355 100644
--- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper252.cs
+++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper252.cs
@@ -151,8 +151,7 @@ public override void WritePpu(int addr, byte value)
{
if (addr < 0x2000)
{
- if (Vram != null)
- Vram[addr&0x7FF] = value;
+ Vram?[addr & 0x7FF] = value;
}
else
{
diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/NesBoardBase.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/NesBoardBase.cs
index f4db5515596..9dbb1a596fe 100644
--- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/NesBoardBase.cs
+++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/NesBoardBase.cs
@@ -158,12 +158,7 @@ public virtual void WritePrg(int addr, byte value)
}
public virtual void WriteWram(int addr, byte value)
- {
- if (_wram != null)
- {
- _wram[addr & _wramMask] = value;
- }
- }
+ => _wram?[addr & _wramMask] = value;
private int _wramMask;
public virtual void PostConfigure()
@@ -204,10 +199,7 @@ public virtual void WritePpu(int addr, byte value)
{
if (addr < 0x2000)
{
- if (Vram != null)
- {
- Vram[addr] = value;
- }
+ Vram?[addr] = value;
}
else
{
diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Sunsoft3.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Sunsoft3.cs
index 95da9fc16e6..449242c2eed 100644
--- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Sunsoft3.cs
+++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Sunsoft3.cs
@@ -189,8 +189,7 @@ public override void WritePpu(int addr, byte value)
if (addr < 0x2000)
{
addr = ApplyMemoryMap(11, chr_banks_2k, addr);
- if (Vram != null)
- Vram[addr] = value;
+ Vram?[addr] = value;
}
else
{
diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/SxROM.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/SxROM.cs
index f26c4fa6f66..32285ac849b 100644
--- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/SxROM.cs
+++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/SxROM.cs
@@ -349,8 +349,7 @@ public override void WritePpu(int addr, byte value)
{
if (addr < 0x2000)
{
- if (Vram != null)
- Vram[Gen_CHR_Address(addr) & vram_mask] = value;
+ Vram?[Gen_CHR_Address(addr) & vram_mask] = value;
}
else
{
diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/VRC1.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/VRC1.cs
index 099e3175958..2b1ae7842dc 100644
--- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/VRC1.cs
+++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/VRC1.cs
@@ -122,8 +122,7 @@ public override void WritePpu(int addr, byte value)
{
if (addr < 0x2000)
{
- if (Vram != null)
- Vram[addr] = value;
+ Vram?[addr] = value;
}
else
{
diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/VRC7.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/VRC7.cs
index 500ec2e3e32..23ba8c8da1b 100644
--- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/VRC7.cs
+++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/VRC7.cs
@@ -197,8 +197,7 @@ public override void WritePrg(int addr, byte value)
case 0x1001:
//sound address port
- if (fm != null)
- fm.RegisterLatch = value;
+ fm?.RegisterLatch = value;
break;
case 0x1003:
//sound data port
diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/VS_M99.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/VS_M99.cs
index b09c06dd253..850d6410e74 100644
--- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/VS_M99.cs
+++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/VS_M99.cs
@@ -82,8 +82,7 @@ public override void WritePpu(int addr, byte value)
{
if (addr < 0x2000)
{
- if (Vram != null)
- Vram[addr] = value;
+ Vram?[addr] = value;
}
else
{
diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/FDS/FDS.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/FDS/FDS.cs
index 0b1833d426d..36520f2fc51 100644
--- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/FDS/FDS.cs
+++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/FDS/FDS.cs
@@ -2,7 +2,6 @@
using System.IO;
using BizHawk.Common;
-using BizHawk.Common.CollectionExtensions;
using BizHawk.Emulation.Common;
namespace BizHawk.Emulation.Cores.Nintendo.NES
diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Unif.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Unif.cs
index 7b2c1c4a381..c788f5f0772 100644
--- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Unif.cs
+++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Unif.cs
@@ -4,7 +4,6 @@
using BizHawk.Common;
using BizHawk.Common.BufferExtensions;
-using BizHawk.Common.CollectionExtensions;
using BizHawk.Common.IOExtensions;
diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES/SNESGraphicsDecoder.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES/SNESGraphicsDecoder.cs
index 97777e60f5c..7357a756993 100644
--- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES/SNESGraphicsDecoder.cs
+++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES/SNESGraphicsDecoder.cs
@@ -1071,7 +1071,7 @@ public void RenderSpriteToScreen(int* screen, int stride, int destx, int desty,
screen[dofs] = color;
Paletteize(screen, dofs, oam.Palette * 16 + 128, 1);
Colorize(screen, dofs, 1);
- if (spriteMap != null) spriteMap[dx, dy] = (byte)spritenum;
+ spriteMap?[dx, dy] = (byte) spritenum;
}
}
}
diff --git a/src/BizHawk.Emulation.Cores/Consoles/PC Engine/PCEngine.cs b/src/BizHawk.Emulation.Cores/Consoles/PC Engine/PCEngine.cs
index 24b6bb7c2a7..bc2de68c585 100644
--- a/src/BizHawk.Emulation.Cores/Consoles/PC Engine/PCEngine.cs
+++ b/src/BizHawk.Emulation.Cores/Consoles/PC Engine/PCEngine.cs
@@ -223,7 +223,7 @@ private void Init(GameInfo game, byte[] rom)
// 384k roms require special loading code. Why ;_;
// In memory, 384k roms look like [1st 256k][Then full 384k]
RomData = new byte[0xA0000];
- ((ReadOnlySpan) rom.AsSpan(start: 0, length: 0x40000)).ConcatArray(rom, dest: RomData);
+ rom.AsSpan(start: 0, length: 0x40000).ConcatArray(rom, dest: RomData);
}
else
{
@@ -350,10 +350,7 @@ private void CheckSpriteLimit()
{
bool spriteLimit = ForceSpriteLimit | Settings.SpriteLimit;
VDC1.PerformSpriteLimit = spriteLimit;
- if (VDC2 != null)
- {
- VDC2.PerformSpriteLimit = spriteLimit;
- }
+ VDC2?.PerformSpriteLimit = spriteLimit;
}
diff --git a/src/BizHawk.Emulation.Cores/Consoles/PC Engine/QuickCollections.cs b/src/BizHawk.Emulation.Cores/Consoles/PC Engine/QuickCollections.cs
index 7d7ccb58748..53253b559f1 100644
--- a/src/BizHawk.Emulation.Cores/Consoles/PC Engine/QuickCollections.cs
+++ b/src/BizHawk.Emulation.Cores/Consoles/PC Engine/QuickCollections.cs
@@ -53,7 +53,7 @@ public QuickQueue(int capacity)
public void Enqueue(T item)
{
if (size >= buffer.Length)
- throw new Exception($"{nameof(QuickQueue)} capacity breached!");
+ throw new Exception($"{nameof(QuickQueue<>)} capacity breached!");
buffer[tail] = item;
tail = (tail + 1) % buffer.Length;
@@ -78,7 +78,7 @@ public T[] ToArray(int elemSize)
public T Dequeue()
{
if (size == 0)
- throw new Exception($"{nameof(QuickQueue)} is empty!");
+ throw new Exception($"{nameof(QuickQueue<>)} is empty!");
T item = buffer[head];
head = (head + 1) % buffer.Length;
diff --git a/src/BizHawk.Emulation.DiscSystem/DiscFormats/CUE/CUE_Compile.cs b/src/BizHawk.Emulation.DiscSystem/DiscFormats/CUE/CUE_Compile.cs
index 61af7c0b8d5..6ec52f3306d 100644
--- a/src/BizHawk.Emulation.DiscSystem/DiscFormats/CUE/CUE_Compile.cs
+++ b/src/BizHawk.Emulation.DiscSystem/DiscFormats/CUE/CUE_Compile.cs
@@ -194,12 +194,7 @@ private void UpdateDiscInfo(CUE_File.Command.TRACK trackCommand)
private void CloseFile()
{
- if (curr_track != null)
- {
- //flag this track as the final one in the file
- curr_track.IsFinalInFile = true;
- }
-
+ curr_track?.IsFinalInFile = true;
curr_file = null;
}
diff --git a/src/BizHawk.Emulation.DiscSystem/DiscIdentifier.cs b/src/BizHawk.Emulation.DiscSystem/DiscIdentifier.cs
index 32636bbf457..6b7ffa055a5 100644
--- a/src/BizHawk.Emulation.DiscSystem/DiscIdentifier.cs
+++ b/src/BizHawk.Emulation.DiscSystem/DiscIdentifier.cs
@@ -3,7 +3,6 @@
using System.Text;
using BizHawk.Common;
-using BizHawk.Common.CollectionExtensions;
using BizHawk.Common.StringExtensions;
using ISOParser;
diff --git a/src/BizHawk.Emulation.DiscSystem/DiscMountJob.cs b/src/BizHawk.Emulation.DiscSystem/DiscMountJob.cs
index 0188e0e37ca..07b76049ebd 100644
--- a/src/BizHawk.Emulation.DiscSystem/DiscMountJob.cs
+++ b/src/BizHawk.Emulation.DiscSystem/DiscMountJob.cs
@@ -217,7 +217,7 @@ void LoadCue(string cueDirPath, string cueContent)
}
// set up the lowest level synth provider
- if (OUT_Disc != null) OUT_Disc.SynthProvider = new ArraySectorSynthProvider { Sectors = OUT_Disc._Sectors, FirstLBA = -150 };
+ OUT_Disc?.SynthProvider = new ArraySectorSynthProvider { Sectors = OUT_Disc._Sectors, FirstLBA = -150 };
}
public static string GenerateCue(string binFilePath, bool isMode2)
diff --git a/src/BizHawk.Tests.Common/EndiannessUtils/EndiannessUtilsTests.cs b/src/BizHawk.Tests.Common/EndiannessUtils/EndiannessUtilsTests.cs
index edb987380fd..58b9711207a 100644
--- a/src/BizHawk.Tests.Common/EndiannessUtils/EndiannessUtilsTests.cs
+++ b/src/BizHawk.Tests.Common/EndiannessUtils/EndiannessUtilsTests.cs
@@ -11,7 +11,7 @@ public sealed class EndiannessUtilsTests
public void TestByteSwap16()
{
var b = new byte[] { 0x23, 0x01, 0x67, 0x45, 0xAB, 0x89, 0xEF, 0xCD }.AsSpan();
- var a = b.ToArray().AsSpan();
+ var a = b.ToArray();
EndiannessUtils.MutatingByteSwap16(a);
CollectionAssert.That.AreEqual(expected, a, "should match expected after 1 application");
EndiannessUtils.MutatingByteSwap16(a);
@@ -22,7 +22,7 @@ public void TestByteSwap16()
public void TestByteSwap32()
{
var b = new byte[] { 0x67, 0x45, 0x23, 0x01, 0xEF, 0xCD, 0xAB, 0x89 }.AsSpan();
- var a = b.ToArray().AsSpan();
+ var a = b.ToArray();
EndiannessUtils.MutatingByteSwap32(a);
CollectionAssert.That.AreEqual(expected, a, "should match expected after 1 application");
EndiannessUtils.MutatingByteSwap32(a);
@@ -33,7 +33,7 @@ public void TestByteSwap32()
public void TestShortSwap32()
{
var b = new byte[] { 0x45, 0x67, 0x01, 0x23, 0xCD, 0xEF, 0x89, 0xAB }.AsSpan();
- var a = b.ToArray().AsSpan();
+ var a = b.ToArray();
EndiannessUtils.MutatingShortSwap32(a);
CollectionAssert.That.AreEqual(expected, a, "should match expected after 1 application");
EndiannessUtils.MutatingShortSwap32(a);
diff --git a/src/BizHawk.Tests.Common/TestAssertions.cs b/src/BizHawk.Tests.Common/TestAssertions.cs
index 6fa0b4fde3c..148d3240125 100644
--- a/src/BizHawk.Tests.Common/TestAssertions.cs
+++ b/src/BizHawk.Tests.Common/TestAssertions.cs
@@ -39,14 +39,6 @@ public static void AreEqual(
Assert.Fail(message);
}
- public static void AreEqual(
- this CollectionAssert assert,
- Span expected,
- Span actual,
- string? message = null)
- where T : IEquatable
- => assert.AreEqual((ReadOnlySpan) expected, actual, message);
-
public static void Contains(
this CollectionAssert assert,
IEnumerable collection,
diff --git a/src/MainSlnCommon.props b/src/MainSlnCommon.props
index 5d3c6addaba..45a1a7e9b02 100644
--- a/src/MainSlnCommon.props
+++ b/src/MainSlnCommon.props
@@ -47,7 +47,7 @@
-
+