Skip to content

Commit

Permalink
DuckStation builds but no video. crashes
Browse files Browse the repository at this point in the history
Signed-off-by: Joseph Mattiello <[email protected]>
  • Loading branch information
JoeMatt committed Jan 6, 2025
1 parent ccff790 commit c2bd8cc
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 25 deletions.
17 changes: 16 additions & 1 deletion Cores/DuckStation/PVDuckStation.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,17 @@
B3C2924626DEFFD8003CB9D4 /* GLKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B3C2924526DEFFD8003CB9D4 /* GLKit.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
B3C2924C26DEFFE8003CB9D4 /* MetalKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B3C2924826DEFFE7003CB9D4 /* MetalKit.framework */; };
B3C2924E26DEFFE8003CB9D4 /* Metal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B3C2924A26DEFFE8003CB9D4 /* Metal.framework */; };
B3CB25CC2D24E97A00D5224E /* PVLogging in Frameworks */ = {isa = PBXBuildFile; productRef = B3CB25CB2D24E97A00D5224E /* PVLogging */; };
B3D0143A26E05F6500860FF9 /* OEOverrides.ini in Resources */ = {isa = PBXBuildFile; fileRef = B3D0143926E05F6500860FF9 /* OEOverrides.ini */; };
B3D8A52B26BE48CA0096A354 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = B3D8A52226BE48C90096A354 /* InfoPlist.strings */; };
B3D8A52D26BE48CA0096A354 /* Core.plist in Resources */ = {isa = PBXBuildFile; fileRef = B3D8A52426BE48C90096A354 /* Core.plist */; };
B3D8A52F26BE48CA0096A354 /* PVDuckStation.h in Headers */ = {isa = PBXBuildFile; fileRef = B3D8A52526BE48C90096A354 /* PVDuckStation.h */; };
B3D8A52F26BE48CA0096A354 /* PVDuckStation.h in Headers */ = {isa = PBXBuildFile; fileRef = B3D8A52526BE48C90096A354 /* PVDuckStation.h */; settings = {ATTRIBUTES = (Public, ); }; };
B3D8A53126BE48CA0096A354 /* DuckStation-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = B3D8A52626BE48C90096A354 /* DuckStation-Info.plist */; };
B3D8A53326BE48CA0096A354 /* PVDuckStationCoreBridge.h in Headers */ = {isa = PBXBuildFile; fileRef = B3D8A52826BE48C90096A354 /* PVDuckStationCoreBridge.h */; settings = {ATTRIBUTES = (Public, ); }; };
B3E2A9FD2CB619B100E2636D /* PVDuckStationOptions.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3E2A9FC2CB619B100E2636D /* PVDuckStationOptions.swift */; };
B3E2AA002CB61A5900E2636D /* CorePlist.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3E2A9FE2CB61A5900E2636D /* CorePlist.swift */; };
B3E2AA012CB61A5900E2636D /* CorePlist-Generated.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3E2A9FF2CB61A5900E2636D /* CorePlist-Generated.swift */; };
B3FA8AC82D24F08500505165 /* duck_resources in Resources */ = {isa = PBXBuildFile; fileRef = B3FA8AC72D24F08500505165 /* duck_resources */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
Expand Down Expand Up @@ -542,6 +544,7 @@
B3E2A9FC2CB619B100E2636D /* PVDuckStationOptions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PVDuckStationOptions.swift; sourceTree = "<group>"; };
B3E2A9FE2CB61A5900E2636D /* CorePlist.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CorePlist.swift; sourceTree = "<group>"; };
B3E2A9FF2CB61A5900E2636D /* CorePlist-Generated.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "CorePlist-Generated.swift"; sourceTree = "<group>"; };
B3FA8AC72D24F08500505165 /* duck_resources */ = {isa = PBXFileReference; lastKnownFileType = folder; name = duck_resources; path = duckstation/data/duck_resources; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand All @@ -555,6 +558,7 @@
B36DE7851D6AB44D002EE3ED /* Foundation.framework in Frameworks */,
B30E9B192C6FD0FE00C1431E /* PVCoreBridge in Frameworks */,
B30E9B162C6FD0F200C1431E /* PVEmulatorCore in Frameworks */,
B3CB25CC2D24E97A00D5224E /* PVLogging in Frameworks */,
B30A200A278FC9FF009E08C9 /* OpenGL.framework in Frameworks */,
B36DE7831D6AB43A002EE3ED /* libz.tbd in Frameworks */,
B37CDB1F2CAA1EB40026E901 /* PVPlists in Frameworks */,
Expand Down Expand Up @@ -606,6 +610,7 @@
02695356143169EA003A07D4 = {
isa = PBXGroup;
children = (
B3FA8AC72D24F08500505165 /* duck_resources */,
B3203C2226DB19CC00B016C6 /* Config.xcconfig */,
B373CD21296F9818005D110B /* duckstation.xcodeproj */,
B3D8A52126BE48C90096A354 /* PVDuckStation */,
Expand Down Expand Up @@ -942,6 +947,7 @@
B37CDB1D2CAA1EB40026E901 /* XCLocalSwiftPackageReference "../../PVPlists" */,
B37CDB202CAA1EEF0026E901 /* XCLocalSwiftPackageReference "../../PVCoreObjCBridge" */,
B37CDB232CAA1F2A0026E901 /* XCLocalSwiftPackageReference "../../PVSettings" */,
B3CB25CA2D24E97A00D5224E /* XCLocalSwiftPackageReference "../../PVLogging" */,
);
productRefGroup = 02695362143169EB003A07D4 /* Products */;
projectDirPath = "";
Expand Down Expand Up @@ -1151,6 +1157,7 @@
files = (
B3D0143A26E05F6500860FF9 /* OEOverrides.ini in Resources */,
B3D8A52B26BE48CA0096A354 /* InfoPlist.strings in Resources */,
B3FA8AC82D24F08500505165 /* duck_resources in Resources */,
B3D8A52D26BE48CA0096A354 /* Core.plist in Resources */,
B3D8A53126BE48CA0096A354 /* DuckStation-Info.plist in Resources */,
);
Expand Down Expand Up @@ -2176,6 +2183,10 @@
isa = XCLocalSwiftPackageReference;
relativePath = ../../PVSettings;
};
B3CB25CA2D24E97A00D5224E /* XCLocalSwiftPackageReference "../../PVLogging" */ = {
isa = XCLocalSwiftPackageReference;
relativePath = ../../PVLogging;
};
/* End XCLocalSwiftPackageReference section */

/* Begin XCSwiftPackageProductDependency section */
Expand Down Expand Up @@ -2203,6 +2214,10 @@
isa = XCSwiftPackageProductDependency;
productName = PVSettings;
};
B3CB25CB2D24E97A00D5224E /* PVLogging */ = {
isa = XCSwiftPackageProductDependency;
productName = PVLogging;
};
/* End XCSwiftPackageProductDependency section */
};
rootObject = 02695358143169EA003A07D4 /* Project object */;
Expand Down
2 changes: 1 addition & 1 deletion Cores/DuckStation/PVDuckStation/Core.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@
<key>PVProjectVersion</key>
<string>2023.01.11</string>
<key>PVDisabled</key>
<true/>
<false/>
</dict>
</plist>
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public enum CorePlist {
public static let pvProjectURL: String = "https://github.com/stenzek/duckstation/"
public static let pvProjectVersion: String = "2023.01.11"
public static let pvSupportedSystems: [String] = ["com.provenance.psx"]
public static let pvDisabled: Bool = true
public static let pvDisabled: Bool = false

#if canImport(PVCoreBridge)
public static var corePlist: EmulatorCoreInfoPlist {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -784,7 +784,7 @@ - (oneway void)didMovePSXJoystickDirection:(PVPSXButton)button withValue:(CGFloa
}

- (oneway void)didPushPSXButton:(PVPSXButton)button forPlayer:(NSUInteger)player {
player -= 1;
// player -= 1;

switch (g_settings.controller_types[player]) {
case ControllerType::DigitalController:
Expand Down Expand Up @@ -825,7 +825,7 @@ - (oneway void)didPushPSXButton:(PVPSXButton)button forPlayer:(NSUInteger)player
}

- (oneway void)didReleasePSXButton:(PVPSXButton)button forPlayer:(NSUInteger)player {
player -= 1;
// player -= 1;

switch (g_settings.controller_types[player]) {
case ControllerType::DigitalController:
Expand Down Expand Up @@ -1007,7 +1007,7 @@ - (void)executeFrameSkippingFrame:(BOOL)skip {
}

MAKEWEAK(self);
// Host::RunOnCPUThread([params = std::move(params), weakself]() {
Host::RunOnCPUThread([params = std::move(params), weakself]() {
MAKESTRONG_RETURN_IF_NIL(self);
BOOL isInitialized = System::BootSystem(params);
strongself->isInitialized = isInitialized;
Expand All @@ -1018,7 +1018,7 @@ - (void)executeFrameSkippingFrame:(BOOL)skip {
[strongself stopEmulation];
return;
}
// });
});
}

System::RunFrame();
Expand Down Expand Up @@ -1507,9 +1507,9 @@ bool IsInitialized() {
}
NSURL *aURL;
if (upperName) {
aURL = [[NSBundle bundleForClass:[PVEmulatorCore class]] URLForResource:baseName withExtension:baseExt subdirectory:upperName];
aURL = [[NSBundle bundleForClass:[PVDuckStationCore class]] URLForResource:baseName withExtension:baseExt subdirectory:upperName];
} else {
aURL = [[NSBundle bundleForClass:[PVEmulatorCore class]] URLForResource:baseName withExtension:baseExt];
aURL = [[NSBundle bundleForClass:[PVDuckStationCore class]] URLForResource:baseName withExtension:baseExt];
}
if (!aURL) {
return std::nullopt;
Expand Down Expand Up @@ -1540,9 +1540,9 @@ bool IsInitialized() {
}
NSURL *aURL;
if (upperName) {
aURL = [[NSBundle bundleForClass:[PVEmulatorCore class]] URLForResource:baseName withExtension:baseExt subdirectory:upperName];
aURL = [[NSBundle bundleForClass:[PVDuckStationCore class]] URLForResource:baseName withExtension:baseExt subdirectory:upperName];
} else {
aURL = [[NSBundle bundleForClass:[PVEmulatorCore class]] URLForResource:baseName withExtension:baseExt];
aURL = [[NSBundle bundleForClass:[PVDuckStationCore class]] URLForResource:baseName withExtension:baseExt];
}
if (!aURL) {
return std::nullopt;
Expand Down
16 changes: 2 additions & 14 deletions Cores/DuckStation/cmake/duckstation.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -4121,7 +4121,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "set -e\nif test \"$CONFIGURATION\" = \"Debug\"; then :\n cd ../cmake\n /opt/homebrew/Cellar/cmake/3.25.1/bin/ctest --force-new-ctest-process -C $CONFIGURATION$EFFECTIVE_PLATFORM_NAME\nfi\nif test \"$CONFIGURATION\" = \"Release\"; then :\n cd ../cmake\n /opt/homebrew/Cellar/cmake/3.25.1/bin/ctest --force-new-ctest-process -C $CONFIGURATION$EFFECTIVE_PLATFORM_NAME\nfi\nif test \"$CONFIGURATION\" = \"MinSizeRel\"; then :\n cd ../cmake\n /opt/homebrew/Cellar/cmake/3.25.1/bin/ctest --force-new-ctest-process -C $CONFIGURATION$EFFECTIVE_PLATFORM_NAME\nfi\nif test \"$CONFIGURATION\" = \"RelWithDebInfo\"; then :\n cd ../cmake\n /opt/homebrew/Cellar/cmake/3.25.1/bin/ctest --force-new-ctest-process -C $CONFIGURATION$EFFECTIVE_PLATFORM_NAME\nfi\n";
shellScript = "set -e\nif test \"$CONFIGURATION\" = \"Debug\"; then :\n cd ../cmake\n /opt/homebrew/Cellar/cmake/3.31.2/bin/ctest --force-new-ctest-process -C $CONFIGURATION$EFFECTIVE_PLATFORM_NAME\nfi\nif test \"$CONFIGURATION\" = \"Release\"; then :\n cd ../cmake\n /opt/homebrew/Cellar/cmake/3.31.2/bin/ctest --force-new-ctest-process -C $CONFIGURATION$EFFECTIVE_PLATFORM_NAME\nfi\nif test \"$CONFIGURATION\" = \"MinSizeRel\"; then :\n cd ../cmake\n /opt/homebrew/Cellar/cmake/3.31.2/bin/ctest --force-new-ctest-process -C $CONFIGURATION$EFFECTIVE_PLATFORM_NAME\nfi\nif test \"$CONFIGURATION\" = \"RelWithDebInfo\"; then :\n cd ../cmake\n /opt/homebrew/Cellar/cmake/3.31.2/bin/ctest --force-new-ctest-process -C $CONFIGURATION$EFFECTIVE_PLATFORM_NAME\nfi\n";
showEnvVarsInLog = 0;
};
01184BFB05ADCF4A41EC285E /* Generate CMakeFiles/ALL_BUILD */ = {
Expand Down Expand Up @@ -4169,7 +4169,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "set -e\nif test \"$CONFIGURATION\" = \"Debug\"; then :\n cd ../cmake/src/frontend-common\n /opt/homebrew/Cellar/cmake/3.25.1/bin/cmake -E copy_directory ../duckstation/data ../cmake/bin\nfi\nif test \"$CONFIGURATION\" = \"Release\"; then :\n cd ../cmake/src/frontend-common\n /opt/homebrew/Cellar/cmake/3.25.1/bin/cmake -E copy_directory ../duckstation/data ../cmake/bin\nfi\nif test \"$CONFIGURATION\" = \"MinSizeRel\"; then :\n cd ../cmake/src/frontend-common\n /opt/homebrew/Cellar/cmake/3.25.1/bin/cmake -E copy_directory ../duckstation/data ../cmake/bin\nfi\nif test \"$CONFIGURATION\" = \"RelWithDebInfo\"; then :\n cd ../cmake/src/frontend-common\n /opt/homebrew/Cellar/cmake/3.25.1/bin/cmake -E copy_directory ../duckstation/data ../cmake/bin\nfi\n";
shellScript = "#set -e\n#if test \"$CONFIGURATION\" = \"Debug\"; then :\n# cd ../cmake/src/frontend-common\n# /opt/homebrew/Cellar/cmake/3.31.2/bin/cmake -E copy_directory ../duckstation/data ../cmake/bin\n#fi\n#if test \"$CONFIGURATION\" = \"Release\"; then :\n# cd ../cmake/src/frontend-common\n# /opt/homebrew/Cellar/cmake/3.31.2/bin/cmake -E copy_directory ../duckstation/data ../cmake/bin\n#fi\n#if test \"$CONFIGURATION\" = \"MinSizeRel\"; then :\n# cd ../cmake/src/frontend-common\n# /opt/homebrew/Cellar/cmake/3.31.2/bin/cmake -E copy_directory ../duckstation/data ../cmake/bin\n#fi\n#if test \"$CONFIGURATION\" = \"RelWithDebInfo\"; then :\n# cd ../cmake/src/frontend-common\n# /opt/homebrew/Cellar/cmake/3.31.2/bin/cmake -E copy_directory ../duckstation/data ../cmake/bin\n#fi\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */
Expand Down Expand Up @@ -5364,7 +5364,6 @@
"-fvisibility=hidden",
"'-std=gnu++17'",
);
OTHER_LIBTOOLFLAGS = " ../cmake/build/glad.build/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/$(OBJECT_FILE_DIR_normal:base)/$(CURRENT_ARCH)/glad.o";
OTHER_REZFLAGS = "";
PRODUCT_NAME = coreDuckstation;
SECTORDER_FLAGS = "";
Expand Down Expand Up @@ -5463,7 +5462,6 @@
"-fvisibility=hidden",
"'-std=gnu++17'",
);
OTHER_LIBTOOLFLAGS = " ../cmake/build/glad.build/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/$(OBJECT_FILE_DIR_normal:base)/$(CURRENT_ARCH)/glad.o";
OTHER_REZFLAGS = "";
PRODUCT_NAME = coreDuckstation;
SECTORDER_FLAGS = "";
Expand Down Expand Up @@ -6180,7 +6178,6 @@
"-fvisibility=hidden",
"'-std=gnu++17'",
);
OTHER_LIBTOOLFLAGS = " ../cmake/build/glad.build/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/$(OBJECT_FILE_DIR_normal:base)/$(CURRENT_ARCH)/glad.o";
OTHER_REZFLAGS = "";
PRODUCT_NAME = "frontend-commonDuckstation";
SECTORDER_FLAGS = "";
Expand Down Expand Up @@ -6452,7 +6449,6 @@
"-fvisibility=hidden",
"'-std=gnu++17'",
);
OTHER_LIBTOOLFLAGS = " ../cmake/build/glad.build/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/$(OBJECT_FILE_DIR_normal:base)/$(CURRENT_ARCH)/glad.o";
OTHER_REZFLAGS = "";
PRODUCT_NAME = "frontend-commonDuckstation";
SECTORDER_FLAGS = "";
Expand Down Expand Up @@ -6563,7 +6559,6 @@
"-fvisibility=hidden",
"'-std=gnu++17'",
);
OTHER_LIBTOOLFLAGS = " ../cmake/build/glad.build/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/$(OBJECT_FILE_DIR_normal:base)/$(CURRENT_ARCH)/glad.o";
OTHER_REZFLAGS = "";
PRODUCT_NAME = commonDuckstation;
SECTORDER_FLAGS = "";
Expand Down Expand Up @@ -7612,7 +7607,6 @@
"-fvisibility=hidden",
"'-std=gnu++17'",
);
OTHER_LIBTOOLFLAGS = " ../cmake/build/glad.build/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/$(OBJECT_FILE_DIR_normal:base)/$(CURRENT_ARCH)/glad.o";
OTHER_REZFLAGS = "";
PRODUCT_NAME = commonDuckstation;
SECTORDER_FLAGS = "";
Expand Down Expand Up @@ -8027,7 +8021,6 @@
"-fvisibility=hidden",
"'-std=gnu++17'",
);
OTHER_LIBTOOLFLAGS = " ../cmake/build/glad.build/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/$(OBJECT_FILE_DIR_normal:base)/$(CURRENT_ARCH)/glad.o";
OTHER_REZFLAGS = "";
PRODUCT_NAME = commonDuckstation;
SECTORDER_FLAGS = "";
Expand Down Expand Up @@ -8868,7 +8861,6 @@
"-fvisibility=hidden",
"'-std=gnu++17'",
);
OTHER_LIBTOOLFLAGS = " ../cmake/build/glad.build/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/$(OBJECT_FILE_DIR_normal:base)/$(CURRENT_ARCH)/glad.o";
OTHER_REZFLAGS = "";
PRODUCT_NAME = "frontend-commonDuckstation";
SECTORDER_FLAGS = "";
Expand Down Expand Up @@ -9551,7 +9543,6 @@
"-fvisibility=hidden",
"'-std=gnu++17'",
);
OTHER_LIBTOOLFLAGS = " ../cmake/build/glad.build/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/$(OBJECT_FILE_DIR_normal:base)/$(CURRENT_ARCH)/glad.o";
OTHER_REZFLAGS = "";
PRODUCT_NAME = coreDuckstation;
SECTORDER_FLAGS = "";
Expand Down Expand Up @@ -9920,7 +9911,6 @@
"-fvisibility=hidden",
"'-std=gnu++17'",
);
OTHER_LIBTOOLFLAGS = " ../cmake/build/glad.build/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/$(OBJECT_FILE_DIR_normal:base)/$(CURRENT_ARCH)/glad.o";
OTHER_REZFLAGS = "";
PRODUCT_NAME = coreDuckstation;
SECTORDER_FLAGS = "";
Expand Down Expand Up @@ -10309,7 +10299,6 @@
"-fvisibility=hidden",
"'-std=gnu++17'",
);
OTHER_LIBTOOLFLAGS = " ../cmake/build/glad.build/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/$(OBJECT_FILE_DIR_normal:base)/$(CURRENT_ARCH)/glad.o";
OTHER_REZFLAGS = "";
PRODUCT_NAME = "frontend-commonDuckstation";
SECTORDER_FLAGS = "";
Expand Down Expand Up @@ -10418,7 +10407,6 @@
"-fvisibility=hidden",
"'-std=gnu++17'",
);
OTHER_LIBTOOLFLAGS = " ../cmake/build/glad.build/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/$(OBJECT_FILE_DIR_normal:base)/$(CURRENT_ARCH)/glad.o";
OTHER_REZFLAGS = "";
PRODUCT_NAME = commonDuckstation;
SECTORDER_FLAGS = "";
Expand Down

0 comments on commit c2bd8cc

Please sign in to comment.