diff --git a/Mini vMac/AppDelegate.h b/Mini vMac/AppDelegate.h
index dc99f54..d020213 100644
--- a/Mini vMac/AppDelegate.h
+++ b/Mini vMac/AppDelegate.h
@@ -33,5 +33,8 @@ extern NSString * const MNVMDidEjectDiskNotification;
- (BOOL)insertDisk:(NSString*)path;
- (BOOL)isDiskInserted:(NSString*)path;
+- (void)macInterrupt;
+- (void)macReset;
+
@end
diff --git a/Mini vMac/AppDelegate.m b/Mini vMac/AppDelegate.m
index 70184a8..1477c1d 100644
--- a/Mini vMac/AppDelegate.m
+++ b/Mini vMac/AppDelegate.m
@@ -23,6 +23,8 @@ IMPORTFUNC blnr Sony_Insert1(NSString *filePath, blnr silentfail);
IMPORTFUNC blnr Sony_IsInserted(NSString *filePath);
EXPORTVAR(ui3b,SpeedValue);
IMPORTPROC SetKeyState(int key, blnr down);
+IMPORTPROC MacInterrupt();
+IMPORTPROC MacReset();
static AppDelegate *sharedAppDelegate = nil;
NSString * const MNVMDidInsertDiskNotification = @"MNVMDidInsertDisk";
@@ -266,6 +268,14 @@ NSString * const MNVMDidEjectDiskNotification = @"MNVMDidEjectDisk";
SetMouseButton(down);
}
+- (void)macInterrupt {
+ MacInterrupt();
+}
+
+-(void)macReset {
+ MacReset();
+}
+
#pragma mark - Keyboard
- (int)translateScanCode:(int)scancode {
diff --git a/Mini vMac/Assets.xcassets/Interrupt.imageset/Contents.json b/Mini vMac/Assets.xcassets/Interrupt.imageset/Contents.json
new file mode 100644
index 0000000..d7d85a2
--- /dev/null
+++ b/Mini vMac/Assets.xcassets/Interrupt.imageset/Contents.json
@@ -0,0 +1,23 @@
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "filename" : "interrupt.png",
+ "scale" : "1x"
+ },
+ {
+ "idiom" : "universal",
+ "filename" : "interrupt@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "universal",
+ "filename" : "interrupt@3x.png",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ }
+}
\ No newline at end of file
diff --git a/Mini vMac/Assets.xcassets/Interrupt.imageset/interrupt.png b/Mini vMac/Assets.xcassets/Interrupt.imageset/interrupt.png
new file mode 100644
index 0000000..ed47486
Binary files /dev/null and b/Mini vMac/Assets.xcassets/Interrupt.imageset/interrupt.png differ
diff --git a/Mini vMac/Assets.xcassets/Interrupt.imageset/interrupt@2x.png b/Mini vMac/Assets.xcassets/Interrupt.imageset/interrupt@2x.png
new file mode 100644
index 0000000..1847f1e
Binary files /dev/null and b/Mini vMac/Assets.xcassets/Interrupt.imageset/interrupt@2x.png differ
diff --git a/Mini vMac/Assets.xcassets/Interrupt.imageset/interrupt@3x.png b/Mini vMac/Assets.xcassets/Interrupt.imageset/interrupt@3x.png
new file mode 100644
index 0000000..25d061e
Binary files /dev/null and b/Mini vMac/Assets.xcassets/Interrupt.imageset/interrupt@3x.png differ
diff --git a/Mini vMac/Assets.xcassets/Reset.imageset/Contents.json b/Mini vMac/Assets.xcassets/Reset.imageset/Contents.json
new file mode 100644
index 0000000..9f4d431
--- /dev/null
+++ b/Mini vMac/Assets.xcassets/Reset.imageset/Contents.json
@@ -0,0 +1,23 @@
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "filename" : "reset.png",
+ "scale" : "1x"
+ },
+ {
+ "idiom" : "universal",
+ "filename" : "reset@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "universal",
+ "filename" : "reset@3x.png",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ }
+}
\ No newline at end of file
diff --git a/Mini vMac/Assets.xcassets/Reset.imageset/reset.png b/Mini vMac/Assets.xcassets/Reset.imageset/reset.png
new file mode 100644
index 0000000..465cc88
Binary files /dev/null and b/Mini vMac/Assets.xcassets/Reset.imageset/reset.png differ
diff --git a/Mini vMac/Assets.xcassets/Reset.imageset/reset@2x.png b/Mini vMac/Assets.xcassets/Reset.imageset/reset@2x.png
new file mode 100644
index 0000000..5a2bbc6
Binary files /dev/null and b/Mini vMac/Assets.xcassets/Reset.imageset/reset@2x.png differ
diff --git a/Mini vMac/Assets.xcassets/Reset.imageset/reset@3x.png b/Mini vMac/Assets.xcassets/Reset.imageset/reset@3x.png
new file mode 100644
index 0000000..8f9ad64
Binary files /dev/null and b/Mini vMac/Assets.xcassets/Reset.imageset/reset@3x.png differ
diff --git a/Mini vMac/Base.lproj/Main.storyboard b/Mini vMac/Base.lproj/Main.storyboard
index 89bfffe..337ea91 100644
--- a/Mini vMac/Base.lproj/Main.storyboard
+++ b/Mini vMac/Base.lproj/Main.storyboard
@@ -230,6 +230,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
@@ -267,6 +279,8 @@
+
+
diff --git a/Mini vMac/InsertDiskViewController.h b/Mini vMac/InsertDiskViewController.h
index 4348838..e975d46 100644
--- a/Mini vMac/InsertDiskViewController.h
+++ b/Mini vMac/InsertDiskViewController.h
@@ -12,5 +12,7 @@
- (IBAction)showSettings:(id)sender;
- (IBAction)dismiss:(id)sender;
+- (IBAction)macInterrupt:(id)sender;
+- (IBAction)macReset:(id)sender;
@end
diff --git a/Mini vMac/InsertDiskViewController.m b/Mini vMac/InsertDiskViewController.m
index 376ad03..d48aedc 100644
--- a/Mini vMac/InsertDiskViewController.m
+++ b/Mini vMac/InsertDiskViewController.m
@@ -77,6 +77,8 @@
[self.tableView reloadData];
}
+#pragma mark - Button Actions
+
- (void)showSettings:(id)sender {
[[AppDelegate sharedInstance] showSettings:sender];
}
@@ -85,6 +87,15 @@
[self dismissViewControllerAnimated:YES completion:nil];
}
+- (void)macInterrupt:(id)sender {
+ [self dismiss:sender];
+ [[AppDelegate sharedInstance] macInterrupt];
+}
+
+- (void)macReset:(id)sender {
+ [[AppDelegate sharedInstance] macReset];
+}
+
#pragma mark - Table view data source
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
diff --git a/Mini vMac/MYOSGLUE.m b/Mini vMac/MYOSGLUE.m
index a4325d2..068d1c1 100644
--- a/Mini vMac/MYOSGLUE.m
+++ b/Mini vMac/MYOSGLUE.m
@@ -1687,3 +1687,11 @@ GLOBALPROC RunEmulator(void) {
}
UnInitOSGLU();
}
+
+GLOBALPROC MacInterrupt(void) {
+ WantMacInterrupt = trueblnr;
+}
+
+GLOBALPROC MacReset(void) {
+ WantMacReset = trueblnr;
+}
\ No newline at end of file