Added Xcode source

This commit is contained in:
Eric Rangell 2018-07-19 15:49:09 -05:00
parent a6492183f9
commit 9d98707478
25 changed files with 1946 additions and 0 deletions

View File

@ -0,0 +1,389 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 50;
objects = {
/* Begin PBXBuildFile section */
2CCAF71F20FE1CC400158FD9 /* main.s in Sources */ = {isa = PBXBuildFile; fileRef = 2CCAF71E20FE1CC400158FD9 /* main.s */; };
2CCAF72120FE1CC400158FD9 /* Makefile in Sources */ = {isa = PBXBuildFile; fileRef = 2CCAF72020FE1CC400158FD9 /* Makefile */; };
2CCAF72420FE1CC400158FD9 /* AppleCommander.jar in Frameworks */ = {isa = PBXBuildFile; fileRef = 2CCAF72320FE1CC400158FD9 /* AppleCommander.jar */; };
2CCAF72620FE1CC400158FD9 /* createDiskImage in CopyFiles */ = {isa = PBXBuildFile; fileRef = 2CCAF72520FE1CC400158FD9 /* createDiskImage */; };
2CCAF72820FE1CC400158FD9 /* DevApple.vii in CopyFiles */ = {isa = PBXBuildFile; fileRef = 2CCAF72720FE1CC400158FD9 /* DevApple.vii */; };
2CCAF72A20FE1CC400158FD9 /* dos33_template.dsk in CopyFiles */ = {isa = PBXBuildFile; fileRef = 2CCAF72920FE1CC400158FD9 /* dos33_template.dsk */; };
2CCAF72C20FE1CC400158FD9 /* errorFilter.sh in CopyFiles */ = {isa = PBXBuildFile; fileRef = 2CCAF72B20FE1CC400158FD9 /* errorFilter.sh */; };
2CCAF72E20FE1CC400158FD9 /* head.mk in CopyFiles */ = {isa = PBXBuildFile; fileRef = 2CCAF72D20FE1CC400158FD9 /* head.mk */; };
2CCAF73020FE1CC400158FD9 /* prodos_template.dsk in CopyFiles */ = {isa = PBXBuildFile; fileRef = 2CCAF72F20FE1CC400158FD9 /* prodos_template.dsk */; };
2CCAF73220FE1CC400158FD9 /* tail.mk in CopyFiles */ = {isa = PBXBuildFile; fileRef = 2CCAF73120FE1CC400158FD9 /* tail.mk */; };
2CCAF73420FE1CC400158FD9 /* V2Make.scpt in CopyFiles */ = {isa = PBXBuildFile; fileRef = 2CCAF73320FE1CC400158FD9 /* V2Make.scpt */; };
2CCAF73720FE1CC400158FD9 /* A2NoSlotMidi.xcscheme in CopyFiles */ = {isa = PBXBuildFile; fileRef = 2CCAF73620FE1CC400158FD9 /* A2NoSlotMidi.xcscheme */; };
/* End PBXBuildFile section */
/* Begin PBXCopyFilesBuildPhase section */
2CCAF71920FE1CC400158FD9 /* CopyFiles */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = /usr/share/man/man1/;
dstSubfolderSpec = 0;
files = (
2CCAF72620FE1CC400158FD9 /* createDiskImage in CopyFiles */,
2CCAF73420FE1CC400158FD9 /* V2Make.scpt in CopyFiles */,
2CCAF72E20FE1CC400158FD9 /* head.mk in CopyFiles */,
2CCAF73720FE1CC400158FD9 /* A2NoSlotMidi.xcscheme in CopyFiles */,
2CCAF72820FE1CC400158FD9 /* DevApple.vii in CopyFiles */,
2CCAF73220FE1CC400158FD9 /* tail.mk in CopyFiles */,
2CCAF73020FE1CC400158FD9 /* prodos_template.dsk in CopyFiles */,
2CCAF72A20FE1CC400158FD9 /* dos33_template.dsk in CopyFiles */,
2CCAF72C20FE1CC400158FD9 /* errorFilter.sh in CopyFiles */,
);
runOnlyForDeploymentPostprocessing = 1;
};
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
2CCAF71B20FE1CC400158FD9 /* doNotBuild */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = doNotBuild; sourceTree = BUILT_PRODUCTS_DIR; };
2CCAF71E20FE1CC400158FD9 /* main.s */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.asm; path = main.s; sourceTree = "<group>"; };
2CCAF72020FE1CC400158FD9 /* Makefile */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.make; path = Makefile; sourceTree = "<group>"; };
2CCAF72320FE1CC400158FD9 /* AppleCommander.jar */ = {isa = PBXFileReference; lastKnownFileType = archive.jar; name = AppleCommander.jar; path = make/AppleCommander.jar; sourceTree = "<group>"; };
2CCAF72520FE1CC400158FD9 /* createDiskImage */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; name = createDiskImage; path = make/createDiskImage; sourceTree = "<group>"; };
2CCAF72720FE1CC400158FD9 /* DevApple.vii */ = {isa = PBXFileReference; lastKnownFileType = file.bplist; name = DevApple.vii; path = make/DevApple.vii; sourceTree = "<group>"; };
2CCAF72920FE1CC400158FD9 /* dos33_template.dsk */ = {isa = PBXFileReference; lastKnownFileType = file; name = dos33_template.dsk; path = make/dos33_template.dsk; sourceTree = "<group>"; };
2CCAF72B20FE1CC400158FD9 /* errorFilter.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; name = errorFilter.sh; path = make/errorFilter.sh; sourceTree = "<group>"; };
2CCAF72D20FE1CC400158FD9 /* head.mk */ = {isa = PBXFileReference; lastKnownFileType = text; name = head.mk; path = make/head.mk; sourceTree = "<group>"; };
2CCAF72F20FE1CC400158FD9 /* prodos_template.dsk */ = {isa = PBXFileReference; lastKnownFileType = file; name = prodos_template.dsk; path = make/prodos_template.dsk; sourceTree = "<group>"; };
2CCAF73120FE1CC400158FD9 /* tail.mk */ = {isa = PBXFileReference; lastKnownFileType = text; name = tail.mk; path = make/tail.mk; sourceTree = "<group>"; };
2CCAF73320FE1CC400158FD9 /* V2Make.scpt */ = {isa = PBXFileReference; lastKnownFileType = file; name = V2Make.scpt; path = make/V2Make.scpt; sourceTree = "<group>"; };
2CCAF73620FE1CC400158FD9 /* A2NoSlotMidi.xcscheme */ = {isa = PBXFileReference; lastKnownFileType = text.xml; name = A2NoSlotMidi.xcscheme; path = A2NoSlotMidi.xcodeproj/xcshareddata/xcschemes/A2NoSlotMidi.xcscheme; sourceTree = SOURCE_ROOT; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
2CCAF71820FE1CC400158FD9 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
2CCAF72420FE1CC400158FD9 /* AppleCommander.jar in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
2CCAF71120FE1CC400158FD9 = {
isa = PBXGroup;
children = (
2CCAF71D20FE1CC400158FD9 /* A2NoSlotMidi */,
2CCAF71C20FE1CC400158FD9 /* Products */,
);
sourceTree = "<group>";
};
2CCAF71C20FE1CC400158FD9 /* Products */ = {
isa = PBXGroup;
children = (
2CCAF71B20FE1CC400158FD9 /* doNotBuild */,
);
name = Products;
sourceTree = "<group>";
};
2CCAF71D20FE1CC400158FD9 /* A2NoSlotMidi */ = {
isa = PBXGroup;
children = (
2CCAF71E20FE1CC400158FD9 /* main.s */,
2CCAF72020FE1CC400158FD9 /* Makefile */,
2CCAF72220FE1CC400158FD9 /* make */,
2CCAF73520FE1CC400158FD9 /* Supporting Files */,
);
path = A2NoSlotMidi;
sourceTree = "<group>";
};
2CCAF72220FE1CC400158FD9 /* make */ = {
isa = PBXGroup;
children = (
2CCAF72320FE1CC400158FD9 /* AppleCommander.jar */,
2CCAF72520FE1CC400158FD9 /* createDiskImage */,
2CCAF72720FE1CC400158FD9 /* DevApple.vii */,
2CCAF72920FE1CC400158FD9 /* dos33_template.dsk */,
2CCAF72B20FE1CC400158FD9 /* errorFilter.sh */,
2CCAF72D20FE1CC400158FD9 /* head.mk */,
2CCAF72F20FE1CC400158FD9 /* prodos_template.dsk */,
2CCAF73120FE1CC400158FD9 /* tail.mk */,
2CCAF73320FE1CC400158FD9 /* V2Make.scpt */,
);
name = make;
sourceTree = "<group>";
};
2CCAF73520FE1CC400158FD9 /* Supporting Files */ = {
isa = PBXGroup;
children = (
2CCAF73620FE1CC400158FD9 /* A2NoSlotMidi.xcscheme */,
);
name = "Supporting Files";
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXLegacyTarget section */
2CCAF71620FE1CC400158FD9 /* A2NoSlotMidi */ = {
isa = PBXLegacyTarget;
buildArgumentsString = "-C A2NoSlotMidi $(ACTION)";
buildConfigurationList = 2CCAF73A20FE1CC400158FD9 /* Build configuration list for PBXLegacyTarget "A2NoSlotMidi" */;
buildPhases = (
);
buildToolPath = /usr/bin/make;
dependencies = (
);
name = A2NoSlotMidi;
passBuildSettingsInEnvironment = 1;
productName = A2NoSlotMidi;
};
/* End PBXLegacyTarget section */
/* Begin PBXNativeTarget section */
2CCAF71A20FE1CC400158FD9 /* doNotBuild */ = {
isa = PBXNativeTarget;
buildConfigurationList = 2CCAF73D20FE1CC400158FD9 /* Build configuration list for PBXNativeTarget "doNotBuild" */;
buildPhases = (
2CCAF71720FE1CC400158FD9 /* Sources */,
2CCAF71820FE1CC400158FD9 /* Frameworks */,
2CCAF71920FE1CC400158FD9 /* CopyFiles */,
);
buildRules = (
);
dependencies = (
);
name = doNotBuild;
productName = doNotBuild;
productReference = 2CCAF71B20FE1CC400158FD9 /* doNotBuild */;
productType = "com.apple.product-type.tool";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
2CCAF71220FE1CC400158FD9 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0940;
ORGANIZATIONNAME = "Eric Rangell";
TargetAttributes = {
2CCAF71620FE1CC400158FD9 = {
CreatedOnToolsVersion = 9.4.1;
};
2CCAF71A20FE1CC400158FD9 = {
CreatedOnToolsVersion = 9.4.1;
};
};
};
buildConfigurationList = 2CCAF71520FE1CC400158FD9 /* Build configuration list for PBXProject "A2NoSlotMidi" */;
compatibilityVersion = "Xcode 9.3";
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
);
mainGroup = 2CCAF71120FE1CC400158FD9;
productRefGroup = 2CCAF71C20FE1CC400158FD9 /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
2CCAF71620FE1CC400158FD9 /* A2NoSlotMidi */,
2CCAF71A20FE1CC400158FD9 /* doNotBuild */,
);
};
/* End PBXProject section */
/* Begin PBXSourcesBuildPhase section */
2CCAF71720FE1CC400158FD9 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
2CCAF72120FE1CC400158FD9 /* Makefile in Sources */,
2CCAF71F20FE1CC400158FD9 /* main.s in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin XCBuildConfiguration section */
2CCAF73820FE1CC400158FD9 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
};
name = Debug;
};
2CCAF73920FE1CC400158FD9 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MTL_ENABLE_DEBUG_INFO = NO;
};
name = Release;
};
2CCAF73B20FE1CC400158FD9 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_STYLE = Automatic;
DEBUGGING_SYMBOLS = YES;
DEBUG_INFORMATION_FORMAT = dwarf;
GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
OTHER_CFLAGS = "";
OTHER_LDFLAGS = "";
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Debug;
};
2CCAF73C20FE1CC400158FD9 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_STYLE = Automatic;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
OTHER_CFLAGS = "";
OTHER_LDFLAGS = "";
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Release;
};
2CCAF73E20FE1CC400158FD9 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_STYLE = Automatic;
GCC_PREPROCESSOR_DEFINITIONS = "__fastcall__=\"\"";
HEADER_SEARCH_PATHS = /usr/local/lib/cc65/include;
PRODUCT_NAME = doNotBuild;
};
name = Debug;
};
2CCAF73F20FE1CC400158FD9 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_STYLE = Automatic;
GCC_PREPROCESSOR_DEFINITIONS = "__fastcall__=\"\"";
HEADER_SEARCH_PATHS = /usr/local/lib/cc65/include;
PRODUCT_NAME = doNotBuild;
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
2CCAF71520FE1CC400158FD9 /* Build configuration list for PBXProject "A2NoSlotMidi" */ = {
isa = XCConfigurationList;
buildConfigurations = (
2CCAF73820FE1CC400158FD9 /* Debug */,
2CCAF73920FE1CC400158FD9 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
2CCAF73A20FE1CC400158FD9 /* Build configuration list for PBXLegacyTarget "A2NoSlotMidi" */ = {
isa = XCConfigurationList;
buildConfigurations = (
2CCAF73B20FE1CC400158FD9 /* Debug */,
2CCAF73C20FE1CC400158FD9 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
2CCAF73D20FE1CC400158FD9 /* Build configuration list for PBXNativeTarget "doNotBuild" */ = {
isa = XCConfigurationList;
buildConfigurations = (
2CCAF73E20FE1CC400158FD9 /* Debug */,
2CCAF73F20FE1CC400158FD9 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 2CCAF71220FE1CC400158FD9 /* Project object */;
}

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:A2NoSlotMidi.xcodeproj">
</FileRef>
</Workspace>

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>

View File

@ -0,0 +1,98 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0830"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "9D0B917C1F526C2D004D7E0B"
BuildableName = "A2NoSlotMidi"
BlueprintName = "A2NoSlotMidi"
ReferencedContainer = "container:A2NoSlotMidi.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = ""
selectedLauncherIdentifier = "Xcode.IDEFoundation.Launcher.PosixSpawn"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<PathRunnable
runnableDebuggingMode = "0"
FilePath = "/usr/bin/make">
</PathRunnable>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "9D0B917C1F526C2D004D7E0B"
BuildableName = "A2NoSlotMidi"
BlueprintName = "A2NoSlotMidi"
ReferencedContainer = "container:A2NoSlotMidi.xcodeproj">
</BuildableReference>
</MacroExpansion>
<CommandLineArguments>
<CommandLineArgument
argument = "-C"
isEnabled = "YES">
</CommandLineArgument>
<CommandLineArgument
argument = "$PROJECT_DIR/A2NoSlotMidi"
isEnabled = "YES">
</CommandLineArgument>
<CommandLineArgument
argument = "execute"
isEnabled = "YES">
</CommandLineArgument>
</CommandLineArguments>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "9D0B917C1F526C2D004D7E0B"
BuildableName = "A2NoSlotMidi"
BlueprintName = "A2NoSlotMidi"
ReferencedContainer = "container:A2NoSlotMidi.xcodeproj">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>

View File

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>SchemeUserState</key>
<dict>
<key>A2NoSlotMidi.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>0</integer>
</dict>
<key>doNotBuild.xcscheme</key>
<dict>
<key>orderHint</key>
<integer>1</integer>
</dict>
</dict>
</dict>
</plist>

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,21 @@
Modules list:
-------------
main.o:
CODE Offs = 000000 Size = 0001A8
Segment list:
-------------
Name Start End Size
--------------------------------------------
CODE 009000 0091A7 0001A8
Exports list:
-------------
Imports list:
-------------

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,21 @@
Modules list:
-------------
main.o:
CODE Offs = 000000 Size = 0001A8
Segment list:
-------------
Name Start End Size
--------------------------------------------
CODE 009000 0091A7 0001A8
Exports list:
-------------
Imports list:
-------------

237
SRC/A2NoSlotMidi/Makefile Normal file
View File

@ -0,0 +1,237 @@
#
# Makefile
# Apple2BuildPipelineSample
#
# Part of a sample build pipeline for Apple II software development
#
# Created by Quinn Dunki on 8/15/14.
# One Girl, One Laptop Productions
# http://www.quinndunki.com
# http://www.quinndunki.com/blondihacks
#
include make/head.mk
# Customize this file to control what gets built, what machines to
# target, where in memory to put it, etc.
# *** 2018-07-17
# The name of your system or binary file to build goes here:
PGM=ANN0DRVR.OBJ
# Set the config you are building for. See these pages for details:
# http://cc65.github.io/cc65/doc/apple2.html#s4
# http://cc65.github.io/cc65/doc/apple2enh.html#s4
#
# Uncomment the one you want below (the first one is the default):
# MACHINE = apple2
# MACHINE = apple2-dos33
# MACHINE = apple2-system
# MACHINE = apple2-loader
# MACHINE = apple2-reboot
# MACHINE = apple2enh
# MACHINE = apple2enh-dos33
# MACHINE = apple2enh-system
# MACHINE = apple2enh-loader
# MACHINE = apple2enh-reboot
# *** 2018-07-17
# Uncomment and set this to your starting address in Apple II memory
# if necessary:
START_ADDR = 9000
# Set the default CPU to assemble for. You can change this in the
# body of a .s file using control commands like ".PC02". Uncomment
# the one you want below (the first one is the default):
# CPU = 6502
# CPU = 65SC02
# CPU = 65C02
# CPU = 65816
# Note: You can assemble for 65816 in 16-bit mode but the C compiler
# will only produce 8-bit code.
# Add any other directories where you are putting C or assembly source
# files to this list:
SRCDIRS+=
# If you have a non-standard cc65 install, you may need to change
# some of these. Uncomment the following line and change it to the
# correct path to CC65_HOME if the default is not correct:
# export CC65_HOME := /usr/local/lib/cc65
#
# If the path to the cc65 binaries is not correct, uncomment this
# line and change it:
# CC65_BIN = /usr/local/bin
# If you want to add arguments to the compile commandline, add them
# to this variable:
# CFLAGS += -Os
# If you want to add arguments to the assembly commandline, add them
# to this variable:
# ASMFLAGS += -g
# If you want to add arguments to the link commandline, add them to
# this variable:
# LDFLAGS += -v
# If you want to link the lores graphics driver with your executable,
# uncomment the next line.
# DRIVERS += loresgr
#
# To use the lores driver, add code which looks like this to your
# project:
#
# #include "drivers/a2_lores_drv.h"
# int main(void)
# {
# tgi_install(&a2_lores_drv);
# tgi_init();
# // Use the graphics driver
# tgi_uninstall();
# }
#
# Read the /usr/local/lib/cc65/include/tgi.h file to see what the
# driver interface provides. Also check out
# /usr/local/lib/cc65/include/apple2.h to see the colour definitions.
# If you want to link the hires graphics driver with your executable,
# uncomment the next line.
# DRIVERS += hiresgr
#
# To use the hires driver, add code which looks like this to your
# project:
#
# #include "drivers/a2_hires_drv.h"
# int main(void)
# {
# tgi_install(&a2_hires_drv);
# tgi_init();
# // Use the graphics driver
# tgi_uninstall();
# }
#
# Read the /usr/local/lib/cc65/include/tgi.h file to see what the
# driver interface provides. Also check out
# /usr/local/lib/cc65/include/apple2.h to see the colour definitions.
# If you want to link the extended memory driver with your executable,
# uncomment the next line.
# DRIVERS += auxmem
#
# To use the auxmem driver, add code which looks like this to your
# project:
#
# #include "drivers/a2_auxmem_drv.h"
# int main(void)
# {
# em_install(&a2_auxmem_drv);
# // Use the auxmem driver
# em_uninstall();
# }
#
# Read the /usr/local/lib/cc65/include/em.h file to see what the
# driver interface provides.
# If you want to link the joystick driver with your executable,
# uncomment the next line.
# DRIVERS += joystick
#
# To use the joystick driver, add code which looks like this to your
# project:
#
# #include "drivers/a2_joystick_drv.h"
# int main(void)
# {
# joy_install(&a2_joystick_drv);
# // Use the joystick driver
# joy_uninstall();
# }
#
# Read the /usr/local/lib/cc65/include/joystick.h file to see what the
# driver interface provides.
# If you want to link the mouse driver with your executable,
# uncomment the next line.
# DRIVERS += mouse
#
# To use the mouse driver, add code which looks like this to your
# project:
#
# #include "drivers/a2_mouse_drv.h"
# int main(void)
# {
# mouse_install(&mouse_def_callbacks, &a2_mouse_drv);
# // Use the mouse driver
# mouse_uninstall();
# }
#
# Read the /usr/local/lib/cc65/include/mouse.h file to see what the
# driver interface provides.
# If you want to link the serial driver with your executable,
# uncomment the next line.
# DRIVERS += serial
#
# To use the serial driver, add code which looks like this to your
# project:
#
# #include "drivers/a2_serial_drv.h"
# int main(void)
# {
# ser_install(&a2_serial_drv);
# // Use the serial driver
# ser_uninstall();
# }
#
# Read the /usr/local/lib/cc65/include/serial.h file to see what the
# driver interface provides.
# If you have java installed in a non-standard location, you can set
# the path to it by uncommenting the following line:
# export JAVA=/usr/bin/java
# If you want to copy one or more files or directories to the target disk
# image, add the root directory to this variable. All files will be
# copied from the source to the target using the same path from the source.
#
# For example, if you set COPYDIRS to dir and in your project you have
# the following files:
# dir/mySystemFile
# dir/newDir/anotherFile
#
# Then, during the copy phase, mySystemFile will be copied into the root
# of the disk and anotherFile will be copied into a directory named
# newDir. The newDir directory will be created if it does not already
# exist.
#
# The name of the file to copy is checked and if it ends in:
# .as - It assumes the file is in AppleSingle format. The .as
# suffix is stripped from the name when copied to the
# disk image.
# .<char> - If the file ends with a single character which matches
# a DOS 3.3 file type (A, B, T, etc) it uses that value as
# the file type of the file copied to the disk image. The
# single character is removed from the file name.
# .<TLA> - If the file ends with a three letter alpha extension, it
# uses that TLA as the file type of the file copied to the
# disk image. The TLA is removed from the file name.
#
# If you do not provide any type information for your filenames,
# it will be copied as a binary.
#
COPYDIRS=
# Add any rules you want to execute before any compiles or assembly
# commands are called here, if any. You can generate .c, .s or .h
# files for example. You can generate data files. Whatever you
# might need.
gen:
# For any files you generated in the gen target above, you should
# add rules in genclean to remove those generated files when you
# clean your build.
genclean:
# Do not change anything else below here...
include make/tail.mk

304
SRC/A2NoSlotMidi/main.lst Normal file
View File

@ -0,0 +1,304 @@
ca65 V2.13.3 - (C) Copyright 1998-2012 Ullrich von Bassewitz
Main file : main.s
Current file: main.s
000000r 1 ;-------------------------------------------------------------------------
000000r 1 ;
000000r 1 ; main.s
000000r 1 ; A2NoSlotMidi
000000r 1 ;
000000r 1 ; Created by Eric Rangell on 7/17/18.
000000r 1 ;-------------------------------------------------------------------------
000000r 1 ; APPLE MIDI DRIVER THROUGH ANNUNCIATOR 0
000000r 1 ; Copyright © 1998-2018 Eric Rangell. MIT License.
000000r 1 ;-------------------------------------------------------------------------
000000r 1 ; THIS DRIVER IMPLEMENTS ASYNCHRONOUS SERIAL DATA TRANSMISSION
000000r 1 ; THROUGH THE APPLE ANNUNCIATOR 0 OUTPUT PORT OF THE GAME CONNECTOR
000000r 1 ; USING 32 CYCLES PER BIT TO ACHIEVE A 31.25K MIDI BAUD RATE.
000000r 1 ;
000000r 1 ; THE OUTPUT IS INITIALIZED TO A HIGH LOGIC VOLTAGE. WHEN IT GOES
000000r 1 ; LOW FOR 32 MICROSECONDS, THAT INDICATES THE START BIT OF A MIDI BYTE.
000000r 1 ; THEN 8 BYTES OF DATA ARE TRANSMITTED, FOLLOWED BY A HIGH STOP BIT.
000000r 1 ; THE DATA BYTES REPRESENT MIDI MESSAGES WHICH CAN BE INTERPRETED BY
000000r 1 ; ANY MUSICAL INSTRUMENT THAT IMPLEMENTS MIDI.
000000r 1 ;
000000r 1 ; ENTRY POINTS: (Note: Origin must be set in Makefile)
000000r 1 ;
000000r 1 ; $9000 = INITIALIZE - TURNS ON ANNUNCIATOR 0 - MUST BE CALLED ONCE
000000r 1 ; $9003 = APPLESOFT CALL TO SEND ONE MIDI BYTE. POKE THE BYTE IN $9004.
000000r 1 ; $9005 = ASSEMBLY CALL TO SEND ONE MIDI BYTE FROM ACCUMULATOR
000000r 1 ; $9008 = APPLESOFT OR ASSEMBLY CALL TO SEND SEVERAL BYTES AT ONCE:
000000r 1 ; THE CALLER POPULATES LOCATION $D7 WITH THE NUMBER OF BYTES TO BE
000000r 1 ; TRANSMITTED, AND A POINTER IN $CE,CF (LO,HI) WITH THE ADDRESS OF
000000r 1 ; THE DATA BYTES, THEN CALLS THE ENTRY POINT "SENDMSG" TO TRANSMIT
000000r 1 ; THE MESSAGE.
000000r 1 ; $900B = SEND A TEST MESSAGE - C MAJOR CHORD NOTE ONS
000000r 1 ; $900E = SEND A TEST MESSAGE - C MAJOR CHORD NOTE OFFS
000000r 1 ; $9011 = RESERVED
000000r 1 ; $9014 = RESERVED
000000r 1 ; $9017 = RESERVED
000000r 1 ;-------------------------------------------------------------------------
000000r 1 ; Enhancements for 2018:
000000r 1 ; 1. Disable interrupts during critical timing sections, preserve interrupt status
000000r 1 ; 2. Entry point to reconfigure program to use a different annunciator pair
000000r 1 ; 3. Entry point to reconfigure program for hardware interface using inverters only (not buffers)
000000r 1 ;-------------------------------------------------------------------------
000000r 1 ; CALLER MUST POPULATE THE FOLLOWING TWO ZERO PAGE LOCATIONS FOR SENDMSG:
000000r 1 NUMBYTES = $D7 ;NUMBER OF BYTES TO BE TRANSMITTED NOW (1-256)
000000r 1 ; ;THE VALUE 0 WILL TRANSMIT 256 BYTES.
000000r 1 DATAPTR = $CE ;POINTER TO THE BYTES TO BE TRANSMITTED NOW
000000r 1 ;-------------------------------------------------------------------------
000000r 1 AN0OFF = $C058 ;APPLE ADDRESSES THAT CONTROL ANNUNCIATOR OUTPUTS
000000r 1 AN0ON = $C059 ;PROGRAM REFERNCES ARE RELATIVE TO AN0
000000r 1 ;AN1OFF = $C05A
000000r 1 ;AN1ON = $C05B
000000r 1 ;AN2OFF = $C05C
000000r 1 ;AN2ON = $C05D
000000r 1 ;AN3OFF = $C05E
000000r 1 ;AN3ON = $C05F
000000r 1 ;-------------------------------------------------------------------------
000000r 1 .proc main
000000r 1 ;---------------------------------------------------------------------------
000000r 1 START:
000000r 1 4C rr rr JMP INIT ;MAIN ENTRY POINT - INITIALIZES ANNUNCIATORS
000003r 1 SENDFP:
000003r 1 A9 90 LDA #$90 ;ENTRY POINT FOR APPLESOFT: POKE BYTE AND CALL
000005r 1 SENDONE:
000005r 1 4C rr rr JMP XMITONE ;ENTRY POINT FOR TRANSMITTING ONE BYTE FROM ACCUM
000008r 1 SENDMSG:
000008r 1 4C rr rr JMP XMITMSG ;ENTRY POINT FOR TRANSMITTING A MIDI MESSAGE
00000Br 1 ALLNOFF:
00000Br 1 4C rr rr JMP QUIET ;TURN ALL NOTES OFF
00000Er 1 TEST1:
00000Er 1 4C rr rr JMP TESTMSG1 ;SEND TEST MESSAGE 1 - C MAJOR CHORD ON
000011r 1 TEST2:
000011r 1 4C rr rr JMP TESTMSG2 ;SEND TEST MESSAGE 2 - C MAJOR CHORD OFF
000014r 1 ;
000014r 1 ;RSRVD1:
000014r 1 ;JMP INIT
000014r 1 ;RSRVD2:
000014r 1 ;JMP INIT
000014r 1 ;RSRVD3:
000014r 1 ;JMP INIT
000014r 1 ;---------------------------------------------------------------------------
000014r 1 00 SAVENBYT: .byte $00 ;SAVE AREA FOR NUMBYTES
000015r 1 00 TEMPA: .byte $00
000016r 1 00 TEMPX: .byte $00
000017r 1 ;ANNPAIR: .byte $00 ; ANNUNCIATOR NUMBER TIMES 2 (1=C05A, 2=C05C, 3=C05E)
000017r 1 ;---------------------------------------------------------------------------
000017r 1 INIT:
000017r 1 2C 59 C0 BIT AN0ON
00001Ar 1 60 RTS
00001Br 1 ;---------------------------------------------------------------------------
00001Br 1 XMITMSG:
00001Br 1 A5 D7 LDA NUMBYTES ;SAVE NUMBER OF BYTES
00001Dr 1 8D rr rr STA SAVENBYT ;BECAUSE WE WILL CLOBBER IT
000020r 1 A0 00 LDY #$00 ;Y WILL BE AN INDEX INTO THE DATA AREA
000022r 1 XMITLOOP:
000022r 1 B1 CE LDA (DATAPTR),Y ;GET A DATA BYTE
000024r 1 20 rr rr JSR XMITONE
000027r 1 C8 INY ;POINT TO NEXT BYTE
000028r 1 C6 D7 DEC NUMBYTES ;DECREMENT COUNTER
00002Ar 1 A5 D7 LDA NUMBYTES ;CHECK IF ZERO
00002Cr 1 D0 F4 BNE XMITLOOP ;LOOP UNTIL DONE SENDING ALL BYTES
00002Er 1 AD rr rr LDA SAVENBYT
000031r 1 85 D7 STA NUMBYTES ;RESTORE ORIGINAL VALUE OF NUMBYTES
000033r 1 60 RTS
000034r 1 ;---------------------------------------------------------------------------
000034r 1 XMITONE:
000034r 1 8D rr rr STA TEMPA ;SAVE A AND X REGISTERS
000037r 1 8E rr rr STX TEMPX
00003Ar 1 ;
00003Ar 1 0A ASL A ;SHIFT BIT INTO CARRY
00003Br 1 AA TAX ;SAVE CURRENT IMAGE OF DATA BYTE
00003Cr 1 A9 00 LDA #$00 ;ZERO OUT ACCUMULATOR FOR ADD
00003Er 1 69 C0 ADC #>AN0OFF ;ADD CARRY TO ANNUNCIATOR ADDRESS
000040r 1 8D rr rr STA BIT7+1 ;MODIFY THE XMITBITS SUBROUTINE
000043r 1 8A TXA ;RESTORE ACCUMULATOR
000044r 1 ;
000044r 1 0A ASL A ;SHIFT BIT INTO CARRY
000045r 1 AA TAX ;SAVE CURRENT IMAGE OF DATA BYTE
000046r 1 A9 00 LDA #$00 ;ZERO OUT ACCUMULATOR FOR ADD
000048r 1 69 C0 ADC #>AN0OFF ;ADD CARRY TO ANNUNCIATOR ADDRESS
00004Ar 1 8D rr rr STA BIT6+1 ;MODIFY THE XMITBITS SUBROUTINE
00004Dr 1 8A TXA ;RESTORE ACCUMULATOR
00004Er 1 ;
00004Er 1 0A ASL A ;SHIFT BIT INTO CARRY
00004Fr 1 AA TAX ;SAVE CURRENT IMAGE OF DATA BYTE
000050r 1 A9 00 LDA #$00 ;ZERO OUT ACCUMULATOR FOR ADD
000052r 1 69 C0 ADC #>AN0OFF ;ADD CARRY TO ANNUNCIATOR ADDRESS
000054r 1 8D rr rr STA BIT5+1 ;MODIFY THE XMITBITS SUBROUTINE
000057r 1 8A TXA ;RESTORE ACCUMULATOR
000058r 1 ;
000058r 1 0A ASL A ;SHIFT BIT INTO CARRY
000059r 1 AA TAX ;SAVE CURRENT IMAGE OF DATA BYTE
00005Ar 1 A9 00 LDA #$00 ;ZERO OUT ACCUMULATOR FOR ADD
00005Cr 1 69 C0 ADC #>AN0OFF ;ADD CARRY TO ANNUNCIATOR ADDRESS
00005Er 1 8D rr rr STA BIT4+1 ;MODIFY THE XMITBITS SUBROUTINE
000061r 1 8A TXA ;RESTORE ACCUMULATOR
000062r 1 ;
000062r 1 0A ASL A ;SHIFT BIT INTO CARRY
000063r 1 AA TAX ;SAVE CURRENT IMAGE OF DATA BYTE
000064r 1 A9 00 LDA #$00 ;ZERO OUT ACCUMULATOR FOR ADD
000066r 1 69 C0 ADC #>AN0OFF ;ADD CARRY TO ANNUNCIATOR ADDRESS
000068r 1 8D rr rr STA BIT3+1 ;MODIFY THE XMITBITS SUBROUTINE
00006Br 1 8A TXA ;RESTORE ACCUMULATOR
00006Cr 1 ;
00006Cr 1 0A ASL A ;SHIFT BIT INTO CARRY
00006Dr 1 AA TAX ;SAVE CURRENT IMAGE OF DATA BYTE
00006Er 1 A9 00 LDA #$00 ;ZERO OUT ACCUMULATOR FOR ADD
000070r 1 69 C0 ADC #>AN0OFF ;ADD CARRY TO ANNUNCIATOR ADDRESS
000072r 1 8D rr rr STA BIT2+1 ;MODIFY THE XMITBITS SUBROUTINE
000075r 1 8A TXA ;RESTORE ACCUMULATOR
000076r 1 ;
000076r 1 0A ASL A ;SHIFT BIT INTO CARRY
000077r 1 AA TAX ;SAVE CURRENT IMAGE OF DATA BYTE
000078r 1 A9 00 LDA #$00 ;ZERO OUT ACCUMULATOR FOR ADD
00007Ar 1 69 C0 ADC #>AN0OFF ;ADD CARRY TO ANNUNCIATOR ADDRESS
00007Cr 1 8D rr rr STA BIT1+1 ;MODIFY THE XMITBITS SUBROUTINE
00007Fr 1 8A TXA ;RESTORE ACCUMULATOR
000080r 1 ;
000080r 1 0A ASL A ;SHIFT BIT INTO CARRY
000081r 1 AA TAX ;SAVE CURRENT IMAGE OF DATA BYTE
000082r 1 A9 00 LDA #$00 ;ZERO OUT ACCUMULATOR FOR ADD
000084r 1 69 C0 ADC #>AN0OFF ;ADD CARRY TO ANNUNCIATOR ADDRESS
000086r 1 8D rr rr STA BIT0+1 ;MODIFY THE XMITBITS SUBROUTINE
000089r 1 8A TXA ;RESTORE ACCUMULATOR
00008Ar 1 ;
00008Ar 1 20 rr rr JSR XMITBITS ;SEND THE BYTE OUT
00008Dr 1 AE rr rr LDX TEMPX
000090r 1 AD rr rr LDA TEMPA ;RESTORE X AND A
000093r 1 60 RTS
000094r 1 ;-----------------------------------------------------------------------
000094r 1 XMITBITS:
000094r 1 2C 58 C0 BIT AN0OFF ;4 CYCLES - TRANSMIT START BIT - ALWAYS LOW
000097r 1 20 rr rr JSR DELAY22 ;6+22
00009Ar 1 BIT0:
00009Ar 1 2C 58 C0 BIT AN0OFF ;4
00009Dr 1 20 rr rr JSR DELAY22 ;6+22
0000A0r 1 BIT1:
0000A0r 1 2C 58 C0 BIT AN0OFF ;4
0000A3r 1 20 rr rr JSR DELAY22 ;6+22
0000A6r 1 BIT2:
0000A6r 1 2C 58 C0 BIT AN0OFF ;4
0000A9r 1 20 rr rr JSR DELAY22 ;6+22
0000ACr 1 BIT3:
0000ACr 1 2C 58 C0 BIT AN0OFF ;4
0000AFr 1 20 rr rr JSR DELAY22 ;6+22
0000B2r 1 BIT4:
0000B2r 1 2C 58 C0 BIT AN0OFF ;4
0000B5r 1 20 rr rr JSR DELAY22 ;6+22
0000B8r 1 BIT5:
0000B8r 1 2C 58 C0 BIT AN0OFF ;4
0000BBr 1 20 rr rr JSR DELAY22 ;6+22
0000BEr 1 BIT6:
0000BEr 1 2C 58 C0 BIT AN0OFF ;4
0000C1r 1 20 rr rr JSR DELAY22 ;6+22
0000C4r 1 BIT7:
0000C4r 1 2C 58 C0 BIT AN0OFF ;4
0000C7r 1 20 rr rr JSR DELAY22 ;6+22
0000CAr 1 2C 59 C0 BIT AN0ON ;4 ;TRANSMIT STOP BIT - ALWAYS HIGH
0000CDr 1 20 rr rr JSR DELAY22 ;6+22
0000D0r 1 60 RTS
0000D1r 1 ;-----------------------------------------------------------------------
0000D1r 1 DELAY22:
0000D1r 1 EA NOP ;WAIT 22 CYCLES
0000D2r 1 EA NOP
0000D3r 1 EA NOP
0000D4r 1 EA NOP
0000D5r 1 EA NOP
0000D6r 1 EA NOP
0000D7r 1 EA NOP
0000D8r 1 EA NOP
0000D9r 1 60 RTS
0000DAr 1 ;-----------------------------------------------------------------------
0000DAr 1 TESTMSG1:
0000DAr 1 A9 07 LDA #7
0000DCr 1 85 D7 STA NUMBYTES
0000DEr 1 A9 rr LDA #>TESTDAT1
0000E0r 1 85 CE STA DATAPTR
0000E2r 1 A9 rr LDA #<TESTDAT1
0000E4r 1 85 CF STA DATAPTR+1
0000E6r 1 20 rr rr JSR SENDMSG
0000E9r 1 60 RTS
0000EAr 1 ;-----------------------------------------------------------------------
0000EAr 1 TESTMSG2:
0000EAr 1 A9 07 LDA #7
0000ECr 1 85 D7 STA NUMBYTES
0000EEr 1 A9 rr LDA #>TESTDAT2
0000F0r 1 85 CE STA DATAPTR
0000F2r 1 A9 rr LDA #<TESTDAT2
0000F4r 1 85 CF STA DATAPTR+1
0000F6r 1 20 rr rr JSR SENDMSG
0000F9r 1 60 RTS
0000FAr 1 ;-----------------------------------------------------------------------
0000FAr 1 QUIET:
0000FAr 1 A9 90 LDA #$90
0000FCr 1 85 D7 STA NUMBYTES
0000FEr 1 A9 rr LDA #>QUIETMSG
000100r 1 85 CE STA DATAPTR
000102r 1 A9 rr LDA #<QUIETMSG
000104r 1 85 CF STA DATAPTR+1
000106r 1 20 rr rr JSR SENDMSG
000109r 1 60 RTS
00010Ar 1 ;-----------------------------------------------------------------------
00010Ar 1 TESTDAT1:
00010Ar 1 90 3C 40 40 .byte $90,$3C,$40,$40,$40,$43,$40
00010Er 1 40 43 40
000111r 1 TESTDAT2:
000111r 1 90 3C 00 40 .byte $90,$3C,$00,$40,$00,$43,$00
000115r 1 00 43 00
000118r 1 QUIETMSG:
000118r 1 B0 78 00 B0 .byte $B0,$78,$00,$B0,$79,$00,$B0,$7B,$00
00011Cr 1 79 00 B0 7B
000120r 1 00
000121r 1 B1 78 00 B1 .byte $B1,$78,$00,$B1,$79,$00,$B1,$7B,$00
000125r 1 79 00 B1 7B
000129r 1 00
00012Ar 1 B2 78 00 B2 .byte $B2,$78,$00,$B2,$79,$00,$B2,$7B,$00
00012Er 1 79 00 B2 7B
000132r 1 00
000133r 1 B3 78 00 B3 .byte $B3,$78,$00,$B3,$79,$00,$B3,$7B,$00
000137r 1 79 00 B3 7B
00013Br 1 00
00013Cr 1 B4 78 00 B4 .byte $B4,$78,$00,$B4,$79,$00,$B4,$7B,$00
000140r 1 79 00 B4 7B
000144r 1 00
000145r 1 B5 78 00 B5 .byte $B5,$78,$00,$B5,$79,$00,$B5,$7B,$00
000149r 1 79 00 B5 7B
00014Dr 1 00
00014Er 1 B6 78 00 B6 .byte $B6,$78,$00,$B6,$79,$00,$B6,$7B,$00
000152r 1 79 00 B6 7B
000156r 1 00
000157r 1 B7 78 00 B7 .byte $B7,$78,$00,$B7,$79,$00,$B7,$7B,$00
00015Br 1 79 00 B7 7B
00015Fr 1 00
000160r 1 B8 78 00 B8 .byte $B8,$78,$00,$B8,$79,$00,$B8,$7B,$00
000164r 1 79 00 B8 7B
000168r 1 00
000169r 1 B9 78 00 B9 .byte $B9,$78,$00,$B9,$79,$00,$B9,$7B,$00
00016Dr 1 79 00 B9 7B
000171r 1 00
000172r 1 BA 78 00 BA .byte $BA,$78,$00,$BA,$79,$00,$BA,$7B,$00
000176r 1 79 00 BA 7B
00017Ar 1 00
00017Br 1 BB 78 00 BB .byte $BB,$78,$00,$BB,$79,$00,$BB,$7B,$00
00017Fr 1 79 00 BB 7B
000183r 1 00
000184r 1 BC 78 00 BC .byte $BC,$78,$00,$BC,$79,$00,$BC,$7B,$00
000188r 1 79 00 BC 7B
00018Cr 1 00
00018Dr 1 BD 78 00 BD .byte $BD,$78,$00,$BD,$79,$00,$BD,$7B,$00
000191r 1 79 00 BD 7B
000195r 1 00
000196r 1 BE 78 00 BE .byte $BE,$78,$00,$BE,$79,$00,$BE,$7B,$00
00019Ar 1 79 00 BE 7B
00019Er 1 00
00019Fr 1 BF 78 00 BF .byte $BF,$78,$00,$BF,$79,$00,$BF,$7B,$00
0001A3r 1 79 00 BF 7B
0001A7r 1 00
0001A8r 1 ;----------------
0001A8r 1 ; END OF PROGRAM
0001A8r 1 ;----------------
0001A8r 1 .endproc
0001A8r 1

BIN
SRC/A2NoSlotMidi/main.o Normal file

Binary file not shown.

265
SRC/A2NoSlotMidi/main.s Normal file
View File

@ -0,0 +1,265 @@
;-------------------------------------------------------------------------
;
; main.s
; A2NoSlotMidi
;
; Created by Eric Rangell on 7/17/18.
;-------------------------------------------------------------------------
; APPLE MIDI DRIVER THROUGH ANNUNCIATOR 0
; Copyright © 1998-2018 Eric Rangell. MIT License.
;-------------------------------------------------------------------------
; THIS DRIVER IMPLEMENTS ASYNCHRONOUS SERIAL DATA TRANSMISSION
; THROUGH THE APPLE ANNUNCIATOR 0 OUTPUT PORT OF THE GAME CONNECTOR
; USING 32 CYCLES PER BIT TO ACHIEVE A 31.25K MIDI BAUD RATE.
;
; THE OUTPUT IS INITIALIZED TO A HIGH LOGIC VOLTAGE. WHEN IT GOES
; LOW FOR 32 MICROSECONDS, THAT INDICATES THE START BIT OF A MIDI BYTE.
; THEN 8 BYTES OF DATA ARE TRANSMITTED, FOLLOWED BY A HIGH STOP BIT.
; THE DATA BYTES REPRESENT MIDI MESSAGES WHICH CAN BE INTERPRETED BY
; ANY MUSICAL INSTRUMENT THAT IMPLEMENTS MIDI.
;
; ENTRY POINTS: (Note: Origin must be set in Makefile)
;
; $9000 = INITIALIZE - TURNS ON ANNUNCIATOR 0 - MUST BE CALLED ONCE
; $9003 = APPLESOFT CALL TO SEND ONE MIDI BYTE. POKE THE BYTE IN $9004.
; $9005 = ASSEMBLY CALL TO SEND ONE MIDI BYTE FROM ACCUMULATOR
; $9008 = APPLESOFT OR ASSEMBLY CALL TO SEND SEVERAL BYTES AT ONCE:
; THE CALLER POPULATES LOCATION $D7 WITH THE NUMBER OF BYTES TO BE
; TRANSMITTED, AND A POINTER IN $CE,CF (LO,HI) WITH THE ADDRESS OF
; THE DATA BYTES, THEN CALLS THE ENTRY POINT "SENDMSG" TO TRANSMIT
; THE MESSAGE.
; $900B = SEND A TEST MESSAGE - C MAJOR CHORD NOTE ONS
; $900E = SEND A TEST MESSAGE - C MAJOR CHORD NOTE OFFS
; $9011 = RESERVED
; $9014 = RESERVED
; $9017 = RESERVED
;-------------------------------------------------------------------------
; Enhancements for 2018:
; 1. Disable interrupts during critical timing sections, preserve interrupt status
; 2. Entry point to reconfigure program to use a different annunciator pair
; 3. Entry point to reconfigure program for hardware interface using inverters only (not buffers)
;-------------------------------------------------------------------------
; CALLER MUST POPULATE THE FOLLOWING TWO ZERO PAGE LOCATIONS FOR SENDMSG:
NUMBYTES = $D7 ;NUMBER OF BYTES TO BE TRANSMITTED NOW (1-256)
; ;THE VALUE 0 WILL TRANSMIT 256 BYTES.
DATAPTR = $CE ;POINTER TO THE BYTES TO BE TRANSMITTED NOW
;-------------------------------------------------------------------------
AN0OFF = $C058 ;APPLE ADDRESSES THAT CONTROL ANNUNCIATOR OUTPUTS
AN0ON = $C059 ;PROGRAM REFERNCES ARE RELATIVE TO AN0
;AN1OFF = $C05A
;AN1ON = $C05B
;AN2OFF = $C05C
;AN2ON = $C05D
;AN3OFF = $C05E
;AN3ON = $C05F
;-------------------------------------------------------------------------
.proc main
;---------------------------------------------------------------------------
START:
JMP INIT ;MAIN ENTRY POINT - INITIALIZES ANNUNCIATORS
SENDFP:
LDA #$90 ;ENTRY POINT FOR APPLESOFT: POKE BYTE AND CALL
SENDONE:
JMP XMITONE ;ENTRY POINT FOR TRANSMITTING ONE BYTE FROM ACCUM
SENDMSG:
JMP XMITMSG ;ENTRY POINT FOR TRANSMITTING A MIDI MESSAGE
ALLNOFF:
JMP QUIET ;TURN ALL NOTES OFF
TEST1:
JMP TESTMSG1 ;SEND TEST MESSAGE 1 - C MAJOR CHORD ON
TEST2:
JMP TESTMSG2 ;SEND TEST MESSAGE 2 - C MAJOR CHORD OFF
;
;RSRVD1:
;JMP INIT
;RSRVD2:
;JMP INIT
;RSRVD3:
;JMP INIT
;---------------------------------------------------------------------------
SAVENBYT: .byte $00 ;SAVE AREA FOR NUMBYTES
TEMPA: .byte $00
TEMPX: .byte $00
;ANNPAIR: .byte $00 ; ANNUNCIATOR NUMBER TIMES 2 (1=C05A, 2=C05C, 3=C05E)
;---------------------------------------------------------------------------
INIT:
BIT AN0ON
RTS
;---------------------------------------------------------------------------
XMITMSG:
LDA NUMBYTES ;SAVE NUMBER OF BYTES
STA SAVENBYT ;BECAUSE WE WILL CLOBBER IT
LDY #$00 ;Y WILL BE AN INDEX INTO THE DATA AREA
XMITLOOP:
LDA (DATAPTR),Y ;GET A DATA BYTE
JSR XMITONE
INY ;POINT TO NEXT BYTE
DEC NUMBYTES ;DECREMENT COUNTER
LDA NUMBYTES ;CHECK IF ZERO
BNE XMITLOOP ;LOOP UNTIL DONE SENDING ALL BYTES
LDA SAVENBYT
STA NUMBYTES ;RESTORE ORIGINAL VALUE OF NUMBYTES
RTS
;---------------------------------------------------------------------------
XMITONE:
STA TEMPA ;SAVE A AND X REGISTERS
STX TEMPX
;
ASL A ;SHIFT BIT INTO CARRY
TAX ;SAVE CURRENT IMAGE OF DATA BYTE
LDA #$00 ;ZERO OUT ACCUMULATOR FOR ADD
ADC #>AN0OFF ;ADD CARRY TO ANNUNCIATOR ADDRESS
STA BIT7+1 ;MODIFY THE XMITBITS SUBROUTINE
TXA ;RESTORE ACCUMULATOR
;
ASL A ;SHIFT BIT INTO CARRY
TAX ;SAVE CURRENT IMAGE OF DATA BYTE
LDA #$00 ;ZERO OUT ACCUMULATOR FOR ADD
ADC #>AN0OFF ;ADD CARRY TO ANNUNCIATOR ADDRESS
STA BIT6+1 ;MODIFY THE XMITBITS SUBROUTINE
TXA ;RESTORE ACCUMULATOR
;
ASL A ;SHIFT BIT INTO CARRY
TAX ;SAVE CURRENT IMAGE OF DATA BYTE
LDA #$00 ;ZERO OUT ACCUMULATOR FOR ADD
ADC #>AN0OFF ;ADD CARRY TO ANNUNCIATOR ADDRESS
STA BIT5+1 ;MODIFY THE XMITBITS SUBROUTINE
TXA ;RESTORE ACCUMULATOR
;
ASL A ;SHIFT BIT INTO CARRY
TAX ;SAVE CURRENT IMAGE OF DATA BYTE
LDA #$00 ;ZERO OUT ACCUMULATOR FOR ADD
ADC #>AN0OFF ;ADD CARRY TO ANNUNCIATOR ADDRESS
STA BIT4+1 ;MODIFY THE XMITBITS SUBROUTINE
TXA ;RESTORE ACCUMULATOR
;
ASL A ;SHIFT BIT INTO CARRY
TAX ;SAVE CURRENT IMAGE OF DATA BYTE
LDA #$00 ;ZERO OUT ACCUMULATOR FOR ADD
ADC #>AN0OFF ;ADD CARRY TO ANNUNCIATOR ADDRESS
STA BIT3+1 ;MODIFY THE XMITBITS SUBROUTINE
TXA ;RESTORE ACCUMULATOR
;
ASL A ;SHIFT BIT INTO CARRY
TAX ;SAVE CURRENT IMAGE OF DATA BYTE
LDA #$00 ;ZERO OUT ACCUMULATOR FOR ADD
ADC #>AN0OFF ;ADD CARRY TO ANNUNCIATOR ADDRESS
STA BIT2+1 ;MODIFY THE XMITBITS SUBROUTINE
TXA ;RESTORE ACCUMULATOR
;
ASL A ;SHIFT BIT INTO CARRY
TAX ;SAVE CURRENT IMAGE OF DATA BYTE
LDA #$00 ;ZERO OUT ACCUMULATOR FOR ADD
ADC #>AN0OFF ;ADD CARRY TO ANNUNCIATOR ADDRESS
STA BIT1+1 ;MODIFY THE XMITBITS SUBROUTINE
TXA ;RESTORE ACCUMULATOR
;
ASL A ;SHIFT BIT INTO CARRY
TAX ;SAVE CURRENT IMAGE OF DATA BYTE
LDA #$00 ;ZERO OUT ACCUMULATOR FOR ADD
ADC #>AN0OFF ;ADD CARRY TO ANNUNCIATOR ADDRESS
STA BIT0+1 ;MODIFY THE XMITBITS SUBROUTINE
TXA ;RESTORE ACCUMULATOR
;
JSR XMITBITS ;SEND THE BYTE OUT
LDX TEMPX
LDA TEMPA ;RESTORE X AND A
RTS
;-----------------------------------------------------------------------
XMITBITS:
BIT AN0OFF ;4 CYCLES - TRANSMIT START BIT - ALWAYS LOW
JSR DELAY22 ;6+22
BIT0:
BIT AN0OFF ;4
JSR DELAY22 ;6+22
BIT1:
BIT AN0OFF ;4
JSR DELAY22 ;6+22
BIT2:
BIT AN0OFF ;4
JSR DELAY22 ;6+22
BIT3:
BIT AN0OFF ;4
JSR DELAY22 ;6+22
BIT4:
BIT AN0OFF ;4
JSR DELAY22 ;6+22
BIT5:
BIT AN0OFF ;4
JSR DELAY22 ;6+22
BIT6:
BIT AN0OFF ;4
JSR DELAY22 ;6+22
BIT7:
BIT AN0OFF ;4
JSR DELAY22 ;6+22
BIT AN0ON ;4 ;TRANSMIT STOP BIT - ALWAYS HIGH
JSR DELAY22 ;6+22
RTS
;-----------------------------------------------------------------------
DELAY22:
NOP ;WAIT 22 CYCLES
NOP
NOP
NOP
NOP
NOP
NOP
NOP
RTS
;-----------------------------------------------------------------------
TESTMSG1:
LDA #7
STA NUMBYTES
LDA #>TESTDAT1
STA DATAPTR
LDA #<TESTDAT1
STA DATAPTR+1
JSR SENDMSG
RTS
;-----------------------------------------------------------------------
TESTMSG2:
LDA #7
STA NUMBYTES
LDA #>TESTDAT2
STA DATAPTR
LDA #<TESTDAT2
STA DATAPTR+1
JSR SENDMSG
RTS
;-----------------------------------------------------------------------
QUIET:
LDA #$90
STA NUMBYTES
LDA #>QUIETMSG
STA DATAPTR
LDA #<QUIETMSG
STA DATAPTR+1
JSR SENDMSG
RTS
;-----------------------------------------------------------------------
TESTDAT1:
.byte $90,$3C,$40,$40,$40,$43,$40
TESTDAT2:
.byte $90,$3C,$00,$40,$00,$43,$00
QUIETMSG:
.byte $B0,$78,$00,$B0,$79,$00,$B0,$7B,$00
.byte $B1,$78,$00,$B1,$79,$00,$B1,$7B,$00
.byte $B2,$78,$00,$B2,$79,$00,$B2,$7B,$00
.byte $B3,$78,$00,$B3,$79,$00,$B3,$7B,$00
.byte $B4,$78,$00,$B4,$79,$00,$B4,$7B,$00
.byte $B5,$78,$00,$B5,$79,$00,$B5,$7B,$00
.byte $B6,$78,$00,$B6,$79,$00,$B6,$7B,$00
.byte $B7,$78,$00,$B7,$79,$00,$B7,$7B,$00
.byte $B8,$78,$00,$B8,$79,$00,$B8,$7B,$00
.byte $B9,$78,$00,$B9,$79,$00,$B9,$7B,$00
.byte $BA,$78,$00,$BA,$79,$00,$BA,$7B,$00
.byte $BB,$78,$00,$BB,$79,$00,$BB,$7B,$00
.byte $BC,$78,$00,$BC,$79,$00,$BC,$7B,$00
.byte $BD,$78,$00,$BD,$79,$00,$BD,$7B,$00
.byte $BE,$78,$00,$BE,$79,$00,$BE,$7B,$00
.byte $BF,$78,$00,$BF,$79,$00,$BF,$7B,$00
;----------------
; END OF PROGRAM
;----------------
.endproc

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,268 @@
#!/bin/sh
if [ $# -lt 5 ]
then
echo USAGE: $0 '<AppleCommander> <machine> <diskimage> <binary>'
exit 1
fi
if [ -z "$JAVA" ]
then
for item in "/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home" /Library/Java/JavaVirtualMachines/*/Contents/Home /usr
do
if [ -x "$item/bin/java" ]
then
JAVA="$item/bin/java"
break
fi
done
fi
if [ -z "$JAVA" ]
then
echo Cannot find a path to a Java runtime.
echo Go to https://java.com/download if you do not have Java.
echo If you do have Java, you may need to uncomment the JAVA
echo line in the Makefile and set it to the path for your
echo Java runtime binary.
exit 1
fi
APPLECOMMANDER=$1
shift
MACHINE=$1
shift
DISKIMAGE=$1
shift
PROGRAM=$1
shift
STARTADDR=`echo $1 | sed 's/^0*//'`
shift
if [ ! -f "$PROGRAM" ]
then
echo "Cannot file executable $PROGRAM"
exit 1
fi
case "$MACHINE" in
apple2)
TEMPLATE="make/prodos_template.dsk"
DELETELOADER=1
RENAMELOADER=0
DELETEBASIC=0
HASHEADER=1
FILETYPE="bin"
TARGETFILE=`basename $PROGRAM`
MAXFILENAMELEN=15
;;
apple2enh)
TEMPLATE="make/prodos_template.dsk"
DELETELOADER=1
RENAMELOADER=0
DELETEBASIC=0
HASHEADER=1
FILETYPE="bin"
TARGETFILE=`basename $PROGRAM`
MAXFILENAMELEN=15
;;
apple2-dos33)
TEMPLATE="make/dos33_template.dsk"
DELETELOADER=0
RENAMELOADER=0
DELETEBASIC=0
HASHEADER=1
FILETYPE="bin"
TARGETFILE=`basename $PROGRAM`
MAXFILENAMELEN=30
;;
apple2enh-dos33)
TEMPLATE="make/dos33_template.dsk"
DELETELOADER=0
RENAMELOADER=0
DELETEBASIC=0
HASHEADER=1
FILETYPE="bin"
TARGETFILE=`basename $PROGRAM`
MAXFILENAMELEN=30
;;
apple2-system)
TEMPLATE="make/prodos_template.dsk"
DELETELOADER=1
RENAMELOADER=0
DELETEBASIC=1
HASHEADER=0
FILETYPE="sys"
TARGETFILE=`basename $PROGRAM`.system
MAXFILENAMELEN=15
;;
apple2enh-system)
TEMPLATE="make/prodos_template.dsk"
DELETELOADER=1
RENAMELOADER=0
DELETEBASIC=1
HASHEADER=0
FILETYPE="sys"
TARGETFILE=`basename $PROGRAM`.system
MAXFILENAMELEN=15
;;
apple2-loader)
TEMPLATE="make/prodos_template.dsk"
DELETELOADER=0
RENAMELOADER=1
DELETEBASIC=1
HASHEADER=1
FILETYPE="bin"
TARGETFILE=`basename $PROGRAM`
MAXFILENAMELEN=15
;;
apple2-reboot)
TEMPLATE="make/prodos_template.dsk"
DELETELOADER=0
RENAMELOADER=1
DELETEBASIC=1
HASHEADER=1
FILETYPE="bin"
TARGETFILE=`basename $PROGRAM`
MAXFILENAMELEN=15
;;
apple2enh-loader)
TEMPLATE="make/prodos_template.dsk"
DELETELOADER=0
RENAMELOADER=1
DELETEBASIC=1
HASHEADER=1
FILETYPE="bin"
TARGETFILE=`basename $PROGRAM`
MAXFILENAMELEN=15
;;
apple2enh-reboot)
TEMPLATE="make/prodos_template.dsk"
DELETELOADER=0
RENAMELOADER=1
DELETEBASIC=1
HASHEADER=1
FILETYPE="bin"
TARGETFILE=`basename $PROGRAM`
MAXFILENAMELEN=15
;;
*)
echo "Invalid machine type $MACHINE"
exit 1
;;
esac
if [ ${#TARGETFILE} -gt $MAXFILENAMELEN ]
then
echo "The filename $TARGETFILE exceeds the max name length of the filesystem ($MAXFILENAMELEN)"
exit 1
fi
if [ ! -f "$TEMPLATE" ]
then
echo "Cannot file template disk image $TEMPLATE"
exit 1
fi
cp "$TEMPLATE" "$DISKIMAGE"
if [ $DELETELOADER -eq 1 ]
then
"$JAVA" -jar "$APPLECOMMANDER" -d "$DISKIMAGE" LOADER.SYSTEM
fi
if [ $RENAMELOADER -eq 1 ]
then
LOADERFILE=${TARGETFILE}.system
if [ ${#LOADERFILE} -gt $MAXFILENAMELEN ]
then
echo "The filename $LOADERFILE exceeds the max name length of the filesystem ($MAXFILENAMELEN)"
rm -f "$DISKIMAGE"
exit 1
fi
"$JAVA" -jar "$APPLECOMMANDER" -g "$DISKIMAGE" LOADER.SYSTEM | "$JAVA" -jar "$APPLECOMMANDER" -p "$DISKIMAGE" "$LOADERFILE" sys
"$JAVA" -jar "$APPLECOMMANDER" -d "$DISKIMAGE" LOADER.SYSTEM
fi
if [ $DELETEBASIC -eq 1 ]
then
"$JAVA" -jar "$APPLECOMMANDER" -d "$DISKIMAGE" BASIC.SYSTEM
fi
if [ $HASHEADER -eq 1 ]
then
HDR_STARTADDR=`od -t x2 -N 2 < "$PROGRAM" | head -1 | awk '{print $2}' | sed 's/^0*//'`
if [ "$HDR_STARTADDR" = "$STARTADDR" ]
then
dd if="$PROGRAM" bs=4 skip=1 | "$JAVA" -jar "$APPLECOMMANDER" -p "$DISKIMAGE" "$TARGETFILE" $FILETYPE 0x$STARTADDR
else
"$JAVA" -jar "$APPLECOMMANDER" -p "$DISKIMAGE" "$TARGETFILE" $FILETYPE 0x$STARTADDR < "$PROGRAM"
fi
else
"$JAVA" -jar "$APPLECOMMANDER" -p "$DISKIMAGE" "$TARGETFILE" $FILETYPE < "$PROGRAM"
fi
for DIR in $*
do
if [ ! -d "$DIR" ]
then
echo Unable to find directory $DIR
exit 1
fi
OLDPWD=`pwd`
cd $DIR
find . -type f -print | while read FILE
do
TRANSFERARG=-p
FILETYPE=bin
DESTFILE=`echo $FILE | sed 's/^\.\///'`
if echo $FILE | egrep '\.as$' > /dev/null
then
# If the file ends with .as, this means the input is AppleSingle format.
# Strip the .as from the end of the file name and set the args to do
# an AppleSingle transfer.
TRANSFERARG=-as
FILETYPE=""
DESTFILE=`echo $DESTFILE | sed 's/\.as$//'`
elif echo $FILE | egrep '\.[ABITSRab]$' > /dev/null
then
# If the file ends with a single character DOS 3.3 file type, then use
# that as the file type.
FILETYPE=`echo $DESTFILE | awk -F. '{print $NF}'`
DESTFILE=`echo $DESTFILE | sed 's/\.[ABITSRab]$//'`
elif echo $FILE | egrep '\.[a-zA-Z][a-zA-Z][a-zA-Z]$' > /dev/null
then
# If the file ends with a three letter extension, use that as
# the file type.
FILETYPE=`echo $DESTFILE | awk -F. '{print $NF}'`
DESTFILE=`echo $DESTFILE | sed 's/\.[a-zA-Z][a-zA-Z][a-zA-Z]$//'`
fi
# If the file type is text, convert the line feeds to carriage return
if [ $FILETYPE = txt ] || [ $FILETYPE = T ]
then
tr '\n' '\r' < $FILE | "$JAVA" -jar "$OLDPWD/$APPLECOMMANDER" $TRANSFERARG "$OLDPWD/$DISKIMAGE" "$DESTFILE" $FILETYPE
else
"$JAVA" -jar "$OLDPWD/$APPLECOMMANDER" $TRANSFERARG "$OLDPWD/$DISKIMAGE" "$DESTFILE" $FILETYPE < $FILE
fi
done
cd "$OLDPWD"
done

Binary file not shown.

View File

@ -0,0 +1,59 @@
#!/bin/sh
PWD=`pwd`
$* 2> /tmp/errors.$$
RESULT=$?
if [ $RESULT -ne 0 ]
then
exec /usr/bin/perl -x $0 $RESULT /tmp/errors.$$ "$PWD"
fi
exit 0
#!/usr/bin/perl
use strict;
my $result = $ARGV[0];
my $filename = $ARGV[1];
my $pwd = $ARGV[2];
open(FILE, "<$filename") || die "$0: Unable to open file, $!";
my $unresolvedRefError = undef;
while (<FILE>) {
chomp;
if (defined $unresolvedRefError) {
if (m/^ ([^(]+)\(([0-9]+)\)/) {
my $file = $1;
my $lineno = $2;
if (! -f "$pwd/$file") {
$file =~ s/\.s$/.c/;
}
$_ = "$pwd/$file:$lineno:0: Error: $unresolvedRefError";
} else {
$unresolvedRefError = undef;
}
}
if (m/^(Unresolved external .* referenced) in:/) {
$unresolvedRefError = $1;
$_ = "";
} elsif (m/^([^(]+)\(([0-9]+)\):(.*)$/) {
my $file = $1;
my $lineno = $2;
my $error = $3;
$_ = "$pwd/$file:$lineno:0:$error";
}
print STDERR "$_\n";
}
unlink($filename);
exit($result);

View File

@ -0,0 +1,48 @@
#
# head.mk
# Apple2BuildPipelineSample
#
# Part of a sample build pipeline for Apple II software development
#
# Created by Quinn Dunki on 8/15/14.
# One Girl, One Laptop Productions
# http://www.quinndunki.com
# http://www.quinndunki.com/blondihacks
#
export CC65_HOME := /usr/local/lib/cc65
CC65_BIN = /usr/local/bin
CL65=$(CC65_BIN)/cl65
CA65=$(CC65_BIN)/ca65
CC65=$(CC65_BIN)/cc65
CO65=$(CC65_BIN)/co65
AC=make/AppleCommander.jar
SRCDIRS=.
MACHINE=apple2
CPU=6502
CFLAGS=
ASMFLAGS=
LDFLAGS=
DRIVERS=
DRVDIR=drivers
XCODE_PATH=/Applications/Xcode.app
XCODE_INFO=$(XCODE_PATH)/Contents/Info.plist
CC65_PLUGIN_PATH=$(HOME)/Library/Developer/Xcode/Plug-ins/cc65.ideplugin
CC65_PLUGIN_INFO=$(CC65_PLUGIN_PATH)/Contents/Info.plist
XCODE_PLUGIN_COMPATIBILITY=DVTPlugInCompatibilityUUID
.PHONY: all gen genclean
all:
@make gen
@make build

Binary file not shown.

View File

@ -0,0 +1,202 @@
#
# tail.mk
# Apple2BuildPipelineSample
#
# Part of a sample build pipeline for Apple II software development
#
# Created by Quinn Dunki on 8/15/14.
# One Girl, One Laptop Productions
# http://www.quinndunki.com
# http://www.quinndunki.com/blondihacks
#
export PATH := $(PATH):$(CC65_BIN)
CWD=$(shell pwd)
ifneq ($(DRIVERS),)
SRCDIRS+=$(DRVDIR)
endif
C_SRCS=$(patsubst ./%, %, $(wildcard $(addsuffix /*.c, $(SRCDIRS))))
C_OBJS=$(C_SRCS:.c=.o)
C_DEPS=$(C_SRCS:.c=.u)
ASM_SRCS=$(patsubst ./%, %, $(wildcard $(addsuffix /*.s, $(SRCDIRS))))
ASM_OBJS=$(ASM_SRCS:.s=.o)
ASM_LSTS=$(ASM_SRCS:.s=.lst)
OBJS=$(C_OBJS) $(ASM_OBJS)
MAPFILE=$(PGM).map
DISKIMAGE=$(PGM).dsk
LINK_ARGS=
EXECCMD=
ALLTARGET=$(DISKIMAGE)
ifneq ($(START_ADDR),)
# If the MACHINE is set to an option which does not support a variable start
# address, then error.
ifneq ($(filter $(MACHINE), apple2-system apple2enh-system),)
$(error You cannot change start address with this machine type)
endif
else
# If not set, then use the default for the config as per cc65 documentation
ifneq ($(filter $(MACHINE), apple2 apple2-dos33 apple2enh apple2enh-dos33),)
START_ADDR=803
endif
ifneq ($(filter $(MACHINE), apple2-system apple2enh-system),)
START_ADDR=2000
endif
ifneq ($(filter $(MACHINE), apple2-loader apple2-reboot apple2enh-loader apple2enh-reboot),)
START_ADDR=800
endif
endif
LDFLAGS += --start-addr 0x$(START_ADDR)
ifneq ($(filter $(MACHINE), apple2 apple2enh apple2-dos33 apple2enh-dos33),)
EXECCMD=$(shell echo brun $(PGM) | tr '[a-z]' '[A-Z]')
endif
# By default, use the a2 drivers. If the machine is one of the enhanced
# targets though, use the a2e drivers.
DRV_BASE_MACHINE=a2
ifneq ($(filter $(MACHINE), apple2enh apple2enh-dos33 apple2enh-system apple2enh-loader apple2enh-reboot),)
DRV_BASE_MACHINE=a2e
endif
MACHCONFIG= -t apple2
ifneq ($(filter $(MACHINE), apple2enh apple2apple2enh-dos33 apple2enh-system apple2enh-loader apple2enh-reboot),)
MACHCONFIG= -t apple2enh
endif
ifeq ($(filter $(MACHINE), apple2 apple2enh),)
MACHCONFIG += -C $(MACHINE).cfg
endif
.PHONY: build execute clean xcodefix loresgr hiresgr auxmem joystick mouse serial
build: $(ALLTARGET)
clean: genclean
rm -f "$(PGM)"
rm -f $(OBJS)
rm -f $(C_DEPS)
rm -f $(MAPFILE)
rm -f $(ASM_LSTS)
rm -f "$(DISKIMAGE)"
rm -Rf "$(DRVDIR)"
cleanMacCruft:
rm -rf pkg
$(PGM): $(OBJS)
make/errorFilter.sh $(CL65) $(MACHCONFIG) --mapfile $(MAPFILE) $(LDFLAGS) -o "$(PGM)" $(OBJS)
$(DISKIMAGE): $(PGM)
make/createDiskImage $(AC) $(MACHINE) "$(DISKIMAGE)" "$(PGM)" "$(START_ADDR)" $(COPYDIRS)
execute: $(DISKIMAGE)
osascript make/V2Make.scpt "$(CWD)" "$(PGM)" "$(CWD)/make/DevApple.vii" "$(EXECCMD)"
%.o: %.c
make/errorFilter.sh $(CL65) $(MACHCONFIG) $(CFLAGS) --create-dep -c -o $@ $<
sed -i .bak 's/\.s:/.o:/' $(@:.o=.u)
rm -f $(@:.o=.u).bak
%.o: %.s
make/errorFilter.sh $(CL65) $(MACHCONFIG) --cpu $(CPU) $(ASMFLAGS) -l -c -o $@ $<
$(OBJS): Makefile
# Some gen phase stuff...
gen: xcodefix $(DRIVERS)
xcodefix:
defaults write "$(CC65_PLUGIN_INFO)" $(XCODE_PLUGIN_COMPATIBILITY)s -array `defaults read "$(XCODE_INFO)" $(XCODE_PLUGIN_COMPATIBILITY)`
# Lores driver codegen
loresgr: $(DRVDIR)/a2_lores_drv.s $(DRVDIR)/a2_lores_drv.h
$(DRVDIR)/a2_lores_drv.s: $(CC65_HOME)/tgi/$(DRV_BASE_MACHINE).lo.tgi
mkdir -p $(DRVDIR)
$(CO65) --code-label _a2_lores_drv -o $@ $(CC65_HOME)/tgi/$(DRV_BASE_MACHINE).lo.tgi
$(DRVDIR)/a2_lores_drv.h:
mkdir -p $(DRVDIR)
echo '#include <tgi.h>' > $@
echo 'extern char a2_lores_drv;' >> $@
# Hires driver codegen
hiresgr: $(DRVDIR)/a2_hires_drv.s $(DRVDIR)/a2_hires_drv.h
$(DRVDIR)/a2_hires_drv.s: $(CC65_HOME)/tgi/$(DRV_BASE_MACHINE).hi.tgi
mkdir -p $(DRVDIR)
$(CO65) --code-label _a2_hires_drv -o $@ $(CC65_HOME)/tgi/$(DRV_BASE_MACHINE).hi.tgi
$(DRVDIR)/a2_hires_drv.h:
mkdir -p $(DRVDIR)
echo '#include <tgi.h>' > $@
echo 'extern char a2_hires_drv;' >> $@
# Auxmem driver codegen
auxmem: $(DRVDIR)/a2_auxmem_drv.s $(DRVDIR)/a2_auxmem_drv.h
$(DRVDIR)/a2_auxmem_drv.s: $(CC65_HOME)/emd/$(DRV_BASE_MACHINE).auxmem.emd
mkdir -p $(DRVDIR)
$(CO65) --code-label _a2_auxmem_drv -o $@ $(CC65_HOME)/emd/$(DRV_BASE_MACHINE).auxmem.emd
$(DRVDIR)/a2_auxmem_drv.h:
mkdir -p $(DRVDIR)
echo '#include <em.h>' > $@
echo 'extern char a2_auxmem_drv;' >> $@
# Joystick driver codegen
joystick: $(DRVDIR)/a2_joystick_drv.s $(DRVDIR)/a2_joystick_drv.h
$(DRVDIR)/a2_joystick_drv.s: $(CC65_HOME)/joy/$(DRV_BASE_MACHINE).stdjoy.joy
mkdir -p $(DRVDIR)
$(CO65) --code-label _a2_joystick_drv -o $@ $(CC65_HOME)/joy/$(DRV_BASE_MACHINE).stdjoy.joy
$(DRVDIR)/a2_joystick_drv.h:
mkdir -p $(DRVDIR)
echo '#include <joystick.h>' > $@
echo 'extern char a2_joystick_drv;' >> $@
# Mouse driver codegen
mouse: $(DRVDIR)/a2_mouse_drv.s $(DRVDIR)/a2_mouse_drv.h
$(DRVDIR)/a2_mouse_drv.s: $(CC65_HOME)/mou/$(DRV_BASE_MACHINE).stdmou.mou
mkdir -p $(DRVDIR)
$(CO65) --code-label _a2_mouse_drv -o $@ $(CC65_HOME)/mou/$(DRV_BASE_MACHINE).stdmou.mou
$(DRVDIR)/a2_mouse_drv.h:
mkdir -p $(DRVDIR)
echo '#include <mouse.h>' > $@
echo 'extern char a2_mouse_drv;' >> $@
# Serial driver codegen
serial: $(DRVDIR)/a2_serial_drv.s $(DRVDIR)/a2_serial_drv.h
$(DRVDIR)/a2_serial_drv.s: $(CC65_HOME)/ser/$(DRV_BASE_MACHINE).ssc.ser
mkdir -p $(DRVDIR)
$(CO65) --code-label _a2_serial_drv -o $@ $(CC65_HOME)/ser/$(DRV_BASE_MACHINE).ssc.ser
$(DRVDIR)/a2_serial_drv.h:
mkdir -p $(DRVDIR)
echo '#include <serial.h>' > $@
echo 'extern char a2_serial_drv;' >> $@
-include $(C_DEPS)