diff --git a/macosx/Build/Intermediates/XCBuildData/BuildDescriptionCacheIndex-39754f5c7639f1405cb8f271288abde4 b/macosx/Build/Intermediates/XCBuildData/BuildDescriptionCacheIndex-39754f5c7639f1405cb8f271288abde4 deleted file mode 100644 index ad76acee..00000000 Binary files a/macosx/Build/Intermediates/XCBuildData/BuildDescriptionCacheIndex-39754f5c7639f1405cb8f271288abde4 and /dev/null differ diff --git a/macosx/Build/Intermediates/XCBuildData/build.db b/macosx/Build/Intermediates/XCBuildData/build.db deleted file mode 100644 index 0b1b3da4..00000000 Binary files a/macosx/Build/Intermediates/XCBuildData/build.db and /dev/null differ diff --git a/macosx/Snes9x/AppDelegate.h b/macosx/Snes9x/AppDelegate.h new file mode 100644 index 00000000..c9c16577 --- /dev/null +++ b/macosx/Snes9x/AppDelegate.h @@ -0,0 +1,14 @@ +// +// AppDelegate.h +// Snes9x +// +// Created by Buckley on 8/21/19. +// + +#import + +@interface AppDelegate : NSObject + + +@end + diff --git a/macosx/Snes9x/AppDelegate.m b/macosx/Snes9x/AppDelegate.m new file mode 100644 index 00000000..da826e80 --- /dev/null +++ b/macosx/Snes9x/AppDelegate.m @@ -0,0 +1,38 @@ +// +// AppDelegate.m +// Snes9x +// +// Created by Buckley on 8/21/19. +// + +#import "AppDelegate.h" +#import + +@interface AppDelegate () + +@property (strong) S9xEngine *s9xEngine; +@end + +@implementation AppDelegate + +- (void)applicationDidFinishLaunching:(NSNotification *)aNotification { + self.s9xEngine = [S9xEngine new]; +} + + +- (void)applicationWillTerminate:(NSNotification *)aNotification { + // Insert code here to tear down your application +} + +- (IBAction)openDocument:(id)sender +{ + NSOpenPanel* panel = [NSOpenPanel new]; + NSModalResponse response = [panel runModal]; + + if ( response == NSModalResponseOK ) + { + [self.s9xEngine loadROM:panel.URL]; + } +} + +@end diff --git a/macosx/Snes9x/Assets.xcassets/AppIcon.appiconset/Contents.json b/macosx/Snes9x/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 00000000..2db2b1c7 --- /dev/null +++ b/macosx/Snes9x/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,58 @@ +{ + "images" : [ + { + "idiom" : "mac", + "size" : "16x16", + "scale" : "1x" + }, + { + "idiom" : "mac", + "size" : "16x16", + "scale" : "2x" + }, + { + "idiom" : "mac", + "size" : "32x32", + "scale" : "1x" + }, + { + "idiom" : "mac", + "size" : "32x32", + "scale" : "2x" + }, + { + "idiom" : "mac", + "size" : "128x128", + "scale" : "1x" + }, + { + "idiom" : "mac", + "size" : "128x128", + "scale" : "2x" + }, + { + "idiom" : "mac", + "size" : "256x256", + "scale" : "1x" + }, + { + "idiom" : "mac", + "size" : "256x256", + "scale" : "2x" + }, + { + "idiom" : "mac", + "size" : "512x512", + "scale" : "1x" + }, + { + "idiom" : "mac", + "size" : "512x512", + "scale" : "2x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/macosx/Snes9x/Assets.xcassets/Contents.json b/macosx/Snes9x/Assets.xcassets/Contents.json new file mode 100644 index 00000000..da4a164c --- /dev/null +++ b/macosx/Snes9x/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/macosx/Snes9x/Base.lproj/MainMenu.xib b/macosx/Snes9x/Base.lproj/MainMenu.xib new file mode 100644 index 00000000..cb4a74d9 --- /dev/null +++ b/macosx/Snes9x/Base.lproj/MainMenu.xib @@ -0,0 +1,678 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Default + + + + + + + Left to Right + + + + + + + Right to Left + + + + + + + + + + + Default + + + + + + + Left to Right + + + + + + + Right to Left + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/macosx/Snes9x/Info.plist b/macosx/Snes9x/Info.plist new file mode 100644 index 00000000..3588abd0 --- /dev/null +++ b/macosx/Snes9x/Info.plist @@ -0,0 +1,30 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIconFile + + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + LSMinimumSystemVersion + $(MACOSX_DEPLOYMENT_TARGET) + NSMainNibFile + MainMenu + NSPrincipalClass + NSApplication + + diff --git a/macosx/Snes9x/Snes9x.entitlements b/macosx/Snes9x/Snes9x.entitlements new file mode 100644 index 00000000..0c67376e --- /dev/null +++ b/macosx/Snes9x/Snes9x.entitlements @@ -0,0 +1,5 @@ + + + + + diff --git a/macosx/Snes9x/main.m b/macosx/Snes9x/main.m new file mode 100644 index 00000000..777c2034 --- /dev/null +++ b/macosx/Snes9x/main.m @@ -0,0 +1,12 @@ +// +// main.m +// Snes9x +// +// Created by Buckley on 8/21/19. +// + +#import + +int main(int argc, const char * argv[]) { + return NSApplicationMain(argc, argv); +} diff --git a/macosx/mac-appleevent.h b/macosx/mac-appleevent.h index ea82660c..d4e74962 100755 --- a/macosx/mac-appleevent.h +++ b/macosx/mac-appleevent.h @@ -15,6 +15,7 @@ (c) Copyright 2004 Alexander and Sander (c) Copyright 2004 - 2005 Steven Seeger (c) Copyright 2005 Ryan Vogt + (c) Copyright 2019 Michael Donald Buckley ***********************************************************************************/ diff --git a/macosx/mac-appleevent.mm b/macosx/mac-appleevent.mm index 2010b206..89abbe0c 100755 --- a/macosx/mac-appleevent.mm +++ b/macosx/mac-appleevent.mm @@ -15,6 +15,7 @@ (c) Copyright 2004 Alexander and Sander (c) Copyright 2004 - 2005 Steven Seeger (c) Copyright 2005 Ryan Vogt + (c) Copyright 2019 Michael Donald Buckley ***********************************************************************************/ diff --git a/macosx/mac-audio.h b/macosx/mac-audio.h index fac84b37..513c5dbf 100644 --- a/macosx/mac-audio.h +++ b/macosx/mac-audio.h @@ -15,6 +15,7 @@ (c) Copyright 2004 Alexander and Sander (c) Copyright 2004 - 2005 Steven Seeger (c) Copyright 2005 Ryan Vogt + (c) Copyright 2019 Michael Donald Buckley ***********************************************************************************/ diff --git a/macosx/mac-audio.mm b/macosx/mac-audio.mm index 5baa4617..deb685af 100644 --- a/macosx/mac-audio.mm +++ b/macosx/mac-audio.mm @@ -15,6 +15,7 @@ (c) Copyright 2004 Alexander and Sander (c) Copyright 2004 - 2005 Steven Seeger (c) Copyright 2005 Ryan Vogt + (c) Copyright 2019 Michael Donald Buckley ***********************************************************************************/ @@ -43,11 +44,6 @@ int cureffect = kAUReverb; static AUGraph agraph; static AUNode outNode, cnvNode, revNode, eqlNode; static AudioUnit outAU, cnvAU, revAU, eqlAU; -static AudioUnitCarbonView carbonView = NULL; -static EventHandlerUPP carbonViewEventUPP = NULL; -static EventHandlerRef carbonViewEventRef = NULL; -static WindowRef effectWRef; -static HISize effectWSize; static pthread_mutex_t mutex; static UInt32 outStoredFrames, cnvStoredFrames, revStoredFrames, eqlStoredFrames, devStoredFrames; static int16_t *audioBuffer; @@ -73,11 +69,7 @@ void InitMacSound (void) err = NewAUGraph(&agraph); -#ifndef MAC_LEOPARD_TIGER_PANTHER_SUPPORT AudioComponentDescription outdesc, cnvdesc, revdesc, eqldesc; -#else - ComponentDescription outdesc, cnvdesc, revdesc, eqldesc; -#endif outdesc.componentType = kAudioUnitType_Output; outdesc.componentSubType = kAudioUnitSubType_DefaultOutput; @@ -103,31 +95,18 @@ void InitMacSound (void) eqldesc.componentFlags = 0; eqldesc.componentFlagsMask = 0; -#ifndef MAC_LEOPARD_TIGER_PANTHER_SUPPORT err = AUGraphAddNode(agraph, &outdesc, &outNode); err = AUGraphAddNode(agraph, &cnvdesc, &cnvNode); err = AUGraphAddNode(agraph, &revdesc, &revNode); err = AUGraphAddNode(agraph, &eqldesc, &eqlNode); -#else - err = AUGraphNewNode(agraph, &outdesc, 0, NULL, &outNode); - err = AUGraphNewNode(agraph, &cnvdesc, 0, NULL, &cnvNode); - err = AUGraphNewNode(agraph, &revdesc, 0, NULL, &revNode); - err = AUGraphNewNode(agraph, &eqldesc, 0, NULL, &eqlNode); -#endif err = AUGraphOpen(agraph); -#ifndef MAC_LEOPARD_TIGER_PANTHER_SUPPORT err = AUGraphNodeInfo(agraph, outNode, NULL, &outAU); err = AUGraphNodeInfo(agraph, cnvNode, NULL, &cnvAU); err = AUGraphNodeInfo(agraph, revNode, NULL, &revAU); err = AUGraphNodeInfo(agraph, eqlNode, NULL, &eqlAU); -#else - err = AUGraphGetNodeInfo(agraph, outNode, NULL, NULL, NULL, &outAU); - err = AUGraphGetNodeInfo(agraph, cnvNode, NULL, NULL, NULL, &cnvAU); - err = AUGraphGetNodeInfo(agraph, revNode, NULL, NULL, NULL, &revAU); - err = AUGraphGetNodeInfo(agraph, eqlNode, NULL, NULL, NULL, &eqlAU); -#endif + SetAudioUnitSoundFormat(); SetAudioUnitVolume(); diff --git a/macosx/mac-cart.h b/macosx/mac-cart.h index 044cd108..d908ffc3 100755 --- a/macosx/mac-cart.h +++ b/macosx/mac-cart.h @@ -15,6 +15,7 @@ (c) Copyright 2004 Alexander and Sander (c) Copyright 2004 - 2005 Steven Seeger (c) Copyright 2005 Ryan Vogt + (c) Copyright 2019 Michael Donald Buckley ***********************************************************************************/ diff --git a/macosx/mac-cheat.h b/macosx/mac-cheat.h index fed7c33e..bef15b91 100755 --- a/macosx/mac-cheat.h +++ b/macosx/mac-cheat.h @@ -15,6 +15,7 @@ (c) Copyright 2004 Alexander and Sander (c) Copyright 2004 - 2005 Steven Seeger (c) Copyright 2005 Ryan Vogt + (c) Copyright 2019 Michael Donald Buckley ***********************************************************************************/ diff --git a/macosx/mac-cheat.mm b/macosx/mac-cheat.mm index 4197871c..f0baf09a 100755 --- a/macosx/mac-cheat.mm +++ b/macosx/mac-cheat.mm @@ -15,6 +15,7 @@ (c) Copyright 2004 Alexander and Sander (c) Copyright 2004 - 2005 Steven Seeger (c) Copyright 2005 Ryan Vogt + (c) Copyright 2019 Michael Donald Buckley ***********************************************************************************/ diff --git a/macosx/mac-cheatfinder.h b/macosx/mac-cheatfinder.h index e467023e..529bebc1 100755 --- a/macosx/mac-cheatfinder.h +++ b/macosx/mac-cheatfinder.h @@ -15,6 +15,7 @@ (c) Copyright 2004 Alexander and Sander (c) Copyright 2004 - 2005 Steven Seeger (c) Copyright 2005 Ryan Vogt + (c) Copyright 2019 Michael Donald Buckley ***********************************************************************************/ diff --git a/macosx/mac-cheatfinder.mm b/macosx/mac-cheatfinder.mm index 1ea0921a..855caeeb 100755 --- a/macosx/mac-cheatfinder.mm +++ b/macosx/mac-cheatfinder.mm @@ -15,6 +15,7 @@ (c) Copyright 2004 Alexander and Sander (c) Copyright 2004 - 2005 Steven Seeger (c) Copyright 2005 Ryan Vogt + (c) Copyright 2019 Michael Donald Buckley ***********************************************************************************/ diff --git a/macosx/mac-cocoatools.h b/macosx/mac-cocoatools.h index 2281c236..02870031 100644 --- a/macosx/mac-cocoatools.h +++ b/macosx/mac-cocoatools.h @@ -15,6 +15,7 @@ (c) Copyright 2004 Alexander and Sander (c) Copyright 2004 - 2005 Steven Seeger (c) Copyright 2005 Ryan Vogt + (c) Copyright 2019 Michael Donald Buckley ***********************************************************************************/ diff --git a/macosx/mac-cocoatools.mm b/macosx/mac-cocoatools.mm index 5c41d865..b716166c 100644 --- a/macosx/mac-cocoatools.mm +++ b/macosx/mac-cocoatools.mm @@ -15,6 +15,7 @@ (c) Copyright 2004 Alexander and Sander (c) Copyright 2004 - 2005 Steven Seeger (c) Copyright 2005 Ryan Vogt + (c) Copyright 2019 Michael Donald Buckley ***********************************************************************************/ @@ -128,7 +129,7 @@ void CocoaAddPopUpBtnToView (NSView *view, NSArray *array, float x, float y, flo { NSPopUpButton *control; NSMenu *menu; - int n; + NSUInteger n; menu = [[NSMenu alloc] init]; diff --git a/macosx/mac-controls.h b/macosx/mac-controls.h index 409cfdaf..8575a92a 100644 --- a/macosx/mac-controls.h +++ b/macosx/mac-controls.h @@ -15,6 +15,7 @@ (c) Copyright 2004 Alexander and Sander (c) Copyright 2004 - 2005 Steven Seeger (c) Copyright 2005 Ryan Vogt + (c) Copyright 2019 Michael Donald Buckley ***********************************************************************************/ diff --git a/macosx/mac-controls.mm b/macosx/mac-controls.mm index d3295f06..46c4a517 100644 --- a/macosx/mac-controls.mm +++ b/macosx/mac-controls.mm @@ -15,6 +15,7 @@ (c) Copyright 2004 Alexander and Sander (c) Copyright 2004 - 2005 Steven Seeger (c) Copyright 2005 Ryan Vogt + (c) Copyright 2019 Michael Donald Buckley ***********************************************************************************/ @@ -32,8 +33,6 @@ #define ASSIGN_POINTRf(n, s) S9xMapPointer(n, cmd = S9xGetCommandT(s), false) #define ASSIGN_POINTRt(n, s) S9xMapPointer(n, cmd = S9xGetCommandT(s), true) -#define KeyIsPressed(km, k) (1 & (((unsigned char *) km) [(k) >> 3] >> ((k) & 7))) - void S9xSetupDefaultKeymap (void) { diff --git a/macosx/mac-coreimage.h b/macosx/mac-coreimage.h index 030849dd..6614d2b4 100644 --- a/macosx/mac-coreimage.h +++ b/macosx/mac-coreimage.h @@ -15,6 +15,7 @@ (c) Copyright 2004 Alexander and Sander (c) Copyright 2004 - 2005 Steven Seeger (c) Copyright 2005 Ryan Vogt + (c) Copyright 2019 Michael Donald Buckley ***********************************************************************************/ diff --git a/macosx/mac-coreimage.mm b/macosx/mac-coreimage.mm index 918e498b..cd270f64 100644 --- a/macosx/mac-coreimage.mm +++ b/macosx/mac-coreimage.mm @@ -15,6 +15,7 @@ (c) Copyright 2004 Alexander and Sander (c) Copyright 2004 - 2005 Steven Seeger (c) Copyright 2005 Ryan Vogt + (c) Copyright 2019 Michael Donald Buckley ***********************************************************************************/ diff --git a/macosx/mac-file.h b/macosx/mac-file.h index 841b1a74..2f721274 100644 --- a/macosx/mac-file.h +++ b/macosx/mac-file.h @@ -15,6 +15,7 @@ (c) Copyright 2004 Alexander and Sander (c) Copyright 2004 - 2005 Steven Seeger (c) Copyright 2005 Ryan Vogt + (c) Copyright 2019 Michael Donald Buckley ***********************************************************************************/ diff --git a/macosx/mac-file.mm b/macosx/mac-file.mm index 28d80d96..9084491c 100644 --- a/macosx/mac-file.mm +++ b/macosx/mac-file.mm @@ -15,6 +15,7 @@ (c) Copyright 2004 Alexander and Sander (c) Copyright 2004 - 2005 Steven Seeger (c) Copyright 2005 Ryan Vogt + (c) Copyright 2019 Michael Donald Buckley ***********************************************************************************/ #import diff --git a/macosx/mac-global_prefix.h b/macosx/mac-global_prefix.h index 85298359..b20fa1f4 100644 --- a/macosx/mac-global_prefix.h +++ b/macosx/mac-global_prefix.h @@ -15,6 +15,7 @@ (c) Copyright 2004 Alexander and Sander (c) Copyright 2004 - 2005 Steven Seeger (c) Copyright 2005 Ryan Vogt + (c) Copyright 2019 Michael Donald Buckley ***********************************************************************************/ diff --git a/macosx/mac-gworld.h b/macosx/mac-gworld.h index 961b50d3..3cf1a899 100755 --- a/macosx/mac-gworld.h +++ b/macosx/mac-gworld.h @@ -15,6 +15,7 @@ (c) Copyright 2004 Alexander and Sander (c) Copyright 2004 - 2005 Steven Seeger (c) Copyright 2005 Ryan Vogt + (c) Copyright 2019 Michael Donald Buckley ***********************************************************************************/ diff --git a/macosx/mac-gworld.mm b/macosx/mac-gworld.mm index 3a27eaab..97cfefb5 100755 --- a/macosx/mac-gworld.mm +++ b/macosx/mac-gworld.mm @@ -15,6 +15,7 @@ (c) Copyright 2004 Alexander and Sander (c) Copyright 2004 - 2005 Steven Seeger (c) Copyright 2005 Ryan Vogt + (c) Copyright 2019 Michael Donald Buckley ***********************************************************************************/ diff --git a/macosx/mac-joypad.h b/macosx/mac-joypad.h index 7db4b017..c530c358 100755 --- a/macosx/mac-joypad.h +++ b/macosx/mac-joypad.h @@ -15,6 +15,7 @@ (c) Copyright 2004 Alexander and Sander (c) Copyright 2004 - 2005 Steven Seeger (c) Copyright 2005 Ryan Vogt + (c) Copyright 2019 Michael Donald Buckley ***********************************************************************************/ diff --git a/macosx/mac-joypad.mm b/macosx/mac-joypad.mm index bf891970..bc041dc0 100755 --- a/macosx/mac-joypad.mm +++ b/macosx/mac-joypad.mm @@ -15,6 +15,7 @@ (c) Copyright 2004 Alexander and Sander (c) Copyright 2004 - 2005 Steven Seeger (c) Copyright 2005 Ryan Vogt + (c) Copyright 2019 Michael Donald Buckley ***********************************************************************************/ diff --git a/macosx/mac-keyboard.h b/macosx/mac-keyboard.h index 53f3ca96..b6d2afd3 100755 --- a/macosx/mac-keyboard.h +++ b/macosx/mac-keyboard.h @@ -15,6 +15,7 @@ (c) Copyright 2004 Alexander and Sander (c) Copyright 2004 - 2005 Steven Seeger (c) Copyright 2005 Ryan Vogt + (c) Copyright 2019 Michael Donald Buckley ***********************************************************************************/ diff --git a/macosx/mac-keyboard.mm b/macosx/mac-keyboard.mm index a1c91f5e..a7a2bc12 100755 --- a/macosx/mac-keyboard.mm +++ b/macosx/mac-keyboard.mm @@ -15,6 +15,7 @@ (c) Copyright 2004 Alexander and Sander (c) Copyright 2004 - 2005 Steven Seeger (c) Copyright 2005 Ryan Vogt + (c) Copyright 2019 Michael Donald Buckley ***********************************************************************************/ diff --git a/macosx/mac-multicart.h b/macosx/mac-multicart.h index c7ef139a..28a24993 100644 --- a/macosx/mac-multicart.h +++ b/macosx/mac-multicart.h @@ -15,6 +15,7 @@ (c) Copyright 2004 Alexander and Sander (c) Copyright 2004 - 2005 Steven Seeger (c) Copyright 2005 Ryan Vogt + (c) Copyright 2019 Michael Donald Buckley ***********************************************************************************/ diff --git a/macosx/mac-multicart.mm b/macosx/mac-multicart.mm index c531f5f2..da53f2da 100644 --- a/macosx/mac-multicart.mm +++ b/macosx/mac-multicart.mm @@ -15,6 +15,7 @@ (c) Copyright 2004 Alexander and Sander (c) Copyright 2004 - 2005 Steven Seeger (c) Copyright 2005 Ryan Vogt + (c) Copyright 2019 Michael Donald Buckley ***********************************************************************************/ diff --git a/macosx/mac-musicbox.h b/macosx/mac-musicbox.h index cd1dca76..5effce26 100755 --- a/macosx/mac-musicbox.h +++ b/macosx/mac-musicbox.h @@ -15,6 +15,7 @@ (c) Copyright 2004 Alexander and Sander (c) Copyright 2004 - 2005 Steven Seeger (c) Copyright 2005 Ryan Vogt + (c) Copyright 2019 Michael Donald Buckley ***********************************************************************************/ diff --git a/macosx/mac-musicbox.mm b/macosx/mac-musicbox.mm index 74455ac6..d9201c06 100755 --- a/macosx/mac-musicbox.mm +++ b/macosx/mac-musicbox.mm @@ -15,6 +15,7 @@ (c) Copyright 2004 Alexander and Sander (c) Copyright 2004 - 2005 Steven Seeger (c) Copyright 2005 Ryan Vogt + (c) Copyright 2019 Michael Donald Buckley ***********************************************************************************/ diff --git a/macosx/mac-netplay.h b/macosx/mac-netplay.h index dc299f07..ecdf8299 100644 --- a/macosx/mac-netplay.h +++ b/macosx/mac-netplay.h @@ -15,6 +15,7 @@ (c) Copyright 2004 Alexander and Sander (c) Copyright 2004 - 2005 Steven Seeger (c) Copyright 2005 Ryan Vogt + (c) Copyright 2019 Michael Donald Buckley ***********************************************************************************/ diff --git a/macosx/mac-netplay.mm b/macosx/mac-netplay.mm index 16b70212..b9d92007 100644 --- a/macosx/mac-netplay.mm +++ b/macosx/mac-netplay.mm @@ -15,6 +15,7 @@ (c) Copyright 2004 Alexander and Sander (c) Copyright 2004 - 2005 Steven Seeger (c) Copyright 2005 Ryan Vogt + (c) Copyright 2019 Michael Donald Buckley ***********************************************************************************/ diff --git a/macosx/mac-os.h b/macosx/mac-os.h index 02174c4d..d694224c 100644 --- a/macosx/mac-os.h +++ b/macosx/mac-os.h @@ -15,12 +15,17 @@ (c) Copyright 2004 Alexander and Sander (c) Copyright 2004 - 2005 Steven Seeger (c) Copyright 2005 Ryan Vogt + (c) Copyright 2019 Michael Donald Buckley ***********************************************************************************/ #ifndef _mac_os_h_ #define _mac_os_h_ +#import + +@class NSOpenGLView; + enum { kDrawingReserved1 = 1, // unused @@ -107,6 +112,7 @@ typedef struct #define kMacWindowHeight (SNES_HEIGHT_EXTENDED << 1) #define MAC_MAX_PLAYERS 8 #define MAC_MAX_CHEATS 150 +#define MAC_NUM_KEYCODES 255 extern volatile bool8 running, s9xthreadrunning; extern volatile bool8 eventQueued, windowExtend; @@ -114,8 +120,7 @@ extern volatile int windowResizeCount; extern uint32 controlPad[MAC_MAX_PLAYERS]; extern uint8 romDetect, interleaveDetect, videoDetect, headerDetect; extern WindowRef gWindow; -extern HIRect gWindowRect; -extern int glScreenW, glScreenH; +extern uint32 glScreenW, glScreenH; extern CGRect glScreenBounds; extern Point windowPos[kWindowCount]; extern CGSize windowSize[kWindowCount]; @@ -158,6 +163,11 @@ extern CFStringRef multiCartPath[2]; extern IconRef macIconRef[118]; #endif +extern bool8 pressedKeys[MAC_NUM_KEYCODES]; +extern os_unfair_lock keyLock; + +extern NSOpenGLView *s9xView; + void AddRecentItem (NSURL *); void AdjustMenus (void); void UpdateMenuCommandStatus (Boolean); @@ -167,6 +177,14 @@ void ChangeInputDevice (void); void GetGameScreenPointer (int16 *, int16 *, bool); void PostQueueToSubEventLoop (void); int PromptFreezeDefrost (Boolean); -uint64 GetMicroseconds(); +uint64 GetMicroseconds(void); + +@interface S9xEngine : NSObject + +- (void)start; + +- (void)loadROM:(NSURL *)fileURL; + +@end #endif diff --git a/macosx/mac-os.mm b/macosx/mac-os.mm index 9d1ac411..d710342a 100644 --- a/macosx/mac-os.mm +++ b/macosx/mac-os.mm @@ -62,13 +62,11 @@ #import "mac-os.h" #define kRecentMenu_MAX 20 -#define KeyIsPressed(km, k) (1 & (((unsigned char *) km) [(k) >> 3] >> ((k) & 7))) +#define KeyIsPressed(km, k) (km[k]) volatile bool8 running = false; volatile bool8 s9xthreadrunning = false; -volatile bool8 eventQueued = false; - volatile int windowResizeCount = 1; volatile bool8 windowExtend = true; @@ -80,8 +78,7 @@ uint8 romDetect = 0, headerDetect = 0; WindowRef gWindow = NULL; -HIRect gWindowRect; -int glScreenW, +uint32 glScreenW, glScreenH; CGRect glScreenBounds; Point windowPos[kWindowCount]; @@ -173,6 +170,11 @@ CFStringRef multiCartPath[2]; IconRef macIconRef[118]; #endif +bool8 pressedKeys[MAC_NUM_KEYCODES]; +os_unfair_lock keyLock; + +NSOpenGLView *s9xView; + enum { mApple = 128, @@ -286,18 +288,8 @@ static volatile bool8 rejectinput = false; static bool8 pauseEmulation = false, frameAdvance = false; -static pthread_t s9xthread; - -static MenuRef recentMenu; static CFStringRef recentItem[kRecentMenu_MAX + 1]; -static EventHandlerUPP gameWindowUPP, - gameWUPaneUPP; -static EventHandlerRef gameWindowEventRef, - gameWUPaneEventRef; - -static int windowZoomCount = 0; - static int frameCount = 0; static bool8 frzselecting = false; @@ -339,8 +331,6 @@ static void InitAutofire (void); static void InitRecentItems (void); static void DeinitRecentItems (void); static void ClearRecentItems (void); -static void InitRecentMenu (void); -static void DeinitRecentMenu (void); static void ProcessInput (void); static void ResizeGameWindow (void); static void ChangeAutofireSettings (int, int); @@ -349,164 +339,60 @@ static void CFTimerCallback (CFRunLoopTimerRef, void *); static void UpdateFreezeDefrostScreen (int, CGImageRef, uint8 *, CGContextRef); static void * MacSnes9xThread (void *); static inline void EmulationLoop (void); +static inline void CopyPressedKeys(uint8 destination[MAC_NUM_KEYCODES]); int main (int argc, const char *argv[]) { return NSApplicationMain(argc, argv); } -//{ -// Initialize(); -// -// while (!finished) -// { -// if (cartOpen && running) -// { -// #ifdef DEBUGGER -// CPU.Flags |= DEBUG_MODE_FLAG; -// S9xDoDebug(); -// #endif -// -// eventQueued = false; -// -// Microseconds((UnsignedWide *) &lastFrame); -// frameCount = 0; -// if (macFrameSkip < 0) -// skipFrames = 3; -// else -// skipFrames = macFrameSkip; -// -// err = RemoveEventHandler(eref); -// DisposeEventHandlerUPP(eUPP); -// #ifdef MAC_PANTHER_SUPPORT -// [pool release]; -// -// pool = [[NSAutoreleasePool alloc] init]; -// #endif -// eUPP = NewEventHandlerUPP(SubEventHandler); -// err = InstallApplicationEventHandler(eUPP, GetEventTypeCount(sEvents), sEvents, NULL, &eref); -// -// S9xInitDisplay(NULL, NULL); -// ClearGFXScreen(); -// -// if (!fullscreen) -// ForceChangingKeyScript(); -// -// pthread_create(&s9xthread, NULL, MacSnes9xThread, NULL); -// -// CFRunLoopTimerRef cftimer = NULL; -// CFRunLoopTimerContext cftimerctx = { 0, NULL, NULL, NULL, NULL }; -// -// if (!fullscreen) -// { -// cftimer = CFRunLoopTimerCreate(kCFAllocatorDefault, CFAbsoluteTimeGetCurrent(), 30, 0, 0, CFTimerCallback, &cftimerctx); -// if (cftimer) -// CFRunLoopAddTimer(CFRunLoopGetCurrent(), cftimer, kCFRunLoopCommonModes); -// } -// -// AdjustMenus(); -// -// RunApplicationEventLoop(); -// -// if (!fullscreen) -// { -// if (cftimer) -// { -// CFRunLoopTimerInvalidate(cftimer); -// CFRelease(cftimer); -// cftimer = NULL; -// } -// } -// -// pthread_join(s9xthread, NULL); -// -// if (!Settings.NetPlay || Settings.NetPlayServer) -// { -// SNES9X_SaveSRAM(); -// S9xResetSaveTimer(false); -// S9xSaveCheatFile(S9xGetFilename(".cht", CHEAT_DIR)); -// } -// -// S9xDeinitDisplay(); -// -// if (Settings.NetPlay) -// { -// if (!Settings.NetPlayServer) -// { -// DeinitGameWindow(); -// cartOpen = false; -// } -// -// Settings.NetPlay = false; -// Settings.NetPlayServer = false; -// } -// -// err = RemoveEventHandler(eref); -// DisposeEventHandlerUPP(eUPP); -// #ifdef MAC_PANTHER_SUPPORT -// [pool release]; -// -// pool = [[NSAutoreleasePool alloc] init]; -// #endif -// eUPP = NewEventHandlerUPP(MainEventHandler); -// err = InstallApplicationEventHandler(eUPP, GetEventTypeCount(mEvents), mEvents, NULL, &eref); -// } -// -// if (!finished) -// { -// AdjustMenus(); -// RunApplicationEventLoop(); -// } -// } -// -// Deinitialize(); -// -// err = RemoveEventHandler(eref); -// DisposeEventHandlerUPP(eUPP); -//#ifdef MAC_PANTHER_SUPPORT -// [pool release]; -//#endif -// -// return (0); -//} -// -static void CFTimerCallback (CFRunLoopTimerRef timer, void *info) -{ -// OSStatus err; -// -// err = UpdateSystemActivity(OverallAct); -} -// + static void * MacSnes9xThread (void *) { -// Settings.StopEmulation = false; -// s9xthreadrunning = true; -// -// EmulationLoop(); -// -// s9xthreadrunning = false; -// Settings.StopEmulation = true; -// + Settings.StopEmulation = false; + s9xthreadrunning = true; + + EmulationLoop(); + + s9xthreadrunning = false; + Settings.StopEmulation = true; + return (NULL); } -// + +static inline void CopyPressedKeys(uint8 destination[MAC_NUM_KEYCODES]) +{ + os_unfair_lock_lock(&keyLock); + NSEventModifierFlags flags = [NSEvent modifierFlags]; + pressedKeys[kVK_Shift] = (flags & NSEventModifierFlagShift) != 0; + pressedKeys[kVK_Command] = (flags & NSEventModifierFlagCommand) != 0; + pressedKeys[kVK_Control] = (flags & NSEventModifierFlagControl) != 0; + pressedKeys[kVK_CapsLock] = (flags & NSEventModifierFlagCapsLock) != 0; + pressedKeys[kVK_Option] = (flags & NSEventModifierFlagOption) != 0; + pressedKeys[kVK_Help] = (flags & NSEventModifierFlagHelp) != 0; + pressedKeys[kVK_Function] = (flags & NSEventModifierFlagFunction) != 0; + + memcpy(destination, pressedKeys, sizeof(pressedKeys)); + os_unfair_lock_unlock(&keyLock); +} + static inline void EmulationLoop (void) { -// bool8 olddisplayframerate = false; -// int storedMacFrameSkip = macFrameSkip; -// -// pauseEmulation = false; -// frameAdvance = false; -// -// if (macQTRecord) -// { -// olddisplayframerate = Settings.DisplayFrameRate; -// Settings.DisplayFrameRate = false; -// } -// -// MacStartSound(); -// -// if (Settings.NetPlay) -// { + bool8 olddisplayframerate = false; + int storedMacFrameSkip = macFrameSkip; + + pauseEmulation = false; + frameAdvance = false; + + if (macQTRecord) + { + olddisplayframerate = Settings.DisplayFrameRate; + Settings.DisplayFrameRate = false; + } + + MacStartSound(); + + if (Settings.NetPlay) + { // if (Settings.NetPlayServer) // { // NPServerDetachNetPlayThread(); @@ -537,42 +423,42 @@ static inline void EmulationLoop (void) // // NPClientRestoreConfig(); // } -// } -// else -// { -// while (running) -// { -// ProcessInput(); -// -// if (!pauseEmulation) -// S9xMainLoop(); -// else -// { -// if (frameAdvance) -// { -// macFrameSkip = 1; -// skipFrames = 1; -// frameAdvance = false; -// S9xMainLoop(); -// macFrameSkip = storedMacFrameSkip; -// } -// -// usleep(Settings.FrameTime); -// } -// } -// } -// -// MacStopSound(); -// -// if (macQTRecord) -// { + } + else + { + while (running) + { + ProcessInput(); + + if (!pauseEmulation) + S9xMainLoop(); + else + { + if (frameAdvance) + { + macFrameSkip = 1; + skipFrames = 1; + frameAdvance = false; + S9xMainLoop(); + macFrameSkip = storedMacFrameSkip; + } + + usleep(Settings.FrameTime); + } + } + } + + MacStopSound(); + + if (macQTRecord) + { // MacQTStopRecording(); // macQTRecord = false; -// -// Settings.DisplayFrameRate = olddisplayframerate; -// } -// -// S9xMovieShutdown(); + + Settings.DisplayFrameRate = olddisplayframerate; + } + + S9xMovieShutdown(); } // //static OSStatus MainEventHandler (EventHandlerCallRef inHandlerCallRef, EventRef inEvent, void *inUserData) @@ -1100,73 +986,73 @@ static inline void EmulationLoop (void) // return (result); //} // -//static void InitRecentItems (void) -//{ -// CFStringRef keyRef, pathRef; -// int count; -// char key[32]; +static void InitRecentItems (void) +{ + CFStringRef keyRef, pathRef; + int count; + char key[32]; + + count = 0; + + for (int i = 0; i <= kRecentMenu_MAX; i++) + recentItem[i] = NULL; + + for (int i = 0; i < kRecentMenu_MAX; i++) + { + sprintf(key, "RecentItem_%02d", i); + keyRef = CFStringCreateWithCString(kCFAllocatorDefault, key, CFStringGetSystemEncoding()); + if (keyRef) + { + pathRef = (CFStringRef) CFPreferencesCopyAppValue(keyRef, kCFPreferencesCurrentApplication); + if (pathRef) + { + recentItem[count] = pathRef; + count++; + } + + CFRelease(keyRef); + } + } +} // -// count = 0; -// -// for (int i = 0; i <= kRecentMenu_MAX; i++) -// recentItem[i] = NULL; -// -// for (int i = 0; i < kRecentMenu_MAX; i++) -// { -// sprintf(key, "RecentItem_%02d", i); -// keyRef = CFStringCreateWithCString(kCFAllocatorDefault, key, CFStringGetSystemEncoding()); -// if (keyRef) -// { -// pathRef = (CFStringRef) CFPreferencesCopyAppValue(keyRef, kCFPreferencesCurrentApplication); -// if (pathRef) -// { -// recentItem[count] = pathRef; -// count++; -// } -// -// CFRelease(keyRef); -// } -// } -//} -// -//static void DeinitRecentItems (void) -//{ -// CFStringRef keyRef; -// char key[32]; -// -// for (int i = 0; i < kRecentMenu_MAX; i++) -// { -// sprintf(key, "RecentItem_%02d", i); -// keyRef = CFStringCreateWithCString(kCFAllocatorDefault, key, CFStringGetSystemEncoding()); -// if (keyRef) -// { -// if (recentItem[i]) -// { -// CFPreferencesSetAppValue(keyRef, recentItem[i], kCFPreferencesCurrentApplication); -// CFRelease(recentItem[i]); -// recentItem[i] = NULL; -// } -// else -// CFPreferencesSetAppValue(keyRef, NULL, kCFPreferencesCurrentApplication); -// -// CFRelease(keyRef); -// } -// } -// -// CFPreferencesAppSynchronize(kCFPreferencesCurrentApplication); -//} -// -//static void ClearRecentItems (void) -//{ -// for (int i = 0; i < kRecentMenu_MAX; i++) -// { -// if (recentItem[i]) -// { -// CFRelease(recentItem[i]); -// recentItem[i] = NULL; -// } -// } -//} +static void DeinitRecentItems (void) +{ + CFStringRef keyRef; + char key[32]; + + for (int i = 0; i < kRecentMenu_MAX; i++) + { + sprintf(key, "RecentItem_%02d", i); + keyRef = CFStringCreateWithCString(kCFAllocatorDefault, key, CFStringGetSystemEncoding()); + if (keyRef) + { + if (recentItem[i]) + { + CFPreferencesSetAppValue(keyRef, recentItem[i], kCFPreferencesCurrentApplication); + CFRelease(recentItem[i]); + recentItem[i] = NULL; + } + else + CFPreferencesSetAppValue(keyRef, NULL, kCFPreferencesCurrentApplication); + + CFRelease(keyRef); + } + } + + CFPreferencesAppSynchronize(kCFPreferencesCurrentApplication); +} + +static void ClearRecentItems (void) +{ + for (int i = 0; i < kRecentMenu_MAX; i++) + { + if (recentItem[i]) + { + CFRelease(recentItem[i]); + recentItem[i] = NULL; + } + } +} // void AddRecentItem (NSURL *url) { @@ -1801,59 +1687,59 @@ void AddRecentItem (NSURL *url) // return (result); //} // -//void ChangeInputDevice (void) -//{ -// switch (deviceSetting) -// { -// case iPad: -// S9xSetController(0, CTL_JOYPAD, 0, 0, 0, 0); -// S9xSetController(1, CTL_JOYPAD, 1, 0, 0, 0); -// macControllerOption = SNES_JOYPAD; -// break; -// -// case iMouse: -// S9xSetController(0, CTL_MOUSE, 0, 0, 0, 0); -// S9xSetController(1, CTL_JOYPAD, 1, 0, 0, 0); -// macControllerOption = SNES_MOUSE; -// break; -// -// case iMouse2: -// S9xSetController(0, CTL_JOYPAD, 0, 0, 0, 0); -// S9xSetController(1, CTL_MOUSE, 1, 0, 0, 0); -// macControllerOption = SNES_MOUSE_SWAPPED; -// break; -// -// case iSuperScope: -// S9xSetController(0, CTL_JOYPAD, 0, 0, 0, 0); -// S9xSetController(1, CTL_SUPERSCOPE, 0, 0, 0, 0); -// macControllerOption = SNES_SUPERSCOPE; -// break; -// -// case iMultiPlayer5: -// S9xSetController(0, CTL_JOYPAD, 0, 0, 0, 0); -// S9xSetController(1, CTL_MP5, 1, 2, 3, 4); -// macControllerOption = SNES_MULTIPLAYER5; -// break; -// -// case iMultiPlayer5_2: -// S9xSetController(0, CTL_MP5, 0, 1, 2, 3); -// S9xSetController(1, CTL_MP5, 4, 5, 6, 7); -// macControllerOption = SNES_MULTIPLAYER5_2; -// break; -// -// case iJustifier1: -// S9xSetController(0, CTL_JOYPAD, 0, 0, 0, 0); -// S9xSetController(1, CTL_JUSTIFIER, 0, 0, 0, 0); -// macControllerOption = SNES_JUSTIFIER; -// break; -// -// case iJustifier2: -// S9xSetController(0, CTL_JOYPAD, 0, 0, 0, 0); -// S9xSetController(1, CTL_JUSTIFIER, 1, 0, 0, 0); -// macControllerOption = SNES_JUSTIFIER_2; -// break; -// } -//} +void ChangeInputDevice (void) +{ + switch (deviceSetting) + { + case iPad: + S9xSetController(0, CTL_JOYPAD, 0, 0, 0, 0); + S9xSetController(1, CTL_JOYPAD, 1, 0, 0, 0); + macControllerOption = SNES_JOYPAD; + break; + + case iMouse: + S9xSetController(0, CTL_MOUSE, 0, 0, 0, 0); + S9xSetController(1, CTL_JOYPAD, 1, 0, 0, 0); + macControllerOption = SNES_MOUSE; + break; + + case iMouse2: + S9xSetController(0, CTL_JOYPAD, 0, 0, 0, 0); + S9xSetController(1, CTL_MOUSE, 1, 0, 0, 0); + macControllerOption = SNES_MOUSE_SWAPPED; + break; + + case iSuperScope: + S9xSetController(0, CTL_JOYPAD, 0, 0, 0, 0); + S9xSetController(1, CTL_SUPERSCOPE, 0, 0, 0, 0); + macControllerOption = SNES_SUPERSCOPE; + break; + + case iMultiPlayer5: + S9xSetController(0, CTL_JOYPAD, 0, 0, 0, 0); + S9xSetController(1, CTL_MP5, 1, 2, 3, 4); + macControllerOption = SNES_MULTIPLAYER5; + break; + + case iMultiPlayer5_2: + S9xSetController(0, CTL_MP5, 0, 1, 2, 3); + S9xSetController(1, CTL_MP5, 4, 5, 6, 7); + macControllerOption = SNES_MULTIPLAYER5_2; + break; + + case iJustifier1: + S9xSetController(0, CTL_JOYPAD, 0, 0, 0, 0); + S9xSetController(1, CTL_JUSTIFIER, 0, 0, 0, 0); + macControllerOption = SNES_JUSTIFIER; + break; + + case iJustifier2: + S9xSetController(0, CTL_JOYPAD, 0, 0, 0, 0); + S9xSetController(1, CTL_JUSTIFIER, 1, 0, 0, 0); + macControllerOption = SNES_JUSTIFIER_2; + break; + } +} // void ApplyNSRTHeaderControllers (void) { @@ -2176,14 +2062,14 @@ int PromptFreezeDefrost (Boolean freezing) // { // if (!rejectinput) // { -// GetKeys(keys); +// CopyPressedKeys(keys); // // for (int count = 0; count <= 12; count++) // { // while (KeyIsPressed(keys, keyCheck[count])) // { // result = count - 1; -// GetKeys(keys); +// CopyPressedKeys(keys); // } // } // @@ -2195,7 +2081,7 @@ int PromptFreezeDefrost (Boolean freezing) // current_selection -= 12; // UpdateFreezeDefrostScreen(current_selection, image, draw, ctx); // while (KeyIsPressed(keys, keyCode[k1PRight]) && (TickCount() < (startTime + repeatDelay))) -// GetKeys(keys); +// CopyPressedKeys(keys); // } // // while (KeyIsPressed(keys, keyCode[k1PLeft])) @@ -2206,7 +2092,7 @@ int PromptFreezeDefrost (Boolean freezing) // current_selection += 12; // UpdateFreezeDefrostScreen(current_selection, image, draw, ctx); // while (KeyIsPressed(keys, keyCode[k1PLeft]) && (TickCount() < (startTime + repeatDelay))) -// GetKeys(keys); +// CopyPressedKeys(keys); // } // // while (KeyIsPressed(keys, keyCode[k1PDown])) @@ -2217,7 +2103,7 @@ int PromptFreezeDefrost (Boolean freezing) // current_selection -= 12; // UpdateFreezeDefrostScreen(current_selection, image, draw, ctx); // while (KeyIsPressed(keys, keyCode[k1PDown]) && (TickCount() < (startTime + repeatDelay))) -// GetKeys(keys); +// CopyPressedKeys(keys); // } // // while (KeyIsPressed(keys, keyCode[k1PUp])) @@ -2228,7 +2114,7 @@ int PromptFreezeDefrost (Boolean freezing) // current_selection += 12; // UpdateFreezeDefrostScreen(current_selection, image, draw, ctx); // while (KeyIsPressed(keys, keyCode[k1PUp]) && (TickCount() < (startTime + repeatDelay))) -// GetKeys(keys); +// CopyPressedKeys(keys); // } // // while (KeyIsPressed(keys, keyCode[k1PA] ) || @@ -2244,7 +2130,7 @@ int PromptFreezeDefrost (Boolean freezing) // KeyIsPressed(keys, keyCode[k1PSelect]) || // KeyIsPressed(keys, keyCode[k2PSelect])) // { -// GetKeys(keys); +// CopyPressedKeys(keys); // result = current_selection; // } // @@ -2390,581 +2276,560 @@ int PromptFreezeDefrost (Boolean freezing) // DrawFreezeDefrostScreen(draw); //} // -//static void ProcessInput (void) -//{ -// KeyMap myKeys; -// bool8 isok, fnbtn, altbtn, tcbtn; -// static bool8 toggleff = false, lastTimeTT = false, lastTimeFn = false, ffUp = false, ffDown = false, ffUpSp = false, ffDownSp = false; -// -// if (rejectinput) -// return; -// -// if (ISpKeyIsPressed(kISpEsc)) -// { -// if (s9xthreadrunning) -// { -// if (!eventQueued) -// { -// PostQueueToSubEventLoop(); -// eventQueued = true; -// } -// } -// else -// running = false; -// -// return; -// } -// -// if (ISpKeyIsPressed(kISpFreeze)) -// { -// MacStopSound(); -// while (ISpKeyIsPressed(kISpFreeze)); -// -// isok = SNES9X_Freeze(); -// ClearGFXScreen(); -// return; -// } -// -// if (ISpKeyIsPressed(kISpDefrost)) -// { -// MacStopSound(); -// while (ISpKeyIsPressed(kISpDefrost)); -// -// isok = SNES9X_Defrost(); -// ClearGFXScreen(); -// return; -// } -// -// if (ISpKeyIsPressed(kISpScreenshot)) -// { -// Settings.TakeScreenshot = true; -// while (ISpKeyIsPressed(kISpScreenshot)); -// } -// -// if (ISpKeyIsPressed(kISpSPC)) -// { -// S9xDumpSPCSnapshot(); -// while (ISpKeyIsPressed(kISpSPC)); -// } -// -// if (ISpKeyIsPressed(kISpFFUp)) -// { -// if (!ffUpSp) -// { -// ChangeTurboRate(+1); -// ffUpSp = true; -// } -// } -// else -// ffUpSp = false; -// -// if (ISpKeyIsPressed(kISpFFDown)) -// { -// if (!ffDownSp) -// { -// ChangeTurboRate(-1); -// ffDownSp = true; -// } -// } -// else -// ffDownSp = false; -// -// controlPad[0] = controlPad[1] = 0; -// -// JoypadScanDirection(0, &(controlPad[0])); -// if (ISpKeyIsPressed(kISp1PR )) controlPad[0] |= 0x0010; -// if (ISpKeyIsPressed(kISp1PL )) controlPad[0] |= 0x0020; -// if (ISpKeyIsPressed(kISp1PX )) controlPad[0] |= 0x0040; -// if (ISpKeyIsPressed(kISp1PA )) controlPad[0] |= 0x0080; -// if (ISpKeyIsPressed(kISp1PStart )) controlPad[0] |= 0x1000; -// if (ISpKeyIsPressed(kISp1PSelect)) controlPad[0] |= 0x2000; -// if (ISpKeyIsPressed(kISp1PY )) controlPad[0] |= 0x4000; -// if (ISpKeyIsPressed(kISp1PB )) controlPad[0] |= 0x8000; -// -// JoypadScanDirection(1, &(controlPad[1])); -// if (ISpKeyIsPressed(kISp2PR )) controlPad[1] |= 0x0010; -// if (ISpKeyIsPressed(kISp2PL )) controlPad[1] |= 0x0020; -// if (ISpKeyIsPressed(kISp2PX )) controlPad[1] |= 0x0040; -// if (ISpKeyIsPressed(kISp2PA )) controlPad[1] |= 0x0080; -// if (ISpKeyIsPressed(kISp2PStart )) controlPad[1] |= 0x1000; -// if (ISpKeyIsPressed(kISp2PSelect)) controlPad[1] |= 0x2000; -// if (ISpKeyIsPressed(kISp2PY )) controlPad[1] |= 0x4000; -// if (ISpKeyIsPressed(kISp2PB )) controlPad[1] |= 0x8000; -// -// if (((macControllerOption == SNES_MULTIPLAYER5) || (macControllerOption == SNES_MULTIPLAYER5_2)) && Settings.MultiPlayer5Master) -// { -// controlPad[2] = controlPad[3] = controlPad[4] = 0; -// -// JoypadScanDirection(2, &(controlPad[2])); -// if (ISpKeyIsPressed(kISp3PR )) controlPad[2] |= 0x0010; -// if (ISpKeyIsPressed(kISp3PL )) controlPad[2] |= 0x0020; -// if (ISpKeyIsPressed(kISp3PX )) controlPad[2] |= 0x0040; -// if (ISpKeyIsPressed(kISp3PA )) controlPad[2] |= 0x0080; -// if (ISpKeyIsPressed(kISp3PStart )) controlPad[2] |= 0x1000; -// if (ISpKeyIsPressed(kISp3PSelect)) controlPad[2] |= 0x2000; -// if (ISpKeyIsPressed(kISp3PY )) controlPad[2] |= 0x4000; -// if (ISpKeyIsPressed(kISp3PB )) controlPad[2] |= 0x8000; -// -// JoypadScanDirection(3, &(controlPad[3])); -// if (ISpKeyIsPressed(kISp4PR )) controlPad[3] |= 0x0010; -// if (ISpKeyIsPressed(kISp4PL )) controlPad[3] |= 0x0020; -// if (ISpKeyIsPressed(kISp4PX )) controlPad[3] |= 0x0040; -// if (ISpKeyIsPressed(kISp4PA )) controlPad[3] |= 0x0080; -// if (ISpKeyIsPressed(kISp4PStart )) controlPad[3] |= 0x1000; -// if (ISpKeyIsPressed(kISp4PSelect)) controlPad[3] |= 0x2000; -// if (ISpKeyIsPressed(kISp4PY )) controlPad[3] |= 0x4000; -// if (ISpKeyIsPressed(kISp4PB )) controlPad[3] |= 0x8000; -// -// JoypadScanDirection(4, &(controlPad[4])); -// if (ISpKeyIsPressed(kISp5PR )) controlPad[4] |= 0x0010; -// if (ISpKeyIsPressed(kISp5PL )) controlPad[4] |= 0x0020; -// if (ISpKeyIsPressed(kISp5PX )) controlPad[4] |= 0x0040; -// if (ISpKeyIsPressed(kISp5PA )) controlPad[4] |= 0x0080; -// if (ISpKeyIsPressed(kISp5PStart )) controlPad[4] |= 0x1000; -// if (ISpKeyIsPressed(kISp5PSelect)) controlPad[4] |= 0x2000; -// if (ISpKeyIsPressed(kISp5PY )) controlPad[4] |= 0x4000; -// if (ISpKeyIsPressed(kISp5PB )) controlPad[4] |= 0x8000; -// -// ControlPadFlagsToS9xReportButtons(2, controlPad[2]); -// ControlPadFlagsToS9xReportButtons(3, controlPad[3]); -// ControlPadFlagsToS9xReportButtons(4, controlPad[4]); -// -// if (macControllerOption == SNES_MULTIPLAYER5_2) -// { -// controlPad[5] = controlPad[6] = controlPad[7] = 0; -// -// JoypadScanDirection(5, &(controlPad[5])); -// if (ISpKeyIsPressed(kISp6PR )) controlPad[5] |= 0x0010; -// if (ISpKeyIsPressed(kISp6PL )) controlPad[5] |= 0x0020; -// if (ISpKeyIsPressed(kISp6PX )) controlPad[5] |= 0x0040; -// if (ISpKeyIsPressed(kISp6PA )) controlPad[5] |= 0x0080; -// if (ISpKeyIsPressed(kISp6PStart )) controlPad[5] |= 0x1000; -// if (ISpKeyIsPressed(kISp6PSelect)) controlPad[5] |= 0x2000; -// if (ISpKeyIsPressed(kISp6PY )) controlPad[5] |= 0x4000; -// if (ISpKeyIsPressed(kISp6PB )) controlPad[5] |= 0x8000; -// -// JoypadScanDirection(6, &(controlPad[6])); -// if (ISpKeyIsPressed(kISp7PR )) controlPad[6] |= 0x0010; -// if (ISpKeyIsPressed(kISp7PL )) controlPad[6] |= 0x0020; -// if (ISpKeyIsPressed(kISp7PX )) controlPad[6] |= 0x0040; -// if (ISpKeyIsPressed(kISp7PA )) controlPad[6] |= 0x0080; -// if (ISpKeyIsPressed(kISp7PStart )) controlPad[6] |= 0x1000; -// if (ISpKeyIsPressed(kISp7PSelect)) controlPad[6] |= 0x2000; -// if (ISpKeyIsPressed(kISp7PY )) controlPad[6] |= 0x4000; -// if (ISpKeyIsPressed(kISp7PB )) controlPad[6] |= 0x8000; -// -// JoypadScanDirection(7, &(controlPad[7])); -// if (ISpKeyIsPressed(kISp8PR )) controlPad[7] |= 0x0010; -// if (ISpKeyIsPressed(kISp8PL )) controlPad[7] |= 0x0020; -// if (ISpKeyIsPressed(kISp8PX )) controlPad[7] |= 0x0040; -// if (ISpKeyIsPressed(kISp8PA )) controlPad[7] |= 0x0080; -// if (ISpKeyIsPressed(kISp8PStart )) controlPad[7] |= 0x1000; -// if (ISpKeyIsPressed(kISp8PSelect)) controlPad[7] |= 0x2000; -// if (ISpKeyIsPressed(kISp8PY )) controlPad[7] |= 0x4000; -// if (ISpKeyIsPressed(kISp8PB )) controlPad[7] |= 0x8000; -// -// ControlPadFlagsToS9xReportButtons(5, controlPad[5]); -// ControlPadFlagsToS9xReportButtons(6, controlPad[6]); -// ControlPadFlagsToS9xReportButtons(7, controlPad[7]); -// } -// } -// -// GetKeys(myKeys); -// -// fnbtn = (KeyIsPressed(myKeys, keyCode[kKeyFunction]) || ISpKeyIsPressed(kISpFunction)); -// altbtn = (KeyIsPressed(myKeys, keyCode[kKeyAlt] ) || ISpKeyIsPressed(kISpAlt) ); -// -// if (fnbtn) -// { -// if (!lastTimeFn) -// { -// for (unsigned int i = 0; i < kCommandListSize; i++) -// btncmd[i].held = false; -// } -// -// lastTimeFn = true; -// lastTimeTT = false; -// ffUp = ffDown = false; -// -// for (unsigned int i = 0; i < kCommandListSize; i++) -// { -// if (KeyIsPressed(myKeys, btncmd[i].keycode)) -// { -// if (!(btncmd[i].held)) -// { -// btncmd[i].held = true; -// -// if (strncmp(btncmd[i].command, "_mac", 4) == 0) -// { -// static char msg[64]; -// -// switch (btncmd[i].command[4] - '0') -// { -// case 1: -// Settings.DisplayPressedKeys = !Settings.DisplayPressedKeys; -// break; -// -// case 2: -// if (S9xMovieActive()) -// Settings.DisplayMovieFrame = !Settings.DisplayMovieFrame; -// break; -// -// case 3: -// if (macFrameAdvanceRate < 5000000) -// macFrameAdvanceRate += 100000; -// sprintf(msg, "Emulation Speed: 100/%d", macFrameAdvanceRate / 10000); -// S9xSetInfoString(msg); -// break; -// -// case 4: -// if (macFrameAdvanceRate > 500000) -// macFrameAdvanceRate -= 100000; -// sprintf(msg, "Emulation Speed: 100/%d", macFrameAdvanceRate / 10000); -// S9xSetInfoString(msg); -// break; -// -// case 5: -// pauseEmulation = !pauseEmulation; -// break; -// -// case 6: -// frameAdvance = true; -// break; -// } -// } -// else -// { -// s9xcommand_t s9xcmd; -// -// s9xcmd = S9xGetCommandT(btncmd[i].command); -// S9xApplyCommand(s9xcmd, 1, 0); -// } -// } -// } -// else -// btncmd[i].held = false; -// } -// } -// else -// { -// lastTimeFn = false; -// -// if (KeyIsPressed(myKeys, keyCode[kKeyEsc])) -// { -// if (s9xthreadrunning) -// { -// if (!eventQueued) -// { -// PostQueueToSubEventLoop(); -// eventQueued = true; -// } -// } -// else -// running = false; -// -// return; -// } -// -// if (KeyIsPressed(myKeys, keyCode[kKeyFreeze])) -// { -// MacStopSound(); -// while (KeyIsPressed(myKeys, keyCode[kKeyFreeze])) -// GetKeys(myKeys); -// -// isok = SNES9X_Freeze(); -// ClearGFXScreen(); -// return; -// } -// -// if (KeyIsPressed(myKeys, keyCode[kKeyDefrost])) -// { -// MacStopSound(); -// while (KeyIsPressed(myKeys, keyCode[kKeyDefrost])) -// GetKeys(myKeys); -// -// isok = SNES9X_Defrost(); -// ClearGFXScreen(); -// return; -// } -// -// if (KeyIsPressed(myKeys, keyCode[kKeyScreenshot])) -// { -// Settings.TakeScreenshot = true; -// while (KeyIsPressed(myKeys, keyCode[kKeyScreenshot])) -// GetKeys(myKeys); -// } -// -// if (KeyIsPressed(myKeys, keyCode[kKeySPC])) -// { -// S9xDumpSPCSnapshot(); -// while (KeyIsPressed(myKeys, keyCode[kKeySPC])) -// GetKeys(myKeys); -// } -// -// if (KeyIsPressed(myKeys, keyCode[kKeyFFUp])) -// { -// if (!ffUp) -// { -// ChangeTurboRate(+1); -// ffUp = true; -// } -// } -// else -// ffUp = false; -// -// if (KeyIsPressed(myKeys, keyCode[kKeyFFDown])) -// { -// if (!ffDown) -// { -// ChangeTurboRate(-1); -// ffDown = true; -// } -// } -// else -// ffDown = false; -// -// if (KeyIsPressed(myKeys, keyCode[k1PR] )) controlPad[0] |= 0x0010; -// if (KeyIsPressed(myKeys, keyCode[k1PL] )) controlPad[0] |= 0x0020; -// if (KeyIsPressed(myKeys, keyCode[k1PX] )) controlPad[0] |= 0x0040; -// if (KeyIsPressed(myKeys, keyCode[k1PA] )) controlPad[0] |= 0x0080; -// if (KeyIsPressed(myKeys, keyCode[k1PRight] )) controlPad[0] |= 0x0100; -// if (KeyIsPressed(myKeys, keyCode[k1PLeft] )) controlPad[0] |= 0x0200; -// if (KeyIsPressed(myKeys, keyCode[k1PDown] )) controlPad[0] |= 0x0400; -// if (KeyIsPressed(myKeys, keyCode[k1PUp] )) controlPad[0] |= 0x0800; -// if (KeyIsPressed(myKeys, keyCode[k1PStart] )) controlPad[0] |= 0x1000; -// if (KeyIsPressed(myKeys, keyCode[k1PSelect])) controlPad[0] |= 0x2000; -// if (KeyIsPressed(myKeys, keyCode[k1PY] )) controlPad[0] |= 0x4000; -// if (KeyIsPressed(myKeys, keyCode[k1PB] )) controlPad[0] |= 0x8000; -// -// if (KeyIsPressed(myKeys, keyCode[k2PR] )) controlPad[1] |= 0x0010; -// if (KeyIsPressed(myKeys, keyCode[k2PL] )) controlPad[1] |= 0x0020; -// if (KeyIsPressed(myKeys, keyCode[k2PX] )) controlPad[1] |= 0x0040; -// if (KeyIsPressed(myKeys, keyCode[k2PA] )) controlPad[1] |= 0x0080; -// if (KeyIsPressed(myKeys, keyCode[k2PRight] )) controlPad[1] |= 0x0100; -// if (KeyIsPressed(myKeys, keyCode[k2PLeft] )) controlPad[1] |= 0x0200; -// if (KeyIsPressed(myKeys, keyCode[k2PDown] )) controlPad[1] |= 0x0400; -// if (KeyIsPressed(myKeys, keyCode[k2PUp] )) controlPad[1] |= 0x0800; -// if (KeyIsPressed(myKeys, keyCode[k2PStart] )) controlPad[1] |= 0x1000; -// if (KeyIsPressed(myKeys, keyCode[k2PSelect])) controlPad[1] |= 0x2000; -// if (KeyIsPressed(myKeys, keyCode[k2PY] )) controlPad[1] |= 0x4000; -// if (KeyIsPressed(myKeys, keyCode[k2PB] )) controlPad[1] |= 0x8000; -// -// if (altbtn) -// { -// if (!lastTimeTT) -// changeAuto[0] = changeAuto[1] = 0; -// -// for (int i = 0; i < 2; i++) -// { -// for (int j = 0; j < 12; j++) -// { -// uint16 mask = 0x0010 << j; -// -// if (controlPad[i] & mask & autofireRec[i].toggleMask) -// { -// controlPad[i] &= ~mask; -// -// if (!(changeAuto[i] & mask)) -// { -// changeAuto[i] |= mask; -// ChangeAutofireSettings(i, j); -// } -// } -// else -// changeAuto[i] &= ~mask; -// } -// } -// -// lastTimeTT = true; -// } -// else -// lastTimeTT = false; -// } -// -// if (enabletoggle) -// { -// if ((ISpKeyIsPressed(kISpFastForward) || KeyIsPressed(myKeys, keyCode[kKeyFastForward])) && !fnbtn) -// { -// if (!toggleff) -// { -// toggleff = true; -// Settings.TurboMode = !Settings.TurboMode; -// S9xSetInfoString(Settings.TurboMode ? "Turbo mode on" : "Turbo mode off"); -// if (!Settings.TurboMode) -// S9xClearSamples(); -// } -// } -// else -// toggleff = false; -// } -// else -// { -// bool8 old = Settings.TurboMode; -// Settings.TurboMode = ((ISpKeyIsPressed(kISpFastForward) || KeyIsPressed(myKeys, keyCode[kKeyFastForward])) && !fnbtn) ? true : false; -// if (!Settings.TurboMode && old) -// S9xClearSamples(); -// } -// -// for (int i = 0; i < 2; i++) -// controlPad[i] ^= autofireRec[i].invertMask; -// -// if (autofire) -// { -// long long currentTime; -// uint16 changeMask; -// -// Microseconds((UnsignedWide *) ¤tTime); -// tcbtn = (KeyIsPressed(myKeys, keyCode[kKeyTC]) || ISpKeyIsPressed(kISpTC)); -// -// for (int i = 0; i < 2; i++) -// { -// changeMask = (lastTimeTT ? (~changeAuto[i]) : 0xFFFF); -// -// for (int j = 0; j < 12; j++) -// { -// uint16 mask = (0x0010 << j) & changeMask; -// -// if (autofireRec[i].tcMask & mask) -// { -// if (!tcbtn) -// continue; -// } -// -// if (autofireRec[i].buttonMask & mask) -// { -// if (controlPad[i] & mask) -// { -// if (currentTime > autofireRec[i].nextTime[j]) -// { -// if (Settings.TurboMode) -// autofireRec[i].nextTime[j] = currentTime + (long long) ((1.0 / (float) autofireRec[i].frequency) * 1000000.0 / macFastForwardRate); -// else -// autofireRec[i].nextTime[j] = currentTime + (long long) ((1.0 / (float) autofireRec[i].frequency) * 1000000.0); -// } -// else -// controlPad[i] &= ~mask; -// } -// } -// } -// } -// } -// -// ControlPadFlagsToS9xReportButtons(0, controlPad[0]); -// ControlPadFlagsToS9xReportButtons(1, controlPad[1]); -// -// if (macControllerOption == SNES_JUSTIFIER_2) -// ControlPadFlagsToS9xPseudoPointer(controlPad[1]); -//} -// -//static void ChangeAutofireSettings (int player, int btn) -//{ -// static char msg[64]; -// uint16 mask, m; -// -// mask = 0x0010 << btn; -// autofireRec[player].buttonMask ^= mask; -// autofire = (autofireRec[0].buttonMask || autofireRec[1].buttonMask); -// -// m = autofireRec[player].buttonMask; -// if (m) -// snprintf(msg, sizeof(msg), "Autofire %d:%s%s%s%s%s%s%s%s%s%s%s%s%s", player + 1, -// (m & 0xC0F0 ? " " : ""), -// (m & 0x0080 ? "A" : ""), -// (m & 0x8000 ? "B" : ""), -// (m & 0x0040 ? "X" : ""), -// (m & 0x4000 ? "Y" : ""), -// (m & 0x0020 ? "L" : ""), -// (m & 0x0010 ? "R" : ""), -// (m & 0x0800 ? " Up" : ""), -// (m & 0x0400 ? " Dn" : ""), -// (m & 0x0200 ? " Lf" : ""), -// (m & 0x0100 ? " Rt" : ""), -// (m & 0x1000 ? " St" : ""), -// (m & 0x2000 ? " Se" : "")); -// else -// snprintf(msg, sizeof(msg), "Autofire %d: Off", player + 1); -// -// S9xSetInfoString(msg); -//} -// -//static void ChangeTurboRate (int d) -//{ -// static char msg[64]; -// -// macFastForwardRate += d; -// if (macFastForwardRate < 1) -// macFastForwardRate = 1; -// else -// if (macFastForwardRate > 15) -// macFastForwardRate = 15; -// -// snprintf(msg, sizeof(msg), "Turbo Rate: %d", macFastForwardRate); -// S9xSetInfoString(msg); -//} -// +static void ProcessInput (void) +{ + bool8 myKeys[MAC_NUM_KEYCODES]; + bool8 isok, fnbtn, altbtn, tcbtn; + static bool8 toggleff = false, lastTimeTT = false, lastTimeFn = false, ffUp = false, ffDown = false, ffUpSp = false, ffDownSp = false; + + if (rejectinput) + return; + + if (ISpKeyIsPressed(kISpEsc)) + { + if (!s9xthreadrunning) + running = false; + + return; + } + + if (ISpKeyIsPressed(kISpFreeze)) + { + MacStopSound(); + while (ISpKeyIsPressed(kISpFreeze)); + + isok = SNES9X_Freeze(); + ClearGFXScreen(); + return; + } + + if (ISpKeyIsPressed(kISpDefrost)) + { + MacStopSound(); + while (ISpKeyIsPressed(kISpDefrost)); + + isok = SNES9X_Defrost(); + ClearGFXScreen(); + return; + } + + if (ISpKeyIsPressed(kISpScreenshot)) + { + Settings.TakeScreenshot = true; + while (ISpKeyIsPressed(kISpScreenshot)); + } + + if (ISpKeyIsPressed(kISpSPC)) + { + S9xDumpSPCSnapshot(); + while (ISpKeyIsPressed(kISpSPC)); + } + + if (ISpKeyIsPressed(kISpFFUp)) + { + if (!ffUpSp) + { + ChangeTurboRate(+1); + ffUpSp = true; + } + } + else + ffUpSp = false; + + if (ISpKeyIsPressed(kISpFFDown)) + { + if (!ffDownSp) + { + ChangeTurboRate(-1); + ffDownSp = true; + } + } + else + ffDownSp = false; + + controlPad[0] = controlPad[1] = 0; + + JoypadScanDirection(0, &(controlPad[0])); + if (ISpKeyIsPressed(kISp1PR )) controlPad[0] |= 0x0010; + if (ISpKeyIsPressed(kISp1PL )) controlPad[0] |= 0x0020; + if (ISpKeyIsPressed(kISp1PX )) controlPad[0] |= 0x0040; + if (ISpKeyIsPressed(kISp1PA )) controlPad[0] |= 0x0080; + if (ISpKeyIsPressed(kISp1PStart )) controlPad[0] |= 0x1000; + if (ISpKeyIsPressed(kISp1PSelect)) controlPad[0] |= 0x2000; + if (ISpKeyIsPressed(kISp1PY )) controlPad[0] |= 0x4000; + if (ISpKeyIsPressed(kISp1PB )) controlPad[0] |= 0x8000; + + JoypadScanDirection(1, &(controlPad[1])); + if (ISpKeyIsPressed(kISp2PR )) controlPad[1] |= 0x0010; + if (ISpKeyIsPressed(kISp2PL )) controlPad[1] |= 0x0020; + if (ISpKeyIsPressed(kISp2PX )) controlPad[1] |= 0x0040; + if (ISpKeyIsPressed(kISp2PA )) controlPad[1] |= 0x0080; + if (ISpKeyIsPressed(kISp2PStart )) controlPad[1] |= 0x1000; + if (ISpKeyIsPressed(kISp2PSelect)) controlPad[1] |= 0x2000; + if (ISpKeyIsPressed(kISp2PY )) controlPad[1] |= 0x4000; + if (ISpKeyIsPressed(kISp2PB )) controlPad[1] |= 0x8000; + + if (((macControllerOption == SNES_MULTIPLAYER5) || (macControllerOption == SNES_MULTIPLAYER5_2)) && Settings.MultiPlayer5Master) + { + controlPad[2] = controlPad[3] = controlPad[4] = 0; + + JoypadScanDirection(2, &(controlPad[2])); + if (ISpKeyIsPressed(kISp3PR )) controlPad[2] |= 0x0010; + if (ISpKeyIsPressed(kISp3PL )) controlPad[2] |= 0x0020; + if (ISpKeyIsPressed(kISp3PX )) controlPad[2] |= 0x0040; + if (ISpKeyIsPressed(kISp3PA )) controlPad[2] |= 0x0080; + if (ISpKeyIsPressed(kISp3PStart )) controlPad[2] |= 0x1000; + if (ISpKeyIsPressed(kISp3PSelect)) controlPad[2] |= 0x2000; + if (ISpKeyIsPressed(kISp3PY )) controlPad[2] |= 0x4000; + if (ISpKeyIsPressed(kISp3PB )) controlPad[2] |= 0x8000; + + JoypadScanDirection(3, &(controlPad[3])); + if (ISpKeyIsPressed(kISp4PR )) controlPad[3] |= 0x0010; + if (ISpKeyIsPressed(kISp4PL )) controlPad[3] |= 0x0020; + if (ISpKeyIsPressed(kISp4PX )) controlPad[3] |= 0x0040; + if (ISpKeyIsPressed(kISp4PA )) controlPad[3] |= 0x0080; + if (ISpKeyIsPressed(kISp4PStart )) controlPad[3] |= 0x1000; + if (ISpKeyIsPressed(kISp4PSelect)) controlPad[3] |= 0x2000; + if (ISpKeyIsPressed(kISp4PY )) controlPad[3] |= 0x4000; + if (ISpKeyIsPressed(kISp4PB )) controlPad[3] |= 0x8000; + + JoypadScanDirection(4, &(controlPad[4])); + if (ISpKeyIsPressed(kISp5PR )) controlPad[4] |= 0x0010; + if (ISpKeyIsPressed(kISp5PL )) controlPad[4] |= 0x0020; + if (ISpKeyIsPressed(kISp5PX )) controlPad[4] |= 0x0040; + if (ISpKeyIsPressed(kISp5PA )) controlPad[4] |= 0x0080; + if (ISpKeyIsPressed(kISp5PStart )) controlPad[4] |= 0x1000; + if (ISpKeyIsPressed(kISp5PSelect)) controlPad[4] |= 0x2000; + if (ISpKeyIsPressed(kISp5PY )) controlPad[4] |= 0x4000; + if (ISpKeyIsPressed(kISp5PB )) controlPad[4] |= 0x8000; + + ControlPadFlagsToS9xReportButtons(2, controlPad[2]); + ControlPadFlagsToS9xReportButtons(3, controlPad[3]); + ControlPadFlagsToS9xReportButtons(4, controlPad[4]); + + if (macControllerOption == SNES_MULTIPLAYER5_2) + { + controlPad[5] = controlPad[6] = controlPad[7] = 0; + + JoypadScanDirection(5, &(controlPad[5])); + if (ISpKeyIsPressed(kISp6PR )) controlPad[5] |= 0x0010; + if (ISpKeyIsPressed(kISp6PL )) controlPad[5] |= 0x0020; + if (ISpKeyIsPressed(kISp6PX )) controlPad[5] |= 0x0040; + if (ISpKeyIsPressed(kISp6PA )) controlPad[5] |= 0x0080; + if (ISpKeyIsPressed(kISp6PStart )) controlPad[5] |= 0x1000; + if (ISpKeyIsPressed(kISp6PSelect)) controlPad[5] |= 0x2000; + if (ISpKeyIsPressed(kISp6PY )) controlPad[5] |= 0x4000; + if (ISpKeyIsPressed(kISp6PB )) controlPad[5] |= 0x8000; + + JoypadScanDirection(6, &(controlPad[6])); + if (ISpKeyIsPressed(kISp7PR )) controlPad[6] |= 0x0010; + if (ISpKeyIsPressed(kISp7PL )) controlPad[6] |= 0x0020; + if (ISpKeyIsPressed(kISp7PX )) controlPad[6] |= 0x0040; + if (ISpKeyIsPressed(kISp7PA )) controlPad[6] |= 0x0080; + if (ISpKeyIsPressed(kISp7PStart )) controlPad[6] |= 0x1000; + if (ISpKeyIsPressed(kISp7PSelect)) controlPad[6] |= 0x2000; + if (ISpKeyIsPressed(kISp7PY )) controlPad[6] |= 0x4000; + if (ISpKeyIsPressed(kISp7PB )) controlPad[6] |= 0x8000; + + JoypadScanDirection(7, &(controlPad[7])); + if (ISpKeyIsPressed(kISp8PR )) controlPad[7] |= 0x0010; + if (ISpKeyIsPressed(kISp8PL )) controlPad[7] |= 0x0020; + if (ISpKeyIsPressed(kISp8PX )) controlPad[7] |= 0x0040; + if (ISpKeyIsPressed(kISp8PA )) controlPad[7] |= 0x0080; + if (ISpKeyIsPressed(kISp8PStart )) controlPad[7] |= 0x1000; + if (ISpKeyIsPressed(kISp8PSelect)) controlPad[7] |= 0x2000; + if (ISpKeyIsPressed(kISp8PY )) controlPad[7] |= 0x4000; + if (ISpKeyIsPressed(kISp8PB )) controlPad[7] |= 0x8000; + + ControlPadFlagsToS9xReportButtons(5, controlPad[5]); + ControlPadFlagsToS9xReportButtons(6, controlPad[6]); + ControlPadFlagsToS9xReportButtons(7, controlPad[7]); + } + } + + CopyPressedKeys(myKeys); + + fnbtn = (KeyIsPressed(myKeys, keyCode[kKeyFunction]) || ISpKeyIsPressed(kISpFunction)); + altbtn = (KeyIsPressed(myKeys, keyCode[kKeyAlt] ) || ISpKeyIsPressed(kISpAlt) ); + + if (fnbtn) + { + if (!lastTimeFn) + { + for (unsigned int i = 0; i < kCommandListSize; i++) + btncmd[i].held = false; + } + + lastTimeFn = true; + lastTimeTT = false; + ffUp = ffDown = false; + + for (unsigned int i = 0; i < kCommandListSize; i++) + { + if (KeyIsPressed(myKeys, btncmd[i].keycode)) + { + if (!(btncmd[i].held)) + { + btncmd[i].held = true; + + if (strncmp(btncmd[i].command, "_mac", 4) == 0) + { + static char msg[64]; + + switch (btncmd[i].command[4] - '0') + { + case 1: + Settings.DisplayPressedKeys = !Settings.DisplayPressedKeys; + break; + + case 2: + if (S9xMovieActive()) + Settings.DisplayMovieFrame = !Settings.DisplayMovieFrame; + break; + + case 3: + if (macFrameAdvanceRate < 5000000) + macFrameAdvanceRate += 100000; + sprintf(msg, "Emulation Speed: 100/%d", macFrameAdvanceRate / 10000); + S9xSetInfoString(msg); + break; + + case 4: + if (macFrameAdvanceRate > 500000) + macFrameAdvanceRate -= 100000; + sprintf(msg, "Emulation Speed: 100/%d", macFrameAdvanceRate / 10000); + S9xSetInfoString(msg); + break; + + case 5: + pauseEmulation = !pauseEmulation; + break; + + case 6: + frameAdvance = true; + break; + } + } + else + { + s9xcommand_t s9xcmd; + + s9xcmd = S9xGetCommandT(btncmd[i].command); + S9xApplyCommand(s9xcmd, 1, 0); + } + } + } + else + btncmd[i].held = false; + } + } + else + { + lastTimeFn = false; + + if (KeyIsPressed(myKeys, keyCode[kKeyEsc])) + { + if (!s9xthreadrunning) + running = false; + + return; + } + + if (KeyIsPressed(myKeys, keyCode[kKeyFreeze])) + { + MacStopSound(); + while (KeyIsPressed(myKeys, keyCode[kKeyFreeze])) + CopyPressedKeys(myKeys); + + isok = SNES9X_Freeze(); + ClearGFXScreen(); + return; + } + + if (KeyIsPressed(myKeys, keyCode[kKeyDefrost])) + { + MacStopSound(); + while (KeyIsPressed(myKeys, keyCode[kKeyDefrost])) + CopyPressedKeys(myKeys); + + isok = SNES9X_Defrost(); + ClearGFXScreen(); + return; + } + + if (KeyIsPressed(myKeys, keyCode[kKeyScreenshot])) + { + Settings.TakeScreenshot = true; + while (KeyIsPressed(myKeys, keyCode[kKeyScreenshot])) + CopyPressedKeys(myKeys); + } + + if (KeyIsPressed(myKeys, keyCode[kKeySPC])) + { + S9xDumpSPCSnapshot(); + while (KeyIsPressed(myKeys, keyCode[kKeySPC])) + CopyPressedKeys(myKeys); + } + + if (KeyIsPressed(myKeys, keyCode[kKeyFFUp])) + { + if (!ffUp) + { + ChangeTurboRate(+1); + ffUp = true; + } + } + else + ffUp = false; + + if (KeyIsPressed(myKeys, keyCode[kKeyFFDown])) + { + if (!ffDown) + { + ChangeTurboRate(-1); + ffDown = true; + } + } + else + ffDown = false; + + if (KeyIsPressed(myKeys, keyCode[k1PR] )) controlPad[0] |= 0x0010; + if (KeyIsPressed(myKeys, keyCode[k1PL] )) controlPad[0] |= 0x0020; + if (KeyIsPressed(myKeys, keyCode[k1PX] )) controlPad[0] |= 0x0040; + if (KeyIsPressed(myKeys, keyCode[k1PA] )) controlPad[0] |= 0x0080; + if (KeyIsPressed(myKeys, keyCode[k1PRight] )) controlPad[0] |= 0x0100; + if (KeyIsPressed(myKeys, keyCode[k1PLeft] )) controlPad[0] |= 0x0200; + if (KeyIsPressed(myKeys, keyCode[k1PDown] )) controlPad[0] |= 0x0400; + if (KeyIsPressed(myKeys, keyCode[k1PUp] )) controlPad[0] |= 0x0800; + if (KeyIsPressed(myKeys, keyCode[k1PStart] )) controlPad[0] |= 0x1000; + if (KeyIsPressed(myKeys, keyCode[k1PSelect])) controlPad[0] |= 0x2000; + if (KeyIsPressed(myKeys, keyCode[k1PY] )) controlPad[0] |= 0x4000; + if (KeyIsPressed(myKeys, keyCode[k1PB] )) controlPad[0] |= 0x8000; + + if (KeyIsPressed(myKeys, keyCode[k2PR] )) controlPad[1] |= 0x0010; + if (KeyIsPressed(myKeys, keyCode[k2PL] )) controlPad[1] |= 0x0020; + if (KeyIsPressed(myKeys, keyCode[k2PX] )) controlPad[1] |= 0x0040; + if (KeyIsPressed(myKeys, keyCode[k2PA] )) controlPad[1] |= 0x0080; + if (KeyIsPressed(myKeys, keyCode[k2PRight] )) controlPad[1] |= 0x0100; + if (KeyIsPressed(myKeys, keyCode[k2PLeft] )) controlPad[1] |= 0x0200; + if (KeyIsPressed(myKeys, keyCode[k2PDown] )) controlPad[1] |= 0x0400; + if (KeyIsPressed(myKeys, keyCode[k2PUp] )) controlPad[1] |= 0x0800; + if (KeyIsPressed(myKeys, keyCode[k2PStart] )) controlPad[1] |= 0x1000; + if (KeyIsPressed(myKeys, keyCode[k2PSelect])) controlPad[1] |= 0x2000; + if (KeyIsPressed(myKeys, keyCode[k2PY] )) controlPad[1] |= 0x4000; + if (KeyIsPressed(myKeys, keyCode[k2PB] )) controlPad[1] |= 0x8000; + + if (altbtn) + { + if (!lastTimeTT) + changeAuto[0] = changeAuto[1] = 0; + + for (int i = 0; i < 2; i++) + { + for (int j = 0; j < 12; j++) + { + uint16 mask = 0x0010 << j; + + if (controlPad[i] & mask & autofireRec[i].toggleMask) + { + controlPad[i] &= ~mask; + + if (!(changeAuto[i] & mask)) + { + changeAuto[i] |= mask; + ChangeAutofireSettings(i, j); + } + } + else + changeAuto[i] &= ~mask; + } + } + + lastTimeTT = true; + } + else + lastTimeTT = false; + } + + if (enabletoggle) + { + if ((ISpKeyIsPressed(kISpFastForward) || KeyIsPressed(myKeys, keyCode[kKeyFastForward])) && !fnbtn) + { + if (!toggleff) + { + toggleff = true; + Settings.TurboMode = !Settings.TurboMode; + S9xSetInfoString(Settings.TurboMode ? "Turbo mode on" : "Turbo mode off"); + if (!Settings.TurboMode) + S9xClearSamples(); + } + } + else + toggleff = false; + } + else + { + bool8 old = Settings.TurboMode; + Settings.TurboMode = ((ISpKeyIsPressed(kISpFastForward) || KeyIsPressed(myKeys, keyCode[kKeyFastForward])) && !fnbtn) ? true : false; + if (!Settings.TurboMode && old) + S9xClearSamples(); + } + + for (int i = 0; i < 2; i++) + controlPad[i] ^= autofireRec[i].invertMask; + + if (autofire) + { + long long currentTime; + uint16 changeMask; + + currentTime = GetMicroseconds(); + tcbtn = (KeyIsPressed(myKeys, keyCode[kKeyTC]) || ISpKeyIsPressed(kISpTC)); + + for (int i = 0; i < 2; i++) + { + changeMask = (lastTimeTT ? (~changeAuto[i]) : 0xFFFF); + + for (int j = 0; j < 12; j++) + { + uint16 mask = (0x0010 << j) & changeMask; + + if (autofireRec[i].tcMask & mask) + { + if (!tcbtn) + continue; + } + + if (autofireRec[i].buttonMask & mask) + { + if (controlPad[i] & mask) + { + if (currentTime > autofireRec[i].nextTime[j]) + { + if (Settings.TurboMode) + autofireRec[i].nextTime[j] = currentTime + (long long) ((1.0 / (float) autofireRec[i].frequency) * 1000000.0 / macFastForwardRate); + else + autofireRec[i].nextTime[j] = currentTime + (long long) ((1.0 / (float) autofireRec[i].frequency) * 1000000.0); + } + else + controlPad[i] &= ~mask; + } + } + } + } + } + + ControlPadFlagsToS9xReportButtons(0, controlPad[0]); + ControlPadFlagsToS9xReportButtons(1, controlPad[1]); + + if (macControllerOption == SNES_JUSTIFIER_2) + ControlPadFlagsToS9xPseudoPointer(controlPad[1]); +} + +static void ChangeAutofireSettings (int player, int btn) +{ + static char msg[64]; + uint16 mask, m; + + mask = 0x0010 << btn; + autofireRec[player].buttonMask ^= mask; + autofire = (autofireRec[0].buttonMask || autofireRec[1].buttonMask); + + m = autofireRec[player].buttonMask; + if (m) + snprintf(msg, sizeof(msg), "Autofire %d:%s%s%s%s%s%s%s%s%s%s%s%s%s", player + 1, + (m & 0xC0F0 ? " " : ""), + (m & 0x0080 ? "A" : ""), + (m & 0x8000 ? "B" : ""), + (m & 0x0040 ? "X" : ""), + (m & 0x4000 ? "Y" : ""), + (m & 0x0020 ? "L" : ""), + (m & 0x0010 ? "R" : ""), + (m & 0x0800 ? " Up" : ""), + (m & 0x0400 ? " Dn" : ""), + (m & 0x0200 ? " Lf" : ""), + (m & 0x0100 ? " Rt" : ""), + (m & 0x1000 ? " St" : ""), + (m & 0x2000 ? " Se" : "")); + else + snprintf(msg, sizeof(msg), "Autofire %d: Off", player + 1); + + S9xSetInfoString(msg); +} + +static void ChangeTurboRate (int d) +{ + static char msg[64]; + + macFastForwardRate += d; + if (macFastForwardRate < 1) + macFastForwardRate = 1; + else + if (macFastForwardRate > 15) + macFastForwardRate = 15; + + snprintf(msg, sizeof(msg), "Turbo Rate: %d", macFastForwardRate); + S9xSetInfoString(msg); +} + void GetGameScreenPointer (int16 *x, int16 *y, bool fullmouse) { -// int ph; -// -// ph = !drawoverscan ? ((IPPU.RenderedScreenHeight > 256) ? IPPU.RenderedScreenHeight : (IPPU.RenderedScreenHeight << 1)) : (SNES_HEIGHT_EXTENDED << 1); -// -// if (fullscreen) -// { -// if (glstretch) -// { -// float fpw = (float) glScreenH / (float) ph * 512.0f; -// -// scopeViewInfo.width = (int) (fpw + ((float) glScreenW - fpw) * (float) macAspectRatio / 10000.0); -// scopeViewInfo.height = glScreenH; -// scopeViewInfo.globalLeft = (int) glScreenBounds.origin.x + ((glScreenW - scopeViewInfo.width) >> 1); -// scopeViewInfo.globalTop = (int) glScreenBounds.origin.y; -// } -// else -// { -// scopeViewInfo.width = 512; -// scopeViewInfo.height = ph; -// scopeViewInfo.globalLeft = (int) glScreenBounds.origin.x + ((glScreenW - 512) >> 1); -// scopeViewInfo.globalTop = (int) glScreenBounds.origin.y + ((glScreenH - ph ) >> 1); -// } -// } -// else -// { -// Rect rct; -// -// GetWindowBounds(gWindow, kWindowContentRgn, &rct); -// -// int ww = rct.right - rct.left, -// wh = rct.bottom - rct.top; -// -// scopeViewInfo.width = ww; -// scopeViewInfo.globalLeft = rct.left; -// -// if (windowExtend) -// { -// scopeViewInfo.height = ph * wh / kMacWindowHeight; -// scopeViewInfo.globalTop = rct.top + ((kMacWindowHeight - ph) >> 1) * wh / kMacWindowHeight; -// } -// else -// { -// scopeViewInfo.height = wh; -// scopeViewInfo.globalTop = rct.top; -// } -// } -// -// if (!fullmouse) -// { -// Point pos; -// -// GetGlobalMouse(&pos); -// -// *x = (int16) (((float) (pos.h - scopeViewInfo.globalLeft)) / ((float) scopeViewInfo.width ) * (float) IPPU.RenderedScreenWidth); -// *y = (int16) (((float) (pos.v - scopeViewInfo.globalTop )) / ((float) scopeViewInfo.height) * (float) (!drawoverscan ? IPPU.RenderedScreenHeight : SNES_HEIGHT_EXTENDED)); -// } -// else -// { -// *x = (int16) (unlimitedCursor.x / (float) scopeViewInfo.width * (float) IPPU.RenderedScreenWidth); -// *y = (int16) (unlimitedCursor.y / (float) scopeViewInfo.height * (float) (!drawoverscan ? IPPU.RenderedScreenHeight : SNES_HEIGHT_EXTENDED)); -// } + int ph; + + ph = !drawoverscan ? ((IPPU.RenderedScreenHeight > 256) ? IPPU.RenderedScreenHeight : (IPPU.RenderedScreenHeight << 1)) : (SNES_HEIGHT_EXTENDED << 1); + + if (fullscreen) + { + if (glstretch) + { + float fpw = (float) glScreenH / (float) ph * 512.0f; + + scopeViewInfo.width = (int) (fpw + ((float) glScreenW - fpw) * (float) macAspectRatio / 10000.0); + scopeViewInfo.height = glScreenH; + scopeViewInfo.globalLeft = (int) glScreenBounds.origin.x + ((glScreenW - scopeViewInfo.width) >> 1); + scopeViewInfo.globalTop = (int) glScreenBounds.origin.y; + } + else + { + scopeViewInfo.width = 512; + scopeViewInfo.height = ph; + scopeViewInfo.globalLeft = (int) glScreenBounds.origin.x + ((glScreenW - 512) >> 1); + scopeViewInfo.globalTop = (int) glScreenBounds.origin.y + ((glScreenH - ph ) >> 1); + } + } + else + { + CGRect frame = s9xView.frame; + frame = [s9xView convertRect:frame toView:nil]; + frame = [s9xView.window convertRectToScreen:frame]; + + scopeViewInfo.width = frame.size.width; + scopeViewInfo.globalLeft = frame.origin.x; + + if (windowExtend) + { + scopeViewInfo.height = ph * frame.size.height / kMacWindowHeight; + scopeViewInfo.globalTop = frame.origin.y + ((kMacWindowHeight - ph) >> 1) * frame.size.height / kMacWindowHeight; + } + else + { + scopeViewInfo.height = frame.size.height; + scopeViewInfo.globalTop = frame.origin.y; + } + } + + if (!fullmouse) + { + CGPoint point = [NSEvent mouseLocation]; + + *x = (int16) (((float) (point.x - scopeViewInfo.globalLeft)) / ((float) scopeViewInfo.width ) * (float) IPPU.RenderedScreenWidth); + *y = (int16) (((float) (point.y - scopeViewInfo.globalTop )) / ((float) scopeViewInfo.height) * (float) (!drawoverscan ? IPPU.RenderedScreenHeight : SNES_HEIGHT_EXTENDED)); + } + else + { + *x = (int16) (unlimitedCursor.x / (float) scopeViewInfo.width * (float) IPPU.RenderedScreenWidth); + *y = (int16) (unlimitedCursor.y / (float) scopeViewInfo.height * (float) (!drawoverscan ? IPPU.RenderedScreenHeight : SNES_HEIGHT_EXTENDED)); + } } static void Initialize (void) @@ -3037,11 +2902,7 @@ static void Initialize (void) InitMacSound(); SetUpHID(); - RegisterHelpBook(); - InitRecentItems(); - InitRecentMenu(); - //BuildRecentMenu(); InitMultiCart(); @@ -3078,7 +2939,6 @@ static void Deinitialize (void) deviceSetting = deviceSettingMaster; DeinitMultiCart(); - DeinitRecentMenu(); DeinitRecentItems(); SavePrefs(); ReleaseHID(); @@ -3094,7 +2954,7 @@ static void Deinitialize (void) Memory.Deinit(); } -uint64 GetMicroseconds() +uint64 GetMicroseconds(void) { uint64 ms = mach_absolute_time(); ms *= machTimeNumerator; @@ -3271,3 +3131,136 @@ void QuitWithFatalError ( NSString *message) [alert runModal]; [NSApp terminate:nil]; } + +@interface S9xView : NSOpenGLView +@end + +@implementation S9xView + ++ (void)initialize +{ + keyLock = OS_UNFAIR_LOCK_INIT; +} + +- (void)keyDown:(NSEvent *)event +{ + os_unfair_lock_lock(&keyLock); + pressedKeys[event.keyCode] = true; + os_unfair_lock_unlock(&keyLock); +} + +- (void)keyUp:(NSEvent *)event +{ + os_unfair_lock_lock(&keyLock); + pressedKeys[event.keyCode] = false; + os_unfair_lock_unlock(&keyLock); +} + +- (BOOL)acceptsFirstResponder +{ + return YES; +} + +- (BOOL)canBecomeKeyView +{ + return YES; +} + +@end + +@implementation S9xEngine + +- (instancetype)init +{ + if (self = [super init]) + { + Initialize(); + + CGRect frame = NSMakeRect(0, 0, SNES_WIDTH * 2.0, kMacWindowHeight); + s9xView = [[S9xView alloc] initWithFrame:frame pixelFormat:nil]; + s9xView.wantsLayer = YES; + s9xView.layer.backgroundColor = NSColor.blackColor.CGColor; + NSWindow *window = [[NSWindow alloc] initWithContentRect:frame styleMask:NSWindowStyleMaskTitled|NSWindowStyleMaskClosable|NSWindowStyleMaskMiniaturizable backing:NSBackingStoreBuffered defer:NO]; + window.contentView = s9xView; + window.title = @"Snes9x"; + + [window center]; + [window makeKeyAndOrderFront:self]; + } + + return self; +} + +- (void)dealloc +{ + Deinitialize(); +} + +- (void) start +{ + NSLog(@"Starting"); + if (!finished) + { +#ifdef DEBUGGER + CPU.Flags |= DEBUG_MODE_FLAG; + S9xDoDebug(); +#endif + + lastFrame = GetMicroseconds(); + frameCount = 0; + if (macFrameSkip < 0) + skipFrames = 3; + else + skipFrames = macFrameSkip; + + S9xInitDisplay(NULL, NULL); + ClearGFXScreen(); + + [NSThread detachNewThreadWithBlock:^ + { + MacSnes9xThread(NULL); + + dispatch_sync(dispatch_get_main_queue(), ^ + { + if (!Settings.NetPlay || Settings.NetPlayServer) + { + SNES9X_SaveSRAM(); + S9xResetSaveTimer(false); + S9xSaveCheatFile(S9xGetFilename(".cht", CHEAT_DIR)); + } + + S9xDeinitDisplay(); + + if (Settings.NetPlay) + { + if (!Settings.NetPlayServer) + { + // DeinitGameWindow(); + cartOpen = false; + } + + Settings.NetPlay = false; + Settings.NetPlayServer = false; + } + + if (!finished) + { + [self start]; + } + }); + }]; + } +} + +- (void)loadROM:(NSURL *)fileURL +{ + if ( SNES9X_OpenCart(fileURL) ) + { + SNES9X_Go(); + s9xView.window.title = fileURL.lastPathComponent.stringByDeletingPathExtension; + [s9xView.window makeKeyAndOrderFront:nil]; + [self start]; + } +} + +@end diff --git a/macosx/mac-prefix.h b/macosx/mac-prefix.h index 7b29300a..f2f395e4 100755 --- a/macosx/mac-prefix.h +++ b/macosx/mac-prefix.h @@ -15,6 +15,7 @@ (c) Copyright 2004 Alexander and Sander (c) Copyright 2004 - 2005 Steven Seeger (c) Copyright 2005 Ryan Vogt + (c) Copyright 2019 Michael Donald Buckley ***********************************************************************************/ diff --git a/macosx/mac-prefs.h b/macosx/mac-prefs.h index 25f3f15e..0a6cd2fd 100755 --- a/macosx/mac-prefs.h +++ b/macosx/mac-prefs.h @@ -15,6 +15,7 @@ (c) Copyright 2004 Alexander and Sander (c) Copyright 2004 - 2005 Steven Seeger (c) Copyright 2005 Ryan Vogt + (c) Copyright 2019 Michael Donald Buckley ***********************************************************************************/ diff --git a/macosx/mac-prefs.mm b/macosx/mac-prefs.mm index 3737a2fd..be079da4 100755 --- a/macosx/mac-prefs.mm +++ b/macosx/mac-prefs.mm @@ -15,6 +15,7 @@ (c) Copyright 2004 Alexander and Sander (c) Copyright 2004 - 2005 Steven Seeger (c) Copyright 2005 Ryan Vogt + (c) Copyright 2019 Michael Donald Buckley ***********************************************************************************/ diff --git a/macosx/mac-render.h b/macosx/mac-render.h index ea8af417..d92c802d 100644 --- a/macosx/mac-render.h +++ b/macosx/mac-render.h @@ -15,6 +15,7 @@ (c) Copyright 2004 Alexander and Sander (c) Copyright 2004 - 2005 Steven Seeger (c) Copyright 2005 Ryan Vogt + (c) Copyright 2019 Michael Donald Buckley ***********************************************************************************/ diff --git a/macosx/mac-render.mm b/macosx/mac-render.mm index 967b21d6..5eb71041 100644 --- a/macosx/mac-render.mm +++ b/macosx/mac-render.mm @@ -15,8 +15,10 @@ (c) Copyright 2004 Alexander and Sander (c) Copyright 2004 - 2005 Steven Seeger (c) Copyright 2005 Ryan Vogt + (c) Copyright 2019 Michael Donald Buckley ***********************************************************************************/ +#import #include "snes9x.h" #include "memmap.h" @@ -47,10 +49,8 @@ static void S9xInitFullScreen (void); static void S9xDeinitFullScreen (void); static void S9xInitWindowMode (void); static void S9xDeinitWindowMode (void); -static void S9xInitOpenGLFullScreen (void); -static void S9xDeinitOpenGLFullScreen (void); -static void S9xInitOpenGLWindowMode (void); -static void S9xDeinitOpenGLWindowMode (void); +static void S9xInitOpenGL (void); +static void S9xDeinitOpenGL(void); static void S9xInitBlitGL (void); static void S9xDeinitBlitGL (void); static void S9xInitOpenGLContext (void); @@ -64,9 +64,6 @@ static void GLMakeScreenMesh (GLfloat *, int, int); static void GLMakeTextureMesh (GLfloat *, int, int, float, float); static void GLPrepareTexture (bool8, int, int, int, int, int, int); static inline void RenderBlitScreen (Blitter, int, int, int, int, int, uint16 *); -#ifndef MAC_LEOPARD_TIGER_PANTHER_SUPPORT -static void SetBestDisplayMode (int, int); -#endif enum { @@ -144,8 +141,6 @@ static uint16 *gfxScreen[2], *snesScreenB; static uint8 *blitGLBuffer; -static CGDirectDisplayID gGameDisplayID; - static MPTaskID taskID = NULL; static MPQueueID notificationQueue = NULL, taskQueue = NULL; @@ -153,17 +148,7 @@ static MPSemaphoreID readySemaphore = NULL; static MPData *mpBlit = NULL; static OpenGLData OpenGL; -static CGLContextObj glContext; -static AGLContext agContext; -static CGLPixelFormatObj cglpix; -static AGLPixelFormat aglpix; -static GLint glSwapInterval = 0; -static GLint agSwapInterval = 0; -#ifdef MAC_LEOPARD_TIGER_PANTHER_SUPPORT -static CFDictionaryRef oldDisplayMode; -#else -static CGDisplayModeRef oldDisplayModeRef; -#endif + static CGImageRef cgGameImage = NULL, cgBlitImage = NULL; @@ -338,252 +323,54 @@ void ClearGFXScreen (void) imageWidth[1] = imageHeight[1] = 0; prevBlitWidth = prevBlitHeight = 0; - if (fullscreen) - { - CGLSetCurrentContext(glContext); - glViewport(0, 0, glScreenW, glScreenH); - } - else - { - aglSetCurrentContext(agContext); - aglUpdateContext(agContext); - glViewport(0, 0, (GLsizei) gWindowRect.size.width, (GLsizei) gWindowRect.size.height); - } + CGLSetCurrentContext(s9xView.openGLContext.CGLContextObj); + glViewport(0, 0, glScreenW, glScreenH); glClearColor(0.0f, 0.0f, 0.0f, 0.0f); for (int i = 0; i < 2; i++) { glClear(GL_COLOR_BUFFER_BIT); - - if (fullscreen) - CGLFlushDrawable(glContext); - else - aglSwapBuffers(agContext); + glSwapAPPLE(); + //CGLFlushDrawable(s9xView.openGLContext.CGLContextObj); } } -#ifndef MAC_LEOPARD_TIGER_PANTHER_SUPPORT -static void SetBestDisplayMode (int width, int height) -{ - if (autoRes || !gl32bit) - { - CGError err; - CGDisplayModeRef mode; - CFArrayRef array; - CFStringRef pixenc, pix; - CFIndex n, i; - size_t w, h; - bool r; - - pixenc = gl32bit ? CFSTR(IO32BitDirectPixels) : CFSTR(IO16BitDirectPixels); - - array = CGDisplayCopyAllDisplayModes(gGameDisplayID, NULL); - n = CFArrayGetCount(array); - - for (i = 0; i < n; i++) - { - mode = (CGDisplayModeRef) CFArrayGetValueAtIndex(array, i); - - w = CGDisplayModeGetWidth(mode); - h = CGDisplayModeGetHeight(mode); - pix = CGDisplayModeCopyPixelEncoding(mode); - r = CFStringCompare(pix, pixenc, 0) == kCFCompareEqualTo; - CFRelease(pix); - - if (w == (size_t) width && h == (size_t) height && r) - break; - } - - if (i < n) - err = CGDisplaySetDisplayMode(gGameDisplayID, mode, NULL); - - CFRelease(array); - } -} -#endif - static void S9xInitFullScreen (void) { - size_t width, height; - - width = autoRes ? 640 : CGDisplayPixelsWide(gGameDisplayID); - height = autoRes ? 480 : CGDisplayPixelsHigh(gGameDisplayID); - -#ifdef MAC_LEOPARD_TIGER_PANTHER_SUPPORT - CFDictionaryRef mode; - boolean_t exactMatch; - size_t depth = gl32bit ? 32 : 16; - - oldDisplayMode = CGDisplayCurrentMode(gGameDisplayID); - mode = CGDisplayBestModeForParameters(gGameDisplayID, depth, width, height, &exactMatch); - CGDisplayCapture(gGameDisplayID); - CGDisplaySwitchToMode(gGameDisplayID, mode); -#else - oldDisplayModeRef = CGDisplayCopyDisplayMode(gGameDisplayID); - CGDisplayCapture(gGameDisplayID); - SetBestDisplayMode(width, height); -#endif - - CGDisplayErr cgErr; - CGDisplayCount numDisplays, maxDisplays = 32; - CGDirectDisplayID activeDisplays[32]; - - cgErr = CGGetActiveDisplayList(maxDisplays, activeDisplays, &numDisplays); - if (cgErr == noErr) - { - if ((macControllerOption == SNES_MOUSE) || (macControllerOption == SNES_MOUSE_SWAPPED) || (numDisplays == 1)) - CGDisplayHideCursor(gGameDisplayID); - - if ((macControllerOption == SNES_MOUSE) || (macControllerOption == SNES_MOUSE_SWAPPED)) - { - CGDisplayMoveCursorToPoint(gGameDisplayID, CGPointMake((float) (width >> 1), (float) (height >> 1))); - CGAssociateMouseAndMouseCursorPosition(false); - } - } + [NSCursor hide]; + CGAssociateMouseAndMouseCursorPosition(false); } static void S9xDeinitFullScreen (void) { CGAssociateMouseAndMouseCursorPosition(true); - CGDisplayShowCursor(gGameDisplayID); - -#ifdef MAC_LEOPARD_TIGER_PANTHER_SUPPORT - CGDisplaySwitchToMode(gGameDisplayID, oldDisplayMode); -#else - CGError err; - - err = CGDisplaySetDisplayMode(gGameDisplayID, oldDisplayModeRef, NULL); - CGDisplayModeRelease(oldDisplayModeRef); -#endif - - CGDisplayRelease(gGameDisplayID); + [NSCursor unhide]; } static void S9xInitWindowMode (void) { - Rect rct; - size_t width, height; - - width = CGDisplayPixelsWide(gGameDisplayID); - height = CGDisplayPixelsHigh(gGameDisplayID); - -#ifdef MAC_LEOPARD_TIGER_PANTHER_SUPPORT - CFDictionaryRef mode; - boolean_t exactMatch; - size_t depth = gl32bit ? 32 : 16; - - oldDisplayMode = CGDisplayCurrentMode(gGameDisplayID); - mode = CGDisplayBestModeForParameters(gGameDisplayID, depth, width, height, &exactMatch); - if (exactMatch) - CGDisplaySwitchToMode(gGameDisplayID, mode); -#else - oldDisplayModeRef = CGDisplayCopyDisplayMode(gGameDisplayID); - SetBestDisplayMode(width, height); -#endif - -// InitGameWindow(); -// ShowWindow(gWindow); -// -// GetWindowBounds(gWindow, kWindowContentRgn, &rct); -// gWindowRect = CGRectMake((float) rct.left, (float) rct.top, (float) (rct.right - rct.left), (float) (rct.bottom - rct.top)); - - // UpdateGameWindow(); } static void S9xDeinitWindowMode (void) { -#ifdef MAC_LEOPARD_TIGER_PANTHER_SUPPORT - CGDisplaySwitchToMode(gGameDisplayID, oldDisplayMode); -#else - CGError err; - - err = CGDisplaySetDisplayMode(gGameDisplayID, oldDisplayModeRef, NULL); - CGDisplayModeRelease(oldDisplayModeRef); -#endif - - // UpdateGameWindow(); } -static void S9xInitOpenGLFullScreen (void) +static void S9xInitOpenGL (void) { - CGOpenGLDisplayMask displayMask; - GLint numPixelFormats; + GLint glSwapInterval = vsync ? 1 : 0; + if (extraOptions.benchmark) + glSwapInterval = 0; + CGLSetParameter(s9xView.openGLContext.CGLContextObj, kCGLCPSwapInterval, &glSwapInterval); + CGLSetCurrentContext(s9xView.openGLContext.CGLContextObj); - displayMask = CGDisplayIDToOpenGLDisplayMask(gGameDisplayID); - CGLPixelFormatAttribute attribs[] = { (CGLPixelFormatAttribute) kCGLPFAFullScreen, - (CGLPixelFormatAttribute) kCGLPFADoubleBuffer, - (CGLPixelFormatAttribute) kCGLPFAAccelerated, - (CGLPixelFormatAttribute) kCGLPFANoRecovery, - (CGLPixelFormatAttribute) kCGLPFAColorSize, - (CGLPixelFormatAttribute) (gl32bit ? 32 : 16), - (CGLPixelFormatAttribute) kCGLPFADisplayMask, - (CGLPixelFormatAttribute) displayMask, - (CGLPixelFormatAttribute) 0 }; - - CGLChoosePixelFormat(attribs, &cglpix, &numPixelFormats); - CGLCreateContext(cglpix, NULL, &glContext); - glSwapInterval = vsync ? 1 : 0; - if (extraOptions.benchmark) - glSwapInterval = 0; - CGLSetParameter(glContext, kCGLCPSwapInterval, &glSwapInterval); - CGLSetCurrentContext(glContext); - -#ifdef MAC_LEOPARD_TIGER_PANTHER_SUPPORT - CGLSetFullScreen(glContext); -#else - CGLSetFullScreenOnDisplay(glContext, CGDisplayIDToOpenGLDisplayMask(gGameDisplayID)); -#endif - - glScreenW = CGDisplayPixelsWide(gGameDisplayID); - glScreenH = CGDisplayPixelsHigh(gGameDisplayID); + glScreenW = glScreenBounds.size.width; + glScreenH = glScreenBounds.size.height; } -static void S9xDeinitOpenGLFullScreen (void) +static void S9xDeinitOpenGL (void) { - if (glContext) - { - CGLSetCurrentContext(NULL); - CGLClearDrawable(glContext); - CGLDestroyContext(glContext); - CGLDestroyPixelFormat(cglpix); - } -} - -static void S9xInitOpenGLWindowMode (void) -{ - GLint attribs[] = { AGL_RGBA, - AGL_DOUBLEBUFFER, - AGL_ACCELERATED, - AGL_NO_RECOVERY, - AGL_PIXEL_SIZE, gl32bit ? 32 : 16, - AGL_NONE }; - - aglpix = aglChoosePixelFormat(NULL, 0, attribs); - agContext = aglCreateContext(aglpix, NULL); - - aglSetWindowRef(agContext, gWindow); - - agSwapInterval = vsync ? 1 : 0; - if (extraOptions.benchmark) - agSwapInterval = 0; - aglSetInteger(agContext, AGL_SWAP_INTERVAL, &agSwapInterval); - aglSetCurrentContext(agContext); - - aglGetCGLPixelFormat(aglpix, (void **) &cglpix); - aglGetCGLContext(agContext, (void **) &glContext); -} - -static void S9xDeinitOpenGLWindowMode (void) -{ - if (agContext) - { - aglSetWindowRef(agContext, NULL); - - aglSetCurrentContext(NULL); - aglDestroyContext(agContext); - aglDestroyPixelFormat(aglpix); - } + CGLSetCurrentContext(NULL); } static void S9xInitBlitGL (void) @@ -601,9 +388,6 @@ static void S9xDeinitBlitGL (void) { if (multiprocessor) { - MPNotifyQueue(taskQueue, (void *) kMPBlitDone, 0, 0); - MPWaitOnQueue(notificationQueue, NULL, NULL, NULL, kDurationForever); - MPDeleteQueue(notificationQueue); notificationQueue = NULL; printf("MP: Successfully received terminate signal from BlitGL thread.\n"); @@ -700,8 +484,8 @@ static void GLMakeTextureMesh (GLfloat *vertex2D, int meshx, int meshy, float lx static void S9xInitOpenGLContext (void) { OpenGL.internal_format = GL_RGB5_A1; - OpenGL.format = GL_BGRA; - OpenGL.type = GL_UNSIGNED_SHORT_1_5_5_5_REV; + OpenGL.format = GL_BGRA; + OpenGL.type = GL_UNSIGNED_SHORT_1_5_5_5_REV; OpenGL.rangeExt = gluCheckExtension((const GLubyte *) "GL_APPLE_texture_range", glGetString(GL_EXTENSIONS)); OpenGL.target = OpenGL.rangeExt ? GL_TEXTURE_RECTANGLE_EXT : GL_TEXTURE_2D; @@ -805,28 +589,15 @@ static void S9xInitOpenGLContext (void) GLMakeScreenMesh(scScnArray, kSCMeshX, kSCMeshY); } - if (fullscreen) - { - CGLSetCurrentContext(glContext); - glViewport(0, 0, glScreenW, glScreenH); - } - else - { - aglSetCurrentContext(agContext); - aglUpdateContext(agContext); - glViewport(0, 0, (GLsizei) gWindowRect.size.width, (GLsizei) gWindowRect.size.height); - } + CGLSetCurrentContext(s9xView.openGLContext.CGLContextObj); + glViewport(0, 0, glScreenW, glScreenH); glClearColor(0.0f, 0.0f, 0.0f, 0.0f); for (int i = 0; i < 2; i++) { - glClear(GL_COLOR_BUFFER_BIT); - - if (fullscreen) - CGLFlushDrawable(glContext); - else - aglSwapBuffers(agContext); + glClear(GL_COLOR_BUFFER_BIT); + //CGLFlushDrawable(s9xView.openGLContext.CGLContextObj); } } @@ -871,7 +642,7 @@ static void S9xInitCoreImage (void) cgGameImage = NULL; cgBlitImage = NULL; - InitCoreImageContext(glContext, cglpix); + InitCoreImageContext(s9xView.openGLContext.CGLContextObj, s9xView.pixelFormat.CGLPixelFormatObj); } static void S9xDeinitCoreImage (void) @@ -893,29 +664,10 @@ static void S9xDeinitCoreImage (void) void GetGameDisplay (int *w, int *h) { - CGDisplayErr cgErr; - CGDisplayCount numDisplays, maxDisplays = 32; - CGDirectDisplayID activeDisplays[32]; - CGPoint windowAt; - - gGameDisplayID = CGMainDisplayID(); - - windowAt = CGPointMake((float) windowPos[kWindowScreen].h, (float) windowPos[kWindowScreen].v); - - cgErr = CGGetDisplaysWithPoint(windowAt, maxDisplays, activeDisplays, &numDisplays); - if ((cgErr == noErr) && (numDisplays > 0)) - { - for (unsigned int i = 0; i < numDisplays; i++) - { - if (activeDisplays[i] != CGMainDisplayID()) - gGameDisplayID = activeDisplays[i]; - } - } - if (w != NULL && h != NULL) { - *w = CGDisplayPixelsWide(gGameDisplayID); - *h = CGDisplayPixelsHigh(gGameDisplayID); + *w = s9xView.frame.size.width; + *h = s9xView.frame.size.height; } } @@ -924,9 +676,7 @@ void S9xInitDisplay (int argc, char **argv) if (directDisplay) return; - GetGameDisplay(NULL, NULL); - - glScreenBounds = CGDisplayBounds(gGameDisplayID); + glScreenBounds = s9xView.frame; unlimitedCursor = CGPointMake(0.0f, 0.0f); @@ -969,14 +719,14 @@ void S9xInitDisplay (int argc, char **argv) if (fullscreen) { S9xInitFullScreen(); - S9xInitOpenGLFullScreen(); } else { S9xInitWindowMode(); - S9xInitOpenGLWindowMode(); } + S9xInitOpenGL(); + S9xInitOpenGLContext(); if (ciFilterEnable) S9xInitCoreImage(); @@ -984,7 +734,7 @@ void S9xInitDisplay (int argc, char **argv) S9xInitBlitGL(); S9xSetSoundMute(false); - Microseconds((UnsignedWide *) &lastFrame); + lastFrame = GetMicroseconds(); windowResizeCount = 1; @@ -1008,15 +758,15 @@ void S9xDeinitDisplay (void) if (fullscreen) { - S9xDeinitOpenGLFullScreen(); S9xDeinitFullScreen(); } else { - S9xDeinitOpenGLWindowMode(); S9xDeinitWindowMode(); } + S9xDeinitOpenGL(); + directDisplay = false; } @@ -1239,39 +989,29 @@ static void S9xPutImageOpenGL (int width, int height) int vh = (height > 256) ? height : (height << 1); - if (fullscreen) - { - CGLSetCurrentContext(glContext); + CGLSetCurrentContext(s9xView.openGLContext.CGLContextObj); - glViewport(0, 0, glScreenW, glScreenH); - glClearColor(0.0f, 0.0f, 0.0f, 0.0f); - glClear(GL_COLOR_BUFFER_BIT); + glViewport(0, 0, glScreenW, glScreenH); + glClearColor(0.0f, 0.0f, 0.0f, 0.0f); + glClear(GL_COLOR_BUFFER_BIT); - if (glstretch) - { - float fpw = (float) glScreenH / vh * 512.0f; - int pw = (int) (fpw + ((float) glScreenW - fpw) * (float) macAspectRatio / 10000.0); + if ( fullscreen ) + { + if (glstretch) + { + float fpw = (float) glScreenH / vh * 512.0f; + int pw = (int) (fpw + ((float) glScreenW - fpw) * (float) macAspectRatio / 10000.0); - glViewport((glScreenW - pw) >> 1, 0, pw, glScreenH); - } - else - glViewport((glScreenW - 512) >> 1, (glScreenH - vh) >> 1, 512, vh); - } - else - { - int ww = (int) gWindowRect.size.width, - wh = (int) gWindowRect.size.height; - - aglSetCurrentContext(agContext); - aglUpdateContext(agContext); - - glViewport(0, 0, ww, wh); - glClearColor(0.0f, 0.0f, 0.0f, 0.0f); - glClear(GL_COLOR_BUFFER_BIT); - - if (windowExtend) - glViewport(0, ((kMacWindowHeight - vh) >> 1) * wh / kMacWindowHeight, ww, vh * wh / kMacWindowHeight); - } + glViewport((glScreenW - pw) >> 1, 0, pw, glScreenH); + } + else + glViewport((glScreenW - 512) >> 1, (glScreenH - vh) >> 1, 512, vh); + } + else + { + if (windowExtend) + glViewport(0, ((kMacWindowHeight - vh) >> 1) * glScreenH / kMacWindowHeight, glScreenW, vh * glScreenH / kMacWindowHeight); + } glPixelStorei(GL_UNPACK_ROW_LENGTH, width); @@ -1350,10 +1090,8 @@ static void S9xPutImageOpenGL (int width, int height) DrawWithCoreImageFilter(src, cgGameImage); } - if (fullscreen) - CGLFlushDrawable(glContext); - else - aglSwapBuffers(agContext); + //CGLFlushDrawable(s9xView.openGLContext.CGLContextObj); + glSwapAPPLE(); } static void S9xPutImageBlitGL (int width, int height) @@ -1532,58 +1270,37 @@ static void S9xPutImageBlitGL2 (int blit_width, int blit_height) if (windowResizeCount > 0) { - if (fullscreen) - { - CGLSetCurrentContext(glContext); + CGLSetCurrentContext(s9xView.openGLContext.CGLContextObj); - glViewport(0, 0, glScreenW, glScreenH); - glClearColor(0.0f, 0.0f, 0.0f, 0.0f); - glClear(GL_COLOR_BUFFER_BIT); + glViewport(0, 0, glScreenW, glScreenH); + glClearColor(0.0f, 0.0f, 0.0f, 0.0f); + glClear(GL_COLOR_BUFFER_BIT); - if (glstretch) - { - int sh = (blit_width < blit_height) ? (blit_height >> 1) : ((blit_width > blit_height * 2) ? (blit_height << 1) : blit_height); - float fpw = (float) glScreenH / (float) sh * (float) blit_width; - int pw = (int) (fpw + ((float) glScreenW - fpw) * (float) macAspectRatio / 10000.0); + if (glstretch) + { + int sh = (blit_width < blit_height) ? (blit_height >> 1) : ((blit_width > blit_height * 2) ? (blit_height << 1) : blit_height); + float fpw = (float) glScreenH / (float) sh * (float) blit_width; + int pw = (int) (fpw + ((float) glScreenW - fpw) * (float) macAspectRatio / 10000.0); - glViewport((glScreenW - pw) >> 1, 0, pw, glScreenH); - } - else - { - int sw, sh; + glViewport((glScreenW - pw) >> 1, 0, pw, glScreenH); + } + else + { + int sw, sh; - if (nx < 0) - { - sw = ntsc_width; - sh = ((blit_height % SNES_HEIGHT) ? SNES_HEIGHT_EXTENDED : SNES_HEIGHT) * 2; - } - else - { - sw = SNES_WIDTH * nx; - sh = ((blit_height % SNES_HEIGHT) ? SNES_HEIGHT_EXTENDED : SNES_HEIGHT) * nx; - } + if (nx < 0) + { + sw = ntsc_width; + sh = ((blit_height % SNES_HEIGHT) ? SNES_HEIGHT_EXTENDED : SNES_HEIGHT) * 2; + } + else + { + sw = SNES_WIDTH * nx; + sh = ((blit_height % SNES_HEIGHT) ? SNES_HEIGHT_EXTENDED : SNES_HEIGHT) * nx; + } - glViewport((glScreenW - sw) >> 1, (glScreenH - sh) >> 1, sw, sh); - } - } - else - { - int ww = (int) gWindowRect.size.width, - wh = (int) gWindowRect.size.height; - - aglSetCurrentContext(agContext); - aglUpdateContext(agContext); - - glViewport(0, 0, ww, wh); - glClearColor(0.0f, 0.0f, 0.0f, 0.0f); - glClear(GL_COLOR_BUFFER_BIT); - - if (windowExtend) - { - int bh = (blit_height % SNES_HEIGHT) ? (SNES_HEIGHT_EXTENDED << 1) : (SNES_HEIGHT << 1); - glViewport(0, ((kMacWindowHeight - bh) >> 1) * wh / kMacWindowHeight, ww, bh * wh / kMacWindowHeight); - } - } + glViewport((glScreenW - sw) >> 1, (glScreenH - sh) >> 1, sw, sh); + } if (!ciFilterEnable) { @@ -1717,10 +1434,8 @@ static void S9xPutImageBlitGL2 (int blit_width, int blit_height) DrawWithCoreImageFilter(src, cgBlitImage); } - if (fullscreen) - CGLFlushDrawable(glContext); - else - aglSwapBuffers(agContext); + //CGLFlushDrawable(s9xView.openGLContext.CGLContextObj); + glSwapAPPLE(); } void S9xTextMode (void) diff --git a/macosx/mac-snes9x.h b/macosx/mac-snes9x.h index 484232d5..cfa8bf76 100755 --- a/macosx/mac-snes9x.h +++ b/macosx/mac-snes9x.h @@ -15,6 +15,7 @@ (c) Copyright 2004 Alexander and Sander (c) Copyright 2004 - 2005 Steven Seeger (c) Copyright 2005 Ryan Vogt + (c) Copyright 2019 Michael Donald Buckley ***********************************************************************************/ diff --git a/macosx/mac-snes9x.mm b/macosx/mac-snes9x.mm index 248af35c..d4bac756 100755 --- a/macosx/mac-snes9x.mm +++ b/macosx/mac-snes9x.mm @@ -53,7 +53,7 @@ void SNES9X_Go (void) bool8 SNES9X_OpenCart (NSURL *inRef) { NSURL *cartRef; - const char *filename = inRef.lastPathComponent.UTF8String; + const char *filename = inRef.path.UTF8String; if (cartOpen) { @@ -304,7 +304,7 @@ bool8 SNES9X_FreezeTo (void) NSURL *url = NavFreezeTo(); if (url != nil) { - const char *filename = url.lastPathComponent.UTF8String; + const char *filename = url.path.UTF8String; unlink(filename); S9xFreezeGame(filename); @@ -320,14 +320,12 @@ bool8 SNES9X_FreezeTo (void) bool8 SNES9X_DefrostFrom (void) { - char filename[PATH_MAX + 1]; - if (cartOpen) { NSURL *url = NavDefrostFrom(); if (url != nil) { - const char *filename = url.lastPathComponent.UTF8String; + const char *filename = url.path.UTF8String; S9xUnfreezeGame(filename); SNES9X_Go(); @@ -346,7 +344,7 @@ bool8 SNES9X_RecordMovie (void) NSURL *url = NavRecordMovieTo(); if (url != nil) { - const char *filename = url.lastPathComponent.UTF8String; + const char *filename = url.path.UTF8String; unlink(filename); int r; @@ -390,7 +388,7 @@ bool8 SNES9X_PlayMovie (void) NSURL *url = NavPlayMovieFrom(); if (url != nil) { - const char *filename = url.lastPathComponent.UTF8String; + const char *filename = url.path.UTF8String; int r; r = S9xMovieOpen(filename, macPlayFlag & 1); @@ -415,7 +413,7 @@ bool8 SNES9X_QTMovieRecord (void) NSURL *url = NavQTMovieRecordTo(); if (url != nil) { - const char *filename = url.lastPathComponent.UTF8String; + const char *filename = url.path.UTF8String; macQTRecord = true; SNES9X_Go(); diff --git a/macosx/mac-stringtools.h b/macosx/mac-stringtools.h index 430ce462..66667fac 100755 --- a/macosx/mac-stringtools.h +++ b/macosx/mac-stringtools.h @@ -15,6 +15,7 @@ (c) Copyright 2004 Alexander and Sander (c) Copyright 2004 - 2005 Steven Seeger (c) Copyright 2005 Ryan Vogt + (c) Copyright 2019 Michael Donald Buckley ***********************************************************************************/ diff --git a/macosx/mac-stringtools.mm b/macosx/mac-stringtools.mm index fae1c6aa..fb3ebeb2 100755 --- a/macosx/mac-stringtools.mm +++ b/macosx/mac-stringtools.mm @@ -15,6 +15,7 @@ (c) Copyright 2004 Alexander and Sander (c) Copyright 2004 - 2005 Steven Seeger (c) Copyright 2005 Ryan Vogt + (c) Copyright 2019 Michael Donald Buckley ***********************************************************************************/ diff --git a/macosx/snes9x framework/snes9x_framework.h b/macosx/snes9x framework/snes9x_framework.h index 09129bb4..b4c397fd 100644 --- a/macosx/snes9x framework/snes9x_framework.h +++ b/macosx/snes9x framework/snes9x_framework.h @@ -7,12 +7,14 @@ #import + //! Project version number for snes9x_framework. FOUNDATION_EXPORT double snes9x_frameworkVersionNumber; //! Project version string for snes9x_framework. FOUNDATION_EXPORT const unsigned char snes9x_frameworkVersionString[]; -// In this header, you should import all the public headers of your framework using statements like #import +#import +#import diff --git a/macosx/snes9x.xcodeproj/project.pbxproj b/macosx/snes9x.xcodeproj/project.pbxproj index ed74a4ee..575c2109 100755 --- a/macosx/snes9x.xcodeproj/project.pbxproj +++ b/macosx/snes9x.xcodeproj/project.pbxproj @@ -14,15 +14,17 @@ 302EECA322DAD0C5006D1502 /* CoreImage.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 302EECA222DAD0C5006D1502 /* CoreImage.framework */; }; 302EECA522DAD1B9006D1502 /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 302EECA422DAD1B9006D1502 /* CoreAudio.framework */; }; 3045A1EF22D03C4B0092B97D /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3045A1EE22D03C4B0092B97D /* Cocoa.framework */; }; + 30714719230E379500917F82 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 30714718230E379500917F82 /* AppDelegate.m */; }; + 3071471B230E379600917F82 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 3071471A230E379600917F82 /* Assets.xcassets */; }; + 3071471E230E379600917F82 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 3071471C230E379600917F82 /* MainMenu.xib */; }; + 30714721230E379600917F82 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 30714720230E379600917F82 /* main.m */; }; + 30714728230E37D500917F82 /* snes9x_framework.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 30D15CEF22CE6B5A005BC352 /* snes9x_framework.framework */; }; + 30714729230E387700917F82 /* mac-os.h in Headers */ = {isa = PBXBuildFile; fileRef = EAECB68204AC7FCE00A80003 /* mac-os.h */; settings = {ATTRIBUTES = (Public, ); }; }; 307C860B22D22C87001B879E /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 307C860A22D22C87001B879E /* libz.tbd */; }; 307C860C22D23A5B001B879E /* mac-file.mm in Sources */ = {isa = PBXBuildFile; fileRef = EA2DBC0C0510ABE700A80003 /* mac-file.mm */; }; - 307C861122D27C53001B879E /* tileimpl-n1x1.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 307C860D22D27C53001B879E /* tileimpl-n1x1.cpp */; }; 307C861222D27C53001B879E /* tileimpl-n1x1.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 307C860D22D27C53001B879E /* tileimpl-n1x1.cpp */; }; - 307C861322D27C53001B879E /* tileimpl.h in Headers */ = {isa = PBXBuildFile; fileRef = 307C860E22D27C53001B879E /* tileimpl.h */; }; 307C861422D27C53001B879E /* tileimpl.h in Headers */ = {isa = PBXBuildFile; fileRef = 307C860E22D27C53001B879E /* tileimpl.h */; }; - 307C861522D27C53001B879E /* tileimpl-n2x1.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 307C860F22D27C53001B879E /* tileimpl-n2x1.cpp */; }; 307C861622D27C53001B879E /* tileimpl-n2x1.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 307C860F22D27C53001B879E /* tileimpl-n2x1.cpp */; }; - 307C861722D27C53001B879E /* tileimpl-h2x1.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 307C861022D27C53001B879E /* tileimpl-h2x1.cpp */; }; 307C861822D27C53001B879E /* tileimpl-h2x1.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 307C861022D27C53001B879E /* tileimpl-h2x1.cpp */; }; 307C861922D29CAA001B879E /* mac-joypad.mm in Sources */ = {isa = PBXBuildFile; fileRef = EAECB67B04AC7FCE00A80003 /* mac-joypad.mm */; }; 307C861B22D29D6D001B879E /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 307C861A22D29D6D001B879E /* IOKit.framework */; }; @@ -45,232 +47,7 @@ 307C863022D29E29001B879E /* mac-render.mm in Sources */ = {isa = PBXBuildFile; fileRef = EA942A50059B0F9000D7D022 /* mac-render.mm */; }; 307C863222D29E29001B879E /* mac-snes9x.mm in Sources */ = {isa = PBXBuildFile; fileRef = EAECB68604AC7FCE00A80003 /* mac-snes9x.mm */; }; 307C863322D29E29001B879E /* mac-stringtools.mm in Sources */ = {isa = PBXBuildFile; fileRef = EAECB68804AC7FCE00A80003 /* mac-stringtools.mm */; }; - 30CCAC532290472E00549AED /* 65c816.h in Headers */ = {isa = PBXBuildFile; fileRef = EAE0615A0526CCB900A80003 /* 65c816.h */; }; - 30CCAC542290472E00549AED /* bsx.h in Headers */ = {isa = PBXBuildFile; fileRef = EA2F381A09B17E9E0078DCA7 /* bsx.h */; }; - 30CCAC552290472E00549AED /* blargg_source.h in Headers */ = {isa = PBXBuildFile; fileRef = BF0B39811FA5792F002B04D3 /* blargg_source.h */; }; - 30CCAC562290472E00549AED /* c4.h in Headers */ = {isa = PBXBuildFile; fileRef = EAE061600526CCB900A80003 /* c4.h */; }; - 30CCAC572290472E00549AED /* sdsp.hpp in Headers */ = {isa = PBXBuildFile; fileRef = BF0B39831FA5792F002B04D3 /* sdsp.hpp */; }; - 30CCAC582290472E00549AED /* cheats.h in Headers */ = {isa = PBXBuildFile; fileRef = EAE061640526CCB900A80003 /* cheats.h */; }; - 30CCAC592290472E00549AED /* controls.h in Headers */ = {isa = PBXBuildFile; fileRef = EA809E9308F8D6C40072CDFB /* controls.h */; }; - 30CCAC5A2290472E00549AED /* cpuaddr.h in Headers */ = {isa = PBXBuildFile; fileRef = EAE0616A0526CCB900A80003 /* cpuaddr.h */; }; - 30CCAC5B2290472E00549AED /* cpuexec.h in Headers */ = {isa = PBXBuildFile; fileRef = EAE0616C0526CCB900A80003 /* cpuexec.h */; }; - 30CCAC5C2290472E00549AED /* cpumacro.h in Headers */ = {isa = PBXBuildFile; fileRef = EAE0616D0526CCB900A80003 /* cpumacro.h */; }; - 30CCAC5D2290472E00549AED /* SPC_DSP.h in Headers */ = {isa = PBXBuildFile; fileRef = BF0B39851FA5792F002B04D3 /* SPC_DSP.h */; }; - 30CCAC5E2290472E00549AED /* cpuops.h in Headers */ = {isa = PBXBuildFile; fileRef = EAE0616F0526CCB900A80003 /* cpuops.h */; }; - 30CCAC5F2290472E00549AED /* crosshairs.h in Headers */ = {isa = PBXBuildFile; fileRef = EA809E9D08F8D73A0072CDFB /* crosshairs.h */; }; - 30CCAC602290472E00549AED /* debug.h in Headers */ = {isa = PBXBuildFile; fileRef = EA6E6C0E08F9734500CB3555 /* debug.h */; }; - 30CCAC612290472E00549AED /* display.h in Headers */ = {isa = PBXBuildFile; fileRef = EAE061730526CCB900A80003 /* display.h */; }; - 30CCAC622290472E00549AED /* snes.hpp in Headers */ = {isa = PBXBuildFile; fileRef = BF0B39AB1FA5792F002B04D3 /* snes.hpp */; }; - 30CCAC632290472E00549AED /* dma.h in Headers */ = {isa = PBXBuildFile; fileRef = EAE061750526CCB900A80003 /* dma.h */; }; - 30CCAC642290472E00549AED /* dsp.h in Headers */ = {isa = PBXBuildFile; fileRef = CF5D3E100FAFD34200340007 /* dsp.h */; }; - 30CCAC652290472E00549AED /* font.h in Headers */ = {isa = PBXBuildFile; fileRef = EAE0617A0526CCB900A80003 /* font.h */; }; - 30CCAC662290472E00549AED /* fxemu.h in Headers */ = {isa = PBXBuildFile; fileRef = EAE0617D0526CCB900A80003 /* fxemu.h */; }; - 30CCAC672290472E00549AED /* fxinst.h in Headers */ = {isa = PBXBuildFile; fileRef = EAE0617F0526CCB900A80003 /* fxinst.h */; }; - 30CCAC682290472E00549AED /* getset.h in Headers */ = {isa = PBXBuildFile; fileRef = EAE061800526CCB900A80003 /* getset.h */; }; - 30CCAC692290472E00549AED /* blargg_endian.h in Headers */ = {isa = PBXBuildFile; fileRef = BF0B39801FA5792F002B04D3 /* blargg_endian.h */; }; - 30CCAC6A2290472E00549AED /* gfx.h in Headers */ = {isa = PBXBuildFile; fileRef = EAE061820526CCB900A80003 /* gfx.h */; }; - 30CCAC6B2290472E00549AED /* language.h in Headers */ = {isa = PBXBuildFile; fileRef = EA809E9508F8D6E00072CDFB /* language.h */; }; - 30CCAC6C2290472E00549AED /* logger.h in Headers */ = {isa = PBXBuildFile; fileRef = EA00D01F0A5A998F000C58E0 /* logger.h */; }; - 30CCAC6D2290472E00549AED /* memmap.h in Headers */ = {isa = PBXBuildFile; fileRef = EAE061B10526CCB900A80003 /* memmap.h */; }; - 30CCAC6E2290472E00549AED /* messages.h in Headers */ = {isa = PBXBuildFile; fileRef = EAE061B20526CCB900A80003 /* messages.h */; }; - 30CCAC6F2290472E00549AED /* missing.h in Headers */ = {isa = PBXBuildFile; fileRef = EAE061B30526CCB900A80003 /* missing.h */; }; - 30CCAC702290472E00549AED /* movie.h in Headers */ = {isa = PBXBuildFile; fileRef = EA813E86066F5076004F99B5 /* movie.h */; }; - 30CCAC712290472E00549AED /* obc1.h in Headers */ = {isa = PBXBuildFile; fileRef = EAE061C40526CCB900A80003 /* obc1.h */; }; - 30CCAC722290472E00549AED /* pixform.h in Headers */ = {isa = PBXBuildFile; fileRef = EAE061C60526CCB900A80003 /* pixform.h */; }; - 30CCAC732290472E00549AED /* port.h in Headers */ = {isa = PBXBuildFile; fileRef = EAE061C70526CCB900A80003 /* port.h */; }; - 30CCAC742290472E00549AED /* ppu.h in Headers */ = {isa = PBXBuildFile; fileRef = EAE061C90526CCB900A80003 /* ppu.h */; }; - 30CCAC752290472E00549AED /* stream.h in Headers */ = {isa = PBXBuildFile; fileRef = EA809E9708F8D70D0072CDFB /* stream.h */; }; - 30CCAC762290472E00549AED /* sa1.h in Headers */ = {isa = PBXBuildFile; fileRef = EAE061CC0526CCB900A80003 /* sa1.h */; }; - 30CCAC772290472E00549AED /* sar.h in Headers */ = {isa = PBXBuildFile; fileRef = EAE061CE0526CCB900A80003 /* sar.h */; }; - 30CCAC782290472E00549AED /* screenshot.h in Headers */ = {isa = PBXBuildFile; fileRef = EAE061D00526CCB900A80003 /* screenshot.h */; }; - 30CCAC792290472E00549AED /* sdd1.h in Headers */ = {isa = PBXBuildFile; fileRef = EAE061D20526CCB900A80003 /* sdd1.h */; }; - 30CCAC7A2290472E00549AED /* sdd1emu.h in Headers */ = {isa = PBXBuildFile; fileRef = EA22EFA2053EEDE500A80003 /* sdd1emu.h */; }; - 30CCAC7B2290472E00549AED /* seta.h in Headers */ = {isa = PBXBuildFile; fileRef = EAE061D50526CCB900A80003 /* seta.h */; }; - 30CCAC7C2290472E00549AED /* snapshot.h in Headers */ = {isa = PBXBuildFile; fileRef = EAE061DC0526CCB900A80003 /* snapshot.h */; }; - 30CCAC7D2290472E00549AED /* snes9x.h in Headers */ = {isa = PBXBuildFile; fileRef = EAE061DE0526CCB900A80003 /* snes9x.h */; }; - 30CCAC7E2290472E00549AED /* spc7110.h in Headers */ = {isa = PBXBuildFile; fileRef = EAE061E60526CCB900A80003 /* spc7110.h */; }; - 30CCAC7F2290472E00549AED /* srtc.h in Headers */ = {isa = PBXBuildFile; fileRef = EAE061EA0526CCB900A80003 /* srtc.h */; }; - 30CCAC802290472E00549AED /* tile.h in Headers */ = {isa = PBXBuildFile; fileRef = EAE061EC0526CCB900A80003 /* tile.h */; }; - 30CCAC812290472E00549AED /* 2xsai.h in Headers */ = {isa = PBXBuildFile; fileRef = CF5553B20EA24C36005957E4 /* 2xsai.h */; }; - 30CCAC822290472E00549AED /* blit.h in Headers */ = {isa = PBXBuildFile; fileRef = CF5553B40EA24C36005957E4 /* blit.h */; }; - 30CCAC832290472E00549AED /* epx.h in Headers */ = {isa = PBXBuildFile; fileRef = CF5553B60EA24C36005957E4 /* epx.h */; }; - 30CCAC842290472E00549AED /* hq2x.h in Headers */ = {isa = PBXBuildFile; fileRef = CF5553B80EA24C36005957E4 /* hq2x.h */; }; - 30CCAC852290472E00549AED /* snes_ntsc.h in Headers */ = {isa = PBXBuildFile; fileRef = CFEFAE9010EAC92B00FB081A /* snes_ntsc.h */; }; - 30CCAC862290472E00549AED /* snes_ntsc_config.h in Headers */ = {isa = PBXBuildFile; fileRef = CFEFAE8E10EAC92B00FB081A /* snes_ntsc_config.h */; }; - 30CCAC872290472E00549AED /* snes_ntsc_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = CFEFAE8F10EAC92B00FB081A /* snes_ntsc_impl.h */; }; - 30CCAC882290472E00549AED /* crypt.h in Headers */ = {isa = PBXBuildFile; fileRef = CFA518E50EBCB5B1008379F6 /* crypt.h */; }; - 30CCAC892290472E00549AED /* ioapi.h in Headers */ = {isa = PBXBuildFile; fileRef = CFA518D60EBCB4CA008379F6 /* ioapi.h */; }; - 30CCAC8A2290472E00549AED /* unzip.h in Headers */ = {isa = PBXBuildFile; fileRef = CFA518DA0EBCB4D2008379F6 /* unzip.h */; }; - 30CCAC8B2290472E00549AED /* 7z.h in Headers */ = {isa = PBXBuildFile; fileRef = EAA7B5D907609F76001BAB8B /* 7z.h */; }; - 30CCAC8C2290472E00549AED /* aribitcd.h in Headers */ = {isa = PBXBuildFile; fileRef = EAA7B5DB07609F76001BAB8B /* aribitcd.h */; }; - 30CCAC8D2290472E00549AED /* ariconst.h in Headers */ = {isa = PBXBuildFile; fileRef = EAA7B5DC07609F76001BAB8B /* ariconst.h */; }; - 30CCAC8E2290472E00549AED /* ariprice.h in Headers */ = {isa = PBXBuildFile; fileRef = EAA7B5DD07609F76001BAB8B /* ariprice.h */; }; - 30CCAC8F2290472E00549AED /* btreecd.h in Headers */ = {isa = PBXBuildFile; fileRef = EAA7B5DE07609F76001BAB8B /* btreecd.h */; }; - 30CCAC902290472E00549AED /* crc32.h in Headers */ = {isa = PBXBuildFile; fileRef = EAA7B5E007609F76001BAB8B /* crc32.h */; }; - 30CCAC912290472E00549AED /* blargg_config.h in Headers */ = {isa = PBXBuildFile; fileRef = BF0B397F1FA5792F002B04D3 /* blargg_config.h */; }; - 30CCAC922290472E00549AED /* iiostrm.h in Headers */ = {isa = PBXBuildFile; fileRef = EAA7B5E207609F76001BAB8B /* iiostrm.h */; }; - 30CCAC932290472E00549AED /* blargg_common.h in Headers */ = {isa = PBXBuildFile; fileRef = BF0B397E1FA5792F002B04D3 /* blargg_common.h */; }; - 30CCAC942290472E00549AED /* inbyte.h in Headers */ = {isa = PBXBuildFile; fileRef = EAA7B5E407609F76001BAB8B /* inbyte.h */; }; - 30CCAC952290472E00549AED /* jma.h in Headers */ = {isa = PBXBuildFile; fileRef = EAA7B5E607609F76001BAB8B /* jma.h */; }; - 30CCAC962290472E00549AED /* lencoder.h in Headers */ = {isa = PBXBuildFile; fileRef = EAA7B5E707609F76001BAB8B /* lencoder.h */; }; - 30CCAC972290472E00549AED /* litcoder.h in Headers */ = {isa = PBXBuildFile; fileRef = EAA7B5E807609F76001BAB8B /* litcoder.h */; }; - 30CCAC982290472E00549AED /* resampler.h in Headers */ = {isa = PBXBuildFile; fileRef = BF0B39AD1FA5792F002B04D3 /* resampler.h */; }; - 30CCAC992290472E00549AED /* lzma.h in Headers */ = {isa = PBXBuildFile; fileRef = EAA7B5EA07609F76001BAB8B /* lzma.h */; }; - 30CCAC9A2290472E00549AED /* smp.hpp in Headers */ = {isa = PBXBuildFile; fileRef = BF0B39A71FA5792F002B04D3 /* smp.hpp */; }; - 30CCAC9B2290472E00549AED /* lzmadec.h in Headers */ = {isa = PBXBuildFile; fileRef = EAA7B5EC07609F76001BAB8B /* lzmadec.h */; }; - 30CCAC9C2290472E00549AED /* portable.h in Headers */ = {isa = PBXBuildFile; fileRef = EAA7B5ED07609F76001BAB8B /* portable.h */; }; - 30CCAC9D2290472E00549AED /* rcdefs.h in Headers */ = {isa = PBXBuildFile; fileRef = EAA7B5EE07609F76001BAB8B /* rcdefs.h */; }; - 30CCAC9E2290472E00549AED /* rngcoder.h in Headers */ = {isa = PBXBuildFile; fileRef = EAA7B5EF07609F76001BAB8B /* rngcoder.h */; }; - 30CCAC9F2290472E00549AED /* s9x-jma.h in Headers */ = {isa = PBXBuildFile; fileRef = EAA7B5F107609F76001BAB8B /* s9x-jma.h */; }; - 30CCACA02290472E00549AED /* winout.h in Headers */ = {isa = PBXBuildFile; fileRef = EAA7B5F307609F76001BAB8B /* winout.h */; }; - 30CCACA12290472E00549AED /* mac-appleevent.h in Headers */ = {isa = PBXBuildFile; fileRef = EAECB66D04AC7FCD00A80003 /* mac-appleevent.h */; }; - 30CCACA22290472E00549AED /* mac-audio.h in Headers */ = {isa = PBXBuildFile; fileRef = EADE6349052E5C5300A80003 /* mac-audio.h */; }; - 30CCACA32290472E00549AED /* mac-cart.h in Headers */ = {isa = PBXBuildFile; fileRef = EAECB67104AC7FCE00A80003 /* mac-cart.h */; }; - 30CCACA42290472E00549AED /* mac-cheat.h in Headers */ = {isa = PBXBuildFile; fileRef = EAECB67304AC7FCE00A80003 /* mac-cheat.h */; }; - 30CCACA52290472E00549AED /* mac-cheatfinder.h in Headers */ = {isa = PBXBuildFile; fileRef = EAECB67504AC7FCE00A80003 /* mac-cheatfinder.h */; }; - 30CCACA72290472E00549AED /* mac-cocoatools.h in Headers */ = {isa = PBXBuildFile; fileRef = EA85C24D0B4EC13300F5F9C9 /* mac-cocoatools.h */; }; - 30CCACA82290472E00549AED /* mac-controls.h in Headers */ = {isa = PBXBuildFile; fileRef = EA809F9D08F8F2190072CDFB /* mac-controls.h */; }; - 30CCACA92290472E00549AED /* mac-coreimage.h in Headers */ = {isa = PBXBuildFile; fileRef = EA0C952D08364A4A009307B4 /* mac-coreimage.h */; }; - 30CCACAB2290472E00549AED /* mac-file.h in Headers */ = {isa = PBXBuildFile; fileRef = EA2DBC0A0510ABE700A80003 /* mac-file.h */; }; - 30CCACAC2290472E00549AED /* mac-gworld.h in Headers */ = {isa = PBXBuildFile; fileRef = EAECB67A04AC7FCE00A80003 /* mac-gworld.h */; }; - 30CCACAD2290472E00549AED /* mac-joypad.h in Headers */ = {isa = PBXBuildFile; fileRef = EAECB67C04AC7FCE00A80003 /* mac-joypad.h */; }; - 30CCACAE2290472E00549AED /* mac-keyboard.h in Headers */ = {isa = PBXBuildFile; fileRef = EAECB67E04AC7FCE00A80003 /* mac-keyboard.h */; }; - 30CCACAF2290472E00549AED /* apu.h in Headers */ = {isa = PBXBuildFile; fileRef = BF0B397B1FA5792F002B04D3 /* apu.h */; }; - 30CCACB02290472E00549AED /* mac-multicart.h in Headers */ = {isa = PBXBuildFile; fileRef = EA26BBD90B36771500A570B5 /* mac-multicart.h */; }; - 30CCACB12290472E00549AED /* mac-musicbox.h in Headers */ = {isa = PBXBuildFile; fileRef = EAECB68004AC7FCE00A80003 /* mac-musicbox.h */; }; - 30CCACB22290472E00549AED /* mac-netplay.h in Headers */ = {isa = PBXBuildFile; fileRef = EA16053E0639E655004412AB /* mac-netplay.h */; }; - 30CCACB32290472E00549AED /* mac-os.h in Headers */ = {isa = PBXBuildFile; fileRef = EAECB68204AC7FCE00A80003 /* mac-os.h */; }; - 30CCACB42290472E00549AED /* mac-prefs.h in Headers */ = {isa = PBXBuildFile; fileRef = EAECB68504AC7FCE00A80003 /* mac-prefs.h */; }; - 30CCACB62290472E00549AED /* mac-render.h in Headers */ = {isa = PBXBuildFile; fileRef = EA2DBC090510ABE700A80003 /* mac-render.h */; }; - 30CCACB72290472E00549AED /* msu1.h in Headers */ = {isa = PBXBuildFile; fileRef = BF0B39E21FA58124002B04D3 /* msu1.h */; }; - 30CCACB82290472E00549AED /* mac-screenshot.h in Headers */ = {isa = PBXBuildFile; fileRef = EA2DBC070510ABE700A80003 /* mac-screenshot.h */; }; - 30CCACBA2290472E00549AED /* mac-snes9x.h in Headers */ = {isa = PBXBuildFile; fileRef = EAECB68704AC7FCE00A80003 /* mac-snes9x.h */; }; - 30CCACBB2290472E00549AED /* mac-stringtools.h in Headers */ = {isa = PBXBuildFile; fileRef = EAECB68904AC7FCE00A80003 /* mac-stringtools.h */; }; - 30CCACBC2290472E00549AED /* mac-prefix.h in Headers */ = {isa = PBXBuildFile; fileRef = EAECB68304AC7FCE00A80003 /* mac-prefix.h */; }; - 30CCACBD2290472E00549AED /* mac-global_prefix.h in Headers */ = {isa = PBXBuildFile; fileRef = EAD978980555059300E8BBFD /* mac-global_prefix.h */; }; - 30CCACBE2290472E00549AED /* HID_Utilities_External.h in Headers */ = {isa = PBXBuildFile; fileRef = EA362C3E086119D100FBE476 /* HID_Utilities_External.h */; }; - 30CCACBF2290472E00549AED /* zconf.h in Headers */ = {isa = PBXBuildFile; fileRef = CF3E45BD137349960077DE32 /* zconf.h */; }; - 30CCACC02290472E00549AED /* zlib.h in Headers */ = {isa = PBXBuildFile; fileRef = CF3E45D013734A920077DE32 /* zlib.h */; }; - 30CCACC22290472E00549AED /* APPL.icns in Resources */ = {isa = PBXBuildFile; fileRef = EA3D2F3D0A26083B00BDACCC /* APPL.icns */; }; - 30CCACC32290472E00549AED /* CART.icns in Resources */ = {isa = PBXBuildFile; fileRef = EA3D2F3C0A26083B00BDACCC /* CART.icns */; }; - 30CCACC42290472E00549AED /* SRAM.icns in Resources */ = {isa = PBXBuildFile; fileRef = EA3D2F360A26083B00BDACCC /* SRAM.icns */; }; - 30CCACC52290472E00549AED /* SAVE.icns in Resources */ = {isa = PBXBuildFile; fileRef = EA3D2F370A26083B00BDACCC /* SAVE.icns */; }; - 30CCACC62290472E00549AED /* folder_SRAMs.icns in Resources */ = {isa = PBXBuildFile; fileRef = EA3D2F3A0A26083B00BDACCC /* folder_SRAMs.icns */; }; - 30CCACC72290472E00549AED /* folder_Freezes.icns in Resources */ = {isa = PBXBuildFile; fileRef = EA3D2F3B0A26083B00BDACCC /* folder_Freezes.icns */; }; - 30CCACC82290472E00549AED /* icons.png in Resources */ = {isa = PBXBuildFile; fileRef = CF4B7C420CF841580080E643 /* icons.png */; }; - 30CCACC92290472E00549AED /* logo_freeze.png in Resources */ = {isa = PBXBuildFile; fileRef = EA3D300B0A260A3200BDACCC /* logo_freeze.png */; }; - 30CCACCA2290472E00549AED /* logo_defrost.png in Resources */ = {isa = PBXBuildFile; fileRef = EA3D300C0A260A3200BDACCC /* logo_defrost.png */; }; - 30CCACCB2290472E00549AED /* musicbox_indicator.png in Resources */ = {isa = PBXBuildFile; fileRef = EA3D300A0A260A3200BDACCC /* musicbox_indicator.png */; }; - 30CCACCC2290472E00549AED /* musicbox_pause.png in Resources */ = {isa = PBXBuildFile; fileRef = CF46BEAD133E256D005A17A5 /* musicbox_pause.png */; }; - 30CCACCD2290472E00549AED /* musicbox_rewind.png in Resources */ = {isa = PBXBuildFile; fileRef = CFCE2D46133F591900DF6C4E /* musicbox_rewind.png */; }; - 30CCACCE2290472E00549AED /* musicbox_effect.png in Resources */ = {isa = PBXBuildFile; fileRef = CFCE2D45133F591900DF6C4E /* musicbox_effect.png */; }; - 30CCACCF2290472E00549AED /* musicbox_ledon.icns in Resources */ = {isa = PBXBuildFile; fileRef = EA3D2F380A26083B00BDACCC /* musicbox_ledon.icns */; }; - 30CCACD02290472E00549AED /* musicbox_ledoff.icns in Resources */ = {isa = PBXBuildFile; fileRef = EA3D2F390A26083B00BDACCC /* musicbox_ledoff.icns */; }; - 30CCACD12290472E00549AED /* freeze_defrost.aiff in Resources */ = {isa = PBXBuildFile; fileRef = EA85C3560B4ECBD900F5F9C9 /* freeze_defrost.aiff */; }; - 30CCACD22290472E00549AED /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = EA3BEA9E0A28384E00A8FAE5 /* InfoPlist.strings */; }; - 30CCACD32290472E00549AED /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = EA3BEA980A28384E00A8FAE5 /* Localizable.strings */; }; - 30CCACD42290472E00549AED /* Snes9x.xib in Resources */ = {isa = PBXBuildFile; fileRef = CF14733C132DA4E1000D0F91 /* Snes9x.xib */; }; - 30CCACD52290472E00549AED /* musicbox.xib in Resources */ = {isa = PBXBuildFile; fileRef = CF46BEA8133E2559005A17A5 /* musicbox.xib */; }; - 30CCACD62290472E00549AED /* Snes9x Help in Resources */ = {isa = PBXBuildFile; fileRef = EA3BEAA80A28386500A8FAE5 /* Snes9x Help */; }; - 30CCACD82290472E00549AED /* bsx.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EA2F380F09B17E070078DCA7 /* bsx.cpp */; }; - 30CCACD92290472E00549AED /* c4.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EAE0615F0526CCB900A80003 /* c4.cpp */; }; - 30CCACDA2290472E00549AED /* c4emu.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EAE061610526CCB900A80003 /* c4emu.cpp */; }; - 30CCACDB2290472E00549AED /* cheats.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EAE061630526CCB900A80003 /* cheats.cpp */; }; - 30CCACDC2290472E00549AED /* cheats2.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EAE061650526CCB900A80003 /* cheats2.cpp */; }; - 30CCACDD2290472E00549AED /* clip.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EAE061660526CCB900A80003 /* clip.cpp */; }; - 30CCACDE2290472E00549AED /* apu.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BF0B397A1FA5792F002B04D3 /* apu.cpp */; }; - 30CCACDF2290472E00549AED /* controls.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EA809E9908F8D7240072CDFB /* controls.cpp */; }; - 30CCACE02290472E00549AED /* cpu.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EAE061690526CCB900A80003 /* cpu.cpp */; }; - 30CCACE12290472E00549AED /* cpuexec.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EAE0616B0526CCB900A80003 /* cpuexec.cpp */; }; - 30CCACE22290472E00549AED /* cpuops.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EAE0616E0526CCB900A80003 /* cpuops.cpp */; }; - 30CCACE32290472E00549AED /* crosshairs.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EA809E9B08F8D72C0072CDFB /* crosshairs.cpp */; }; - 30CCACE42290472E00549AED /* debug.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EAE061710526CCB900A80003 /* debug.cpp */; }; - 30CCACE52290472E00549AED /* dma.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EAE061740526CCB900A80003 /* dma.cpp */; }; - 30CCACE62290472E00549AED /* dsp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CF5D3E270FAFD35A00340007 /* dsp.cpp */; }; - 30CCACE72290472E00549AED /* dsp1.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EAE061760526CCB900A80003 /* dsp1.cpp */; }; - 30CCACE82290472E00549AED /* dsp2.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CF5D3E1B0FAFD35400340007 /* dsp2.cpp */; }; - 30CCACE92290472E00549AED /* dsp3.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CF5D3E1D0FAFD35400340007 /* dsp3.cpp */; }; - 30CCACEA2290472E00549AED /* dsp4.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CF5D3E1C0FAFD35400340007 /* dsp4.cpp */; }; - 30CCACEB2290472E00549AED /* fxemu.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EAE0617C0526CCB900A80003 /* fxemu.cpp */; }; - 30CCACEC2290472E00549AED /* fxinst.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EAE0617E0526CCB900A80003 /* fxinst.cpp */; }; - 30CCACED2290472E00549AED /* gfx.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EA31FE2D05F7743E00E13748 /* gfx.cpp */; }; - 30CCACEE2290472E00549AED /* globals.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EAE061830526CCB900A80003 /* globals.cpp */; }; - 30CCACEF2290472E00549AED /* loadzip.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EAE061A90526CCB900A80003 /* loadzip.cpp */; }; - 30CCACF02290472E00549AED /* logger.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EA00D01D0A5A9956000C58E0 /* logger.cpp */; }; - 30CCACF12290472E00549AED /* memmap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EAB7319C0527033000A80003 /* memmap.cpp */; }; - 30CCACF22290472E00549AED /* movie.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EA813E9A066F50A5004F99B5 /* movie.cpp */; }; - 30CCACF32290472E00549AED /* obc1.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EAE061C30526CCB900A80003 /* obc1.cpp */; }; - 30CCACF42290472E00549AED /* ppu.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EAE061C80526CCB900A80003 /* ppu.cpp */; }; - 30CCACF52290472E00549AED /* stream.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EA809E9F08F8D7530072CDFB /* stream.cpp */; }; - 30CCACF62290472E00549AED /* sa1.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EAE061CB0526CCB900A80003 /* sa1.cpp */; }; - 30CCACF72290472E00549AED /* sa1cpu.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EAE061CD0526CCB900A80003 /* sa1cpu.cpp */; }; - 30CCACF82290472E00549AED /* sdd1.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EAE061D10526CCB900A80003 /* sdd1.cpp */; }; - 30CCACF92290472E00549AED /* sdd1emu.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EA22EFA4053EEE0700A80003 /* sdd1emu.cpp */; }; - 30CCACFA2290472E00549AED /* msu1.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BF0B39DE1FA580F9002B04D3 /* msu1.cpp */; }; - 30CCACFB2290472E00549AED /* seta.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EAE061D40526CCB900A80003 /* seta.cpp */; }; - 30CCACFC2290472E00549AED /* seta010.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EAE061D60526CCB900A80003 /* seta010.cpp */; }; - 30CCACFD2290472E00549AED /* seta011.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EAE061D70526CCB900A80003 /* seta011.cpp */; }; - 30CCACFE2290472E00549AED /* seta018.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EAE061D80526CCB900A80003 /* seta018.cpp */; }; - 30CCACFF2290472E00549AED /* snapshot.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EAE061DB0526CCB900A80003 /* snapshot.cpp */; }; - 30CCAD002290472E00549AED /* spc7110.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EAE061E50526CCB900A80003 /* spc7110.cpp */; }; - 30CCAD012290472E00549AED /* srtc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EAE061E90526CCB900A80003 /* srtc.cpp */; }; - 30CCAD022290472E00549AED /* tile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EAE061EB0526CCB900A80003 /* tile.cpp */; }; - 30CCAD032290472E00549AED /* 2xsai.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CF5553B10EA24C36005957E4 /* 2xsai.cpp */; }; - 30CCAD042290472E00549AED /* blit.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CF5553B30EA24C36005957E4 /* blit.cpp */; }; - 30CCAD052290472E00549AED /* epx.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CF5553B50EA24C36005957E4 /* epx.cpp */; }; - 30CCAD062290472E00549AED /* hq2x.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CF5553B70EA24C36005957E4 /* hq2x.cpp */; }; - 30CCAD072290472E00549AED /* snes_ntsc.c in Sources */ = {isa = PBXBuildFile; fileRef = CFEFAE8A10EAC92300FB081A /* snes_ntsc.c */; }; - 30CCAD082290472E00549AED /* ioapi.c in Sources */ = {isa = PBXBuildFile; fileRef = CFA518D10EBCB4AD008379F6 /* ioapi.c */; }; - 30CCAD092290472E00549AED /* unzip.c in Sources */ = {isa = PBXBuildFile; fileRef = CFA518BC0EBCB3ED008379F6 /* unzip.c */; }; - 30CCAD0A2290472E00549AED /* 7zlzma.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EAA7B5DA07609F76001BAB8B /* 7zlzma.cpp */; settings = {COMPILER_FLAGS = "-fexceptions"; }; }; - 30CCAD0B2290472E00549AED /* crc32.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EAA7B5DF07609F76001BAB8B /* crc32.cpp */; settings = {COMPILER_FLAGS = "-fexceptions"; }; }; - 30CCAD0C2290472E00549AED /* iiostrm.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EAA7B5E107609F76001BAB8B /* iiostrm.cpp */; settings = {COMPILER_FLAGS = "-fexceptions"; }; }; - 30CCAD0D2290472E00549AED /* inbyte.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EAA7B5E307609F76001BAB8B /* inbyte.cpp */; settings = {COMPILER_FLAGS = "-fexceptions"; }; }; - 30CCAD0E2290472E00549AED /* jma.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EAA7B5E507609F76001BAB8B /* jma.cpp */; settings = {COMPILER_FLAGS = "-fexceptions"; }; }; - 30CCAD0F2290472E00549AED /* lzma.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EAA7B5E907609F76001BAB8B /* lzma.cpp */; settings = {COMPILER_FLAGS = "-fexceptions"; }; }; - 30CCAD102290472E00549AED /* lzmadec.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EAA7B5EB07609F76001BAB8B /* lzmadec.cpp */; settings = {COMPILER_FLAGS = "-fexceptions"; }; }; - 30CCAD112290472E00549AED /* s9x-jma.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EAA7B5F007609F76001BAB8B /* s9x-jma.cpp */; settings = {COMPILER_FLAGS = "-fexceptions"; }; }; - 30CCAD122290472E00549AED /* winout.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EAA7B5F207609F76001BAB8B /* winout.cpp */; settings = {COMPILER_FLAGS = "-fexceptions"; }; }; - 30CCAD132290472E00549AED /* mac-appleevent.mm in Sources */ = {isa = PBXBuildFile; fileRef = EACDDBB004D6A89700A80003 /* mac-appleevent.mm */; }; - 30CCAD142290472E00549AED /* mac-audio.mm in Sources */ = {isa = PBXBuildFile; fileRef = EADE6347052E5C4300A80003 /* mac-audio.mm */; }; - 30CCAD152290472E00549AED /* mac-cart.mm in Sources */ = {isa = PBXBuildFile; fileRef = EAECB67004AC7FCE00A80003 /* mac-cart.mm */; }; - 30CCAD162290472E00549AED /* mac-cheat.mm in Sources */ = {isa = PBXBuildFile; fileRef = EAECB67204AC7FCE00A80003 /* mac-cheat.mm */; }; - 30CCAD172290472E00549AED /* smp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BF0B39A61FA5792F002B04D3 /* smp.cpp */; }; - 30CCAD182290472E00549AED /* mac-cheatfinder.mm in Sources */ = {isa = PBXBuildFile; fileRef = EAECB67404AC7FCE00A80003 /* mac-cheatfinder.mm */; }; - 30CCAD1A2290472E00549AED /* mac-cocoatools.mm in Sources */ = {isa = PBXBuildFile; fileRef = EA85C24E0B4EC13300F5F9C9 /* mac-cocoatools.mm */; }; - 30CCAD1B2290472E00549AED /* mac-controls.mm in Sources */ = {isa = PBXBuildFile; fileRef = EA809FA108F8F2420072CDFB /* mac-controls.mm */; }; - 30CCAD1C2290472E00549AED /* mac-coreimage.mm in Sources */ = {isa = PBXBuildFile; fileRef = EA0C952E08364A4A009307B4 /* mac-coreimage.mm */; }; - 30CCAD1D2290472E00549AED /* smp_state.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BF0B39A81FA5792F002B04D3 /* smp_state.cpp */; }; - 30CCAD1E2290472E00549AED /* sdsp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BF0B39821FA5792F002B04D3 /* sdsp.cpp */; }; - 30CCAD202290472E00549AED /* mac-file.mm in Sources */ = {isa = PBXBuildFile; fileRef = EA2DBC0C0510ABE700A80003 /* mac-file.mm */; }; - 30CCAD212290472E00549AED /* mac-gworld.mm in Sources */ = {isa = PBXBuildFile; fileRef = EAECB67904AC7FCE00A80003 /* mac-gworld.mm */; }; - 30CCAD222290472E00549AED /* mac-joypad.mm in Sources */ = {isa = PBXBuildFile; fileRef = EAECB67B04AC7FCE00A80003 /* mac-joypad.mm */; }; - 30CCAD232290472E00549AED /* mac-keyboard.mm in Sources */ = {isa = PBXBuildFile; fileRef = EAECB67D04AC7FCE00A80003 /* mac-keyboard.mm */; }; - 30CCAD242290472E00549AED /* mac-multicart.mm in Sources */ = {isa = PBXBuildFile; fileRef = EA26BBD50B3676E800A570B5 /* mac-multicart.mm */; }; - 30CCAD252290472E00549AED /* mac-musicbox.mm in Sources */ = {isa = PBXBuildFile; fileRef = EAECB67F04AC7FCE00A80003 /* mac-musicbox.mm */; }; - 30CCAD262290472E00549AED /* mac-netplay.mm in Sources */ = {isa = PBXBuildFile; fileRef = EA1605500639E735004412AB /* mac-netplay.mm */; }; - 30CCAD272290472E00549AED /* mac-os.mm in Sources */ = {isa = PBXBuildFile; fileRef = EAE0E96604D582B700A80003 /* mac-os.mm */; }; - 30CCAD282290472E00549AED /* mac-prefs.mm in Sources */ = {isa = PBXBuildFile; fileRef = EAE0E96B04D584B700A80003 /* mac-prefs.mm */; }; - 30CCAD2A2290472E00549AED /* mac-render.mm in Sources */ = {isa = PBXBuildFile; fileRef = EA942A50059B0F9000D7D022 /* mac-render.mm */; }; - 30CCAD2B2290472E00549AED /* mac-screenshot.mm in Sources */ = {isa = PBXBuildFile; fileRef = EA2DBC0D0510ABE700A80003 /* mac-screenshot.mm */; }; - 30CCAD2D2290472E00549AED /* mac-snes9x.mm in Sources */ = {isa = PBXBuildFile; fileRef = EAECB68604AC7FCE00A80003 /* mac-snes9x.mm */; }; - 30CCAD2E2290472E00549AED /* mac-stringtools.mm in Sources */ = {isa = PBXBuildFile; fileRef = EAECB68804AC7FCE00A80003 /* mac-stringtools.mm */; }; - 30CCAD302290472E00549AED /* AGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EAC5E47003D2D9C800A80004 /* AGL.framework */; }; - 30CCAD312290472E00549AED /* AppKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EA85C2AC0B4ECA8300F5F9C9 /* AppKit.framework */; }; - 30CCAD322290472E00549AED /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EADE634B052E5D3600A80003 /* AudioToolbox.framework */; }; - 30CCAD332290472E00549AED /* AudioUnit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EADE634C052E5D3600A80003 /* AudioUnit.framework */; }; - 30CCAD342290472E00549AED /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 20286C33FDCF999611CA2CEA /* Carbon.framework */; }; - 30CCAD352290472E00549AED /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EADE634D052E5D3600A80003 /* CoreAudio.framework */; }; - 30CCAD362290472E00549AED /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EA0C95D808364AAE009307B4 /* Foundation.framework */; }; - 30CCAD372290472E00549AED /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F5FC76BD03873BBF01A80002 /* IOKit.framework */; }; - 30CCAD382290472E00549AED /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EA8FA89603D294C000A80004 /* OpenGL.framework */; }; - 30CCAD392290472E00549AED /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CF05677E0CF9971000C7877C /* QuartzCore.framework */; }; - 30CCAD3A2290472E00549AED /* QuickTime.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F5C108DD0386806001A80002 /* QuickTime.framework */; }; - 30CCAD3B2290472E00549AED /* libHIDUtilities_u.a in Frameworks */ = {isa = PBXBuildFile; fileRef = EA3D2F580A26085800BDACCC /* libHIDUtilities_u.a */; }; - 30CCAD3C2290472E00549AED /* libz_u.a in Frameworks */ = {isa = PBXBuildFile; fileRef = CF3E42491372D48F0077DE32 /* libz_u.a */; }; 30D15CF322CE6B5A005BC352 /* snes9x_framework.h in Headers */ = {isa = PBXBuildFile; fileRef = 30D15CF122CE6B5A005BC352 /* snes9x_framework.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 30D15CF622CE6B5A005BC352 /* snes9x_framework.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 30D15CEF22CE6B5A005BC352 /* snes9x_framework.framework */; }; - 30D15CF722CE6B5A005BC352 /* snes9x_framework.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 30D15CEF22CE6B5A005BC352 /* snes9x_framework.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 30D15CFC22CE6B74005BC352 /* sha256.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 85FEF90A20DDB18D00C038E9 /* sha256.cpp */; }; 30D15CFE22CE6B74005BC352 /* bml.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 85FEF90620DDB15B00C038E9 /* bml.cpp */; }; 30D15D2D22CE6B74005BC352 /* bsx.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EA2F380F09B17E070078DCA7 /* bsx.cpp */; }; @@ -365,7 +142,7 @@ 30D15DB022CE6BC9005BC352 /* msu1.h in Headers */ = {isa = PBXBuildFile; fileRef = BF0B39E21FA58124002B04D3 /* msu1.h */; }; 30D15DB122CE6BC9005BC352 /* obc1.h in Headers */ = {isa = PBXBuildFile; fileRef = EAE061C40526CCB900A80003 /* obc1.h */; }; 30D15DB222CE6BC9005BC352 /* pixform.h in Headers */ = {isa = PBXBuildFile; fileRef = EAE061C60526CCB900A80003 /* pixform.h */; }; - 30D15DB322CE6BC9005BC352 /* port.h in Headers */ = {isa = PBXBuildFile; fileRef = EAE061C70526CCB900A80003 /* port.h */; }; + 30D15DB322CE6BC9005BC352 /* port.h in Headers */ = {isa = PBXBuildFile; fileRef = EAE061C70526CCB900A80003 /* port.h */; settings = {ATTRIBUTES = (Public, ); }; }; 30D15DB422CE6BC9005BC352 /* ppu.h in Headers */ = {isa = PBXBuildFile; fileRef = EAE061C90526CCB900A80003 /* ppu.h */; }; 30D15DB522CE6BC9005BC352 /* stream.h in Headers */ = {isa = PBXBuildFile; fileRef = EA809E9708F8D70D0072CDFB /* stream.h */; }; 30D15DB622CE6BC9005BC352 /* sa1.h in Headers */ = {isa = PBXBuildFile; fileRef = EAE061CC0526CCB900A80003 /* sa1.h */; }; @@ -421,7 +198,7 @@ /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ - 30D15CF422CE6B5A005BC352 /* PBXContainerItemProxy */ = { + 30714726230E379C00917F82 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 20286C28FDCF999611CA2CEA /* Project object */; proxyType = 1; @@ -430,20 +207,6 @@ }; /* End PBXContainerItemProxy section */ -/* Begin PBXCopyFilesBuildPhase section */ - 30D15CFB22CE6B5A005BC352 /* Embed Frameworks */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = ""; - dstSubfolderSpec = 10; - files = ( - 30D15CF722CE6B5A005BC352 /* snes9x_framework.framework in Embed Frameworks */, - ); - name = "Embed Frameworks"; - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXCopyFilesBuildPhase section */ - /* Begin PBXFileReference section */ 20286C33FDCF999611CA2CEA /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = /System/Library/Frameworks/Carbon.framework; sourceTree = ""; }; 302EEC9A22DAD0AB006D1502 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; }; @@ -454,6 +217,18 @@ 302EECA422DAD1B9006D1502 /* CoreAudio.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudio.framework; path = System/Library/Frameworks/CoreAudio.framework; sourceTree = SDKROOT; }; 3045A1EC22D03C430092B97D /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; }; 3045A1EE22D03C4B0092B97D /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; }; + 30714704230E372B00917F82 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 30714707230E372B00917F82 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = ""; }; + 30714709230E372B00917F82 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 3071470A230E372B00917F82 /* Snes9x.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Snes9x.entitlements; sourceTree = ""; }; + 30714715230E379500917F82 /* Snes9x.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Snes9x.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 30714717230E379500917F82 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; + 30714718230E379500917F82 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; + 3071471A230E379600917F82 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 3071471D230E379600917F82 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = ""; }; + 3071471F230E379600917F82 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 30714720230E379600917F82 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + 30714722230E379600917F82 /* Snes9x.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Snes9x.entitlements; sourceTree = ""; }; 307C860A22D22C87001B879E /* libz.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libz.tbd; path = usr/lib/libz.tbd; sourceTree = SDKROOT; }; 307C860D22D27C53001B879E /* tileimpl-n1x1.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = "tileimpl-n1x1.cpp"; sourceTree = ""; usesTabs = 1; }; 307C860E22D27C53001B879E /* tileimpl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tileimpl.h; sourceTree = ""; usesTabs = 1; }; @@ -465,8 +240,6 @@ 30AD1D1F22FBB2EA000EE989 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = ""; }; 30AD1D2022FBB2EA000EE989 /* en */ = {isa = PBXFileReference; lastKnownFileType = folder; name = en; path = "en.lproj/Snes9x Help"; sourceTree = ""; }; 30AD1D2122FBB2EA000EE989 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/Snes9x.xib; sourceTree = ""; }; - 30AD1D2222FBB2EA000EE989 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/musicbox.xib; sourceTree = ""; }; - 30CCAD412290472E00549AED /* Snes9x.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Snes9x.app; sourceTree = BUILT_PRODUCTS_DIR; }; 30CCAD422290472E00549AED /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = Info.plist; path = /Users/buckley/Projects/snes9x/macosx/Info.plist; sourceTree = ""; }; 30D15CEF22CE6B5A005BC352 /* snes9x_framework.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = snes9x_framework.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 30D15CF122CE6B5A005BC352 /* snes9x_framework.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = snes9x_framework.h; sourceTree = ""; }; @@ -702,24 +475,11 @@ /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ - 30CCAD2F2290472E00549AED /* Frameworks */ = { + 30714712230E379500917F82 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 30CCAD302290472E00549AED /* AGL.framework in Frameworks */, - 30CCAD312290472E00549AED /* AppKit.framework in Frameworks */, - 30CCAD322290472E00549AED /* AudioToolbox.framework in Frameworks */, - 30CCAD332290472E00549AED /* AudioUnit.framework in Frameworks */, - 30CCAD342290472E00549AED /* Carbon.framework in Frameworks */, - 30CCAD352290472E00549AED /* CoreAudio.framework in Frameworks */, - 30CCAD362290472E00549AED /* Foundation.framework in Frameworks */, - 30CCAD372290472E00549AED /* IOKit.framework in Frameworks */, - 30CCAD382290472E00549AED /* OpenGL.framework in Frameworks */, - 30D15CF622CE6B5A005BC352 /* snes9x_framework.framework in Frameworks */, - 30CCAD392290472E00549AED /* QuartzCore.framework in Frameworks */, - 30CCAD3A2290472E00549AED /* QuickTime.framework in Frameworks */, - 30CCAD3B2290472E00549AED /* libHIDUtilities_u.a in Frameworks */, - 30CCAD3C2290472E00549AED /* libz_u.a in Frameworks */, + 30714728230E37D500917F82 /* snes9x_framework.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -746,8 +506,8 @@ 195DF8C9FE9D4F0611CA2CBB /* Products */ = { isa = PBXGroup; children = ( - 30CCAD412290472E00549AED /* Snes9x.app */, 30D15CEF22CE6B5A005BC352 /* snes9x_framework.framework */, + 30714715230E379500917F82 /* Snes9x.app */, ); name = Products; sourceTree = ""; @@ -758,6 +518,8 @@ 20286C2AFDCF999611CA2CEA /* Sources */, 20286C32FDCF999611CA2CEA /* External Frameworks and Libraries */, 30D15CF022CE6B5A005BC352 /* snes9x framework */, + 30714701230E372A00917F82 /* Snes9x */, + 30714716230E379500917F82 /* Snes9x */, 195DF8C9FE9D4F0611CA2CBB /* Products */, 3045A1EB22D03C420092B97D /* Frameworks */, ); @@ -808,6 +570,31 @@ name = Frameworks; sourceTree = ""; }; + 30714701230E372A00917F82 /* Snes9x */ = { + isa = PBXGroup; + children = ( + 30714704230E372B00917F82 /* Assets.xcassets */, + 30714706230E372B00917F82 /* MainMenu.xib */, + 30714709230E372B00917F82 /* Info.plist */, + 3071470A230E372B00917F82 /* Snes9x.entitlements */, + ); + path = Snes9x; + sourceTree = ""; + }; + 30714716230E379500917F82 /* Snes9x */ = { + isa = PBXGroup; + children = ( + 30714717230E379500917F82 /* AppDelegate.h */, + 30714718230E379500917F82 /* AppDelegate.m */, + 3071471A230E379600917F82 /* Assets.xcassets */, + 3071471C230E379600917F82 /* MainMenu.xib */, + 3071471F230E379600917F82 /* Info.plist */, + 30714720230E379600917F82 /* main.m */, + 30714722230E379600917F82 /* Snes9x.entitlements */, + ); + path = Snes9x; + sourceTree = ""; + }; 30D15CF022CE6B5A005BC352 /* snes9x framework */ = { isa = PBXGroup; children = ( @@ -1116,7 +903,6 @@ EA3BEA9E0A28384E00A8FAE5 /* InfoPlist.strings */, EA3BEA980A28384E00A8FAE5 /* Localizable.strings */, CF14733C132DA4E1000D0F91 /* Snes9x.xib */, - CF46BEA8133E2559005A17A5 /* musicbox.xib */, EA3BEAA80A28386500A8FAE5 /* Snes9x Help */, EA3D2F580A26085800BDACCC /* libHIDUtilities_u.a */, CF3E42491372D48F0077DE32 /* libz_u.a */, @@ -1128,125 +914,13 @@ /* End PBXGroup section */ /* Begin PBXHeadersBuildPhase section */ - 30CCAC522290472E00549AED /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 30CCAC532290472E00549AED /* 65c816.h in Headers */, - 30CCAC542290472E00549AED /* bsx.h in Headers */, - 30CCAC552290472E00549AED /* blargg_source.h in Headers */, - 30CCAC562290472E00549AED /* c4.h in Headers */, - 30CCAC572290472E00549AED /* sdsp.hpp in Headers */, - 30CCAC582290472E00549AED /* cheats.h in Headers */, - 30CCAC592290472E00549AED /* controls.h in Headers */, - 30CCAC5A2290472E00549AED /* cpuaddr.h in Headers */, - 30CCAC5B2290472E00549AED /* cpuexec.h in Headers */, - 30CCAC5C2290472E00549AED /* cpumacro.h in Headers */, - 30CCAC5D2290472E00549AED /* SPC_DSP.h in Headers */, - 30CCAC5E2290472E00549AED /* cpuops.h in Headers */, - 30CCAC5F2290472E00549AED /* crosshairs.h in Headers */, - 30CCAC602290472E00549AED /* debug.h in Headers */, - 30CCAC612290472E00549AED /* display.h in Headers */, - 30CCAC622290472E00549AED /* snes.hpp in Headers */, - 30CCAC632290472E00549AED /* dma.h in Headers */, - 30CCAC642290472E00549AED /* dsp.h in Headers */, - 30CCAC652290472E00549AED /* font.h in Headers */, - 30CCAC662290472E00549AED /* fxemu.h in Headers */, - 30CCAC672290472E00549AED /* fxinst.h in Headers */, - 30CCAC682290472E00549AED /* getset.h in Headers */, - 30CCAC692290472E00549AED /* blargg_endian.h in Headers */, - 30CCAC6A2290472E00549AED /* gfx.h in Headers */, - 30CCAC6B2290472E00549AED /* language.h in Headers */, - 30CCAC6C2290472E00549AED /* logger.h in Headers */, - 30CCAC6D2290472E00549AED /* memmap.h in Headers */, - 30CCAC6E2290472E00549AED /* messages.h in Headers */, - 30CCAC6F2290472E00549AED /* missing.h in Headers */, - 30CCAC702290472E00549AED /* movie.h in Headers */, - 30CCAC712290472E00549AED /* obc1.h in Headers */, - 307C861322D27C53001B879E /* tileimpl.h in Headers */, - 30CCAC722290472E00549AED /* pixform.h in Headers */, - 30CCAC732290472E00549AED /* port.h in Headers */, - 30CCAC742290472E00549AED /* ppu.h in Headers */, - 30CCAC752290472E00549AED /* stream.h in Headers */, - 30CCAC762290472E00549AED /* sa1.h in Headers */, - 30CCAC772290472E00549AED /* sar.h in Headers */, - 30CCAC782290472E00549AED /* screenshot.h in Headers */, - 30CCAC792290472E00549AED /* sdd1.h in Headers */, - 30CCAC7A2290472E00549AED /* sdd1emu.h in Headers */, - 30CCAC7B2290472E00549AED /* seta.h in Headers */, - 30CCAC7C2290472E00549AED /* snapshot.h in Headers */, - 30CCAC7D2290472E00549AED /* snes9x.h in Headers */, - 30CCAC7E2290472E00549AED /* spc7110.h in Headers */, - 30CCAC7F2290472E00549AED /* srtc.h in Headers */, - 30CCAC802290472E00549AED /* tile.h in Headers */, - 30CCAC812290472E00549AED /* 2xsai.h in Headers */, - 30CCAC822290472E00549AED /* blit.h in Headers */, - 30CCAC832290472E00549AED /* epx.h in Headers */, - 30CCAC842290472E00549AED /* hq2x.h in Headers */, - 30CCAC852290472E00549AED /* snes_ntsc.h in Headers */, - 30CCAC862290472E00549AED /* snes_ntsc_config.h in Headers */, - 30CCAC872290472E00549AED /* snes_ntsc_impl.h in Headers */, - 30CCAC882290472E00549AED /* crypt.h in Headers */, - 30CCAC892290472E00549AED /* ioapi.h in Headers */, - 30CCAC8A2290472E00549AED /* unzip.h in Headers */, - 30CCAC8B2290472E00549AED /* 7z.h in Headers */, - 30CCAC8C2290472E00549AED /* aribitcd.h in Headers */, - 30CCAC8D2290472E00549AED /* ariconst.h in Headers */, - 30CCAC8E2290472E00549AED /* ariprice.h in Headers */, - 30CCAC8F2290472E00549AED /* btreecd.h in Headers */, - 30CCAC902290472E00549AED /* crc32.h in Headers */, - 30CCAC912290472E00549AED /* blargg_config.h in Headers */, - 30CCAC922290472E00549AED /* iiostrm.h in Headers */, - 30CCAC932290472E00549AED /* blargg_common.h in Headers */, - 30CCAC942290472E00549AED /* inbyte.h in Headers */, - 30CCAC952290472E00549AED /* jma.h in Headers */, - 30CCAC962290472E00549AED /* lencoder.h in Headers */, - 30CCAC972290472E00549AED /* litcoder.h in Headers */, - 30CCAC982290472E00549AED /* resampler.h in Headers */, - 30CCAC992290472E00549AED /* lzma.h in Headers */, - 30CCAC9A2290472E00549AED /* smp.hpp in Headers */, - 30CCAC9B2290472E00549AED /* lzmadec.h in Headers */, - 30CCAC9C2290472E00549AED /* portable.h in Headers */, - 30CCAC9D2290472E00549AED /* rcdefs.h in Headers */, - 30CCAC9E2290472E00549AED /* rngcoder.h in Headers */, - 30CCAC9F2290472E00549AED /* s9x-jma.h in Headers */, - 30CCACA02290472E00549AED /* winout.h in Headers */, - 30CCACA12290472E00549AED /* mac-appleevent.h in Headers */, - 30CCACA22290472E00549AED /* mac-audio.h in Headers */, - 30CCACA32290472E00549AED /* mac-cart.h in Headers */, - 30CCACA42290472E00549AED /* mac-cheat.h in Headers */, - 30CCACA52290472E00549AED /* mac-cheatfinder.h in Headers */, - 30CCACA72290472E00549AED /* mac-cocoatools.h in Headers */, - 30CCACA82290472E00549AED /* mac-controls.h in Headers */, - 30CCACA92290472E00549AED /* mac-coreimage.h in Headers */, - 30CCACAB2290472E00549AED /* mac-file.h in Headers */, - 30CCACAC2290472E00549AED /* mac-gworld.h in Headers */, - 30CCACAD2290472E00549AED /* mac-joypad.h in Headers */, - 30CCACAE2290472E00549AED /* mac-keyboard.h in Headers */, - 30CCACAF2290472E00549AED /* apu.h in Headers */, - 30CCACB02290472E00549AED /* mac-multicart.h in Headers */, - 30CCACB12290472E00549AED /* mac-musicbox.h in Headers */, - 30CCACB22290472E00549AED /* mac-netplay.h in Headers */, - 30CCACB32290472E00549AED /* mac-os.h in Headers */, - 30CCACB42290472E00549AED /* mac-prefs.h in Headers */, - 30CCACB62290472E00549AED /* mac-render.h in Headers */, - 30CCACB72290472E00549AED /* msu1.h in Headers */, - 30CCACB82290472E00549AED /* mac-screenshot.h in Headers */, - 30CCACBA2290472E00549AED /* mac-snes9x.h in Headers */, - 30CCACBB2290472E00549AED /* mac-stringtools.h in Headers */, - 30CCACBC2290472E00549AED /* mac-prefix.h in Headers */, - 30CCACBD2290472E00549AED /* mac-global_prefix.h in Headers */, - 30CCACBE2290472E00549AED /* HID_Utilities_External.h in Headers */, - 30CCACBF2290472E00549AED /* zconf.h in Headers */, - 30CCACC02290472E00549AED /* zlib.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; 30D15CEA22CE6B5A005BC352 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( + 30D15DB322CE6BC9005BC352 /* port.h in Headers */, 30D15CF322CE6B5A005BC352 /* snes9x_framework.h in Headers */, + 30714729230E387700917F82 /* mac-os.h in Headers */, 30D15D9522CE6BC9005BC352 /* sha256.h in Headers */, 30D15D9622CE6BC9005BC352 /* bml.h in Headers */, 30D15D9722CE6BC9005BC352 /* 65c816.h in Headers */, @@ -1278,7 +952,6 @@ 30D15DB022CE6BC9005BC352 /* msu1.h in Headers */, 30D15DB122CE6BC9005BC352 /* obc1.h in Headers */, 30D15DB222CE6BC9005BC352 /* pixform.h in Headers */, - 30D15DB322CE6BC9005BC352 /* port.h in Headers */, 30D15DB422CE6BC9005BC352 /* ppu.h in Headers */, 30D15DB522CE6BC9005BC352 /* stream.h in Headers */, 30D15DB622CE6BC9005BC352 /* sa1.h in Headers */, @@ -1336,25 +1009,22 @@ /* End PBXHeadersBuildPhase section */ /* Begin PBXNativeTarget section */ - 30CCAC512290472E00549AED /* Snes9x */ = { + 30714714230E379500917F82 /* Snes9x */ = { isa = PBXNativeTarget; - buildConfigurationList = 30CCAD3E2290472E00549AED /* Build configuration list for PBXNativeTarget "Snes9x" */; + buildConfigurationList = 30714723230E379600917F82 /* Build configuration list for PBXNativeTarget "Snes9x" */; buildPhases = ( - 30CCAC522290472E00549AED /* Headers */, - 30CCACC12290472E00549AED /* Resources */, - 30CCACD72290472E00549AED /* Sources */, - 30CCAD2F2290472E00549AED /* Frameworks */, - 30CCAD3D2290472E00549AED /* Rez */, - 30D15CFB22CE6B5A005BC352 /* Embed Frameworks */, + 30714711230E379500917F82 /* Sources */, + 30714712230E379500917F82 /* Frameworks */, + 30714713230E379500917F82 /* Resources */, ); buildRules = ( ); dependencies = ( - 30D15CF522CE6B5A005BC352 /* PBXTargetDependency */, + 30714727230E379C00917F82 /* PBXTargetDependency */, ); name = Snes9x; - productName = "¬´PROJECTNAME¬ª"; - productReference = 30CCAD412290472E00549AED /* Snes9x.app */; + productName = Snes9x; + productReference = 30714715230E379500917F82 /* Snes9x.app */; productType = "com.apple.product-type.application"; }; 30D15CEE22CE6B5A005BC352 /* snes9x framework */ = { @@ -1381,8 +1051,17 @@ 20286C28FDCF999611CA2CEA /* Project object */ = { isa = PBXProject; attributes = { + LastSwiftUpdateCheck = 1030; LastUpgradeCheck = 1020; TargetAttributes = { + 30714714230E379500917F82 = { + CreatedOnToolsVersion = 10.3; + SystemCapabilities = { + com.apple.Sandbox = { + enabled = 0; + }; + }; + }; 30D15CEE22CE6B5A005BC352 = { CreatedOnToolsVersion = 10.2.1; }; @@ -1397,43 +1076,25 @@ de, ja, en, + Base, ); mainGroup = 20286C29FDCF999611CA2CEA /* Snes9x CVS */; projectDirPath = ""; projectRoot = ..; targets = ( - 30CCAC512290472E00549AED /* Snes9x */, 30D15CEE22CE6B5A005BC352 /* snes9x framework */, + 30714714230E379500917F82 /* Snes9x */, ); }; /* End PBXProject section */ /* Begin PBXResourcesBuildPhase section */ - 30CCACC12290472E00549AED /* Resources */ = { + 30714713230E379500917F82 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - 30CCACC22290472E00549AED /* APPL.icns in Resources */, - 30CCACC32290472E00549AED /* CART.icns in Resources */, - 30CCACC42290472E00549AED /* SRAM.icns in Resources */, - 30CCACC52290472E00549AED /* SAVE.icns in Resources */, - 30CCACC62290472E00549AED /* folder_SRAMs.icns in Resources */, - 30CCACC72290472E00549AED /* folder_Freezes.icns in Resources */, - 30CCACC82290472E00549AED /* icons.png in Resources */, - 30CCACC92290472E00549AED /* logo_freeze.png in Resources */, - 30CCACCA2290472E00549AED /* logo_defrost.png in Resources */, - 30CCACCB2290472E00549AED /* musicbox_indicator.png in Resources */, - 30CCACCC2290472E00549AED /* musicbox_pause.png in Resources */, - 30CCACCD2290472E00549AED /* musicbox_rewind.png in Resources */, - 30CCACCE2290472E00549AED /* musicbox_effect.png in Resources */, - 30CCACCF2290472E00549AED /* musicbox_ledon.icns in Resources */, - 30CCACD02290472E00549AED /* musicbox_ledoff.icns in Resources */, - 30CCACD12290472E00549AED /* freeze_defrost.aiff in Resources */, - 30CCACD22290472E00549AED /* InfoPlist.strings in Resources */, - 30CCACD32290472E00549AED /* Localizable.strings in Resources */, - 30CCACD42290472E00549AED /* Snes9x.xib in Resources */, - 30CCACD52290472E00549AED /* musicbox.xib in Resources */, - 30CCACD62290472E00549AED /* Snes9x Help in Resources */, + 3071471B230E379600917F82 /* Assets.xcassets in Resources */, + 3071471E230E379600917F82 /* MainMenu.xib in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1446,107 +1107,13 @@ }; /* End PBXResourcesBuildPhase section */ -/* Begin PBXRezBuildPhase section */ - 30CCAD3D2290472E00549AED /* Rez */ = { - isa = PBXRezBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXRezBuildPhase section */ - /* Begin PBXSourcesBuildPhase section */ - 30CCACD72290472E00549AED /* Sources */ = { + 30714711230E379500917F82 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 30CCACD82290472E00549AED /* bsx.cpp in Sources */, - 30CCACD92290472E00549AED /* c4.cpp in Sources */, - 30CCACDA2290472E00549AED /* c4emu.cpp in Sources */, - 30CCACDB2290472E00549AED /* cheats.cpp in Sources */, - 307C861722D27C53001B879E /* tileimpl-h2x1.cpp in Sources */, - 30CCACDC2290472E00549AED /* cheats2.cpp in Sources */, - 30CCACDD2290472E00549AED /* clip.cpp in Sources */, - 30CCACDE2290472E00549AED /* apu.cpp in Sources */, - 30CCACDF2290472E00549AED /* controls.cpp in Sources */, - 30CCACE02290472E00549AED /* cpu.cpp in Sources */, - 30CCACE12290472E00549AED /* cpuexec.cpp in Sources */, - 30CCACE22290472E00549AED /* cpuops.cpp in Sources */, - 30CCACE32290472E00549AED /* crosshairs.cpp in Sources */, - 30CCACE42290472E00549AED /* debug.cpp in Sources */, - 30CCACE52290472E00549AED /* dma.cpp in Sources */, - 30CCACE62290472E00549AED /* dsp.cpp in Sources */, - 30CCACE72290472E00549AED /* dsp1.cpp in Sources */, - 30CCACE82290472E00549AED /* dsp2.cpp in Sources */, - 30CCACE92290472E00549AED /* dsp3.cpp in Sources */, - 30CCACEA2290472E00549AED /* dsp4.cpp in Sources */, - 30CCACEB2290472E00549AED /* fxemu.cpp in Sources */, - 30CCACEC2290472E00549AED /* fxinst.cpp in Sources */, - 30CCACED2290472E00549AED /* gfx.cpp in Sources */, - 30CCACEE2290472E00549AED /* globals.cpp in Sources */, - 30CCACEF2290472E00549AED /* loadzip.cpp in Sources */, - 30CCACF02290472E00549AED /* logger.cpp in Sources */, - 30CCACF12290472E00549AED /* memmap.cpp in Sources */, - 30CCACF22290472E00549AED /* movie.cpp in Sources */, - 30CCACF32290472E00549AED /* obc1.cpp in Sources */, - 30CCACF42290472E00549AED /* ppu.cpp in Sources */, - 30CCACF52290472E00549AED /* stream.cpp in Sources */, - 30CCACF62290472E00549AED /* sa1.cpp in Sources */, - 30CCACF72290472E00549AED /* sa1cpu.cpp in Sources */, - 30CCACF82290472E00549AED /* sdd1.cpp in Sources */, - 30CCACF92290472E00549AED /* sdd1emu.cpp in Sources */, - 30CCACFA2290472E00549AED /* msu1.cpp in Sources */, - 30CCACFB2290472E00549AED /* seta.cpp in Sources */, - 30CCACFC2290472E00549AED /* seta010.cpp in Sources */, - 30CCACFD2290472E00549AED /* seta011.cpp in Sources */, - 30CCACFE2290472E00549AED /* seta018.cpp in Sources */, - 30CCACFF2290472E00549AED /* snapshot.cpp in Sources */, - 30CCAD002290472E00549AED /* spc7110.cpp in Sources */, - 30CCAD012290472E00549AED /* srtc.cpp in Sources */, - 30CCAD022290472E00549AED /* tile.cpp in Sources */, - 30CCAD032290472E00549AED /* 2xsai.cpp in Sources */, - 30CCAD042290472E00549AED /* blit.cpp in Sources */, - 30CCAD052290472E00549AED /* epx.cpp in Sources */, - 30CCAD062290472E00549AED /* hq2x.cpp in Sources */, - 30CCAD072290472E00549AED /* snes_ntsc.c in Sources */, - 30CCAD082290472E00549AED /* ioapi.c in Sources */, - 30CCAD092290472E00549AED /* unzip.c in Sources */, - 30CCAD0A2290472E00549AED /* 7zlzma.cpp in Sources */, - 30CCAD0B2290472E00549AED /* crc32.cpp in Sources */, - 30CCAD0C2290472E00549AED /* iiostrm.cpp in Sources */, - 30CCAD0D2290472E00549AED /* inbyte.cpp in Sources */, - 30CCAD0E2290472E00549AED /* jma.cpp in Sources */, - 30CCAD0F2290472E00549AED /* lzma.cpp in Sources */, - 30CCAD102290472E00549AED /* lzmadec.cpp in Sources */, - 30CCAD112290472E00549AED /* s9x-jma.cpp in Sources */, - 30CCAD122290472E00549AED /* winout.cpp in Sources */, - 30CCAD132290472E00549AED /* mac-appleevent.mm in Sources */, - 30CCAD142290472E00549AED /* mac-audio.mm in Sources */, - 30CCAD152290472E00549AED /* mac-cart.mm in Sources */, - 30CCAD162290472E00549AED /* mac-cheat.mm in Sources */, - 30CCAD172290472E00549AED /* smp.cpp in Sources */, - 30CCAD182290472E00549AED /* mac-cheatfinder.mm in Sources */, - 30CCAD1A2290472E00549AED /* mac-cocoatools.mm in Sources */, - 30CCAD1B2290472E00549AED /* mac-controls.mm in Sources */, - 30CCAD1C2290472E00549AED /* mac-coreimage.mm in Sources */, - 30CCAD1D2290472E00549AED /* smp_state.cpp in Sources */, - 30CCAD1E2290472E00549AED /* sdsp.cpp in Sources */, - 30CCAD202290472E00549AED /* mac-file.mm in Sources */, - 30CCAD212290472E00549AED /* mac-gworld.mm in Sources */, - 30CCAD222290472E00549AED /* mac-joypad.mm in Sources */, - 30CCAD232290472E00549AED /* mac-keyboard.mm in Sources */, - 30CCAD242290472E00549AED /* mac-multicart.mm in Sources */, - 30CCAD252290472E00549AED /* mac-musicbox.mm in Sources */, - 30CCAD262290472E00549AED /* mac-netplay.mm in Sources */, - 30CCAD272290472E00549AED /* mac-os.mm in Sources */, - 307C861522D27C53001B879E /* tileimpl-n2x1.cpp in Sources */, - 30CCAD282290472E00549AED /* mac-prefs.mm in Sources */, - 30CCAD2A2290472E00549AED /* mac-render.mm in Sources */, - 30CCAD2B2290472E00549AED /* mac-screenshot.mm in Sources */, - 30CCAD2D2290472E00549AED /* mac-snes9x.mm in Sources */, - 30CCAD2E2290472E00549AED /* mac-stringtools.mm in Sources */, - 307C861122D27C53001B879E /* tileimpl-n1x1.cpp in Sources */, + 30714721230E379600917F82 /* main.m in Sources */, + 30714719230E379500917F82 /* AppDelegate.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1648,14 +1215,30 @@ /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ - 30D15CF522CE6B5A005BC352 /* PBXTargetDependency */ = { + 30714727230E379C00917F82 /* PBXTargetDependency */ = { isa = PBXTargetDependency; target = 30D15CEE22CE6B5A005BC352 /* snes9x framework */; - targetProxy = 30D15CF422CE6B5A005BC352 /* PBXContainerItemProxy */; + targetProxy = 30714726230E379C00917F82 /* PBXContainerItemProxy */; }; /* End PBXTargetDependency section */ /* Begin PBXVariantGroup section */ + 30714706230E372B00917F82 /* MainMenu.xib */ = { + isa = PBXVariantGroup; + children = ( + 30714707230E372B00917F82 /* Base */, + ); + name = MainMenu.xib; + sourceTree = ""; + }; + 3071471C230E379600917F82 /* MainMenu.xib */ = { + isa = PBXVariantGroup; + children = ( + 3071471D230E379600917F82 /* Base */, + ); + name = MainMenu.xib; + sourceTree = ""; + }; CF14733C132DA4E1000D0F91 /* Snes9x.xib */ = { isa = PBXVariantGroup; children = ( @@ -1664,14 +1247,6 @@ name = Snes9x.xib; sourceTree = ""; }; - CF46BEA8133E2559005A17A5 /* musicbox.xib */ = { - isa = PBXVariantGroup; - children = ( - 30AD1D2222FBB2EA000EE989 /* en */, - ); - name = musicbox.xib; - sourceTree = ""; - }; EA3BEA980A28384E00A8FAE5 /* Localizable.strings */ = { isa = PBXVariantGroup; children = ( @@ -1699,103 +1274,84 @@ /* End PBXVariantGroup section */ /* Begin XCBuildConfiguration section */ - 30CCAD3F2290472E00549AED /* Release */ = { + 30714724230E379600917F82 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CODE_SIGN_IDENTITY = "-"; - DEAD_CODE_STRIPPING = YES; - GCC_ENABLE_CPP_EXCEPTIONS = NO; - GCC_ENABLE_CPP_RTTI = NO; - GCC_GENERATE_DEBUGGING_SYMBOLS = NO; - GCC_MODEL_TUNING = ""; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 3; - GCC_PREFIX_HEADER = "mac-global_prefix.h"; - GCC_PREPROCESSOR_DEFINITIONS = ""; - GCC_STRICT_ALIASING = YES; - GCC_UNROLL_LOOPS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES; - GCC_WARN_ABOUT_MISSING_NEWLINE = YES; - GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; - GCC_WARN_HIDDEN_VIRTUAL_FUNCTIONS = YES; - GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES; - GCC_WARN_MISSING_PARENTHESES = YES; - GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES; - GCC_WARN_SIGN_COMPARE = YES; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES; - GCC_WARN_UNKNOWN_PRAGMAS = YES; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_LABEL = YES; - GCC_WARN_UNUSED_VALUE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - INFOPLIST_FILE = Info.plist; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + INFOPLIST_FILE = Snes9x/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; - LIBRARY_SEARCH_PATHS = ( - ., - "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_1)", - ); - LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_1 = "\"$(SRCROOT)\""; - MACOSX_DEPLOYMENT_TARGET = 10.11; - OTHER_CFLAGS = ( - "-fomit-frame-pointer", - "-fast", - ); + MACOSX_DEPLOYMENT_TARGET = 10.14; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = com.snes9x.macos.snes9x; PRODUCT_NAME = "$(TARGET_NAME)"; - WARNING_CFLAGS = "-Wfloat-equal"; + SDKROOT = macosx; + VALID_ARCHS = x86_64; }; name = Release; }; - 30CCAD402290472E00549AED /* Debug */ = { + 30714725230E379600917F82 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CODE_SIGN_IDENTITY = "-"; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; COPY_PHASE_STRIP = NO; - DEAD_CODE_STRIPPING = YES; - GCC_ENABLE_CPP_EXCEPTIONS = NO; - GCC_ENABLE_CPP_RTTI = NO; - GCC_MODEL_TUNING = ""; - GCC_NO_COMMON_BLOCKS = YES; + DEBUG_INFORMATION_FORMAT = dwarf; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREFIX_HEADER = "mac-global_prefix.h"; - GCC_PREPROCESSOR_DEFINITIONS = ""; - GCC_STRICT_ALIASING = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES; - GCC_WARN_ABOUT_MISSING_NEWLINE = YES; - GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; - GCC_WARN_HIDDEN_VIRTUAL_FUNCTIONS = YES; - GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES; - GCC_WARN_MISSING_PARENTHESES = YES; - GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES; - GCC_WARN_SIGN_COMPARE = YES; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNKNOWN_PRAGMAS = YES; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_LABEL = YES; - GCC_WARN_UNUSED_VALUE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - INFOPLIST_FILE = Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; - LIBRARY_SEARCH_PATHS = ( - ., - "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_1)", + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", ); - LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_1 = "\"$(SRCROOT)\""; - MACOSX_DEPLOYMENT_TARGET = 10.11; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + INFOPLIST_FILE = Snes9x/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; + MACOSX_DEPLOYMENT_TARGET = 10.14; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = com.snes9x.macos.snes9x; PRODUCT_NAME = "$(TARGET_NAME)"; - WARNING_CFLAGS = "-Wfloat-equal"; + SDKROOT = macosx; + VALID_ARCHS = x86_64; }; name = Debug; }; @@ -1803,6 +1359,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; @@ -1827,6 +1384,8 @@ ENABLE_NS_ASSERTIONS = NO; FRAMEWORK_VERSION = A; GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "mac-global_prefix.h"; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; INFOPLIST_FILE = "snes9x framework/Info.plist"; @@ -1839,6 +1398,7 @@ MACOSX_DEPLOYMENT_TARGET = 10.14; MTL_ENABLE_DEBUG_INFO = NO; MTL_FAST_MATH = YES; + OTHER_CFLAGS = "-DGL_SILENCE_DEPRECATION"; PRODUCT_BUNDLE_IDENTIFIER = "com.snes9x.macos.snes9x-framework"; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; SDKROOT = macosx; @@ -1852,6 +1412,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; @@ -1877,6 +1438,8 @@ GCC_C_LANGUAGE_STANDARD = gnu11; GCC_DYNAMIC_NO_PIC = NO; GCC_OPTIMIZATION_LEVEL = 0; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "mac-global_prefix.h"; GCC_PREPROCESSOR_DEFINITIONS = ( "DEBUG=1", "$(inherited)", @@ -1893,6 +1456,7 @@ MACOSX_DEPLOYMENT_TARGET = 10.14; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; + OTHER_CFLAGS = "-DGL_SILENCE_DEPRECATION"; PRODUCT_BUNDLE_IDENTIFIER = "com.snes9x.macos.snes9x-framework"; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; SDKROOT = macosx; @@ -1973,11 +1537,11 @@ /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ - 30CCAD3E2290472E00549AED /* Build configuration list for PBXNativeTarget "Snes9x" */ = { + 30714723230E379600917F82 /* Build configuration list for PBXNativeTarget "Snes9x" */ = { isa = XCConfigurationList; buildConfigurations = ( - 30CCAD3F2290472E00549AED /* Release */, - 30CCAD402290472E00549AED /* Debug */, + 30714724230E379600917F82 /* Release */, + 30714725230E379600917F82 /* Debug */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; diff --git a/macosx/snes9x.xcodeproj/project.xcworkspace/xcuserdata/buckley.xcuserdatad/UserInterfaceState.xcuserstate b/macosx/snes9x.xcodeproj/project.xcworkspace/xcuserdata/buckley.xcuserdatad/UserInterfaceState.xcuserstate deleted file mode 100644 index 0d623c3d..00000000 Binary files a/macosx/snes9x.xcodeproj/project.xcworkspace/xcuserdata/buckley.xcuserdatad/UserInterfaceState.xcuserstate and /dev/null differ