14 Commits

Author SHA1 Message Date
C.W. Betts 42d9266038 HAVE_STATIC_CODE_BUFFER has issues if built/linked on a newer version of macOS.
Don't use it for now.
2021-01-26 00:08:31 -07:00
C.W. Betts 2a0611cd32 Port the rest of the Obj-C files used by the OpenEmu core to ARC. 2021-01-24 20:38:06 -07:00
C.W. Betts e8d3c6ca76 Add Apple Silicon support. 2021-01-24 20:12:31 -07:00
clobber e47e9dc66a Bump version for sparkle updater. Core is still 0.9.11 2019-12-26 21:19:33 -07:00
Daniele Cattaneo aee471fb3f Hide some less-important modes from next/lastDisplayMode: actions as a UI simplification 2019-11-17 20:00:15 +01:00
Daniele Cattaneo 514109a0ac Use the provided display buffer hint if possible. 2019-11-17 20:00:15 +01:00
Daniele Cattaneo 1e8fcbc37f Implement screen gap options 2019-11-17 20:00:15 +01:00
Daniele Cattaneo c43aeebecd Implement screen rotation options 2019-11-17 20:00:15 +01:00
Daniele Cattaneo 9ec2347451 Implement screen ordering options for dual-screen mode 2019-11-17 20:00:15 +01:00
Daniele Cattaneo 20b0744e2a Implement horizontal screen layout 2019-11-17 20:00:15 +01:00
Daniele Cattaneo 7d5ac35ada Refactor the display mode state tracking to make it easier to implement additional display options. 2019-11-17 20:00:15 +01:00
Daniele Cattaneo 43bdc01a64 Fix files with mixed spaces/tabs indentation. 2019-11-17 14:56:03 +01:00
clobber a5c6d11348 Bump version for sparkle updater. Core is still 0.9.11 2019-10-30 23:46:06 -05:00
Stuart Carnie 464b72b64b fix: Stubbed Core Audio implementations for OpenEmu core 2019-10-30 18:24:01 -07:00
27 changed files with 2920 additions and 382 deletions
+4
View File
@@ -30,8 +30,12 @@
#include <errno.h>
#include <unistd.h>
#include <stddef.h>
// Apple has become very strict about memory protection!
// The static code buffer won't work anymore!
#ifndef __APPLE__
#define HAVE_STATIC_CODE_BUFFER
#endif
#endif
#include "armcpu.h"
#include "instructions.h"
@@ -7,6 +7,8 @@
objects = {
/* Begin PBXBuildFile section */
057577C9236A6B6900254B6A /* coreaudiosound_null.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 057577C7236A6B6900254B6A /* coreaudiosound_null.cpp */; };
55653D9825BE6CA8001C3B62 /* jit-cross.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 55653D9725BE6CA8001C3B62 /* jit-cross.cpp */; };
8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; };
AB0038A71872A96700B0B055 /* Image_PaddleController.png in Resources */ = {isa = PBXBuildFile; fileRef = AB0038A61872A96700B0B055 /* Image_PaddleController.png */; };
AB0038A81872A96700B0B055 /* Image_PaddleController.png in Resources */ = {isa = PBXBuildFile; fileRef = AB0038A61872A96700B0B055 /* Image_PaddleController.png */; };
@@ -15,7 +17,7 @@
AB01005E170D07B000D70FBE /* InputProfileController.mm in Sources */ = {isa = PBXBuildFile; fileRef = AB01005D170D07B000D70FBE /* InputProfileController.mm */; };
AB01005F170D07B000D70FBE /* InputProfileController.mm in Sources */ = {isa = PBXBuildFile; fileRef = AB01005D170D07B000D70FBE /* InputProfileController.mm */; };
AB02475C13886BF300E9F9AB /* KeyNames.plist in Resources */ = {isa = PBXBuildFile; fileRef = AB02475B13886BF300E9F9AB /* KeyNames.plist */; };
AB031B5518472F3100541888 /* cocoa_cheat.mm in Sources */ = {isa = PBXBuildFile; fileRef = ABA6574A14511EC90077E5E9 /* cocoa_cheat.mm */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
AB031B5518472F3100541888 /* cocoa_cheat.mm in Sources */ = {isa = PBXBuildFile; fileRef = ABA6574A14511EC90077E5E9 /* cocoa_cheat.mm */; };
AB0F290214BE6E68009ABC6F /* Icon_Execute_420x420.png in Resources */ = {isa = PBXBuildFile; fileRef = AB0F28FE14BE6E68009ABC6F /* Icon_Execute_420x420.png */; };
AB0F290314BE6E68009ABC6F /* Icon_Pause_420x420.png in Resources */ = {isa = PBXBuildFile; fileRef = AB0F28FF14BE6E68009ABC6F /* Icon_Pause_420x420.png */; };
AB0F290414BE6E68009ABC6F /* Icon_Speed1x_420x420.png in Resources */ = {isa = PBXBuildFile; fileRef = AB0F290014BE6E68009ABC6F /* Icon_Speed1x_420x420.png */; };
@@ -93,9 +95,9 @@
AB3701E5173A3FBF006E573E /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AB74EC891738499C0026C41E /* Carbon.framework */; };
AB3A655E16CC5421001F5D4A /* EmuControllerDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = AB3A655D16CC5421001F5D4A /* EmuControllerDelegate.mm */; };
AB3A655F16CC5421001F5D4A /* EmuControllerDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = AB3A655D16CC5421001F5D4A /* EmuControllerDelegate.mm */; };
AB3A656116CC5438001F5D4A /* cocoa_GPU.mm in Sources */ = {isa = PBXBuildFile; fileRef = AB3A656016CC5438001F5D4A /* cocoa_GPU.mm */; };
AB3A656216CC5438001F5D4A /* cocoa_GPU.mm in Sources */ = {isa = PBXBuildFile; fileRef = AB3A656016CC5438001F5D4A /* cocoa_GPU.mm */; };
AB3A656316CC5438001F5D4A /* cocoa_GPU.mm in Sources */ = {isa = PBXBuildFile; fileRef = AB3A656016CC5438001F5D4A /* cocoa_GPU.mm */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
AB3A656116CC5438001F5D4A /* cocoa_GPU.mm in Sources */ = {isa = PBXBuildFile; fileRef = AB3A656016CC5438001F5D4A /* cocoa_GPU.mm */; settings = {COMPILER_FLAGS = "-fobjc-arc"; }; };
AB3A656216CC5438001F5D4A /* cocoa_GPU.mm in Sources */ = {isa = PBXBuildFile; fileRef = AB3A656016CC5438001F5D4A /* cocoa_GPU.mm */; settings = {COMPILER_FLAGS = "-fobjc-arc"; }; };
AB3A656316CC5438001F5D4A /* cocoa_GPU.mm in Sources */ = {isa = PBXBuildFile; fileRef = AB3A656016CC5438001F5D4A /* cocoa_GPU.mm */; };
AB3ACB7214C2361100D7D192 /* appDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = AB3ACB6714C2361100D7D192 /* appDelegate.mm */; };
AB3ACB7314C2361100D7D192 /* cheatWindowDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = AB3ACB6914C2361100D7D192 /* cheatWindowDelegate.mm */; };
AB3ACB7614C2361100D7D192 /* inputPrefsView.mm in Sources */ = {isa = PBXBuildFile; fileRef = AB3ACB6F14C2361100D7D192 /* inputPrefsView.mm */; };
@@ -108,91 +110,62 @@
AB3E34C9134AF4500056477A /* cocoa_output.mm in Sources */ = {isa = PBXBuildFile; fileRef = AB3E34C8134AF4500056477A /* cocoa_output.mm */; };
AB40562A169F5DBB0016AC3E /* assembler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB405600169F5DBB0016AC3E /* assembler.cpp */; };
AB40562B169F5DBB0016AC3E /* assembler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB405600169F5DBB0016AC3E /* assembler.cpp */; };
AB40562C169F5DBB0016AC3E /* assembler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB405600169F5DBB0016AC3E /* assembler.cpp */; };
AB40562D169F5DBB0016AC3E /* assert.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB405602169F5DBB0016AC3E /* assert.cpp */; };
AB40562E169F5DBB0016AC3E /* assert.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB405602169F5DBB0016AC3E /* assert.cpp */; };
AB40562F169F5DBB0016AC3E /* assert.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB405602169F5DBB0016AC3E /* assert.cpp */; };
AB405630169F5DBB0016AC3E /* buffer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB405604169F5DBB0016AC3E /* buffer.cpp */; };
AB405631169F5DBB0016AC3E /* buffer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB405604169F5DBB0016AC3E /* buffer.cpp */; };
AB405632169F5DBB0016AC3E /* buffer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB405604169F5DBB0016AC3E /* buffer.cpp */; };
AB405633169F5DBB0016AC3E /* compiler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB405607169F5DBB0016AC3E /* compiler.cpp */; };
AB405634169F5DBB0016AC3E /* compiler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB405607169F5DBB0016AC3E /* compiler.cpp */; };
AB405635169F5DBB0016AC3E /* compiler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB405607169F5DBB0016AC3E /* compiler.cpp */; };
AB405636169F5DBB0016AC3E /* compilercontext.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB405609169F5DBB0016AC3E /* compilercontext.cpp */; };
AB405637169F5DBB0016AC3E /* compilercontext.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB405609169F5DBB0016AC3E /* compilercontext.cpp */; };
AB405638169F5DBB0016AC3E /* compilercontext.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB405609169F5DBB0016AC3E /* compilercontext.cpp */; };
AB405639169F5DBB0016AC3E /* compilerfunc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB40560B169F5DBB0016AC3E /* compilerfunc.cpp */; };
AB40563A169F5DBB0016AC3E /* compilerfunc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB40560B169F5DBB0016AC3E /* compilerfunc.cpp */; };
AB40563B169F5DBB0016AC3E /* compilerfunc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB40560B169F5DBB0016AC3E /* compilerfunc.cpp */; };
AB40563C169F5DBB0016AC3E /* compileritem.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB40560D169F5DBB0016AC3E /* compileritem.cpp */; };
AB40563D169F5DBB0016AC3E /* compileritem.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB40560D169F5DBB0016AC3E /* compileritem.cpp */; };
AB40563E169F5DBB0016AC3E /* compileritem.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB40560D169F5DBB0016AC3E /* compileritem.cpp */; };
AB40563F169F5DBB0016AC3E /* context.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB40560F169F5DBB0016AC3E /* context.cpp */; };
AB405640169F5DBB0016AC3E /* context.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB40560F169F5DBB0016AC3E /* context.cpp */; };
AB405641169F5DBB0016AC3E /* context.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB40560F169F5DBB0016AC3E /* context.cpp */; };
AB405642169F5DBB0016AC3E /* cpuinfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB405611169F5DBB0016AC3E /* cpuinfo.cpp */; };
AB405643169F5DBB0016AC3E /* cpuinfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB405611169F5DBB0016AC3E /* cpuinfo.cpp */; };
AB405644169F5DBB0016AC3E /* cpuinfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB405611169F5DBB0016AC3E /* cpuinfo.cpp */; };
AB405645169F5DBB0016AC3E /* defs.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB405613169F5DBB0016AC3E /* defs.cpp */; };
AB405646169F5DBB0016AC3E /* defs.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB405613169F5DBB0016AC3E /* defs.cpp */; };
AB405647169F5DBB0016AC3E /* defs.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB405613169F5DBB0016AC3E /* defs.cpp */; };
AB405648169F5DBB0016AC3E /* func.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB405615169F5DBB0016AC3E /* func.cpp */; };
AB405649169F5DBB0016AC3E /* func.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB405615169F5DBB0016AC3E /* func.cpp */; };
AB40564A169F5DBB0016AC3E /* func.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB405615169F5DBB0016AC3E /* func.cpp */; };
AB40564B169F5DBB0016AC3E /* logger.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB405619169F5DBB0016AC3E /* logger.cpp */; };
AB40564C169F5DBB0016AC3E /* logger.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB405619169F5DBB0016AC3E /* logger.cpp */; };
AB40564D169F5DBB0016AC3E /* logger.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB405619169F5DBB0016AC3E /* logger.cpp */; };
AB40564E169F5DBB0016AC3E /* memorymanager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB40561B169F5DBB0016AC3E /* memorymanager.cpp */; };
AB40564F169F5DBB0016AC3E /* memorymanager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB40561B169F5DBB0016AC3E /* memorymanager.cpp */; };
AB405650169F5DBB0016AC3E /* memorymanager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB40561B169F5DBB0016AC3E /* memorymanager.cpp */; };
AB405651169F5DBB0016AC3E /* memorymarker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB40561D169F5DBB0016AC3E /* memorymarker.cpp */; };
AB405652169F5DBB0016AC3E /* memorymarker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB40561D169F5DBB0016AC3E /* memorymarker.cpp */; };
AB405653169F5DBB0016AC3E /* memorymarker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB40561D169F5DBB0016AC3E /* memorymarker.cpp */; };
AB405654169F5DBB0016AC3E /* operand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB40561F169F5DBB0016AC3E /* operand.cpp */; };
AB405655169F5DBB0016AC3E /* operand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB40561F169F5DBB0016AC3E /* operand.cpp */; };
AB405656169F5DBB0016AC3E /* operand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB40561F169F5DBB0016AC3E /* operand.cpp */; };
AB405657169F5DBB0016AC3E /* stringbuilder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB405622169F5DBB0016AC3E /* stringbuilder.cpp */; };
AB405658169F5DBB0016AC3E /* stringbuilder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB405622169F5DBB0016AC3E /* stringbuilder.cpp */; };
AB405659169F5DBB0016AC3E /* stringbuilder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB405622169F5DBB0016AC3E /* stringbuilder.cpp */; };
AB40565A169F5DBB0016AC3E /* stringutil.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB405624169F5DBB0016AC3E /* stringutil.cpp */; };
AB40565B169F5DBB0016AC3E /* stringutil.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB405624169F5DBB0016AC3E /* stringutil.cpp */; };
AB40565C169F5DBB0016AC3E /* stringutil.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB405624169F5DBB0016AC3E /* stringutil.cpp */; };
AB40565D169F5DBB0016AC3E /* virtualmemory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB405626169F5DBB0016AC3E /* virtualmemory.cpp */; };
AB40565E169F5DBB0016AC3E /* virtualmemory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB405626169F5DBB0016AC3E /* virtualmemory.cpp */; };
AB40565F169F5DBB0016AC3E /* virtualmemory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB405626169F5DBB0016AC3E /* virtualmemory.cpp */; };
AB405660169F5DBB0016AC3E /* zonememory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB405628169F5DBB0016AC3E /* zonememory.cpp */; };
AB405661169F5DBB0016AC3E /* zonememory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB405628169F5DBB0016AC3E /* zonememory.cpp */; };
AB405662169F5DBB0016AC3E /* zonememory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB405628169F5DBB0016AC3E /* zonememory.cpp */; };
AB405678169F5DCC0016AC3E /* x86assembler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB405664169F5DCC0016AC3E /* x86assembler.cpp */; };
AB405679169F5DCC0016AC3E /* x86assembler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB405664169F5DCC0016AC3E /* x86assembler.cpp */; };
AB40567A169F5DCC0016AC3E /* x86assembler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB405664169F5DCC0016AC3E /* x86assembler.cpp */; };
AB40567B169F5DCC0016AC3E /* x86compiler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB405666169F5DCC0016AC3E /* x86compiler.cpp */; };
AB40567C169F5DCC0016AC3E /* x86compiler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB405666169F5DCC0016AC3E /* x86compiler.cpp */; };
AB40567D169F5DCC0016AC3E /* x86compiler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB405666169F5DCC0016AC3E /* x86compiler.cpp */; };
AB40567E169F5DCC0016AC3E /* x86compilercontext.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB405668169F5DCC0016AC3E /* x86compilercontext.cpp */; };
AB40567F169F5DCC0016AC3E /* x86compilercontext.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB405668169F5DCC0016AC3E /* x86compilercontext.cpp */; };
AB405680169F5DCC0016AC3E /* x86compilercontext.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB405668169F5DCC0016AC3E /* x86compilercontext.cpp */; };
AB405681169F5DCC0016AC3E /* x86compilerfunc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB40566A169F5DCC0016AC3E /* x86compilerfunc.cpp */; };
AB405682169F5DCC0016AC3E /* x86compilerfunc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB40566A169F5DCC0016AC3E /* x86compilerfunc.cpp */; };
AB405683169F5DCC0016AC3E /* x86compilerfunc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB40566A169F5DCC0016AC3E /* x86compilerfunc.cpp */; };
AB405684169F5DCC0016AC3E /* x86compileritem.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB40566C169F5DCC0016AC3E /* x86compileritem.cpp */; };
AB405685169F5DCC0016AC3E /* x86compileritem.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB40566C169F5DCC0016AC3E /* x86compileritem.cpp */; };
AB405686169F5DCC0016AC3E /* x86compileritem.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB40566C169F5DCC0016AC3E /* x86compileritem.cpp */; };
AB405687169F5DCC0016AC3E /* x86cpuinfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB40566E169F5DCC0016AC3E /* x86cpuinfo.cpp */; };
AB405688169F5DCC0016AC3E /* x86cpuinfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB40566E169F5DCC0016AC3E /* x86cpuinfo.cpp */; };
AB405689169F5DCC0016AC3E /* x86cpuinfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB40566E169F5DCC0016AC3E /* x86cpuinfo.cpp */; };
AB40568A169F5DCC0016AC3E /* x86defs.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB405670169F5DCC0016AC3E /* x86defs.cpp */; };
AB40568B169F5DCC0016AC3E /* x86defs.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB405670169F5DCC0016AC3E /* x86defs.cpp */; };
AB40568C169F5DCC0016AC3E /* x86defs.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB405670169F5DCC0016AC3E /* x86defs.cpp */; };
AB40568D169F5DCC0016AC3E /* x86func.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB405672169F5DCC0016AC3E /* x86func.cpp */; };
AB40568E169F5DCC0016AC3E /* x86func.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB405672169F5DCC0016AC3E /* x86func.cpp */; };
AB40568F169F5DCC0016AC3E /* x86func.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB405672169F5DCC0016AC3E /* x86func.cpp */; };
AB405690169F5DCC0016AC3E /* x86operand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB405674169F5DCC0016AC3E /* x86operand.cpp */; };
AB405691169F5DCC0016AC3E /* x86operand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB405674169F5DCC0016AC3E /* x86operand.cpp */; };
AB405692169F5DCC0016AC3E /* x86operand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB405674169F5DCC0016AC3E /* x86operand.cpp */; };
AB405693169F5DCC0016AC3E /* x86util.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB405676169F5DCC0016AC3E /* x86util.cpp */; };
AB405694169F5DCC0016AC3E /* x86util.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB405676169F5DCC0016AC3E /* x86util.cpp */; };
AB405695169F5DCC0016AC3E /* x86util.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB405676169F5DCC0016AC3E /* x86util.cpp */; };
AB407F371A6206FB00313213 /* xbrz.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB47B52C18A3F722009A42AF /* xbrz.cpp */; };
AB4676F314AB12D60002FF94 /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = AB0A0D1914AACA9600E83E91 /* libz.dylib */; };
AB47B52E18A3F722009A42AF /* xbrz.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB47B52C18A3F722009A42AF /* xbrz.cpp */; };
@@ -200,9 +173,9 @@
AB4FCEBD1692AB82000F498F /* Accelerate.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AB4FCEBC1692AB82000F498F /* Accelerate.framework */; };
AB4FCEBE1692AB82000F498F /* Accelerate.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AB4FCEBC1692AB82000F498F /* Accelerate.framework */; };
AB4FCEBF1692AB82000F498F /* Accelerate.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AB4FCEBC1692AB82000F498F /* Accelerate.framework */; };
AB5648FF186E6EA8002740F4 /* cocoa_slot2.mm in Sources */ = {isa = PBXBuildFile; fileRef = AB5648FE186E6EA8002740F4 /* cocoa_slot2.mm */; };
AB564900186E6EA8002740F4 /* cocoa_slot2.mm in Sources */ = {isa = PBXBuildFile; fileRef = AB5648FE186E6EA8002740F4 /* cocoa_slot2.mm */; };
AB564901186E6EA8002740F4 /* cocoa_slot2.mm in Sources */ = {isa = PBXBuildFile; fileRef = AB5648FE186E6EA8002740F4 /* cocoa_slot2.mm */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
AB5648FF186E6EA8002740F4 /* cocoa_slot2.mm in Sources */ = {isa = PBXBuildFile; fileRef = AB5648FE186E6EA8002740F4 /* cocoa_slot2.mm */; settings = {COMPILER_FLAGS = "-fobjc-arc"; }; };
AB564900186E6EA8002740F4 /* cocoa_slot2.mm in Sources */ = {isa = PBXBuildFile; fileRef = AB5648FE186E6EA8002740F4 /* cocoa_slot2.mm */; settings = {COMPILER_FLAGS = "-fobjc-arc"; }; };
AB564901186E6EA8002740F4 /* cocoa_slot2.mm in Sources */ = {isa = PBXBuildFile; fileRef = AB5648FE186E6EA8002740F4 /* cocoa_slot2.mm */; };
AB564904186E6EBC002740F4 /* Slot2WindowDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = AB564903186E6EBC002740F4 /* Slot2WindowDelegate.mm */; };
AB564905186E6EBC002740F4 /* Slot2WindowDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = AB564903186E6EBC002740F4 /* Slot2WindowDelegate.mm */; };
AB564907186E6F0C002740F4 /* ForceFeedback.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AB564906186E6F0C002740F4 /* ForceFeedback.framework */; };
@@ -214,7 +187,7 @@
AB564914186E6F67002740F4 /* Image_Piano.png in Resources */ = {isa = PBXBuildFile; fileRef = AB56490B186E6F67002740F4 /* Image_Piano.png */; };
AB564915186E6F67002740F4 /* Image_Piano.png in Resources */ = {isa = PBXBuildFile; fileRef = AB56490B186E6F67002740F4 /* Image_Piano.png */; };
AB5785FD17176AFC002C5FC7 /* OpenEmuBase.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AB5785FC17176AFC002C5FC7 /* OpenEmuBase.framework */; };
AB58F32D1364F44B0074C376 /* cocoa_file.mm in Sources */ = {isa = PBXBuildFile; fileRef = AB58F32C1364F44B0074C376 /* cocoa_file.mm */; };
AB58F32D1364F44B0074C376 /* cocoa_file.mm in Sources */ = {isa = PBXBuildFile; fileRef = AB58F32C1364F44B0074C376 /* cocoa_file.mm */; settings = {COMPILER_FLAGS = "-fobjc-arc"; }; };
AB64987C13ECC73800EE7DD2 /* FileTypeInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = AB64987B13ECC73800EE7DD2 /* FileTypeInfo.plist */; };
AB68101B187D4AEF0049F2C2 /* Icon_GuitarGrip_Button_Blue_512x512.png in Resources */ = {isa = PBXBuildFile; fileRef = AB681013187D4AEF0049F2C2 /* Icon_GuitarGrip_Button_Blue_512x512.png */; };
AB68101C187D4AEF0049F2C2 /* Icon_GuitarGrip_Button_Blue_512x512.png in Resources */ = {isa = PBXBuildFile; fileRef = AB681013187D4AEF0049F2C2 /* Icon_GuitarGrip_Button_Blue_512x512.png */; };
@@ -393,13 +366,13 @@
AB796D4715CDCBA200C59155 /* wifi.cpp in Sources */ = {isa = PBXBuildFile; fileRef = ABD1FECF1345AC8400AF11D1 /* wifi.cpp */; };
AB796D4815CDCBA200C59155 /* xstring.cpp in Sources */ = {isa = PBXBuildFile; fileRef = ABD1FF511345ACBF00AF11D1 /* xstring.cpp */; };
AB796D4915CDCBA200C59155 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = ABD104271346653B00AF11D1 /* main.m */; };
AB796D4A15CDCBA200C59155 /* cocoa_cheat.mm in Sources */ = {isa = PBXBuildFile; fileRef = ABA6574A14511EC90077E5E9 /* cocoa_cheat.mm */; };
AB796D4A15CDCBA200C59155 /* cocoa_cheat.mm in Sources */ = {isa = PBXBuildFile; fileRef = ABA6574A14511EC90077E5E9 /* cocoa_cheat.mm */; settings = {COMPILER_FLAGS = "-fobjc-arc"; }; };
AB796D4B15CDCBA200C59155 /* cocoa_core.mm in Sources */ = {isa = PBXBuildFile; fileRef = ABD104121346652500AF11D1 /* cocoa_core.mm */; };
AB796D4C15CDCBA200C59155 /* cocoa_file.mm in Sources */ = {isa = PBXBuildFile; fileRef = AB58F32C1364F44B0074C376 /* cocoa_file.mm */; };
AB796D4D15CDCBA200C59155 /* cocoa_firmware.mm in Sources */ = {isa = PBXBuildFile; fileRef = ABE7F53D13EE1C7900FD3A71 /* cocoa_firmware.mm */; };
AB796D4F15CDCBA200C59155 /* cocoa_input.mm in Sources */ = {isa = PBXBuildFile; fileRef = ABD104111346652500AF11D1 /* cocoa_input.mm */; };
AB796D4C15CDCBA200C59155 /* cocoa_file.mm in Sources */ = {isa = PBXBuildFile; fileRef = AB58F32C1364F44B0074C376 /* cocoa_file.mm */; settings = {COMPILER_FLAGS = "-fobjc-arc"; }; };
AB796D4D15CDCBA200C59155 /* cocoa_firmware.mm in Sources */ = {isa = PBXBuildFile; fileRef = ABE7F53D13EE1C7900FD3A71 /* cocoa_firmware.mm */; settings = {COMPILER_FLAGS = "-fobjc-arc"; }; };
AB796D4F15CDCBA200C59155 /* cocoa_input.mm in Sources */ = {isa = PBXBuildFile; fileRef = ABD104111346652500AF11D1 /* cocoa_input.mm */; settings = {COMPILER_FLAGS = "-fobjc-arc"; }; };
AB796D5115CDCBA200C59155 /* cocoa_output.mm in Sources */ = {isa = PBXBuildFile; fileRef = AB3E34C8134AF4500056477A /* cocoa_output.mm */; };
AB796D5215CDCBA200C59155 /* cocoa_rom.mm in Sources */ = {isa = PBXBuildFile; fileRef = ABD104131346652500AF11D1 /* cocoa_rom.mm */; };
AB796D5215CDCBA200C59155 /* cocoa_rom.mm in Sources */ = {isa = PBXBuildFile; fileRef = ABD104131346652500AF11D1 /* cocoa_rom.mm */; settings = {COMPILER_FLAGS = "-fobjc-arc"; }; };
AB796D5315CDCBA200C59155 /* cocoa_util.mm in Sources */ = {isa = PBXBuildFile; fileRef = AB80E04C142BC4A800A52038 /* cocoa_util.mm */; };
AB796D5415CDCBA200C59155 /* cocoa_videofilter.mm in Sources */ = {isa = PBXBuildFile; fileRef = ABE5DFE4143FB1DA00835AD8 /* cocoa_videofilter.mm */; };
AB796D5515CDCBA200C59155 /* appDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = AB3ACB6714C2361100D7D192 /* appDelegate.mm */; };
@@ -624,13 +597,13 @@
AB8F3CD41A53AC2600A80BF6 /* slot1_retail_mcrom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB9038AA17C5ED2200F410BD /* slot1_retail_mcrom.cpp */; };
AB8F3CD51A53AC2600A80BF6 /* xstring.cpp in Sources */ = {isa = PBXBuildFile; fileRef = ABD1FF511345ACBF00AF11D1 /* xstring.cpp */; };
AB8F3CD61A53AC2600A80BF6 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = ABD104271346653B00AF11D1 /* main.m */; };
AB8F3CD71A53AC2600A80BF6 /* cocoa_cheat.mm in Sources */ = {isa = PBXBuildFile; fileRef = ABA6574A14511EC90077E5E9 /* cocoa_cheat.mm */; };
AB8F3CD71A53AC2600A80BF6 /* cocoa_cheat.mm in Sources */ = {isa = PBXBuildFile; fileRef = ABA6574A14511EC90077E5E9 /* cocoa_cheat.mm */; settings = {COMPILER_FLAGS = "-fobjc-arc"; }; };
AB8F3CD81A53AC2600A80BF6 /* cocoa_core.mm in Sources */ = {isa = PBXBuildFile; fileRef = ABD104121346652500AF11D1 /* cocoa_core.mm */; };
AB8F3CD91A53AC2600A80BF6 /* cocoa_file.mm in Sources */ = {isa = PBXBuildFile; fileRef = AB58F32C1364F44B0074C376 /* cocoa_file.mm */; };
AB8F3CDA1A53AC2600A80BF6 /* cocoa_firmware.mm in Sources */ = {isa = PBXBuildFile; fileRef = ABE7F53D13EE1C7900FD3A71 /* cocoa_firmware.mm */; };
AB8F3CDB1A53AC2600A80BF6 /* cocoa_input.mm in Sources */ = {isa = PBXBuildFile; fileRef = ABD104111346652500AF11D1 /* cocoa_input.mm */; };
AB8F3CD91A53AC2600A80BF6 /* cocoa_file.mm in Sources */ = {isa = PBXBuildFile; fileRef = AB58F32C1364F44B0074C376 /* cocoa_file.mm */; settings = {COMPILER_FLAGS = "-fobjc-arc"; }; };
AB8F3CDA1A53AC2600A80BF6 /* cocoa_firmware.mm in Sources */ = {isa = PBXBuildFile; fileRef = ABE7F53D13EE1C7900FD3A71 /* cocoa_firmware.mm */; settings = {COMPILER_FLAGS = "-fobjc-arc"; }; };
AB8F3CDB1A53AC2600A80BF6 /* cocoa_input.mm in Sources */ = {isa = PBXBuildFile; fileRef = ABD104111346652500AF11D1 /* cocoa_input.mm */; settings = {COMPILER_FLAGS = "-fobjc-arc"; }; };
AB8F3CDC1A53AC2600A80BF6 /* cocoa_output.mm in Sources */ = {isa = PBXBuildFile; fileRef = AB3E34C8134AF4500056477A /* cocoa_output.mm */; };
AB8F3CDD1A53AC2600A80BF6 /* cocoa_rom.mm in Sources */ = {isa = PBXBuildFile; fileRef = ABD104131346652500AF11D1 /* cocoa_rom.mm */; };
AB8F3CDD1A53AC2600A80BF6 /* cocoa_rom.mm in Sources */ = {isa = PBXBuildFile; fileRef = ABD104131346652500AF11D1 /* cocoa_rom.mm */; settings = {COMPILER_FLAGS = "-fobjc-arc"; }; };
AB8F3CDE1A53AC2600A80BF6 /* cocoa_util.mm in Sources */ = {isa = PBXBuildFile; fileRef = AB80E04C142BC4A800A52038 /* cocoa_util.mm */; };
AB8F3CDF1A53AC2600A80BF6 /* cocoa_videofilter.mm in Sources */ = {isa = PBXBuildFile; fileRef = ABE5DFE4143FB1DA00835AD8 /* cocoa_videofilter.mm */; };
AB8F3CE01A53AC2600A80BF6 /* OGLRender.cpp in Sources */ = {isa = PBXBuildFile; fileRef = ABD1FEC11345AC8400AF11D1 /* OGLRender.cpp */; };
@@ -677,7 +650,7 @@
AB8F3D091A53AC2600A80BF6 /* x86compilerfunc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB40566A169F5DCC0016AC3E /* x86compilerfunc.cpp */; };
AB8F3D0A1A53AC2600A80BF6 /* x86compileritem.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB40566C169F5DCC0016AC3E /* x86compileritem.cpp */; };
AB8F3D0B1A53AC2600A80BF6 /* x86cpuinfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB40566E169F5DCC0016AC3E /* x86cpuinfo.cpp */; };
AB8F3D0C1A53AC2600A80BF6 /* cocoa_slot2.mm in Sources */ = {isa = PBXBuildFile; fileRef = AB5648FE186E6EA8002740F4 /* cocoa_slot2.mm */; };
AB8F3D0C1A53AC2600A80BF6 /* cocoa_slot2.mm in Sources */ = {isa = PBXBuildFile; fileRef = AB5648FE186E6EA8002740F4 /* cocoa_slot2.mm */; settings = {COMPILER_FLAGS = "-fobjc-arc"; }; };
AB8F3D0D1A53AC2600A80BF6 /* x86defs.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB405670169F5DCC0016AC3E /* x86defs.cpp */; };
AB8F3D0E1A53AC2600A80BF6 /* x86func.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB405672169F5DCC0016AC3E /* x86func.cpp */; };
AB8F3D0F1A53AC2600A80BF6 /* x86operand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB405674169F5DCC0016AC3E /* x86operand.cpp */; };
@@ -686,7 +659,7 @@
AB8F3D121A53AC2600A80BF6 /* macosx_10_5_compat.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB23567216C2F6F400DA782E /* macosx_10_5_compat.cpp */; };
AB8F3D131A53AC2600A80BF6 /* OGLRender_3_2.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB68A0DA16B139BC00DE0546 /* OGLRender_3_2.cpp */; };
AB8F3D141A53AC2600A80BF6 /* EmuControllerDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = AB3A655D16CC5421001F5D4A /* EmuControllerDelegate.mm */; };
AB8F3D151A53AC2600A80BF6 /* cocoa_GPU.mm in Sources */ = {isa = PBXBuildFile; fileRef = AB3A656016CC5438001F5D4A /* cocoa_GPU.mm */; };
AB8F3D151A53AC2600A80BF6 /* cocoa_GPU.mm in Sources */ = {isa = PBXBuildFile; fileRef = AB3A656016CC5438001F5D4A /* cocoa_GPU.mm */; settings = {COMPILER_FLAGS = "-fobjc-arc"; }; };
AB8F3D161A53AC2600A80BF6 /* slot1comp_rom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB9038AD17C5ED2200F410BD /* slot1comp_rom.cpp */; };
AB8F3D171A53AC2600A80BF6 /* DisplayWindowController.mm in Sources */ = {isa = PBXBuildFile; fileRef = AB8967D816D2ED0700F826F1 /* DisplayWindowController.mm */; };
AB8F3D181A53AC2600A80BF6 /* InputManager.mm in Sources */ = {isa = PBXBuildFile; fileRef = AB29B33016D4BEBF000EF671 /* InputManager.mm */; };
@@ -723,7 +696,7 @@
AB9038B917C5ED2200F410BD /* slot1comp_rom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB9038AD17C5ED2200F410BD /* slot1comp_rom.cpp */; };
AB9038BA17C5ED2200F410BD /* slot1comp_rom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB9038AD17C5ED2200F410BD /* slot1comp_rom.cpp */; };
AB91D46B13BD013800462471 /* fs-linux.cpp in Sources */ = {isa = PBXBuildFile; fileRef = ABD1FEB21345AC8400AF11D1 /* fs-linux.cpp */; };
ABA6574B14511EC90077E5E9 /* cocoa_cheat.mm in Sources */ = {isa = PBXBuildFile; fileRef = ABA6574A14511EC90077E5E9 /* cocoa_cheat.mm */; };
ABA6574B14511EC90077E5E9 /* cocoa_cheat.mm in Sources */ = {isa = PBXBuildFile; fileRef = ABA6574A14511EC90077E5E9 /* cocoa_cheat.mm */; settings = {COMPILER_FLAGS = "-fobjc-arc"; }; };
ABAB454F187CDB70007BE20C /* Image_GuitarGrip.png in Resources */ = {isa = PBXBuildFile; fileRef = ABAB454E187CDB70007BE20C /* Image_GuitarGrip.png */; };
ABAB4550187CDB70007BE20C /* Image_GuitarGrip.png in Resources */ = {isa = PBXBuildFile; fileRef = ABAB454E187CDB70007BE20C /* Image_GuitarGrip.png */; };
ABACB8DC1710B621003B845D /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = ABACB8DB1710B621003B845D /* AudioToolbox.framework */; };
@@ -772,8 +745,8 @@
ABB3C66A1501BF8A00E0C22E /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = AB0A0D1914AACA9600E83E91 /* libz.dylib */; };
ABB3C66C1501C04F00E0C22E /* NDSGameCore.mm in Sources */ = {isa = PBXBuildFile; fileRef = ABB3C63E1501BB8300E0C22E /* NDSGameCore.mm */; };
ABB3C6701501C04F00E0C22E /* videofilter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB817A35143EE2DB00A7DFE9 /* videofilter.cpp */; };
ABB3C6721501C04F00E0C22E /* cocoa_file.mm in Sources */ = {isa = PBXBuildFile; fileRef = AB58F32C1364F44B0074C376 /* cocoa_file.mm */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
ABB3C6751501C04F00E0C22E /* cocoa_rom.mm in Sources */ = {isa = PBXBuildFile; fileRef = ABD104131346652500AF11D1 /* cocoa_rom.mm */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
ABB3C6721501C04F00E0C22E /* cocoa_file.mm in Sources */ = {isa = PBXBuildFile; fileRef = AB58F32C1364F44B0074C376 /* cocoa_file.mm */; };
ABB3C6751501C04F00E0C22E /* cocoa_rom.mm in Sources */ = {isa = PBXBuildFile; fileRef = ABD104131346652500AF11D1 /* cocoa_rom.mm */; };
ABB3C6781501C04F00E0C22E /* slot1_none.cpp in Sources */ = {isa = PBXBuildFile; fileRef = ABD1FF001345AC9B00AF11D1 /* slot1_none.cpp */; };
ABB3C6791501C04F00E0C22E /* slot1_r4.cpp in Sources */ = {isa = PBXBuildFile; fileRef = ABD1FF011345AC9B00AF11D1 /* slot1_r4.cpp */; };
ABB3C67A1501C04F00E0C22E /* slot1_retail_nand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB6FBEF5139B6258007BB045 /* slot1_retail_nand.cpp */; };
@@ -878,7 +851,6 @@
ABC503AD1AAC2B71002FCD43 /* Icon_MicrophoneDarkGreen_256x256.png in Resources */ = {isa = PBXBuildFile; fileRef = ABC503AC1AAC2B71002FCD43 /* Icon_MicrophoneDarkGreen_256x256.png */; };
ABC503AE1AAC2B90002FCD43 /* Icon_MicrophoneDarkGreen_256x256.png in Resources */ = {isa = PBXBuildFile; fileRef = ABC503AC1AAC2B71002FCD43 /* Icon_MicrophoneDarkGreen_256x256.png */; };
ABC503AF1AAC2B91002FCD43 /* Icon_MicrophoneDarkGreen_256x256.png in Resources */ = {isa = PBXBuildFile; fileRef = ABC503AC1AAC2B71002FCD43 /* Icon_MicrophoneDarkGreen_256x256.png */; };
ABC503B01AAC42C2002FCD43 /* coreaudiosound.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB1B9E5F1501A78000464647 /* coreaudiosound.cpp */; };
ABC503B11AAC4355002FCD43 /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = ABB0FBC41A9E5CEA0060C55A /* CoreAudio.framework */; };
ABC570D1134431CE00E7B0B1 /* AudioUnit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = ABC570D0134431CE00E7B0B1 /* AudioUnit.framework */; };
ABC570D5134431DA00E7B0B1 /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = ABC570D4134431DA00E7B0B1 /* OpenGL.framework */; };
@@ -888,9 +860,9 @@
ABCFA9F4178BDE920030C8BA /* encrypt.cpp in Sources */ = {isa = PBXBuildFile; fileRef = ABCFA9F3178BDE920030C8BA /* encrypt.cpp */; };
ABCFA9F5178BDE920030C8BA /* encrypt.cpp in Sources */ = {isa = PBXBuildFile; fileRef = ABCFA9F3178BDE920030C8BA /* encrypt.cpp */; };
ABCFA9F6178BDE920030C8BA /* encrypt.cpp in Sources */ = {isa = PBXBuildFile; fileRef = ABCFA9F3178BDE920030C8BA /* encrypt.cpp */; };
ABD1041C1346652500AF11D1 /* cocoa_input.mm in Sources */ = {isa = PBXBuildFile; fileRef = ABD104111346652500AF11D1 /* cocoa_input.mm */; };
ABD1041C1346652500AF11D1 /* cocoa_input.mm in Sources */ = {isa = PBXBuildFile; fileRef = ABD104111346652500AF11D1 /* cocoa_input.mm */; settings = {COMPILER_FLAGS = "-fobjc-arc"; }; };
ABD1041D1346652500AF11D1 /* cocoa_core.mm in Sources */ = {isa = PBXBuildFile; fileRef = ABD104121346652500AF11D1 /* cocoa_core.mm */; };
ABD1041E1346652500AF11D1 /* cocoa_rom.mm in Sources */ = {isa = PBXBuildFile; fileRef = ABD104131346652500AF11D1 /* cocoa_rom.mm */; };
ABD1041E1346652500AF11D1 /* cocoa_rom.mm in Sources */ = {isa = PBXBuildFile; fileRef = ABD104131346652500AF11D1 /* cocoa_rom.mm */; settings = {COMPILER_FLAGS = "-fobjc-arc"; }; };
ABD1041F1346652500AF11D1 /* sndOSX.cpp in Sources */ = {isa = PBXBuildFile; fileRef = ABD104141346652500AF11D1 /* sndOSX.cpp */; };
ABD104281346653B00AF11D1 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = ABD104271346653B00AF11D1 /* main.m */; };
ABD10AE71715FCDD00B5729D /* audiosamplegenerator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = ABD10AE51715FCDD00B5729D /* audiosamplegenerator.cpp */; };
@@ -900,7 +872,7 @@
ABD10AEB1715FCDD00B5729D /* mic_ext.cpp in Sources */ = {isa = PBXBuildFile; fileRef = ABD10AE61715FCDD00B5729D /* mic_ext.cpp */; };
ABD10AEC1715FCDD00B5729D /* mic_ext.cpp in Sources */ = {isa = PBXBuildFile; fileRef = ABD10AE61715FCDD00B5729D /* mic_ext.cpp */; };
ABD10AED17160C9300B5729D /* ringbuffer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB1B9E601501A78000464647 /* ringbuffer.cpp */; };
ABD10AEE17160CDD00B5729D /* cocoa_input.mm in Sources */ = {isa = PBXBuildFile; fileRef = ABD104111346652500AF11D1 /* cocoa_input.mm */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
ABD10AEE17160CDD00B5729D /* cocoa_input.mm in Sources */ = {isa = PBXBuildFile; fileRef = ABD104111346652500AF11D1 /* cocoa_input.mm */; };
ABD1FED21345AC8400AF11D1 /* arm_instructions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = ABD1FEA31345AC8400AF11D1 /* arm_instructions.cpp */; };
ABD1FED31345AC8400AF11D1 /* armcpu.cpp in Sources */ = {isa = PBXBuildFile; fileRef = ABD1FEA41345AC8400AF11D1 /* armcpu.cpp */; };
ABD1FED41345AC8400AF11D1 /* bios.cpp in Sources */ = {isa = PBXBuildFile; fileRef = ABD1FEA51345AC8400AF11D1 /* bios.cpp */; };
@@ -983,8 +955,8 @@
ABE6702E1415DE6C00E8E4C9 /* tinyxmlparser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = ABE6702A1415DE6C00E8E4C9 /* tinyxmlparser.cpp */; };
ABE6840C189E33BC007FD69C /* OGLDisplayOutput.cpp in Sources */ = {isa = PBXBuildFile; fileRef = ABE6840B189E33BC007FD69C /* OGLDisplayOutput.cpp */; };
ABE6840D189E33BC007FD69C /* OGLDisplayOutput.cpp in Sources */ = {isa = PBXBuildFile; fileRef = ABE6840B189E33BC007FD69C /* OGLDisplayOutput.cpp */; };
ABE7F53E13EE1C7900FD3A71 /* cocoa_firmware.mm in Sources */ = {isa = PBXBuildFile; fileRef = ABE7F53D13EE1C7900FD3A71 /* cocoa_firmware.mm */; };
ABE9EEEA1501C6EB00D3FB19 /* cocoa_firmware.mm in Sources */ = {isa = PBXBuildFile; fileRef = ABE7F53D13EE1C7900FD3A71 /* cocoa_firmware.mm */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
ABE7F53E13EE1C7900FD3A71 /* cocoa_firmware.mm in Sources */ = {isa = PBXBuildFile; fileRef = ABE7F53D13EE1C7900FD3A71 /* cocoa_firmware.mm */; settings = {COMPILER_FLAGS = "-fobjc-arc"; }; };
ABE9EEEA1501C6EB00D3FB19 /* cocoa_firmware.mm in Sources */ = {isa = PBXBuildFile; fileRef = ABE7F53D13EE1C7900FD3A71 /* cocoa_firmware.mm */; };
ABE9EEEB1501C78700D3FB19 /* fs-linux.cpp in Sources */ = {isa = PBXBuildFile; fileRef = ABD1FEB21345AC8400AF11D1 /* fs-linux.cpp */; };
ABEFCF61141AB82A000CC0CD /* AppIcon_ROMSave.icns in Resources */ = {isa = PBXBuildFile; fileRef = ABEFCF5D141AB82A000CC0CD /* AppIcon_ROMSave.icns */; };
ABEFCF62141AB82A000CC0CD /* AppIcon_DeSmuME.icns in Resources */ = {isa = PBXBuildFile; fileRef = ABEFCF5E141AB82A000CC0CD /* AppIcon_DeSmuME.icns */; };
@@ -1002,9 +974,15 @@
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
057577C7236A6B6900254B6A /* coreaudiosound_null.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = coreaudiosound_null.cpp; sourceTree = "<group>"; usesTabs = 0; };
1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; };
29B97324FDCFA39411CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; };
29B97325FDCFA39411CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
55653D9725BE6CA8001C3B62 /* jit-cross.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = "jit-cross.cpp"; sourceTree = "<group>"; };
55653DA625BE6D68001C3B62 /* arm_jit.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = arm_jit.cpp; sourceTree = "<group>"; };
55653DA725BE6D68001C3B62 /* arm_gen.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = arm_gen.h; sourceTree = "<group>"; };
55653DA825BE6D68001C3B62 /* arm_gen.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = arm_gen.cpp; sourceTree = "<group>"; };
55653DA925BE6D68001C3B62 /* reg_manager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = reg_manager.h; sourceTree = "<group>"; };
8D1107310486CEB800E47090 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
8D1107320486CEB800E47090 /* DeSmuME.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = DeSmuME.app; sourceTree = BUILT_PRODUCTS_DIR; };
AB0038A61872A96700B0B055 /* Image_PaddleController.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = Image_PaddleController.png; path = images/Image_PaddleController.png; sourceTree = "<group>"; };
@@ -1667,8 +1645,11 @@
29B97317FDCFA39411CA2CEA /* Resources */,
AB407F381A620D6E00313213 /* OptimizationProfiles */,
);
indentWidth = 4;
name = DeSmuME;
sourceTree = "<group>";
tabWidth = 4;
usesTabs = 1;
};
29B97315FDCFA39411CA2CEA /* Other Sources */ = {
isa = PBXGroup;
@@ -1712,6 +1693,17 @@
name = Frameworks;
sourceTree = "<group>";
};
55653DA525BE6D68001C3B62 /* arm_arm */ = {
isa = PBXGroup;
children = (
55653DA625BE6D68001C3B62 /* arm_jit.cpp */,
55653DA725BE6D68001C3B62 /* arm_gen.h */,
55653DA825BE6D68001C3B62 /* arm_gen.cpp */,
55653DA925BE6D68001C3B62 /* reg_manager.h */,
);
path = arm_arm;
sourceTree = "<group>";
};
AB3ACB6514C2361100D7D192 /* userinterface */ = {
isa = PBXGroup;
children = (
@@ -1865,6 +1857,8 @@
ABB3C6401501BB8300E0C22E /* OESoundInterface.mm */,
ABB3C63B1501BB8300E0C22E /* DeSmuME_Prefix_OpenEmu.pch */,
ABB3C63C1501BB8300E0C22E /* Info (OpenEmu Plug-in).plist */,
057577C7236A6B6900254B6A /* coreaudiosound_null.cpp */,
55653D9725BE6CA8001C3B62 /* jit-cross.cpp */,
);
path = openemu;
sourceTree = "<group>";
@@ -2110,6 +2104,7 @@
ABD1FF1C1345ACBF00AF11D1 /* utils */ = {
isa = PBXGroup;
children = (
55653DA525BE6D68001C3B62 /* arm_arm */,
AB796D7415CDD20E00C59155 /* AsmJit */,
ABD1FF211345ACBF00AF11D1 /* decrypt */,
ABD1FF2E1345ACBF00AF11D1 /* libfat */,
@@ -3367,6 +3362,7 @@
AB9038B417C5ED2200F410BD /* slot1_retail_mcrom.cpp in Sources */,
ABB3C6791501C04F00E0C22E /* slot1_r4.cpp in Sources */,
ABB3C67A1501C04F00E0C22E /* slot1_retail_nand.cpp in Sources */,
55653D9825BE6CA8001C3B62 /* jit-cross.cpp in Sources */,
ABB3C67C1501C04F00E0C22E /* slot2_expMemory.cpp in Sources */,
ABB3C67D1501C04F00E0C22E /* slot2_gbagame.cpp in Sources */,
ABB3C67E1501C04F00E0C22E /* slot2_guitarGrip.cpp in Sources */,
@@ -3377,7 +3373,6 @@
ABB3C6821501C04F00E0C22E /* slot2_piano.cpp in Sources */,
ABB3C6831501C04F00E0C22E /* slot2_rumblepak.cpp in Sources */,
ABB3C6841501C04F00E0C22E /* 2xsai.cpp in Sources */,
ABC503B01AAC42C2002FCD43 /* coreaudiosound.cpp in Sources */,
ABB3C6851501C04F00E0C22E /* bilinear.cpp in Sources */,
ABB3C6861501C04F00E0C22E /* epx.cpp in Sources */,
ABB3C6871501C04F00E0C22E /* hq2x.cpp in Sources */,
@@ -3389,6 +3384,7 @@
ABB3C68D1501C04F00E0C22E /* FIFOSampleBuffer.cpp in Sources */,
AB9038A817C5ECFD00F410BD /* advanscene.cpp in Sources */,
ABB3C68E1501C04F00E0C22E /* FIRFilter.cpp in Sources */,
057577C9236A6B6900254B6A /* coreaudiosound_null.cpp in Sources */,
ABB3C68F1501C04F00E0C22E /* mmx_optimized.cpp in Sources */,
ABB3C6901501C04F00E0C22E /* RateTransposer.cpp in Sources */,
ABB3C6911501C04F00E0C22E /* SoundTouch.cpp in Sources */,
@@ -3469,35 +3465,6 @@
ABE9EEEA1501C6EB00D3FB19 /* cocoa_firmware.mm in Sources */,
AB1949DB15034F900098793E /* OESoundInterface.mm in Sources */,
AB796C9F15CDCB0F00C59155 /* arm_jit.cpp in Sources */,
AB40562C169F5DBB0016AC3E /* assembler.cpp in Sources */,
AB40562F169F5DBB0016AC3E /* assert.cpp in Sources */,
AB405632169F5DBB0016AC3E /* buffer.cpp in Sources */,
AB405635169F5DBB0016AC3E /* compiler.cpp in Sources */,
AB405638169F5DBB0016AC3E /* compilercontext.cpp in Sources */,
AB40563B169F5DBB0016AC3E /* compilerfunc.cpp in Sources */,
AB40563E169F5DBB0016AC3E /* compileritem.cpp in Sources */,
AB405641169F5DBB0016AC3E /* context.cpp in Sources */,
AB405644169F5DBB0016AC3E /* cpuinfo.cpp in Sources */,
AB405647169F5DBB0016AC3E /* defs.cpp in Sources */,
AB40564A169F5DBB0016AC3E /* func.cpp in Sources */,
AB40564D169F5DBB0016AC3E /* logger.cpp in Sources */,
AB405650169F5DBB0016AC3E /* memorymanager.cpp in Sources */,
AB405653169F5DBB0016AC3E /* memorymarker.cpp in Sources */,
AB405656169F5DBB0016AC3E /* operand.cpp in Sources */,
AB405659169F5DBB0016AC3E /* stringbuilder.cpp in Sources */,
AB40565C169F5DBB0016AC3E /* stringutil.cpp in Sources */,
AB40565F169F5DBB0016AC3E /* virtualmemory.cpp in Sources */,
AB405662169F5DBB0016AC3E /* zonememory.cpp in Sources */,
AB40567A169F5DCC0016AC3E /* x86assembler.cpp in Sources */,
AB40567D169F5DCC0016AC3E /* x86compiler.cpp in Sources */,
AB405680169F5DCC0016AC3E /* x86compilercontext.cpp in Sources */,
AB405683169F5DCC0016AC3E /* x86compilerfunc.cpp in Sources */,
AB405686169F5DCC0016AC3E /* x86compileritem.cpp in Sources */,
AB405689169F5DCC0016AC3E /* x86cpuinfo.cpp in Sources */,
AB40568C169F5DCC0016AC3E /* x86defs.cpp in Sources */,
AB40568F169F5DCC0016AC3E /* x86func.cpp in Sources */,
AB405692169F5DCC0016AC3E /* x86operand.cpp in Sources */,
AB405695169F5DCC0016AC3E /* x86util.cpp in Sources */,
AB68A0DD16B139BC00DE0546 /* OGLRender_3_2.cpp in Sources */,
AB9038B717C5ED2200F410BD /* slot1comp_mc.cpp in Sources */,
AB3A656316CC5438001F5D4A /* cocoa_GPU.mm in Sources */,
@@ -3604,6 +3571,8 @@
GCC_PREFIX_HEADER = openemu/DeSmuME_Prefix_OpenEmu.pch;
INFOPLIST_FILE = "openemu/Info (OpenEmu Plug-in).plist";
MACOSX_DEPLOYMENT_TARGET = 10.11;
"MACOSX_DEPLOYMENT_TARGET[arch=arm64]" = 11.0;
PRODUCT_BUNDLE_IDENTIFIER = org.openemu.desmume;
PRODUCT_NAME = DeSmuME;
WRAPPER_EXTENSION = oecoreplugin;
};
@@ -3623,6 +3592,8 @@
INFOPLIST_FILE = "openemu/Info (OpenEmu Plug-in).plist";
LLVM_LTO = YES;
MACOSX_DEPLOYMENT_TARGET = 10.11;
"MACOSX_DEPLOYMENT_TARGET[arch=arm64]" = 11.0;
PRODUCT_BUNDLE_IDENTIFIER = org.openemu.desmume;
PRODUCT_NAME = DeSmuME;
WRAPPER_EXTENSION = oecoreplugin;
};
-2
View File
@@ -109,8 +109,6 @@ GPU3DInterface *core3DList[] = {
{
NDS_3D_ChangeCore(CORE3DLIST_NULL);
DestroyOpenGLRenderer();
[super dealloc];
}
- (void) setGpuStateFlags:(UInt32)flags
+15 -18
View File
@@ -43,30 +43,30 @@ class CHEATSEARCH;
pthread_mutex_t mutexData;
CocoaDSCheatItem *workingCopy;
CocoaDSCheatItem *parent;
CocoaDSCheatItem *__weak parent;
}
@property (assign) CHEATS_LIST *data;
@property (assign) BOOL willAdd;
@property (assign, nonatomic) BOOL enabled;
@property (assign, nonatomic) NSInteger cheatType;
@property (assign, nonatomic) NSImage *cheatTypeIcon;
@property (strong, nonatomic) NSImage *cheatTypeIcon;
@property (assign, nonatomic) BOOL isSupportedCheatType;
@property (assign, nonatomic) NSInteger freezeType;
@property (assign, nonatomic) NSString *description;
@property (copy, nonatomic) NSString *description;
@property (assign, nonatomic) NSUInteger codeCount;
@property (assign, nonatomic) NSString *code;
@property (copy, nonatomic) NSString *code;
@property (assign, nonatomic) UInt8 bytes;
@property (assign, nonatomic) UInt32 memAddress;
@property (assign, nonatomic) NSString *memAddressString;
@property (assign, nonatomic) NSString *memAddressSixDigitString;
@property (copy, nonatomic) NSString *memAddressString;
@property (copy, nonatomic) NSString *memAddressSixDigitString;
@property (assign, nonatomic) SInt64 value;
@property (readonly) CocoaDSCheatItem *workingCopy;
@property (assign) CocoaDSCheatItem *parent;
@property (readonly, strong) CocoaDSCheatItem *workingCopy;
@property (weak) CocoaDSCheatItem *parent;
- (id) initWithCheatData:(CHEATS_LIST *)cheatData;
- (BOOL) retainData;
- (char *) descriptionCString;
@property (readonly) char *descriptionCString NS_RETURNS_INNER_POINTER;
- (void) update;
- (CocoaDSCheatItem *) createWorkingCopy;
- (void) destroyWorkingCopy;
@@ -75,12 +75,9 @@ class CHEATSEARCH;
- (void) setDataWithDictionary:(NSDictionary *)dataDict;
- (NSDictionary *) dataDictionary;
+ (void) setIconInternalCheat:(NSImage *)iconImage;
+ (NSImage *) iconInternalCheat;
+ (void) setIconActionReplay:(NSImage *)iconImage;
+ (NSImage *) iconActionReplay;
+ (void) setIconCodeBreaker:(NSImage *)iconImage;
+ (NSImage *) iconCodeBreaker;
@property (class, strong) NSImage *iconInternalCheat;
@property (class, strong) NSImage *iconActionReplay;
@property (class, strong) NSImage *iconCodeBreaker;
@end
@@ -106,7 +103,7 @@ class CHEATSEARCH;
}
@property (readonly) CHEATS *listData;
@property (readonly) NSMutableArray *list;
@property (readonly, strong) NSMutableArray *list;
@property (assign) pthread_rwlock_t *rwlockCoreExecute;
@property (assign) NSUInteger untitledCount;
@property (copy) NSString *dbTitle;
@@ -145,7 +142,7 @@ class CHEATSEARCH;
}
@property (readonly) CHEATSEARCH *listData;
@property (readonly) NSMutableArray *addressList;
@property (readonly, strong) NSMutableArray<NSDictionary<NSString*,id>*> *addressList;
@property (assign) pthread_rwlock_t *rwlockCoreExecute;
@property (readonly) NSUInteger searchCount;
@@ -155,7 +152,7 @@ class CHEATSEARCH;
- (void) runComparativeSearchOnThread:(id)object;
- (void) reset;
+ (NSMutableArray *) addressListWithListObject:(CHEATSEARCH *)addressList maxItems:(NSUInteger)maxItemCount;
+ (NSMutableArray<NSDictionary<NSString*,id>*> *) addressListWithListObject:(CHEATSEARCH *)addressList maxItems:(NSUInteger)maxItemCount;
@end
+6 -27
View File
@@ -67,7 +67,6 @@ static NSImage *iconCodeBreaker = nil;
internalData = (CHEATS_LIST *)malloc(sizeof(CHEATS_LIST));
if (internalData == NULL)
{
[self release];
return nil;
}
@@ -105,8 +104,6 @@ static NSImage *iconCodeBreaker = nil;
internalData = NULL;
pthread_mutex_destroy(&mutexData);
[super dealloc];
}
- (CHEATS_LIST *) data
@@ -494,11 +491,6 @@ static NSImage *iconCodeBreaker = nil;
{
CocoaDSCheatItem *newWorkingCopy = nil;
if (workingCopy != nil)
{
[workingCopy release];
}
newWorkingCopy = [[CocoaDSCheatItem alloc] initWithCheatData:self.data];
[newWorkingCopy retainData];
newWorkingCopy.parent = self;
@@ -509,7 +501,6 @@ static NSImage *iconCodeBreaker = nil;
- (void) destroyWorkingCopy
{
[workingCopy release];
workingCopy = nil;
}
@@ -695,7 +686,6 @@ static NSImage *iconCodeBreaker = nil;
CHEATS *newListData = new CHEATS();
if (newListData == nil)
{
[self release];
return nil;
}
@@ -709,7 +699,7 @@ static NSImage *iconCodeBreaker = nil;
if (fileURL != nil)
{
listData->init((char *)[[fileURL path] cStringUsingEncoding:NSUTF8StringEncoding]);
list = [[CocoaDSCheatManager cheatListWithListObject:listData] retain];
list = [CocoaDSCheatManager cheatListWithListObject:listData];
}
else
{
@@ -717,7 +707,6 @@ static NSImage *iconCodeBreaker = nil;
if (list == nil)
{
delete listData;
[self release];
return nil;
}
}
@@ -737,7 +726,6 @@ static NSImage *iconCodeBreaker = nil;
{
self.dbTitle = nil;
self.dbDate = nil;
[list release];
delete (CHEATS *)self.listData;
if (isUsingDummyRWlock)
@@ -746,8 +734,6 @@ static NSImage *iconCodeBreaker = nil;
free(rwlockCoreExecute);
rwlockCoreExecute = NULL;
}
[super dealloc];
}
- (void) setRwlockCoreExecute:(pthread_rwlock_t *)theRwlock
@@ -1071,7 +1057,7 @@ static NSImage *iconCodeBreaker = nil;
u32 itemCount = cheatList->getSize();
for (u32 i = 0; i < itemCount; i++)
{
[newList addObject:[[[CocoaDSCheatItem alloc] initWithCheatData:cheatList->getItemByIndex(i)] autorelease]];
[newList addObject:[[CocoaDSCheatItem alloc] initWithCheatData:cheatList->getItemByIndex(i)]];
}
return newList;
@@ -1092,7 +1078,7 @@ static NSImage *iconCodeBreaker = nil;
for (NSUInteger i = 0; i < itemCount; i++)
{
[newList addObject:[[[CocoaDSCheatItem alloc] initWithCheatData:cheatItemArray + i] autorelease]];
[newList addObject:[[CocoaDSCheatItem alloc] initWithCheatData:cheatItemArray + i]];
}
return newList;
@@ -1142,7 +1128,6 @@ static NSImage *iconCodeBreaker = nil;
CHEATSEARCH *newListData = new CHEATSEARCH();
if (newListData == nil)
{
[self release];
return nil;
}
@@ -1163,7 +1148,6 @@ static NSImage *iconCodeBreaker = nil;
self.listData->close();
pthread_rwlock_unlock(self.rwlockCoreExecute);
[addressList release];
delete (CHEATSEARCH *)self.listData;
if (isUsingDummyRWlock)
@@ -1172,8 +1156,6 @@ static NSImage *iconCodeBreaker = nil;
free(rwlockCoreExecute);
rwlockCoreExecute = NULL;
}
[super dealloc];
}
- (void) setRwlockCoreExecute:(pthread_rwlock_t *)theRwlock
@@ -1225,10 +1207,9 @@ static NSImage *iconCodeBreaker = nil;
{
pthread_rwlock_rdlock(self.rwlockCoreExecute);
itemCount = (NSUInteger)self.listData->search((u32)value);
NSMutableArray *newAddressList = [[CocoaDSCheatSearch addressListWithListObject:self.listData maxItems:100] retain];
NSMutableArray *newAddressList = [CocoaDSCheatSearch addressListWithListObject:self.listData maxItems:100];
pthread_rwlock_unlock(self.rwlockCoreExecute);
[addressList release];
addressList = newAddressList;
searchCount++;
}
@@ -1263,10 +1244,9 @@ static NSImage *iconCodeBreaker = nil;
{
pthread_rwlock_rdlock(self.rwlockCoreExecute);
itemCount = (NSUInteger)self.listData->search((u8)typeID);
NSMutableArray *newAddressList = [[CocoaDSCheatSearch addressListWithListObject:self.listData maxItems:100] retain];
NSMutableArray *newAddressList = [CocoaDSCheatSearch addressListWithListObject:self.listData maxItems:100];
pthread_rwlock_unlock(self.rwlockCoreExecute);
[addressList release];
addressList = newAddressList;
}
@@ -1293,7 +1273,6 @@ static NSImage *iconCodeBreaker = nil;
pthread_rwlock_unlock(self.rwlockCoreExecute);
searchCount = 0;
[addressList release];
addressList = nil;
}
@@ -1325,7 +1304,7 @@ static NSImage *iconCodeBreaker = nil;
{
newItem = [NSMutableDictionary dictionaryWithObjectsAndKeys:
[NSString stringWithFormat:@"0x02%06X", address], @"addressString",
[NSNumber numberWithUnsignedInteger:value], @"value",
@(value), @"value",
nil];
[newList addObject:newItem];
-3
View File
@@ -24,9 +24,6 @@
@interface CocoaDSFile : NSDocument
{
}
+ (NSMutableDictionary *) URLDictionary;
+ (void) addURLToURLDictionary:(NSURL *)theURL groupKey:(NSString *)groupKey fileKind:(NSString *)fileKind;
-12
View File
@@ -238,7 +238,6 @@ static NSMutableDictionary *_gURLDictionary = nil;
NSString *destinationPath = [[destinationURL path] stringByAppendingPathExtension:@FILE_EXT_ROM_SAVE];
NSFileManager *fileManager = [[NSFileManager alloc] init];
result = [fileManager copyItemAtPath:[romSaveURL path] toPath:destinationPath error:nil];
[fileManager release];
break;
}
#endif
@@ -294,7 +293,6 @@ static NSMutableDictionary *_gURLDictionary = nil;
NSFileManager *fileManager = [[NSFileManager alloc] init];
exists = [fileManager isReadableFileAtPath:romSavePath];
[fileManager release];
return exists;
}
@@ -312,7 +310,6 @@ static NSMutableDictionary *_gURLDictionary = nil;
NSFileManager *fileManager = [[NSFileManager alloc] init];
exists = [fileManager isReadableFileAtPath:romSavePath];
[fileManager release];
return exists;
}
@@ -734,7 +731,6 @@ static NSMutableDictionary *_gURLDictionary = nil;
NSFileManager *fileManager = [[NSFileManager alloc] init];
result = [fileManager fileExistsAtPath:filePath];
[fileManager release];
return result;
}
@@ -940,7 +936,6 @@ static NSMutableDictionary *_gURLDictionary = nil;
NSFileManager *fileManager = [[NSFileManager alloc] init];
exists = [fileManager isReadableFileAtPath:saveStateFilePath];
[fileManager release];
return exists;
}
@@ -1122,7 +1117,6 @@ static NSMutableDictionary *_gURLDictionary = nil;
result = [fileManager createDirectoryAtPath:tempPath withIntermediateDirectories:YES attributes:nil error:NULL];
#endif
[fileManager release];
return result;
}
@@ -1153,7 +1147,6 @@ static NSMutableDictionary *_gURLDictionary = nil;
NSFileManager *fileManager = [[NSFileManager alloc] init];
result = [fileManager moveItemAtPath:filePath toPath:newLocationPath error:nil];
[fileManager release];
return result;
}
@@ -1178,7 +1171,6 @@ static NSMutableDictionary *_gURLDictionary = nil;
NSFileManager *fileManager = [[NSFileManager alloc] init];
result = [fileManager copyItemAtPath:filePath toPath:newLocationPath error:nil];
[fileManager release];
return result;
}
@@ -1204,14 +1196,12 @@ static NSMutableDictionary *_gURLDictionary = nil;
NSArray *fileList = [fileManager contentsOfDirectoryAtPath:directoryPath error:nil];
if (fileList == nil)
{
[fileManager release];
return outArray;
}
outArray = [NSMutableArray arrayWithCapacity:100];
if (outArray == nil)
{
[fileManager release];
return outArray;
}
@@ -1243,8 +1233,6 @@ static NSMutableDictionary *_gURLDictionary = nil;
[outArray addObject:finalDict];
}
[fileManager release];
return outArray;
}
+1 -1
View File
@@ -46,7 +46,7 @@
@property (assign) struct NDS_fw_config_data *data;
@property (assign) NSInteger consoleType;
@property (copy) NSString *nickname;
@property (nonatomic, copy) NSString *nickname;
@property (copy) NSString *message;
@property (assign) NSInteger favoriteColor;
@property (assign) NSDate *birthday;
+10 -11
View File
@@ -52,7 +52,6 @@
if (internalData == nil)
{
pthread_mutex_destroy(&mutex);
[self release];
return nil;
}
@@ -78,7 +77,6 @@
if (fwData == nil)
{
pthread_mutex_destroy(&mutex);
[self release];
return nil;
}
@@ -87,8 +85,6 @@
NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
[dateFormatter setDateFormat:@"Y"];
birth_year = [[dateFormatter stringFromDate:now] integerValue];
[dateFormatter release];
[now release];
internalData = NULL;
data = fwData;
@@ -102,8 +98,6 @@
internalData = NULL;
pthread_mutex_destroy(&mutex);
[super dealloc];
}
- (void) setConsoleType:(NSInteger)theType
@@ -157,7 +151,7 @@
- (NSString *) nickname
{
pthread_mutex_lock(&mutex);
NSString *theNickname = [[[NSString alloc] initWithBytes:&data->nickname[0] length:(sizeof(UInt16) * data->nickname_len) encoding:NSUTF16LittleEndianStringEncoding] autorelease];
NSString *theNickname = [[NSString alloc] initWithBytes:&data->nickname[0] length:(sizeof(UInt16) * data->nickname_len) encoding:NSUTF16LittleEndianStringEncoding];
pthread_mutex_unlock(&mutex);
return theNickname;
@@ -198,7 +192,7 @@
- (NSString *) message
{
pthread_mutex_lock(&mutex);
NSString *theMessage = [[[NSString alloc] initWithBytes:&data->message[0] length:(sizeof(UInt16) * data->message_len) encoding:NSUTF16LittleEndianStringEncoding] autorelease];
NSString *theMessage = [[NSString alloc] initWithBytes:&data->message[0] length:(sizeof(UInt16) * data->message_len) encoding:NSUTF16LittleEndianStringEncoding];
pthread_mutex_unlock(&mutex);
return theMessage;
@@ -237,8 +231,6 @@
[dateFormatter setDateFormat:@"Y"];
NSInteger theYear = [[dateFormatter stringFromDate:theDate] integerValue];
[dateFormatter release];
data->birth_month = (u8)theMonth;
data->birth_day = (u8)theDay;
birth_year = theYear;
@@ -256,7 +248,14 @@
- (NSDate *) birthday
{
pthread_mutex_lock(&mutex);
NSDate *theBirthday = [NSDate dateWithString:[NSString stringWithFormat:@"%ld-%ld-%ld 12:00:00 +0000", (unsigned long)birth_year, (unsigned long)data->birth_month, (unsigned long)data->birth_day]];
NSDateComponents *components = [[NSDateComponents alloc] init];
components.year = birth_year;
components.month = data->birth_month;
components.day = data->birth_day;
components.timeZone = [NSTimeZone timeZoneForSecondsFromGMT:0];
components.hour = 12;
NSCalendar *cal = [NSCalendar calendarWithIdentifier:NSCalendarIdentifierGregorian];
NSDate *theBirthday = [cal dateFromComponents:components];
pthread_mutex_unlock(&mutex);
return theBirthday;
+7 -7
View File
@@ -115,7 +115,7 @@ typedef struct
OSSpinLock spinlockControllerState;
}
@property (retain) id <CocoaDSControllerDelegate> delegate;
@property (strong) id <CocoaDSControllerDelegate> delegate;
@property (assign) BOOL autohold;
@property (readonly) BOOL isHardwareMicAvailable;
@property (readonly) BOOL isHardwareMicIdle;
@@ -129,14 +129,14 @@ typedef struct
@property (assign) BOOL softwareMicState;
@property (assign) NSInteger softwareMicMode;
@property (assign) NSInteger micMode;
@property (readonly) CoreAudioInput *CAInputDevice;
@property (readonly) AudioGenerator *softwareMicSampleGenerator;
@property (readonly, strong) CoreAudioInput *CAInputDevice;
@property (readonly, strong) AudioGenerator *softwareMicSampleGenerator;
@property (assign) AudioSampleBlockGenerator *selectedAudioFileGenerator;
@property (assign) NSInteger paddleAdjust;
@property (retain) NSString *hardwareMicInfoString;
@property (retain) NSString *hardwareMicNameString;
@property (retain) NSString *hardwareMicManufacturerString;
@property (retain) NSString *hardwareMicSampleRateString;
@property (copy) NSString *hardwareMicInfoString;
@property (copy) NSString *hardwareMicNameString;
@property (copy) NSString *hardwareMicManufacturerString;
@property (copy) NSString *hardwareMicSampleRateString;
- (void) setControllerState:(BOOL)theState controlID:(const NSUInteger)controlID;
- (void) setControllerState:(BOOL)theState controlID:(const NSUInteger)controlID turbo:(const BOOL)isTurboEnabled;
+11 -12
View File
@@ -88,8 +88,8 @@ SineWaveGenerator sineWaveGenerator(250.0, MIC_SAMPLE_RATE);
micMode = MICMODE_NONE;
selectedAudioFileGenerator = NULL;
CAInputDevice = new CoreAudioInput;
CAInputDevice->SetCallbackHardwareStateChanged(&CAHardwareStateChangedCallback, self, NULL);
CAInputDevice->SetCallbackHardwareGainChanged(&CAHardwareGainChangedCallback, self, NULL);
CAInputDevice->SetCallbackHardwareStateChanged(&CAHardwareStateChangedCallback, (__bridge void*)self, NULL);
CAInputDevice->SetCallbackHardwareGainChanged(&CAHardwareGainChangedCallback, (__bridge void*)self, NULL);
softwareMicSampleGenerator = &nullSampleGenerator;
touchLocation = NSMakePoint(0.0f, 0.0f);
paddleAdjust = 0;
@@ -99,8 +99,8 @@ SineWaveGenerator sineWaveGenerator(250.0, MIC_SAMPLE_RATE);
hardwareMicManufacturerString = @"No hardware input detected.";
hardwareMicSampleRateString = @"No hardware input detected.";
Mic_SetResetCallback(&CAResetCallback, self, NULL);
Mic_SetSampleReadCallback(&CASampleReadCallback, self, NULL);
Mic_SetResetCallback(&CAResetCallback, (__bridge void*)self, NULL);
Mic_SetSampleReadCallback(&CASampleReadCallback, (__bridge void*)self, NULL);
return self;
}
@@ -109,7 +109,6 @@ SineWaveGenerator sineWaveGenerator(250.0, MIC_SAMPLE_RATE);
{
delete CAInputDevice;
delete _hwMicLevelList;
[super dealloc];
}
- (BOOL) isHardwareMicAvailable
@@ -592,10 +591,10 @@ SineWaveGenerator sineWaveGenerator(250.0, MIC_SAMPLE_RATE);
else
{
[self setHardwareMicInfoString:[NSString stringWithFormat:@"%@\nSample Rate: %1.1f Hz",
(NSString *)deviceInfo->name,
(__bridge NSString *)deviceInfo->name,
(double)deviceInfo->sampleRate]];
[self setHardwareMicNameString:(NSString *)deviceInfo->name];
[self setHardwareMicManufacturerString:(NSString *)deviceInfo->manufacturer];
[self setHardwareMicNameString:(__bridge NSString *)deviceInfo->name];
[self setHardwareMicManufacturerString:(__bridge NSString *)deviceInfo->manufacturer];
[self setHardwareMicSampleRateString:[NSString stringWithFormat:@"%1.1f Hz", (double)deviceInfo->sampleRate]];
}
@@ -622,13 +621,13 @@ SineWaveGenerator sineWaveGenerator(250.0, MIC_SAMPLE_RATE);
void CAResetCallback(void *inParam1, void *inParam2)
{
CocoaDSController *cdsController = (CocoaDSController *)inParam1;
CocoaDSController *cdsController = (__bridge CocoaDSController *)inParam1;
[cdsController CAInputDevice]->Start();
}
uint8_t CASampleReadCallback(void *inParam1, void *inParam2)
{
CocoaDSController *cdsController = (CocoaDSController *)inParam1;
CocoaDSController *cdsController = (__bridge CocoaDSController *)inParam1;
return [cdsController handleMicSampleRead:[cdsController CAInputDevice] softwareMic:[cdsController softwareMicSampleGenerator]];
}
@@ -638,7 +637,7 @@ void CAHardwareStateChangedCallback(CoreAudioInputDeviceInfo *deviceInfo,
void *inParam1,
void *inParam2)
{
CocoaDSController *cdsController = (CocoaDSController *)inParam1;
CocoaDSController *cdsController = (__bridge CocoaDSController *)inParam1;
[cdsController handleMicHardwareStateChanged:(CoreAudioInputDeviceInfo *)deviceInfo
isEnabled:((isHardwareEnabled) ? YES : NO)
isLocked:((isHardwareLocked) ? YES : NO)];
@@ -646,6 +645,6 @@ void CAHardwareStateChangedCallback(CoreAudioInputDeviceInfo *deviceInfo,
void CAHardwareGainChangedCallback(float normalizedGain, void *inParam1, void *inParam2)
{
CocoaDSController *cdsController = (CocoaDSController *)inParam1;
CocoaDSController *cdsController = (__bridge CocoaDSController *)inParam1;
[cdsController handleMicHardwareGainChanged:normalizedGain];
}
+9 -9
View File
@@ -36,9 +36,9 @@
NSMutableArray *xmlCharacterStack;
}
@property (readonly) NSMutableDictionary *header;
@property (readonly) NSMutableDictionary *bindings;
@property (readonly) NSURL *fileURL;
@property (readonly, strong) NSMutableDictionary *header;
@property (readonly, strong) NSMutableDictionary *bindings;
@property (readonly, strong) NSURL *fileURL;
@property (assign) BOOL willStreamLoadData;
@property (readonly) BOOL isDataLoaded;
@property (assign) NSInteger saveType;
@@ -49,13 +49,13 @@
- (void) initHeader;
- (BOOL) loadData:(NSURL *)theURL;
- (void) loadDataOnThread:(id)object;
- (NSString *) title;
- (NSString *) code;
@property (readonly, copy) NSString *title;
@property (readonly, copy) NSString *code;
- (NSString *) banner:(const UInt16 *)UTF16TextBuffer;
- (NSString *) internalName;
- (NSString *) serial;
- (NSString *) developerName;
- (NSString *) developerNameAndCode;
@property (readonly, copy) NSString *internalName;
@property (readonly, copy) NSString *serial;
@property (readonly, copy) NSString *developerName;
@property (readonly, copy) NSString *developerNameAndCode;
- (NSString *) unitCodeStringUsingID:(NSInteger)unitCodeID;
- (NSImage *) icon;
- (void) handleAdvansceneDatabaseInfo;
+13 -38
View File
@@ -79,18 +79,13 @@ static NSMutableDictionary *saveTypeValues = nil;
header = [[NSMutableDictionary alloc] initWithCapacity:32];
if (header == nil)
{
[self release];
self = nil;
return self;
return nil;
}
bindings = [[CocoaDSRom romNotLoadedBindings] retain];
bindings = [CocoaDSRom romNotLoadedBindings];
if (bindings == nil)
{
[header release];
[self release];
self = nil;
return self;
return nil;
}
fileURL = nil;
@@ -116,14 +111,6 @@ static NSMutableDictionary *saveTypeValues = nil;
{
NDS_FreeROM();
}
[xmlElementStack release];
[xmlCharacterStack release];
[header release];
[bindings release];
[fileURL release];
[super dealloc];
}
- (void) setWillStreamLoadData:(BOOL)theState
@@ -246,7 +233,6 @@ static NSMutableDictionary *saveTypeValues = nil;
{
NSDictionary *userInfo = [[NSDictionary alloc] initWithObjectsAndKeys:[NSNumber numberWithBool:NO], @"DidLoad", nil];
[[NSNotificationCenter defaultCenter] postNotificationOnMainThreadName:@"org.desmume.DeSmuME.loadRomDidFinish" object:self userInfo:userInfo];
[userInfo release];
return result;
}
@@ -256,34 +242,26 @@ static NSMutableDictionary *saveTypeValues = nil;
NSString *advscDBPath = [[NSUserDefaults standardUserDefaults] stringForKey:@"Advanscene_DatabasePath"];
if (advscDBPath != nil)
{
NSError *xmlError = [[NSError alloc] init];
NSXMLParser *advscDB = [[NSXMLParser alloc] initWithContentsOfURL:[NSURL fileURLWithPath:advscDBPath]];
[advscDB setDelegate:self];
[advscDB parse];
[advscDB release];
[xmlError release];
}
NSDictionary *userInfo = [[NSDictionary alloc] initWithObjectsAndKeys:[NSNumber numberWithBool:YES], @"DidLoad", self.fileURL, @"URL", nil];
[[NSNotificationCenter defaultCenter] postNotificationOnMainThreadName:@"org.desmume.DeSmuME.loadRomDidFinish" object:self userInfo:userInfo];
[userInfo release];
return result;
}
- (void) loadDataOnThread:(id)object
{
[self retain];
__strong CocoaDSRom *strongSelf = self;
NSURL *theURL = [(NSURL *)object copy];
NSAutoreleasePool *threadPool = [[NSAutoreleasePool alloc] init];
[self loadData:theURL];
[threadPool release];
[theURL release];
[self release];
@autoreleasepool {
[strongSelf loadData:theURL];
}
strongSelf = nil;
}
- (NSString *) title
@@ -294,7 +272,7 @@ static NSMutableDictionary *saveTypeValues = nil;
return nil;
}
return [[[NSString alloc] initWithBytes:ndsRomHeader->gameTile length:ROMINFO_GAME_TITLE_LENGTH encoding:NSUTF8StringEncoding] autorelease];
return [[NSString alloc] initWithBytes:ndsRomHeader->gameTile length:ROMINFO_GAME_TITLE_LENGTH encoding:NSUTF8StringEncoding];
}
- (NSString *) code
@@ -305,14 +283,14 @@ static NSMutableDictionary *saveTypeValues = nil;
return nil;
}
return [[[NSString alloc] initWithBytes:ndsRomHeader->gameCode length:ROMINFO_GAME_CODE_LENGTH encoding:NSUTF8StringEncoding] autorelease];
return [[NSString alloc] initWithBytes:ndsRomHeader->gameCode length:ROMINFO_GAME_CODE_LENGTH encoding:NSUTF8StringEncoding];
}
- (NSString *) banner:(const UInt16 *)UTF16TextBuffer
{
NSUInteger bannerLength = ROMINFO_GAME_BANNER_LENGTH * sizeof(*UTF16TextBuffer);
return [[[NSString alloc] initWithBytes:UTF16TextBuffer length:bannerLength encoding:NSUTF16LittleEndianStringEncoding] autorelease];
return [[NSString alloc] initWithBytes:UTF16TextBuffer length:bannerLength encoding:NSUTF16LittleEndianStringEncoding];
}
- (NSString *) internalName
@@ -411,7 +389,6 @@ static NSMutableDictionary *saveTypeValues = nil;
if(imageRep == nil)
{
[newImage release];
newImage = nil;
return newImage;
}
@@ -427,10 +404,9 @@ static NSMutableDictionary *saveTypeValues = nil;
}
#endif
[imageRep autorelease];
[newImage addRepresentation:imageRep];
return [newImage autorelease];
return newImage;
}
- (void) handleAdvansceneDatabaseInfo
@@ -493,7 +469,6 @@ static NSMutableDictionary *saveTypeValues = nil;
[parser abortParsing];
}
[xmlCurrentRom release];
xmlCurrentRom = nil;
}
else
@@ -557,7 +532,7 @@ static NSMutableDictionary *saveTypeValues = nil;
+ (NSMutableDictionary *) romNotLoadedBindings
{
NSImage *iconImage = [[[NSImage alloc] initWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"AppIcon_DeSmuME" ofType:@"icns"]] autorelease];
NSImage *iconImage = [[NSImage alloc] initWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"AppIcon_DeSmuME" ofType:@"icns"]];
NSString *romNameAndSerialInfoString = @"Name: ";
romNameAndSerialInfoString = [romNameAndSerialInfoString stringByAppendingString:NSSTRING_STATUS_NO_ROM_LOADED];
+6 -6
View File
@@ -25,8 +25,8 @@
BOOL enabled;
}
@property (readonly) NSString *name;
@property (readonly) NSString *description;
@property (readonly, copy) NSString *name;
@property (readonly, copy) NSString *description;
@property (readonly) NSInteger deviceID;
@property (readonly) NDS_SLOT2_TYPE type;
@property (assign) BOOL enabled;
@@ -42,10 +42,10 @@
NSString *slot2StatusText;
}
@property (readonly) NSMutableArray *deviceList;
@property (retain) CocoaDSSlot2Device *currentDevice;
@property (assign) NSString *slot2StatusText;
@property (retain) NSURL *mpcfFileSearchURL;
@property (readonly, strong) NSMutableArray *deviceList;
@property (nonatomic, strong) CocoaDSSlot2Device *currentDevice;
@property (copy) NSString *slot2StatusText;
@property (copy) NSURL *mpcfFileSearchURL;
@property (copy) NSURL *gbaCartridgeURL;
@property (copy) NSURL *gbaSRamURL;
@property (readonly) BOOL doesGbaCartridgeSaveExist;
+4 -25
View File
@@ -43,11 +43,6 @@
return self;
}
- (void) dealloc
{
[super dealloc];
}
- (NSString *) name
{
const char *cDeviceName = device->info()->name();
@@ -81,7 +76,7 @@
@implementation CocoaDSSlot2Manager
@synthesize deviceList;
@dynamic currentDevice;
@synthesize currentDevice;
@synthesize slot2StatusText;
@dynamic mpcfFileSearchURL;
@dynamic gbaCartridgeURL;
@@ -108,13 +103,6 @@
return self;
}
- (void) dealloc
{
[deviceList release];
[super dealloc];
}
- (void) setCurrentDevice:(CocoaDSSlot2Device *)theDevice
{
NDS_SLOT2_TYPE theType = NDS_SLOT2_NONE;
@@ -122,24 +110,17 @@
if (theDevice != nil)
{
theType = [theDevice type];
[theDevice retain];
}
bool slotDidChange = slot2_Change(theType);
if (slotDidChange || currentDevice == nil)
{
[currentDevice release];
currentDevice = theDevice;
}
[self updateStatus];
}
- (CocoaDSSlot2Device *) currentDevice
{
return currentDevice;
}
- (void) setMpcfFileSearchURL:(NSURL *)theURL
{
if (theURL != nil)
@@ -152,8 +133,6 @@
CFlash_Mode = (isDirectory) ? ADDON_CFLASH_MODE_Path : ADDON_CFLASH_MODE_File;
CFlash_Path = [thePath cStringUsingEncoding:NSUTF8StringEncoding];
[fileManager release];
}
else
{
@@ -261,7 +240,7 @@
}
// Create a new device wrapper object and add it to the device list.
CocoaDSSlot2Device *newCdsDevice = [[[CocoaDSSlot2Device alloc] initWithDeviceData:theDevice] autorelease];
CocoaDSSlot2Device *newCdsDevice = [[CocoaDSSlot2Device alloc] initWithDeviceData:theDevice];
[deviceList addObject:newCdsDevice];
// Only enable the SLOT-2 devices that are ready for end-user usage, and leave
@@ -371,7 +350,7 @@
void OSXSendForceFeedbackState(bool enable)
{
NSAutoreleasePool *tempPool = [[NSAutoreleasePool alloc] init];
@autoreleasepool {
NSDictionary *ffProperties = [NSDictionary dictionaryWithObjectsAndKeys:
[NSNumber numberWithBool:enable], @"ffState",
@@ -382,5 +361,5 @@ void OSXSendForceFeedbackState(bool enable)
object:nil
userInfo:ffProperties];
[tempPool release];
}
}
+5 -1
View File
@@ -28,4 +28,8 @@
#define HAVE_JIT
#endif
#define PORT_VERSION "OpenEmu"
#ifdef __aarch64__
#define USE_POSIX_MEMALIGN 1
#endif
#define PORT_VERSION "OpenEmu"
@@ -19,7 +19,7 @@
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>0.9.11.1</string>
<string>0.9.11.3</string>
<key>CSResourcesFileMapped</key>
<string>yes</string>
<key>NSHumanReadableCopyright</key>
+11 -4
View File
@@ -32,16 +32,24 @@
{
NSPoint touchLocation;
NSMutableDictionary *addedCheatsDict;
NSMutableArray <NSMutableDictionary <NSString *, id> *> *_availableDisplayModes;
NSMutableArray <NSMutableDictionary <NSString *, id> *> *_availableDisplayModes;
CocoaDSCheatManager *cdsCheats;
CocoaDSController *cdsController;
CocoaDSGPU *cdsGPU;
CocoaDSFirmware *cdsFirmware;
NSInteger displayMode;
NSMutableDictionary <NSString *, NSString *> *_currentDisplayModeInfo;
OEIntPoint topScreenPosition;
OEIntPoint btmScreenPosition;
int displayRotation;
OEIntRect displayRect;
OEIntSize displayAspectRatio;
NSInteger inputID[OENDSButtonCount]; // Key = OpenEmu's input ID, Value = DeSmuME's input ID
uint16_t *displayBuffer;
BOOL ownsBuffer;
OSSpinLock spinlockDisplayMode;
pthread_rwlock_t rwlockCoreExecute;
}
@@ -50,6 +58,5 @@
@property (strong) CocoaDSController *cdsController;
@property (strong) CocoaDSGPU *cdsGPU;
@property (strong) CocoaDSFirmware *cdsFirmware;
@property (assign) NSInteger displayMode;
@end
+288 -111
View File
@@ -15,6 +15,7 @@
along with the this software. If not, see <http://www.gnu.org/licenses/>.
*/
#include <utility>
#import "NDSGameCore.h"
#import "cocoa_cheat.h"
#import "cocoa_globals.h"
@@ -24,7 +25,6 @@
#import "cocoa_input.h"
#import "OESoundInterface.h"
#import "OENDSSystemResponderClient.h"
#include <OpenGL/gl.h>
#include "../../NDSSystem.h"
#include "../../GPU.h"
@@ -35,18 +35,36 @@
#define OptionIndented(_NAME_, _PREFKEY_) @{ OEGameCoreDisplayModeNameKey : _NAME_, OEGameCoreDisplayModePrefKeyNameKey : _PREFKEY_, OEGameCoreDisplayModeStateKey : @NO, OEGameCoreDisplayModeIndentationLevelKey : @(1), }
#define OptionToggleable(_NAME_, _PREFKEY_) @{ OEGameCoreDisplayModeNameKey : _NAME_, OEGameCoreDisplayModePrefKeyNameKey : _PREFKEY_, OEGameCoreDisplayModeStateKey : @NO, OEGameCoreDisplayModeAllowsToggleKey : @YES, }
#define OptionToggleableNoSave(_NAME_, _PREFKEY_) @{ OEGameCoreDisplayModeNameKey : _NAME_, OEGameCoreDisplayModePrefKeyNameKey : _PREFKEY_, OEGameCoreDisplayModeStateKey : @NO, OEGameCoreDisplayModeAllowsToggleKey : @YES, OEGameCoreDisplayModeDisallowPrefSaveKey : @YES, }
#define ManualOptionDefault(_NAME_, _PREFKEY_) @{ OEGameCoreDisplayModeNameKey : _NAME_, OEGameCoreDisplayModePrefKeyNameKey : _PREFKEY_, OEGameCoreDisplayModeStateKey : @YES, OEGameCoreDisplayModeManualOnlyKey : @YES }
#define ManualOption(_NAME_, _PREFKEY_) @{ OEGameCoreDisplayModeNameKey : _NAME_, OEGameCoreDisplayModePrefKeyNameKey : _PREFKEY_, OEGameCoreDisplayModeStateKey : @NO, OEGameCoreDisplayModeManualOnlyKey : @YES }
#define Label(_NAME_) @{ OEGameCoreDisplayModeLabelKey : _NAME_, }
#define SeparatorItem() @{ OEGameCoreDisplayModeSeparatorItemKey : @"",}
#define Submenu(_NAME_, ...) @{ OEGameCoreDisplayModeGroupNameKey: _NAME_, OEGameCoreDisplayModeGroupItemsKey: __VA_ARGS__}
#define WRAP(a, b) ((((a) % (b)) + (b)) % (b))
volatile bool execute = true;
static OEIntPoint _NDSRotatePointAroundOrigin(OEIntPoint p, int deg)
{
int rotMtxes[4][4] = {
{1, 0, 0, 1},
{0, -1, 1, 0},
{-1, 0, 0, -1},
{0, 1, -1, 0}
};
int *thisMatx = rotMtxes[WRAP(deg, 360) / 90];
return OEIntPointMake(p.x * thisMatx[0] + p.y * thisMatx[2], p.x * thisMatx[1] + p.y * thisMatx[3]);
}
@implementation NDSGameCore
@synthesize cdsController;
@synthesize cdsGPU;
@synthesize cdsFirmware;
@synthesize cdsCheats;
@dynamic displayMode;
- (id)init
{
@@ -120,11 +138,12 @@ volatile bool execute = true;
SPU_SetSynchMode(CommonSettings.SPU_sync_mode, CommonSettings.SPU_sync_method);
SPU_SetVolume(100);
// Set up the DS display
displayMode = DS_DISPLAY_TYPE_DUAL;
topScreenPosition = OEIntPointMake(0, 0);
displayRotation = 0;
btmScreenPosition = OEIntPointMake(0, GPU_DISPLAY_HEIGHT);
displayRect = OEIntRectMake(0, 0, GPU_DISPLAY_WIDTH, GPU_DISPLAY_HEIGHT * 2);
displayAspectRatio = OEIntSizeMake(2, 3);
return self;
}
@@ -135,37 +154,41 @@ volatile bool execute = true;
NDS_DeInit();
pthread_rwlock_destroy(&rwlockCoreExecute);
if (ownsBuffer)
free(displayBuffer);
}
- (NSInteger) displayMode
- (void)setDisplayType:(NSInteger)theMode orientation:(NSInteger)theOrient ordering:(NSInteger)theOrdering rotation:(NSInteger)rot gap:(NSInteger)gap
{
OEIntSize bufSize = self.bufferSize;
OSSpinLockLock(&spinlockDisplayMode);
NSInteger theMode = displayMode;
OSSpinLockUnlock(&spinlockDisplayMode);
return theMode;
}
- (void) setDisplayMode:(NSInteger)theMode
{
OEIntRect newDisplayRect;
OEIntSize newDisplayAspectRatio;
BOOL disableTop = NO, disableBtm = NO;
switch (theMode)
{
case DS_DISPLAY_TYPE_MAIN:
newDisplayRect = OEIntRectMake(0, 0, GPU_DISPLAY_WIDTH, GPU_DISPLAY_HEIGHT);
newDisplayAspectRatio = OEIntSizeMake(4, 3);
disableBtm = YES;
displayRect = OEIntRectMake(0, 0, GPU_DISPLAY_WIDTH, GPU_DISPLAY_HEIGHT);
topScreenPosition = OEIntPointMake(0, 0);
break;
case DS_DISPLAY_TYPE_TOUCH:
newDisplayRect = OEIntRectMake(0, GPU_DISPLAY_HEIGHT, GPU_DISPLAY_WIDTH, GPU_DISPLAY_HEIGHT);
newDisplayAspectRatio = OEIntSizeMake(4, 3);
disableTop = YES;
displayRect = OEIntRectMake(0, GPU_DISPLAY_HEIGHT, GPU_DISPLAY_WIDTH, GPU_DISPLAY_HEIGHT);
btmScreenPosition = OEIntPointMake(0, GPU_DISPLAY_HEIGHT);
break;
case DS_DISPLAY_TYPE_DUAL:
newDisplayRect = OEIntRectMake(0, 0, GPU_DISPLAY_WIDTH, GPU_DISPLAY_HEIGHT * 2);
newDisplayAspectRatio = OEIntSizeMake(2, 3);
topScreenPosition = OEIntPointMake(0, 0);
if (theOrient == DS_DISPLAY_ORIENTATION_VERTICAL) {
displayRect = OEIntRectMake(0, 0, GPU_DISPLAY_WIDTH, GPU_DISPLAY_HEIGHT * 2 + gap);
btmScreenPosition = OEIntPointMake(0, GPU_DISPLAY_HEIGHT + gap);
} else {
displayRect = OEIntRectMake(0, 0, GPU_DISPLAY_WIDTH * 2 + gap, GPU_DISPLAY_HEIGHT);
btmScreenPosition = OEIntPointMake(GPU_DISPLAY_WIDTH + gap, 0);
}
if (theOrdering == DS_DISPLAY_ORDER_TOUCH_FIRST)
std::swap(topScreenPosition, btmScreenPosition);
break;
default:
@@ -173,10 +196,35 @@ volatile bool execute = true;
break;
}
OSSpinLockLock(&spinlockDisplayMode);
displayMode = theMode;
displayRect = newDisplayRect;
displayAspectRatio = newDisplayAspectRatio;
displayRotation = rot;
topScreenPosition = _NDSRotatePointAroundOrigin(topScreenPosition, rot);
btmScreenPosition = _NDSRotatePointAroundOrigin(btmScreenPosition, rot);
OEIntPoint dispRectP1 = _NDSRotatePointAroundOrigin(displayRect.origin, rot);
OEIntPoint dispRectP2 = _NDSRotatePointAroundOrigin(OEIntPointMake(OEIntRectMaxX(displayRect), OEIntRectMaxY(displayRect)), rot);
if (rot == 90 || rot == 180) {
topScreenPosition.y += bufSize.height-1;
btmScreenPosition.y += bufSize.height-1;
dispRectP1.y += bufSize.height;
dispRectP2.y += bufSize.height;
}
if (rot == 270 || rot == 180) {
topScreenPosition.x += bufSize.width-1;
btmScreenPosition.x += bufSize.width-1;
dispRectP1.x += bufSize.width;
dispRectP2.x += bufSize.width;
}
displayRect.origin.x = MIN(dispRectP1.x, dispRectP2.x);
displayRect.origin.y = MIN(dispRectP1.y, dispRectP2.y);
displayRect.size.width = MAX(dispRectP1.x, dispRectP2.x) - displayRect.origin.x;
displayRect.size.height = MAX(dispRectP1.y, dispRectP2.y) - displayRect.origin.y;
if (disableTop)
topScreenPosition.x = -1;
if (disableBtm)
btmScreenPosition.x = -1;
OSSpinLockUnlock(&spinlockDisplayMode);
}
@@ -204,6 +252,8 @@ volatile bool execute = true;
pthread_rwlock_unlock(&rwlockCoreExecute);
SPU_Emulate_user();
[self _blitScreensToBuffer];
}
- (BOOL)loadFileAtPath:(NSString *)path error:(NSError **)error
@@ -232,10 +282,16 @@ volatile bool execute = true;
[CocoaDSCheatManager setMasterCheatList:cdsCheats];
// Only temporary, so core doesn't crash on an older OpenEmu version
if ([self respondsToSelector:@selector(displayModeInfo)]) {
[self loadDisplayModeOptions];
}
// Only temporary, so core doesn't crash on an older OpenEmu version
if ([self respondsToSelector:@selector(displayModeInfo)]) {
_currentDisplayModeInfo = [self.displayModeInfo mutableCopy];
[_currentDisplayModeInfo enumerateKeysAndObjectsUsingBlock:^(NSString * _Nonnull key, NSString * _Nonnull obj, BOOL * _Nonnull stop) {
[self _updateMenuForDisplayMode:obj];
}];
} else {
_currentDisplayModeInfo = [NSMutableDictionary dictionary];
}
[self loadDisplayModeOptions];
return isRomLoaded;
}
@@ -259,7 +315,7 @@ volatile bool execute = true;
- (OEIntSize)aspectSize
{
OSSpinLockLock(&spinlockDisplayMode);
OEIntSize theAspectRatio = displayAspectRatio;
OEIntSize theAspectRatio = displayRect.size;
OSSpinLockUnlock(&spinlockDisplayMode);
return theAspectRatio;
@@ -267,15 +323,24 @@ volatile bool execute = true;
- (OEIntSize)bufferSize
{
return OEIntSizeMake(GPU_DISPLAY_WIDTH, GPU_DISPLAY_HEIGHT * 2);
const OEIntSize bufSize = {
(int)((GPU_DISPLAY_WIDTH * 2 + DS_DISPLAY_GAP) + 1) & (~2),
(int)((GPU_DISPLAY_WIDTH * 2 + DS_DISPLAY_GAP) + 1) & (~2)
};
return bufSize;
}
- (const void *)getVideoBufferWithHint:(void *)hint
{
// TODO
//_gpuFrame.buffer = (uint16_t *)hint;
//return hint;
return GPU_screen;
if (!hint && !displayBuffer) {
OEIntSize size = self.bufferSize;
displayBuffer = (uint16_t *)malloc((size.width * size.height) * sizeof(uint16_t));
ownsBuffer = YES;
} else if (hint) {
displayBuffer = (uint16_t *)hint;
ownsBuffer = NO;
}
return displayBuffer;
}
- (GLenum)pixelFormat
@@ -290,7 +355,7 @@ volatile bool execute = true;
- (GLenum)internalPixelFormat
{
return GL_RGB5_A1;
return GL_RGB5_A1;
}
- (NSTimeInterval)frameInterval
@@ -298,6 +363,43 @@ volatile bool execute = true;
return DS_FRAMES_PER_SECOND;
}
- (void)_blitScreensToBuffer
{
OSSpinLockLock(&spinlockDisplayMode);
OEIntPoint topScrPos = topScreenPosition;
OEIntPoint btmScrPos = btmScreenPosition;
int angle = displayRotation;
OSSpinLockUnlock(&spinlockDisplayMode);
OEIntSize bufsize = self.bufferSize;
memset(displayBuffer, 0, bufsize.width * bufsize.height * sizeof(uint16_t));
if (topScrPos.x >= 0)
[self _blitScreenAtPoint:OEIntPointMake(0, 0) rotation:angle toBufferAtPoint:topScrPos];
if (btmScrPos.x >= 0)
[self _blitScreenAtPoint:OEIntPointMake(0, GPU_DISPLAY_HEIGHT) rotation:angle toBufferAtPoint:btmScrPos];
}
- (void)_blitScreenAtPoint:(OEIntPoint)p rotation:(int)angle toBufferAtPoint:(OEIntPoint)q
{
OEIntSize dstBufferSize = self.bufferSize;
uint16_t *origBuffer = (uint16_t *)GPU_screen;
const int rowDelta[4] = {1, -dstBufferSize.width, -1, dstBufferSize.width};
const int colDelta[4] = {dstBufferSize.width, 1, -dstBufferSize.width, -1};
int dstdx = rowDelta[WRAP(angle, 360) / 90];
int dstdy = colDelta[WRAP(angle, 360) / 90];
for (int y = 0; y < GPU_DISPLAY_HEIGHT; y++) {
int srci = (y+p.y) * GPU_DISPLAY_WIDTH + p.x;
int dsti = q.y * dstBufferSize.width + q.x + dstdy * y;
for (int x = 0; x < GPU_DISPLAY_WIDTH; x++) {
displayBuffer[dsti] = origBuffer[srci];
srci += 1;
dsti += dstdx;
}
}
}
#pragma mark Audio
- (NSUInteger)audioBufferCount
@@ -317,7 +419,7 @@ volatile bool execute = true;
- (NSUInteger)audioBitDepth
{
return SPU_SAMPLE_RESOLUTION;
return SPU_SAMPLE_RESOLUTION;
}
- (NSUInteger)channelCountForBuffer:(NSUInteger)buffer
@@ -349,27 +451,19 @@ volatile bool execute = true;
- (oneway void)didTouchScreenPoint:(OEIntPoint)aPoint
{
BOOL isTouchPressed = NO;
NSInteger dispMode = [self displayMode];
OSSpinLockLock(&spinlockDisplayMode);
OEIntPoint btmScrPos = btmScreenPosition;
OEIntRect dispRect = displayRect;
int angle = displayRotation;
OSSpinLockUnlock(&spinlockDisplayMode);
switch (dispMode)
{
case DS_DISPLAY_TYPE_MAIN:
isTouchPressed = NO; // Reject touch input if showing only the main screen.
break;
case DS_DISPLAY_TYPE_TOUCH:
isTouchPressed = YES;
break;
case DS_DISPLAY_TYPE_DUAL:
isTouchPressed = YES;
aPoint.y -= GPU_DISPLAY_HEIGHT; // Normalize the y-coordinate to the DS.
break;
default:
return;
break;
// Reject touch input if showing only the main screen.
BOOL isTouchPressed = NO;
if (btmScrPos.x >= 0) {
isTouchPressed = YES;
aPoint.x = aPoint.x + dispRect.origin.x - btmScrPos.x;
aPoint.y = aPoint.y + dispRect.origin.y - btmScrPos.y;
aPoint = _NDSRotatePointAroundOrigin(aPoint, -angle);
}
// Constrain the touch point to the DS dimensions.
@@ -415,85 +509,168 @@ volatile bool execute = true;
- (void)saveStateToFileAtPath:(NSString *)fileName completionHandler:(void (^)(BOOL, NSError *))block
{
// TODO: error handling
block([CocoaDSFile saveState:[NSURL fileURLWithPath:fileName]], nil);
// TODO: error handling
block([CocoaDSFile saveState:[NSURL fileURLWithPath:fileName]], nil);
}
- (void)loadStateFromFileAtPath:(NSString *)fileName completionHandler:(void (^)(BOOL, NSError *))block
{
// TODO: error handling
block([CocoaDSFile loadState:[NSURL fileURLWithPath:fileName]], nil);
// TODO: error handling
block([CocoaDSFile loadState:[NSURL fileURLWithPath:fileName]], nil);
}
#pragma mark - Display Mode
- (NSArray <NSDictionary <NSString *, id> *> *)displayModes
{
if (_availableDisplayModes.count == 0)
{
_availableDisplayModes = [NSMutableArray array];
if (_availableDisplayModes.count == 0)
{
_availableDisplayModes = [NSMutableArray array];
NSArray <NSDictionary <NSString *, id> *> *availableModesWithDefault =
@[
Label(@"Screen"),
OptionDefault(@"Dual", @"screen"),
Option(@"Main", @"screen"),
Option(@"Touch", @"screen"),
];
NSArray <NSDictionary <NSString *, id> *> *availableModesWithDefault =
@[
Label(@"Screen"),
Submenu(@"Dual", @[
OptionDefault(@"Vertical", @"screen"),
Option(@"Horizontal", @"screen"),
SeparatorItem(),
Label(@"Ordering"),
ManualOptionDefault(@"Main First", @"dualOrder"),
ManualOption(@"Touch First", @"dualOrder"),
SeparatorItem(),
Label(@"Separation"),
ManualOptionDefault(@"None", @"gap"),
ManualOption(@"50%", @"gap"),
ManualOption(@"100%", @"gap"),
]),
Option(@"Main", @"screen"),
Option(@"Touch", @"screen"),
SeparatorItem(),
Label(@"Rotation"),
OptionDefault(@"0°", @"rotation"),
Option(@"90°", @"rotation"),
Option(@"180°", @"rotation"),
Option(@"270°", @"rotation"),
];
// Deep mutable copy
_availableDisplayModes = (NSMutableArray *)CFBridgingRelease(CFPropertyListCreateDeepCopy(kCFAllocatorDefault, (CFArrayRef)availableModesWithDefault, kCFPropertyListMutableContainers));
}
// Deep mutable copy
_availableDisplayModes = (NSMutableArray *)CFBridgingRelease(CFPropertyListCreateDeepCopy(kCFAllocatorDefault, (CFArrayRef)availableModesWithDefault, kCFPropertyListMutableContainers));
}
return [_availableDisplayModes copy];
return [_availableDisplayModes copy];
}
- (void)changeDisplayWithMode:(NSString *)currentDisplayMode
{
if (_availableDisplayModes.count == 0)
[self displayModes];
NSString *key = [self _updateMenuForDisplayMode:currentDisplayMode];
// First check if 'displayMode' is valid
BOOL isValidDisplayMode = NO;
_currentDisplayModeInfo[key] = currentDisplayMode;
[self loadDisplayModeOptions];
}
for (NSDictionary *modeDict in _availableDisplayModes) {
if ([modeDict[OEGameCoreDisplayModeNameKey] isEqualToString:currentDisplayMode]) {
isValidDisplayMode = YES;
break;
}
}
- (NSString *)_updateMenuForDisplayMode:(NSString *)currentDisplayMode
{
if (_availableDisplayModes.count == 0)
[self displayModes];
// Disallow a 'displayMode' not found in _availableDisplayModes
if (!isValidDisplayMode)
return;
// First check if 'displayMode' is valid
NSString __block *key;
BOOL isValidDisplayMode = [self _enumerateDisplayModesOptionsWithBlock:^(NSDictionary *modeDict, BOOL *stop) {
if ([modeDict[OEGameCoreDisplayModeNameKey] isEqualToString:currentDisplayMode]) {
key = modeDict[OEGameCoreDisplayModePrefKeyNameKey];
*stop = YES;
}
}];
// Handle option state changes
for (NSMutableDictionary *optionDict in _availableDisplayModes) {
if (!optionDict[OEGameCoreDisplayModeNameKey])
continue;
// Mutually exclusive option state change
else if ([optionDict[OEGameCoreDisplayModeNameKey] isEqualToString:currentDisplayMode])
optionDict[OEGameCoreDisplayModeStateKey] = @YES;
// Reset
else
optionDict[OEGameCoreDisplayModeStateKey] = @NO;
}
// Disallow a 'displayMode' not found in _availableDisplayModes
if (!isValidDisplayMode)
return nil;
if ([currentDisplayMode isEqualToString:@"Dual"])
[self setDisplayMode:DS_DISPLAY_TYPE_DUAL];
else if ([currentDisplayMode isEqualToString:@"Main"])
[self setDisplayMode:DS_DISPLAY_TYPE_MAIN];
else if ([currentDisplayMode isEqualToString:@"Touch"])
[self setDisplayMode:DS_DISPLAY_TYPE_TOUCH];
// Handle option state changes
[self _enumerateDisplayModesOptionsWithBlock:^(NSMutableDictionary *modeDict, BOOL *stop) {
// Mutually exclusive option state change
if ([modeDict[OEGameCoreDisplayModePrefKeyNameKey] isEqual:key]) {
if ([modeDict[OEGameCoreDisplayModeNameKey] isEqualToString:currentDisplayMode])
modeDict[OEGameCoreDisplayModeStateKey] = @YES;
// Reset
else
modeDict[OEGameCoreDisplayModeStateKey] = @NO;
}
}];
return key;
}
- (BOOL)_enumerateDisplayModesOptionsWithBlock:(void (^)(NSMutableDictionary *modeDict, BOOL *stop))block
{
NSMutableArray *queue = [@[_availableDisplayModes] mutableCopy];
for (NSInteger i = 0; i < queue.count; i++) {
for (NSMutableDictionary *modeDict in queue[i]) {
NSString *name = modeDict[OEGameCoreDisplayModeNameKey];
NSString *grpName = modeDict[OEGameCoreDisplayModeGroupItemsKey];
if (name) {
BOOL stop = NO;
block(modeDict, &stop);
if (stop)
return YES;
} else if (grpName) {
NSArray *next = modeDict[OEGameCoreDisplayModeGroupItemsKey];
[queue addObject:next];
}
}
}
return NO;
}
- (void)loadDisplayModeOptions
{
// Restore screen
NSString *lastScreen = self.displayModeInfo[@"screen"];
if (lastScreen && ![lastScreen isEqualToString:@"Dual"]) {
[self changeDisplayWithMode:lastScreen];
}
NSString *screenStr = _currentDisplayModeInfo[@"screen"] ?: @"Vertical";
NSString *orderStr = _currentDisplayModeInfo[@"dualOrder"] ?: @"Main First";
NSString *rotationStr = _currentDisplayModeInfo[@"rotation"] ?: @"0°";
NSString *gapStr = _currentDisplayModeInfo[@"gap"] ?: @"None";
NSInteger dispMode = DS_DISPLAY_TYPE_DUAL;
NSInteger orient = DS_DISPLAY_ORIENTATION_VERTICAL;
NSInteger order = DS_DISPLAY_ORDER_MAIN_FIRST;
NSInteger gap = 0;
double rotation = 0;
if ([screenStr isEqualToString:@"Vertical"]) {
dispMode = DS_DISPLAY_TYPE_DUAL;
orient = DS_DISPLAY_ORIENTATION_VERTICAL;
} else if ([screenStr isEqualToString:@"Horizontal"]) {
dispMode = DS_DISPLAY_TYPE_DUAL;
orient = DS_DISPLAY_ORIENTATION_HORIZONTAL;
} else if ([screenStr isEqualToString:@"Main"])
dispMode = DS_DISPLAY_TYPE_MAIN;
else if ([screenStr isEqualToString:@"Touch"])
dispMode = DS_DISPLAY_TYPE_TOUCH;
if ([orderStr isEqualToString:@"Main First"])
order = DS_DISPLAY_ORDER_MAIN_FIRST;
else if ([orderStr isEqualToString:@"Touch First"])
order = DS_DISPLAY_ORDER_TOUCH_FIRST;
if ([rotationStr isEqualToString:@"0°"])
rotation = 0;
else if ([rotationStr isEqualToString:@"90°"])
rotation = 90;
else if ([rotationStr isEqualToString:@"180°"])
rotation = 180;
else if ([rotationStr isEqualToString:@"270°"])
rotation = 270;
if ([gapStr isEqualToString:@"None"])
gap = 0;
else if ([gapStr isEqualToString:@"50%"])
gap = DS_DISPLAY_GAP / 2;
else if ([gapStr isEqualToString:@"100%"])
gap = DS_DISPLAY_GAP;
[self setDisplayType:dispMode orientation:orient ordering:order rotation:rotation gap:gap];
}
#pragma mark Miscellaneous
@@ -28,12 +28,12 @@ typedef enum _OENDSButton
OENDSButtonA,
OENDSButtonB,
OENDSButtonX,
OENDSButtonY,
OENDSButtonY,
OENDSButtonL,
OENDSButtonR,
OENDSButtonStart,
OENDSButtonR,
OENDSButtonStart,
OENDSButtonSelect,
OENDSButtonMicrophone,
OENDSButtonMicrophone,
OENDSButtonLid,
OENDSButtonDebug,
OENDSButtonCount
+162
View File
@@ -0,0 +1,162 @@
//
// coreaudiosound_null.cpp
// DeSmuME (OpenEmu Plug-in)
//
// Created by Stuart Carnie on 10/30/19.
// Copyright © 2019 DeSmuME Team. All rights reserved.
//
#include "coreaudiosound.h"
#include <CoreAudio/CoreAudio.h>
CoreAudioInput::CoreAudioInput()
{
}
CoreAudioInput::~CoreAudioInput()
{
}
OSStatus CoreAudioInput::InitInputAUHAL(UInt32 deviceID)
{
return noErr;
}
void CoreAudioInput::Start()
{
}
void CoreAudioInput::Stop()
{
}
size_t CoreAudioInput::Pull()
{
return 0;
}
bool CoreAudioInput::IsHardwareEnabled() const
{
return false;
}
bool CoreAudioInput::IsHardwareLocked() const
{
return false;
}
bool CoreAudioInput::GetPauseState() const
{
return true;
}
void CoreAudioInput::SetPauseState(bool pauseState)
{
}
float CoreAudioInput::GetGain() const
{
return 0;
}
void CoreAudioInput::SetGain(float normalizedGain)
{
}
void CoreAudioInput::UpdateHardwareGain(float normalizedGain)
{
}
void CoreAudioInput::UpdateHardwareLock()
{
}
void CoreAudioInput::SetCallbackHardwareStateChanged(CoreAudioInputHardwareStateChangedCallback callbackFunc, void *inParam1, void *inParam2)
{
}
void CoreAudioInput::SetCallbackHardwareGainChanged(CoreAudioInputHardwareGainChangedCallback callbackFunc, void *inParam1, void *inParam2)
{
}
#pragma mark -
CoreAudioOutput::CoreAudioOutput(size_t bufferSamples, size_t sampleSize)
{
}
CoreAudioOutput::~CoreAudioOutput()
{
}
void CoreAudioOutput::start()
{
}
void CoreAudioOutput::pause()
{
}
void CoreAudioOutput::unpause()
{
}
void CoreAudioOutput::stop()
{
}
void CoreAudioOutput::writeToBuffer(const void *buffer, size_t numberSampleFrames)
{
}
void CoreAudioOutput::clearBuffer()
{
}
void CoreAudioOutput::mute()
{
}
void CoreAudioOutput::unmute()
{
}
size_t CoreAudioOutput::getAvailableSamples() const
{
return 0;
}
float CoreAudioOutput::getVolume() const
{
return 0;
}
void CoreAudioOutput::setVolume(float vol)
{
}
+60
View File
@@ -0,0 +1,60 @@
// Copyright (c) 2021, OpenEmu Team
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
// * Neither the name of the OpenEmu Team nor the
// names of its contributors may be used to endorse or promote products
// derived from this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY OpenEmu Team ''AS IS'' AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL OpenEmu Team BE LIABLE FOR ANY
// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifdef __aarch64__
#include "../../utils/arm_arm/arm_gen.cpp"
#include "../../utils/arm_arm/arm_jit.cpp"
#elif defined(__x86_64__)
#include "../../utils/AsmJit/core/assembler.cpp"
#include "../../utils/AsmJit/core/assert.cpp"
#include "../../utils/AsmJit/core/buffer.cpp"
#include "../../utils/AsmJit/core/compiler.cpp"
#include "../../utils/AsmJit/core/compilercontext.cpp"
#include "../../utils/AsmJit/core/compilerfunc.cpp"
#include "../../utils/AsmJit/core/compileritem.cpp"
#include "../../utils/AsmJit/core/context.cpp"
#include "../../utils/AsmJit/core/cpuinfo.cpp"
#include "../../utils/AsmJit/core/defs.cpp"
#include "../../utils/AsmJit/core/func.cpp"
#include "../../utils/AsmJit/core/logger.cpp"
#include "../../utils/AsmJit/core/memorymanager.cpp"
#include "../../utils/AsmJit/core/memorymarker.cpp"
#include "../../utils/AsmJit/core/operand.cpp"
#include "../../utils/AsmJit/core/stringbuilder.cpp"
#include "../../utils/AsmJit/core/stringutil.cpp"
#include "../../utils/AsmJit/core/virtualmemory.cpp"
#include "../../utils/AsmJit/core/zonememory.cpp"
#include "../../utils/AsmJit/x86/x86assembler.cpp"
#include "../../utils/AsmJit/x86/x86compiler.cpp"
#include "../../utils/AsmJit/x86/x86compilercontext.cpp"
#include "../../utils/AsmJit/x86/x86compilerfunc.cpp"
#include "../../utils/AsmJit/x86/x86compileritem.cpp"
#include "../../utils/AsmJit/x86/x86cpuinfo.cpp"
#include "../../utils/AsmJit/x86/x86defs.cpp"
#include "../../utils/AsmJit/x86/x86func.cpp"
#include "../../utils/AsmJit/x86/x86operand.cpp"
#include "../../utils/AsmJit/x86/x86util.cpp"
#else
#error unknown arch!
#endif
+2 -2
View File
@@ -1,5 +1,5 @@
// REVISION TRACKING
// This file is auto-generated.
// Do not commit this file to the code repository!
#define SVN_REV
#define SVN_REV_STR " "
#define SVN_REV 0
#define SVN_REV_STR "0"
+278
View File
@@ -0,0 +1,278 @@
#include <stdio.h>
#include <stdint.h>
#include <assert.h>
#include <stdlib.h>
#include <string.h>
#ifndef __MACH__
#include <malloc.h>
#endif
#include "arm_gen.h"
#ifdef _3DS
# include <malloc.h>
# include "3ds/memory.h"
#elif defined(VITA)
# include <psp2/kernel/sysmem.h>
# define RW_INIT sceKernelOpenVMDomain
# define RW_END sceKernelCloseVMDomain
#else
# include <sys/mman.h>
#endif
// __clear_cache(start, end)
#ifdef __BLACKBERRY_QNX__
#undef __clear_cache
#define __clear_cache(start,end) msync(start, (size_t)((void*)end - (void*)start), MS_SYNC | MS_CACHE_ONLY | MS_INVALIDATE_ICACHE);
#elif defined(__MACH__)
#include <libkern/OSCacheControl.h>
#define __clear_cache mach_clear_cache
static void __clear_cache(void *start, void *end) {
size_t len = (char *)end - (char *)start;
sys_dcache_flush(start, len);
sys_icache_invalidate(start, len);
}
#elif defined(_3DS)
#undef __clear_cache
#define __clear_cache(start,end)FlushInvalidateCache();
#elif defined(VITA)
#undef __clear_cache
#define __clear_cache(start,end)sceKernelSyncVMDomain(block, start, (char *)end - (char *)start)
#endif
namespace arm_gen
{
#ifdef _3DS
uint32_t* _instructions = 0;
#endif
code_pool::code_pool(uint32_t icount) :
instruction_count(icount),
instructions(0),
next_instruction(0),
flush_start(0)
{
printf("\n\ncode_pool icount: %i\n\n", icount);
literal_count = 0;
memset(labels, 0, sizeof(labels));
memset(branches, 0, sizeof(branches));
#if defined(_3DS)
if(!_instructions)
{
_instructions = (uint32_t*)memalign(4096, instruction_count * 4);
if (!_instructions)
{
fprintf(stderr, "memalign failed\n");
abort();
}
ReprotectMemory((unsigned int*)_instructions, (instruction_count * 4) / 4096, 7);
}
instructions = _instructions;
#elif defined(VITA)
block = sceKernelAllocMemBlockForVM("desmume_rwx_block", instruction_count * 4);
if (block < 0)
{
fprintf(stderr, "sceKernelAllocMemBlockForVM failed\n");
abort();
}
if (sceKernelGetMemBlockBase(block, (void **)&instructions) < 0)
{
fprintf(stderr, "sceKernelGetMemBlockBase failed\n");
abort();
}
#elif defined(USE_POSIX_MEMALIGN)
if (posix_memalign((void**)&instructions, 4096, instruction_count * 4))
{
fprintf(stderr, "posix_memalign failed\n");
abort();
}
if (mprotect(instructions, instruction_count * 4, PROT_READ | PROT_WRITE | PROT_EXEC))
{
fprintf(stderr, "mprotect failed\n");
abort();
}
#else
instructions = (uint32_t*)memalign(4096, instruction_count * 4);
if (!instructions)
{
fprintf(stderr, "memalign failed\n");
abort();
}
if (mprotect(instructions, instruction_count * 4, PROT_READ | PROT_WRITE | PROT_EXEC))
{
fprintf(stderr, "mprotect failed\n");
abort();
}
#endif
}
code_pool::~code_pool()
{
#ifdef _3DS
//ReprotectMemory((unsigned int*)instructions, (instruction_count * 4) / 4096, 3);
#elif defined(VITA)
sceKernelFreeMemBlock(block);
#else
mprotect(instructions, instruction_count * 4, PROT_READ | PROT_WRITE);
free(instructions);
#endif
}
void* code_pool::fn_pointer()
{
void* result = &instructions[flush_start];
__clear_cache(&instructions[flush_start], &instructions[next_instruction]);
flush_start = next_instruction;
return result;
}
void code_pool::set_label(const char* name)
{
for (int i = 0; i < TARGET_COUNT; i ++)
{
if (labels[i].name == name)
{
fprintf(stderr, "Duplicate label\n");
abort();
}
}
for (int i = 0; i < TARGET_COUNT; i ++)
{
if (labels[i].name == 0)
{
labels[i].name = name;
labels[i].position = next_instruction;
return;
}
}
fprintf(stderr, "Label overflow\n");
abort();
}
void code_pool::resolve_label(const char* name)
{
#ifdef VITA
RW_INIT();
#endif
for (int i = 0; i < TARGET_COUNT; i ++)
{
if (labels[i].name != name)
{
continue;
}
for (int j = 0; j < TARGET_COUNT; j ++)
{
if (branches[j].name != name)
{
continue;
}
const uint32_t source = branches[j].position;
const uint32_t target = labels[i].position;
instructions[source] |= ((target - source) - 2) & 0xFFFFFF;
branches[j].name = 0;
}
labels[i].name = 0;
break;
}
#ifdef VITA
RW_END();
#endif
}
// Code Gen: Generic
void code_pool::insert_instruction(uint32_t op, AG_COND cond)
{
assert(cond < CONDINVALID);
insert_raw_instruction((op & 0x0FFFFFFF) | (cond << 28));
}
void code_pool::insert_raw_instruction(uint32_t op)
{
if (next_instruction >= instruction_count)
{
fprintf(stderr, "code_pool overflow\n");
abort();
}
#ifdef VITA
RW_INIT();
#endif
instructions[next_instruction ++] = op;
#ifdef VITA
RW_END();
#endif
}
void code_pool::alu_op(AG_ALU_OP op, reg_t rd, reg_t rn,
const alu2& arg, AG_COND cond)
{
assert(op < OPINVALID);
insert_instruction( (op << 20) | (rn << 16) | (rd << 12) | arg.encoding, cond );
}
void code_pool::mem_op(AG_MEM_OP op, reg_t rd, reg_t rn, const mem2& arg,
AG_MEM_FLAGS flags, AG_COND cond)
{
uint32_t instruction = 0x04000000;
instruction |= (op & 1) ? 1 << 20 : 0;
instruction |= (op & 2) ? 1 << 22 : 0;
instruction |= arg.encoding;
instruction |= rd << 12;
instruction |= rn << 16;
instruction |= flags ^ 0x1800000;
insert_instruction( instruction, cond );
}
void code_pool::b(const char* target, AG_COND cond)
{
assert(target);
for (int i = 0; i < TARGET_COUNT; i ++)
{
if (branches[i].name == 0)
{
branches[i].name = target;
branches[i].position = next_instruction;
insert_instruction( 0x0A000000, cond );
return;
}
}
assert(false);
}
void code_pool::load_constant(reg_t target_reg, uint32_t constant, AG_COND cond)
{
// TODO: Support another method for ARM procs that don't have movw|movt
uint32_t instructions[2] = { 0x03000000, 0x03400000 };
for (int i = 0; i < 2; i ++, constant >>= 16)
{
// If the upper 16-bits are zero the movt op is not needed
if (i == 1 && constant == 0)
break;
instructions[i] |= target_reg << 12;
instructions[i] |= constant & 0xFFF;
instructions[i] |= (constant & 0xF000) << 4;
insert_instruction( instructions[i], cond );
}
}
} // namespace arm_gen
+226
View File
@@ -0,0 +1,226 @@
#ifndef ARM_GEN_H_LR
#define ARM_GEN_H_LR
#include <assert.h>
#include <stdio.h>
#if defined(VITA)
# include <psp2/kernel/sysmem.h>
#endif
namespace arm_gen
{
template<uint32_t MAX>
struct Constraint
{
public:
Constraint(uint32_t val) : value(val) { assert(val < MAX); }
operator uint32_t() const { return value; }
private:
const uint32_t value;
};
struct reg_t : public Constraint<16>
{
public:
reg_t(uint32_t num) : Constraint<16>(num) { }
};
// Do NOT reorder these enums
enum AG_COND
{
EQ, NE, CS, CC, MI, PL, VS, VC,
HI, LS, GE, LT, GT, LE, AL, EGG,
CONDINVALID
};
enum AG_ALU_OP
{
AND, ANDS, EOR, EORS, SUB, SUBS, RSB, RSBS,
ADD, ADDS, ADC, ADCS, SBC, SBCS, RSC, RSCS,
XX1, TST , XX2, TEQ , XX3, CMP , XX4, CMN ,
ORR, ORRS, MOV, MOVS, BIC, BICS, MVN, MVNS,
OPINVALID
};
enum AG_MEM_OP
{
STR, LDR, STRB, LDRB, MEMINVALID
};
enum AG_MEM_FLAGS
{
POST_INDEX = 1 << 24,
NEGATE_OFFSET = 1 << 23,
WRITE_BACK = 1 << 21,
MEM_NONE = 0
};
enum AG_ALU_SHIFT
{
LSL, LSR, ASR, ROR, SHIFTINVALID
};
struct alu2
{
private:
alu2(uint32_t val) : encoding(val) { }
public:
static alu2 reg_shift_reg(reg_t rm, AG_ALU_SHIFT type, reg_t rs) { return alu2(rm | (type << 5) | 0x10 | (rs << 8)); }
static alu2 reg_shift_imm(reg_t rm, AG_ALU_SHIFT type, uint32_t imm) { return alu2(rm | (type << 5) | (imm << 7)); }
static alu2 imm_ror(uint32_t val, uint32_t ror) { return alu2((1 << 25) | ((ror / 2) << 8) | val); }
static alu2 imm_rol(uint32_t val, uint32_t rol) { return imm_ror(val, (32 - rol) & 0x1F); }
static alu2 reg(reg_t rm) { return reg_shift_imm(rm, LSL, 0); }
static alu2 imm(uint8_t val) { return imm_ror(val, 0); }
const uint32_t encoding;
};
struct mem2
{
private:
mem2(uint32_t val) : encoding(val) { }
public:
static mem2 reg_shift_imm(reg_t rm, AG_ALU_SHIFT type, uint32_t imm) { return mem2((1 << 25) | rm | (type << 5) | (imm << 7)); }
static mem2 reg(reg_t rm) { return reg_shift_imm(rm, LSL, 0); }
static mem2 imm(uint32_t val) { return mem2(val); }
const uint32_t encoding;
};
// 80 Columns be damned
class code_pool
{
public:
code_pool(uint32_t instruction_count);
~code_pool();
uint32_t instructions_remaining() const { return instruction_count - next_instruction; }
void* fn_pointer();
// Relocs
void set_label(const char* name);
void resolve_label(const char* name);
// Code Gen: Generic
void insert_instruction(uint32_t op, AG_COND cond = AL);
void insert_raw_instruction(uint32_t op);
// Code Gen: ALU
void alu_op(AG_ALU_OP op, reg_t rd, reg_t rn, const alu2& arg, AG_COND cond = AL);
void and_(reg_t rd, reg_t rn, const alu2& arg, AG_COND cond = AL) { alu_op(AND , rd, rn, arg, cond); }
void and_(reg_t rd, const alu2& arg, AG_COND cond = AL) { alu_op(AND , rd, rd, arg, cond); }
void ands(reg_t rd, reg_t rn, const alu2& arg, AG_COND cond = AL) { alu_op(ANDS, rd, rn, arg, cond); }
void ands(reg_t rd, const alu2& arg, AG_COND cond = AL) { alu_op(ANDS, rd, rd, arg, cond); }
void eor (reg_t rd, reg_t rn, const alu2& arg, AG_COND cond = AL) { alu_op(EOR , rd, rn, arg, cond); }
void eor (reg_t rd, const alu2& arg, AG_COND cond = AL) { alu_op(EOR , rd, rd, arg, cond); }
void eors(reg_t rd, reg_t rn, const alu2& arg, AG_COND cond = AL) { alu_op(EORS, rd, rn, arg, cond); }
void eors(reg_t rd, const alu2& arg, AG_COND cond = AL) { alu_op(EORS, rd, rd, arg, cond); }
void sub (reg_t rd, reg_t rn, const alu2& arg, AG_COND cond = AL) { alu_op(SUB , rd, rn, arg, cond); }
void sub (reg_t rd, const alu2& arg, AG_COND cond = AL) { alu_op(SUB , rd, rd, arg, cond); }
void subs(reg_t rd, reg_t rn, const alu2& arg, AG_COND cond = AL) { alu_op(SUBS, rd, rn, arg, cond); }
void subs(reg_t rd, const alu2& arg, AG_COND cond = AL) { alu_op(SUBS, rd, rd, arg, cond); }
void rsb (reg_t rd, reg_t rn, const alu2& arg, AG_COND cond = AL) { alu_op(RSB , rd, rn, arg, cond); }
void rsb (reg_t rd, const alu2& arg, AG_COND cond = AL) { alu_op(RSB , rd, rd, arg, cond); }
void rsbs(reg_t rd, reg_t rn, const alu2& arg, AG_COND cond = AL) { alu_op(RSBS, rd, rn, arg, cond); }
void rsbs(reg_t rd, const alu2& arg, AG_COND cond = AL) { alu_op(RSBS, rd, rd, arg, cond); }
void add (reg_t rd, reg_t rn, const alu2& arg, AG_COND cond = AL) { alu_op(ADD , rd, rn, arg, cond); }
void add (reg_t rd, const alu2& arg, AG_COND cond = AL) { alu_op(ADD , rd, rd, arg, cond); }
void adds(reg_t rd, reg_t rn, const alu2& arg, AG_COND cond = AL) { alu_op(ADDS, rd, rn, arg, cond); }
void adds(reg_t rd, const alu2& arg, AG_COND cond = AL) { alu_op(ADDS, rd, rd, arg, cond); }
void adc (reg_t rd, reg_t rn, const alu2& arg, AG_COND cond = AL) { alu_op(ADC , rd, rn, arg, cond); }
void adc (reg_t rd, const alu2& arg, AG_COND cond = AL) { alu_op(ADC , rd, rd, arg, cond); }
void adcs(reg_t rd, reg_t rn, const alu2& arg, AG_COND cond = AL) { alu_op(ADCS, rd, rn, arg, cond); }
void adcs(reg_t rd, const alu2& arg, AG_COND cond = AL) { alu_op(ADCS, rd, rd, arg, cond); }
void sbc (reg_t rd, reg_t rn, const alu2& arg, AG_COND cond = AL) { alu_op(SBC , rd, rn, arg, cond); }
void sbc (reg_t rd, const alu2& arg, AG_COND cond = AL) { alu_op(SBC , rd, rd, arg, cond); }
void sbcs(reg_t rd, reg_t rn, const alu2& arg, AG_COND cond = AL) { alu_op(SBCS, rd, rn, arg, cond); }
void sbcs(reg_t rd, const alu2& arg, AG_COND cond = AL) { alu_op(SBCS, rd, rd, arg, cond); }
void rsc (reg_t rd, reg_t rn, const alu2& arg, AG_COND cond = AL) { alu_op(RSC , rd, rn, arg, cond); }
void rsc (reg_t rd, const alu2& arg, AG_COND cond = AL) { alu_op(RSC , rd, rd, arg, cond); }
void rscs(reg_t rd, reg_t rn, const alu2& arg, AG_COND cond = AL) { alu_op(RSCS, rd, rn, arg, cond); }
void rscs(reg_t rd, const alu2& arg, AG_COND cond = AL) { alu_op(RSCS, rd, rd, arg, cond); }
void tst ( reg_t rn, const alu2& arg, AG_COND cond = AL) { alu_op(TST , rn, rn, arg, cond); } // 1
void teq ( reg_t rn, const alu2& arg, AG_COND cond = AL) { alu_op(TEQ , rn, rn, arg, cond); } // 1
void cmp ( reg_t rn, const alu2& arg, AG_COND cond = AL) { alu_op(CMP , rn, rn, arg, cond); } // 1
void cmn ( reg_t rn, const alu2& arg, AG_COND cond = AL) { alu_op(CMN , rn, rn, arg, cond); } // 1
void orr (reg_t rd, reg_t rn, const alu2& arg, AG_COND cond = AL) { alu_op(ORR , rd, rn, arg, cond); }
void orr (reg_t rd, const alu2& arg, AG_COND cond = AL) { alu_op(ORR , rd, rd, arg, cond); }
void orrs(reg_t rd, reg_t rn, const alu2& arg, AG_COND cond = AL) { alu_op(ORRS, rd, rn, arg, cond); }
void orrs(reg_t rd, const alu2& arg, AG_COND cond = AL) { alu_op(ORRS, rd, rd, arg, cond); }
void mov (reg_t rd, const alu2& arg, AG_COND cond = AL) { alu_op(MOV , rd, rd, arg, cond); } // 2
void movs(reg_t rd, const alu2& arg, AG_COND cond = AL) { alu_op(MOVS, rd, rd, arg, cond); } // 2
void bic (reg_t rd, reg_t rn, const alu2& arg, AG_COND cond = AL) { alu_op(BIC , rd, rn, arg, cond); }
void bic (reg_t rd, const alu2& arg, AG_COND cond = AL) { alu_op(BIC , rd, rd, arg, cond); }
void bics(reg_t rd, reg_t rn, const alu2& arg, AG_COND cond = AL) { alu_op(BICS, rd, rn, arg, cond); }
void bics(reg_t rd, const alu2& arg, AG_COND cond = AL) { alu_op(BICS, rd, rd, arg, cond); }
void mvn (reg_t rd, const alu2& arg, AG_COND cond = AL) { alu_op(MVN , rd, rd, arg, cond); } // 2
void mvns(reg_t rd, const alu2& arg, AG_COND cond = AL) { alu_op(MVNS, rd, rd, arg, cond); } // 2
// Code Gen: Memory
void mem_op(AG_MEM_OP op, reg_t rd, reg_t rn, const mem2& arg, AG_MEM_FLAGS flags = MEM_NONE, AG_COND cond = AL);
void ldr (reg_t rd, reg_t base, const mem2& arg = mem2::imm(0), AG_MEM_FLAGS flags = MEM_NONE, AG_COND cond = AL) { mem_op(LDR , rd, base, arg, flags, cond); }
void str (reg_t rd, reg_t base, const mem2& arg = mem2::imm(0), AG_MEM_FLAGS flags = MEM_NONE, AG_COND cond = AL) { mem_op(STR , rd, base, arg, flags, cond); }
void ldrb(reg_t rd, reg_t base, const mem2& arg = mem2::imm(0), AG_MEM_FLAGS flags = MEM_NONE, AG_COND cond = AL) { mem_op(LDRB, rd, base, arg, flags, cond); }
void strb(reg_t rd, reg_t base, const mem2& arg = mem2::imm(0), AG_MEM_FLAGS flags = MEM_NONE, AG_COND cond = AL) { mem_op(STRB, rd, base, arg, flags, cond); }
// Code Gen: Sign Extend
void sxtb(reg_t rd, reg_t rm, AG_COND cond = AL) { insert_instruction( 0x06AF0070 | (rd << 12) | rm, cond ); }
void sxth(reg_t rd, reg_t rm, AG_COND cond = AL) { insert_instruction( 0x06BF0070 | (rd << 12) | rm, cond ); }
void uxtb(reg_t rd, reg_t rm, AG_COND cond = AL) { insert_instruction( 0x06EF0070 | (rd << 12) | rm, cond ); }
void uxth(reg_t rd, reg_t rm, AG_COND cond = AL) { insert_instruction( 0x06FF0070 | (rd << 12) | rm, cond ); }
// Code Gen: Other
void set_status(reg_t source_reg, AG_COND cond = AL) { insert_instruction( 0x0128F000 | source_reg, cond ); }
void get_status(reg_t dest_reg, AG_COND cond = AL) { insert_instruction( 0x010F0000 | (dest_reg << 12), cond ); }
void bx(reg_t target_reg, AG_COND cond = AL) { insert_instruction( 0x012FFF10 | target_reg, cond ); }
void blx(reg_t target_reg, AG_COND cond = AL) { insert_instruction( 0x012FFF30 | target_reg, cond ); }
void push(uint16_t regs, AG_COND cond = AL) { insert_instruction( 0x092D0000 | regs, cond ); }
void pop(uint16_t regs, AG_COND cond = AL) { insert_instruction( 0x08BD0000 | regs, cond ); }
void b(const char* target, AG_COND cond = AL);
// Inserts a movw; movt pair to load the constant, omits movt is constant fits in 16 bits.
void load_constant(reg_t target_reg, uint32_t constant, AG_COND cond = AL);
void insert_constants();
void jmp(uint32_t offset);
void resolve_jmp(uint32_t instruction, uint32_t offset);
uint32_t get_next_instruction() { return next_instruction; };
private:
const uint32_t instruction_count;
uint32_t* instructions;
uint32_t next_instruction;
uint32_t flush_start;
uint32_t literals[128][2];
uint32_t literal_count;
static const uint32_t TARGET_COUNT = 16;
struct target
{
const char* name;
uint32_t position;
};
target labels[TARGET_COUNT];
target branches[TARGET_COUNT];
#if defined(VITA)
SceUID block;
#endif
};
} // namespace arm_gen
#endif
File diff suppressed because it is too large Load Diff
+191
View File
@@ -0,0 +1,191 @@
#ifndef ARM_JIT_REG_MANAGER_H
#define ARM_JIT_REG_MANAGER_H
#include <string.h>
#include "arm_gen.h"
#include "armcpu.h"
extern const arm_gen::reg_t RCPU;
class register_manager
{
public:
register_manager(arm_gen::code_pool* apool) : pool(apool)
{
reset();
}
void reset()
{
memset(mapping, 0xFF, sizeof(mapping));
memset(usage_tag, 0, sizeof(usage_tag));
memset(dirty, 0, sizeof(dirty));
memset(weak, 0, sizeof(weak));
next_usage_tag = 1;
}
bool is_usable(arm_gen::reg_t reg) const
{
static const uint32_t USE_MAP = 0xDE0;
return (USE_MAP & (1 << reg)) ? true : false;
}
private:
int32_t find(uint32_t emu_reg_id)
{
for (int i = 0; i != 16; i ++)
{
if (is_usable(i) && mapping[i] == emu_reg_id)
{
usage_tag[i] = next_usage_tag ++;
assert(is_usable(i));
return i;
}
}
return -1;
}
int32_t get_loaded(uint32_t emu_reg_id, bool no_read)
{
int32_t current = find(emu_reg_id);
if (current >= 0)
{
if (weak[current] && !no_read)
{
read_emu(current, emu_reg_id);
weak[current] = false;
}
}
return current;
}
arm_gen::reg_t get_oldest()
{
uint32_t result = 0;
uint32_t lowtag = 0xFFFFFFFF;
for (int i = 0; i != 16; i ++)
{
if (is_usable(i) && usage_tag[i] < lowtag)
{
lowtag = usage_tag[i];
result = i;
}
}
assert(is_usable(result));
return result;
}
public:
void get(uint32_t reg_count, int32_t* emu_reg_ids)
{
assert(reg_count < 5);
bool found[5] = { false, false, false, false, false };
// Find existing registers
for (uint32_t i = 0; i < reg_count; i ++)
{
if (emu_reg_ids[i] < 0)
{
found[i] = true;
}
else
{
int32_t current = get_loaded(emu_reg_ids[i] & 0xF, emu_reg_ids[i] & 0x10);
if (current >= 0)
{
emu_reg_ids[i] = current;
found[i] = true;
}
}
}
// Load new registers
for (uint32_t i = 0; i != reg_count; i ++)
{
if (!found[i])
{
// Search register list again, in case the same register is used twice
int32_t current = get_loaded(emu_reg_ids[i] & 0xF, emu_reg_ids[i] & 0x10);
if (current >= 0)
{
emu_reg_ids[i] = current;
found[i] = true;
}
else
{
// Read the new register
arm_gen::reg_t result = get_oldest();
flush(result);
if (!(emu_reg_ids[i] & 0x10))
{
read_emu(result, emu_reg_ids[i] & 0xF);
}
mapping[result] = emu_reg_ids[i] & 0xF;
usage_tag[result] = next_usage_tag ++;
weak[result] = (emu_reg_ids[i] & 0x10) ? true : false;
emu_reg_ids[i] = result;
found[i] = true;
}
}
}
}
void mark_dirty(uint32_t native_reg)
{
assert(is_usable(native_reg));
dirty[native_reg] = true;
weak[native_reg] = false;
}
void flush(uint32_t native_reg)
{
assert(is_usable(native_reg));
if (dirty[native_reg] && !weak[native_reg])
{
write_emu(native_reg, mapping[native_reg]);
dirty[native_reg] = false;
}
}
void flush_all()
{
for (int i = 0; i != 16; i ++)
{
if (is_usable(i))
{
flush(i);
}
}
}
private:
void read_emu(arm_gen::reg_t native, arm_gen::reg_t emu)
{
pool->ldr(native, RCPU, arm_gen::mem2::imm(offsetof(armcpu_t, R) + 4 * emu));
}
void write_emu(arm_gen::reg_t native, arm_gen::reg_t emu)
{
pool->str(native, RCPU, arm_gen::mem2::imm(offsetof(armcpu_t, R) + 4 * emu));
}
private:
arm_gen::code_pool* pool;
uint32_t mapping[16]; // Mapping[native] = emu
uint32_t usage_tag[16];
bool dirty[16];
bool weak[16];
uint32_t next_usage_tag;
};
#endif