Compare commits

..
13 Commits
66 changed files with 870 additions and 95 deletions

No files matched your search

+15
View File
@@ -0,0 +1,15 @@
name: xcodebuild
on: [push, pull_request]
jobs:
build:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- name: build
run: xcodebuild -project "Ample.xcodeproj" -target "Ample Lite" | xcpretty
+10 -4
View File
@@ -100,6 +100,8 @@
B65085BC25B616AC00354EC9 /* maclc3.plist in Resources */ = {isa = PBXBuildFile; fileRef = B65085B725B616AC00354EC9 /* maclc3.plist */; };
B65085BD25B616AC00354EC9 /* maciici.plist in Resources */ = {isa = PBXBuildFile; fileRef = B65085B825B616AC00354EC9 /* maciici.plist */; };
B65085BE25B616AC00354EC9 /* maciici.plist in Resources */ = {isa = PBXBuildFile; fileRef = B65085B825B616AC00354EC9 /* maciici.plist */; };
B65D718625E70BD5008C5F87 /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B65D718525E70BD5008C5F87 /* WebKit.framework */; };
B65D718725E70BE5008C5F87 /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B65D718525E70BD5008C5F87 /* WebKit.framework */; };
B66236A924FD9A34006CABD7 /* PreferencesWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = B66236A824FD9A34006CABD7 /* PreferencesWindowController.m */; };
B66236B524FDA527006CABD7 /* SDL2.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = B66236B224FDA522006CABD7 /* SDL2.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
B66236C124FDB7A6006CABD7 /* Credits.rtf in Resources */ = {isa = PBXBuildFile; fileRef = B66236BF24FDB7A6006CABD7 /* Credits.rtf */; };
@@ -337,6 +339,7 @@
B65085B825B616AC00354EC9 /* maciici.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = maciici.plist; sourceTree = "<group>"; };
B65593AF24ECB61800722E0C /* SlotViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SlotViewController.h; sourceTree = "<group>"; };
B65593B024ECB61800722E0C /* SlotViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SlotViewController.m; sourceTree = "<group>"; };
B65D718525E70BD5008C5F87 /* WebKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebKit.framework; path = System/Library/Frameworks/WebKit.framework; sourceTree = SDKROOT; };
B66236A724FD9A34006CABD7 /* PreferencesWindowController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PreferencesWindowController.h; sourceTree = "<group>"; };
B66236A824FD9A34006CABD7 /* PreferencesWindowController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PreferencesWindowController.m; sourceTree = "<group>"; };
B66236B224FDA522006CABD7 /* SDL2.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SDL2.framework; path = embedded/SDL2.framework; sourceTree = "<group>"; };
@@ -392,6 +395,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
B65D718625E70BD5008C5F87 /* WebKit.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -399,6 +403,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
B65D718725E70BE5008C5F87 /* WebKit.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -481,6 +486,7 @@
B66236B624FDA686006CABD7 /* Frameworks */ = {
isa = PBXGroup;
children = (
B65D718525E70BD5008C5F87 /* WebKit.framework */,
B6841BDD251ECC29006A5C39 /* vmnet.framework */,
);
name = Frameworks;
@@ -1155,14 +1161,14 @@
CODE_SIGN_ENTITLEMENTS = Ample/Ample.entitlements;
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 9.1;
CURRENT_PROJECT_VERSION = 11;
FRAMEWORK_SEARCH_PATHS = "$(inherited)";
INFOPLIST_FILE = Ample/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/../Frameworks",
);
MARKETING_VERSION = "release 9-1";
MARKETING_VERSION = "release 11";
PRODUCT_BUNDLE_IDENTIFIER = com.ksherlock.ample;
PRODUCT_NAME = "$(TARGET_NAME)";
};
@@ -1175,14 +1181,14 @@
CODE_SIGN_ENTITLEMENTS = Ample/Ample.entitlements;
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 9.1;
CURRENT_PROJECT_VERSION = 11;
FRAMEWORK_SEARCH_PATHS = "$(inherited)";
INFOPLIST_FILE = Ample/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/../Frameworks",
);
MARKETING_VERSION = "release 9-1";
MARKETING_VERSION = "release 11";
PRODUCT_BUNDLE_IDENTIFIER = com.ksherlock.ample;
PRODUCT_NAME = "$(TARGET_NAME)";
};
+12
View File
@@ -11,9 +11,21 @@
#import <Cocoa/Cocoa.h>
/* ~/Library/ApplicationSupport/Ample/ */
NSURL *SupportDirectory(void);
NSString *SupportDirectoryPath(void);
/* mame executable URL */
NSURL *MameURL(void);
NSString *MamePath(void);
/* mame working directory */
NSURL *MameWorkingDirectory(void);
NSString *MameWorkingDirectoryPath(void);
NSDictionary *MameMachine(NSString *machine);
/* NSUserDefaults keys */
extern NSString *kUseCustomMame;
extern NSString *kMamePath;
+73
View File
@@ -35,6 +35,79 @@ NSString *SupportDirectoryPath(void) {
}
NSURL *MameURL(void) {
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
NSBundle *bundle = [NSBundle mainBundle];
if ([defaults boolForKey: kUseCustomMame]) {
NSString *path = [defaults stringForKey: kMamePath];
if (![path length]) return [NSURL fileURLWithPath: path];
}
return [bundle URLForAuxiliaryExecutable: @"mame64"];
}
NSString *MamePath(void) {
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
NSBundle *bundle = [NSBundle mainBundle];
NSString *path;
if ([defaults boolForKey: kUseCustomMame]) {
path = [defaults stringForKey: kMamePath];
if ([path length]) return path;
}
path = [bundle pathForAuxiliaryExecutable: @"mame64"];
if ([path length]) return path;
return nil;
}
NSURL *MameWorkingDirectory(void) {
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
if ([defaults boolForKey: kUseCustomMame]) {
NSString *path = [defaults stringForKey: kMameWorkingDirectory];
if (![path length]) return [NSURL fileURLWithPath: path];
}
return SupportDirectory();
}
NSString *MameWorkingDirectoryPath(void) {
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
if ([defaults boolForKey: kUseCustomMame]) {
NSString *path = [defaults stringForKey: kMameWorkingDirectory];
if (![path length]) return path;
}
return SupportDirectoryPath();
}
NSDictionary *MameMachine(NSString *machine) {
static NSMutableDictionary *cache;
if (!cache) cache = [NSMutableDictionary new];
NSDictionary *d;
if (!machine) return nil;
d = [cache objectForKey: machine];
if (d) return d;
NSBundle *bundle = [NSBundle mainBundle];
NSURL *url= [bundle URLForResource: machine withExtension: @"plist"];
d = [NSDictionary dictionaryWithContentsOfURL: url];
if (d) [cache setObject: d forKey: machine];
return d;
}
NSString *kUseCustomMame = @"UseCustomMame";
NSString *kMamePath = @"MamePath";
NSString *kMameWorkingDirectory = @"MameWorkingDirectory";
+6
View File
@@ -117,6 +117,12 @@
<action selector="revertDocumentToSaved:" target="-1" id="iJ3-Pv-kwq"/>
</connections>
</menuItem>
<menuItem title="Export Shell Script…" id="LmB-h2-UBZ">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="exportShellScript:" target="-1" id="9eU-do-ffz"/>
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="aJh-i4-bef"/>
<menuItem title="Page Setup…" keyEquivalent="P" id="qIS-W8-SiK">
<modifierMask key="keyEquivalentModifierMask" shift="YES" command="YES"/>
+1 -1
View File
@@ -30,7 +30,7 @@
[_webView setHidden: YES];
NSBundle *bundle = [NSBundle mainBundle];
NSURL *url = [bundle URLForResource: @"CheatSheet" withExtension: @"html"];
[[[_webView configuration] preferences] setValue: @YES forKey: @"developerExtrasEnabled"];
//[[[_webView configuration] preferences] setValue: @YES forKey: @"developerExtrasEnabled"];
[_webView loadFileURL: url allowingReadAccessToURL: url];
}
+1 -1
View File
@@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>MameComponentsDate</key>
<date>2020-12-31T17:00:00Z</date>
<date>2021-02-24T17:00:00Z</date>
<key>UseCustomMame</key>
<false/>
<key>AutoCloseLogWindow</key>
+124 -61
View File
@@ -13,6 +13,9 @@
#import "MachineViewController.h"
#import "LogWindowController.h"
#include <sys/stat.h>
static NSString *kMyContext = @"kMyContext";
static NSString *kContextMachine = @"kContextMachine";
@@ -120,39 +123,9 @@ static NSString *kContextMachine = @"kContextMachine";
}
static NSURL *MameURL(void) {
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
NSBundle *bundle = [NSBundle mainBundle];
if ([defaults boolForKey: kUseCustomMame]) {
NSString *path = [defaults stringForKey: kMamePath];
if (![path length]) return [NSURL fileURLWithPath: path];
}
return [bundle URLForAuxiliaryExecutable: @"mame64"];
return nil;
}
static NSString *MamePath(void) {
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
NSBundle *bundle = [NSBundle mainBundle];
NSString *path;
if ([defaults boolForKey: kUseCustomMame]) {
path = [defaults stringForKey: kMamePath];
if ([path length]) return path;
}
path = [bundle pathForAuxiliaryExecutable: @"mame64"];
if ([path length]) return path;
return nil;
}
static NSString * JoinArguments(NSArray *argv) {
static NSString * JoinArguments(NSArray *argv, NSString *argv0) {
static NSCharacterSet *safe = nil;
static NSCharacterSet *unsafe = nil;
@@ -172,9 +145,13 @@ static NSString * JoinArguments(NSArray *argv) {
//unsigned ix = 0;
//[rv appendString: @"mame"];
NSString *path = MamePath();
path = path ? [path lastPathComponent] : @"mame";
[rv appendString: path];
if (argv0) {
[rv appendString: argv0];
} else {
NSString *path = MamePath();
path = path ? [path lastPathComponent] : @"mame";
[rv appendString: path];
}
for (NSString *s in argv) {
[rv appendString: @" "];
NSUInteger l = [s length];
@@ -223,6 +200,67 @@ static NSString * JoinArguments(NSArray *argv) {
return rv;
}
static NSString *ShellQuote(NSString *s) {
static NSCharacterSet *safe = nil;
static NSCharacterSet *unsafe = nil;
if (!safe) {
NSString *str =
@"%+-./:=_"
@"0123456789"
@"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
;
safe = [NSCharacterSet characterSetWithCharactersInString: str];
unsafe = [safe invertedSet];
}
NSUInteger l = [s length];
if (!l) {
return @"''";
}
if (!CFStringFindCharacterFromSet((CFStringRef)s, (CFCharacterSetRef)unsafe, CFRangeMake(0, l), 0, NULL)) {
return s;
}
NSMutableString *rv = [NSMutableString new];
unichar *buffer = malloc(sizeof(unichar) * l);
[s getCharacters: buffer range: NSMakeRange(0, l)];
[rv appendString: @"'"];
for (NSUInteger i = 0; i < l; ++i) {
unichar c = buffer[i];
switch (c) {
case '\'':
[rv appendString: @"\\'"];
break;
case '\\':
[rv appendString: @"\\\\"];
break;
case 0x7f:
[rv appendString: @"\\177"];
break;
default: {
NSString *cc;
if (c < 0x20) {
cc = [NSString stringWithFormat: @"\\%o", c];
} else {
cc = [NSString stringWithCharacters: &c length: 1];
}
[rv appendString: cc];
break;
}
}
}
[rv appendString: @"'"];
free(buffer);
return rv;
}
-(void)buildCommandLine {
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
@@ -361,45 +399,70 @@ static NSString * JoinArguments(NSArray *argv) {
}
}
[self setCommandLine: JoinArguments(argv)];
[self setCommandLine: JoinArguments(argv, nil)];
[self setArgs: argv];
}
-(BOOL)validateMenuItem:(NSMenuItem *)menuItem {
SEL cmd = [menuItem action];
if (cmd == @selector(exportShellScript:)) {
return [_args count] ? YES : NO;
}
return [super validateMenuItem: menuItem];
}
# pragma mark - IBActions
- (IBAction)launchAction:(id)sender {
if (![_args count]) return;
[LogWindowController controllerForArgs: _args];
#if 0
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
NSURL *url = MameURL();
if (!url) {
NSAlert *alert = [NSAlert new];
[alert setMessageText: @"Unable to find MAME executable path"];
[alert runModal];
return;
}
NSTask *task = [NSTask new];
[task setExecutableURL: url];
[task setArguments: _args];
if (![defaults boolForKey: kUseCustomMame]) {
// run in Application Support/Ample.
[task setCurrentDirectoryURL: SupportDirectory()];
}
[LogWindowController controllerForTask: task];
#endif
}
-(IBAction)exportShellScript: (id)sender {
NSSavePanel *p = [NSSavePanel savePanel];
[p setTitle: @"Export Shell Script"];
[p setExtensionHidden: NO];
[p setNameFieldStringValue: @"mame.sh"];
//[p setDelegate: self];
NSWindow *w = [self window];
NSMutableString *data = [NSMutableString new];
[data appendString: @"#!/bin/sh\n\n"];
[data appendFormat: @"MAME=%@\n", ShellQuote(MamePath())];
[data appendFormat: @"cd %@\n", ShellQuote(MameWorkingDirectoryPath())];
[data appendString: JoinArguments(_args, @"$MAME")];
[data appendString: @"\n\n"];
[p beginSheetModalForWindow: w completionHandler: ^(NSModalResponse r) {
if (r != NSModalResponseOK) return;
NSURL *url = [p URL];
NSError *error = nil;
[data writeToURL: url atomically: YES encoding: NSUTF8StringEncoding error: &error];
[p orderOut: nil];
if (error) {
[self presentError: error];
return;
}
// chmod 755...
int ok = chmod([url fileSystemRepresentation], 0755);
if (ok < 0) {
// ...
}
}];
}
@end
+1 -27
View File
@@ -36,31 +36,6 @@ static NSMutableSet *LogWindows;
return controller;
}
static NSURL *MameURL(void) {
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
NSBundle *bundle = [NSBundle mainBundle];
if ([defaults boolForKey: kUseCustomMame]) {
NSString *path = [defaults stringForKey: kMamePath];
if (![path length]) return [NSURL fileURLWithPath: path];
}
return [bundle URLForAuxiliaryExecutable: @"mame64"];
}
static NSURL *MameWorkingDirectory(void) {
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
if ([defaults boolForKey: kUseCustomMame]) {
NSString *path = [defaults stringForKey: kMameWorkingDirectory];
if (![path length]) return [NSURL fileURLWithPath: path];
}
return SupportDirectory();
}
+(id)controllerForArgs: (NSArray *)args {
@@ -198,8 +173,7 @@ static NSURL *MameWorkingDirectory(void) {
}
else
{
string = @"\n\n[Caught signal]\n\n";
string = [NSString stringWithFormat: @"\n\n[Caught signal %d (%s)]\n\n", status, strsignal(status)];
}
[self appendString: string];
+7
View File
@@ -3666,5 +3666,12 @@
<false/>
</dict>
</array>
<key>software</key>
<array>
<string>apple2_flop_clcracked.xml</string>
<string>apple2_flop_orig.xml</string>
<string>apple2_flop_misc.xml</string>
<string>apple2_cass.xml</string>
</array>
</dict>
</plist>
+3
View File
@@ -349,5 +349,8 @@
<false/>
</dict>
</array>
<key>software</key>
<array>
</array>
</dict>
</plist>
+3
View File
@@ -443,5 +443,8 @@
<false/>
</dict>
</array>
<key>software</key>
<array>
</array>
</dict>
</plist>
+7
View File
@@ -3606,5 +3606,12 @@
<false/>
</dict>
</array>
<key>software</key>
<array>
<string>apple2_flop_clcracked.xml</string>
<string>apple2_flop_orig.xml</string>
<string>apple2_flop_misc.xml</string>
<string>apple2_cass.xml</string>
</array>
</dict>
</plist>
+7
View File
@@ -3606,5 +3606,12 @@
<false/>
</dict>
</array>
<key>software</key>
<array>
<string>apple2_flop_clcracked.xml</string>
<string>apple2_flop_orig.xml</string>
<string>apple2_flop_misc.xml</string>
<string>apple2_cass.xml</string>
</array>
</dict>
</plist>
+7
View File
@@ -3606,5 +3606,12 @@
<false/>
</dict>
</array>
<key>software</key>
<array>
<string>apple2_flop_clcracked.xml</string>
<string>apple2_flop_orig.xml</string>
<string>apple2_flop_misc.xml</string>
<string>apple2_cass.xml</string>
</array>
</dict>
</plist>
+4
View File
@@ -174,5 +174,9 @@
</dict>
</dict>
</array>
<key>software</key>
<array>
<string>apple1.xml</string>
</array>
</dict>
</plist>
+7
View File
@@ -3666,5 +3666,12 @@
<false/>
</dict>
</array>
<key>software</key>
<array>
<string>apple2_flop_clcracked.xml</string>
<string>apple2_flop_orig.xml</string>
<string>apple2_flop_misc.xml</string>
<string>apple2_cass.xml</string>
</array>
</dict>
</plist>
+22
View File
@@ -98,6 +98,14 @@
<key>default</key>
<false/>
</dict>
<dict>
<key>value</key>
<string>rs_printer</string>
<key>description</key>
<string>Radio Shack Serial Printer</string>
<key>default</key>
<false/>
</dict>
<dict>
<key>value</key>
<string>loopback</string>
@@ -189,6 +197,14 @@
<key>default</key>
<false/>
</dict>
<dict>
<key>value</key>
<string>rs_printer</string>
<key>description</key>
<string>Radio Shack Serial Printer</string>
<key>default</key>
<false/>
</dict>
<dict>
<key>value</key>
<string>loopback</string>
@@ -254,5 +270,11 @@
<false/>
</dict>
</array>
<key>software</key>
<array>
<string>apple2_flop_clcracked.xml</string>
<string>apple2_flop_orig.xml</string>
<string>apple2_flop_misc.xml</string>
</array>
</dict>
</plist>
+22
View File
@@ -140,6 +140,14 @@
<key>default</key>
<false/>
</dict>
<dict>
<key>value</key>
<string>rs_printer</string>
<key>description</key>
<string>Radio Shack Serial Printer</string>
<key>default</key>
<false/>
</dict>
<dict>
<key>value</key>
<string>loopback</string>
@@ -231,6 +239,14 @@
<key>default</key>
<false/>
</dict>
<dict>
<key>value</key>
<string>rs_printer</string>
<key>description</key>
<string>Radio Shack Serial Printer</string>
<key>default</key>
<false/>
</dict>
<dict>
<key>value</key>
<string>loopback</string>
@@ -296,5 +312,11 @@
<false/>
</dict>
</array>
<key>software</key>
<array>
<string>apple2_flop_clcracked.xml</string>
<string>apple2_flop_orig.xml</string>
<string>apple2_flop_misc.xml</string>
</array>
</dict>
</plist>
+6
View File
@@ -4097,5 +4097,11 @@
<false/>
</dict>
</array>
<key>software</key>
<array>
<string>apple2_flop_clcracked.xml</string>
<string>apple2_flop_orig.xml</string>
<string>apple2_flop_misc.xml</string>
</array>
</dict>
</plist>
+6
View File
@@ -4097,5 +4097,11 @@
<false/>
</dict>
</array>
<key>software</key>
<array>
<string>apple2_flop_clcracked.xml</string>
<string>apple2_flop_orig.xml</string>
<string>apple2_flop_misc.xml</string>
</array>
</dict>
</plist>
+6
View File
@@ -4097,5 +4097,11 @@
<false/>
</dict>
</array>
<key>software</key>
<array>
<string>apple2_flop_clcracked.xml</string>
<string>apple2_flop_orig.xml</string>
<string>apple2_flop_misc.xml</string>
</array>
</dict>
</plist>
+6
View File
@@ -4097,5 +4097,11 @@
<false/>
</dict>
</array>
<key>software</key>
<array>
<string>apple2_flop_clcracked.xml</string>
<string>apple2_flop_orig.xml</string>
<string>apple2_flop_misc.xml</string>
</array>
</dict>
</plist>
+6
View File
@@ -4097,5 +4097,11 @@
<false/>
</dict>
</array>
<key>software</key>
<array>
<string>apple2_flop_clcracked.xml</string>
<string>apple2_flop_orig.xml</string>
<string>apple2_flop_misc.xml</string>
</array>
</dict>
</plist>
+6
View File
@@ -4097,5 +4097,11 @@
<false/>
</dict>
</array>
<key>software</key>
<array>
<string>apple2_flop_clcracked.xml</string>
<string>apple2_flop_orig.xml</string>
<string>apple2_flop_misc.xml</string>
</array>
</dict>
</plist>
+6
View File
@@ -4097,5 +4097,11 @@
<false/>
</dict>
</array>
<key>software</key>
<array>
<string>apple2_flop_clcracked.xml</string>
<string>apple2_flop_orig.xml</string>
<string>apple2_flop_misc.xml</string>
</array>
</dict>
</plist>
+23
View File
@@ -3572,6 +3572,14 @@
<key>default</key>
<false/>
</dict>
<dict>
<key>value</key>
<string>rs_printer</string>
<key>description</key>
<string>Radio Shack Serial Printer</string>
<key>default</key>
<false/>
</dict>
<dict>
<key>value</key>
<string>loopback</string>
@@ -3663,6 +3671,14 @@
<key>default</key>
<false/>
</dict>
<dict>
<key>value</key>
<string>rs_printer</string>
<key>description</key>
<string>Radio Shack Serial Printer</string>
<key>default</key>
<false/>
</dict>
<dict>
<key>value</key>
<string>loopback</string>
@@ -3728,5 +3744,12 @@
<false/>
</dict>
</array>
<key>software</key>
<array>
<string>apple2gs.xml</string>
<string>apple2_flop_clcracked.xml</string>
<string>apple2_flop_orig.xml</string>
<string>apple2_flop_misc.xml</string>
</array>
</dict>
</plist>
+23
View File
@@ -3612,6 +3612,14 @@
<key>default</key>
<false/>
</dict>
<dict>
<key>value</key>
<string>rs_printer</string>
<key>description</key>
<string>Radio Shack Serial Printer</string>
<key>default</key>
<false/>
</dict>
<dict>
<key>value</key>
<string>loopback</string>
@@ -3703,6 +3711,14 @@
<key>default</key>
<false/>
</dict>
<dict>
<key>value</key>
<string>rs_printer</string>
<key>description</key>
<string>Radio Shack Serial Printer</string>
<key>default</key>
<false/>
</dict>
<dict>
<key>value</key>
<string>loopback</string>
@@ -3768,5 +3784,12 @@
<false/>
</dict>
</array>
<key>software</key>
<array>
<string>apple2gs.xml</string>
<string>apple2_flop_clcracked.xml</string>
<string>apple2_flop_orig.xml</string>
<string>apple2_flop_misc.xml</string>
</array>
</dict>
</plist>
+23
View File
@@ -3612,6 +3612,14 @@
<key>default</key>
<false/>
</dict>
<dict>
<key>value</key>
<string>rs_printer</string>
<key>description</key>
<string>Radio Shack Serial Printer</string>
<key>default</key>
<false/>
</dict>
<dict>
<key>value</key>
<string>loopback</string>
@@ -3703,6 +3711,14 @@
<key>default</key>
<false/>
</dict>
<dict>
<key>value</key>
<string>rs_printer</string>
<key>description</key>
<string>Radio Shack Serial Printer</string>
<key>default</key>
<false/>
</dict>
<dict>
<key>value</key>
<string>loopback</string>
@@ -3768,5 +3784,12 @@
<false/>
</dict>
</array>
<key>software</key>
<array>
<string>apple2gs.xml</string>
<string>apple2_flop_clcracked.xml</string>
<string>apple2_flop_orig.xml</string>
<string>apple2_flop_misc.xml</string>
</array>
</dict>
</plist>
+7
View File
@@ -3606,5 +3606,12 @@
<false/>
</dict>
</array>
<key>software</key>
<array>
<string>apple2_flop_clcracked.xml</string>
<string>apple2_flop_orig.xml</string>
<string>apple2_flop_misc.xml</string>
<string>apple2_cass.xml</string>
</array>
</dict>
</plist>
+7
View File
@@ -3606,5 +3606,12 @@
<false/>
</dict>
</array>
<key>software</key>
<array>
<string>apple2_flop_clcracked.xml</string>
<string>apple2_flop_orig.xml</string>
<string>apple2_flop_misc.xml</string>
<string>apple2_cass.xml</string>
</array>
</dict>
</plist>
+12
View File
@@ -359,6 +359,14 @@
<key>default</key>
<false/>
</dict>
<dict>
<key>value</key>
<string>rs_printer</string>
<key>description</key>
<string>Radio Shack Serial Printer</string>
<key>default</key>
<false/>
</dict>
<dict>
<key>value</key>
<string>loopback</string>
@@ -424,5 +432,9 @@
<false/>
</dict>
</array>
<key>software</key>
<array>
<string>apple3.xml</string>
</array>
</dict>
</plist>
+7
View File
@@ -3666,5 +3666,12 @@
<false/>
</dict>
</array>
<key>software</key>
<array>
<string>apple2_flop_clcracked.xml</string>
<string>apple2_flop_orig.xml</string>
<string>apple2_flop_misc.xml</string>
<string>apple2_cass.xml</string>
</array>
</dict>
</plist>
+7
View File
@@ -2922,5 +2922,12 @@
<false/>
</dict>
</array>
<key>software</key>
<array>
<string>apple2_flop_clcracked.xml</string>
<string>apple2_flop_orig.xml</string>
<string>apple2_flop_misc.xml</string>
<string>cecflop.xml</string>
</array>
</dict>
</plist>
+7
View File
@@ -2922,5 +2922,12 @@
<false/>
</dict>
</array>
<key>software</key>
<array>
<string>apple2_flop_clcracked.xml</string>
<string>apple2_flop_orig.xml</string>
<string>apple2_flop_misc.xml</string>
<string>cecflop.xml</string>
</array>
</dict>
</plist>
+7
View File
@@ -2922,5 +2922,12 @@
<false/>
</dict>
</array>
<key>software</key>
<array>
<string>apple2_flop_clcracked.xml</string>
<string>apple2_flop_orig.xml</string>
<string>apple2_flop_misc.xml</string>
<string>cecflop.xml</string>
</array>
</dict>
</plist>
+7
View File
@@ -2922,5 +2922,12 @@
<false/>
</dict>
</array>
<key>software</key>
<array>
<string>apple2_flop_clcracked.xml</string>
<string>apple2_flop_orig.xml</string>
<string>apple2_flop_misc.xml</string>
<string>cecflop.xml</string>
</array>
</dict>
</plist>
+7
View File
@@ -2922,5 +2922,12 @@
<false/>
</dict>
</array>
<key>software</key>
<array>
<string>apple2_flop_clcracked.xml</string>
<string>apple2_flop_orig.xml</string>
<string>apple2_flop_misc.xml</string>
<string>cecflop.xml</string>
</array>
</dict>
</plist>
+7
View File
@@ -3606,5 +3606,12 @@
<false/>
</dict>
</array>
<key>software</key>
<array>
<string>apple2_flop_clcracked.xml</string>
<string>apple2_flop_orig.xml</string>
<string>apple2_flop_misc.xml</string>
<string>apple2_cass.xml</string>
</array>
</dict>
</plist>
+7
View File
@@ -3606,5 +3606,12 @@
<false/>
</dict>
</array>
<key>software</key>
<array>
<string>apple2_flop_clcracked.xml</string>
<string>apple2_flop_orig.xml</string>
<string>apple2_flop_misc.xml</string>
<string>apple2_cass.xml</string>
</array>
</dict>
</plist>
+7
View File
@@ -3606,5 +3606,12 @@
<false/>
</dict>
</array>
<key>software</key>
<array>
<string>apple2_flop_clcracked.xml</string>
<string>apple2_flop_orig.xml</string>
<string>apple2_flop_misc.xml</string>
<string>apple2_cass.xml</string>
</array>
</dict>
</plist>
+7
View File
@@ -3606,5 +3606,12 @@
<false/>
</dict>
</array>
<key>software</key>
<array>
<string>apple2_flop_clcracked.xml</string>
<string>apple2_flop_orig.xml</string>
<string>apple2_flop_misc.xml</string>
<string>apple2_cass.xml</string>
</array>
</dict>
</plist>
+7
View File
@@ -3606,5 +3606,12 @@
<false/>
</dict>
</array>
<key>software</key>
<array>
<string>apple2_flop_clcracked.xml</string>
<string>apple2_flop_orig.xml</string>
<string>apple2_flop_misc.xml</string>
<string>apple2_cass.xml</string>
</array>
</dict>
</plist>
+22
View File
@@ -138,6 +138,14 @@
<key>default</key>
<false/>
</dict>
<dict>
<key>value</key>
<string>rs_printer</string>
<key>description</key>
<string>Radio Shack Serial Printer</string>
<key>default</key>
<false/>
</dict>
<dict>
<key>value</key>
<string>loopback</string>
@@ -229,6 +237,14 @@
<key>default</key>
<false/>
</dict>
<dict>
<key>value</key>
<string>rs_printer</string>
<key>description</key>
<string>Radio Shack Serial Printer</string>
<key>default</key>
<false/>
</dict>
<dict>
<key>value</key>
<string>loopback</string>
@@ -294,5 +310,11 @@
<false/>
</dict>
</array>
<key>software</key>
<array>
<string>apple2_flop_clcracked.xml</string>
<string>apple2_flop_orig.xml</string>
<string>apple2_flop_misc.xml</string>
</array>
</dict>
</plist>
+22
View File
@@ -1278,6 +1278,14 @@
<key>default</key>
<false/>
</dict>
<dict>
<key>value</key>
<string>rs_printer</string>
<key>description</key>
<string>Radio Shack Serial Printer</string>
<key>default</key>
<false/>
</dict>
<dict>
<key>value</key>
<string>loopback</string>
@@ -1369,6 +1377,14 @@
<key>default</key>
<false/>
</dict>
<dict>
<key>value</key>
<string>rs_printer</string>
<key>description</key>
<string>Radio Shack Serial Printer</string>
<key>default</key>
<false/>
</dict>
<dict>
<key>value</key>
<string>loopback</string>
@@ -1434,5 +1450,11 @@
<false/>
</dict>
</array>
<key>software</key>
<array>
<string>apple2_flop_clcracked.xml</string>
<string>apple2_flop_orig.xml</string>
<string>apple2_flop_misc.xml</string>
</array>
</dict>
</plist>
+22
View File
@@ -1278,6 +1278,14 @@
<key>default</key>
<false/>
</dict>
<dict>
<key>value</key>
<string>rs_printer</string>
<key>description</key>
<string>Radio Shack Serial Printer</string>
<key>default</key>
<false/>
</dict>
<dict>
<key>value</key>
<string>loopback</string>
@@ -1369,6 +1377,14 @@
<key>default</key>
<false/>
</dict>
<dict>
<key>value</key>
<string>rs_printer</string>
<key>description</key>
<string>Radio Shack Serial Printer</string>
<key>default</key>
<false/>
</dict>
<dict>
<key>value</key>
<string>loopback</string>
@@ -1434,5 +1450,11 @@
<false/>
</dict>
</array>
<key>software</key>
<array>
<string>apple2_flop_clcracked.xml</string>
<string>apple2_flop_orig.xml</string>
<string>apple2_flop_misc.xml</string>
</array>
</dict>
</plist>
+7
View File
@@ -3606,5 +3606,12 @@
<false/>
</dict>
</array>
<key>software</key>
<array>
<string>apple2_flop_clcracked.xml</string>
<string>apple2_flop_orig.xml</string>
<string>apple2_flop_misc.xml</string>
<string>apple2_cass.xml</string>
</array>
</dict>
</plist>
+5
View File
@@ -533,5 +533,10 @@
<false/>
</dict>
</array>
<key>software</key>
<array>
<string>mac_hdd.xml</string>
<string>mac_flop.xml</string>
</array>
</dict>
</plist>
+5
View File
@@ -71,5 +71,10 @@
<integer>640</integer>
<integer>480</integer>
</array>
<key>software</key>
<array>
<string>mac_hdd.xml</string>
<string>mac_flop.xml</string>
</array>
</dict>
</plist>
+5
View File
@@ -61,5 +61,10 @@
<integer>640</integer>
<integer>480</integer>
</array>
<key>software</key>
<array>
<string>mac_hdd.xml</string>
<string>mac_flop.xml</string>
</array>
</dict>
</plist>
+5
View File
@@ -91,5 +91,10 @@
<integer>640</integer>
<integer>480</integer>
</array>
<key>software</key>
<array>
<string>mac_hdd.xml</string>
<string>mac_flop.xml</string>
</array>
</dict>
</plist>
+7
View File
@@ -3606,5 +3606,12 @@
<false/>
</dict>
</array>
<key>software</key>
<array>
<string>apple2_flop_clcracked.xml</string>
<string>apple2_flop_orig.xml</string>
<string>apple2_flop_misc.xml</string>
<string>apple2_cass.xml</string>
</array>
</dict>
</plist>
+7
View File
@@ -3606,5 +3606,12 @@
<false/>
</dict>
</array>
<key>software</key>
<array>
<string>apple2_flop_clcracked.xml</string>
<string>apple2_flop_orig.xml</string>
<string>apple2_flop_misc.xml</string>
<string>apple2_cass.xml</string>
</array>
</dict>
</plist>
+6
View File
@@ -4097,5 +4097,11 @@
<false/>
</dict>
</array>
<key>software</key>
<array>
<string>apple2_flop_clcracked.xml</string>
<string>apple2_flop_orig.xml</string>
<string>apple2_flop_misc.xml</string>
</array>
</dict>
</plist>
+7
View File
@@ -3606,5 +3606,12 @@
<false/>
</dict>
</array>
<key>software</key>
<array>
<string>apple2_flop_clcracked.xml</string>
<string>apple2_flop_orig.xml</string>
<string>apple2_flop_misc.xml</string>
<string>apple2_cass.xml</string>
</array>
</dict>
</plist>
+6
View File
@@ -4097,5 +4097,11 @@
<false/>
</dict>
</array>
<key>software</key>
<array>
<string>apple2_flop_clcracked.xml</string>
<string>apple2_flop_orig.xml</string>
<string>apple2_flop_misc.xml</string>
</array>
</dict>
</plist>
+7
View File
@@ -3606,5 +3606,12 @@
<false/>
</dict>
</array>
<key>software</key>
<array>
<string>apple2_flop_clcracked.xml</string>
<string>apple2_flop_orig.xml</string>
<string>apple2_flop_misc.xml</string>
<string>apple2_cass.xml</string>
</array>
</dict>
</plist>
+19 -1
View File
@@ -28,7 +28,6 @@
<string>a2mouse</string>
<string>a2parprn</string>
<string>a2pic</string>
<string>a2pic</string>
<string>a2ramfac</string>
<string>a2scsi</string>
<string>a2sider1</string>
@@ -50,7 +49,11 @@
<string>a2vuliie</string>
<string>a2zipdrv</string>
<string>a3fdc</string>
<string>agat7_flop</string>
<string>agat840k_hle</string>
<string>agat9_flop</string>
<string>agat_fdc</string>
<string>ap2000</string>
<string>apple1</string>
<string>apple2</string>
<string>apple2c</string>
@@ -64,17 +67,30 @@
<string>cecg</string>
<string>ceci</string>
<string>cecm</string>
<string>cffa1</string>
<string>cga</string>
<string>chessmachine</string>
<string>cmsscsi</string>
<string>comx_pl80</string>
<string>d2fdc</string>
<string>diskii13</string>
<string>egret</string>
<string>ex800</string>
<string>ie15_device</string>
<string>ie15kbd</string>
<string>kb_ec1841</string>
<string>kb_iskr1030</string>
<string>kb_pc83</string>
<string>kb_pcxt83</string>
<string>keytronic_pc3270</string>
<string>lx800</string>
<string>lx810l</string>
<string>m68705p3</string>
<string>maciici</string>
<string>maclc</string>
<string>maclc2</string>
<string>maclc3</string>
<string>nb_48gc</string>
<string>nb_824gc</string>
<string>nb_aenet</string>
<string>nb_amc3b</string>
@@ -90,7 +106,9 @@
<string>nb_spdq</string>
<string>nb_vikbw</string>
<string>nb_wspt</string>
<string>p72</string>
<string>qsound</string>
<string>swtpc8212_device</string>
<string>votrax</string>
<string>ym2608</string>
<string>zijini</string>
+7
View File
@@ -3606,5 +3606,12 @@
<false/>
</dict>
</array>
<key>software</key>
<array>
<string>apple2_flop_clcracked.xml</string>
<string>apple2_flop_orig.xml</string>
<string>apple2_flop_misc.xml</string>
<string>apple2_cass.xml</string>
</array>
</dict>
</plist>
+6
View File
@@ -4097,5 +4097,11 @@
<false/>
</dict>
</array>
<key>software</key>
<array>
<string>apple2_flop_clcracked.xml</string>
<string>apple2_flop_orig.xml</string>
<string>apple2_flop_misc.xml</string>
</array>
</dict>
</plist>
+7
View File
@@ -3606,5 +3606,12 @@
<false/>
</dict>
</array>
<key>software</key>
<array>
<string>apple2_flop_clcracked.xml</string>
<string>apple2_flop_orig.xml</string>
<string>apple2_flop_misc.xml</string>
<string>apple2_cass.xml</string>
</array>
</dict>
</plist>
+7
View File
@@ -3606,5 +3606,12 @@
<false/>
</dict>
</array>
<key>software</key>
<array>
<string>apple2_flop_clcracked.xml</string>
<string>apple2_flop_orig.xml</string>
<string>apple2_flop_misc.xml</string>
<string>apple2_cass.xml</string>
</array>
</dict>
</plist>
+7
View File
@@ -3606,5 +3606,12 @@
<false/>
</dict>
</array>
<key>software</key>
<array>
<string>apple2_flop_clcracked.xml</string>
<string>apple2_flop_orig.xml</string>
<string>apple2_flop_misc.xml</string>
<string>apple2_cass.xml</string>
</array>
</dict>
</plist>
+7
View File
@@ -2922,5 +2922,12 @@
<false/>
</dict>
</array>
<key>software</key>
<array>
<string>apple2_flop_clcracked.xml</string>
<string>apple2_flop_orig.xml</string>
<string>apple2_flop_misc.xml</string>
<string>cecflop.xml</string>
</array>
</dict>
</plist>
+13
View File
@@ -79,9 +79,14 @@ def find_machine_media(parent):
# apple2c - tag="sl6:0:525" - <slot name="sl:0">.
# apple3 - tag="0:525" - <slot name="0">
# .229 apple2gs:
# <device type="floppydisk" tag="fdc:0:525" interface="floppy_5_25">
# <device type="floppydisk" tag="fdc:2:35dd" interface="floppy_3_5">
# format slot name : slotoption name : machine->device type name
if mname == "apple2c" and slot == "sl6": slot = None
if slot=="fdc": slot = None # .229 IIgs
# hack for now - these are scsi:1-7 slots but slot option isn't adjustable.
if mname[0:3] == "mac" and slot == "scsi": slot = None
@@ -167,6 +172,11 @@ def find_media(parent, include_slots=False):
if not media: return None
return media
def find_software(parent):
swl = parent.findall("./softwarelist")
return [x.get("name") + ".xml" for x in swl]
devices = {}
p = argparse.ArgumentParser()
@@ -256,6 +266,9 @@ for m in machines:
data[s] = tmp
data["software"] = find_software(machine)
path = "../Ample/Resources/{}.plist".format(m)
with open(path, "w") as f:
f.write(to_plist(data))
+118
View File
@@ -0,0 +1,118 @@
import argparse
import subprocess
from plist import to_plist
import xml.etree.ElementTree as ET
from machines import MACHINES
# a2pcxport dependencies. not automatically included though
# (would need to manually pull devnames from a2pcxport then)
# listxml for them.
EXTRA_MACHINES = [
'vgmplay',
'cga',
'kb_iskr1030',
'kb_ec1841',
'kb_pc83',
'kb_pcxt83',
'keytronic_pc3270',
]
p = argparse.ArgumentParser()
p.add_argument('machine', nargs="*")
args = p.parse_args()
machines = args.machine
if not machines: machines = [ *MACHINES, *EXTRA_MACHINES]
# roms stored in other files.
EXCLUDE = [
'ace100',
'agat7',
'agat9',
'albert',
'am100',
'am64',
'apple2cp',
'apple2ee',
'apple2eefr',
'apple2ees',
'apple2eeuk',
'apple2ep',
'apple2euk',
'apple2gsr0',
'apple2gsr1',
'apple2jp',
'apple2p',
'basis108',
'craft2p',
'dodo',
'elppa',
'hkc8800a',
'ivelultr',
'las128e2',
'las128ex',
'laser128',
'laser2c',
'maxxi',
'microeng',
'mprof3',
'prav82',
'prav8c',
'prav8m',
'space84',
'spectred',
'uniap2en',
'uniap2pt',
'uniap2ti',
]
mnames = set()
rnames = set()
for m in machines:
print(m)
env = {'DYLD_FALLBACK_FRAMEWORK_PATH': '../embedded'}
st = subprocess.run(["../embedded/mame64", m, "-listxml"], capture_output=True, env=env)
if st.returncode != 0:
print("mame error: {}".format(m))
exit(1)
data = { }
xml = st.stdout
root = ET.fromstring(xml)
# find machines that have a rom child
for x in root.findall('machine/rom/..'):
mnames.add(x.get('name'))
for y in x.findall('./rom'):
rnames.add(y.get('name'))
# print("\n\n\n")
# ll = list(mnames.difference(EXCLUDE))
# ll.sort()
# for x in ll:
# print(x)
ROMS = list(mnames.difference(EXCLUDE))
ROMS.sort()
data = {}
data["source"] = "https://archive.org/download/mame0.224"
data["type"] = "zip"
data["version"] = "0.224"
data["roms"] = ROMS
# print(ROMS)
with open("../Ample/Resources/roms.plist", "w") as f:
f.write(to_plist(data))