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 PC Engine core

Daiuno361d76d857d1
diff --git a/Cores/mednafen.pce.libretro.framework/Info.plist b/Cores/mednafen.pce.libretro.framework/Info.plist
new file mode 100644
index 00000000..116c6a40
--- /dev/null
+++ b/Cores/mednafen.pce.libretro.framework/Info.plist
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:44542ef80978fa172d9241c94063ebe5f0f298a5b534c4d6384bc0734975913d
+size 733
diff --git a/Cores/mednafen.pce.libretro.framework/_CodeSignature/CodeResources b/Cores/mednafen.pce.libretro.framework/_CodeSignature/CodeResources
new file mode 100644
index 00000000..82ea1df1
--- /dev/null
+++ b/Cores/mednafen.pce.libretro.framework/_CodeSignature/CodeResources
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:8d88255cc99627d4df01ecc514c530fa24940d0b31cc9bdd70b1f884a2c40a7e
+size 1798
diff --git a/Cores/mednafen.pce.libretro.framework/mednafen.pce.libretro b/Cores/mednafen.pce.libretro.framework/mednafen.pce.libretro
new file mode 100755
index 00000000..47f82a54
--- /dev/null
+++ b/Cores/mednafen.pce.libretro.framework/mednafen.pce.libretro
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:787e93e88b594d9292e2adac4ca1857e676d2707fed05b49b0e4d4c326049ebc
+size 4847472
diff --git a/ManicEmu/ManicEmu.xcodeproj/project.pbxproj b/ManicEmu/ManicEmu.xcodeproj/project.pbxproj
index f11c819f..f31c3897 100644
--- a/ManicEmu/ManicEmu.xcodeproj/project.pbxproj
+++ b/ManicEmu/ManicEmu.xcodeproj/project.pbxproj
@@ -1051,6 +1051,10 @@
F86B554686AA4FD091DF9AEE /* IQKeyboardManagerSwift in Frameworks */ = {isa = PBXBuildFile; productRef = 57C7590A2FD42C2E0093A2B3 /* IQKeyboardManagerSwift */; };
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, ); }; };
+ AA122ED56C3140C1864D4EC8 /* mednafen.pce.libretro.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9408D7BF872544CFABE4D652 /* mednafen.pce.libretro.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
+ 1CAAD3DB49C34DAD998DD033 /* PCE.swift in Sources */ = {isa = PBXBuildFile; fileRef = A0E402E22DFA4C9D96FFBC89 /* PCE.swift */; };
+ D94752D7D273464B9E4B625C /* PCE.swift in Sources */ = {isa = PBXBuildFile; fileRef = A0E402E22DFA4C9D96FFBC89 /* PCE.swift */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
@@ -1087,6 +1091,8 @@
dstPath = "";
dstSubfolderSpec = 10;
files = (
+
+ FFD8F5F4CE02425E8BA80296 /* mednafen.pce.libretro.framework in Embed Frameworks */,
2A84A76AE2A94C3EB048E0D1 /* dolphin.libretro.framework in Embed Frameworks */,
DE2953C2BE0E42C8A8F0EEAB /* eka2l1.libretro.framework in Embed Frameworks */,
57CDCF4F2FD5CBD3005BA4C8 /* MoltenVK.xcframework in Embed Frameworks */,
@@ -1137,6 +1143,8 @@
dstPath = "";
dstSubfolderSpec = 10;
files = (
+
+ AA122ED56C3140C1864D4EC8 /* mednafen.pce.libretro.framework in Embed Frameworks */,
23CE581FDA6A4771B987DE69 /* dolphin.libretro.framework in Embed Frameworks */,
349598F48E5541F89B1CBE80 /* eka2l1.libretro.framework in Embed Frameworks */,
57C75B502FD5928E0093A2B3 /* MoltenVK.xcframework in Embed Frameworks */,
@@ -5997,6 +6005,8 @@
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>"; };
+ 9408D7BF872544CFABE4D652 /* mednafen.pce.libretro.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = mednafen.pce.libretro.framework; path = ../Cores/mednafen.pce.libretro.framework; sourceTree = SOURCE_ROOT; };
+ A0E402E22DFA4C9D96FFBC89 /* PCE.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PCE.swift; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@@ -11800,6 +11810,8 @@
57C75AD42FD572260093A2B3 /* Cores */ = {
isa = PBXGroup;
children = (
+
+ 9408D7BF872544CFABE4D652 /* mednafen.pce.libretro.framework */,
9770068F58CC4F29B21DE396 /* dolphin.libretro.framework */,
25F38CF54CA347238295BE77 /* eka2l1.libretro.framework */,
578E22F12FD1EE6600A2749A /* azahar.libretro.framework */,
@@ -11972,6 +11984,8 @@
57F0D8402DE2CD7500760F57 /* Cores */ = {
isa = PBXGroup;
children = (
+
+ A0E402E22DFA4C9D96FFBC89 /* PCE.swift */,
0A2DDA01B1DB4E15B8F0C5C6 /* Wii.swift */,
691349DFB9FB4307A3151455 /* NGC.swift */,
460B02C144024C2EAC5EAF21 /* Symbian.swift */,
@@ -12783,6 +12797,8 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
+
+ 1CAAD3DB49C34DAD998DD033 /* PCE.swift in Sources */,
0E964747C5B24B348A8665E0 /* Wii.swift in Sources */,
3008E79240634E729DB35FEB /* NGC.swift in Sources */,
75A984D24586436BA6AF31C9 /* Symbian.swift in Sources */,
@@ -13188,6 +13204,8 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
+
+ D94752D7D273464B9E4B625C /* PCE.swift in Sources */,
023B2A9DBF6F473782A64EC6 /* Wii.swift in Sources */,
A65D0A457B5749D3B4E590B2 /* NGC.swift in Sources */,
A529C8391AE54EA58B07E509 /* Symbian.swift in Sources */,
diff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Brand/pce_group_brand.imageset/Contents.json b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Brand/pce_group_brand.imageset/Contents.json
new file mode 100644
index 00000000..a3fb69e2
--- /dev/null
+++ b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Brand/pce_group_brand.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/Brand/pce_group_brand.imageset/[email protected] b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Brand/pce_group_brand.imageset/[email protected]
new file mode 100644
index 00000000..cb233799
Binary files /dev/null and b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Brand/pce_group_brand.imageset/[email protected] differ
diff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Brand/pce_group_brand.imageset/[email protected] b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Brand/pce_group_brand.imageset/[email protected]
new file mode 100644
index 00000000..21d2d0e8
Binary files /dev/null and b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Brand/pce_group_brand.imageset/[email protected] differ
diff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Brand/supergrafx_group_brand.imageset/Contents.json b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Brand/supergrafx_group_brand.imageset/Contents.json
new file mode 100644
index 00000000..c740c44e
--- /dev/null
+++ b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Brand/supergrafx_group_brand.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/Brand/supergrafx_group_brand.imageset/[email protected] b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Brand/supergrafx_group_brand.imageset/[email protected]
new file mode 100644
index 00000000..773dc0f1
Binary files /dev/null and b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Brand/supergrafx_group_brand.imageset/[email protected] differ
diff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Brand/supergrafx_group_brand.imageset/[email protected] b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Brand/supergrafx_group_brand.imageset/[email protected]
new file mode 100644
index 00000000..f7cf5b1f
Binary files /dev/null and b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Brand/supergrafx_group_brand.imageset/[email protected] differ
diff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Brand/turbografx_16_group_brand.imageset/Contents.json b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Brand/turbografx_16_group_brand.imageset/Contents.json
new file mode 100644
index 00000000..988e055e
--- /dev/null
+++ b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Brand/turbografx_16_group_brand.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/Brand/turbografx_16_group_brand.imageset/[email protected] b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Brand/turbografx_16_group_brand.imageset/[email protected]
new file mode 100644
index 00000000..8d619833
Binary files /dev/null and b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Brand/turbografx_16_group_brand.imageset/[email protected] differ
diff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Brand/turbografx_16_group_brand.imageset/[email protected] b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Brand/turbografx_16_group_brand.imageset/[email protected]
new file mode 100644
index 00000000..0073fc8d
Binary files /dev/null and b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Brand/turbografx_16_group_brand.imageset/[email protected] differ
diff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Brand/turbografx_cd_group_brand.imageset/Contents.json b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Brand/turbografx_cd_group_brand.imageset/Contents.json
new file mode 100644
index 00000000..cc2ee39f
--- /dev/null
+++ b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Brand/turbografx_cd_group_brand.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/Brand/turbografx_cd_group_brand.imageset/[email protected] b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Brand/turbografx_cd_group_brand.imageset/[email protected]
new file mode 100644
index 00000000..90f3531d
Binary files /dev/null and b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Brand/turbografx_cd_group_brand.imageset/[email protected] differ
diff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Brand/turbografx_cd_group_brand.imageset/[email protected] b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Brand/turbografx_cd_group_brand.imageset/[email protected]
new file mode 100644
index 00000000..376f8096
Binary files /dev/null and b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Brand/turbografx_cd_group_brand.imageset/[email protected] differ
diff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Cover/pce_cover_h.imageset/Contents.json b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Cover/pce_cover_h.imageset/Contents.json
new file mode 100644
index 00000000..832ff699
--- /dev/null
+++ b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Cover/pce_cover_h.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/Cover/pce_cover_h.imageset/[email protected] b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Cover/pce_cover_h.imageset/[email protected]
new file mode 100644
index 00000000..82c885d0
Binary files /dev/null and b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Cover/pce_cover_h.imageset/[email protected] differ
diff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Cover/pce_cover_h.imageset/[email protected] b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Cover/pce_cover_h.imageset/[email protected]
new file mode 100644
index 00000000..6df70158
Binary files /dev/null and b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Cover/pce_cover_h.imageset/[email protected] differ
diff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Cover/pce_cover_v.imageset/Contents.json b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Cover/pce_cover_v.imageset/Contents.json
new file mode 100644
index 00000000..636fa9ad
--- /dev/null
+++ b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Cover/pce_cover_v.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/Cover/pce_cover_v.imageset/[email protected] b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Cover/pce_cover_v.imageset/[email protected]
new file mode 100644
index 00000000..204e778e
Binary files /dev/null and b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Cover/pce_cover_v.imageset/[email protected] differ
diff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Cover/pce_cover_v.imageset/[email protected] b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Cover/pce_cover_v.imageset/[email protected]
new file mode 100644
index 00000000..20170435
Binary files /dev/null and b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Cover/pce_cover_v.imageset/[email protected] differ
diff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Cover/supergrafx_cover_h.imageset/Contents.json b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Cover/supergrafx_cover_h.imageset/Contents.json
new file mode 100644
index 00000000..0a624228
--- /dev/null
+++ b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Cover/supergrafx_cover_h.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/Cover/supergrafx_cover_h.imageset/[email protected] b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Cover/supergrafx_cover_h.imageset/[email protected]
new file mode 100644
index 00000000..99d327ad
Binary files /dev/null and b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Cover/supergrafx_cover_h.imageset/[email protected] differ
diff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Cover/supergrafx_cover_h.imageset/[email protected] b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Cover/supergrafx_cover_h.imageset/[email protected]
new file mode 100644
index 00000000..7eecea95
Binary files /dev/null and b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Cover/supergrafx_cover_h.imageset/[email protected] differ
diff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Cover/supergrafx_cover_v.imageset/Contents.json b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Cover/supergrafx_cover_v.imageset/Contents.json
new file mode 100644
index 00000000..2fdc56b7
--- /dev/null
+++ b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Cover/supergrafx_cover_v.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/Cover/supergrafx_cover_v.imageset/[email protected] b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Cover/supergrafx_cover_v.imageset/[email protected]
new file mode 100644
index 00000000..d4ccf661
Binary files /dev/null and b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Cover/supergrafx_cover_v.imageset/[email protected] differ
diff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Cover/supergrafx_cover_v.imageset/[email protected] b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Cover/supergrafx_cover_v.imageset/[email protected]
new file mode 100644
index 00000000..01f4ff83
Binary files /dev/null and b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Cover/supergrafx_cover_v.imageset/[email protected] differ
diff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Cover/turbografx_16_cover_h.imageset/Contents.json b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Cover/turbografx_16_cover_h.imageset/Contents.json
new file mode 100644
index 00000000..6ed04e5f
--- /dev/null
+++ b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Cover/turbografx_16_cover_h.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/Cover/turbografx_16_cover_h.imageset/[email protected] b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Cover/turbografx_16_cover_h.imageset/[email protected]
new file mode 100644
index 00000000..160c8781
Binary files /dev/null and b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Cover/turbografx_16_cover_h.imageset/[email protected] differ
diff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Cover/turbografx_16_cover_h.imageset/[email protected] b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Cover/turbografx_16_cover_h.imageset/[email protected]
new file mode 100644
index 00000000..32945642
Binary files /dev/null and b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Cover/turbografx_16_cover_h.imageset/[email protected] differ
diff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Cover/turbografx_16_cover_v.imageset/Contents.json b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Cover/turbografx_16_cover_v.imageset/Contents.json
new file mode 100644
index 00000000..ee41e660
--- /dev/null
+++ b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Cover/turbografx_16_cover_v.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/Cover/turbografx_16_cover_v.imageset/[email protected] b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Cover/turbografx_16_cover_v.imageset/[email protected]
new file mode 100644
index 00000000..9a9799c0
Binary files /dev/null and b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Cover/turbografx_16_cover_v.imageset/[email protected] differ
diff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Cover/turbografx_16_cover_v.imageset/[email protected] b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Cover/turbografx_16_cover_v.imageset/[email protected]
new file mode 100644
index 00000000..9e16b2a4
Binary files /dev/null and b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Cover/turbografx_16_cover_v.imageset/[email protected] differ
diff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Cover/turbografx_cd_cover_h.imageset/Contents.json b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Cover/turbografx_cd_cover_h.imageset/Contents.json
new file mode 100644
index 00000000..f4ae04c2
--- /dev/null
+++ b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Cover/turbografx_cd_cover_h.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/Cover/turbografx_cd_cover_h.imageset/[email protected] b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Cover/turbografx_cd_cover_h.imageset/[email protected]
new file mode 100644
index 00000000..80a9cd1a
Binary files /dev/null and b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Cover/turbografx_cd_cover_h.imageset/[email protected] differ
diff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Cover/turbografx_cd_cover_h.imageset/[email protected] b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Cover/turbografx_cd_cover_h.imageset/[email protected]
new file mode 100644
index 00000000..d4ba84be
Binary files /dev/null and b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Cover/turbografx_cd_cover_h.imageset/[email protected] differ
diff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Cover/turbografx_cd_cover_v.imageset/Contents.json b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Cover/turbografx_cd_cover_v.imageset/Contents.json
new file mode 100644
index 00000000..7cf73acc
--- /dev/null
+++ b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Cover/turbografx_cd_cover_v.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/Cover/turbografx_cd_cover_v.imageset/[email protected] b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Cover/turbografx_cd_cover_v.imageset/[email protected]
new file mode 100644
index 00000000..1df566fe
Binary files /dev/null and b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Cover/turbografx_cd_cover_v.imageset/[email protected] differ
diff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Cover/turbografx_cd_cover_v.imageset/[email protected] b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Cover/turbografx_cd_cover_v.imageset/[email protected]
new file mode 100644
index 00000000..60783a40
Binary files /dev/null and b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Cover/turbografx_cd_cover_v.imageset/[email protected] differ
diff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Manufacturer/nec_highlight.imageset/Contents.json b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Manufacturer/nec_highlight.imageset/Contents.json
new file mode 100644
index 00000000..a13ddf03
--- /dev/null
+++ b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Manufacturer/nec_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/nec_highlight.imageset/[email protected] b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Manufacturer/nec_highlight.imageset/[email protected]
new file mode 100644
index 00000000..c614b79b
Binary files /dev/null and b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Manufacturer/nec_highlight.imageset/[email protected] differ
diff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Manufacturer/nec_highlight.imageset/[email protected] b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Manufacturer/nec_highlight.imageset/[email protected]
new file mode 100644
index 00000000..49d25d73
Binary files /dev/null and b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Manufacturer/nec_highlight.imageset/[email protected] differ
diff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Manufacturer/nec_normal.imageset/Contents.json b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Manufacturer/nec_normal.imageset/Contents.json
new file mode 100644
index 00000000..3dd21e6c
--- /dev/null
+++ b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Manufacturer/nec_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/nec_normal.imageset/[email protected] b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Manufacturer/nec_normal.imageset/[email protected]
new file mode 100644
index 00000000..cc776b1e
Binary files /dev/null and b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Manufacturer/nec_normal.imageset/[email protected] differ
diff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Manufacturer/nec_normal.imageset/[email protected] b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Manufacturer/nec_normal.imageset/[email protected]
new file mode 100644
index 00000000..582b061a
Binary files /dev/null and b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Manufacturer/nec_normal.imageset/[email protected] differ
diff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Manufacturer/nec_normal.imageset/[email protected] b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Manufacturer/nec_normal.imageset/[email protected]
new file mode 100644
index 00000000..bdc4dc83
Binary files /dev/null and b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Manufacturer/nec_normal.imageset/[email protected] differ
diff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Manufacturer/nec_normal.imageset/[email protected] b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Manufacturer/nec_normal.imageset/[email protected]
new file mode 100644
index 00000000..1a8d218e
Binary files /dev/null and b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Manufacturer/nec_normal.imageset/[email protected] differ
diff --git a/ManicEmu/ManicEmu/Resources/Info.plist b/ManicEmu/ManicEmu/Resources/Info.plist
index 4e377481..794a0680 100644
--- a/ManicEmu/ManicEmu/Resources/Info.plist
+++ b/ManicEmu/ManicEmu/Resources/Info.plist
@@ -411,6 +411,18 @@
<string>public.aoshuang.game.wii</string>
</array>
</dict>
+ <dict>
+ <key>CFBundleTypeName</key>
+ <string>PCE Game</string>
+ <key>CFBundleTypeRole</key>
+ <string>Editor</string>
+ <key>LSHandlerRank</key>
+ <string>Owner</string>
+ <key>LSItemContentTypes</key>
+ <array>
+ <string>public.aoshuang.game.pce</string>
+ </array>
+ </dict>
<dict>
<key>CFBundleTypeName</key>
<string>Manic EMU Controller Skin</string>
@@ -1447,6 +1459,33 @@
</array>
</dict>
</dict>
+ <dict>
+ <key>UTTypeConformsTo</key>
+ <array>
+ <string>public.data</string>
+ </array>
+ <key>UTTypeDescription</key>
+ <string>PCE Game</string>
+ <key>UTTypeIconFiles</key>
+ <array>
+ <string>file_icon.png</string>
+ </array>
+ <key>UTTypeIdentifier</key>
+ <string>public.aoshuang.game.pce</string>
+ <key>UTTypeTagSpecification</key>
+ <dict>
+ <key>public.filename-extension</key>
+ <array>
+ <string>pce</string>
+ <string>sgx</string>
+ <string>cue</string>
+ <string>ccd</string>
+ <string>chd</string>
+ <string>toc</string>
+ <string>m3u</string>
+ </array>
+ </dict>
+ </dict>
<dict>
<key>UTTypeConformsTo</key>
<array>
@@ -1545,6 +1584,7 @@
<string>min</string>
<string>zip</string>
<string>img</string>
+ <string>pce</string>
</array>
</dict>
</dict>
diff --git a/ManicEmu/ManicEmu/Sources/Base/Constants.swift b/ManicEmu/ManicEmu/Sources/Base/Constants.swift
index 23af67f8..b72ea314 100644
--- a/ManicEmu/ManicEmu/Sources/Base/Constants.swift
+++ b/ManicEmu/ManicEmu/Sources/Base/Constants.swift
@@ -490,6 +490,7 @@ extension _R {
static let ProSystem = Document.appendingPathComponent(EmulationCore.ProSystem.name)
static let VirtualJaguar = Document.appendingPathComponent(EmulationCore.VirtualJaguar.name)
static let Holani = Document.appendingPathComponent(EmulationCore.Holani.name)
+ static let BeetlePCE = Document.appendingPathComponent(EmulationCore.BeetlePCE.name)
static let LibretroSavePath = Document
static let GamesDB = Resource.appendingPathComponent("Games.db")
static let MAMEDB = Resource.appendingPathComponent("MAME.db")
@@ -996,6 +997,13 @@ extension _R {
static let LynxBios = [
BIOSItem(fileName: "lynxboot.img", imported: false, desc: "Lynx Boot Image", required: false)
]
+
+ static let PCEBios = [
+ BIOSItem(fileName: "syscard3.pce", imported: false, desc: "Super CD-ROM2 System V3.xx", required: false),
+ BIOSItem(fileName: "syscard2.pce", imported: false, desc: "CD-ROM System V2.xx", required: false),
+ BIOSItem(fileName: "syscard1.pce", imported: false, desc: "CD-ROM System V1.xx", required: false),
+ BIOSItem(fileName: "gexpress.pce", imported: false, desc: "Game Express CD Card", required: false)
+ ]
}
struct _Style {
diff --git a/ManicEmu/ManicEmu/Sources/Business/Common/Models/Manufacturer.swift b/ManicEmu/ManicEmu/Sources/Business/Common/Models/Manufacturer.swift
index 4f61874e..346e62e3 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
+ case nintendo, sony, sega, arcade, atari, sun, microsoft, modRetro, nokia, nec
static var allCases: [Manufacturer] {
if Locale.prefersUS {
- [.nintendo, .sony, .sega, .atari, .arcade, .sun, .microsoft, .modRetro, .nokia]
+ [.nintendo, .sony, .sega, .atari, .arcade, .sun, .microsoft, .modRetro, .nokia, .nec]
} else {
- [.nintendo, .sony, .sega, .arcade, .atari, .sun, .microsoft, .modRetro, .nokia]
+ [.nintendo, .sony, .sega, .arcade, .atari, .sun, .microsoft, .modRetro, .nokia, .nec]
}
}
@@ -47,6 +47,8 @@ enum Manufacturer: Int, CaseIterable {
"ModRetro"
case .nokia:
"Nokia"
+ case .nec:
+ "NEC"
}
}
@@ -77,6 +79,8 @@ enum Manufacturer: Int, CaseIterable {
R.image.modretro_normal()!
case .nokia:
R.image.nokia_normal()!
+ case .nec:
+ R.image.nec_normal()!
}
}
@@ -100,6 +104,8 @@ enum Manufacturer: Int, CaseIterable {
R.image.modretro_highlight()!
case .nokia:
R.image.nokia_highlight()!
+ case .nec:
+ R.image.nec_highlight()!
}
}
}
diff --git a/ManicEmu/ManicEmu/Sources/Business/Common/Views/CategorySelectionView.swift b/ManicEmu/ManicEmu/Sources/Business/Common/Views/CategorySelectionView.swift
index 1750c6dc..69d6e24d 100644
--- a/ManicEmu/ManicEmu/Sources/Business/Common/Views/CategorySelectionView.swift
+++ b/ManicEmu/ManicEmu/Sources/Business/Common/Views/CategorySelectionView.swift
@@ -41,6 +41,8 @@ class CategorySelectionView: BaseView {
if let index {
for game in games {
game.updateCategory(gameType: supportedCategories[index])
+ game.matchCover(force: true,
+ useVirtualGameTypeIfNeed: true)
}
completion?(true)
} else {
diff --git a/ManicEmu/ManicEmu/Sources/Business/Common/Views/PlatformSelectionView.swift b/ManicEmu/ManicEmu/Sources/Business/Common/Views/PlatformSelectionView.swift
index e577d2c5..cb0bd525 100644
--- a/ManicEmu/ManicEmu/Sources/Business/Common/Views/PlatformSelectionView.swift
+++ b/ManicEmu/ManicEmu/Sources/Business/Common/Views/PlatformSelectionView.swift
@@ -83,9 +83,7 @@ class PlatformSelectionView: BaseView {
NotificationCenter.default.post(name: R.NotificationName.PlatformSelectionChange, object: nil)
for game in games {
- if !game.hasCoverMatch {
- OnlineCoverManager.shared.addCoverMatch(OnlineCoverManager.CoverMatch(game: game))
- }
+ game.matchCover(force: true)
}
}
completion?()
diff --git a/ManicEmu/ManicEmu/Sources/Business/GameInfo/Models/SpecialCoreOption.swift b/ManicEmu/ManicEmu/Sources/Business/GameInfo/Models/SpecialCoreOption.swift
index a92258b0..891591d8 100644
--- a/ManicEmu/ManicEmu/Sources/Business/GameInfo/Models/SpecialCoreOption.swift
+++ b/ManicEmu/ManicEmu/Sources/Business/GameInfo/Models/SpecialCoreOption.swift
@@ -151,6 +151,12 @@ enum SpecialCoreOption: String {
case dolphin_skip_gc_bios
case dolphin_cheats_enabled
case dolphin_cheats_import
+ //pce
+ case pce_default_joypad_type_p1
+ case pce_default_joypad_type_p2
+ case pce_default_joypad_type_p3
+ case pce_default_joypad_type_p4
+ case pce_default_joypad_type_p5
@@ -285,6 +291,12 @@ enum SpecialCoreOption: String {
options.insert(.dolphin_skip_gc_bios)
}
return options
+ } else if game.gameType == .pce {
+ return [.pce_default_joypad_type_p1,
+ .pce_default_joypad_type_p2,
+ .pce_default_joypad_type_p3,
+ .pce_default_joypad_type_p4,
+ .pce_default_joypad_type_p5]
}
return []
}
@@ -408,6 +420,14 @@ enum SpecialCoreOption: String {
.dolphin_vi_skip: "enabled"
]
}
+ } else if game.gameType == .pce {
+ result = [
+ .pce_default_joypad_type_p1: "6 Buttons",
+ .pce_default_joypad_type_p2: "6 Buttons",
+ .pce_default_joypad_type_p3: "6 Buttons",
+ .pce_default_joypad_type_p4: "6 Buttons",
+ .pce_default_joypad_type_p5: "6 Buttons"
+ ]
}
return result.mapKeysAndValues({ ($0.key.rawValue, $0.value) })
}
diff --git a/ManicEmu/ManicEmu/Sources/Business/GameInfo/VIews/LibretroCoverSearchView.swift b/ManicEmu/ManicEmu/Sources/Business/GameInfo/VIews/LibretroCoverSearchView.swift
index 61c2cae6..6be18e3d 100644
--- a/ManicEmu/ManicEmu/Sources/Business/GameInfo/VIews/LibretroCoverSearchView.swift
+++ b/ManicEmu/ManicEmu/Sources/Business/GameInfo/VIews/LibretroCoverSearchView.swift
@@ -108,7 +108,7 @@ class LibretroCoverSearchView: BaseView {
private func searchCover(text: String?) {
if let text = text?.trimmed {
UIView.makeLoading()
- let gameType = game.gameType
+ let gameType = game.effectiveGameType
let id = game.id
let fileExtension = game.fileExtension
DispatchQueue.global().async { [weak self] in
diff --git a/ManicEmu/ManicEmu/Sources/Business/Games/Views/GameCoverView.swift b/ManicEmu/ManicEmu/Sources/Business/Games/Views/GameCoverView.swift
index 3ef326e0..f5e85b16 100644
--- a/ManicEmu/ManicEmu/Sources/Business/Games/Views/GameCoverView.swift
+++ b/ManicEmu/ManicEmu/Sources/Business/Games/Views/GameCoverView.swift
@@ -305,6 +305,16 @@ class GameCoverView: BaseView {
image = style == .style2 ? R.image.ngc_cover_v() : R.image.ngc_cover_h()
} else if gameType == .wii {
image = style == .style2 ? R.image.wii_cover_v() : R.image.wii_cover_h()
+ } else if gameType == .pce {
+ if gameTypeCategory == 0 {
+ image = style == .style2 ? R.image.pce_cover_v() : R.image.pce_cover_h()
+ } else if gameTypeCategory == 1 {
+ image = style == .style2 ? R.image.turbografx_16_cover_v() : R.image.turbografx_16_cover_h()
+ } else if gameTypeCategory == 2 {
+ image = style == .style2 ? R.image.turbografx_cd_cover_v() : R.image.turbografx_cd_cover_h()
+ } else if gameTypeCategory == 3 {
+ image = style == .style2 ? R.image.supergrafx_cover_v() : R.image.supergrafx_cover_h()
+ }
}
if UIDevice.isPhone, !UIDevice.isLandscape, scalePlatform, R.Style.GamesPerRow != 2, let unwrapImage = image {
image = unwrapImage.scaled(toWidth: unwrapImage.size.width * (1/(R.Style.GamesPerRow-1)))
diff --git a/ManicEmu/ManicEmu/Sources/Business/Games/Views/GameListLandscapeView.swift b/ManicEmu/ManicEmu/Sources/Business/Games/Views/GameListLandscapeView.swift
index 95291837..1a92421c 100644
--- a/ManicEmu/ManicEmu/Sources/Business/Games/Views/GameListLandscapeView.swift
+++ b/ManicEmu/ManicEmu/Sources/Business/Games/Views/GameListLandscapeView.swift
@@ -411,24 +411,6 @@ class GameListLandscapeView: BaseView {
//MARK: - 数据管线
- ///GB/DOS支持切换分类 转换为虚拟GameType
- private static func effectiveGameType(of game: Game) -> GameType {
- if game.supportChangeCategory {
- let category = game.getExtraInt(key: ExtraKey.gameTypeCategory.rawValue) ?? 0
- if game.gameType == .gb, category == 1 {
- return .chm
- }
- if game.gameType == .dos {
- if category == 1 {
- return .win95
- } else if category == 2 {
- return .win98
- }
- }
- }
- return game.gameType
- }
-
///平台是否可见 虚拟类型映射回原平台配置
private static func isPlatformVisible(_ gameType: GameType) -> Bool {
var platform = gameType.localizedShortName
@@ -436,6 +418,8 @@ class GameListLandscapeView: BaseView {
platform = GameType.gb.localizedShortName
} else if gameType == .win95 || gameType == .win98 {
platform = GameType.dos.localizedShortName
+ } else if gameType == .turbografx_16 || gameType == .turbografx_cd || gameType == .supergrafx {
+ platform = GameType.pce.localizedShortName
}
return Settings.defalut.getPlatformVisible(platform: platform)
}
@@ -447,6 +431,8 @@ class GameListLandscapeView: BaseView {
return manufacturer == .modRetro
case .win95, .win98:
return manufacturer.gameTypes.contains(.dos)
+ case .turbografx_16, .turbografx_cd, .supergrafx:
+ return manufacturer.gameTypes.contains(.pce)
default:
return manufacturer.gameTypes.contains(gameType)
}
@@ -459,6 +445,9 @@ class GameListLandscapeView: BaseView {
order.insert(.chm, at: order.firstIndex(of: .gb)!)
order.insert(.win95, at: order.firstIndex(of: .dos)!)
order.insert(.win98, at: order.firstIndex(of: .win95)!)
+ order.insert(.turbografx_16, at: order.firstIndex(of: .pce)!)
+ order.insert(.turbografx_cd, at: order.firstIndex(of: .turbografx_16)!)
+ order.insert(.supergrafx, at: order.firstIndex(of: .turbografx_cd)!)
return order
}
@@ -496,8 +485,7 @@ class GameListLandscapeView: BaseView {
//按虚拟类型分组
var grouped: [GameType: [Game]] = [:]
for game in games {
- let type = Self.effectiveGameType(of: game)
- grouped[type, default: []].append(game)
+ grouped[game.effectiveGameType, default: []].append(game)
}
//平台可见性过滤
@@ -559,7 +547,7 @@ class GameListLandscapeView: BaseView {
//只展示有游戏的厂商
let manufacturers = Theme.defalut.manufacturerOrder.filter { manufacturer in
games.contains { game in
- let type = Self.effectiveGameType(of: game)
+ let type = game.effectiveGameType
return Self.isPlatformVisible(type) && Self.manufacturerAllows(type, manufacturer: manufacturer)
}
}
@@ -1152,7 +1140,7 @@ extension GameListLandscapeView: UICollectionViewDataSource {
}
private func cardSize(for game: Game) -> CGSize {
- sizedCard(ratio: R.Size.GameCoverRatio(gameType: Self.effectiveGameType(of: game)))
+ sizedCard(ratio: R.Size.GameCoverRatio(gameType: game.effectiveGameType))
}
private var showsEmptyCard: Bool { displayGames.isEmpty }
diff --git a/ManicEmu/ManicEmu/Sources/Business/Games/Views/GameListView.swift b/ManicEmu/ManicEmu/Sources/Business/Games/Views/GameListView.swift
index 5225b895..a67f85d1 100644
--- a/ManicEmu/ManicEmu/Sources/Business/Games/Views/GameListView.swift
+++ b/ManicEmu/ManicEmu/Sources/Business/Games/Views/GameListView.swift
@@ -431,6 +431,30 @@ class GameListView: BaseView {
normalDatas[.win98] = win98Games.count > 0 ? win98Games : nil
}
+ //PCE games can switch categories
+ if let pceGames = normalDatas[.pce], pceGames.count > 0 {
+ var newPceGames = [Game]()
+ var turbografx16Games = [Game]()
+ var turbografxCdGames = [Game]()
+ var supergrafxGames = [Game]()
+ for pce in pceGames {
+ let pceGameType = pce.getExtraInt(key: ExtraKey.gameTypeCategory.rawValue) ?? 0
+ if pceGameType == 0 {
+ newPceGames.append(pce)
+ } else if pceGameType == 1 {
+ turbografx16Games.append(pce)
+ } else if pceGameType == 2 {
+ turbografxCdGames.append(pce)
+ } else if pceGameType == 3 {
+ supergrafxGames.append(pce)
+ }
+ }
+ normalDatas[.pce] = newPceGames.count > 0 ? newPceGames : nil
+ normalDatas[.turbografx_16] = turbografx16Games.count > 0 ? turbografx16Games : nil
+ normalDatas[.turbografx_cd] = turbografxCdGames.count > 0 ? turbografxCdGames : nil
+ normalDatas[.supergrafx] = supergrafxGames.count > 0 ? supergrafxGames : nil
+ }
+
//hide platform
let allGameTypes = normalDatas.keys
for gameType in allGameTypes {
@@ -440,6 +464,8 @@ class GameListView: BaseView {
platform = GameType.gb.localizedShortName
} else if gameType == .win95 || gameType == .win98 {
platform = GameType.dos.localizedShortName
+ } else if gameType == .turbografx_16 || gameType == .turbografx_cd || gameType == .supergrafx {
+ platform = GameType.pce.localizedShortName
}
visible = Settings.defalut.getPlatformVisible(platform: platform)
if !visible {
@@ -695,6 +721,21 @@ class GameListView: BaseView {
return true
}
+ if gameType == .turbografx_16,
+ games.where({ $0.gameType == .pce }).filter({ ($0.getExtraInt(key: ExtraKey.gameTypeCategory.rawValue) ?? 0) == 1 }).count > 0 {
+ return true
+ }
+
+ if gameType == .turbografx_cd,
+ games.where({ $0.gameType == .pce }).filter({ ($0.getExtraInt(key: ExtraKey.gameTypeCategory.rawValue) ?? 0) == 2 }).count > 0 {
+ return true
+ }
+
+ if gameType == .supergrafx,
+ games.where({ $0.gameType == .pce }).filter({ ($0.getExtraInt(key: ExtraKey.gameTypeCategory.rawValue) ?? 0) == 3 }).count > 0 {
+ return true
+ }
+
if games.count(where: { $0.gameType == gameType }) > 0 {
return true
}
@@ -738,6 +779,9 @@ extension GameListView: UICollectionViewDataSource {
predefinedOrder.insert(.chm, at: predefinedOrder.firstIndex(of: .gb)!)
predefinedOrder.insert(.win95, at: predefinedOrder.firstIndex(of: .dos)!)
predefinedOrder.insert(.win98, at: predefinedOrder.firstIndex(of: .win95)!)
+ predefinedOrder.insert(.turbografx_16, at: predefinedOrder.firstIndex(of: .pce)!)
+ predefinedOrder.insert(.turbografx_cd, at: predefinedOrder.firstIndex(of: .turbografx_16)!)
+ predefinedOrder.insert(.supergrafx, at: predefinedOrder.firstIndex(of: .turbografx_cd)!)
let sortedKeys: [GameType] = predefinedOrder.filter { (isSearchMode ? searchDatas : normalDatas).keys.contains($0) }
return sortedKeys
}
@@ -818,6 +862,14 @@ extension GameListView: UICollectionViewDataSource {
} else if gameTypeCategory == 2 {
coverGameType = .win98
}
+ } else if game.gameType == .pce {
+ if gameTypeCategory == 1 {
+ coverGameType = .turbografx_16
+ } else if gameTypeCategory == 2 {
+ coverGameType = .turbografx_cd
+ } else if gameTypeCategory == 3 {
+ coverGameType = .supergrafx
+ }
}
}
}
diff --git a/ManicEmu/ManicEmu/Sources/Business/Play/Models/Game.swift b/ManicEmu/ManicEmu/Sources/Business/Play/Models/Game.swift
index 5aa38c0b..3c369ec2 100644
--- a/ManicEmu/ManicEmu/Sources/Business/Play/Models/Game.swift
+++ b/ManicEmu/ManicEmu/Sources/Business/Play/Models/Game.swift
@@ -235,6 +235,8 @@ class Game: Object, ObjectUpdatable {
}
} else if gameType == .lynx {
return URL(fileURLWithPath: R.Path.Holani.appendingPathComponent("\(name).srm"))
+ } else if gameType == .pce {
+ return URL(fileURLWithPath: R.Path.BeetlePCE.appendingPathComponent("\(name).srm"))
} else if gameType == .j2me {
return URL(fileURLWithPath: R.Path.Data.appendingPathComponent("\(name).\(defaultCore == 0 ? EmulationCore.J2meJS.name : EmulationCore.freej2me.name).\(gameType.manicEmuCore?.gameSaveFileExtension ?? "")"))
} else if gameType == .dos {
@@ -462,6 +464,8 @@ class Game: Object, ObjectUpdatable {
return .VirtualJaguar
} else if gameType == .lynx {
return .Holani
+ } else if gameType == .pce {
+ return .BeetlePCE
} else if gameType == .dos {
return .DOSBoxPure
} else if gameType == .symbian {
@@ -567,6 +571,8 @@ class Game: Object, ObjectUpdatable {
return Bundle.main.path(forResource: "virtualjaguar.libretro", ofType: "framework", inDirectory: "Frameworks")
} else if gameType == .lynx {
return Bundle.main.path(forResource: "holani.libretro", ofType: "framework", inDirectory: "Frameworks")
+ } else if gameType == .pce {
+ return Bundle.main.path(forResource: "mednafen.pce.libretro", ofType: "framework", inDirectory: "Frameworks")
} else if gameType == .dos {
return Bundle.main.path(forResource: "dosbox.pure.libretro", ofType: "framework", inDirectory: "Frameworks")
} else if gameType == .symbian {
@@ -1010,7 +1016,7 @@ class Game: Object, ObjectUpdatable {
}
var supportChangeCategory: Bool {
- if gameType == .gb || gameType == .dos {
+ if gameType == .gb || gameType == .dos || gameType == .pce {
return true
}
return false
@@ -1021,21 +1027,51 @@ class Game: Object, ObjectUpdatable {
return [.gb, .chm]
} else if gameType == .dos {
return [.dos, .win95, .win98]
+ } else if gameType == .pce {
+ return [.pce, .turbografx_16, .turbografx_cd, .supergrafx]
}
return []
}
func updateCategory(gameType: GameType) {
guard supportChangeCategory else { return }
- if gameType == .gb || gameType == .dos {
+ if gameType == .gb || gameType == .dos || gameType == .pce {
updateExtra(key: ExtraKey.gameTypeCategory.rawValue, value: 0)
- } else if gameType == .chm || gameType == .win95 {
+ } else if gameType == .chm || gameType == .win95 || gameType == .turbografx_16 {
updateExtra(key: ExtraKey.gameTypeCategory.rawValue, value: 1)
- } else if gameType == .win98 {
+ } else if gameType == .win98 || gameType == .turbografx_cd {
updateExtra(key: ExtraKey.gameTypeCategory.rawValue, value: 2)
+ } else if gameType == .supergrafx {
+ updateExtra(key: ExtraKey.gameTypeCategory.rawValue, value: 3)
}
}
+ func matchCover(force: Bool = false,
+ useVirtualGameTypeIfNeed: Bool = true) {
+ if gameCover == nil && onlineCoverUrl == nil {
+ if force || !hasCoverMatch {
+ OnlineCoverManager.shared.addCoverMatch(OnlineCoverManager.CoverMatch(gameType: effectiveGameType,
+ gameID: id,
+ gameName: name,
+ fileExtension: fileExtension))
+ }
+ }
+ }
+
+ var virtualGameType: GameType? {
+ if supportedCategories.count > 0,
+ let category = getExtraInt(key: ExtraKey.gameTypeCategory.rawValue),
+ category < supportedCategories.count {
+ return supportedCategories[category]
+ }
+ return nil
+ }
+
+ ///GB/DOS/PCE support category switching onto virtual GameTypes
+ var effectiveGameType: GameType {
+ virtualGameType ?? gameType
+ }
+
func changeDefaultCore(coreIndex: Int) {
if defaultCore != coreIndex {
let oldSaveUrl = gameSaveUrl
@@ -1064,7 +1100,8 @@ class Game: Object, ObjectUpdatable {
gameType == .j2me ||
gameType == .dos ||
gameType == .symbian ||
- isClownMDEmuCore {
+ isClownMDEmuCore,
+ gameType == .pce {
return false
}
return true
diff --git a/ManicEmu/ManicEmu/Sources/Business/Play/VIewControllers/PlayViewController.swift b/ManicEmu/ManicEmu/Sources/Business/Play/VIewControllers/PlayViewController.swift
index e88c426e..4b3b4492 100644
--- a/ManicEmu/ManicEmu/Sources/Business/Play/VIewControllers/PlayViewController.swift
+++ b/ManicEmu/ManicEmu/Sources/Business/Play/VIewControllers/PlayViewController.swift
@@ -716,6 +716,8 @@ class PlayViewController: GameViewController {
make.top.equalTo(gameView.snp.bottom).offset(4)
} else if manicGame.isDolphinCore {
make.top.equalTo(gameView.snp.bottom).offset(5)
+ } else if manicGame.gameType == .pce {
+ make.top.equalTo(gameView.snp.bottom).offset(R.Size.ContentSpaceMedium)
} else {
make.top.equalTo(gameView.snp.bottom)
}
@@ -727,7 +729,8 @@ class PlayViewController: GameViewController {
if manicGame.gameType == .j2me ||
manicGame.gameType == .dos ||
manicGame.gameType == .doom ||
- (manicGame.gameType == .symbian && UIDevice.isPhone) {
+ (manicGame.gameType == .symbian && UIDevice.isPhone) ||
+ manicGame.gameType == .pce {
make.height.equalTo(R.Size.ItemHeightMicro)
} else {
make.height.equalTo(R.Size.ItemHeightMedium)
@@ -2456,6 +2459,8 @@ extension PlayViewController {
iconColor = R.Color.LabelTertiary.forceStyle(.dark)
} else if manicGame.isDolphinCore {
iconColor = UIColor.black.withAlphaComponent(0.25)
+ } else if manicGame.gameType == .pce {
+ iconColor = UIColor(hexString: "#8F8F92")!
}
let buttonContainerView = UIView()
let button = ASButtonView(.iconOnlyWithSmallSize(icon: shortcut.icon.updateColorsIfNeed(colors: [iconColor], forceUpdate: true),
diff --git a/ManicEmu/ManicEmu/Sources/Business/Settings/Models/Settings.swift b/ManicEmu/ManicEmu/Sources/Business/Settings/Models/Settings.swift
index a8b1411d..cd87bbbf 100644
--- a/ManicEmu/ManicEmu/Sources/Business/Settings/Models/Settings.swift
+++ b/ManicEmu/ManicEmu/Sources/Business/Settings/Models/Settings.swift
@@ -139,6 +139,10 @@ class Settings: Object, ObjectUpdatable {
realPlatform = GameType.gb.localizedName
} else if GameType.win95.localizedShortName == platform || GameType.win98.localizedShortName == platform {
realPlatform = GameType.dos.localizedName
+ } else if GameType.turbografx_16.localizedShortName == platform ||
+ GameType.turbografx_cd.localizedShortName == platform ||
+ GameType.supergrafx.localizedShortName == platform {
+ realPlatform = GameType.pce.localizedName
}
return getExtraBool(key: realPlatform + "Visible") ?? true
}
diff --git a/ManicEmu/ManicEmu/Sources/Business/Settings/Views/BIOSCollectionViewCell.swift b/ManicEmu/ManicEmu/Sources/Business/Settings/Views/BIOSCollectionViewCell.swift
index 49d5668b..c04731c7 100644
--- a/ManicEmu/ManicEmu/Sources/Business/Settings/Views/BIOSCollectionViewCell.swift
+++ b/ManicEmu/ManicEmu/Sources/Business/Settings/Views/BIOSCollectionViewCell.swift
@@ -143,6 +143,8 @@ class BIOSCollectionViewCell: UICollectionViewCell {
biosItems = R.BIOS.A7800Bios
} else if gameType == .lynx {
biosItems = R.BIOS.LynxBios
+ } else if gameType == .pce {
+ biosItems = R.BIOS.PCEBios
}
let fileManager = FileManager.default
for (index, bios) in biosItems.enumerated() {
@@ -412,6 +414,8 @@ class BIOSCollectionViewCell: UICollectionViewCell {
itemCount = R.BIOS.A7800Bios.count
} else if gameType == .lynx {
itemCount = R.BIOS.LynxBios.count
+ } else if gameType == .pce {
+ itemCount = R.BIOS.PCEBios.count
}
return (Double(itemCount) * R.Size.ItemHeightLarge) + (Double(itemCount + 1) * R.Size.ContentSpaceMedium)
}
diff --git a/ManicEmu/ManicEmu/Sources/Business/Settings/Views/BIOSSelectionView.swift b/ManicEmu/ManicEmu/Sources/Business/Settings/Views/BIOSSelectionView.swift
index 32a67f67..62c5ed15 100644
--- a/ManicEmu/ManicEmu/Sources/Business/Settings/Views/BIOSSelectionView.swift
+++ b/ManicEmu/ManicEmu/Sources/Business/Settings/Views/BIOSSelectionView.swift
@@ -15,7 +15,7 @@ import ZipArchive
class BIOSSelectionView: BaseView {
private enum SectionIndex: Int, CaseIterable {
- case ngc, symbian, lynx, a7800, a5200, arcade, mcd, ss, ds, ps1, dc, gb, gbc, gba, fds, pm, _3ds
+ case pce, ngc, symbian, lynx, a7800, a5200, arcade, mcd, ss, ds, ps1, dc, gb, gbc, gba, fds, pm, _3ds
var title: String {
switch self {
case .arcade: GameType.arcade.localizedName
@@ -35,6 +35,7 @@ class BIOSSelectionView: BaseView {
case .a5200: GameType.a5200.localizedName
case .symbian: GameType.symbian.localizedName
case .ngc: GameType.ngc.localizedName
+ case .pce: GameType.pce.localizedName
}
}
@@ -57,6 +58,7 @@ class BIOSSelectionView: BaseView {
case .lynx: return .lynx
case .symbian: return .symbian
case .ngc: return .ngc
+ case .pce: return .pce
}
}
}
diff --git a/ManicEmu/ManicEmu/Sources/Tools/Cores/PCE.swift b/ManicEmu/ManicEmu/Sources/Tools/Cores/PCE.swift
new file mode 100644
index 00000000..6eca6f09
--- /dev/null
+++ b/ManicEmu/ManicEmu/Sources/Tools/Cores/PCE.swift
@@ -0,0 +1,178 @@
+//
+// PCE.swift
+// ManicEmu
+//
+// Created by Daiuno on 2026/8/21.
+// Copyright © 2026 Manic EMU. All rights reserved.
+//
+// SPDX-License-Identifier: AGPL-3.0-or-later
+
+
+import AVFoundation
+
+extension GameType {
+ static let pce = GameType("public.aoshuang.game.pce")
+ static let turbografx_16 = GameType("public.aoshuang.game.turbografx_16")
+ static let turbografx_cd = GameType("public.aoshuang.game.turbografx_cd")
+ static let supergrafx = GameType("public.aoshuang.game.supergrafx")
+}
+
+@objc enum PCEGameInput: 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(.pce)
+ }
+
+ 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 PCE: DeltaCoreProtocol {
+ static let core = PCE()
+
+ var name: String { "PCE" }
+ var identifier: String { "com.aoshuang.PCECore" }
+
+ var gameType: GameType { GameType.pce }
+ var gameInputType: Input.Type { PCEGameInput.self }
+ var allInputs: [Input] { PCEGameInput.allCases }
+ var gameSaveFileExtension: String { "srm" }
+
+ let videoFormat = VideoFormat(format: .bitmap(.rgb565), dimensions: CGSize(width: 256, height: 224))
+
+ var supportedCheatFormats: Set<CheatFormat> {
+ return []
+ }
+
+ var emulatorBridge: EmulatorBridging { PCEEmulatorBridge.shared }
+
+ private init() {}
+}
+
+
+class PCEEmulatorBridge : EmulatorBridgeBase {
+ static let shared = PCEEmulatorBridge()
+
+ private var leftThumbstickPosition: CGPoint = .zero
+ private var rightThumbstickPosition: CGPoint = .zero
+
+ private var thumbstickPosition: CGPoint = .zero
+
+ override func activateInput(_ input: Int, value: Double, playerIndex: Int) {
+ guard playerIndex >= 0 else { return }
+ if input == PCEGameInput.leftThumbstickUp || input == PCEGameInput.leftThumbstickDown {
+ leftThumbstickPosition.y = input == PCEGameInput.leftThumbstickUp ? value : -value
+ LibretroCore.sharedInstance().moveStick(true, x: leftThumbstickPosition.x, y: leftThumbstickPosition.y, playerIndex: UInt32(playerIndex))
+ } else if input == PCEGameInput.leftThumbstickLeft || input == PCEGameInput.leftThumbstickRight {
+ leftThumbstickPosition.x = input == PCEGameInput.leftThumbstickRight ? value : -value
+ LibretroCore.sharedInstance().moveStick(true, x: leftThumbstickPosition.x, y: leftThumbstickPosition.y, playerIndex: UInt32(playerIndex))
+ } else if input == PCEGameInput.rightThumbstickUp || input == PCEGameInput.rightThumbstickDown {
+ rightThumbstickPosition.y = input == PCEGameInput.rightThumbstickUp ? value : -value
+ LibretroCore.sharedInstance().moveStick(false, x: rightThumbstickPosition.x, y: rightThumbstickPosition.y, playerIndex: UInt32(playerIndex))
+ } else if input == PCEGameInput.rightThumbstickLeft || input == PCEGameInput.rightThumbstickRight {
+ rightThumbstickPosition.x = input == PCEGameInput.rightThumbstickRight ? value : -value
+ LibretroCore.sharedInstance().moveStick(false, x: rightThumbstickPosition.x, y: rightThumbstickPosition.y, playerIndex: UInt32(playerIndex))
+ } else {
+ if let gameInput = PCEGameInput(rawValue: input),
+ let libretroButton = gameInputToCoreInput(gameInput: gameInput) {
+#if DEBUG
+Log.debug("🎮 \(objectInfo(self)) 点击了:\(gameInput)")
+#endif
+ LibretroCore.sharedInstance().press(libretroButton, playerIndex: UInt32(playerIndex))
+ }
+ }
+ }
+
+ func gameInputToCoreInput(gameInput: PCEGameInput) -> 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 == PCEGameInput.leftThumbstickUp || input == PCEGameInput.leftThumbstickDown {
+ leftThumbstickPosition.y = 0
+ LibretroCore.sharedInstance().moveStick(true, x: leftThumbstickPosition.x, y: leftThumbstickPosition.y, playerIndex: UInt32(playerIndex))
+ } else if input == PCEGameInput.leftThumbstickLeft || input == PCEGameInput.leftThumbstickRight {
+ leftThumbstickPosition.x = 0
+ LibretroCore.sharedInstance().moveStick(true, x: leftThumbstickPosition.x, y: leftThumbstickPosition.y, playerIndex: UInt32(playerIndex))
+ } else if input == PCEGameInput.rightThumbstickUp || input == PCEGameInput.rightThumbstickDown {
+ rightThumbstickPosition.y = 0
+ LibretroCore.sharedInstance().moveStick(false, x: rightThumbstickPosition.x, y: rightThumbstickPosition.y, playerIndex: UInt32(playerIndex))
+ } else if input == PCEGameInput.rightThumbstickLeft || input == PCEGameInput.rightThumbstickRight {
+ rightThumbstickPosition.x = 0
+ LibretroCore.sharedInstance().moveStick(false, x: rightThumbstickPosition.x, y: rightThumbstickPosition.y, playerIndex: UInt32(playerIndex))
+ } else {
+ if let gameInput = PCEGameInput(rawValue: input),
+ let libretroButton = gameInputToCoreInput(gameInput: gameInput) {
+ LibretroCore.sharedInstance().release(libretroButton, playerIndex: UInt32(playerIndex))
+ }
+ }
+ }
+}
diff --git a/ManicEmu/ManicEmu/Sources/Tools/Extensions/GameTypeExtensions.swift b/ManicEmu/ManicEmu/Sources/Tools/Extensions/GameTypeExtensions.swift
index 48332093..570a2812 100644
--- a/ManicEmu/ManicEmu/Sources/Tools/Extensions/GameTypeExtensions.swift
+++ b/ManicEmu/ManicEmu/Sources/Tools/Extensions/GameTypeExtensions.swift
@@ -19,19 +19,19 @@ extension GameType {
guard multiPlatformFileExtensions.contains(ext) else { return [] }
switch ext {
case "chd":
- return [.ps1, .psp, .mcd, .ss, .dc]
+ return [.ps1, .psp, .mcd, .ss, .dc, .pce]
case "iso":
return [.psp, .mcd, .ss, .dos, .ngc, .wii]
case "bin":
return [.md, .gg, .ms, ._32x, .dc, .a2600, .a5200, .a7800, .jaguar]
case "cue":
- return [.ps1, .mcd, .ss, .dc, .dos]
+ return [.ps1, .mcd, .ss, .dc, .dos, .pce]
case "m3u":
- return [ ps1, .mcd, .ss, .dc, .dos]
+ return [.ps1, .mcd, .ss, .dc, .dos, .pce]
case "pbp":
return [.ps1, .psp]
case "ccd":
- return [.ps1, .ss]
+ return [.ps1, .ss, .pce]
case "zip":
return [.arcade, .dos]
case "elf":
@@ -118,6 +118,8 @@ extension GameType {
self = .ngc
} else if ["wbfs", "ciso", "wia"].contains(ext) {
self = .wii
+ } else if ["pce", "sgx", "toc"].contains(ext) {
+ self = .pce
} else {
self = .notSupport
}
@@ -206,6 +208,8 @@ extension GameType {
self = .ngc
} else if shortName.uppercased() == "Wii".uppercased() {
self = .wii
+ } else if shortName.uppercased() == "PCE" {
+ self = .pce
} else {
return nil
}
@@ -253,6 +257,10 @@ extension GameType {
case .symbian: return "Symbian OS"
case .ngc: return "Nintendo GameCube"
case .wii: return "Nintendo Wii"
+ case .pce: return "PC Engine"
+ case .turbografx_16: return "TurboGrafx-16"
+ case .turbografx_cd: return "TurboGrafx-CD"
+ case .supergrafx: return "SuperGrafx"
default: return ""
}
}
@@ -299,6 +307,10 @@ extension GameType {
case .symbian: return NSLocalizedString("Symbian", comment: "")
case .ngc: return NSLocalizedString("NGC", comment: "")
case .wii: return NSLocalizedString("Wii", comment: "")
+ case .pce: return NSLocalizedString("PCE", comment: "")
+ case .turbografx_16: return NSLocalizedString("TG-16", comment: "")
+ case .turbografx_cd: return NSLocalizedString("TG-CD", comment: "")
+ case .supergrafx: return NSLocalizedString("SGX", comment: "")
case .unknown: return R.string.localizable.unknownPlatform()
default: return ""
}
@@ -346,6 +358,10 @@ extension GameType {
case .symbian: return 2003
case .ngc: return 2001
case .wii: return 2006
+ case .pce: return 1987
+ case .turbografx_16: return 1989
+ case .turbografx_cd: return 1989
+ case .supergrafx: return 1989
default: return 0
}
}
@@ -386,6 +402,7 @@ extension GameType {
case .symbian: return Symbian.core
case .ngc: return NGC.core
case .wii: return Wii.core
+ case .pce: return PCE.core
default: return nil
}
}
@@ -457,6 +474,9 @@ extension GameType {
case .j2me: return nil
case .dos: return nil
case .symbian: return nil
+ case .pce, .turbografx_16: return "pce"
+ case .turbografx_cd: return "pcd"
+ case .supergrafx: return "pce"
default: return localizedShortName.lowercased()
}
}
@@ -579,6 +599,8 @@ extension GameType {
return .modRetro
case .symbian:
return .nokia
+ case .pce, .turbografx_16, .turbografx_cd, .supergrafx:
+ return .nec
default:
return .nintendo
}
@@ -704,6 +726,14 @@ extension GameType {
image = R.image.ngc_group_brand()
} else if self == .wii {
image = R.image.wii_group_brand()
+ } else if self == .pce {
+ image = R.image.pce_group_brand()
+ } else if self == .turbografx_16 {
+ image = R.image.turbografx_16_group_brand()
+ } else if self == .turbografx_cd {
+ image = R.image.turbografx_cd_group_brand()
+ } else if self == .supergrafx {
+ image = R.image.supergrafx_group_brand()
}
Self.brandImageCaches[key] = image
return image
@@ -758,6 +788,8 @@ extension GameType {
return R.BIOS.A7800Bios
} else if self == .lynx {
return R.BIOS.LynxBios
+ } else if self == .pce {
+ return R.BIOS.PCEBios
} else if self == .symbian {
return [BIOSItem(fileName: R.string.localizable.symbianOSFirmware(),
imported: false,
diff --git a/ManicEmu/ManicEmu/Sources/Tools/FocusKit/FocusKeyObserver.swift b/ManicEmu/ManicEmu/Sources/Tools/FocusKit/FocusKeyObserver.swift
index ac1aa866..797b7ea6 100644
--- a/ManicEmu/ManicEmu/Sources/Tools/FocusKit/FocusKeyObserver.swift
+++ b/ManicEmu/ManicEmu/Sources/Tools/FocusKit/FocusKeyObserver.swift
@@ -45,7 +45,7 @@ class FocusKeyObserver {
if let userInfo = notification.userInfo,
let input = userInfo["input"] as? any Input {
-
+ guard input.type != .controller(.controllerSkin) else { return }
if input.type == .controller(.keyboard) {
if FocusSystem.shared.isEditingText {
// Letters stay with the field; Escape still ends editing.
@@ -67,7 +67,7 @@ class FocusKeyObserver {
if let userInfo = notification.userInfo,
let input = userInfo["input"] as? any Input {
-
+ guard input.type != .controller(.controllerSkin) else { return }
if input.type == .controller(.keyboard) {
Self.handleKeyboard(input.stringValue, isPressed: false)
return
diff --git a/ManicEmu/ManicEmu/Sources/Tools/Others/Database.swift b/ManicEmu/ManicEmu/Sources/Tools/Others/Database.swift
index 689202d9..9cd65fb1 100644
--- a/ManicEmu/ManicEmu/Sources/Tools/Others/Database.swift
+++ b/ManicEmu/ManicEmu/Sources/Tools/Others/Database.swift
@@ -97,7 +97,12 @@ struct Database {
}
//检查是否有游戏的封面还没有匹配
- let games = realm.objects(Game.self).where { !$0.isDeleted && $0.gameCover == nil && !$0.hasCoverMatch }
+ let games = realm.objects(Game.self).where {
+ !$0.isDeleted &&
+ $0.gameCover == nil &&
+ $0.onlineCoverUrl == nil &&
+ !$0.hasCoverMatch
+ }
games.forEach { game in
OnlineCoverManager.shared.addCoverMatch(OnlineCoverManager.CoverMatch(game: game))
}
diff --git a/ManicEmu/ManicEmu/Sources/Tools/Others/EmulationCore.swift b/ManicEmu/ManicEmu/Sources/Tools/Others/EmulationCore.swift
index 9587118f..c4ff9b16 100644
--- a/ManicEmu/ManicEmu/Sources/Tools/Others/EmulationCore.swift
+++ b/ManicEmu/ManicEmu/Sources/Tools/Others/EmulationCore.swift
@@ -44,7 +44,8 @@ enum EmulationCore: CaseIterable {
DOSBoxPure,
PCSXReArmed,
EKA2L1,
- Dolphin
+ Dolphin,
+ BeetlePCE
var name: String {
switch self {
@@ -122,6 +123,8 @@ enum EmulationCore: CaseIterable {
"EKA2L1"
case .Dolphin:
"dolphin-emu"
+ case .BeetlePCE:
+ "Beetle PCE"
}
}
@@ -193,6 +196,8 @@ enum EmulationCore: CaseIterable {
return [.symbian]
case .Dolphin:
return [.ngc, .wii]
+ case .BeetlePCE:
+ return [.pce]
}
}
@@ -241,7 +246,8 @@ enum EmulationCore: CaseIterable {
.melonDSDS,
.DeSmuME,
.Holani,
- .VirtualJaguar:
+ .VirtualJaguar,
+ .BeetlePCE:
return true
default:
return false
diff --git a/ManicEmu/ManicEmu/Sources/Tools/Others/OnlineCoverManager.swift b/ManicEmu/ManicEmu/Sources/Tools/Others/OnlineCoverManager.swift
index bd541db6..af463caf 100644
--- a/ManicEmu/ManicEmu/Sources/Tools/Others/OnlineCoverManager.swift
+++ b/ManicEmu/ManicEmu/Sources/Tools/Others/OnlineCoverManager.swift
@@ -20,7 +20,7 @@ class OnlineCoverManager {
var fileExtension: String
init(game: Game) {
- self.gameType = game.gameType
+ self.gameType = game.effectiveGameType
self.gameID = game.id
self.gameName = game.translatedName ?? game.displayName
self.fileExtension = game.fileExtension
@@ -81,7 +81,7 @@ class OnlineCoverManager {
boxArtUrl = host.appendingPathComponent("Nintendo - Game Boy Advance/Named_Boxarts")
case .gbc:
boxArtUrl = host.appendingPathComponent("Nintendo - Game Boy Color/Named_Boxarts")
- case .gb:
+ case .gb, .chm:
boxArtUrl = host.appendingPathComponent("Nintendo - Game Boy/Named_Boxarts")
case .nes:
boxArtUrl = host.appendingPathComponent("Nintendo - Nintendo Entertainment System/Named_Boxarts")
@@ -137,7 +137,7 @@ class OnlineCoverManager {
return
case .doom:
boxArtUrl = host.appendingPathComponent("DOOM/Named_Boxarts")
- case .dos:
+ case .dos, .win95, .win98:
boxArtUrl = host.appendingPathComponent("DOS/Named_Boxarts")
case .xbox:
boxArtUrl = host.appendingPathComponent("Microsoft - Xbox/Named_Boxarts")
@@ -145,6 +145,12 @@ class OnlineCoverManager {
boxArtUrl = host.appendingPathComponent("Nintendo - GameCube/Named_Boxarts")
case .wii:
boxArtUrl = host.appendingPathComponent("Nintendo - Wii/Named_Boxarts")
+ case .pce, .turbografx_16:
+ boxArtUrl = host.appendingPathComponent("NEC - PC Engine - TurboGrafx 16/Named_Boxarts")
+ case .turbografx_cd:
+ boxArtUrl = host.appendingPathComponent("NEC - PC Engine CD - TurboGrafx-CD/Named_Boxarts")
+ case .supergrafx:
+ boxArtUrl = host.appendingPathComponent("NEC - PC Engine SuperGrafx/Named_Boxarts")
default:
boxArtUrl = nil
}
diff --git a/ManicEmu/ManicEmu/Sources/Tools/Others/System.swift b/ManicEmu/ManicEmu/Sources/Tools/Others/System.swift
index 6e9913c2..91a8fbff 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 pce
case ngc
case wii
case symbian
@@ -86,7 +87,8 @@ enum System: CaseIterable
DOS.core,
Symbian.core,
NGC.core,
- Wii.core]
+ Wii.core,
+ PCE.core]
}
///Returns all supported game types.
@@ -151,6 +153,7 @@ extension System {
case .symbian: return .symbian
case .ngc: return .ngc
case .wii: return .wii
+ case .pce: return .pce
}
}
}
diff --git a/System.core/PCE.keymapping b/System.core/PCE.keymapping
new file mode 100644
index 00000000..afe787d0
--- /dev/null
+++ b/System.core/PCE.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.pce</string>
+ </dict>
+ <key>b</key>
+ <dict>
+ <key>identifier</key>
+ <string>b</string>
+ <key>type</key>
+ <string>public.aoshuang.game.pce</string>
+ </dict>
+ <key>x</key>
+ <dict>
+ <key>identifier</key>
+ <string>x</string>
+ <key>type</key>
+ <string>public.aoshuang.game.pce</string>
+ </dict>
+ <key>y</key>
+ <dict>
+ <key>identifier</key>
+ <string>y</string>
+ <key>type</key>
+ <string>public.aoshuang.game.pce</string>
+ </dict>
+ <key>up</key>
+ <dict>
+ <key>identifier</key>
+ <string>up</string>
+ <key>type</key>
+ <string>public.aoshuang.game.pce</string>
+ </dict>
+ <key>down</key>
+ <dict>
+ <key>identifier</key>
+ <string>down</string>
+ <key>type</key>
+ <string>public.aoshuang.game.pce</string>
+ </dict>
+ <key>left</key>
+ <dict>
+ <key>identifier</key>
+ <string>left</string>
+ <key>type</key>
+ <string>public.aoshuang.game.pce</string>
+ </dict>
+ <key>right</key>
+ <dict>
+ <key>identifier</key>
+ <string>right</string>
+ <key>type</key>
+ <string>public.aoshuang.game.pce</string>
+ </dict>
+ <key>leftThumbstickUp</key>
+ <dict>
+ <key>identifier</key>
+ <string>leftThumbstickUp</string>
+ <key>type</key>
+ <string>public.aoshuang.game.pce</string>
+ </dict>
+ <key>leftThumbstickDown</key>
+ <dict>
+ <key>identifier</key>
+ <string>leftThumbstickDown</string>
+ <key>type</key>
+ <string>public.aoshuang.game.pce</string>
+ </dict>
+ <key>leftThumbstickLeft</key>
+ <dict>
+ <key>identifier</key>
+ <string>leftThumbstickLeft</string>
+ <key>type</key>
+ <string>public.aoshuang.game.pce</string>
+ </dict>
+ <key>leftThumbstickRight</key>
+ <dict>
+ <key>identifier</key>
+ <string>leftThumbstickRight</string>
+ <key>type</key>
+ <string>public.aoshuang.game.pce</string>
+ </dict>
+ <key>rightThumbstickUp</key>
+ <dict>
+ <key>identifier</key>
+ <string>rightThumbstickUp</string>
+ <key>type</key>
+ <string>public.aoshuang.game.pce</string>
+ </dict>
+ <key>rightThumbstickDown</key>
+ <dict>
+ <key>identifier</key>
+ <string>rightThumbstickDown</string>
+ <key>type</key>
+ <string>public.aoshuang.game.pce</string>
+ </dict>
+ <key>rightThumbstickLeft</key>
+ <dict>
+ <key>identifier</key>
+ <string>rightThumbstickLeft</string>
+ <key>type</key>
+ <string>public.aoshuang.game.pce</string>
+ </dict>
+ <key>rightThumbstickRight</key>
+ <dict>
+ <key>identifier</key>
+ <string>rightThumbstickRight</string>
+ <key>type</key>
+ <string>public.aoshuang.game.pce</string>
+ </dict>
+ <key>select</key>
+ <dict>
+ <key>identifier</key>
+ <string>select</string>
+ <key>type</key>
+ <string>public.aoshuang.game.pce</string>
+ </dict>
+ <key>start</key>
+ <dict>
+ <key>identifier</key>
+ <string>start</string>
+ <key>type</key>
+ <string>public.aoshuang.game.pce</string>
+ </dict>
+ <key>l1</key>
+ <dict>
+ <key>identifier</key>
+ <string>l1</string>
+ <key>type</key>
+ <string>public.aoshuang.game.pce</string>
+ </dict>
+ <key>r1</key>
+ <dict>
+ <key>identifier</key>
+ <string>r1</string>
+ <key>type</key>
+ <string>public.aoshuang.game.pce</string>
+ </dict>
+ <key>l2</key>
+ <dict>
+ <key>identifier</key>
+ <string>l2</string>
+ <key>type</key>
+ <string>public.aoshuang.game.pce</string>
+ </dict>
+ <key>r2</key>
+ <dict>
+ <key>identifier</key>
+ <string>r2</string>
+ <key>type</key>
+ <string>public.aoshuang.game.pce</string>
+ </dict>
+ <key>l3</key>
+ <dict>
+ <key>identifier</key>
+ <string>l3</string>
+ <key>type</key>
+ <string>public.aoshuang.game.pce</string>
+ </dict>
+ <key>r3</key>
+ <dict>
+ <key>identifier</key>
+ <string>r3</string>
+ <key>type</key>
+ <string>public.aoshuang.game.pce</string>
+ </dict>
+ </dict>
+ <key>name</key>
+ <string>Default PCE</string>
+</dict>
+</plist>
diff --git a/System.core/PCE.manicskin b/System.core/PCE.manicskin
new file mode 100644
index 00000000..84583065
--- /dev/null
+++ b/System.core/PCE.manicskin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:e68f2232e3f4e95c95cfd19a2a7d249c1e9be17df13fc71494a5bb0178d2670f
+size 1309041
diff --git a/System.core/PCE_FLEX.manicskin b/System.core/PCE_FLEX.manicskin
new file mode 100644
index 00000000..f7538cbb
--- /dev/null
+++ b/System.core/PCE_FLEX.manicskin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:8c29d48bca97e8db6d034cfca1753aa5b8522b344b52e17640e1ab5ed59189b2
+size 174260