diff --git a/Apple2Mac/Apple2Mac.xcodeproj/project.pbxproj b/Apple2Mac/Apple2Mac.xcodeproj/project.pbxproj index 52ad41b8..83dc4ea8 100644 --- a/Apple2Mac/Apple2Mac.xcodeproj/project.pbxproj +++ b/Apple2Mac/Apple2Mac.xcodeproj/project.pbxproj @@ -122,6 +122,8 @@ 4AFC17161AAE9CC000B215FA /* testvm1.nib.gz in Resources */ = {isa = PBXBuildFile; fileRef = 4AFC17101AAE9CC000B215FA /* testvm1.nib.gz */; }; 4AFC17171AAE9CC000B215FA /* testvm1.nib.gz in Resources */ = {isa = PBXBuildFile; fileRef = 4AFC17101AAE9CC000B215FA /* testvm1.nib.gz */; }; 4AFC17181AAE9CC000B215FA /* testvm1.nib.gz in Resources */ = {isa = PBXBuildFile; fileRef = 4AFC17101AAE9CC000B215FA /* testvm1.nib.gz */; }; + 4E1733E31C2C5F7600CDF9DF /* iosPrefControllerViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4E4E62A01C2C5B56002E324F /* iosPrefControllerViewController.m */; }; + 4E1733E41C2C5F7A00CDF9DF /* AppleViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4E1733DD1C2C5E5D00CDF9DF /* AppleViewController.m */; }; 773B3D101956885A0085CE5F /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 773B3D0F1956885A0085CE5F /* Cocoa.framework */; }; 773B3D1A1956885A0085CE5F /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 773B3D181956885A0085CE5F /* InfoPlist.strings */; }; 773B3D201956885A0085CE5F /* Credits.rtf in Resources */ = {isa = PBXBuildFile; fileRef = 773B3D1E1956885A0085CE5F /* Credits.rtf */; }; @@ -372,7 +374,10 @@ 4AFC17091AAE9C3200B215FA /* sha1.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = sha1.c; sourceTree = ""; }; 4AFC170F1AAE9CC000B215FA /* testdisplay1.nib.gz */ = {isa = PBXFileReference; lastKnownFileType = archive.gzip; path = testdisplay1.nib.gz; sourceTree = ""; }; 4AFC17101AAE9CC000B215FA /* testvm1.nib.gz */ = {isa = PBXFileReference; lastKnownFileType = archive.gzip; path = testvm1.nib.gz; sourceTree = ""; }; + 4E1733DC1C2C5E5D00CDF9DF /* AppleViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppleViewController.h; sourceTree = ""; }; + 4E1733DD1C2C5E5D00CDF9DF /* AppleViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppleViewController.m; sourceTree = ""; }; 4E1ACFE61C2B0F3600C755BB /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Main.strings; sourceTree = ""; }; + 4E1ACFE71C2B12F900C755BB /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = ""; }; 4E4585F91C29F2B9003E74A1 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/MainMenu.xib; sourceTree = ""; }; 4E4585FF1C29F393003E74A1 /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = "fr.lproj/MainMenu-Test.strings"; sourceTree = ""; }; 4E4586001C29F399003E74A1 /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; name = fr; path = fr.lproj/Credits.rtf; sourceTree = ""; }; @@ -382,6 +387,8 @@ 4E4586041C29F399003E74A1 /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/Main.strings; sourceTree = ""; }; 4E4586051C29F399003E74A1 /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/InfoPlist.strings; sourceTree = ""; }; 4E4586061C29F39A003E74A1 /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/Apple2iOS.strings; sourceTree = ""; }; + 4E4E629F1C2C5B56002E324F /* iosPrefControllerViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = iosPrefControllerViewController.h; sourceTree = ""; }; + 4E4E62A01C2C5B56002E324F /* iosPrefControllerViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = iosPrefControllerViewController.m; sourceTree = ""; }; 773B3D0C1956885A0085CE5F /* Apple2Mac.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Apple2Mac.app; sourceTree = BUILT_PRODUCTS_DIR; }; 773B3D0F1956885A0085CE5F /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; }; 773B3D121956885A0085CE5F /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; }; @@ -878,6 +885,10 @@ 93206C841C156BD300668153 /* A2IXPopupChoreographer.m */, 935C55491C12BE510013166D /* EAGLView.h */, 935C554A1C12BE510013166D /* EAGLView.m */, + 4E4E629F1C2C5B56002E324F /* iosPrefControllerViewController.h */, + 4E4E62A01C2C5B56002E324F /* iosPrefControllerViewController.m */, + 4E1733DC1C2C5E5D00CDF9DF /* AppleViewController.h */, + 4E1733DD1C2C5E5D00CDF9DF /* AppleViewController.m */, ); name = iOS; sourceTree = ""; @@ -1647,6 +1658,7 @@ 935C55541C136DF40013166D /* playqueue.c in Sources */, 935C558E1C1370800013166D /* gltouchmenu.c in Sources */, 935C55571C136DF40013166D /* speaker.c in Sources */, + 4E1733E41C2C5F7A00CDF9DF /* AppleViewController.m in Sources */, 935C55581C136DF40013166D /* cpu-supp.c in Sources */, 935C55591C136DF40013166D /* darwin-shim.c in Sources */, 935C55601C136E070013166D /* debugger.c in Sources */, @@ -1655,6 +1667,7 @@ 935C555C1C136DF40013166D /* font.c in Sources */, 935C555D1C136DF40013166D /* interface.c in Sources */, 935C555E1C136DF40013166D /* joystick.c in Sources */, + 4E1733E31C2C5F7600CDF9DF /* iosPrefControllerViewController.m in Sources */, 935C55A11C13887E0013166D /* sha1.c in Sources */, 935C555F1C136DF40013166D /* keys.c in Sources */, 935C554D1C12BE510013166D /* AppDelegate.m in Sources */, @@ -1706,6 +1719,7 @@ children = ( 4E4585F91C29F2B9003E74A1 /* en */, 4E4586021C29F399003E74A1 /* fr */, + 4E1ACFE71C2B12F900C755BB /* Base */, ); name = MainMenu.xib; sourceTree = ""; diff --git a/Apple2Mac/Apple2Mac/AppleViewController.h b/Apple2Mac/Apple2Mac/AppleViewController.h new file mode 100644 index 00000000..3b84985a --- /dev/null +++ b/Apple2Mac/Apple2Mac/AppleViewController.h @@ -0,0 +1,15 @@ +// +// AppleViewController.h +// Apple2Mac +// +// Created by Jerome Vernet on 24/12/2015. +// Copyright © 2015 deadc0de.org. All rights reserved. +// + +#import + +@interface AppleViewController : UIViewController +-(IBAction)rebootItem:(id)sender; +-(IBAction)prefsItem:(id)sender; + +@end diff --git a/Apple2Mac/Apple2Mac/AppleViewController.m b/Apple2Mac/Apple2Mac/AppleViewController.m new file mode 100644 index 00000000..4339864b --- /dev/null +++ b/Apple2Mac/Apple2Mac/AppleViewController.m @@ -0,0 +1,57 @@ +// +// AppleViewController.m +// Apple2Mac +// +// Created by Jerome Vernet on 24/12/2015. +// Copyright © 2015 deadc0de.org. All rights reserved. +// + +#import "AppleViewController.h" +#import "common.h" +#import "modelUtil.h" + +@interface AppleViewController () + +@end + +@implementation AppleViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + // Do any additional setup after loading the view. +} + +- (void)didReceiveMemoryWarning { + [super didReceiveMemoryWarning]; + // Dispose of any resources that can be recreated. +} + +/* +#pragma mark - Navigation + +// In a storyboard-based application, you will often want to do a little preparation before navigation +- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { + // Get the new view controller using [segue destinationViewController]. + // Pass the selected object to the new view controller. +} +*/ +-(IBAction)rebootItem:(id)sender{ + cpu65_reboot(); +} + +-(IBAction)prefsItem:(id)sender{ + //pause + //show pref windows +} + +- (IBAction)toggleCPUSpeedItem:(id)sender +{ + cpu_pause(); + timing_toggleCPUSpeed(); + if (video_backend && video_backend->animation_showCPUSpeed) + { + video_backend->animation_showCPUSpeed(); + } + cpu_resume(); +} +@end diff --git a/Apple2Mac/Apple2Mac/Base.lproj/MainMenu.xib b/Apple2Mac/Apple2Mac/Base.lproj/MainMenu.xib new file mode 100644 index 00000000..a9ce772c --- /dev/null +++ b/Apple2Mac/Apple2Mac/Base.lproj/MainMenu.xib @@ -0,0 +1,1033 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +CA + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + "Clamp Beyond Radius" setting is recommended for gamepad devices (not traditional joysticks) which cannot generate values in the extreme corners. + + + + Clamp Beyond Radius setting is recommended for gamepad devices (not traditional joysticks) which cannot generate values in the extreme corners. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Apple2Mac/Apple2Mac/iosPrefControllerViewController.h b/Apple2Mac/Apple2Mac/iosPrefControllerViewController.h new file mode 100644 index 00000000..af4065bc --- /dev/null +++ b/Apple2Mac/Apple2Mac/iosPrefControllerViewController.h @@ -0,0 +1,13 @@ +// +// iosPrefControllerViewController.h +// Apple2Mac +// +// Created by Jerome Vernet on 24/12/2015. +// Copyright © 2015 deadc0de.org. All rights reserved. +// + +#import + +@interface iosPrefControllerViewController : UIViewController + +@end diff --git a/Apple2Mac/Apple2Mac/iosPrefControllerViewController.m b/Apple2Mac/Apple2Mac/iosPrefControllerViewController.m new file mode 100644 index 00000000..8d89ef64 --- /dev/null +++ b/Apple2Mac/Apple2Mac/iosPrefControllerViewController.m @@ -0,0 +1,37 @@ +// +// iosPrefControllerViewController.m +// Apple2Mac +// +// Created by Jerome Vernet on 24/12/2015. +// Copyright © 2015 deadc0de.org. All rights reserved. +// + +#import "iosPrefControllerViewController.h" + +@interface iosPrefControllerViewController () + +@end + +@implementation iosPrefControllerViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + // Do any additional setup after loading the view. +} + +- (void)didReceiveMemoryWarning { + [super didReceiveMemoryWarning]; + // Dispose of any resources that can be recreated. +} + +/* +#pragma mark - Navigation + +// In a storyboard-based application, you will often want to do a little preparation before navigation +- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { + // Get the new view controller using [segue destinationViewController]. + // Pass the selected object to the new view controller. +} +*/ + +@end diff --git a/Apple2Mac/Apple2iOS/Apple2iOS-Info.plist b/Apple2Mac/Apple2iOS/Apple2iOS-Info.plist index 01a2c80c..d1614837 100644 --- a/Apple2Mac/Apple2iOS/Apple2iOS-Info.plist +++ b/Apple2Mac/Apple2iOS/Apple2iOS-Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType APPL CFBundleShortVersionString - 1.0 + 0.9.1 CFBundleSignature ???? CFBundleVersion @@ -32,8 +32,7 @@ UISupportedInterfaceOrientations - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight + UIInterfaceOrientationPortrait UISupportedInterfaceOrientations~ipad diff --git a/Apple2Mac/Apple2iOS/Base.lproj/Main.storyboard b/Apple2Mac/Apple2iOS/Base.lproj/Main.storyboard index ad89dbb9..823ca6fa 100644 --- a/Apple2Mac/Apple2iOS/Base.lproj/Main.storyboard +++ b/Apple2Mac/Apple2iOS/Base.lproj/Main.storyboard @@ -4,41 +4,80 @@ - + - + - + - - + + - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Apple2Mac/Apple2iOS/en.lproj/Main.strings b/Apple2Mac/Apple2iOS/en.lproj/Main.strings index 4dad028f..6048397a 100644 --- a/Apple2Mac/Apple2iOS/en.lproj/Main.strings +++ b/Apple2Mac/Apple2iOS/en.lproj/Main.strings @@ -9,7 +9,7 @@ "c93-nC-i3L.text" = "Insert a Disk ][ image file"; /* Class = "UIBarButtonItem"; title = "Item"; ObjectID = "d5g-uX-Ssk"; */ -"d5g-uX-Ssk.title" = "Item"; +"d5g-uX-Ssk.title" = "Togle CPU"; /* Class = "UILabel"; text = "Save & restore"; ObjectID = "fJA-S4-XoG"; */ "fJA-S4-XoG.text" = "Save & restore"; diff --git a/Apple2Mac/Apple2iOS/fr.lproj/Main.strings b/Apple2Mac/Apple2iOS/fr.lproj/Main.strings index e92db7b6..6c9b20f3 100644 --- a/Apple2Mac/Apple2iOS/fr.lproj/Main.strings +++ b/Apple2Mac/Apple2iOS/fr.lproj/Main.strings @@ -19,3 +19,6 @@ /* Class = "UILabel"; text = "Quick save and restore"; ObjectID = "t5D-5L-z8k"; */ "t5D-5L-z8k.text" = "Quick save and restore"; + +/* Class = "UIBarButtonItem"; title = "Item"; ObjectID = "d5g-uX-Ssk"; */ +"d5g-uX-Ssk.title" = "CPU"; \ No newline at end of file diff --git a/Apple2Mac/Classes/iOS/EAGLView.m b/Apple2Mac/Classes/iOS/EAGLView.m index c8e28b1e..45e119f6 100644 --- a/Apple2Mac/Classes/iOS/EAGLView.m +++ b/Apple2Mac/Classes/iOS/EAGLView.m @@ -329,4 +329,5 @@ static inline void _handleTouch(EAGLView *self, SEL _cmd, UITouch *touch, interf } } + @end