Skip to content
This repository was archived by the owner on Feb 8, 2022. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
.DS_Store

*.xcuserstate
*.xcuserdatad

*.pbxproj

Expand Down
3 changes: 3 additions & 0 deletions MBProgressHUD/MBProgressHUD.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,7 @@
TargetAttributes = {
6E2DD8FC1A0F54B700774727 = {
CreatedOnToolsVersion = 6.1;
LastSwiftMigration = 0830;
};
6E2DD9061A0F54B700774727 = {
CreatedOnToolsVersion = 6.1;
Expand Down Expand Up @@ -342,6 +343,7 @@
PRODUCT_BUNDLE_IDENTIFIER = "com.Bukovinski.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
SWIFT_VERSION = 3.0;
TARGETED_DEVICE_FAMILY = "1,2";
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
Expand Down Expand Up @@ -375,6 +377,7 @@
PRODUCT_BUNDLE_IDENTIFIER = "com.Bukovinski.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
SWIFT_VERSION = 3.0;
TARGETED_DEVICE_FAMILY = "1,2";
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
Expand Down
3 changes: 3 additions & 0 deletions iBox/BochsKit/BochsKit.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -2282,6 +2282,7 @@
TargetAttributes = {
6ECAC70419FF107400D94D6C = {
CreatedOnToolsVersion = 6.1;
LastSwiftMigration = 0830;
};
6ECAC70F19FF107500D94D6C = {
CreatedOnToolsVersion = 6.1;
Expand Down Expand Up @@ -2840,6 +2841,7 @@
PRODUCT_BUNDLE_IDENTIFIER = "com.bochs.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
SWIFT_VERSION = 3.0;
VALID_ARCHS = "armv7 armv7s arm64";
};
name = Debug;
Expand Down Expand Up @@ -2878,6 +2880,7 @@
PRODUCT_BUNDLE_IDENTIFIER = "com.bochs.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
SWIFT_VERSION = 3.0;
VALID_ARCHS = "armv7 armv7s arm64";
};
name = Release;
Expand Down
10 changes: 6 additions & 4 deletions iBox/iBox.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@

/* Begin PBXFileReference section */
6B2A9C221E0A58C8002E4DA2 /* iBox.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = iBox.entitlements; sourceTree = "<group>"; };
6B49FD3F1E079ED1001F4F13 /* SDL2.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SDL2.framework; path = ../../../../../Library/Frameworks/SDL2.framework; sourceTree = "<group>"; };
6BC8954F1E0C9E1200638113 /* FloppyDrive.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FloppyDrive.swift; sourceTree = "<group>"; };
6E2DD8F21A0F459300774727 /* TableViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TableViewCell.swift; sourceTree = "<group>"; };
6E2DD9301A0F57A800774727 /* MBProgressHUD.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = MBProgressHUD.xcodeproj; path = ../MBProgressHUD/MBProgressHUD.xcodeproj; sourceTree = "<group>"; };
Expand Down Expand Up @@ -173,7 +172,6 @@
6B49FD3E1E079ED1001F4F13 /* Frameworks */ = {
isa = PBXGroup;
children = (
6B49FD3F1E079ED1001F4F13 /* SDL2.framework */,
);
name = Frameworks;
sourceTree = "<group>";
Expand Down Expand Up @@ -367,6 +365,7 @@
TargetAttributes = {
6ECAC6D019FF0C3600D94D6C = {
CreatedOnToolsVersion = 6.1;
LastSwiftMigration = 0830;
SystemCapabilities = {
com.apple.WAC = {
enabled = 0;
Expand All @@ -375,6 +374,7 @@
};
6ECAC6E519FF0C3700D94D6C = {
CreatedOnToolsVersion = 6.1;
LastSwiftMigration = 0830;
TestTargetID = 6ECAC6D019FF0C3600D94D6C;
};
};
Expand Down Expand Up @@ -659,7 +659,7 @@
ONLY_ACTIVE_ARCH = YES;
PRODUCT_BUNDLE_IDENTIFIER = com.troi.iBox2;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 2.3;
SWIFT_VERSION = 3.0;
TARGETED_DEVICE_FAMILY = "1,2";
VALID_ARCHS = "armv7 armv7s arm64";
};
Expand All @@ -683,7 +683,7 @@
ONLY_ACTIVE_ARCH = YES;
PRODUCT_BUNDLE_IDENTIFIER = com.troi.iBox2;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 2.3;
SWIFT_VERSION = 3.0;
TARGETED_DEVICE_FAMILY = "1,2";
VALID_ARCHS = "armv7 armv7s arm64";
};
Expand All @@ -705,6 +705,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "com.colemancda.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/iBox.app/iBox";
};
name = Debug;
Expand All @@ -721,6 +722,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "com.colemancda.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/iBox.app/iBox";
};
name = Release;
Expand Down
12 changes: 6 additions & 6 deletions iBox/iBox/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,31 +14,31 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?


func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
application.applicationSupportsShakeToEdit = true
// Override point for customization after application launch.
return true
}

func applicationWillResignActive(application: UIApplication) {
func applicationWillResignActive(_ application: UIApplication) {
// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
// Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
}

func applicationDidEnterBackground(application: UIApplication) {
func applicationDidEnterBackground(_ application: UIApplication) {
// Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
}

func applicationWillEnterForeground(application: UIApplication) {
func applicationWillEnterForeground(_ application: UIApplication) {
// Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
}

func applicationDidBecomeActive(application: UIApplication) {
func applicationDidBecomeActive(_ application: UIApplication) {
// Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
}

func applicationWillTerminate(application: UIApplication) {
func applicationWillTerminate(_ application: UIApplication) {
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
}

Expand Down
60 changes: 30 additions & 30 deletions iBox/iBox/ConfigurationEditorViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class ConfigurationEditorViewController: UITableViewController {
var configuration: Configuration? {
didSet {

if configuration != nil && self.isViewLoaded() {
if configuration != nil && self.isViewLoaded {

self.loadUI(forConfiguration: self.configuration!)
}
Expand All @@ -70,7 +70,7 @@ class ConfigurationEditorViewController: UITableViewController {
}
}

private func loadUI(forConfiguration configuration: Configuration) {
fileprivate func loadUI(forConfiguration configuration: Configuration) {

// setup UI with values from model object...

Expand All @@ -95,28 +95,28 @@ class ConfigurationEditorViewController: UITableViewController {
default: self.vgaExtensionSegmentedControl.selectedSegmentIndex = 0
}

vgaUpdateIntervalTextField.text = "\(configuration.vgaUpdateInterval.integerValue)"
vgaUpdateIntervalTextField.text = "\(configuration.vgaUpdateInterval.intValue)"

soundBlaster16Switch.on = configuration.soundBlaster16.boolValue
soundBlaster16Switch.isOn = configuration.soundBlaster16.boolValue

sdlSiwtch.on = configuration.sdlEnabled.boolValue
sdlSiwtch.isOn = configuration.sdlEnabled.boolValue

feedbackSwitch.on = configuration.feedbackEnabled.boolValue
feedbackSwitch.isOn = configuration.feedbackEnabled.boolValue

dmaTimerTextField.text = "\(configuration.dmaTimer.integerValue)"
dmaTimerTextField.text = "\(configuration.dmaTimer.intValue)"

keyBoardPasteDelayTextField.text = "\(configuration.keyboardPasteDelay.integerValue)"
keyBoardPasteDelayTextField.text = "\(configuration.keyboardPasteDelay.intValue)"

keyboardSerialDelayTextField.text = "\(configuration.keyboardSerialDelay.integerValue)"
keyboardSerialDelayTextField.text = "\(configuration.keyboardSerialDelay.intValue)"

networkSwitch.on = configuration.networkEnabled.boolValue
networkSwitch.isOn = configuration.networkEnabled.boolValue

macTextField.text = configuration.macAddress
}

// MARK: - Actions

@IBAction func save(sender: AnyObject) {
@IBAction func save(_ sender: AnyObject) {

assert(self.configuration != nil)

Expand All @@ -132,10 +132,10 @@ class ConfigurationEditorViewController: UITableViewController {
case 2: configuration.bootDevice = "floppy"
default: configuration.bootDevice = "cdrom"
}

configuration.ramSize = NSNumber(integerLiteral: Int(UInt(self.ramSlider.value)))

configuration.ramSize = UInt(self.ramSlider.value)

configuration.cpuIPS = Int(self.ipsTextField.text!)!
configuration.cpuIPS = NSNumber(integerLiteral: Int(self.ipsTextField.text!)!)

switch self.vgaExtensionSegmentedControl.selectedSegmentIndex {
case 0: configuration.vgaExtension = "none"
Expand All @@ -144,21 +144,21 @@ class ConfigurationEditorViewController: UITableViewController {
default: configuration.vgaExtension = "none"
}

configuration.vgaUpdateInterval = Int(self.vgaUpdateIntervalTextField.text!)!
configuration.vgaUpdateInterval = NSNumber(integerLiteral: Int(self.vgaUpdateIntervalTextField.text!)!)

configuration.soundBlaster16 = self.soundBlaster16Switch.on
configuration.soundBlaster16 = self.soundBlaster16Switch.isOn as NSNumber

configuration.sdlEnabled = self.sdlSiwtch.on
configuration.sdlEnabled = self.sdlSiwtch.isOn as NSNumber

configuration.feedbackEnabled = self.feedbackSwitch.on
configuration.feedbackEnabled = self.feedbackSwitch.isOn as NSNumber

configuration.dmaTimer = Int(self.dmaTimerTextField.text!)!
configuration.dmaTimer = NSNumber(integerLiteral: Int(self.dmaTimerTextField.text!)!)

configuration.keyboardPasteDelay = Int(self.keyBoardPasteDelayTextField.text!)!
configuration.keyboardPasteDelay = NSNumber(integerLiteral: Int(self.keyBoardPasteDelayTextField.text!)!)

configuration.keyboardSerialDelay = Int(self.keyboardSerialDelayTextField.text!)!
configuration.keyboardSerialDelay = NSNumber(integerLiteral: Int(self.keyboardSerialDelayTextField.text!)!)

configuration.networkEnabled = self.networkSwitch.on
configuration.networkEnabled = self.networkSwitch.isOn as NSNumber

configuration.macAddress = self.macTextField.text!

Expand All @@ -174,36 +174,36 @@ class ConfigurationEditorViewController: UITableViewController {

if error != nil {

let alertController = UIAlertController(title: NSLocalizedString("Error", comment: "Error"), message: NSLocalizedString("Could not save configuration.", comment: "Could not save configuration.") + " \\(\(error!.localizedDescription)\\)", preferredStyle: UIAlertControllerStyle.Alert)
let alertController = UIAlertController(title: NSLocalizedString("Error", comment: "Error"), message: NSLocalizedString("Could not save configuration.", comment: "Could not save configuration.") + " \\(\(error!.localizedDescription)\\)", preferredStyle: UIAlertControllerStyle.alert)

self.presentViewController(alertController, animated: true, completion: nil)
self.present(alertController, animated: true, completion: nil)

return
}

// dismiss VC
self.dismissViewControllerAnimated(true, completion: nil)
self.dismiss(animated: true, completion: nil)
}

@IBAction func cancel(sender: AnyObject) {
@IBAction func cancel(_ sender: AnyObject) {

Store.sharedInstance.managedObjectContext.rollback()

self.dismissViewControllerAnimated(true, completion: nil);
self.dismiss(animated: true, completion: nil);
}

@IBAction func ramSliderValueChanged(sender: UISlider) {
@IBAction func ramSliderValueChanged(_ sender: UISlider) {

ramLabel.text = "RAM: \(UInt(sender.value))"
}

// MARK: - Segues

override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {

if segue.identifier == "showDrives" {

let drivesVC = segue.destinationViewController as! DrivesViewController
let drivesVC = segue.destination as! DrivesViewController

drivesVC.configuration = self.configuration
}
Expand Down
Loading