Skip to content

Manic EMU is an all-in-one retro game emulator for iOS. It packs powerful features while keeping a clean, sleek UI and delivering buttery-smooth gameplay.

Swift

Add WonderSwan, Naomi, Atomiswave, System SP support

Daiuno68e7b21dc668
diff --git a/Cores/mame.libretro.framework/mame.libretro b/Cores/mame.libretro.framework/mame.libretro
index f521c325..9685df41 100755
--- a/Cores/mame.libretro.framework/mame.libretro
+++ b/Cores/mame.libretro.framework/mame.libretro
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:dce51a1d68f2d52f18ba259e0f5c85d646fe43c513d24269827032bf81ec01b4
-size 99441616
+oid sha256:bb40365d7d492d11c968778755ed2fefd179bedc031ac96fdc7fde221e245ac7
+size 103052048
diff --git a/Cores/mednafen.wswan.libretro.framework/Info.plist b/Cores/mednafen.wswan.libretro.framework/Info.plist
new file mode 100644
index 00000000..18e6b992
--- /dev/null
+++ b/Cores/mednafen.wswan.libretro.framework/Info.plist
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:6ef1c35f5f34630a698e2eb044df9711d6abaa21eeccc79d68e2198fe232a9be
+size 739
diff --git a/Cores/mednafen.wswan.libretro.framework/_CodeSignature/CodeResources b/Cores/mednafen.wswan.libretro.framework/_CodeSignature/CodeResources
new file mode 100644
index 00000000..5267ff5b
--- /dev/null
+++ b/Cores/mednafen.wswan.libretro.framework/_CodeSignature/CodeResources
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:18aaf74b36de4974ff9a9d6161d173b13a7f6e76faa8476933d3f25bc3ca9a6e
+size 1798
diff --git a/Cores/mednafen.wswan.libretro.framework/mednafen.wswan.libretro b/Cores/mednafen.wswan.libretro.framework/mednafen.wswan.libretro
new file mode 100755
index 00000000..012924dd
--- /dev/null
+++ b/Cores/mednafen.wswan.libretro.framework/mednafen.wswan.libretro
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:125c7ac00b5364ec04a3be27a21ae5fc0713f84fc0a7a61a465ebf86558be114
+size 1077856
diff --git a/Dependencies/Libretro b/Dependencies/Libretro
index 837894b5..08ac198e 160000
--- a/Dependencies/Libretro
+++ b/Dependencies/Libretro
@@ -1 +1 @@
-Subproject commit 837894b594ad7dcce4bf2db7b9675ec6241a0a1c
+Subproject commit 08ac198e13ae34a46b352183837d48ed9bc4b1e0
diff --git a/ManicEmu/ManicEmu.xcodeproj/project.pbxproj b/ManicEmu/ManicEmu.xcodeproj/project.pbxproj
index b9b0f0f5..24abd8e7 100644
--- a/ManicEmu/ManicEmu.xcodeproj/project.pbxproj
+++ b/ManicEmu/ManicEmu.xcodeproj/project.pbxproj
@@ -53,6 +53,9 @@
5706B0FD2DFFED170066122E /* menu_pipeline.metal in Sources */ = {isa = PBXBuildFile; fileRef = 57BFBE4C2DD3326400AABF98 /* menu_pipeline.metal */; };
5708351C2D3216980079D410 /* Log.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5708351B2D3216930079D410 /* Log.swift */; };
570A28002DCF03CF001249C6 /* PLzmaSDK in Frameworks */ = {isa = PBXBuildFile; productRef = 570A27FF2DCF03CF001249C6 /* PLzmaSDK */; };
+ 570C614730543805007E0C53 /* mednafen.wswan.libretro.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 570C6146305437FE007E0C53 /* mednafen.wswan.libretro.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
+ 570C61483054380D007E0C53 /* mednafen.wswan.libretro.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 570C6146305437FE007E0C53 /* mednafen.wswan.libretro.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
+ 570C614930543815007E0C53 /* mednafen.wswan.libretro.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 570C6146305437FE007E0C53 /* mednafen.wswan.libretro.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
570F590C2DC5B838007BFD92 /* ThemeSettingView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 570F590B2DC5B82F007BFD92 /* ThemeSettingView.swift */; };
570F590E2DC5BAEE007BFD92 /* DesktopIconCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 570F590D2DC5BAE1007BFD92 /* DesktopIconCollectionViewCell.swift */; };
570F59102DC5BB03007BFD92 /* ThemeColorCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 570F590F2DC5BAF4007BFD92 /* ThemeColorCollectionViewCell.swift */; };
@@ -1639,6 +1642,9 @@
F9A3C32228B84AD391F34585 /* NVActivityIndicatorView in Frameworks */ = {isa = PBXBuildFile; productRef = 578E26D32FD41D9300A2749A /* NVActivityIndicatorView */; };
FDD0064DAC7645118F826ED7 /* Closures in Frameworks */ = {isa = PBXBuildFile; productRef = 578E231F2FD288C600A2749A /* Closures */; };
FFD8F5F4CE02425E8BA80296 /* mednafen.pce.libretro.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9408D7BF872544CFABE4D652 /* mednafen.pce.libretro.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
+ 58D0423D007B462DB353AA16 /* WSC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 16B86ECC930242969A108735 /* WSC.swift */; };
+ 54CDF4E1512F4F639EE3CDC2 /* WSC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 16B86ECC930242969A108735 /* WSC.swift */; };
+ AD7D0110DD684A0DA5505F08 /* WSC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 16B86ECC930242969A108735 /* WSC.swift */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
@@ -1697,6 +1703,7 @@
dstPath = "";
dstSubfolderSpec = 10;
files = (
+ 570C614930543815007E0C53 /* mednafen.wswan.libretro.framework in Embed Frameworks */,
57909691303EF3A300A53656 /* mesen-s.libretro.framework in Embed Frameworks */,
5790960E303D795200A53656 /* gpsp.libretro.framework in Embed Frameworks */,
5790955E303C7D9100A53656 /* puae.libretro.framework in Embed Frameworks */,
@@ -1761,6 +1768,7 @@
dstPath = "";
dstSubfolderSpec = 10;
files = (
+ 570C614730543805007E0C53 /* mednafen.wswan.libretro.framework in Embed Frameworks */,
5790968F303EF38F00A53656 /* mesen-s.libretro.framework in Embed Frameworks */,
57909605303D793A00A53656 /* gpsp.libretro.framework in Embed Frameworks */,
16D61BE375CD4F61ACCF0FF2 /* puae.libretro.framework in Embed Frameworks */,
@@ -1814,6 +1822,7 @@
dstPath = "";
dstSubfolderSpec = 10;
files = (
+ 570C61483054380D007E0C53 /* mednafen.wswan.libretro.framework in Embed Frameworks */,
57909690303EF39B00A53656 /* mesen-s.libretro.framework in Embed Frameworks */,
57909608303D794200A53656 /* gpsp.libretro.framework in Embed Frameworks */,
E2162239F8584ED6843B9760 /* puae.libretro.framework in Embed Frameworks */,
@@ -1896,6 +1905,7 @@
5706B0482DFBF8350066122E /* 32X.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = 32X.swift; sourceTree = "<group>"; };
5706B0592DFC0F7A0066122E /* SS.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SS.swift; sourceTree = "<group>"; };
5708351B2D3216930079D410 /* Log.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Log.swift; sourceTree = "<group>"; };
+ 570C6146305437FE007E0C53 /* mednafen.wswan.libretro.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = mednafen.wswan.libretro.framework; sourceTree = "<group>"; };
570F590B2DC5B82F007BFD92 /* ThemeSettingView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ThemeSettingView.swift; sourceTree = "<group>"; };
570F590D2DC5BAE1007BFD92 /* DesktopIconCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DesktopIconCollectionViewCell.swift; sourceTree = "<group>"; };
570F590F2DC5BAF4007BFD92 /* ThemeColorCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ThemeColorCollectionViewCell.swift; sourceTree = "<group>"; };
@@ -6722,6 +6732,7 @@
F0C500000000000000000106 /* FocusCollectionView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FocusCollectionView.swift; sourceTree = "<group>"; };
F0C500000000000000000107 /* FocusSystem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FocusSystem.swift; sourceTree = "<group>"; };
F0C500000000000000000108 /* FocusSystem+UIViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "FocusSystem+UIViewController.swift"; sourceTree = "<group>"; };
+ 16B86ECC930242969A108735 /* WSC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WSC.swift; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@@ -12605,6 +12616,7 @@
57C75AD42FD572260093A2B3 /* Cores */ = {
isa = PBXGroup;
children = (
+ 570C6146305437FE007E0C53 /* mednafen.wswan.libretro.framework */,
57909689303EF38000A53656 /* mesen-s.libretro.framework */,
03741E2E8CB24E5790E97476 /* puae.libretro.framework */,
6A6021052A14459DA6F729AB /* vice.x64sc.libretro.framework */,
@@ -12848,6 +12860,7 @@
57F0D8402DE2CD7500760F57 /* Cores */ = {
isa = PBXGroup;
children = (
+ 16B86ECC930242969A108735 /* WSC.swift */,
B93489E15EFD47F2AE825436 /* Amiga.swift */,
37C004DF500A40988FE64A18 /* C64.swift */,
78D4867970474EB9B27D4D8D /* NGP.swift */,
@@ -13706,6 +13719,7 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
+ 58D0423D007B462DB353AA16 /* WSC.swift in Sources */,
57909385303C7D9100A53656 /* Amiga.swift in Sources */,
57909386303C7D9100A53656 /* C64.swift in Sources */,
57909387303C7D9100A53656 /* NGP.swift in Sources */,
@@ -14168,6 +14182,7 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
+ 54CDF4E1512F4F639EE3CDC2 /* WSC.swift in Sources */,
0965D1CD6E9344C18E3454A6 /* Amiga.swift in Sources */,
C77604CEA6544406AAC031FA /* C64.swift in Sources */,
A672B510CD9141B18392D564 /* NGP.swift in Sources */,
@@ -14613,6 +14628,7 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
+ AD7D0110DD684A0DA5505F08 /* WSC.swift in Sources */,
8CFD19E8FFCB46D79A392284 /* Amiga.swift in Sources */,
3CC0A81B407547FBA1CF0693 /* C64.swift in Sources */,
1186ADAD578A4FAC9E5337EA /* NGP.swift in Sources */,
diff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Brand/ws_group_brand.imageset/Contents.json b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Brand/ws_group_brand.imageset/Contents.json
new file mode 100644
index 00000000..9c323560
--- /dev/null
+++ b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Brand/ws_group_brand.imageset/Contents.json
@@ -0,0 +1,54 @@
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "scale" : "1x"
+ },
+ {
+ "appearances" : [
+ {
+ "appearance" : "luminosity",
+ "value" : "dark"
+ }
+ ],
+ "idiom" : "universal",
+ "scale" : "1x"
+ },
+ {
+ "filename" : "[email protected]",
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "appearances" : [
+ {
+ "appearance" : "luminosity",
+ "value" : "dark"
+ }
+ ],
+ "filename" : "[email protected]",
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "filename" : "[email protected]",
+ "idiom" : "universal",
+ "scale" : "3x"
+ },
+ {
+ "appearances" : [
+ {
+ "appearance" : "luminosity",
+ "value" : "dark"
+ }
+ ],
+ "filename" : "[email protected]",
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "author" : "xcode",
+ "version" : 1
+ }
+}
diff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Brand/ws_group_brand.imageset/[email protected] b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Brand/ws_group_brand.imageset/[email protected]
new file mode 100644
index 00000000..67d82b8c
Binary files /dev/null and b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Brand/ws_group_brand.imageset/[email protected] differ
diff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Brand/ws_group_brand.imageset/[email protected] b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Brand/ws_group_brand.imageset/[email protected]
new file mode 100644
index 00000000..a83b0506
Binary files /dev/null and b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Brand/ws_group_brand.imageset/[email protected] differ
diff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Brand/ws_group_brand.imageset/[email protected] b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Brand/ws_group_brand.imageset/[email protected]
new file mode 100644
index 00000000..3bc2b42e
Binary files /dev/null and b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Brand/ws_group_brand.imageset/[email protected] differ
diff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Brand/ws_group_brand.imageset/[email protected] b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Brand/ws_group_brand.imageset/[email protected]
new file mode 100644
index 00000000..e8189877
Binary files /dev/null and b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Brand/ws_group_brand.imageset/[email protected] differ
diff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Brand/wsc_group_brand.imageset/Contents.json b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Brand/wsc_group_brand.imageset/Contents.json
new file mode 100644
index 00000000..4ec03541
--- /dev/null
+++ b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Brand/wsc_group_brand.imageset/Contents.json
@@ -0,0 +1,54 @@
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "scale" : "1x"
+ },
+ {
+ "appearances" : [
+ {
+ "appearance" : "luminosity",
+ "value" : "dark"
+ }
+ ],
+ "idiom" : "universal",
+ "scale" : "1x"
+ },
+ {
+ "filename" : "[email protected]",
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "appearances" : [
+ {
+ "appearance" : "luminosity",
+ "value" : "dark"
+ }
+ ],
+ "filename" : "[email protected]",
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "filename" : "[email protected]",
+ "idiom" : "universal",
+ "scale" : "3x"
+ },
+ {
+ "appearances" : [
+ {
+ "appearance" : "luminosity",
+ "value" : "dark"
+ }
+ ],
+ "filename" : "[email protected]",
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "author" : "xcode",
+ "version" : 1
+ }
+}
diff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Brand/wsc_group_brand.imageset/[email protected] b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Brand/wsc_group_brand.imageset/[email protected]
new file mode 100644
index 00000000..802d1c1d
Binary files /dev/null and b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Brand/wsc_group_brand.imageset/[email protected] differ
diff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Brand/wsc_group_brand.imageset/[email protected] b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Brand/wsc_group_brand.imageset/[email protected]
new file mode 100644
index 00000000..028ce3cc
Binary files /dev/null and b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Brand/wsc_group_brand.imageset/[email protected] differ
diff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Brand/wsc_group_brand.imageset/[email protected] b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Brand/wsc_group_brand.imageset/[email protected]
new file mode 100644
index 00000000..f7ab93c3
Binary files /dev/null and b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Brand/wsc_group_brand.imageset/[email protected] differ
diff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Brand/wsc_group_brand.imageset/[email protected] b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Brand/wsc_group_brand.imageset/[email protected]
new file mode 100644
index 00000000..e09e0475
Binary files /dev/null and b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Brand/wsc_group_brand.imageset/[email protected] differ
diff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Cover/ws_cover_h.imageset/Contents.json b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Cover/ws_cover_h.imageset/Contents.json
new file mode 100644
index 00000000..1d696232
--- /dev/null
+++ b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Cover/ws_cover_h.imageset/Contents.json
@@ -0,0 +1,54 @@
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "scale" : "1x"
+ },
+ {
+ "appearances" : [
+ {
+ "appearance" : "luminosity",
+ "value" : "dark"
+ }
+ ],
+ "idiom" : "universal",
+ "scale" : "1x"
+ },
+ {
+ "filename" : "[email protected]",
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "appearances" : [
+ {
+ "appearance" : "luminosity",
+ "value" : "dark"
+ }
+ ],
+ "filename" : "[email protected]",
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "filename" : "[email protected]",
+ "idiom" : "universal",
+ "scale" : "3x"
+ },
+ {
+ "appearances" : [
+ {
+ "appearance" : "luminosity",
+ "value" : "dark"
+ }
+ ],
+ "filename" : "[email protected]",
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "author" : "xcode",
+ "version" : 1
+ }
+}
diff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Cover/ws_cover_h.imageset/[email protected] b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Cover/ws_cover_h.imageset/[email protected]
new file mode 100644
index 00000000..80a2054a
Binary files /dev/null and b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Cover/ws_cover_h.imageset/[email protected] differ
diff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Cover/ws_cover_h.imageset/[email protected] b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Cover/ws_cover_h.imageset/[email protected]
new file mode 100644
index 00000000..68692f50
Binary files /dev/null and b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Cover/ws_cover_h.imageset/[email protected] differ
diff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Cover/ws_cover_h.imageset/[email protected] b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Cover/ws_cover_h.imageset/[email protected]
new file mode 100644
index 00000000..4b11f525
Binary files /dev/null and b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Cover/ws_cover_h.imageset/[email protected] differ
diff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Cover/ws_cover_h.imageset/[email protected] b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Cover/ws_cover_h.imageset/[email protected]
new file mode 100644
index 00000000..cb2d6657
Binary files /dev/null and b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Cover/ws_cover_h.imageset/[email protected] differ
diff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Cover/ws_cover_v.imageset/Contents.json b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Cover/ws_cover_v.imageset/Contents.json
new file mode 100644
index 00000000..6cff0081
--- /dev/null
+++ b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Cover/ws_cover_v.imageset/Contents.json
@@ -0,0 +1,54 @@
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "scale" : "1x"
+ },
+ {
+ "appearances" : [
+ {
+ "appearance" : "luminosity",
+ "value" : "dark"
+ }
+ ],
+ "idiom" : "universal",
+ "scale" : "1x"
+ },
+ {
+ "filename" : "[email protected]",
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "appearances" : [
+ {
+ "appearance" : "luminosity",
+ "value" : "dark"
+ }
+ ],
+ "filename" : "[email protected]",
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "filename" : "[email protected]",
+ "idiom" : "universal",
+ "scale" : "3x"
+ },
+ {
+ "appearances" : [
+ {
+ "appearance" : "luminosity",
+ "value" : "dark"
+ }
+ ],
+ "filename" : "[email protected]",
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "author" : "xcode",
+ "version" : 1
+ }
+}
diff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Cover/ws_cover_v.imageset/[email protected] b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Cover/ws_cover_v.imageset/[email protected]
new file mode 100644
index 00000000..b03069dc
Binary files /dev/null and b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Cover/ws_cover_v.imageset/[email protected] differ
diff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Cover/ws_cover_v.imageset/[email protected] b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Cover/ws_cover_v.imageset/[email protected]
new file mode 100644
index 00000000..5bcca329
Binary files /dev/null and b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Cover/ws_cover_v.imageset/[email protected] differ
diff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Cover/ws_cover_v.imageset/[email protected] b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Cover/ws_cover_v.imageset/[email protected]
new file mode 100644
index 00000000..3e34b9c1
Binary files /dev/null and b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Cover/ws_cover_v.imageset/[email protected] differ
diff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Cover/ws_cover_v.imageset/[email protected] b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Cover/ws_cover_v.imageset/[email protected]
new file mode 100644
index 00000000..903f36c0
Binary files /dev/null and b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Cover/ws_cover_v.imageset/[email protected] differ
diff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Cover/wsc_cover_h.imageset/Contents.json b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Cover/wsc_cover_h.imageset/Contents.json
new file mode 100644
index 00000000..28653e27
--- /dev/null
+++ b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Cover/wsc_cover_h.imageset/Contents.json
@@ -0,0 +1,54 @@
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "scale" : "1x"
+ },
+ {
+ "appearances" : [
+ {
+ "appearance" : "luminosity",
+ "value" : "dark"
+ }
+ ],
+ "idiom" : "universal",
+ "scale" : "1x"
+ },
+ {
+ "filename" : "[email protected]",
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "appearances" : [
+ {
+ "appearance" : "luminosity",
+ "value" : "dark"
+ }
+ ],
+ "filename" : "[email protected]",
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "filename" : "[email protected]",
+ "idiom" : "universal",
+ "scale" : "3x"
+ },
+ {
+ "appearances" : [
+ {
+ "appearance" : "luminosity",
+ "value" : "dark"
+ }
+ ],
+ "filename" : "[email protected]",
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "author" : "xcode",
+ "version" : 1
+ }
+}
diff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Cover/wsc_cover_h.imageset/[email protected] b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Cover/wsc_cover_h.imageset/[email protected]
new file mode 100644
index 00000000..cf7a4a8a
Binary files /dev/null and b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Cover/wsc_cover_h.imageset/[email protected] differ
diff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Cover/wsc_cover_h.imageset/[email protected] b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Cover/wsc_cover_h.imageset/[email protected]
new file mode 100644
index 00000000..3ba1e065
Binary files /dev/null and b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Cover/wsc_cover_h.imageset/[email protected] differ
diff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Cover/wsc_cover_h.imageset/[email protected] b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Cover/wsc_cover_h.imageset/[email protected]
new file mode 100644
index 00000000..40731a99
Binary files /dev/null and b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Cover/wsc_cover_h.imageset/[email protected] differ
diff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Cover/wsc_cover_h.imageset/[email protected] b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Cover/wsc_cover_h.imageset/[email protected]
new file mode 100644
index 00000000..129cadab
Binary files /dev/null and b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Cover/wsc_cover_h.imageset/[email protected] differ
diff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Cover/wsc_cover_v.imageset/Contents.json b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Cover/wsc_cover_v.imageset/Contents.json
new file mode 100644
index 00000000..3128d502
--- /dev/null
+++ b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Cover/wsc_cover_v.imageset/Contents.json
@@ -0,0 +1,54 @@
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "scale" : "1x"
+ },
+ {
+ "appearances" : [
+ {
+ "appearance" : "luminosity",
+ "value" : "dark"
+ }
+ ],
+ "idiom" : "universal",
+ "scale" : "1x"
+ },
+ {
+ "filename" : "[email protected]",
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "appearances" : [
+ {
+ "appearance" : "luminosity",
+ "value" : "dark"
+ }
+ ],
+ "filename" : "[email protected]",
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "filename" : "[email protected]",
+ "idiom" : "universal",
+ "scale" : "3x"
+ },
+ {
+ "appearances" : [
+ {
+ "appearance" : "luminosity",
+ "value" : "dark"
+ }
+ ],
+ "filename" : "[email protected]",
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "author" : "xcode",
+ "version" : 1
+ }
+}
diff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Cover/wsc_cover_v.imageset/[email protected] b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Cover/wsc_cover_v.imageset/[email protected]
new file mode 100644
index 00000000..8fea3370
Binary files /dev/null and b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Cover/wsc_cover_v.imageset/[email protected] differ
diff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Cover/wsc_cover_v.imageset/[email protected] b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Cover/wsc_cover_v.imageset/[email protected]
new file mode 100644
index 00000000..61510172
Binary files /dev/null and b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Cover/wsc_cover_v.imageset/[email protected] differ
diff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Cover/wsc_cover_v.imageset/[email protected] b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Cover/wsc_cover_v.imageset/[email protected]
new file mode 100644
index 00000000..1625d749
Binary files /dev/null and b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Cover/wsc_cover_v.imageset/[email protected] differ
diff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Cover/wsc_cover_v.imageset/[email protected] b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Cover/wsc_cover_v.imageset/[email protected]
new file mode 100644
index 00000000..7b5dc185
Binary files /dev/null and b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Cover/wsc_cover_v.imageset/[email protected] differ
diff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Manufacturer/bandai_highlight.imageset/Contents.json b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Manufacturer/bandai_highlight.imageset/Contents.json
new file mode 100644
index 00000000..c5532e5b
--- /dev/null
+++ b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Manufacturer/bandai_highlight.imageset/Contents.json
@@ -0,0 +1,22 @@
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "scale" : "1x"
+ },
+ {
+ "filename" : "[email protected]",
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "filename" : "[email protected]",
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "author" : "xcode",
+ "version" : 1
+ }
+}
diff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Manufacturer/bandai_highlight.imageset/[email protected] b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Manufacturer/bandai_highlight.imageset/[email protected]
new file mode 100644
index 00000000..228c1189
Binary files /dev/null and b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Manufacturer/bandai_highlight.imageset/[email protected] differ
diff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Manufacturer/bandai_highlight.imageset/[email protected] b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Manufacturer/bandai_highlight.imageset/[email protected]
new file mode 100644
index 00000000..80f93535
Binary files /dev/null and b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Manufacturer/bandai_highlight.imageset/[email protected] differ
diff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Manufacturer/bandai_normal.imageset/Contents.json b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Manufacturer/bandai_normal.imageset/Contents.json
new file mode 100644
index 00000000..8d5406d5
--- /dev/null
+++ b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Manufacturer/bandai_normal.imageset/Contents.json
@@ -0,0 +1,54 @@
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "scale" : "1x"
+ },
+ {
+ "appearances" : [
+ {
+ "appearance" : "luminosity",
+ "value" : "dark"
+ }
+ ],
+ "idiom" : "universal",
+ "scale" : "1x"
+ },
+ {
+ "filename" : "[email protected]",
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "appearances" : [
+ {
+ "appearance" : "luminosity",
+ "value" : "dark"
+ }
+ ],
+ "filename" : "[email protected]",
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "filename" : "[email protected]",
+ "idiom" : "universal",
+ "scale" : "3x"
+ },
+ {
+ "appearances" : [
+ {
+ "appearance" : "luminosity",
+ "value" : "dark"
+ }
+ ],
+ "filename" : "[email protected]",
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "author" : "xcode",
+ "version" : 1
+ }
+}
diff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Manufacturer/bandai_normal.imageset/[email protected] b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Manufacturer/bandai_normal.imageset/[email protected]
new file mode 100644
index 00000000..9a034073
Binary files /dev/null and b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Manufacturer/bandai_normal.imageset/[email protected] differ
diff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Manufacturer/bandai_normal.imageset/[email protected] b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Manufacturer/bandai_normal.imageset/[email protected]
new file mode 100644
index 00000000..de398f6c
Binary files /dev/null and b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Manufacturer/bandai_normal.imageset/[email protected] differ
diff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Manufacturer/bandai_normal.imageset/[email protected] b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Manufacturer/bandai_normal.imageset/[email protected]
new file mode 100644
index 00000000..2d9304fd
Binary files /dev/null and b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Manufacturer/bandai_normal.imageset/[email protected] differ
diff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Manufacturer/bandai_normal.imageset/[email protected] b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Manufacturer/bandai_normal.imageset/[email protected]
new file mode 100644
index 00000000..6b0ade9c
Binary files /dev/null and b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Manufacturer/bandai_normal.imageset/[email protected] differ
diff --git a/ManicEmu/ManicEmu/Resources/Info.plist b/ManicEmu/ManicEmu/Resources/Info.plist
index 0e25a13d..11574e46 100644
--- a/ManicEmu/ManicEmu/Resources/Info.plist
+++ b/ManicEmu/ManicEmu/Resources/Info.plist
@@ -459,6 +459,18 @@
<string>public.aoshuang.game.amiga</string>
</array>
</dict>
+ <dict>
+ <key>CFBundleTypeName</key>
+ <string>WSC Game</string>
+ <key>CFBundleTypeRole</key>
+ <string>Editor</string>
+ <key>LSHandlerRank</key>
+ <string>Owner</string>
+ <key>LSItemContentTypes</key>
+ <array>
+ <string>public.aoshuang.game.wsc</string>
+ </array>
+ </dict>
<dict>
<key>CFBundleTypeName</key>
<string>Manic EMU Controller Skin</string>
@@ -1643,6 +1655,30 @@
</array>
</dict>
</dict>
+ <dict>
+ <key>UTTypeConformsTo</key>
+ <array>
+ <string>public.data</string>
+ </array>
+ <key>UTTypeDescription</key>
+ <string>WSC Game</string>
+ <key>UTTypeIconFiles</key>
+ <array>
+ <string>file_icon.png</string>
+ </array>
+ <key>UTTypeIdentifier</key>
+ <string>public.aoshuang.game.wsc</string>
+ <key>UTTypeTagSpecification</key>
+ <dict>
+ <key>public.filename-extension</key>
+ <array>
+ <string>ws</string>
+ <string>wsc</string>
+ <string>pc2</string>
+ <string>pcv2</string>
+ </array>
+ </dict>
+ </dict>
<dict>
<key>UTTypeConformsTo</key>
<array>
diff --git a/ManicEmu/ManicEmu/Resources/en.lproj/Localizable.strings b/ManicEmu/ManicEmu/Resources/en.lproj/Localizable.strings
index 804afaf9..62e3e288 100644
--- a/ManicEmu/ManicEmu/Resources/en.lproj/Localizable.strings
+++ b/ManicEmu/ManicEmu/Resources/en.lproj/Localizable.strings
@@ -1148,3 +1148,9 @@ Press the controller button to complete mapping...";
"ICloudRepairSyncResult" = "Repair finished. Uploaded %d, downloaded %d.";
"ICloudRepairSyncResultPending" = "Repair finished. Uploaded %d, downloaded %d. %d files will retry later.";
"ICloudROMStillSyncing" = "This ROM is still downloading from iCloud. Try again in a moment.";
+
+"WSwanRotateDisplay" = "Rotate Display";
+"NDSLidToggle" = "Toggle Lid";
+"ResetTips" = "Reset Tips";
+"ResetTipsDesc" = "Show previously dismissed alerts and tips again";
+"ResetTipsSuccess" = "Tips reset successfully";
diff --git a/ManicEmu/ManicEmu/Resources/zh-Hans.lproj/Localizable.strings b/ManicEmu/ManicEmu/Resources/zh-Hans.lproj/Localizable.strings
index 3553a371..db5f3c47 100644
--- a/ManicEmu/ManicEmu/Resources/zh-Hans.lproj/Localizable.strings
+++ b/ManicEmu/ManicEmu/Resources/zh-Hans.lproj/Localizable.strings
@@ -1144,3 +1144,8 @@
"ICloudRepairSyncResultPending" = "修复完成。已上传 %d 个,已下载 %d 个。另有 %d 个文件稍后重试。";
"ICloudROMStillSyncing" = "此 ROM 仍在从 iCloud 下载,请稍后再试。";
+"WSwanRotateDisplay" = "旋转显示";
+"NDSLidToggle" = "上盖开合";
+"ResetTips" = "重置提示";
+"ResetTipsDesc" = "让已展示过的弹窗和提示再次出现";
+"ResetTipsSuccess" = "提示重置成功";
diff --git a/ManicEmu/ManicEmu/Sources/Base/AppDelegate.swift b/ManicEmu/ManicEmu/Sources/Base/AppDelegate.swift
index d0a1798e..bd0f6324 100644
--- a/ManicEmu/ManicEmu/Sources/Base/AppDelegate.swift
+++ b/ManicEmu/ManicEmu/Sources/Base/AppDelegate.swift
@@ -40,7 +40,9 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
// Allowed interface orientations. Rotation follows this mask, not overlay windows.
static var orientation: UIInterfaceOrientationMask = R.Config.DefaultOrientation {
didSet {
- UIViewController.attemptRotationToDeviceOrientation()
+ if !OrientationLockPin.isPinned {
+ UIViewController.attemptRotationToDeviceOrientation()
+ }
if #available(iOS 26.0, *) {
let root = ApplicationSceneDelegate.applicationWindow?.rootViewController
root?.setNeedsUpdateOfSupportedInterfaceOrientations()
@@ -87,6 +89,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
//Enable the imitation keyboard blocking issue
IQKeyboardManager.shared.isEnabled = true
+ OrientationLockPin.start()
return true
}
@@ -116,9 +119,9 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
}
}
- //允许的旋转类型
+ // Allowed orientations. Control Center portrait lock is pinned in OrientationLockPin.
func application(_ application: UIApplication, supportedInterfaceOrientationsFor window: UIWindow?) -> UIInterfaceOrientationMask {
- return AppDelegate.orientation
+ return OrientationLockPin.resolvedMask(for: window)
}
//APNS推送回调 没有真正开启用户推送通知,开启了静默通知 用于CloudKit的同步
diff --git a/ManicEmu/ManicEmu/Sources/Base/Constants.swift b/ManicEmu/ManicEmu/Sources/Base/Constants.swift
index 82c0fef3..34ea6523 100644
--- a/ManicEmu/ManicEmu/Sources/Base/Constants.swift
+++ b/ManicEmu/ManicEmu/Sources/Base/Constants.swift
@@ -81,6 +81,8 @@ extension _R {
case .ps2: return 0.711
case .ngc, .wii: return 0.706
case .ngp, .ngpc: return 0.8594
+ case .wsc: return 0.6799
+ case .ws: return 0.8063
case .c64: return 0.7146
case .amiga: return 0.7052
default: return 1.0
@@ -505,6 +507,7 @@ extension _R {
static let Holani = Document.appendingPathComponent(EmulationCore.Holani.name)
static let BeetlePCE = Document.appendingPathComponent(EmulationCore.BeetlePCE.name)
static let BeetleNeoPop = Document.appendingPathComponent(EmulationCore.BeetleNeoPop.name)
+ static let BeetleWonderSwan = Document.appendingPathComponent(EmulationCore.BeetleWonderSwan.name)
static let VICEx64sc = Document.appendingPathComponent(EmulationCore.VICEx64sc.name)
static let PUAE = Document.appendingPathComponent(EmulationCore.PUAE.name)
static let LibretroSavePath = Document
@@ -542,7 +545,6 @@ extension _R {
}
struct _DefaultKey {
- static let HasShowPrivacyAlert = "HasShowPrivacyAlert"
static let AppGroupName = "group.aoshuang.ManicEmu"
static let AppGroupIsPremiumKey = "AppGroupIsPremiumKey"
static let HasShowCheatCodeWarning = "HasShowCheatCodeWarning"
@@ -558,10 +560,19 @@ extension _R {
static let HasShowPlayCasePromo = "HasShowPlayCasePromo"
static let HasImportedPlayCaseSkin = "HasImportedPlayCaseSkin"
static let HasShowFreeJ2meAlert = "HasShowFreeJ2meAlert"
- static let HasShowFirstAnniversaryLetter = "HasShowFirstAnniversaryLetter"
- static let FoolsDayTrickCount = "FoolsDayTrickCount"
static let HasShowDolphinCoreAlert = "HasShowDolphinCoreAlert"
static let HasPolishSkins = "HasPolishSkins"
+ static let DisableSecondPrompt = "DisableSecondPrompt"
+ static let TipsDefaultKeys: [String] = [HasShowCheatCodeWarning,
+ ShowRequestReviewDate,
+ HasShow3DSNotSupportAlert,
+ HasShowSSPlayAlert,
+ HasShowPS1PlayAlert,
+ HasShowJumpGameInfoAlert,
+ HasShowPlayCasePromo,
+ HasShowFreeJ2meAlert,
+ HasShowDolphinCoreAlert,
+ DisableSecondPrompt]
}
struct _Font {
@@ -598,6 +609,8 @@ extension _R {
static let SaturnConsoleLanguage = ["Auto Detect", "Japan", "North America", "Europe", "South Korea", "Asia (NTSC)", "Asia (PAL)", "Brazil", "Latin America"]
static let DSConsoleLanguage = ["Auto", "Japanese", "English", "French", "German", "Italian", "Spanish"]
static let DCConsoleLanguage = ["Default", "Japanese", "English", "German", "French", "Spanish", "Italian"]
+ static let DolphinLanguage = ["Japanese", "English", "German", "French", "Spanish", "Italian", "Dutch", "Simplified", "Traditional", "Korean"]
+ static let WSwanLanguage = ["English", "Japanese"]
static let ManicScheme = "manicemu"
static var PSXController = "PlayStation Controller"
static var PSXDualShock = "DualShock"
@@ -629,6 +642,399 @@ extension _R {
"Manic Interpreter (experimental)",
"Cached Interpreter (slower)"
]
+ static let NaomiTitles: Set<String> = ["18wheelro",
+ "18wheelr",
+ "18wheelrt",
+ "18wheels",
+ "18wheelu",
+ "airlbios",
+ "alienfnt",
+ "alienfnta",
+ "alpilotj",
+ "alpilot",
+ "anpanman2",
+ "anpanman2a",
+ "asndynmt",
+ "asndynmto",
+ "ausfache",
+ "azumanga",
+ "bdrdown",
+ "beachspi",
+ "capsnk",
+ "capsnka",
+ "capsnkb",
+ "cfield",
+ "chocomk",
+ "cleoftp",
+ "clubk2k3",
+ "clubk2kp",
+ "clubk2kpa",
+ "clubkcyc",
+ "clubkcyco",
+ "clubkprz",
+ "clubkpzb",
+ "clubkpzbp",
+ "clubkrt",
+ "clubkrta",
+ "clubkrtc",
+ "clubkrto",
+ "confmiss",
+ "crackndj",
+ "crakndj2",
+ "crzytaxi",
+ "csmash",
+ "csmasho",
+ "cspike",
+ "cvs2mf",
+ "cvs2",
+ "cvsgd",
+ "deathcox",
+ "deathcoxj",
+ "deathcoxo",
+ "derbyo2k",
+ "derbyoc",
+ "derbyoc2",
+ "derbyocw",
+ "doa2",
+ "doa2a",
+ "doa2m",
+ "dragntra",
+ "dragntr",
+ "dragntr2",
+ "dragntr3",
+ "drbyocwa",
+ "drbyocwb",
+ "drbyocwc",
+ "drbyocwt",
+ "dybb99",
+ "dybbnao",
+ "dygolf",
+ "dygolfp",
+ "f355",
+ "f355p",
+ "f355bios",
+ "f355dlx",
+ "f355twin",
+ "f355twinp",
+ "f355twn2",
+ "ggram2",
+ "ggx",
+ "ggxx",
+ "ggxxac",
+ "ggxxrl",
+ "ggxxrlo",
+ "ggxxsla",
+ "gram2000",
+ "gundmct",
+ "gundmgd",
+ "gundmxgd",
+ "gunsur2",
+ "gunsur2j",
+ "gwing2",
+ "hmgeo",
+ "hod2bios",
+ "hopper",
+ "hotd2",
+ "hotd2e",
+ "hotd2o",
+ "hotd2p",
+ "ikaruga",
+ "illvelo",
+ "inidv3ca",
+ "inidv3cy",
+ "initd",
+ "initdexp",
+ "initdexpo",
+ "initdo",
+ "initdv2e",
+ "initdv2j",
+ "initdv2ja",
+ "initdv2jo",
+ "initdv3e",
+ "initdv3j",
+ "initdv3jb",
+ "inunoos",
+ "jambo",
+ "jingystm",
+ "karous",
+ "keyboard",
+ "kick4csh",
+ "kingrt66",
+ "kingrt66p",
+ "kurucham",
+ "lupinsho",
+ "lupinshoo",
+ "luptype",
+ "mamonoro",
+ "manicpnc",
+ "marstv",
+ "mazan",
+ "mazanj",
+ "mazanu",
+ "mbaa",
+ "mbaao",
+ "meltyb",
+ "meltybld",
+ "meltyblo",
+ "meltybo",
+ "mj1a",
+ "mj1b",
+ "mj1c",
+ "mj1d",
+ "mj1e",
+ "mj1",
+ "moeru",
+ "mok",
+ "monkeyba",
+ "mushi2k3",
+ "mushi2k4",
+ "mushi2k5",
+ "mushi2k61",
+ "mushi2k62",
+ "mushike",
+ "mushikeo",
+ "mushikep",
+ "mushikc",
+ "mushikk",
+ "mushi2eo",
+ "mushik2e",
+ "mushik2k",
+ "mushik4e",
+ "mushik4t",
+ "mvsc2",
+ "mvsc2u",
+ "naomi",
+ "naomi2",
+ "naomigd",
+ "ndcfboxa",
+ "ngdup23a",
+ "ngdup23c",
+ "ngdup23e",
+ "ninjaslt",
+ "ninjaslta",
+ "ninjasltj",
+ "ninjasltu",
+ "ntvmys",
+ "oinori",
+ "otrigger",
+ "pjustic",
+ "pjustica",
+ "pokasuka",
+ "pstone",
+ "pstone2",
+ "pstone2b",
+ "psyvar2",
+ "puyoda",
+ "puyofev",
+ "puyofevj",
+ "puyofevp",
+ "qmegamis",
+ "quizqgd",
+ "radirgy",
+ "radirgyn",
+ "radirgyo",
+ "rhytngk",
+ "ringouto",
+ "ringout",
+ "samba",
+ "sambaa",
+ "samba2k",
+ "sambap",
+ "senko",
+ "senkoo",
+ "senkosp",
+ "sfz3ugd",
+ "sgdrvsim",
+ "sgtetris",
+ "shaktam",
+ "shaktamb",
+ "shaktmsp",
+ "shangril",
+ "shikgam2",
+ "shootopl",
+ "shootpl",
+ "shootplm",
+ "shootplmp",
+ "shorse",
+ "shorsem",
+ "shorsel",
+ "shors2k1",
+ "shors2k2",
+ "shors2k2l",
+ "shors2k2m",
+ "shors2k2s",
+ "shorsep",
+ "shorsepm",
+ "shorseps",
+ "shorsepb",
+ "shorsepl",
+ "shorsepr",
+ "shorseprl",
+ "shorseprs",
+ "shorseprvl",
+ "shorseprvr",
+ "sl2007",
+ "slasho",
+ "slashout",
+ "smarinef",
+ "smlg99",
+ "soulsurf",
+ "spawn",
+ "spkrbtl",
+ "sprtjam",
+ "ss2005",
+ "ss2005o",
+ "sstrkfgt",
+ "sstrkfgta",
+ "starseek",
+ "suchie3",
+ "takoron",
+ "tduno",
+ "tduno2",
+ "tetkiwam",
+ "tokyobus",
+ "totd",
+ "totdo",
+ "toukon4",
+ "toyfight",
+ "trgheart",
+ "trghearto",
+ "trizeal",
+ "undefeat",
+ "usagiym",
+ "vathlete",
+ "vathletep",
+ "vf4",
+ "vf4b",
+ "vf4cart",
+ "vf4evo",
+ "vf4evob",
+ "vf4evoa",
+ "vf4evoct",
+ "vf4o",
+ "vf4tuned",
+ "vf4tuneda",
+ "vf4tunedd",
+ "virnba",
+ "virnbao",
+ "virnbap",
+ "virnbapa",
+ "vonot",
+ "vs2_2ko",
+ "vs2_2k",
+ "vstrik3",
+ "vstrik3c",
+ "vstrik3co",
+ "vtenis2c",
+ "vtennis",
+ "vtennis2",
+ "vtennisg",
+ "wccf116",
+ "wccf1dup",
+ "wccf212e",
+ "wccf234j",
+ "wccf2chk",
+ "wccf310j",
+ "wccf322e",
+ "wccf331e",
+ "wccf331j",
+ "wccf341j",
+ "wccf400j",
+ "wccf420e",
+ "wldkicks",
+ "wldkicksj",
+ "wldkicksu",
+ "wldkickspj",
+ "wldkickspw",
+ "wldrider",
+ "wrungp",
+ "wrungpo",
+ "wsbbgd",
+ "wwfroyal",
+ "zerogu2",
+ "zombrvn",
+ "zombrvne",
+ "zombrvno",
+ "zunou"]
+ static let AtomiswaveTitles: Set<String> = ["anmlbskt",
+ "anmlbskta",
+ "awbios",
+ "basschal",
+ "basschalo",
+ "blokpong",
+ "claychal",
+ "demofist",
+ "dirtypig",
+ "dolphin",
+ "fotns",
+ "ftspeed",
+ "ggisuka",
+ "ggx15",
+ "kofnw",
+ "kofnwj",
+ "kofxi",
+ "kov7sprt",
+ "maxspeed",
+ "mslug6",
+ "ngbc",
+ "ngbcj",
+ "rangrmsn",
+ "rumblef",
+ "rumblef2",
+ "rumblefp",
+ "rumblf2p",
+ "salmankt",
+ "samsptk",
+ "sprtshot",
+ "sushibar",
+ "vfurlong",
+ "waidrive",
+ "xtrmhnt2",
+ "xtrmhunt"]
+ static let SegaSPTitles: Set<String> = ["aminosan",
+ "arajewel",
+ "arajewelm",
+ "arajewels",
+ "bingogal",
+ "bingogala",
+ "bingogalb",
+ "bingogalc",
+ "bingogals",
+ "bingopar",
+ "brickppl",
+ "btlracer",
+ "dinoki25",
+ "dinokich",
+ "dinoki4",
+ "dinoking",
+ "dinokior",
+ "galilfac",
+ "isshoni",
+ "huhimage",
+ "kazaaan",
+ "kazaaana",
+ "kazaaan2",
+ "kazaaan2c",
+ "kazaaan2o",
+ "kingyo",
+ "kingyoch",
+ "loveber3",
+ "loveber3cn",
+ "lovebero",
+ "lovebery",
+ "magicpop",
+ "manpuku",
+ "mirworld",
+ "monomedal",
+ "ochaken",
+ "puyomedal",
+ "segasp",
+ "shateki",
+ "spchecksrv",
+ "tetgiano",
+ "tetgiant",
+ "unomedal",
+ "westdrmg"]
}
enum _Config {
@@ -819,6 +1225,8 @@ extension _R {
gameTypeName = GameType.gbc.localizedShortName
} else if gameType == .ngpc {
gameTypeName = GameType.ngp.localizedShortName
+ } else if gameType == .ws {
+ gameTypeName = GameType.wsc.localizedShortName
} else if gameType == .supergrafx || gameType == .turbografx_16 || gameType == .turbografx_cd {
gameTypeName = GameType.pce.localizedShortName
}
@@ -1079,6 +1487,15 @@ extension _R {
BIOSItem(fileName: "kick40060.CD32", imported: false, desc: "CD32 KS v3.1 rev 40.060", required: true),
BIOSItem(fileName: "kick40060.CD32.ext", imported: false, desc: "CD32 extended ROM rev 40.060", required: true)
]
+
+ static let SegaArcadeBios: Set<String> = ["airlbios.zip",
+ "awbios.zip",
+ "f355bios.zip",
+ "f355dlx.zip",
+ "hod2bios.zip",
+ "naomi.zip",
+ "naomi2.zip",
+ "naomigd.zip"]
}
struct _Style {
diff --git a/ManicEmu/ManicEmu/Sources/Business/CheatCode/Views/AddCheatCodeView.swift b/ManicEmu/ManicEmu/Sources/Business/CheatCode/Views/AddCheatCodeView.swift
index f638d59f..a99a7579 100644
--- a/ManicEmu/ManicEmu/Sources/Business/CheatCode/Views/AddCheatCodeView.swift
+++ b/ManicEmu/ManicEmu/Sources/Business/CheatCode/Views/AddCheatCodeView.swift
@@ -250,6 +250,30 @@ class AddCheatCodeView: BaseView {
updateConfirmButton(enable: isValid)
}
+ /// Beetle raw RAM patch: `AAAA:VV` / `AAAAA:VV`, parts joined by + , ; . _ or space.
+ private static func formattedBeetleRaw(code: String) -> String? {
+ let separators = CharacterSet(charactersIn: "+,;._ \n\t")
+ let parts = code.components(separatedBy: separators).map {
+ $0.trimmingCharacters(in: .whitespacesAndNewlines)
+ }.filter { !$0.isEmpty }
+ guard !parts.isEmpty else { return nil }
+ var normalized = [String]()
+ for part in parts {
+ let pieces = part.split(separator: ":", omittingEmptySubsequences: false)
+ guard pieces.count == 2 else { return nil }
+ let address = String(pieces[0])
+ let value = String(pieces[1])
+ guard (1...5).contains(address.count),
+ value.count == 2,
+ address.allSatisfy({ $0.isHexDigit }),
+ value.allSatisfy({ $0.isHexDigit }) else {
+ return nil
+ }
+ normalized.append("\(address.uppercased()):\(value.uppercased())")
+ }
+ return normalized.joined(separator: "+")
+ }
+
private static func formattedCWCheat(code: String) -> String {
var index = 0
let codes = code.trimmingCharacters(in: .whitespacesAndNewlines).components(separatedBy: .whitespacesAndNewlines)
@@ -307,7 +331,11 @@ class AddCheatCodeView: BaseView {
}
return (cheatCode, currentCheatFormat)
}
- //指定作弊码类型的检查
+ if currentCheatFormat.type == .beetleRaw {
+ guard let formatString = formattedBeetleRaw(code: cheatCode) else { return nil }
+ return (formatString, currentCheatFormat)
+ }
+ // Validate against the selected cheat format.
let formatString: String
if currentCheatFormat.type == .cwCheat {
formatString = Self.formattedCWCheat(code: cheatCode)
@@ -324,10 +352,13 @@ class AddCheatCodeView: BaseView {
return (formatString, currentCheatFormat)
} else {
- //未指定作弊码类型的检查
+ // Auto-detect among the platform's formats.
for cheatFormat in supportedCheatFormats.filter({ $0.type != .autoDetect }) {
let formatString: String
- if cheatFormat.type == .cwCheat {
+ if cheatFormat.type == .beetleRaw {
+ guard let beetleRaw = formattedBeetleRaw(code: cheatCode) else { continue }
+ return (beetleRaw, cheatFormat)
+ } else if cheatFormat.type == .cwCheat {
formatString = formattedCWCheat(code: cheatCode)
} else {
formatString = cheatCode.replacingOccurrences(of: "-", with: "").replacingOccurrences(of: ":", with: "").components(separatedBy: .whitespacesAndNewlines).joined().formatted(with: cheatFormat)
diff --git a/ManicEmu/ManicEmu/Sources/Business/Common/Models/ExtraKey.swift b/ManicEmu/ManicEmu/Sources/Business/Common/Models/ExtraKey.swift
index a96e185d..7e281740 100644
--- a/ManicEmu/ManicEmu/Sources/Business/Common/Models/ExtraKey.swift
+++ b/ManicEmu/ManicEmu/Sources/Business/Common/Models/ExtraKey.swift
@@ -90,4 +90,7 @@ enum ExtraKey: String {
case slowMotionSpeed
case iCloudSyncROM
case iCloudSyncROMPlatforms
+ case wswanRotation
+ case wswanPalette
+ case arcadeType//naomi=1 atomiswave=2 segasp=3
}
diff --git a/ManicEmu/ManicEmu/Sources/Business/Common/Models/Manufacturer.swift b/ManicEmu/ManicEmu/Sources/Business/Common/Models/Manufacturer.swift
index 2438decd..bac1abfd 100644
--- a/ManicEmu/ManicEmu/Sources/Business/Common/Models/Manufacturer.swift
+++ b/ManicEmu/ManicEmu/Sources/Business/Common/Models/Manufacturer.swift
@@ -9,13 +9,13 @@
enum Manufacturer: Int, CaseIterable {
- case nintendo, sony, sega, arcade, atari, sun, microsoft, modRetro, nokia, nec, snk, commodore
+ case nintendo, sony, sega, arcade, atari, sun, microsoft, modRetro, nokia, nec, snk, commodore, bandai
static var allCases: [Manufacturer] {
if Locale.prefersUS {
- [.nintendo, .sony, .sega, .atari, .arcade, .sun, .microsoft, .modRetro, .nokia, .nec, .snk, .commodore]
+ [.nintendo, .sony, .sega, .atari, .arcade, .sun, .microsoft, .modRetro, .nokia, .nec, .snk, .commodore, .bandai]
} else {
- [.nintendo, .sony, .sega, .arcade, .atari, .sun, .microsoft, .modRetro, .nokia, .nec, .snk, .commodore]
+ [.nintendo, .sony, .sega, .arcade, .atari, .sun, .microsoft, .modRetro, .nokia, .nec, .snk, .commodore, .bandai]
}
}
@@ -53,6 +53,8 @@ enum Manufacturer: Int, CaseIterable {
"SNK"
case .commodore:
"Commodore"
+ case .bandai:
+ "Bandai"
}
}
@@ -89,6 +91,8 @@ enum Manufacturer: Int, CaseIterable {
R.image.snk_normal()!
case .commodore:
R.image.commodore_normal()!
+ case .bandai:
+ R.image.bandai_normal()!
}
}
@@ -118,6 +122,8 @@ enum Manufacturer: Int, CaseIterable {
R.image.snk_highlight()!
case .commodore:
R.image.commodore_highlight()!
+ case .bandai:
+ R.image.bandai_highlight()!
}
}
}
diff --git a/ManicEmu/ManicEmu/Sources/Business/Common/ViewControllers/BaseViewController.swift b/ManicEmu/ManicEmu/Sources/Business/Common/ViewControllers/BaseViewController.swift
index 9e5001f1..1e66adbc 100644
--- a/ManicEmu/ManicEmu/Sources/Business/Common/ViewControllers/BaseViewController.swift
+++ b/ManicEmu/ManicEmu/Sources/Business/Common/ViewControllers/BaseViewController.swift
@@ -145,6 +145,7 @@ class BaseViewController: UIViewController {
}
override func viewWillTransition(to size: CGSize, with coordinator: any UIViewControllerTransitionCoordinator) {
+ OrientationLockPin.resistPortraitTransitionIfNeeded(to: size)
super.viewWillTransition(to: size, with: coordinator)
coordinator.animate(alongsideTransition: { [weak self] _ in
self?.setPreferredContentSize()
@@ -195,4 +196,9 @@ class BaseViewController: UIViewController {
return [.left, .right]
}
+ @available(iOS 26.0, *)
+ override var prefersInterfaceOrientationLocked: Bool {
+ OrientationLockPin.prefersLocked
+ }
+
}
diff --git a/ManicEmu/ManicEmu/Sources/Business/GameInfo/Models/SpecialCoreOption.swift b/ManicEmu/ManicEmu/Sources/Business/GameInfo/Models/SpecialCoreOption.swift
index cbae4705..ffc76593 100644
--- a/ManicEmu/ManicEmu/Sources/Business/GameInfo/Models/SpecialCoreOption.swift
+++ b/ManicEmu/ManicEmu/Sources/Business/GameInfo/Models/SpecialCoreOption.swift
@@ -121,6 +121,8 @@ enum SpecialCoreOption: String {
case reicast_internal_resolution
case reicast_language
case reicast_renderer
+ case reicast_threaded_rendering
+ case reicast_dynamic_cpu_ratio
//arcade
case mame_cheats_enable
//isAzahar3DS
@@ -194,6 +196,7 @@ enum SpecialCoreOption: String {
case dolphin_wiispeak_muted
case dolphin_wii_logi_microphone_enable
case dolphin_bluetooth_passthrough
+ case dolphin_language
//pce
case pce_default_joypad_type_p1
@@ -202,6 +205,12 @@ enum SpecialCoreOption: String {
case pce_default_joypad_type_p4
case pce_default_joypad_type_p5
+ //wsc
+ case wswan_language
+ case wswan_rotate_display
+ case wswan_rotate_keymap
+ case wswan_mono_palette
+
func isOptimizationCoreConfig(key: String,
@@ -360,7 +369,8 @@ enum SpecialCoreOption: String {
var result: [SpecialCoreOption] = [.dolphin_cheats_enabled,
.dolphin_cheats_import,
.dolphin_cpu_core,
- .dolphin_skip_gc_bios]
+ .dolphin_skip_gc_bios,
+ .dolphin_language]
if game.gameType == .wii {
result += [.dolphin_gc_sp1,
.dolphin_enable_gamecube_mic,
@@ -386,6 +396,11 @@ enum SpecialCoreOption: String {
.pce_default_joypad_type_p3,
.pce_default_joypad_type_p4,
.pce_default_joypad_type_p5]
+ } else if game.gameType == .wsc {
+ return [.wswan_language,
+ .wswan_rotate_display,
+ .wswan_rotate_keymap,
+ .wswan_mono_palette]
}
return []
}
@@ -447,7 +462,7 @@ enum SpecialCoreOption: String {
]
} else if game.gameType == .dc {
result = [.reicast_renderer: "Vulkan"]
- } else if game.gameType == .arcade, game.defaultCore == 0 {
+ } else if game.gameType == .arcade, !game.isSegaArcade, game.defaultCore == 0 {
result = [.mame_cheats_enable: "enabled"]
} else if game.isAzahar3DS {
result = [
@@ -529,6 +544,12 @@ enum SpecialCoreOption: String {
.pce_default_joypad_type_p4: "6 Buttons",
.pce_default_joypad_type_p5: "6 Buttons"
]
+ } else if game.gameType == .wsc {
+ result = [
+ .wswan_language: "english",
+ .wswan_rotate_display: "landscape",
+ .wswan_mono_palette: "default"
+ ]
}
return result.mapKeysAndValues({ ($0.key.rawValue, $0.value) })
}
diff --git a/ManicEmu/ManicEmu/Sources/Business/Games/Models/GameOption.swift b/ManicEmu/ManicEmu/Sources/Business/Games/Models/GameOption.swift
index dd006161..4a5fcc44 100644
--- a/ManicEmu/ManicEmu/Sources/Business/Games/Models/GameOption.swift
+++ b/ManicEmu/ManicEmu/Sources/Business/Games/Models/GameOption.swift
@@ -46,6 +46,7 @@ enum GameOption: Int, CaseIterable {
ndsMicrophone,
clownMDTvStandard,
snesVRAM,
+ wswanRotation,
coreSettings,
saveState,
quickLoadState,
@@ -81,7 +82,8 @@ enum GameOption: Int, CaseIterable {
wiiControllerMode,
coverScraping,
dolphinCpuCore,
- slowMotion
+ slowMotion,
+ ndsLidToggle
//When adding a new option, make sure to add it at the end; otherwise, it might affect the existing Prefference configurations
@@ -181,7 +183,7 @@ enum GameOption: Int, CaseIterable {
.symbolImage(R.image.airplay_iconSymbols())
case .controllerSetting:
.symbolImage(R.image.controller_iconSymbols())
- case .orientation:
+ case .orientation, .wswanRotation:
.symbolImage(R.image.autorotate_iconSymbols())
case .gameOptionSort:
.symbolImage(R.image.systemtypeRegular_iconSymbols())
@@ -227,6 +229,8 @@ enum GameOption: Int, CaseIterable {
.symbol(.candybarphone)
case .slowMotion:
.symbol(.slowmo)
+ case .ndsLidToggle:
+ .symbol(.squareTophalfFilled)
}
}
@@ -376,6 +380,10 @@ enum GameOption: Int, CaseIterable {
R.string.localizable.cpuEmulationMethod()
case .slowMotion:
R.string.localizable.slowMotion()
+ case .wswanRotation:
+ R.string.localizable.wSwanRotateDisplay()
+ case .ndsLidToggle:
+ R.string.localizable.ndsLidToggle()
}
}
@@ -451,6 +459,7 @@ enum GameOption: Int, CaseIterable {
.simBlowing,
.swapDisk,
.insertDisc,
+ .ndsLidToggle
]
static let defaultGroupAndSort: [[Self]] = [
@@ -501,6 +510,8 @@ enum GameOption: Int, CaseIterable {
.symbianDevice,
.wiiControllerMode,
.dolphinCpuCore,
+ .wswanRotation,
+ .ndsLidToggle,
.coreSettings,
],
[
@@ -809,6 +820,8 @@ enum GameOption: Int, CaseIterable {
}
} else if firstGame.gameType == .nes || firstGame.gameType == .fds {
return .chevron(firstGame.currentNesPalette.name)
+ } else if firstGame.effectiveGameType == .ws {
+ return .chevron(firstGame.wswanPaletteTitle)
}
}
@@ -956,6 +969,19 @@ enum GameOption: Int, CaseIterable {
}
}
+ case .wswanRotation:
+ let extraKey = ExtraKey.wswanRotation.rawValue
+ let firstGameValue = firstGame.getExtraInt(key: extraKey) ?? 0
+ if games.allSatisfy({
+ ($0.getExtraInt(key: extraKey) ?? 0) == firstGameValue
+ }) {
+ if firstGameValue == 0 {
+ return .chevron(R.string.localizable.skinSegmentPortraitTitle())
+ } else {
+ return .chevron(R.string.localizable.skinSegmentLandscapeTitle())
+ }
+ }
+
case .rename,
.cover,
.skins,
@@ -982,7 +1008,8 @@ enum GameOption: Int, CaseIterable {
.reload,
.quit,
.gameShortcut,
- .coverScraping:
+ .coverScraping,
+ .ndsLidToggle:
break
}
return .chevron(nil)
@@ -1002,6 +1029,7 @@ enum GameOption: Int, CaseIterable {
.insertDisc,
.reload,
.quit,
+ .ndsLidToggle,
]
case .gameInfo:
return disableOptionsForScene(.common) + [.rename, .genHomeMenu, .coverScraping]
@@ -1087,7 +1115,8 @@ enum GameOption: Int, CaseIterable {
if game.gameType.supportCores.count == 0 ||
(game.gameType == .ss && game.fileExtension.lowercased() == "iso") ||
- game.isArticBaseHomeMenu {
+ game.isArticBaseHomeMenu ||
+ game.isSegaArcade {
allOptions.remove(.switchCore)
}
@@ -1281,6 +1310,14 @@ enum GameOption: Int, CaseIterable {
allOptions.remove(.slowMotion)
}
+ if game.gameType != .wsc {
+ allOptions.remove(.wswanRotation)
+ }
+
+ if game.gameType != .ds {
+ allOptions.remove(.ndsLidToggle)
+ }
+
allOptions.subtract(disableOptionsForScene(scene))
return Array(allOptions)
diff --git a/ManicEmu/ManicEmu/Sources/Business/Games/Models/GameOptionPerform.swift b/ManicEmu/ManicEmu/Sources/Business/Games/Models/GameOptionPerform.swift
index d8716738..7f68015d 100644
--- a/ManicEmu/ManicEmu/Sources/Business/Games/Models/GameOptionPerform.swift
+++ b/ManicEmu/ManicEmu/Sources/Business/Games/Models/GameOptionPerform.swift
@@ -1090,6 +1090,26 @@ extension GameOption {
} else {
performStringAction(with: games, accessoryChange: accessoryChange)
}
+
+ case .wswanRotation:
+ if performImmediately {
+ var rotationIndex = firstGame.getExtraInt(key: ExtraKey.wswanRotation.rawValue) ?? 0
+ rotationIndex = rotationIndex == 0 ? 1 : 0
+ games.forEach({
+ $0.updateExtra(key: ExtraKey.wswanRotation.rawValue, value: rotationIndex)
+ })
+ if PlayViewController.isGaming {
+ LibretroCore.sharedInstance().updateRunningCoreConfigs([
+ SpecialCoreOption.wswan_rotate_display.rawValue: rotationIndex == 0 ? "landscape" : "portrait"
+ ], flush: false)
+ }
+ } else {
+ performStringAction(with: games, accessoryChange: accessoryChange)
+ }
+
+ case .ndsLidToggle:
+ PlayViewController.ndsLidToggle()
+ hideSheetInGaming()
}
}
@@ -1307,6 +1327,8 @@ extension GameOption {
} else if firstGame.defaultCore == 2 {
options = GameOption.Palette.allCases.map({ $0.optionForVBAM })
}
+ } else if firstGame.effectiveGameType == .ws {
+ options = GameOption.Palette.AllPaletteTitleForWS
}
} else if self == .swapDisk {
if firstGame.gameType == .fds {
@@ -1343,6 +1365,8 @@ extension GameOption {
} else if self == .slowMotion {
options = GameOption.SlowMotionSpeed.allCases.map({ $0.title })
detail = R.string.localizable.slowMotionDesc()
+ } else if self == .wswanRotation {
+ options = [R.string.localizable.skinSegmentLandscapeTitle(), R.string.localizable.skinSegmentPortraitTitle()]
}
guard options.count > 0 else { return }
@@ -1432,38 +1456,50 @@ extension GameOption {
}
} else if self == .palette {
- if let palette = GameOption.Palette(rawValue: index) {
- Game.change { realm in
- games.forEach({
- if $0.pallete != palette {
- $0.pallete = palette
- }
- })
- }
+ if firstGame.effectiveGameType == .ws {
+ games.forEach({
+ $0.updateExtra(key: ExtraKey.wswanPalette.rawValue, value: index)
+ })
if PlayViewController.isGaming {
- if firstGame.gameType == .vb {
- LibretroCore.sharedInstance().updateConfig(EmulationCore.BeetleVB.name, key: SpecialCoreOption.vb_color_mode.rawValue, value: palette.paletteTitleForVB, reload: true)
- } else if firstGame.gameType == .pm {
- LibretroCore.sharedInstance().updateConfig(EmulationCore.PokeMini.name, key: SpecialCoreOption.pokemini_palette.rawValue, value: palette.paletteTitleForPM, reload: true)
- } else if firstGame.gameType == .gb {
- if firstGame.defaultCore == 0 {
- //Gambatte
- LibretroCore.sharedInstance().updateRunningCoreConfigs([
- SpecialCoreOption.gambatte_gb_colorization.rawValue: palette == .None ? "disabled" : "internal",
- SpecialCoreOption.gambatte_gb_internal_palette.rawValue: palette.optionForGambatte
- ], flush: false)
- } else if firstGame.defaultCore == 1 {
- //mGBA
- LibretroCore.sharedInstance().updateRunningCoreConfigs([
- SpecialCoreOption.mgba_gb_colors.rawValue: palette.optionForMGBA
- ], flush: false)
- } else if firstGame.defaultCore == 2 {
- LibretroCore.sharedInstance().updateRunningCoreConfigs([
- SpecialCoreOption.vbam_palettes.rawValue: palette.optionForVBAM
- ], flush: false)
+ LibretroCore.sharedInstance().updateRunningCoreConfigs([
+ SpecialCoreOption.wswan_mono_palette.rawValue: GameOption.Palette.AllPaletteTitleForWS[index]
+ ], flush: false)
+ }
+
+ } else {
+ if let palette = GameOption.Palette(rawValue: index) {
+ Game.change { realm in
+ games.forEach({
+ if $0.pallete != palette {
+ $0.pallete = palette
+ }
+ })
+ }
+ if PlayViewController.isGaming {
+ if firstGame.gameType == .vb {
+ LibretroCore.sharedInstance().updateConfig(EmulationCore.BeetleVB.name, key: SpecialCoreOption.vb_color_mode.rawValue, value: palette.paletteTitleForVB, reload: true)
+ } else if firstGame.gameType == .pm {
+ LibretroCore.sharedInstance().updateConfig(EmulationCore.PokeMini.name, key: SpecialCoreOption.pokemini_palette.rawValue, value: palette.paletteTitleForPM, reload: true)
+ } else if firstGame.gameType == .gb {
+ if firstGame.defaultCore == 0 {
+ //Gambatte
+ LibretroCore.sharedInstance().updateRunningCoreConfigs([
+ SpecialCoreOption.gambatte_gb_colorization.rawValue: palette == .None ? "disabled" : "internal",
+ SpecialCoreOption.gambatte_gb_internal_palette.rawValue: palette.optionForGambatte
+ ], flush: false)
+ } else if firstGame.defaultCore == 1 {
+ //mGBA
+ LibretroCore.sharedInstance().updateRunningCoreConfigs([
+ SpecialCoreOption.mgba_gb_colors.rawValue: palette.optionForMGBA
+ ], flush: false)
+ } else if firstGame.defaultCore == 2 {
+ LibretroCore.sharedInstance().updateRunningCoreConfigs([
+ SpecialCoreOption.vbam_palettes.rawValue: palette.optionForVBAM
+ ], flush: false)
+ }
}
+ resumeEmulationIfNeed()
}
- resumeEmulationIfNeed()
}
}
@@ -1564,6 +1600,15 @@ extension GameOption {
if let speed = GameOption.SlowMotionSpeed(rawValue: index) {
performSlowMotion(games: games, speed: speed)
}
+ } else if self == .wswanRotation {
+ games.forEach({
+ $0.updateExtra(key: ExtraKey.wswanRotation.rawValue, value: index)
+ })
+ if PlayViewController.isGaming {
+ LibretroCore.sharedInstance().updateRunningCoreConfigs([
+ SpecialCoreOption.wswan_rotate_display.rawValue: index == 0 ? "landscape" : "portrait"
+ ], flush: false)
+ }
}
accessoryChange?()
} else {
@@ -1725,7 +1770,7 @@ extension GameOption {
tips = R.string.localizable.dolphinSaveTips()
} else if games.contains(where: { $0.gameType == .symbian }) {
tips = R.string.localizable.symbianSaveTips()
- } else if games.contains(where: { $0.gameType == .dc }) {
+ } else if games.contains(where: { $0.gameType == .dc || $0.isSegaArcade }) {
tips = R.string.localizable.dcSaveTips()
} else if games.contains(where: { $0.gameType == .doom }) {
tips = R.string.localizable.doomSaveTips()
@@ -1741,11 +1786,15 @@ extension GameOption {
}
func showSecondPromptIfNeed(continued: (() -> Void)? = nil) {
- if self == .quit || self == .reload || self == .quickLoadState {
+ if (self == .quit || self == .reload || self == .quickLoadState) &&
+ !UserDefaults.standard.bool(forKey: R.DefaultKey.DisableSecondPrompt) {
UIView.makeAlert(title: R.string.localizable.headsUp(),
detail: R.string.localizable.continuedAlert(self.title),
+ cancelTitle: R.string.localizable.dontshowAgain(),
confirmTitle: R.string.localizable.confirmTitle(),
- confirmAction: {
+ cancelAction: {
+ UserDefaults.standard.setValue(true, forKey: R.DefaultKey.DisableSecondPrompt)
+ }, confirmAction: {
continued?()
})
} else {
diff --git a/ManicEmu/ManicEmu/Sources/Business/Games/Models/GameOptionTypes.swift b/ManicEmu/ManicEmu/Sources/Business/Games/Models/GameOptionTypes.swift
index db3c7d60..8db8ed8b 100644
--- a/ManicEmu/ManicEmu/Sources/Business/Games/Models/GameOptionTypes.swift
+++ b/ManicEmu/ManicEmu/Sources/Business/Games/Models/GameOptionTypes.swift
@@ -396,6 +396,37 @@ extension GameOption {
return .None
}
}
+
+ //For WS
+ static var AllPaletteTitleForWS: [String] {
+ ["default",
+ "wonderswan",
+ "wondeswan_color",
+ "swancrystal",
+ "gb_dmg",
+ "gb_pocket",
+ "gb_light",
+ "blossom_pink",
+ "bubbles_blue",
+ "buttercup_green",
+ "digivice",
+ "game_com",
+ "gameking",
+ "game_master",
+ "golden_wild",
+ "greenscale",
+ "hokage_orange",
+ "labo_fawn",
+ "legendary_super_saiyan",
+ "microvision",
+ "million_live_gold",
+ "odyssey_gold",
+ "shiny_sky_blue",
+ "slime_blue",
+ "ti_83",
+ "travel_wood",
+ "virtual_boy"]
+ }
}
enum AirPlayScaling: Int, CaseIterable {
diff --git a/ManicEmu/ManicEmu/Sources/Business/Games/Models/MappingOption.swift b/ManicEmu/ManicEmu/Sources/Business/Games/Models/MappingOption.swift
index 4bfe38cc..b34985ba 100644
--- a/ManicEmu/ManicEmu/Sources/Business/Games/Models/MappingOption.swift
+++ b/ManicEmu/ManicEmu/Sources/Business/Games/Models/MappingOption.swift
@@ -55,6 +55,8 @@ enum MappingOption: String, CaseIterable {
case rewind
//v2.0.1
case slowMotion
+ case wswanRotation
+ case ndsLidToggle
//Both the key and the value need to be unique
static let GameOptionMappings: BiMap<MappingOption, GameOption> = [
@@ -90,7 +92,9 @@ enum MappingOption: String, CaseIterable {
.triggerPro: .triggerPro,
.screenScaling: .screenScaling,
.insertDisc: .insertDisc,
- .coreSettings: .coreSettings
+ .coreSettings: .coreSettings,
+ .wswanRotation: .wswanRotation,
+ .ndsLidToggle: .ndsLidToggle
]
static func availableOptions(games: [Game]) -> [Self] {
diff --git a/ManicEmu/ManicEmu/Sources/Business/Games/Views/GameCoverView.swift b/ManicEmu/ManicEmu/Sources/Business/Games/Views/GameCoverView.swift
index 43a4271c..a7df8404 100644
--- a/ManicEmu/ManicEmu/Sources/Business/Games/Views/GameCoverView.swift
+++ b/ManicEmu/ManicEmu/Sources/Business/Games/Views/GameCoverView.swift
@@ -321,6 +321,14 @@ class GameCoverView: BaseView {
} else if gameTypeCategory == 1 {
image = style == .style2 ? R.image.ngp_color_cover_v() : R.image.ngp_color_cover_h()
}
+ } else if gameType == .wsc {
+ if gameTypeCategory == 0 {
+ image = style == .style2 ? R.image.wsc_cover_v() : R.image.wsc_cover_h()
+ } else if gameTypeCategory == 1 {
+ image = style == .style2 ? R.image.ws_cover_v() : R.image.ws_cover_h()
+ }
+ } else if gameType == .ws {
+ image = style == .style2 ? R.image.ws_cover_v() : R.image.ws_cover_h()
} else if gameType == .c64 {
image = style == .style2 ? R.image.c64_cover_v() : R.image.c64_cover_h()
} else if gameType == .amiga {
diff --git a/ManicEmu/ManicEmu/Sources/Business/Games/Views/GameListLandscapeView.swift b/ManicEmu/ManicEmu/Sources/Business/Games/Views/GameListLandscapeView.swift
index 96aa769d..7b42ed85 100644
--- a/ManicEmu/ManicEmu/Sources/Business/Games/Views/GameListLandscapeView.swift
+++ b/ManicEmu/ManicEmu/Sources/Business/Games/Views/GameListLandscapeView.swift
@@ -418,6 +418,8 @@ class GameListLandscapeView: BaseView {
platform = GameType.pce.localizedShortName
} else if gameType == .ngpc {
platform = GameType.ngp.localizedShortName
+ } else if gameType == .ws {
+ platform = GameType.wsc.localizedShortName
}
return Settings.defalut.getPlatformVisible(platform: platform)
}
@@ -433,6 +435,8 @@ class GameListLandscapeView: BaseView {
return manufacturer.gameTypes.contains(.pce)
case .ngpc:
return manufacturer.gameTypes.contains(.ngp)
+ case .ws:
+ return manufacturer.gameTypes.contains(.wsc)
default:
return manufacturer.gameTypes.contains(gameType)
}
@@ -449,6 +453,7 @@ class GameListLandscapeView: BaseView {
order.insert(.turbografx_cd, at: order.firstIndex(of: .turbografx_16)!)
order.insert(.supergrafx, at: order.firstIndex(of: .turbografx_cd)!)
order.insert(.ngpc, at: order.firstIndex(of: .ngp)!)
+ order.insert(.ws, at: order.firstIndex(of: .wsc)! + 1)
return order
}
diff --git a/ManicEmu/ManicEmu/Sources/Business/Games/Views/GameListView.swift b/ManicEmu/ManicEmu/Sources/Business/Games/Views/GameListView.swift
index 016083b3..9d296425 100644
--- a/ManicEmu/ManicEmu/Sources/Business/Games/Views/GameListView.swift
+++ b/ManicEmu/ManicEmu/Sources/Business/Games/Views/GameListView.swift
@@ -468,6 +468,22 @@ class GameListView: BaseView {
normalDatas[.ngpc] = ngpcGames.count > 0 ? ngpcGames : nil
}
+ // WSC games can switch to the WS subcategory
+ if let wscGames = normalDatas[.wsc], wscGames.count > 0 {
+ var newWscGames = [Game]()
+ var wsGames = [Game]()
+ for wsc in wscGames {
+ let wscGameType = wsc.getExtraInt(key: ExtraKey.gameTypeCategory.rawValue) ?? 0
+ if wscGameType == 0 {
+ newWscGames.append(wsc)
+ } else if wscGameType == 1 {
+ wsGames.append(wsc)
+ }
+ }
+ normalDatas[.wsc] = newWscGames.count > 0 ? newWscGames : nil
+ normalDatas[.ws] = wsGames.count > 0 ? wsGames : nil
+ }
+
//hide platform
let allGameTypes = normalDatas.keys
for gameType in allGameTypes {
@@ -481,6 +497,8 @@ class GameListView: BaseView {
platform = GameType.pce.localizedShortName
} else if gameType == .ngpc {
platform = GameType.ngp.localizedShortName
+ } else if gameType == .ws {
+ platform = GameType.wsc.localizedShortName
}
visible = Settings.defalut.getPlatformVisible(platform: platform)
if !visible {
@@ -756,6 +774,11 @@ class GameListView: BaseView {
return true
}
+ if gameType == .ws,
+ games.where({ $0.gameType == .wsc }).filter({ ($0.getExtraInt(key: ExtraKey.gameTypeCategory.rawValue) ?? 0) == 1 }).count > 0 {
+ return true
+ }
+
if games.count(where: { $0.gameType == gameType }) > 0 {
return true
}
@@ -803,6 +826,7 @@ extension GameListView: UICollectionViewDataSource {
predefinedOrder.insert(.turbografx_cd, at: predefinedOrder.firstIndex(of: .turbografx_16)!)
predefinedOrder.insert(.supergrafx, at: predefinedOrder.firstIndex(of: .turbografx_cd)!)
predefinedOrder.insert(.ngpc, at: predefinedOrder.firstIndex(of: .ngp)!)
+ predefinedOrder.insert(.ws, at: predefinedOrder.firstIndex(of: .wsc)! + 1)
let sortedKeys: [GameType] = predefinedOrder.filter { (isSearchMode ? searchDatas : normalDatas).keys.contains($0) }
return sortedKeys
}
@@ -895,6 +919,10 @@ extension GameListView: UICollectionViewDataSource {
if gameTypeCategory == 1 {
coverGameType = .ngpc
}
+ } else if game.gameType == .wsc {
+ if gameTypeCategory == 1 {
+ coverGameType = .ws
+ }
}
}
}
diff --git a/ManicEmu/ManicEmu/Sources/Business/Play/Models/Game.swift b/ManicEmu/ManicEmu/Sources/Business/Play/Models/Game.swift
index fd904a34..447b8f97 100644
--- a/ManicEmu/ManicEmu/Sources/Business/Play/Models/Game.swift
+++ b/ManicEmu/ManicEmu/Sources/Business/Play/Models/Game.swift
@@ -159,7 +159,7 @@ class Game: Object, ObjectUpdatable {
return URL(string: "uid://\(app.uid)")!
} else {
return URL(string: "uid://\(id)")!
- }
+ }
} else if gameType == .ps1, fileExtension.lowercased() == "bin" {
// Beetle/PCSX cannot load a raw .bin; prefer the sibling .cue when it exists.
let cueUrl = localUrl.deletingPathExtension().appendingPathExtension("cue")
@@ -273,6 +273,8 @@ class Game: Object, ObjectUpdatable {
return URL(fileURLWithPath: R.Path.BeetlePCE.appendingPathComponent("\(name).srm"))
} else if gameType == .ngp {
return URL(fileURLWithPath: R.Path.BeetleNeoPop.appendingPathComponent("\(name).flash"))
+ } else if gameType == .wsc {
+ return URL(fileURLWithPath: R.Path.BeetleWonderSwan.appendingPathComponent("\(name).srm"))
} else if gameType == .c64 {
return URL(fileURLWithPath: R.Path.VICEx64sc.appendingPathComponent("\(name).nvr"))
} else if gameType == .amiga {
@@ -307,13 +309,13 @@ class Game: Object, ObjectUpdatable {
return nil
}
}
-
+
var gameIDForDolphin: String? {
guard isDolphinCore else { return nil }
let value = getExtraString(key: ExtraKey.dolphinGameID.rawValue)
return (value?.isEmpty == false) ? value : nil
}
-
+
/// Parse the ROM header into extras when the Game ID is missing.
@discardableResult
func ensureDolphinGameID() -> String? {
@@ -486,6 +488,9 @@ class Game: Object, ObjectUpdatable {
} else if gameType == .doom {
return .PrBoom
} else if gameType == .arcade {
+ if isSegaArcade {
+ return .Flycast
+ }
if defaultCore == 0 {
return .MAME
} else {
@@ -507,6 +512,8 @@ class Game: Object, ObjectUpdatable {
return .BeetlePCE
} else if gameType == .ngp {
return .BeetleNeoPop
+ } else if gameType == .wsc {
+ return .BeetleWonderSwan
} else if gameType == .c64 {
return .VICEx64sc
} else if gameType == .amiga {
@@ -580,7 +587,7 @@ class Game: Object, ObjectUpdatable {
} else if defaultCore == 2 {
return Bundle.main.path(forResource: "gpsp.libretro", ofType: "framework", inDirectory: "Frameworks")
}
- } else if gameType == .dc {
+ } else if gameType == .dc || isSegaArcade {
if LibretroCore.jitAvailable(), jit {
return Bundle.main.path(forResource: "flycast.libretro", ofType: "framework", inDirectory: "Frameworks")
} else {
@@ -594,7 +601,7 @@ class Game: Object, ObjectUpdatable {
}
} else if gameType == .doom {
return Bundle.main.path(forResource: "prboom.libretro", ofType: "framework", inDirectory: "Frameworks")
- } else if gameType == .arcade {
+ } else if gameType == .arcade && !isSegaArcade {
if defaultCore == 0 {
return Bundle.main.path(forResource: "mame.libretro", ofType: "framework", inDirectory: "Frameworks")
} else {
@@ -616,6 +623,8 @@ class Game: Object, ObjectUpdatable {
return Bundle.main.path(forResource: "mednafen.pce.libretro", ofType: "framework", inDirectory: "Frameworks")
} else if gameType == .ngp {
return Bundle.main.path(forResource: "mednafen.ngp.libretro", ofType: "framework", inDirectory: "Frameworks")
+ } else if gameType == .wsc {
+ return Bundle.main.path(forResource: "mednafen.wswan.libretro", ofType: "framework", inDirectory: "Frameworks")
} else if gameType == .c64 {
return Bundle.main.path(forResource: "vice.x64sc.libretro", ofType: "framework", inDirectory: "Frameworks")
} else if gameType == .amiga {
@@ -1065,7 +1074,8 @@ class Game: Object, ObjectUpdatable {
if gameType == .gb ||
(gameType == .dos && !isDOSHomeMenuGame) ||
gameType == .pce ||
- gameType == .ngp {
+ gameType == .ngp ||
+ gameType == .wsc {
return true
}
return false
@@ -1080,15 +1090,17 @@ class Game: Object, ObjectUpdatable {
return [.pce, .turbografx_16, .turbografx_cd, .supergrafx]
} else if gameType == .ngp {
return [.ngp, .ngpc]
+ } else if gameType == .wsc {
+ return [.wsc, .ws]
}
return []
}
func updateCategory(gameType: GameType) {
guard supportChangeCategory else { return }
- if gameType == .gb || gameType == .dos || gameType == .pce || gameType == .ngp {
+ if gameType == .gb || gameType == .dos || gameType == .pce || gameType == .ngp || gameType == .wsc {
updateExtra(key: ExtraKey.gameTypeCategory.rawValue, value: 0)
- } else if gameType == .chm || gameType == .win95 || gameType == .turbografx_16 || gameType == .ngpc {
+ } else if gameType == .chm || gameType == .win95 || gameType == .turbografx_16 || gameType == .ngpc || gameType == .ws {
updateExtra(key: ExtraKey.gameTypeCategory.rawValue, value: 1)
} else if gameType == .win98 || gameType == .turbografx_cd {
updateExtra(key: ExtraKey.gameTypeCategory.rawValue, value: 2)
@@ -1118,7 +1130,7 @@ class Game: Object, ObjectUpdatable {
return nil
}
- ///GB/DOS/PCE/NGP support category switching onto virtual GameTypes
+ /// GB/DOS/PCE/NGP/WSC support category switching onto virtual GameTypes.
var effectiveGameType: GameType {
virtualGameType ?? gameType
}
@@ -1148,6 +1160,7 @@ class Game: Object, ObjectUpdatable {
isAtari ||
(gameType == .ss && defaultCore == 0) ||
gameType == .dc ||
+ isSegaArcade ||
gameType == .j2me ||
gameType == .dos ||
gameType == .symbian ||
@@ -1167,7 +1180,9 @@ class Game: Object, ObjectUpdatable {
gameType == .psp ||
(gameType == .ss && defaultCore == 0) ||
gameType == .ds ||
- gameType == .dc {
+ gameType == .dc ||
+ isDolphinCore ||
+ gameType == .wsc{
return true
}
return false
@@ -1185,6 +1200,10 @@ class Game: Object, ObjectUpdatable {
languages = R.Strings.DSConsoleLanguage
} else if gameType == .dc {
languages = R.Strings.DCConsoleLanguage
+ } else if isDolphinCore {
+ languages = R.Strings.DolphinLanguage
+ } else if gameType == .wsc {
+ languages = R.Strings.WSwanLanguage
}
return languages
}
@@ -1197,6 +1216,7 @@ class Game: Object, ObjectUpdatable {
gameType == .n64 ||
(gameType == .ps1 && defaultCore == 0) ||
gameType == .dc ||
+ isSegaArcade ||
gameType == .dos ||
gameType == .symbian ||
isDolphinCore {
@@ -1309,7 +1329,8 @@ class Game: Object, ObjectUpdatable {
gameType == .fds ||
(gameType == .gb && defaultCore != 3) ||
gameType == .vb ||
- gameType == .pm {
+ gameType == .pm ||
+ effectiveGameType == .ws {
return true
}
return false
@@ -1616,6 +1637,31 @@ class Game: Object, ObjectUpdatable {
}
return false
}
+
+ var wswanPaletteTitle: String {
+ guard effectiveGameType == .ws else { return "default" }
+ let index = getExtraInt(key: ExtraKey.wswanPalette.rawValue) ?? 0
+ return GameOption.Palette.AllPaletteTitleForWS[index]
+ }
+
+ var isNaomiGame: Bool {
+ guard gameType == .arcade else { return false }
+ return getExtraInt(key: ExtraKey.arcadeType.rawValue) == 1
+ }
+
+ var isAtomiswaveGame: Bool {
+ guard gameType == .arcade else { return false }
+ return getExtraInt(key: ExtraKey.arcadeType.rawValue) == 2
+ }
+
+ var isSegaSPGame: Bool {
+ guard gameType == .arcade else { return false }
+ return getExtraInt(key: ExtraKey.arcadeType.rawValue) == 3
+ }
+
+ var isSegaArcade: Bool {
+ isNaomiGame || isAtomiswaveGame || isSegaSPGame
+ }
}
diff --git a/ManicEmu/ManicEmu/Sources/Business/Play/VIewControllers/PlayViewController.swift b/ManicEmu/ManicEmu/Sources/Business/Play/VIewControllers/PlayViewController.swift
index a8f865bc..14ebb54d 100644
--- a/ManicEmu/ManicEmu/Sources/Business/Play/VIewControllers/PlayViewController.swift
+++ b/ManicEmu/ManicEmu/Sources/Business/Play/VIewControllers/PlayViewController.swift
@@ -25,6 +25,11 @@ class PlayViewController: GameViewController {
private let manicGame: Game
//默认加载的即时存档
private var loadSaveState: GameSaveState? = nil
+ /// Jitless Flycast (DC + Naomi/Atomiswave/SystemSP). Threaded rendering lets the SH4 thread run ahead.
+ private var isJitlessFlycast: Bool {
+ (manicGame.gameType == .dc || manicGame.isSegaArcade)
+ && !(LibretroCore.jitAvailable() && manicGame.jit)
+ }
//MARK: 通知定义
private var notificationTokens = [Any]()
@@ -707,6 +712,13 @@ class PlayViewController: GameViewController {
cancelTitle: R.string.localizable.confirmTitle())
}
})
+ notificationTokens.append(center.addObserver(forName: Notification.Name(rawValue: "SegaArcadeBiosMissingNotification"), object: nil, queue: .main) { notification in
+ if let log = notification.object as? String {
+ UIView.makeAlert(title: R.string.localizable.mameFileMissingTitle(),
+ detail: log,
+ cancelTitle: R.string.localizable.confirmTitle())
+ }
+ })
}
@MainActor required init() {
@@ -734,7 +746,7 @@ class PlayViewController: GameViewController {
if manicGame.gameType == .n64 && UIDevice.isPad {
make.top.equalTo(gameView.snp.bottom).offset(-9)
} else if manicGame.gameType == .j2me ||
- manicGame.gameType == .gba {
+ manicGame.gameType == .gba || manicGame.gameType == .wsc {
make.top.equalTo(gameView.snp.bottom).offset(3)
} else if manicGame.gameType.usesDOSSkinLayout {
if UIDevice.isSmallScreenPhone {
@@ -760,7 +772,8 @@ class PlayViewController: GameViewController {
manicGame.gameType.usesDOSSkinLayout ||
(manicGame.gameType == .symbian && UIDevice.isPhone) ||
manicGame.gameType == .pce ||
- manicGame.gameType == .gba {
+ manicGame.gameType == .gba ||
+ manicGame.gameType == .wsc {
make.height.equalTo(R.Size.ItemHeightMicro)
} else if manicGame.gameType == .ngp {
make.height.equalTo(R.Size.ItemHeightTiny)
@@ -895,11 +908,16 @@ class PlayViewController: GameViewController {
override var supportedInterfaceOrientations: UIInterfaceOrientationMask {
if #available(iOS 26.0, *) {
- return AppDelegate.orientation
+ return OrientationLockPin.resolvedMask(for: view.window)
}
return super.supportedInterfaceOrientations
}
+ @available(iOS 26.0, *)
+ override var prefersInterfaceOrientationLocked: Bool {
+ OrientationLockPin.prefersLocked
+ }
+
/// Default orientation when this screen is presented.
override var preferredInterfaceOrientationForPresentation: UIInterfaceOrientation {
if manicGame.orientation == .landscape {
@@ -911,6 +929,7 @@ class PlayViewController: GameViewController {
}
override func viewWillTransition(to size: CGSize, with coordinator: any UIViewControllerTransitionCoordinator) {
+ OrientationLockPin.resistPortraitTransitionIfNeeded(to: size)
let fromSize = R.Size.WindowSize
let toSize = size
if manicGame.orientation == .portrait {
@@ -1139,7 +1158,9 @@ extension PlayViewController {
} else if manicGame.isLibretroType {
if let statePath = state.stateData?.filePath.path,
LibretroCore.sharedInstance().loadState(statePath) {
- if manicGame.gameType != .dc, (state.getExtraInt(key: ExtraKey.saveStateCore.rawValue) ?? 0) != manicGame.defaultCore {
+ if manicGame.gameType != .dc,
+ !manicGame.isSegaArcade,
+ (state.getExtraInt(key: ExtraKey.saveStateCore.rawValue) ?? 0) != manicGame.defaultCore {
UIView.makeToast(message: R.string.localizable.latestSaveStateUnCompatible())
} else {
resumeEmulationAndHandleAudio()
@@ -1572,7 +1593,11 @@ extension PlayViewController {
}
} else if manicGame.isLibretroType {
DispatchQueue.main.asyncAfter(delay: manicGame.isPicodriveCore && firstInit ? 1 : 0) {
- if self.manicGame.gameType == .arcade, self.manicGame.defaultCore == 1, firstInit, !self.isHardcoreMode {
+ if self.manicGame.gameType == .arcade,
+ !self.manicGame.isSegaArcade,
+ self.manicGame.defaultCore == 1,
+ firstInit,
+ !self.isHardcoreMode {
//FBNeo激活作弊码
if let configs = LibretroCore.sharedInstance().getConfigs(EmulationCore.FinalBurnNeo.name) {
var needToActivedKeys = [String]()
@@ -1672,7 +1697,7 @@ extension PlayViewController {
}
} else if self.manicGame.isLibretroType {
var delay = 0.0
- if self.manicGame.gameType == .arcade || self.manicGame.isAzahar3DS {
+ if (self.manicGame.gameType == .arcade && !self.manicGame.isSegaArcade) || self.manicGame.isAzahar3DS {
delay = 4.0
}
DispatchQueue.main.asyncAfter(delay: delay) {
@@ -1816,16 +1841,23 @@ extension PlayViewController {
.beetle_psx_hw_renderer: "hardware_vk",
.beetle_psx_hw_cpu_dynarec: "disabled",
], safeMode: true)
- } else if manicGame.gameType == .dc {
+ } else if manicGame.gameType == .dc || manicGame.isSegaArcade {
updateLibretroCoreConfigs(core: .Flycast, configs: [
.reicast_internal_resolution: "640x480",
- .reicast_language : "Default"
+ .reicast_language : "Default",
+ .reicast_threaded_rendering: isJitlessFlycast ? "disabled" : "enabled",
+ .reicast_dynamic_cpu_ratio: "disabled"
], safeMode: true)
- } else if manicGame.gameType == .arcade {
+ LibretroCore.sharedInstance().setLibretroLogMonitor(true)
+ if manicGame.gameType == .arcade {
+ ArcadeEmulatorBridge.shared.isSegaArcade = manicGame.isSegaArcade
+ }
+ } else if manicGame.gameType == .arcade && !manicGame.isSegaArcade {
if manicGame.defaultCore == 0 {
updateLibretroCoreConfigs(core: .MAME, configs: [:], safeMode: true)
LibretroCore.sharedInstance().setLibretroLogMonitor(true)
}
+ ArcadeEmulatorBridge.shared.isSegaArcade = false
} else if manicGame.gameType == ._3ds {
ThreeDS.isAzaharCore = manicGame.isAzahar3DS
if manicGame.isAzahar3DS {
@@ -1869,9 +1901,11 @@ extension PlayViewController {
])
LibretroCore.sharedInstance().setLibretroLogMonitor(true)
} else if manicGame.isDolphinCore {
- updateLibretroCoreConfigs(core: .Dolphin, configs: [:])
+ updateLibretroCoreConfigs(core: .Dolphin, configs: [.dolphin_language: "1"])
} else if manicGame.gameType == .amiga {
LibretroCore.sharedInstance().setLibretroLogMonitor(true)
+ } else if manicGame.gameType == .wsc {
+ updateLibretroCoreConfigs(core: .BeetleWonderSwan, configs: [:])
}
} else {
//non safe mode
@@ -2098,19 +2132,27 @@ extension PlayViewController {
.beetle_psx_hw_renderer: isHardwareRenderer ? "hardware_vk" : "software",
.beetle_psx_hw_cpu_dynarec: enableJIT ? "execute" : "disabled"
])
- } else if manicGame.gameType == .dc {
- if LibretroCore.jitAvailable(), manicGame.jit {
+ } else if manicGame.gameType == .dc || manicGame.isSegaArcade {
+ let enableJIT = LibretroCore.jitAvailable() && manicGame.jit
+ if enableJIT {
setupUniversalScript(gameType: .dc)
}
updateDCResolution(manicGame.resolution, reload: false)
updateLibretroCoreConfigs(core: .Flycast, configs: [
- .reicast_language : R.Strings.DCConsoleLanguage[manicGame.region]
+ .reicast_language : R.Strings.DCConsoleLanguage[manicGame.region],
+ .reicast_threaded_rendering: isJitlessFlycast ? "disabled" : "enabled",
+ .reicast_dynamic_cpu_ratio: "disabled"
])
- } else if manicGame.gameType == .arcade {
+ LibretroCore.sharedInstance().setLibretroLogMonitor(true)
+ if manicGame.gameType == .arcade {
+ ArcadeEmulatorBridge.shared.isSegaArcade = manicGame.isSegaArcade
+ }
+ } else if manicGame.gameType == .arcade && !manicGame.isSegaArcade {
if manicGame.defaultCore == 0 {
updateLibretroCoreConfigs(core: .MAME, configs: [:])
LibretroCore.sharedInstance().setLibretroLogMonitor(true)
}
+ ArcadeEmulatorBridge.shared.isSegaArcade = false
} else if manicGame.gameType == ._3ds {
ThreeDS.isAzaharCore = manicGame.isAzahar3DS
if manicGame.isAzahar3DS {
@@ -2181,10 +2223,18 @@ extension PlayViewController {
updateLibretroCoreConfigs(core: .Dolphin, configs: [
.dolphin_cpu_core: enableJIT ? "4" : (enableManicInterpreter ? "6" : "5"),
- .dolphin_cheats_enabled: isHardcoreMode ? "disabled" : "enabled"
+ .dolphin_cheats_enabled: isHardcoreMode ? "disabled" : "enabled",
+ .dolphin_language: "\(manicGame.region)"
])
} else if manicGame.gameType == .amiga {
LibretroCore.sharedInstance().setLibretroLogMonitor(true)
+ } else if manicGame.gameType == .wsc {
+ let rotationIndex = manicGame.getExtraInt(key: ExtraKey.wswanRotation.rawValue) ?? 0
+ updateLibretroCoreConfigs(core: .BeetleWonderSwan, configs: [
+ .wswan_language: "\(manicGame.region == 0 ? "english" : "japanese")",
+ .wswan_rotate_display: (rotationIndex == 0 ? "landscape" : "portrait"),
+ .wswan_mono_palette: manicGame.wswanPaletteTitle
+ ])
}
}
@@ -2225,8 +2275,11 @@ extension PlayViewController {
"camera_driver": "avfoundation",
"microphone_enable": enableMircophone ? "true" : "false",
"microphone_driver": "coreaudio",
- "audio_latency": "200",
- "input_auto_game_focus": "1"
+ // Jitless Flycast underruns below 90ms; 90 is the floor that still boots smoothly.
+ "audio_latency": isJitlessFlycast ? "90" : "200",
+ "audio_sync": "true",
+ "input_auto_game_focus": "1",
+ "vrr_runloop_enable": isJitlessFlycast ? "true" : "false"
])
if manicGame.isN64ParaLLEl {
LibretroCore.sharedInstance().setReloadDelay(1)
@@ -2286,7 +2339,7 @@ extension PlayViewController {
}
//配置System的位置
- if manicGame.gameType == .dc {
+ if manicGame.gameType == .dc || manicGame.isSegaArcade {
LibretroCore.sharedInstance().updateLibretroConfig("system_directory", value: R.Path.Flycast)
} else if manicGame.gameType == .dos {
LibretroCore.sharedInstance().updateLibretroConfig("system_directory", value: R.Path.DOSBoxPureSystem.libretroPath)
@@ -2587,7 +2640,8 @@ extension PlayViewController {
manicGame.gameType == .wii ||
manicGame.gameType == .ngc ||
(manicGame.gameType == .pce && !UIDevice.isLandscape) ||
- manicGame.gameType.usesDOSSkinLayout {
+ manicGame.gameType.usesDOSSkinLayout ||
+ manicGame.gameType == .wsc {
iconColor = .black.withAlphaComponent(0.25)
}
let buttonContainerView = UIView()
@@ -2920,6 +2974,7 @@ extension PlayViewController {
}
self.updateDualScreenViews()
LibretroCore.sharedInstance().setCustomSaveExtension(customSaveExtension)
+ applyLibretroFrontendRuntimeConfigs()
if self.manicGame.isNDSHomeMenuGame || self.manicGame.isDSiHomeMenuGame || self.manicGame.isDOSHomeMenuGame {
LibretroCore.sharedInstance().loadWithoutContent(corePath)
} else {
@@ -3385,7 +3440,7 @@ extension PlayViewController {
updateN64Resolution(resolution, reload: true)
} else if manicGame.gameType == .ps1 && manicGame.defaultCore == 0 {
LibretroCore.sharedInstance().updateConfig(EmulationCore.BeetlePSXHW.name, key: "beetle_psx_hw_internal_resolution", value: resolution.resolutionTitleForPS1, reload: true)
- } else if manicGame.gameType == .dc {
+ } else if manicGame.gameType == .dc || manicGame.isSegaArcade {
updateDCResolution(resolution, reload: true)
} else if manicGame.gameType == .ds {
let scale = UInt32(resolution == .undefine ? 1 : resolution.rawValue)
@@ -4154,6 +4209,16 @@ extension PlayViewController {
})
}
+ /// Apply frontend pacing before loadGame so this session (not just the next) picks them up.
+ /// Jitless Flycast needs VRR on iOS; latency below 90ms underruns during boot.
+ private func applyLibretroFrontendRuntimeConfigs() {
+ LibretroCore.sharedInstance().updateRuningLibretroConfigs([
+ "audio_latency": isJitlessFlycast ? "90" : "200",
+ "audio_sync": "true",
+ "vrr_runloop_enable": isJitlessFlycast ? "true" : "false"
+ ])
+ }
+
private func updateLibretroCoreConfigs(core: EmulationCore,
configs: [SpecialCoreOption: String],
reload: Bool = false,
@@ -4211,6 +4276,18 @@ extension PlayViewController {
self.updateSlowMotion(speed: GameOption.SlowMotionSpeed.off)
}
}
+
+ private func ndsLidToggle() {
+ if manicGame.gameType == .ds {
+ let button: LibretroButton = (manicGame.defaultCore == 0 ? .L3 : .L2)
+ DispatchQueue.main.asyncAfter(delay: 1) {
+ LibretroCore.sharedInstance().press(button, playerIndex: 0)
+ DispatchQueue.main.asyncAfter(delay: 0.1) {
+ LibretroCore.sharedInstance().release(button, playerIndex: 0)
+ }
+ }
+ }
+ }
}
//MARK: GameViewControllerDelegate代理
@@ -4490,4 +4567,10 @@ extension PlayViewController {
currentPlayViewController.updateSlowMotion(speed: speed)
}
}
+
+ static func ndsLidToggle() {
+ if let currentPlayViewController {
+ currentPlayViewController.ndsLidToggle()
+ }
+ }
}
diff --git a/ManicEmu/ManicEmu/Sources/Business/Settings/Models/SettingItem.swift b/ManicEmu/ManicEmu/Sources/Business/Settings/Models/SettingItem.swift
index 60c13f35..135c5943 100644
--- a/ManicEmu/ManicEmu/Sources/Business/Settings/Models/SettingItem.swift
+++ b/ManicEmu/ManicEmu/Sources/Business/Settings/Models/SettingItem.swift
@@ -10,7 +10,38 @@
struct SettingItem {
enum ItemType: String {
- case appearance, theme, quickGame, autoSaveState, skin, airPlay, iCloud, fullScreenWhenConnectController, bios, respectSilentMode, onlinePlay, rumble, skinSound, retro, triggerPro, jit, shaders, globalCoreSwitch, FAQ, feedback, qq, telegram, discord, about, shareApp, clearCache, language, userAgreement, privacyPolicy, featuredItems, coverScraping
+ case appearance,
+ theme,
+ quickGame,
+ autoSaveState,
+ skin,
+ airPlay,
+ iCloud,
+ fullScreenWhenConnectController,
+ bios,
+ respectSilentMode,
+ onlinePlay,
+ rumble,
+ skinSound,
+ retro,
+ triggerPro,
+ jit,
+ shaders,
+ globalCoreSwitch,
+ FAQ,
+ feedback,
+ qq,
+ telegram,
+ discord,
+ about,
+ shareApp,
+ clearCache,
+ language,
+ userAgreement,
+ privacyPolicy,
+ featuredItems,
+ coverScraping,
+ resetTips
}
var type: ItemType
@@ -101,7 +132,7 @@ struct SettingItem {
[R.Color.Purple]
case .theme, .onlinePlay, .FAQ, .featuredItems:
[R.Color.Orange]
- case .autoSaveState, .rumble, .feedback:
+ case .autoSaveState, .rumble, .feedback, .resetTips:
[R.Color.Green]
case .skin, .skinSound, .about:
[R.Color.Pink]
@@ -182,6 +213,8 @@ struct SettingItem {
ASIcon.symbolImage(R.image.core_iconSymbols(), colors: iconColors)
case .coverScraping:
ASIcon.symbolImage(R.image.cover_iconSymbols(), colors: iconColors)
+ case .resetTips:
+ ASIcon.symbol(.textBubble, colors: iconColors)
}
}
@@ -249,6 +282,8 @@ struct SettingItem {
R.string.localizable.globalCoreSwitch()
case .coverScraping:
R.string.localizable.coverScraping()
+ case .resetTips:
+ R.string.localizable.resetTips()
}
}
@@ -293,6 +328,8 @@ struct SettingItem {
return R.string.localizable.iCloudSyncing()
}
#endif
+ } else if type == .resetTips {
+ return R.string.localizable.resetTipsDesc()
}
return nil
}
diff --git a/ManicEmu/ManicEmu/Sources/Business/Settings/Models/Settings.swift b/ManicEmu/ManicEmu/Sources/Business/Settings/Models/Settings.swift
index ce6435cd..d59d91c7 100644
--- a/ManicEmu/ManicEmu/Sources/Business/Settings/Models/Settings.swift
+++ b/ManicEmu/ManicEmu/Sources/Business/Settings/Models/Settings.swift
@@ -151,6 +151,8 @@ class Settings: Object, ObjectUpdatable {
realPlatform = GameType.pce.localizedName
} else if GameType.ngpc.localizedShortName == platform {
realPlatform = GameType.ngp.localizedName
+ } else if GameType.ws.localizedShortName == platform {
+ realPlatform = GameType.wsc.localizedName
}
return getExtraBool(key: realPlatform + "Visible") ?? true
}
diff --git a/ManicEmu/ManicEmu/Sources/Business/Settings/Views/BIOSSelectionView.swift b/ManicEmu/ManicEmu/Sources/Business/Settings/Views/BIOSSelectionView.swift
index 8729465e..ec9154f7 100644
--- a/ManicEmu/ManicEmu/Sources/Business/Settings/Views/BIOSSelectionView.swift
+++ b/ManicEmu/ManicEmu/Sources/Business/Settings/Views/BIOSSelectionView.swift
@@ -240,7 +240,13 @@ class BIOSSelectionView: BaseView {
}
let isBiosExists: Bool
if gameType == .arcade {
- isBiosExists = R.BIOS.MAMEBiosMap.keys.allSatisfy({ FileManager.default.fileExists(atPath: R.Path.Data.appendingPathComponent($0)) })
+ isBiosExists = R.BIOS.MAMEBiosMap.keys.allSatisfy({
+ if R.BIOS.SegaArcadeBios.contains($0) {
+ return FileManager.default.fileExists(atPath: R.Path.Flycast.appendingPathComponent("dc/\($0)"))
+ } else {
+ return FileManager.default.fileExists(atPath: R.Path.Data.appendingPathComponent($0))
+ }
+ })
} else {
isBiosExists = fileManager.fileExists(atPath: biosInLib)
}
@@ -382,7 +388,14 @@ class BIOSSelectionView: BaseView {
if mameMatchs.count > 0 {
for match in mameMatchs {
- try? FileManager.safeCopyItem(at: match.url, to: URL(fileURLWithPath: R.Path.Data.appendingPathComponent(match.fileName)), shouldReplace: true)
+ if R.BIOS.SegaArcadeBios.contains(match.fileName) {
+ //Some Sega arcade games need the flycast core to run, so copy the bios to the dc directory.
+ try? FileManager.safeCopyItem(at: match.url,
+ to: URL(fileURLWithPath: R.Path.Flycast.appendingPathComponent("dc/\(match.fileName)")),
+ shouldReplace: true)
+ } else {
+ try? FileManager.safeCopyItem(at: match.url, to: URL(fileURLWithPath: R.Path.Data.appendingPathComponent(match.fileName)), shouldReplace: true)
+ }
}
}
DispatchQueue.main.async { [weak self] in
diff --git a/ManicEmu/ManicEmu/Sources/Business/Settings/Views/SettingsListView.swift b/ManicEmu/ManicEmu/Sources/Business/Settings/Views/SettingsListView.swift
index 8fcd25db..549dea3a 100644
--- a/ManicEmu/ManicEmu/Sources/Business/Settings/Views/SettingsListView.swift
+++ b/ManicEmu/ManicEmu/Sources/Business/Settings/Views/SettingsListView.swift
@@ -111,6 +111,7 @@ class SettingsListView: BaseView {
datas[section] = [.init(type: .about),
.init(type: .shareApp),
.init(type: .clearCache),
+ .init(type: .resetTips),
.init(type: .language),
.init(type: .userAgreement),
.init(type: .privacyPolicy),
@@ -332,6 +333,12 @@ class SettingsListView: BaseView {
UIView.hideLoading()
}
+ case .resetTips:
+ R.DefaultKey.TipsDefaultKeys.forEach({
+ UserDefaults.standard.set(false, forKey: $0)
+ })
+ UIView.makeToast(message: R.string.localizable.resetTipsSuccess())
+
case .language:
if let settingsUrl = URL(string: UIApplication.openSettingsURLString) {
UIApplication.shared.open(settingsUrl)
diff --git a/ManicEmu/ManicEmu/Sources/Tools/Cores/Arcade.swift b/ManicEmu/ManicEmu/Sources/Tools/Cores/Arcade.swift
index 60166444..ab7355e4 100644
--- a/ManicEmu/ManicEmu/Sources/Tools/Cores/Arcade.swift
+++ b/ManicEmu/ManicEmu/Sources/Tools/Cores/Arcade.swift
@@ -117,15 +117,17 @@ class ArcadeEmulatorBridge : EmulatorBridgeBase {
private var thumbstickPosition: CGPoint = .zero
private let analogDpad = LibretroNetplayAnalogDpad()
+
+ var isSegaArcade: Bool = false
override func activateInput(_ input: Int, value: Double, playerIndex: Int) {
guard playerIndex >= 0 else { return }
if input == ArcadeGameInput.leftThumbstickUp || input == ArcadeGameInput.leftThumbstickDown {
leftThumbstickPosition.y = input == ArcadeGameInput.leftThumbstickUp ? value : -value
- analogDpad.moveStick(isLeft: true, x: leftThumbstickPosition.x, y: leftThumbstickPosition.y, playerIndex: playerIndex)
+ analogDpad.moveStick(isLeft: true, x: leftThumbstickPosition.x, y: leftThumbstickPosition.y, playerIndex: playerIndex, forceSyncDpad: isSegaArcade)
} else if input == ArcadeGameInput.leftThumbstickLeft || input == ArcadeGameInput.leftThumbstickRight {
leftThumbstickPosition.x = input == ArcadeGameInput.leftThumbstickRight ? value : -value
- analogDpad.moveStick(isLeft: true, x: leftThumbstickPosition.x, y: leftThumbstickPosition.y, playerIndex: playerIndex)
+ analogDpad.moveStick(isLeft: true, x: leftThumbstickPosition.x, y: leftThumbstickPosition.y, playerIndex: playerIndex, forceSyncDpad: isSegaArcade)
} else if input == ArcadeGameInput.rightThumbstickUp || input == ArcadeGameInput.rightThumbstickDown {
rightThumbstickPosition.y = input == ArcadeGameInput.rightThumbstickUp ? value : -value
LibretroCore.sharedInstance().moveStick(false, x: rightThumbstickPosition.x, y: rightThumbstickPosition.y, playerIndex: UInt32(playerIndex))
@@ -134,12 +136,12 @@ class ArcadeEmulatorBridge : EmulatorBridgeBase {
LibretroCore.sharedInstance().moveStick(false, x: rightThumbstickPosition.x, y: rightThumbstickPosition.y, playerIndex: UInt32(playerIndex))
} else if let gameInput = ArcadeGameInput(rawValue: input),
let libretroButton = gameInputToCoreInput(gameInput: gameInput) {
- if analogDpad.handleDpad(libretroButton, pressed: true, playerIndex: playerIndex) {
- return
- }
#if DEBUG
Log.debug("🎮 \(objectInfo(self)) 点击了:\(gameInput)")
#endif
+ if analogDpad.handleDpad(libretroButton, pressed: true, playerIndex: playerIndex) {
+ return
+ }
LibretroCore.sharedInstance().press(libretroButton, playerIndex: UInt32(playerIndex))
}
}
diff --git a/ManicEmu/ManicEmu/Sources/Tools/Cores/DC.swift b/ManicEmu/ManicEmu/Sources/Tools/Cores/DC.swift
index d0b20db8..d20e0f70 100644
--- a/ManicEmu/ManicEmu/Sources/Tools/Cores/DC.swift
+++ b/ManicEmu/ManicEmu/Sources/Tools/Cores/DC.swift
@@ -31,6 +31,7 @@ extension GameType
case leftThumbstickDown
case leftThumbstickLeft
case leftThumbstickRight
+ case select
case flex
case menu
@@ -65,6 +66,7 @@ extension GameType
else if stringValue == "leftThumbstickLeft" { self = .leftThumbstickLeft }
else if stringValue == "leftThumbstickRight" { self = .leftThumbstickRight }
else if stringValue == "flex" { self = .flex }
+ else if stringValue == "select" { self = .select }
else { return nil }
}
}
@@ -133,6 +135,7 @@ class DCEmulatorBridge : EmulatorBridgeBase {
else if gameInput == .down { return .down }
else if gameInput == .left { return .left }
else if gameInput == .right { return .right }
+ else if gameInput == .select { return .select }
return nil
}
diff --git a/ManicEmu/ManicEmu/Sources/Tools/Cores/DOS.swift b/ManicEmu/ManicEmu/Sources/Tools/Cores/DOS.swift
index 3305489e..002ae375 100644
--- a/ManicEmu/ManicEmu/Sources/Tools/Cores/DOS.swift
+++ b/ManicEmu/ManicEmu/Sources/Tools/Cores/DOS.swift
@@ -137,12 +137,12 @@ class DOSEmulatorBridge : EmulatorBridgeBase {
LibretroCore.sharedInstance().moveStick(false, x: rightThumbstickPosition.x, y: rightThumbstickPosition.y, playerIndex: UInt32(playerIndex))
} else if let gameInput = DOSGameInput(rawValue: input),
let libretroButton = gameInputToCoreInput(gameInput: gameInput) {
- if analogDpad.handleDpad(libretroButton, pressed: true, playerIndex: playerIndex) {
- return
- }
#if DEBUG
Log.debug("🎮 \(objectInfo(self)) 点击了:\(gameInput)")
#endif
+ if analogDpad.handleDpad(libretroButton, pressed: true, playerIndex: playerIndex) {
+ return
+ }
LibretroCore.sharedInstance().press(libretroButton, playerIndex: UInt32(playerIndex))
}
}
diff --git a/ManicEmu/ManicEmu/Sources/Tools/Cores/LibretroNetplayAnalogDpad.swift b/ManicEmu/ManicEmu/Sources/Tools/Cores/LibretroNetplayAnalogDpad.swift
index 0cb4aced..9cf1fc2b 100644
--- a/ManicEmu/ManicEmu/Sources/Tools/Cores/LibretroNetplayAnalogDpad.swift
+++ b/ManicEmu/ManicEmu/Sources/Tools/Cores/LibretroNetplayAnalogDpad.swift
@@ -46,11 +46,11 @@ final class LibretroNetplayAnalogDpad {
}
/// Always sends analog via `moveStick`. During netplay, also maps the stick onto D-pad.
- func moveStick(isLeft: Bool, x: CGFloat, y: CGFloat, playerIndex: Int) {
+ func moveStick(isLeft: Bool, x: CGFloat, y: CGFloat, playerIndex: Int, forceSyncDpad: Bool = false) {
self.playerIndex = playerIndex
stick = CGPoint(x: x, y: y)
LibretroCore.sharedInstance().moveStick(isLeft, x: x, y: y, playerIndex: UInt32(playerIndex))
- refreshStickDpad()
+ refreshStickDpad(forceSyncDpad: forceSyncDpad)
}
/// Returns `true` when `button` is a D-pad direction (already applied).
@@ -68,8 +68,8 @@ final class LibretroNetplayAnalogDpad {
return true
}
- private func refreshStickDpad() {
- if LibretroNetplaySession.shared.isNetplay {
+ private func refreshStickDpad(forceSyncDpad: Bool = false) {
+ if LibretroNetplaySession.shared.isNetplay || forceSyncDpad {
dpadFromStick.up = stick.y > threshold
dpadFromStick.down = stick.y < -threshold
dpadFromStick.left = stick.x < -threshold
diff --git a/ManicEmu/ManicEmu/Sources/Tools/Cores/WSC.swift b/ManicEmu/ManicEmu/Sources/Tools/Cores/WSC.swift
new file mode 100644
index 00000000..cc83198b
--- /dev/null
+++ b/ManicEmu/ManicEmu/Sources/Tools/Cores/WSC.swift
@@ -0,0 +1,190 @@
+//
+// WSC.swift
+// ManicEmu
+//
+// Created by Daiuno on 2026/9/11.
+// Copyright © 2026 Manic EMU. All rights reserved.
+//
+// SPDX-License-Identifier: AGPL-3.0-or-later
+
+
+import AVFoundation
+
+extension GameType {
+ static let wsc = GameType("public.aoshuang.game.wsc")
+ static let ws = GameType("public.aoshuang.game.ws")
+}
+
+@objc enum WSCGameInput: Int, Input, CaseIterable {
+ case a
+ case b
+ case x
+ case y
+ case start
+ case select
+ case up
+ case down
+ case left
+ case right
+ case l1
+ case r1
+ case l2
+ case r2
+ case l3
+ case r3
+ case leftThumbstickUp
+ case leftThumbstickDown
+ case leftThumbstickLeft
+ case leftThumbstickRight
+ case rightThumbstickUp
+ case rightThumbstickDown
+ case rightThumbstickLeft
+ case rightThumbstickRight
+
+ case flex
+ case menu
+
+ var type: InputType {
+ return .game(.wsc)
+ }
+
+ var isContinuous: Bool {
+ switch self
+ {
+ case .leftThumbstickUp, .leftThumbstickDown, .leftThumbstickLeft, .leftThumbstickRight: return true
+ case .rightThumbstickUp, .rightThumbstickDown, .rightThumbstickLeft, .rightThumbstickRight: return true
+ default: return false
+ }
+ }
+
+ init?(stringValue: String) {
+ if stringValue == "a" { self = .a}
+ else if stringValue == "b" { self = .b}
+ else if stringValue == "x" { self = .x}
+ else if stringValue == "y" { self = .y}
+ else if stringValue == "start" { self = .start}
+ else if stringValue == "select" { self = .select}
+ else if stringValue == "up" { self = .up}
+ else if stringValue == "down" { self = .down}
+ else if stringValue == "left" { self = .left}
+ else if stringValue == "right" { self = .right}
+ else if stringValue == "l1" { self = .l1}
+ else if stringValue == "r1" { self = .r1}
+ else if stringValue == "l2" { self = .l2}
+ else if stringValue == "r2" { self = .r2}
+ else if stringValue == "l3" { self = .l3}
+ else if stringValue == "r3" { self = .r3}
+ else if stringValue == "leftThumbstickUp" { self = .leftThumbstickUp}
+ else if stringValue == "leftThumbstickDown" { self = .leftThumbstickDown}
+ else if stringValue == "leftThumbstickLeft" { self = .leftThumbstickLeft}
+ else if stringValue == "leftThumbstickRight" { self = .leftThumbstickRight}
+ else if stringValue == "rightThumbstickUp" { self = .rightThumbstickUp}
+ else if stringValue == "rightThumbstickDown" { self = .rightThumbstickDown}
+ else if stringValue == "rightThumbstickLeft" { self = .rightThumbstickLeft}
+ else if stringValue == "rightThumbstickRight" { self = .rightThumbstickRight}
+ else { return nil }
+ }
+}
+
+struct WSC: DeltaCoreProtocol {
+ static let core = WSC()
+
+ var name: String { "WSC" }
+ var identifier: String { "com.aoshuang.WSCCore" }
+
+ var gameType: GameType { GameType.wsc }
+ var gameInputType: Input.Type { WSCGameInput.self }
+ var allInputs: [Input] { WSCGameInput.allCases }
+ var gameSaveFileExtension: String { "srm" }
+
+ let videoFormat = VideoFormat(format: .bitmap(.rgb565), dimensions: CGSize(width: 224, height: 144))
+
+ var supportedCheatFormats: Set<CheatFormat> {
+ let beetleRawFormat = CheatFormat(name: "Beetle RAW", format: "AAAA:VV", type: .beetleRaw)
+ return [beetleRawFormat]
+ }
+
+ var emulatorBridge: EmulatorBridging { WSCEmulatorBridge.shared }
+
+ private init() {}
+}
+
+
+class WSCEmulatorBridge : EmulatorBridgeBase {
+ static let shared = WSCEmulatorBridge()
+
+ private var leftThumbstickPosition: CGPoint = .zero
+ private var rightThumbstickPosition: CGPoint = .zero
+
+ private var thumbstickPosition: CGPoint = .zero
+
+ private let analogDpad = LibretroNetplayAnalogDpad()
+
+ override func activateInput(_ input: Int, value: Double, playerIndex: Int) {
+ guard playerIndex >= 0 else { return }
+ if input == WSCGameInput.leftThumbstickUp || input == WSCGameInput.leftThumbstickDown {
+ leftThumbstickPosition.y = input == WSCGameInput.leftThumbstickUp ? value : -value
+ analogDpad.moveStick(isLeft: true, x: leftThumbstickPosition.x, y: leftThumbstickPosition.y, playerIndex: playerIndex)
+ } else if input == WSCGameInput.leftThumbstickLeft || input == WSCGameInput.leftThumbstickRight {
+ leftThumbstickPosition.x = input == WSCGameInput.leftThumbstickRight ? value : -value
+ analogDpad.moveStick(isLeft: true, x: leftThumbstickPosition.x, y: leftThumbstickPosition.y, playerIndex: playerIndex)
+ } else if input == WSCGameInput.rightThumbstickUp || input == WSCGameInput.rightThumbstickDown {
+ rightThumbstickPosition.y = input == WSCGameInput.rightThumbstickUp ? value : -value
+ LibretroCore.sharedInstance().moveStick(false, x: rightThumbstickPosition.x, y: rightThumbstickPosition.y, playerIndex: UInt32(playerIndex))
+ } else if input == WSCGameInput.rightThumbstickLeft || input == WSCGameInput.rightThumbstickRight {
+ rightThumbstickPosition.x = input == WSCGameInput.rightThumbstickRight ? value : -value
+ LibretroCore.sharedInstance().moveStick(false, x: rightThumbstickPosition.x, y: rightThumbstickPosition.y, playerIndex: UInt32(playerIndex))
+ } else if let gameInput = WSCGameInput(rawValue: input),
+ let libretroButton = gameInputToCoreInput(gameInput: gameInput) {
+#if DEBUG
+Log.debug("🎮 \(objectInfo(self)) 点击了:\(gameInput)")
+#endif
+ if analogDpad.handleDpad(libretroButton, pressed: true, playerIndex: playerIndex) {
+ return
+ }
+ LibretroCore.sharedInstance().press(libretroButton, playerIndex: UInt32(playerIndex))
+ }
+ }
+
+ func gameInputToCoreInput(gameInput: WSCGameInput) -> LibretroButton? {
+ if gameInput == .a { return .A }
+ else if gameInput == .b { return .B }
+ else if gameInput == .x { return .X }
+ else if gameInput == .y { return .Y }
+ else if gameInput == .start { return .start }
+ else if gameInput == .select { return .select }
+ else if gameInput == .up { return .up }
+ else if gameInput == .down { return .down }
+ else if gameInput == .left { return .left }
+ else if gameInput == .right { return .right }
+ else if gameInput == .l1 { return .L1 }
+ else if gameInput == .r1 { return .R1 }
+ else if gameInput == .l2 { return .L2 }
+ else if gameInput == .r2 { return .R2 }
+ else if gameInput == .l3 { return .L3 }
+ else if gameInput == .r3 { return .R3 }
+ return nil
+ }
+
+ override func deactivateInput(_ input: Int, playerIndex: Int) {
+ if input == WSCGameInput.leftThumbstickUp || input == WSCGameInput.leftThumbstickDown {
+ leftThumbstickPosition.y = 0
+ analogDpad.moveStick(isLeft: true, x: leftThumbstickPosition.x, y: leftThumbstickPosition.y, playerIndex: playerIndex)
+ } else if input == WSCGameInput.leftThumbstickLeft || input == WSCGameInput.leftThumbstickRight {
+ leftThumbstickPosition.x = 0
+ analogDpad.moveStick(isLeft: true, x: leftThumbstickPosition.x, y: leftThumbstickPosition.y, playerIndex: playerIndex)
+ } else if input == WSCGameInput.rightThumbstickUp || input == WSCGameInput.rightThumbstickDown {
+ rightThumbstickPosition.y = 0
+ LibretroCore.sharedInstance().moveStick(false, x: rightThumbstickPosition.x, y: rightThumbstickPosition.y, playerIndex: UInt32(playerIndex))
+ } else if input == WSCGameInput.rightThumbstickLeft || input == WSCGameInput.rightThumbstickRight {
+ rightThumbstickPosition.x = 0
+ LibretroCore.sharedInstance().moveStick(false, x: rightThumbstickPosition.x, y: rightThumbstickPosition.y, playerIndex: UInt32(playerIndex))
+ } else if let gameInput = WSCGameInput(rawValue: input),
+ let libretroButton = gameInputToCoreInput(gameInput: gameInput) {
+ if analogDpad.handleDpad(libretroButton, pressed: false, playerIndex: playerIndex) {
+ return
+ }
+ LibretroCore.sharedInstance().release(libretroButton, playerIndex: UInt32(playerIndex))
+ }
+ }
+}
diff --git a/ManicEmu/ManicEmu/Sources/Tools/Extensions/CheatTypeExtensions.swift b/ManicEmu/ManicEmu/Sources/Tools/Extensions/CheatTypeExtensions.swift
index 3b2493f5..c9d93d06 100644
--- a/ManicEmu/ManicEmu/Sources/Tools/Extensions/CheatTypeExtensions.swift
+++ b/ManicEmu/ManicEmu/Sources/Tools/Extensions/CheatTypeExtensions.swift
@@ -25,4 +25,5 @@ extension CheatType
static let importFile = CheatType("importFile")
static let Gecko = CheatType("Gecko")
static let ARMax = CheatType("ARMax")
+ static let beetleRaw = CheatType("Beetle RAW")
}
diff --git a/ManicEmu/ManicEmu/Sources/Tools/Extensions/GameTypeExtensions.swift b/ManicEmu/ManicEmu/Sources/Tools/Extensions/GameTypeExtensions.swift
index ae1ba8e7..1cef8f54 100644
--- a/ManicEmu/ManicEmu/Sources/Tools/Extensions/GameTypeExtensions.swift
+++ b/ManicEmu/ManicEmu/Sources/Tools/Extensions/GameTypeExtensions.swift
@@ -130,6 +130,8 @@ extension GameType {
self = .c64
} else if ["adf", "adz", "dms", "fdi", "ipf", "hdf", "hdz", "lha", "slave", "info", "nrg", "mds", "uae", "rp9"].contains(ext) {
self = .amiga
+ } else if ["ws", "wsc", "pc2", "pcv2"].contains(ext) {
+ self = .wsc
} else {
self = .notSupport
}
@@ -228,6 +230,10 @@ extension GameType {
self = .c64
} else if shortName.uppercased() == "Amiga".uppercased() {
self = .amiga
+ } else if shortName.uppercased() == "WSC" {
+ self = .wsc
+ } else if shortName.uppercased() == "WS" {
+ self = .ws
} else {
return nil
}
@@ -284,6 +290,8 @@ extension GameType {
case .ngpc: return "Neo Geo Pocket Color"
case .c64: return "Commodore 64"
case .amiga: return "Commodore Amiga"
+ case .wsc: return "WonderSwan Color"
+ case .ws: return "WonderSwan"
default: return ""
}
}
@@ -339,6 +347,8 @@ extension GameType {
case .ngpc: return NSLocalizedString("NGPC", comment: "")
case .c64: return NSLocalizedString("C64", comment: "")
case .amiga: return NSLocalizedString("Amiga", comment: "")
+ case .wsc: return NSLocalizedString("WSC", comment: "")
+ case .ws: return NSLocalizedString("WS", comment: "")
case .unknown: return R.string.localizable.unknownPlatform()
default: return ""
}
@@ -395,6 +405,8 @@ extension GameType {
case .ngpc: return 1999
case .c64: return 1982
case .amiga: return 1985
+ case .wsc: return 2000
+ case .ws: return 1999
default: return 0
}
}
@@ -439,6 +451,7 @@ extension GameType {
case .ngp: return NGP.core
case .c64: return C64.core
case .amiga: return Amiga.core
+ case .wsc: return WSC.core
default: return nil
}
}
@@ -653,6 +666,8 @@ extension GameType {
return .snk
case .c64, .amiga:
return .commodore
+ case .wsc, .ws:
+ return .bandai
default:
return .nintendo
}
@@ -794,6 +809,10 @@ extension GameType {
image = R.image.c64_group_brand()
} else if self == .amiga {
image = R.image.amiga_group_brand()
+ } else if self == .wsc {
+ image = R.image.wsc_group_brand()
+ } else if self == .ws {
+ image = R.image.ws_group_brand()
} else if self == .ps2 {
image = R.image.ps2_group_brand()
}
diff --git a/ManicEmu/ManicEmu/Sources/Tools/Extensions/UIDeviceExtensions.swift b/ManicEmu/ManicEmu/Sources/Tools/Extensions/UIDeviceExtensions.swift
index 836bd947..1db7e5c8 100644
--- a/ManicEmu/ManicEmu/Sources/Tools/Extensions/UIDeviceExtensions.swift
+++ b/ManicEmu/ManicEmu/Sources/Tools/Extensions/UIDeviceExtensions.swift
@@ -14,6 +14,9 @@ import AudioToolbox.AudioServices
import ARKit
import Metal
import Device
+#if os(iOS)
+import CoreMotion
+#endif
enum PerformanceTier {
case low // A10 and below (iPhone 7 / iPad 6th gen, iPhone9,x / iPad7,x)
@@ -263,3 +266,196 @@ extension Device {
}
}
+#if os(iOS)
+/// iPhone Control Center lock is a portrait lock. While the app interface is
+/// landscape and the phone is still held landscape, omit portrait so UIKit cannot snap back.
+enum OrientationLockPin {
+ private enum PhysicalAttitude {
+ case landscape
+ case portrait
+ case flat
+ case unknown
+ }
+
+ private static let motion = CMMotionManager()
+ private static var started = false
+ private static var holdingLandscape = false
+ private static var lastPhysicalLandscape: Bool?
+ private static var lastDevicePortraitWhileHolding = false
+
+ static var isPinned: Bool { holdingLandscape }
+ static var prefersLocked: Bool { holdingLandscape }
+
+ static func start() {
+ guard !started else { return }
+ started = true
+ guard UIDevice.isPhone, !UIDevice.isMac else { return }
+
+ UIDevice.current.beginGeneratingDeviceOrientationNotifications()
+ startAccelerometerIfNeeded()
+
+ let center = NotificationCenter.default
+ center.addObserver(forName: UIDevice.orientationDidChangeNotification, object: nil, queue: .main) { _ in
+ handlePhysicalChange()
+ }
+ center.addObserver(forName: UIApplication.didBecomeActiveNotification, object: nil, queue: .main) { _ in
+ startAccelerometerIfNeeded()
+ handlePhysicalChange()
+ }
+ center.addObserver(forName: UIApplication.didEnterBackgroundNotification, object: nil, queue: .main) { _ in
+ if motion.isAccelerometerActive {
+ motion.stopAccelerometerUpdates()
+ }
+ }
+ center.addObserver(forName: UIApplication.willEnterForegroundNotification, object: nil, queue: .main) { _ in
+ startAccelerometerIfNeeded()
+ }
+ }
+
+ /// `window` is ignored for attitude. Overlay windows (toast / alert / sheet) are often
+ /// wider than tall and must not flip the app-wide hold.
+ static func resolvedMask(for window: UIWindow?) -> UIInterfaceOrientationMask {
+ let allowed = AppDelegate.orientation
+ guard UIDevice.isPhone, !UIDevice.isMac else { return allowed }
+
+ let landscapeAllowed = allowed.intersection(.landscape)
+ guard !landscapeAllowed.isEmpty else {
+ holdingLandscape = false
+ return allowed
+ }
+
+ switch physicalAttitude() {
+ case .portrait:
+ holdingLandscape = false
+ return allowed
+ case .landscape:
+ if isAppInterfaceLandscape() {
+ holdingLandscape = true
+ }
+ return holdingLandscape ? landscapeAllowed : allowed
+ case .flat, .unknown:
+ return holdingLandscape ? landscapeAllowed : allowed
+ }
+ }
+
+ /// If Control Center already started a portrait transition, push landscape back.
+ static func resistPortraitTransitionIfNeeded(to size: CGSize) {
+ guard UIDevice.isPhone, !UIDevice.isMac else { return }
+ guard size.height > size.width else { return }
+ guard physicalAttitude() != .flat else { return }
+ let before = holdingLandscape
+ _ = resolvedMask(for: ApplicationSceneDelegate.applicationWindow)
+ if holdingLandscape || before {
+ applyMaskChange()
+ }
+ }
+
+ private static func handlePhysicalChange() {
+ let attitude = physicalAttitude()
+ if attitude == .flat || attitude == .unknown {
+ return
+ }
+ let before = holdingLandscape
+ _ = resolvedMask(for: ApplicationSceneDelegate.applicationWindow)
+ let devicePortrait = UIDevice.current.orientation.isPortrait
+ if before != holdingLandscape {
+ lastDevicePortraitWhileHolding = holdingLandscape && devicePortrait
+ applyMaskChange()
+ return
+ }
+ if holdingLandscape, devicePortrait, !lastDevicePortraitWhileHolding {
+ lastDevicePortraitWhileHolding = true
+ applyMaskChange()
+ return
+ }
+ if UIDevice.current.orientation.isLandscape {
+ lastDevicePortraitWhileHolding = false
+ }
+ }
+
+ private static func applyMaskChange() {
+ let window = ApplicationSceneDelegate.applicationWindow
+ let root = window?.rootViewController
+ if #available(iOS 16.0, *) {
+ root?.setNeedsUpdateOfSupportedInterfaceOrientations()
+ if holdingLandscape, let scene = ApplicationSceneDelegate.applicationScene {
+ scene.requestGeometryUpdate(UIWindowScene.GeometryPreferences.iOS(interfaceOrientations: preferredLandscapeMask()))
+ }
+ } else if holdingLandscape {
+ UIDevice.current.setValue(preferredInterfaceOrientation().rawValue, forKey: "orientation")
+ }
+ if #available(iOS 26.0, *) {
+ root?.setNeedsUpdateOfPrefersInterfaceOrientationLocked()
+ }
+ if !holdingLandscape {
+ UIViewController.attemptRotationToDeviceOrientation()
+ }
+ }
+
+ private static func startAccelerometerIfNeeded() {
+ guard motion.isAccelerometerAvailable, !motion.isAccelerometerActive else { return }
+ motion.accelerometerUpdateInterval = 0.1
+ motion.startAccelerometerUpdates(to: .main) { _, _ in
+ handlePhysicalChange()
+ }
+ }
+
+ private static func isAppInterfaceLandscape() -> Bool {
+ let interface = ApplicationSceneDelegate.applicationScene?.interfaceOrientation
+ ?? ApplicationSceneDelegate.applicationWindow?.windowScene?.interfaceOrientation
+ ?? UIDevice.currentOrientation
+ return interface.isLandscape
+ }
+
+ /// Z-dominant = lying on a desk (x/y leftover from an unlevel surface is ignored).
+ private static func physicalAttitude() -> PhysicalAttitude {
+ guard let acceleration = motion.accelerometerData?.acceleration else {
+ return lastPhysicalLandscape.map { $0 ? .landscape : .portrait } ?? .unknown
+ }
+ let ax = abs(acceleration.x)
+ let ay = abs(acceleration.y)
+ let az = abs(acceleration.z)
+ if az > 0.65 && az >= max(ax, ay) {
+ return .flat
+ }
+
+ let hysteresis: Double = 0.2
+ let now: Bool
+ if let last = lastPhysicalLandscape {
+ now = last ? ax + hysteresis > ay : ax > ay + hysteresis
+ } else {
+ now = ax > ay
+ }
+ lastPhysicalLandscape = now
+ return now ? .landscape : .portrait
+ }
+
+ private static func preferredLandscapeMask() -> UIInterfaceOrientationMask {
+ preferredInterfaceOrientation().interfaceMask
+ }
+
+ private static func preferredInterfaceOrientation() -> UIInterfaceOrientation {
+ let interface = ApplicationSceneDelegate.applicationScene?.interfaceOrientation
+ ?? ApplicationSceneDelegate.applicationWindow?.windowScene?.interfaceOrientation
+ ?? UIDevice.currentOrientation
+ if interface.isLandscape { return interface }
+ if let acceleration = motion.accelerometerData?.acceleration {
+ return acceleration.x > 0 ? .landscapeLeft : .landscapeRight
+ }
+ return .landscapeRight
+ }
+}
+
+private extension UIInterfaceOrientation {
+ var interfaceMask: UIInterfaceOrientationMask {
+ switch self {
+ case .portrait: return .portrait
+ case .portraitUpsideDown: return .portraitUpsideDown
+ case .landscapeLeft: return .landscapeLeft
+ case .landscapeRight: return .landscapeRight
+ default: return []
+ }
+ }
+}
+#endif
+
diff --git a/ManicEmu/ManicEmu/Sources/Tools/Others/Database.swift b/ManicEmu/ManicEmu/Sources/Tools/Others/Database.swift
index d6780160..af55f059 100644
--- a/ManicEmu/ManicEmu/Sources/Tools/Others/Database.swift
+++ b/ManicEmu/ManicEmu/Sources/Tools/Others/Database.swift
@@ -356,6 +356,14 @@ struct Database {
config.setUsingCoreName(gameType: ._3ds, coreName: EmulationCore.Azahar.name)
}
}
+
+ if systemCoreVersionNumber < 201 {
+ //By default, Dolphin's language is English.
+ let games = realm.objects(Game.self).where({ $0.gameType == .wii || $0.gameType == .ngc })
+ try? realm.write({
+ games.forEach({ $0.region = 1 })
+ })
+ }
}
// After data migrations so Game.portraitSkin still points at live Skin objects.
diff --git a/ManicEmu/ManicEmu/Sources/Tools/Others/EmulationCore.swift b/ManicEmu/ManicEmu/Sources/Tools/Others/EmulationCore.swift
index ad040b01..318ea4b7 100644
--- a/ManicEmu/ManicEmu/Sources/Tools/Others/EmulationCore.swift
+++ b/ManicEmu/ManicEmu/Sources/Tools/Others/EmulationCore.swift
@@ -47,6 +47,7 @@ enum EmulationCore: CaseIterable {
Dolphin,
BeetlePCE,
BeetleNeoPop,
+ BeetleWonderSwan,
VICEx64sc,
PUAE,
gpSP,
@@ -133,6 +134,8 @@ enum EmulationCore: CaseIterable {
"Beetle PCE"
case .BeetleNeoPop:
"Beetle NeoPop"
+ case .BeetleWonderSwan:
+ "Beetle WonderSwan"
case .VICEx64sc:
"VICE x64sc"
case .PUAE:
@@ -218,6 +221,8 @@ enum EmulationCore: CaseIterable {
return [.pce]
case .BeetleNeoPop:
return [.ngp]
+ case .BeetleWonderSwan:
+ return [.wsc]
case .VICEx64sc:
return [.c64]
case .PUAE:
@@ -272,6 +277,7 @@ enum EmulationCore: CaseIterable {
.DOSBoxPure,
.BeetlePCE,
.BeetleNeoPop,
+ .BeetleWonderSwan,
.gpSP,
.MesenS:
return true
diff --git a/ManicEmu/ManicEmu/Sources/Tools/Others/FilesImporter.swift b/ManicEmu/ManicEmu/Sources/Tools/Others/FilesImporter.swift
index 582f6937..e3b4812a 100644
--- a/ManicEmu/ManicEmu/Sources/Tools/Others/FilesImporter.swift
+++ b/ManicEmu/ManicEmu/Sources/Tools/Others/FilesImporter.swift
@@ -623,18 +623,24 @@ extension FilesImporter {
var gameType = isPSPPBP ? .psp : GameType(fileExtension: game.fileExtension)
- if game.fileExtension.lowercased() == "zip" && MAMEKit.isSupportTitle(fileName: game.name) {
+ if (game.fileExtension.lowercased() == "zip" || game.fileExtension.lowercased() == "7z") &&
+ MAMEKit.isSupportTitle(fileName: game.name) {
gameType = .arcade
+ if R.Strings.NaomiTitles.contains(game.name) {
+ game.extras = [ExtraKey.arcadeType.rawValue: 1].jsonData()
+ } else if R.Strings.AtomiswaveTitles.contains(game.name) {
+ game.extras = [ExtraKey.arcadeType.rawValue: 2].jsonData()
+ } else if R.Strings.SegaSPTitles.contains(game.name) {
+ game.extras = [ExtraKey.arcadeType.rawValue: 3].jsonData()
+ }
+ if let mameInfo = MAMEKit.getMAMEInfo(fileName: game.name) {
+ game.aliasName = mameInfo.name
+ }
}
if gameType != .notSupport {
game.gameType = gameType
///Handling game info for specific game types.
-
- //archde
- if gameType == .arcade, let mameInfo = MAMEKit.getMAMEInfo(fileName: game.name) {
- game.aliasName = mameInfo.name
- }
#if !SIDE_LOAD
//32x mcd
if game.gameType == ._32x || gameType == .mcd {
@@ -660,19 +666,29 @@ extension FilesImporter {
game.extras = [ExtraKey.PSPGameCode.rawValue: gameCode].jsonData()
}
- if game.isDolphinCore, let dolphinID = DolphinGameID.read(from: url) {
- if let extras = game.extras,
- let data = Game.updateExtra(extras: extras, key: ExtraKey.dolphinGameID.rawValue, value: dolphinID) {
- game.extras = data
- } else {
- game.extras = [ExtraKey.dolphinGameID.rawValue: dolphinID].jsonData()
+ if game.isDolphinCore {
+ if let dolphinID = DolphinGameID.read(from: url) {
+ if let extras = game.extras,
+ let data = Game.updateExtra(extras: extras, key: ExtraKey.dolphinGameID.rawValue, value: dolphinID) {
+ game.extras = data
+ } else {
+ game.extras = [ExtraKey.dolphinGameID.rawValue: dolphinID].jsonData()
+ }
}
+ game.region = 1
}
if game.gameType == .ngp {
game.extras = [ExtraKey.gameTypeCategory.rawValue: 1].jsonData()
}
+ if game.gameType == .wsc {
+ let ext = url.pathExtension.lowercased()
+ if ext == "ws" || ext == "pc2" || ext == "pcv2" {
+ game.extras = [ExtraKey.gameTypeCategory.rawValue: 1].jsonData()
+ }
+ }
+
do {
//Copy the ROMs
if ciaTitleUrl == nil {
diff --git a/ManicEmu/ManicEmu/Sources/Tools/Others/OnlineCoverManager.swift b/ManicEmu/ManicEmu/Sources/Tools/Others/OnlineCoverManager.swift
index 0aeec2ba..21522a3d 100644
--- a/ManicEmu/ManicEmu/Sources/Tools/Others/OnlineCoverManager.swift
+++ b/ManicEmu/ManicEmu/Sources/Tools/Others/OnlineCoverManager.swift
@@ -18,12 +18,16 @@ class OnlineCoverManager {
var gameID: String
var gameName: String
var fileExtension: String
+ var isNaomi: Bool = false
+ var isAtomiswave: Bool = false
init(game: Game) {
self.gameType = game.effectiveGameType
self.gameID = game.id
self.gameName = game.translatedName ?? game.displayName
self.fileExtension = game.fileExtension
+ self.isNaomi = game.isNaomiGame
+ self.isAtomiswave = game.isAtomiswaveGame
}
init(gameType: GameType, gameID: String, gameName: String, fileExtension: String) {
@@ -116,7 +120,13 @@ class OnlineCoverManager {
case .dc:
boxArtUrl = host.appendingPathComponent("Sega - Dreamcast/Named_Boxarts")
case .arcade:
- boxArtUrl = host.appendingPathComponent("MAME/Named_Boxarts")
+ if coverMatch.isNaomi {
+ boxArtUrl = host.appendingPathComponent("Sega - Naomi/Named_Boxarts")
+ } else if coverMatch.isAtomiswave {
+ boxArtUrl = host.appendingPathComponent("Atomiswave/Named_Boxarts")
+ } else {
+ boxArtUrl = host.appendingPathComponent("MAME/Named_Boxarts")
+ }
case .a2600:
boxArtUrl = host.appendingPathComponent("Atari - 2600/Named_Boxarts")
case .a5200:
@@ -157,6 +167,10 @@ class OnlineCoverManager {
boxArtUrl = host.appendingPathComponent("SNK - Neo Geo Pocket/Named_Boxarts")
case .ngpc:
boxArtUrl = host.appendingPathComponent("SNK - Neo Geo Pocket Color/Named_Boxarts")
+ case .wsc:
+ boxArtUrl = host.appendingPathComponent("Bandai - WonderSwan Color/Named_Boxarts")
+ case .ws:
+ boxArtUrl = host.appendingPathComponent("Bandai - WonderSwan/Named_Boxarts")
case .c64:
boxArtUrl = host.appendingPathComponent("Commodore - 64/Named_Boxarts")
case .amiga:
diff --git a/ManicEmu/ManicEmu/Sources/Tools/Others/System.swift b/ManicEmu/ManicEmu/Sources/Tools/Others/System.swift
index a9b9bd67..29c57c9f 100644
--- a/ManicEmu/ManicEmu/Sources/Tools/Others/System.swift
+++ b/ManicEmu/ManicEmu/Sources/Tools/Others/System.swift
@@ -11,6 +11,7 @@
enum System: CaseIterable
{
+ case wsc
case ps2
case amiga
case c64
@@ -95,7 +96,8 @@ enum System: CaseIterable
PCE.core,
NGP.core,
C64.core,
- Amiga.core]
+ Amiga.core,
+ WSC.core]
}
///Returns all supported game types.
@@ -165,6 +167,7 @@ extension System {
case .c64: return .c64
case .amiga: return .amiga
case .ps2: return .ps2
+ case .wsc: return .wsc
}
}
}
diff --git a/System.core/Games.db b/System.core/Games.db
index cb17d026..8db1c96e 100644
--- a/System.core/Games.db
+++ b/System.core/Games.db
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:58517b176e2734fd744e3f44b1e09be0970f6db6111fda5b42d511dba3a308f2
-size 4743168
+oid sha256:0a61e36857c4ac8c20754689096a1a5dc79c28931fa3cd8b7fa433dbec521fe1
+size 4759552
diff --git a/System.core/WSC.keymapping b/System.core/WSC.keymapping
new file mode 100644
index 00000000..33ba3ca3
--- /dev/null
+++ b/System.core/WSC.keymapping
@@ -0,0 +1,181 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>gameControllerInputType</key>
+ <string>standard</string>
+ <key>inputMappings</key>
+ <dict>
+ <key>a</key>
+ <dict>
+ <key>identifier</key>
+ <string>a</string>
+ <key>type</key>
+ <string>public.aoshuang.game.wsc</string>
+ </dict>
+ <key>b</key>
+ <dict>
+ <key>identifier</key>
+ <string>b</string>
+ <key>type</key>
+ <string>public.aoshuang.game.wsc</string>
+ </dict>
+ <key>x</key>
+ <dict>
+ <key>identifier</key>
+ <string>x</string>
+ <key>type</key>
+ <string>public.aoshuang.game.wsc</string>
+ </dict>
+ <key>y</key>
+ <dict>
+ <key>identifier</key>
+ <string>y</string>
+ <key>type</key>
+ <string>public.aoshuang.game.wsc</string>
+ </dict>
+ <key>up</key>
+ <dict>
+ <key>identifier</key>
+ <string>up</string>
+ <key>type</key>
+ <string>public.aoshuang.game.wsc</string>
+ </dict>
+ <key>down</key>
+ <dict>
+ <key>identifier</key>
+ <string>down</string>
+ <key>type</key>
+ <string>public.aoshuang.game.wsc</string>
+ </dict>
+ <key>left</key>
+ <dict>
+ <key>identifier</key>
+ <string>left</string>
+ <key>type</key>
+ <string>public.aoshuang.game.wsc</string>
+ </dict>
+ <key>right</key>
+ <dict>
+ <key>identifier</key>
+ <string>right</string>
+ <key>type</key>
+ <string>public.aoshuang.game.wsc</string>
+ </dict>
+ <key>leftThumbstickUp</key>
+ <dict>
+ <key>identifier</key>
+ <string>leftThumbstickUp</string>
+ <key>type</key>
+ <string>public.aoshuang.game.wsc</string>
+ </dict>
+ <key>leftThumbstickDown</key>
+ <dict>
+ <key>identifier</key>
+ <string>leftThumbstickDown</string>
+ <key>type</key>
+ <string>public.aoshuang.game.wsc</string>
+ </dict>
+ <key>leftThumbstickLeft</key>
+ <dict>
+ <key>identifier</key>
+ <string>leftThumbstickLeft</string>
+ <key>type</key>
+ <string>public.aoshuang.game.wsc</string>
+ </dict>
+ <key>leftThumbstickRight</key>
+ <dict>
+ <key>identifier</key>
+ <string>leftThumbstickRight</string>
+ <key>type</key>
+ <string>public.aoshuang.game.wsc</string>
+ </dict>
+ <key>rightThumbstickUp</key>
+ <dict>
+ <key>identifier</key>
+ <string>rightThumbstickUp</string>
+ <key>type</key>
+ <string>public.aoshuang.game.wsc</string>
+ </dict>
+ <key>rightThumbstickDown</key>
+ <dict>
+ <key>identifier</key>
+ <string>rightThumbstickDown</string>
+ <key>type</key>
+ <string>public.aoshuang.game.wsc</string>
+ </dict>
+ <key>rightThumbstickLeft</key>
+ <dict>
+ <key>identifier</key>
+ <string>rightThumbstickLeft</string>
+ <key>type</key>
+ <string>public.aoshuang.game.wsc</string>
+ </dict>
+ <key>rightThumbstickRight</key>
+ <dict>
+ <key>identifier</key>
+ <string>rightThumbstickRight</string>
+ <key>type</key>
+ <string>public.aoshuang.game.wsc</string>
+ </dict>
+ <key>select</key>
+ <dict>
+ <key>identifier</key>
+ <string>select</string>
+ <key>type</key>
+ <string>public.aoshuang.game.wsc</string>
+ </dict>
+ <key>start</key>
+ <dict>
+ <key>identifier</key>
+ <string>start</string>
+ <key>type</key>
+ <string>public.aoshuang.game.wsc</string>
+ </dict>
+ <key>l1</key>
+ <dict>
+ <key>identifier</key>
+ <string>l1</string>
+ <key>type</key>
+ <string>public.aoshuang.game.wsc</string>
+ </dict>
+ <key>r1</key>
+ <dict>
+ <key>identifier</key>
+ <string>r1</string>
+ <key>type</key>
+ <string>public.aoshuang.game.wsc</string>
+ </dict>
+ <key>l2</key>
+ <dict>
+ <key>identifier</key>
+ <string>l2</string>
+ <key>type</key>
+ <string>public.aoshuang.game.wsc</string>
+ </dict>
+ <key>r2</key>
+ <dict>
+ <key>identifier</key>
+ <string>r2</string>
+ <key>type</key>
+ <string>public.aoshuang.game.wsc</string>
+ </dict>
+ <key>l3</key>
+ <dict>
+ <key>identifier</key>
+ <string>l3</string>
+ <key>type</key>
+ <string>public.aoshuang.game.wsc</string>
+ </dict>
+ <key>r3</key>
+ <dict>
+ <key>identifier</key>
+ <string>r3</string>
+ <key>type</key>
+ <string>public.aoshuang.game.wsc</string>
+ </dict>
+ </dict>
+ <key>name</key>
+ <string>Default WSC</string>
+</dict>
+</plist>
diff --git a/System.core/WSC.manicskin b/System.core/WSC.manicskin
new file mode 100644
index 00000000..959e41e0
--- /dev/null
+++ b/System.core/WSC.manicskin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:62feccc5a9766c36d52f02ebcfd278cd09f6d0cd28f0dddd255d9b525223985e
+size 1132422
diff --git a/System.core/WSC_FLEX.manicskin b/System.core/WSC_FLEX.manicskin
new file mode 100644
index 00000000..27519dd4
--- /dev/null
+++ b/System.core/WSC_FLEX.manicskin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:15bfe4da228808b947fe58501424033dfcbde5d7daedc89e20f797f83dfaa27b
+size 172391