mirror of
https://github.com/ksherlock/ample.git
synced 2026-10-26 04:02:14 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2409ad55a1 | ||
|
|
601e56ccaa | ||
|
|
d5d90ba6be | ||
|
|
4a0caa2e78 | ||
|
|
23a05d5414 | ||
|
|
4ffd8d1f44 |
No files matched your search
@@ -1602,7 +1602,7 @@
|
||||
CODE_SIGN_ENTITLEMENTS = Ample/Ample.entitlements;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
CURRENT_PROJECT_VERSION = 28;
|
||||
CURRENT_PROJECT_VERSION = 30;
|
||||
ENABLE_HARDENED_RUNTIME = YES;
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
@@ -1613,7 +1613,7 @@
|
||||
"$(inherited)",
|
||||
"@executable_path/../Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 0.242;
|
||||
MARKETING_VERSION = 0.244;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.ksherlock.ample;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
};
|
||||
@@ -1626,7 +1626,7 @@
|
||||
CODE_SIGN_ENTITLEMENTS = Ample/Ample.entitlements;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
CURRENT_PROJECT_VERSION = 28;
|
||||
CURRENT_PROJECT_VERSION = 30;
|
||||
ENABLE_HARDENED_RUNTIME = YES;
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
@@ -1637,7 +1637,7 @@
|
||||
"$(inherited)",
|
||||
"@executable_path/../Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 0.242;
|
||||
MARKETING_VERSION = 0.244;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.ksherlock.ample;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
};
|
||||
|
||||
+69
-3
@@ -115,11 +115,11 @@
|
||||
|
||||
dispatch_time_t when = dispatch_time(DISPATCH_TIME_NOW, (int64_t)(2 * NSEC_PER_SEC));
|
||||
[task setTerminationHandler: ^(NSTask *task){
|
||||
|
||||
|
||||
int st = [task terminationStatus];
|
||||
// delay so the install window is visible, I think
|
||||
dispatch_after(when, dispatch_get_main_queue(), ^{
|
||||
|
||||
int st = [task terminationStatus];
|
||||
|
||||
if (st) {
|
||||
NSAlert *alert = [NSAlert new];
|
||||
[alert setMessageText: @"An error occurred extracting MAME components"];
|
||||
@@ -238,4 +238,70 @@
|
||||
}
|
||||
|
||||
|
||||
-(IBAction)installMameComponents:(id)sender {
|
||||
|
||||
|
||||
/* install the mame data components. */
|
||||
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
|
||||
NSBundle *bundle = [NSBundle mainBundle];
|
||||
NSURL *sd = SupportDirectory();
|
||||
|
||||
NSURL *ample_url = [sd URLByAppendingPathComponent: @"Ample.plist"];
|
||||
NSMutableDictionary *d = [NSMutableDictionary dictionaryWithContentsOfURL: ample_url];
|
||||
|
||||
//NSDate *oldDate = [d objectForKey: kMameComponentsDate];
|
||||
NSDate *newDate = [defaults objectForKey: kMameComponentsDate];
|
||||
if (![newDate isKindOfClass: [NSDate class]])
|
||||
newDate = nil;
|
||||
|
||||
NSString *path = [bundle pathForResource: @"mame-data" ofType: @"tgz"];
|
||||
if (!path) return; // Ample Lite?
|
||||
|
||||
|
||||
NSWindow *win = _installWindow;
|
||||
[win makeKeyAndOrderFront: nil];
|
||||
NSTask *task = [NSTask new];
|
||||
NSArray *argv = @[
|
||||
@"xfz",
|
||||
path
|
||||
];
|
||||
if (@available(macOS 10.13, *)) {
|
||||
[task setExecutableURL: [NSURL fileURLWithPath: @"/usr/bin/tar"]];
|
||||
[task setCurrentDirectoryURL: sd];
|
||||
} else {
|
||||
[task setLaunchPath: @"/usr/bin/tar"];
|
||||
[task setCurrentDirectoryPath: SupportDirectoryPath()];
|
||||
}
|
||||
[task setArguments: argv];
|
||||
|
||||
|
||||
//dispatch_time_t when = dispatch_time(DISPATCH_TIME_NOW, (int64_t)(2 * NSEC_PER_SEC));
|
||||
[task setTerminationHandler: ^(NSTask *task){
|
||||
|
||||
int st = [task terminationStatus];
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
|
||||
if (st) {
|
||||
NSAlert *alert = [NSAlert new];
|
||||
[alert setMessageText: @"An error occurred extracting MAME components"];
|
||||
[alert runModal];
|
||||
[win close];
|
||||
return;
|
||||
}
|
||||
|
||||
if (d) {
|
||||
[d setObject: newDate forKey: kMameComponentsDate];
|
||||
[d writeToURL: ample_url atomically: YES];
|
||||
} else {
|
||||
[@{ kMameComponentsDate: newDate } writeToURL: ample_url atomically: YES];
|
||||
}
|
||||
[win close];
|
||||
// need to reload the software list data.
|
||||
});
|
||||
|
||||
}];
|
||||
[task launch];
|
||||
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -45,6 +45,9 @@
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="VOq-y0-SEH"/>
|
||||
<menuItem title="Reinstall MAME components" hidden="YES" id="c3P-WT-eUP">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
</menuItem>
|
||||
<menuItem title="Preferences…" keyEquivalent="," id="BOF-NM-1cW">
|
||||
<connections>
|
||||
<action selector="displayPreferences:" target="Voe-Tx-rLC" id="Hsm-pX-sUc"/>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>MameComponentsDate</key>
|
||||
<date>2022-04-01T16:00:00Z</date>
|
||||
<date>2022-05-25T16:00:00Z</date>
|
||||
<key>UseCustomMame</key>
|
||||
<false/>
|
||||
<key>AutoCloseLogWindow</key>
|
||||
@@ -15,8 +15,8 @@
|
||||
<key>NSQuitAlwaysKeepsWindows</key>
|
||||
<true/>
|
||||
<key>DefaultDownloadURL</key>
|
||||
<string>https://archive.org/download/mame-0.231-merged</string>
|
||||
<string>https://archive.org/download/mame-merged/mame-merged</string>
|
||||
<key>DefaultDownloadExtension</key>
|
||||
<string>7z</string>
|
||||
<string>zip</string>
|
||||
</dict>
|
||||
</plist>
|
||||
+35
-21
@@ -37,6 +37,41 @@
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>bios</string>
|
||||
<key>description</key>
|
||||
<string>ROM</string>
|
||||
<key>options</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>value</key>
|
||||
<string></string>
|
||||
<key>description</key>
|
||||
<string>—Default—</string>
|
||||
<key>default</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>value</key>
|
||||
<string>v1</string>
|
||||
<key>description</key>
|
||||
<string>Version 1</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>value</key>
|
||||
<string>v2</string>
|
||||
<key>description</key>
|
||||
<string>Version 2</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>value</key>
|
||||
<string>debug</string>
|
||||
<key>description</key>
|
||||
<string>Debug</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>sl2</string>
|
||||
@@ -396,27 +431,6 @@
|
||||
</array>
|
||||
</dict>
|
||||
</array>
|
||||
<key>bios</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>value</key>
|
||||
<string>v1</string>
|
||||
<key>description</key>
|
||||
<string>Version 1</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>value</key>
|
||||
<string>v2</string>
|
||||
<key>description</key>
|
||||
<string>Version 2</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>value</key>
|
||||
<string>debug</string>
|
||||
<key>description</key>
|
||||
<string>Debug</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>devices</key>
|
||||
<array>
|
||||
<dict>
|
||||
|
||||
+29
-15
@@ -37,6 +37,35 @@
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>bios</string>
|
||||
<key>description</key>
|
||||
<string>ROM</string>
|
||||
<key>options</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>value</key>
|
||||
<string></string>
|
||||
<key>description</key>
|
||||
<string>—Default—</string>
|
||||
<key>default</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>value</key>
|
||||
<string>v1</string>
|
||||
<key>description</key>
|
||||
<string>Version 1</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>value</key>
|
||||
<string>v2</string>
|
||||
<key>description</key>
|
||||
<string>Version 2</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>sl1</string>
|
||||
@@ -492,21 +521,6 @@
|
||||
</array>
|
||||
</dict>
|
||||
</array>
|
||||
<key>bios</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>value</key>
|
||||
<string>v1</string>
|
||||
<key>description</key>
|
||||
<string>Version 1</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>value</key>
|
||||
<string>v2</string>
|
||||
<key>description</key>
|
||||
<string>Version 2</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>devices</key>
|
||||
<array>
|
||||
<dict>
|
||||
|
||||
@@ -117,6 +117,35 @@
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>bios</string>
|
||||
<key>description</key>
|
||||
<string>ROM</string>
|
||||
<key>options</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>value</key>
|
||||
<string></string>
|
||||
<key>description</key>
|
||||
<string>—Default—</string>
|
||||
<key>default</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>value</key>
|
||||
<string>default</string>
|
||||
<key>description</key>
|
||||
<string>Original Monitor</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>value</key>
|
||||
<string>autostart</string>
|
||||
<key>description</key>
|
||||
<string>Autostart Monitor</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>sl0</string>
|
||||
@@ -3880,21 +3909,6 @@
|
||||
</array>
|
||||
</dict>
|
||||
</array>
|
||||
<key>bios</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>value</key>
|
||||
<string>default</string>
|
||||
<key>description</key>
|
||||
<string>Original Monitor</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>value</key>
|
||||
<string>autostart</string>
|
||||
<key>description</key>
|
||||
<string>Autostart Monitor</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>devices</key>
|
||||
<array>
|
||||
<dict>
|
||||
|
||||
@@ -55,6 +55,35 @@
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>bios</string>
|
||||
<key>description</key>
|
||||
<string>ROM</string>
|
||||
<key>options</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>value</key>
|
||||
<string></string>
|
||||
<key>description</key>
|
||||
<string>—Default—</string>
|
||||
<key>default</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>value</key>
|
||||
<string>original</string>
|
||||
<key>description</key>
|
||||
<string>Apple /// boot ROM</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>value</key>
|
||||
<string>soshd</string>
|
||||
<key>description</key>
|
||||
<string>Rob Justice SOSHDBOOT</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>smartport</string>
|
||||
@@ -602,21 +631,6 @@
|
||||
</array>
|
||||
</dict>
|
||||
</array>
|
||||
<key>bios</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>value</key>
|
||||
<string>original</string>
|
||||
<key>description</key>
|
||||
<string>Apple /// boot ROM</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>value</key>
|
||||
<string>soshd</string>
|
||||
<key>description</key>
|
||||
<string>Rob Justice SOSHDBOOT</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>devices</key>
|
||||
<array>
|
||||
<dict>
|
||||
|
||||
+35
-21
@@ -37,6 +37,41 @@
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>bios</string>
|
||||
<key>description</key>
|
||||
<string>ROM</string>
|
||||
<key>options</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>value</key>
|
||||
<string></string>
|
||||
<key>description</key>
|
||||
<string>—Default—</string>
|
||||
<key>default</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>value</key>
|
||||
<string>default</string>
|
||||
<key>description</key>
|
||||
<string>ver 1.21</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>value</key>
|
||||
<string>older</string>
|
||||
<key>description</key>
|
||||
<string>ver 1.1</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>value</key>
|
||||
<string>diag</string>
|
||||
<key>description</key>
|
||||
<string>self test</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>smartport</string>
|
||||
@@ -3193,27 +3228,6 @@
|
||||
</array>
|
||||
</dict>
|
||||
</array>
|
||||
<key>bios</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>value</key>
|
||||
<string>default</string>
|
||||
<key>description</key>
|
||||
<string>ver 1.21</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>value</key>
|
||||
<string>older</string>
|
||||
<key>description</key>
|
||||
<string>ver 1.1</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>value</key>
|
||||
<string>diag</string>
|
||||
<key>description</key>
|
||||
<string>self test</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>devices</key>
|
||||
<array>
|
||||
<dict>
|
||||
|
||||
@@ -77,6 +77,41 @@
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>bios</string>
|
||||
<key>description</key>
|
||||
<string>ROM</string>
|
||||
<key>options</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>value</key>
|
||||
<string></string>
|
||||
<key>description</key>
|
||||
<string>—Default—</string>
|
||||
<key>default</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>value</key>
|
||||
<string>871222</string>
|
||||
<key>description</key>
|
||||
<string>v4.3</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>value</key>
|
||||
<string>870917</string>
|
||||
<key>description</key>
|
||||
<string>v4.2</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>value</key>
|
||||
<string>870724</string>
|
||||
<key>description</key>
|
||||
<string>v4.1</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>sl5</string>
|
||||
@@ -1642,27 +1677,6 @@
|
||||
</array>
|
||||
</dict>
|
||||
</array>
|
||||
<key>bios</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>value</key>
|
||||
<string>871222</string>
|
||||
<key>description</key>
|
||||
<string>v4.3</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>value</key>
|
||||
<string>870917</string>
|
||||
<key>description</key>
|
||||
<string>v4.2</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>value</key>
|
||||
<string>870724</string>
|
||||
<key>description</key>
|
||||
<string>v4.1</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>devices</key>
|
||||
<array>
|
||||
<dict>
|
||||
|
||||
@@ -37,6 +37,53 @@
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>bios</string>
|
||||
<key>description</key>
|
||||
<string>ROM</string>
|
||||
<key>options</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>value</key>
|
||||
<string></string>
|
||||
<key>description</key>
|
||||
<string>—Default—</string>
|
||||
<key>default</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>value</key>
|
||||
<string>871212</string>
|
||||
<key>description</key>
|
||||
<string>v3.3</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>value</key>
|
||||
<string>870320</string>
|
||||
<key>description</key>
|
||||
<string>v3.0</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>value</key>
|
||||
<string>870203</string>
|
||||
<key>description</key>
|
||||
<string>v2.9</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>value</key>
|
||||
<string>860915</string>
|
||||
<key>description</key>
|
||||
<string>860915</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>value</key>
|
||||
<string>860801</string>
|
||||
<key>description</key>
|
||||
<string>860801</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>sl5</string>
|
||||
@@ -1602,39 +1649,6 @@
|
||||
</array>
|
||||
</dict>
|
||||
</array>
|
||||
<key>bios</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>value</key>
|
||||
<string>871212</string>
|
||||
<key>description</key>
|
||||
<string>v3.3</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>value</key>
|
||||
<string>870320</string>
|
||||
<key>description</key>
|
||||
<string>v3.0</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>value</key>
|
||||
<string>870203</string>
|
||||
<key>description</key>
|
||||
<string>v2.9</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>value</key>
|
||||
<string>860915</string>
|
||||
<key>description</key>
|
||||
<string>860915</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>value</key>
|
||||
<string>860801</string>
|
||||
<key>description</key>
|
||||
<string>860801</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>devices</key>
|
||||
<array>
|
||||
<dict>
|
||||
|
||||
@@ -35,6 +35,41 @@
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>bios</string>
|
||||
<key>description</key>
|
||||
<string>ROM</string>
|
||||
<key>options</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>value</key>
|
||||
<string></string>
|
||||
<key>description</key>
|
||||
<string>—Default—</string>
|
||||
<key>default</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>value</key>
|
||||
<string>v3</string>
|
||||
<key>description</key>
|
||||
<string>Loud Harmonicas</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>value</key>
|
||||
<string>v2</string>
|
||||
<key>description</key>
|
||||
<string>Lonely Heifers</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>value</key>
|
||||
<string>v1</string>
|
||||
<key>description</key>
|
||||
<string>Lonely Hearts</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>smartport</string>
|
||||
@@ -55,27 +90,6 @@
|
||||
</array>
|
||||
</dict>
|
||||
</array>
|
||||
<key>bios</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>value</key>
|
||||
<string>v3</string>
|
||||
<key>description</key>
|
||||
<string>Loud Harmonicas</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>value</key>
|
||||
<string>v2</string>
|
||||
<key>description</key>
|
||||
<string>Lonely Heifers</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>value</key>
|
||||
<string>v1</string>
|
||||
<key>description</key>
|
||||
<string>Lonely Hearts</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>devices</key>
|
||||
<array>
|
||||
<dict>
|
||||
|
||||
+29
-15
@@ -85,6 +85,35 @@
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>bios</string>
|
||||
<key>description</key>
|
||||
<string>ROM</string>
|
||||
<key>options</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>value</key>
|
||||
<string></string>
|
||||
<key>description</key>
|
||||
<string>—Default—</string>
|
||||
<key>default</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>value</key>
|
||||
<string>default</string>
|
||||
<key>description</key>
|
||||
<string>rev. B</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>value</key>
|
||||
<string>original</string>
|
||||
<key>description</key>
|
||||
<string>rev. A</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>smartport</string>
|
||||
@@ -1007,21 +1036,6 @@
|
||||
</array>
|
||||
</dict>
|
||||
</array>
|
||||
<key>bios</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>value</key>
|
||||
<string>default</string>
|
||||
<key>description</key>
|
||||
<string>rev. B</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>value</key>
|
||||
<string>original</string>
|
||||
<key>description</key>
|
||||
<string>rev. A</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>devices</key>
|
||||
<array>
|
||||
<dict>
|
||||
|
||||
@@ -85,6 +85,35 @@
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>bios</string>
|
||||
<key>description</key>
|
||||
<string>ROM</string>
|
||||
<key>options</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>value</key>
|
||||
<string></string>
|
||||
<key>description</key>
|
||||
<string>—Default—</string>
|
||||
<key>default</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>value</key>
|
||||
<string>default</string>
|
||||
<key>description</key>
|
||||
<string>rev. B</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>value</key>
|
||||
<string>original</string>
|
||||
<key>description</key>
|
||||
<string>rev. A</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>smartport</string>
|
||||
@@ -1007,21 +1036,6 @@
|
||||
</array>
|
||||
</dict>
|
||||
</array>
|
||||
<key>bios</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>value</key>
|
||||
<string>default</string>
|
||||
<key>description</key>
|
||||
<string>rev. B</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>value</key>
|
||||
<string>original</string>
|
||||
<key>description</key>
|
||||
<string>rev. A</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>devices</key>
|
||||
<array>
|
||||
<dict>
|
||||
|
||||
@@ -65,6 +65,53 @@
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>bios</string>
|
||||
<key>description</key>
|
||||
<string>ROM</string>
|
||||
<key>options</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>value</key>
|
||||
<string></string>
|
||||
<key>description</key>
|
||||
<string>—Default—</string>
|
||||
<key>default</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>value</key>
|
||||
<string>v3</string>
|
||||
<key>description</key>
|
||||
<string>Loud Harmonicas</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>value</key>
|
||||
<string>v2</string>
|
||||
<key>description</key>
|
||||
<string>Lonely Heifers</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>value</key>
|
||||
<string>v1</string>
|
||||
<key>description</key>
|
||||
<string>Lonely Hearts</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>value</key>
|
||||
<string>romdisk</string>
|
||||
<key>description</key>
|
||||
<string>mac68k.info self-boot (1/1/2015)</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>value</key>
|
||||
<string>romdisk2</string>
|
||||
<key>description</key>
|
||||
<string>bigmessofwires.com ROMinator (2/25/2015)</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>smartport</string>
|
||||
@@ -85,39 +132,6 @@
|
||||
</array>
|
||||
</dict>
|
||||
</array>
|
||||
<key>bios</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>value</key>
|
||||
<string>v3</string>
|
||||
<key>description</key>
|
||||
<string>Loud Harmonicas</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>value</key>
|
||||
<string>v2</string>
|
||||
<key>description</key>
|
||||
<string>Lonely Heifers</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>value</key>
|
||||
<string>v1</string>
|
||||
<key>description</key>
|
||||
<string>Lonely Hearts</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>value</key>
|
||||
<string>romdisk</string>
|
||||
<key>description</key>
|
||||
<string>mac68k.info self-boot (1/1/2015)</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>value</key>
|
||||
<string>romdisk2</string>
|
||||
<key>description</key>
|
||||
<string>bigmessofwires.com ROMinator (2/25/2015)</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>devices</key>
|
||||
<array>
|
||||
<dict>
|
||||
|
||||
@@ -10,6 +10,17 @@
|
||||
#import <Cocoa/Cocoa.h>
|
||||
#import "Media.h"
|
||||
|
||||
/* number of slot types. bitmask used so should be < sizeof(unsigned *8) */
|
||||
#define SLOT_COUNT 23
|
||||
static_assert(SLOT_COUNT <= sizeof(unsigned) * 8, "too many slot types");
|
||||
|
||||
#define kSMARTPORT_SLOT 21
|
||||
#define kBIOS_SLOT 22
|
||||
|
||||
#ifndef SIZEOF
|
||||
#define SIZEOF(x) (sizeof(x) / sizeof(x[0]))
|
||||
#endif
|
||||
|
||||
//NS_ASSUME_NONNULL_BEGIN
|
||||
@class Slot, SlotOption, SlotTableCellView;
|
||||
|
||||
|
||||
+5
-4
@@ -101,9 +101,10 @@ static NSDictionary *IndexMap = nil;
|
||||
@"nbe": @20,
|
||||
|
||||
@"smartport": @21,
|
||||
#define kSMARTPORT 21
|
||||
@"bios": @22,
|
||||
};
|
||||
|
||||
static_assert(kSMARTPORT_SLOT == 21, "Smartport != 21");
|
||||
static_assert(kBIOS_SLOT == 22, "Bios != 22");
|
||||
}
|
||||
|
||||
-(void)reset {
|
||||
@@ -156,7 +157,7 @@ static NSDictionary *IndexMap = nil;
|
||||
// { 'sl3' : 'uthernet' }
|
||||
|
||||
// special case for smartport since the name isn't used.
|
||||
if (_index == kSMARTPORT) {
|
||||
if (_index == kSMARTPORT_SLOT) {
|
||||
SlotOption *option = [_options objectAtIndex: _selectedIndex];
|
||||
[option reserialize: dict];
|
||||
return;
|
||||
@@ -387,7 +388,7 @@ static NSDictionary *IndexMap = nil;
|
||||
|
||||
// [menu setItemArray: ] doesn't work prior to 10.14, apparently.
|
||||
[menu removeAllItems];
|
||||
if (_index == kSMARTPORT) {
|
||||
if (_index == kSMARTPORT_SLOT) {
|
||||
//[menu setItemArray: @[]];
|
||||
[button setHidden: YES];
|
||||
} else {
|
||||
|
||||
@@ -16,11 +16,7 @@
|
||||
|
||||
#import <objc/runtime.h>
|
||||
|
||||
/* number of slot types. bitmask used so should be < sizeof(unsigned *8) */
|
||||
#define SLOT_COUNT 22
|
||||
static_assert(SLOT_COUNT <= sizeof(unsigned) * 8, "too many slot types");
|
||||
|
||||
#define SIZEOF(x) (sizeof(x) / sizeof(x[0]))
|
||||
|
||||
|
||||
static unsigned RootKey = 0;
|
||||
@@ -120,6 +116,7 @@ static unsigned RootKey = 0;
|
||||
_slot_object[i] = nil;
|
||||
}
|
||||
|
||||
_slot_value[kBIOS_SLOT] = nil; // don't copy over to other machines.
|
||||
|
||||
extern NSArray *BuildSlots(NSString *name, NSDictionary *data);
|
||||
_root = BuildSlots(_machine, d);
|
||||
|
||||
@@ -39,6 +39,8 @@
|
||||
@interface SoftwareSet : NSObject <NSFastEnumeration, AutoCompleteDelegate>
|
||||
|
||||
+(instancetype)softwareSetForMachine: (NSString *)machine;
|
||||
+(void)invalidate;
|
||||
|
||||
-(BOOL)nameIsUnique: (NSString *)name;
|
||||
|
||||
-(NSString *)nameForSoftware: (Software *)software;
|
||||
|
||||
@@ -512,9 +512,15 @@ NSArray<SoftwareList *> *SoftwareListForMachine(NSString *machine) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
static NSCache *cache;
|
||||
+(void)invalidate {
|
||||
// called after mame components are updated. clears the cache.
|
||||
cache = nil;
|
||||
}
|
||||
|
||||
+(instancetype)softwareSetForMachine:(NSString *)machine {
|
||||
|
||||
static NSCache *cache;
|
||||
|
||||
if (!cache)
|
||||
cache = [NSCache new];
|
||||
|
||||
@@ -56,6 +56,7 @@ SLOTS = (
|
||||
|
||||
SLOT_NAMES = {
|
||||
"ramsize": "RAM",
|
||||
"bios": "ROM",
|
||||
"sl0": "Slot 0",
|
||||
"sl1": "Slot 1",
|
||||
"sl2": "Slot 2",
|
||||
|
||||
+28
-16
@@ -415,6 +415,31 @@ def make_ram(machine):
|
||||
"options": options
|
||||
}
|
||||
|
||||
|
||||
|
||||
def make_bios(m):
|
||||
|
||||
options = [
|
||||
{
|
||||
"value": x.get("name"),
|
||||
"description": x.get("description")
|
||||
}
|
||||
for x in m.findall('./biosset')
|
||||
]
|
||||
|
||||
if not options: return None
|
||||
|
||||
options.insert(0, {"value": "", "description": "—Default—", "default": True })
|
||||
|
||||
return {
|
||||
"name": "bios",
|
||||
"description": SLOT_NAMES["bios"],
|
||||
"options": options
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
def make_smartport(machine):
|
||||
|
||||
|
||||
@@ -494,18 +519,6 @@ def make_slot(m, slotname, nodes):
|
||||
}
|
||||
|
||||
|
||||
def make_bios(m):
|
||||
|
||||
bios = []
|
||||
for x in m.findall('./biosset'):
|
||||
bios.append({
|
||||
"value": x.get("name"),
|
||||
"description": x.get("description")
|
||||
})
|
||||
|
||||
return bios
|
||||
|
||||
|
||||
|
||||
devices = {}
|
||||
|
||||
@@ -559,9 +572,11 @@ for m in machines:
|
||||
# ss = {}
|
||||
slots = []
|
||||
slots.append(make_ram(machine))
|
||||
x = make_bios(machine)
|
||||
if x: slots.append(x)
|
||||
|
||||
smartport = make_smartport(machine)
|
||||
if (smartport):
|
||||
if smartport:
|
||||
slots.append({
|
||||
"name": "smartport",
|
||||
"description": "Disk Drives",
|
||||
@@ -583,9 +598,6 @@ for m in machines:
|
||||
|
||||
data["slots"] = slots
|
||||
|
||||
bios = make_bios(machine)
|
||||
if bios: data["bios"] = bios
|
||||
|
||||
devices = make_devices()
|
||||
if smartport: devices.insert(0, smartport)
|
||||
data["devices"] = devices
|
||||
|
||||
Reference in new issue
Block a user