Skip to content

Commit

Permalink
emuThree: Add 3DS Support through emuthreeds
Browse files Browse the repository at this point in the history
  • Loading branch information
SeiRyu committed Jul 30, 2023
1 parent 5e31cb5 commit e4b3526
Show file tree
Hide file tree
Showing 353 changed files with 353,726 additions and 7 deletions.
6 changes: 6 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -175,3 +175,9 @@
[submodule "Cores/Play/Play-"]
path = Cores/Play/Play-
url = https://github.com/jpd002/Play-.git
[submodule "Cores/emuThree/emuthree"]
path = Cores/emuThree/emuthree
url = https://github.com/emuPlace/emuThreeDS.git
[submodule "Cores/emuThree/cmake/zstd"]
path = Cores/emuThree/cmake/zstd
url = https://github.com/facebook/zstd.git
41 changes: 41 additions & 0 deletions Cores/emuThree/BuildFlags.xcconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
//
// BuildFlags.xcconfig
// PVDolphin
//
// Created by Joseph Mattiello on 11/1/18.
//
//

// All
GCC_PREPROCESSOR_DEFINITIONS = $(inherited)
OTHER_CFLAGS = $(inherited)
//-mno-thumb -mfpu=neon -fno-operator-names -fno-rtti -ffast-math -ftree-vectorize -fno-strict-aliasing -frename-registers -fno-rtti -fpermissive -fsingle-precision-constant -DTARGET_NO_NIXPROF
// -DUSE_MEMORYWATCHER=1
OTHER_LDFLAGS = $(inherited)
//-ObjC -l"c++" -l"z" -DIPHONEOS
//-l"nanopb" -l"PromisesObjC"

// Device
GCC_PREPROCESSOR_DEFINITIONS[sdk=iphoneos*] = $(inherited) TARGET_IPHONE=1
OTHER_CFLAGS[sdk=iphoneos*] = $(inherited)

// Simulator
GCC_PREPROCESSOR_DEFINITIONS[sdk=iphonesimulator*] = $(inherited) TARGET_IPHONE_SIMULATOR=1
EXCLUDED_SOURCE_FILE_NAMES[sdk=iphonesimulator*] = *
INCLUDED_SOURCE_FILE_NAMES[sdk=iphonesimulator*] = PVDebug.c

// tvOS Device
GCC_PREPROCESSOR_DEFINITIONS[sdk=appletvos*] = $(inherited) TARGET_IPHONE=1
//EXCLUDED_SOURCE_FILE_NAMES[sdk=appletvos*][arch=*] = *
//INCLUDED_SOURCE_FILE_NAMES[sdk=appletvos*][arch=*] = PVDebug.c

// tvOS Simulator
GCC_PREPROCESSOR_DEFINITIONS[sdk=appletvsimulator*] = $(inherited) TARGET_IPHONE_SIMULATOR=1
EXCLUDED_SOURCE_FILE_NAMES[sdk=appletvsimulator*][arch=*] = *
INCLUDED_SOURCE_FILE_NAMES[sdk=appletvsimulator*][arch=*] = PVDebug.c

//Kept in same TARGET_BUILD_DIR as others
//BUILD_DIR = $(SRCROOT)/lib
OBJROOT = $(SRCROOT)/../lib/emuthree
SYMROOT = $(SRCROOT)/../lib/emuthree
PROJECT_TEMP_DIR = $(SRCROOT)/../lib/emuthree/build/$(PROJECT_NAME).build
12 changes: 12 additions & 0 deletions Cores/emuThree/LibEmuThreeConfig.xcconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
EXCLUDED_SOURCE_FILE_NAMES[sdk=iphonesimulator*] = * ***.a
INCLUDED_SOURCE_FILE_NAMES[sdk=iphonesimulator*] = PVDebug.c
EXCLUDED_SOURCE_FILE_NAMES[sdk=appletvsimulator*][arch=*] = * ***.a
INCLUDED_SOURCE_FILE_NAMES[sdk=appletvsimulator*][arch=*] = PVDebug.c
//EXCLUDED_SOURCE_FILE_NAMES[sdk=appletvos*][arch=*] = * ***.a
//INCLUDED_SOURCE_FILE_NAMES[sdk=appletvos*][arch=*] = PVDebug.c

BUILD_DIR = $(SRCROOT)/../lib

OBJROOT = $(SRCROOT)/../lib/emuthree
SYMROOT = $(SRCROOT)/../lib/emuthree
PROJECT_TEMP_DIR = $(SRCROOT)/../lib/emuthree/build/$(PROJECT_NAME).build
47,775 changes: 47,775 additions & 0 deletions Cores/emuThree/PVEmuThree.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"pins" : [
{
"identity" : "zstd",
"kind" : "remoteSourceControl",
"location" : "https://github.com/facebook/zstd",
"state" : {
"branch" : "dev",
"revision" : "5059618295bc67f4f70eb6f12e6cf57b8d3de141"
}
}
],
"version" : 2
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1500"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "B3C7620F20783162009950E4"
BuildableName = "PVEmuThree.framework"
BlueprintName = "PVEmuThree"
ReferencedContainer = "container:PVEmuThree.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Release"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
shouldAutocreateTestPlan = "YES">
</TestAction>
<LaunchAction
buildConfiguration = "Release"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "B3C7620F20783162009950E4"
BuildableName = "PVEmuThree.framework"
BlueprintName = "PVEmuThree"
ReferencedContainer = "container:PVEmuThree.xcodeproj">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Release">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1500"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "B30178D2207C901D0051B93D"
BuildableName = "libemuthree.a"
BlueprintName = "emuthree"
ReferencedContainer = "container:PVEmuThree.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
shouldAutocreateTestPlan = "YES">
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "B30178D2207C901D0051B93D"
BuildableName = "libemuthree.a"
BlueprintName = "emuthree"
ReferencedContainer = "container:PVEmuThree.xcodeproj">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
20 changes: 20 additions & 0 deletions Cores/emuThree/PVEmuThree/Core.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?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>PVCoreIdentifier</key>
<string>com.provenance.emuThree</string>
<key>PVPrincipleClass</key>
<string>PVEmuThreeCore</string>
<key>PVSupportedSystems</key>
<array>
<string>com.provenance.3ds</string>
</array>
<key>PVProjectName</key>
<string>EmuThreeds</string>
<key>PVProjectURL</key>
<string>https://github.com/emuPlace/emuThreeDS</string>
<key>PVProjectVersion</key>
<string>1.0.6</string>
</dict>
</plist>
24 changes: 24 additions & 0 deletions Cores/emuThree/PVEmuThree/Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?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>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>NSPrincipalClass</key>
<string></string>
</dict>
</plist>
18 changes: 18 additions & 0 deletions Cores/emuThree/PVEmuThree/PVEmuThree.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
//
// PVEmuThree.h
// PVEmuThree
//
// Created by Joseph Mattiello on 9/5/21.
// Copyright © 2021 Provenance. All rights reserved.
//

#import <Foundation/Foundation.h>

//! Project version number for PVEmuThree.
FOUNDATION_EXPORT double PVEmuThreeVersionNumber;

//! Project version string for PVEmuThree.
FOUNDATION_EXPORT const unsigned char PVEmuThreeVersionString[];

// In this header, you should import all the public headers of your framework using statements like #import <PVEmuThree/PublicHeader.h>
#import <PVEmuThree/PVEmuThreeCore.h>
29 changes: 29 additions & 0 deletions Cores/emuThree/PVEmuThreeCore/Core/EmuThreeOGLViewController.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
// OGLViewController.swift
// Copyright © 2023 Provenance Emu. All rights reserved.

import Foundation
import GLKit
import os

@objc public class EmuThreeOGLViewController: GLKViewController {
private var core: PVEmuThreeCore!
@objc public init(resFactor: Int8, videoWidth: CGFloat, videoHeight: CGFloat, core: PVEmuThreeCore) {
super.init(nibName: nil, bundle: nil)
self.core = core;
self.view.isUserInteractionEnabled = false
self.view.contentMode = .scaleToFill
self.view.translatesAutoresizingMaskIntoConstraints = false
self.view.contentScaleFactor = 1
}
override init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: Bundle?) {
super.init(nibName: nibNameOrNil, bundle: nibBundleOrNil)
}
required init?(coder: NSCoder) {
super.init(coder:coder);
}
@objc public override func viewDidLoad() {
super.viewDidLoad()
NSLog("Starting VM\n");
core.startVM(self.view);
}
}
Loading

0 comments on commit e4b3526

Please sign in to comment.