commit 9d728fd3d66c6c8b3a1f1a0239028f2f4cfc5b21 Author: Jeremy Rand Date: Fri Jul 16 12:37:38 2021 -0400 Initial Commit diff --git a/Listener.xcodeproj/project.pbxproj b/Listener.xcodeproj/project.pbxproj new file mode 100644 index 0000000..fc69314 --- /dev/null +++ b/Listener.xcodeproj/project.pbxproj @@ -0,0 +1,584 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 50; + objects = { + +/* Begin PBXBuildFile section */ + 9D5155A626A1ED510075EBC7 /* main.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D5155A526A1ED510075EBC7 /* main.c */; }; + 9D5155A926A1ED510075EBC7 /* main.rez in CopyFiles */ = {isa = PBXBuildFile; fileRef = 9D5155A826A1ED510075EBC7 /* main.rez */; }; + 9D5155AB26A1ED510075EBC7 /* Makefile in Sources */ = {isa = PBXBuildFile; fileRef = 9D5155AA26A1ED510075EBC7 /* Makefile */; }; + 9D5155AE26A1ED510075EBC7 /* config.txt in CopyFiles */ = {isa = PBXBuildFile; fileRef = 9D5155AD26A1ED510075EBC7 /* config.txt */; }; + 9D5155B026A1ED510075EBC7 /* createDiskImage in CopyFiles */ = {isa = PBXBuildFile; fileRef = 9D5155AF26A1ED510075EBC7 /* createDiskImage */; }; + 9D5155B226A1ED510075EBC7 /* head.mk in CopyFiles */ = {isa = PBXBuildFile; fileRef = 9D5155B126A1ED510075EBC7 /* head.mk */; }; + 9D5155B426A1ED510075EBC7 /* launchEmulator in CopyFiles */ = {isa = PBXBuildFile; fileRef = 9D5155B326A1ED510075EBC7 /* launchEmulator */; }; + 9D5155B626A1ED510075EBC7 /* md2teach in CopyFiles */ = {isa = PBXBuildFile; fileRef = 9D5155B526A1ED510075EBC7 /* md2teach */; }; + 9D5155B826A1ED510075EBC7 /* orca-asm in CopyFiles */ = {isa = PBXBuildFile; fileRef = 9D5155B726A1ED510075EBC7 /* orca-asm */; }; + 9D5155BA26A1ED510075EBC7 /* orca-cc in CopyFiles */ = {isa = PBXBuildFile; fileRef = 9D5155B926A1ED510075EBC7 /* orca-cc */; }; + 9D5155BC26A1ED510075EBC7 /* orca-rez in CopyFiles */ = {isa = PBXBuildFile; fileRef = 9D5155BB26A1ED510075EBC7 /* orca-rez */; }; + 9D5155BE26A1ED510075EBC7 /* system601.2mg in CopyFiles */ = {isa = PBXBuildFile; fileRef = 9D5155BD26A1ED510075EBC7 /* system601.2mg */; }; + 9D5155C026A1ED510075EBC7 /* empty.2mg in CopyFiles */ = {isa = PBXBuildFile; fileRef = 9D5155BF26A1ED510075EBC7 /* empty.2mg */; }; + 9D5155C226A1ED510075EBC7 /* tar in CopyFiles */ = {isa = PBXBuildFile; fileRef = 9D5155C126A1ED510075EBC7 /* tar */; }; + 9D5155C426A1ED510075EBC7 /* tail.mk in CopyFiles */ = {isa = PBXBuildFile; fileRef = 9D5155C326A1ED510075EBC7 /* tail.mk */; }; + 9D5155C726A1ED510075EBC7 /* Listener.xcscheme in CopyFiles */ = {isa = PBXBuildFile; fileRef = 9D5155C626A1ED510075EBC7 /* Listener.xcscheme */; }; +/* End PBXBuildFile section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 9D5155A126A1ED510075EBC7 /* CopyFiles */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = /usr/share/man/man1/; + dstSubfolderSpec = 0; + files = ( + 9D5155B626A1ED510075EBC7 /* md2teach in CopyFiles */, + 9D5155BC26A1ED510075EBC7 /* orca-rez in CopyFiles */, + 9D5155C426A1ED510075EBC7 /* tail.mk in CopyFiles */, + 9D5155B426A1ED510075EBC7 /* launchEmulator in CopyFiles */, + 9D5155C026A1ED510075EBC7 /* empty.2mg in CopyFiles */, + 9D5155C726A1ED510075EBC7 /* Listener.xcscheme in CopyFiles */, + 9D5155B826A1ED510075EBC7 /* orca-asm in CopyFiles */, + 9D5155B026A1ED510075EBC7 /* createDiskImage in CopyFiles */, + 9D5155C226A1ED510075EBC7 /* tar in CopyFiles */, + 9D5155AE26A1ED510075EBC7 /* config.txt in CopyFiles */, + 9D5155A926A1ED510075EBC7 /* main.rez in CopyFiles */, + 9D5155B226A1ED510075EBC7 /* head.mk in CopyFiles */, + 9D5155BA26A1ED510075EBC7 /* orca-cc in CopyFiles */, + 9D5155BE26A1ED510075EBC7 /* system601.2mg in CopyFiles */, + ); + runOnlyForDeploymentPostprocessing = 1; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 9D51559926A1ED510075EBC7 /* Listener */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = Listener; sourceTree = BUILT_PRODUCTS_DIR; }; + 9D51559C26A1ED510075EBC7 /* Listener.2mg */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = Listener.2mg; sourceTree = BUILT_PRODUCTS_DIR; }; + 9D51559E26A1ED510075EBC7 /* Listener.shk */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = Listener.shk; sourceTree = BUILT_PRODUCTS_DIR; }; + 9D5155A326A1ED510075EBC7 /* doNotBuild */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = doNotBuild; sourceTree = BUILT_PRODUCTS_DIR; }; + 9D5155A526A1ED510075EBC7 /* main.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = main.c; sourceTree = ""; }; + 9D5155A726A1ED510075EBC7 /* main.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = main.h; sourceTree = ""; }; + 9D5155A826A1ED510075EBC7 /* main.rez */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.rez; path = main.rez; sourceTree = ""; }; + 9D5155AA26A1ED510075EBC7 /* Makefile */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.make; path = Makefile; sourceTree = ""; }; + 9D5155AD26A1ED510075EBC7 /* config.txt */ = {isa = PBXFileReference; lastKnownFileType = text; path = config.txt; sourceTree = ""; }; + 9D5155AF26A1ED510075EBC7 /* createDiskImage */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = createDiskImage; sourceTree = ""; }; + 9D5155B126A1ED510075EBC7 /* head.mk */ = {isa = PBXFileReference; lastKnownFileType = text; path = head.mk; sourceTree = ""; }; + 9D5155B326A1ED510075EBC7 /* launchEmulator */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = launchEmulator; sourceTree = ""; }; + 9D5155B526A1ED510075EBC7 /* md2teach */ = {isa = PBXFileReference; lastKnownFileType = file; path = md2teach; sourceTree = ""; }; + 9D5155B726A1ED510075EBC7 /* orca-asm */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = "orca-asm"; sourceTree = ""; }; + 9D5155B926A1ED510075EBC7 /* orca-cc */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = "orca-cc"; sourceTree = ""; }; + 9D5155BB26A1ED510075EBC7 /* orca-rez */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = "orca-rez"; sourceTree = ""; }; + 9D5155BD26A1ED510075EBC7 /* system601.2mg */ = {isa = PBXFileReference; lastKnownFileType = file; path = system601.2mg; sourceTree = ""; }; + 9D5155BF26A1ED510075EBC7 /* empty.2mg */ = {isa = PBXFileReference; lastKnownFileType = file; path = empty.2mg; sourceTree = ""; }; + 9D5155C126A1ED510075EBC7 /* tar */ = {isa = PBXFileReference; lastKnownFileType = file; path = tar; sourceTree = ""; }; + 9D5155C326A1ED510075EBC7 /* tail.mk */ = {isa = PBXFileReference; lastKnownFileType = text; path = tail.mk; sourceTree = ""; }; + 9D5155C626A1ED510075EBC7 /* Listener.xcscheme */ = {isa = PBXFileReference; lastKnownFileType = text.xml; name = Listener.xcscheme; path = ../../Listener.xcodeproj/xcshareddata/xcschemes/Listener.xcscheme; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 9D5155A026A1ED510075EBC7 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 9D51559226A1ED510075EBC7 = { + isa = PBXGroup; + children = ( + 9D5155A426A1ED510075EBC7 /* Listener */, + 9D51559A26A1ED510075EBC7 /* Products */, + ); + sourceTree = ""; + }; + 9D51559A26A1ED510075EBC7 /* Products */ = { + isa = PBXGroup; + children = ( + 9D51559926A1ED510075EBC7 /* Listener */, + 9D51559C26A1ED510075EBC7 /* Listener.2mg */, + 9D51559E26A1ED510075EBC7 /* Listener.shk */, + 9D5155A326A1ED510075EBC7 /* doNotBuild */, + ); + name = Products; + sourceTree = ""; + }; + 9D5155A426A1ED510075EBC7 /* Listener */ = { + isa = PBXGroup; + children = ( + 9D5155A526A1ED510075EBC7 /* main.c */, + 9D5155A726A1ED510075EBC7 /* main.h */, + 9D5155A826A1ED510075EBC7 /* main.rez */, + 9D5155AA26A1ED510075EBC7 /* Makefile */, + 9D5155AC26A1ED510075EBC7 /* make */, + 9D5155C526A1ED510075EBC7 /* Supporting Files */, + ); + path = Listener; + sourceTree = ""; + }; + 9D5155AC26A1ED510075EBC7 /* make */ = { + isa = PBXGroup; + children = ( + 9D5155AD26A1ED510075EBC7 /* config.txt */, + 9D5155AF26A1ED510075EBC7 /* createDiskImage */, + 9D5155B126A1ED510075EBC7 /* head.mk */, + 9D5155B326A1ED510075EBC7 /* launchEmulator */, + 9D5155B526A1ED510075EBC7 /* md2teach */, + 9D5155B726A1ED510075EBC7 /* orca-asm */, + 9D5155B926A1ED510075EBC7 /* orca-cc */, + 9D5155BB26A1ED510075EBC7 /* orca-rez */, + 9D5155BD26A1ED510075EBC7 /* system601.2mg */, + 9D5155BF26A1ED510075EBC7 /* empty.2mg */, + 9D5155C126A1ED510075EBC7 /* tar */, + 9D5155C326A1ED510075EBC7 /* tail.mk */, + ); + path = make; + sourceTree = ""; + }; + 9D5155C526A1ED510075EBC7 /* Supporting Files */ = { + isa = PBXGroup; + children = ( + 9D5155C626A1ED510075EBC7 /* Listener.xcscheme */, + ); + path = "Supporting Files"; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXLegacyTarget section */ + 9D51559726A1ED510075EBC7 /* Listener */ = { + isa = PBXLegacyTarget; + buildArgumentsString = "-C Listener $(ACTION)"; + buildConfigurationList = 9D5155CA26A1ED510075EBC7 /* Build configuration list for PBXLegacyTarget "Listener" */; + buildPhases = ( + ); + buildToolPath = /usr/bin/make; + dependencies = ( + ); + name = Listener; + passBuildSettingsInEnvironment = 1; + productName = Listener; + }; +/* End PBXLegacyTarget section */ + +/* Begin PBXNativeTarget section */ + 9D51559826A1ED510075EBC7 /* Binary */ = { + isa = PBXNativeTarget; + buildConfigurationList = 9D5155CD26A1ED510075EBC7 /* Build configuration list for PBXNativeTarget "Binary" */; + buildPhases = ( + ); + buildRules = ( + ); + dependencies = ( + ); + name = Binary; + productName = Binary; + productReference = 9D51559926A1ED510075EBC7 /* Listener */; + productType = "com.apple.product-type.tool"; + }; + 9D51559B26A1ED510075EBC7 /* DiskImage */ = { + isa = PBXNativeTarget; + buildConfigurationList = 9D5155D026A1ED510075EBC7 /* Build configuration list for PBXNativeTarget "DiskImage" */; + buildPhases = ( + ); + buildRules = ( + ); + dependencies = ( + ); + name = DiskImage; + productName = DiskImage; + productReference = 9D51559C26A1ED510075EBC7 /* Listener.2mg */; + productType = "com.apple.product-type.tool"; + }; + 9D51559D26A1ED510075EBC7 /* Archive */ = { + isa = PBXNativeTarget; + buildConfigurationList = 9D5155D326A1ED510075EBC7 /* Build configuration list for PBXNativeTarget "Archive" */; + buildPhases = ( + ); + buildRules = ( + ); + dependencies = ( + ); + name = Archive; + productName = Archive; + productReference = 9D51559E26A1ED510075EBC7 /* Listener.shk */; + productType = "com.apple.product-type.tool"; + }; + 9D5155A226A1ED510075EBC7 /* doNotBuild */ = { + isa = PBXNativeTarget; + buildConfigurationList = 9D5155D626A1ED510075EBC7 /* Build configuration list for PBXNativeTarget "doNotBuild" */; + buildPhases = ( + 9D51559F26A1ED510075EBC7 /* Sources */, + 9D5155A026A1ED510075EBC7 /* Frameworks */, + 9D5155A126A1ED510075EBC7 /* CopyFiles */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = doNotBuild; + productName = doNotBuild; + productReference = 9D5155A326A1ED510075EBC7 /* doNotBuild */; + productType = "com.apple.product-type.tool"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 9D51559326A1ED510075EBC7 /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 1240; + TargetAttributes = { + 9D51559726A1ED510075EBC7 = { + CreatedOnToolsVersion = 12.4; + }; + 9D51559826A1ED510075EBC7 = { + CreatedOnToolsVersion = 12.4; + }; + 9D51559B26A1ED510075EBC7 = { + CreatedOnToolsVersion = 12.4; + }; + 9D51559D26A1ED510075EBC7 = { + CreatedOnToolsVersion = 12.4; + }; + 9D5155A226A1ED510075EBC7 = { + CreatedOnToolsVersion = 12.4; + }; + }; + }; + buildConfigurationList = 9D51559626A1ED510075EBC7 /* Build configuration list for PBXProject "Listener" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 9D51559226A1ED510075EBC7; + productRefGroup = 9D51559A26A1ED510075EBC7 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 9D51559726A1ED510075EBC7 /* Listener */, + 9D51559826A1ED510075EBC7 /* Binary */, + 9D51559B26A1ED510075EBC7 /* DiskImage */, + 9D51559D26A1ED510075EBC7 /* Archive */, + 9D5155A226A1ED510075EBC7 /* doNotBuild */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXSourcesBuildPhase section */ + 9D51559F26A1ED510075EBC7 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 9D5155AB26A1ED510075EBC7 /* Makefile in Sources */, + 9D5155A626A1ED510075EBC7 /* main.c in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 9D5155C826A1ED510075EBC7 /* 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_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + 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 = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + }; + name = Debug; + }; + 9D5155C926A1ED510075EBC7 /* 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_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + 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; + MTL_FAST_MATH = YES; + }; + name = Release; + }; + 9D5155CB26A1ED510075EBC7 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Automatic; + DEBUGGING_SYMBOLS = YES; + DEBUG_INFORMATION_FORMAT = dwarf; + DEVELOPMENT_TEAM = VD9FGCW36C; + GCC_GENERATE_DEBUGGING_SYMBOLS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + OTHER_CFLAGS = ""; + OTHER_LDFLAGS = ""; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Debug; + }; + 9D5155CC26A1ED510075EBC7 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Automatic; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + DEVELOPMENT_TEAM = VD9FGCW36C; + OTHER_CFLAGS = ""; + OTHER_LDFLAGS = ""; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Release; + }; + 9D5155CE26A1ED510075EBC7 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = VD9FGCW36C; + ENABLE_HARDENED_RUNTIME = YES; + PRODUCT_NAME = Listener; + }; + name = Debug; + }; + 9D5155CF26A1ED510075EBC7 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = VD9FGCW36C; + ENABLE_HARDENED_RUNTIME = YES; + PRODUCT_NAME = Listener; + }; + name = Release; + }; + 9D5155D126A1ED510075EBC7 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = VD9FGCW36C; + ENABLE_HARDENED_RUNTIME = YES; + PRODUCT_NAME = Listener.2mg; + }; + name = Debug; + }; + 9D5155D226A1ED510075EBC7 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = VD9FGCW36C; + ENABLE_HARDENED_RUNTIME = YES; + PRODUCT_NAME = Listener.2mg; + }; + name = Release; + }; + 9D5155D426A1ED510075EBC7 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = VD9FGCW36C; + ENABLE_HARDENED_RUNTIME = YES; + PRODUCT_NAME = Listener.shk; + }; + name = Debug; + }; + 9D5155D526A1ED510075EBC7 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = VD9FGCW36C; + ENABLE_HARDENED_RUNTIME = YES; + PRODUCT_NAME = Listener.shk; + }; + name = Release; + }; + 9D5155D726A1ED510075EBC7 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = VD9FGCW36C; + ENABLE_HARDENED_RUNTIME = YES; + GCC_PREPROCESSOR_DEFINITIONS = ( + "inline(X,Y)=\"\"\n", + "extended=double\n", + "pascal=\"\"", + ); + HEADER_SEARCH_PATHS = ( + "$TEMP_ROOT/Listener.build/$CONFIGURATION/Listener.build/DerivedSources\n", + "$GOLDEN_GATE/Libraries/ORCACDefs\n", + "~/Library/GoldenGate/Libraries/ORCACDefs\n", + "/Library/GoldenGate/Libraries/ORCACDefs\n", + "~/GoldenGate/Libraries/ORCACDefs", + ); + PRODUCT_NAME = doNotBuild; + }; + name = Debug; + }; + 9D5155D826A1ED510075EBC7 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = VD9FGCW36C; + ENABLE_HARDENED_RUNTIME = YES; + GCC_PREPROCESSOR_DEFINITIONS = ( + "inline(X,Y)=\"\"\n", + "extended=double\n", + "pascal=\"\"", + ); + HEADER_SEARCH_PATHS = ( + "$TEMP_ROOT/Listener.build/$CONFIGURATION/Listener.build/DerivedSources\n", + "$GOLDEN_GATE/Libraries/ORCACDefs\n", + "~/Library/GoldenGate/Libraries/ORCACDefs\n", + "/Library/GoldenGate/Libraries/ORCACDefs\n", + "~/GoldenGate/Libraries/ORCACDefs", + ); + PRODUCT_NAME = doNotBuild; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 9D51559626A1ED510075EBC7 /* Build configuration list for PBXProject "Listener" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 9D5155C826A1ED510075EBC7 /* Debug */, + 9D5155C926A1ED510075EBC7 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 9D5155CA26A1ED510075EBC7 /* Build configuration list for PBXLegacyTarget "Listener" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 9D5155CB26A1ED510075EBC7 /* Debug */, + 9D5155CC26A1ED510075EBC7 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 9D5155CD26A1ED510075EBC7 /* Build configuration list for PBXNativeTarget "Binary" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 9D5155CE26A1ED510075EBC7 /* Debug */, + 9D5155CF26A1ED510075EBC7 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 9D5155D026A1ED510075EBC7 /* Build configuration list for PBXNativeTarget "DiskImage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 9D5155D126A1ED510075EBC7 /* Debug */, + 9D5155D226A1ED510075EBC7 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 9D5155D326A1ED510075EBC7 /* Build configuration list for PBXNativeTarget "Archive" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 9D5155D426A1ED510075EBC7 /* Debug */, + 9D5155D526A1ED510075EBC7 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 9D5155D626A1ED510075EBC7 /* Build configuration list for PBXNativeTarget "doNotBuild" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 9D5155D726A1ED510075EBC7 /* Debug */, + 9D5155D826A1ED510075EBC7 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 9D51559326A1ED510075EBC7 /* Project object */; +} diff --git a/Listener.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Listener.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..919434a --- /dev/null +++ b/Listener.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/Listener.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Listener.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Listener.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Listener.xcodeproj/xcshareddata/xcschemes/Listener.xcscheme b/Listener.xcodeproj/xcshareddata/xcschemes/Listener.xcscheme new file mode 100644 index 0000000..bb23742 --- /dev/null +++ b/Listener.xcodeproj/xcshareddata/xcschemes/Listener.xcscheme @@ -0,0 +1,110 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Listener.xcodeproj/xcuserdata/jrand.xcuserdatad/xcschemes/xcschememanagement.plist b/Listener.xcodeproj/xcuserdata/jrand.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..20c1e86 --- /dev/null +++ b/Listener.xcodeproj/xcuserdata/jrand.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,34 @@ + + + + + SchemeUserState + + Archive.xcscheme_^#shared#^_ + + orderHint + 4 + + Binary.xcscheme_^#shared#^_ + + orderHint + 3 + + DiskImage.xcscheme_^#shared#^_ + + orderHint + 2 + + Listener.xcscheme_^#shared#^_ + + orderHint + 0 + + doNotBuild.xcscheme_^#shared#^_ + + orderHint + 1 + + + + diff --git a/Listener/Makefile b/Listener/Makefile new file mode 100644 index 0000000..b7f4c90 --- /dev/null +++ b/Listener/Makefile @@ -0,0 +1,185 @@ +# +# Makefile +# Apple //GS Build Engine for ORCA and Merlin +# + +include make/head.mk + +# Customize this file to control what kind of project you are working on, +# where to find files, etc. + +# The name of your system or binary file to build goes here: +PGM=Listener + +# Set the target type you would like to build. The options are: +# shell - A shell command for ORCA, GNO or other GS shell +# desktop - A full desktop application +# cda - A classic desk accessory +# cdev - A control panel device +# nba - A HyperStudio new button action +# nda - A new desk accessory +# xcmd - A HyperCard XCMD or XCFN +# +# TARGETTYPE=shell +# TARGETTYPE=desktop +# TARGETTYPE=cda +# TARGETTYPE=cdev +# TARGETTYPE=nba +TARGETTYPE=nda +# TARGETTYPE=xcmd + +# Uncomment one of the following lines to force a particular GS emulator. +# By default, specific paths are tested for these emulators in the below +# order and the first found is what will be used. You can overrride that +# here: +# +# EMULATOR=gsplus +# EMULATOR=mame +# EMULATOR=gsport + +# By default, the build provides a single boot environment to test with. +# You can put other .2mg files into the make directory and override this +# variable to change what boot disk you want to use when you launch the +# emulator. The disk image you specify must be found in the make directory: +# +# BOOTIMAGE=system601.2mg + +# Add any other directories where you are putting C or assembly source +# files to this list: +# SRCDIRS+= + +# If you put your main entry point for your project in a file called main.c +# Then you don't need to change this value. If you want to call your entry +# point something other than main.c, set this variable to point to this file. +ROOTCFILE=main.c + +# Add any arguments you want passed to the C compiler to this variable: +CFLAGS+= + +# Add any arguments you want passed to the resource compiler to this variable: +REZFLAGS+= + +# Uncomment the following line if you have installed rlint as found here: +# https://github.com/ksherlock/rlint/releases +# Assuming that it is in the path that ORCA searches (the Utilities directory is +# probably a good choice), you can just leave the value unchanged. If you have +# put the rlint somewhere weird, you can set this to the correct path +# RLINT_PATH=rlint + +# Add any arguments you want passed to the macro generator to this variable: +MACGENFLAGS+= + +# Add any other macro libraries to include in this variable: +MACGENMACROS+= + +# Add any arguments you want passed to the assembler to this variable: +ASMFLAGS+= + +# Add any arguments you want passed to the linker to this variable: +LDFLAGS+= + +# Uncomment the following line if you want to build against the GNO libraries +# export ORCA=$(ORCA_BINDIR)/gno + +# Add any markdown files to the MD_SRCS variable to specify which files to +# convert to a Teach text file format during the build. Using this, you can +# write your documentation in markdown in your project and at build time, +# that documentation is converted to a format that is good to package with +# your software and can be opened on a GS. +MD_SRCS= + +# If you want to copy one or more files or directories to the distribution disk +# image, add the root directory to this variable. Any directories under +# the source directory which don't exist in the target disk image will be +# created. 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/Icons/myIconFile +# dir/newDir/anotherFile +# Then, during the copy phase, myIconFile will be copied into the Icons +# folder and a folder newDir will be created and anotherFile will be copied +# into there. +COPYDIRS= + +# If you want to copy one or more files or directories to the boot disk +# image, add the root directory to this variable. Any directories under +# the source directory which don't exist in the boot disk image will be +# created. All files will be copied from the source to the target using +# the same path from the source. +# +# For example, if you set COPYBOOTDIRS to dir and in your project you have +# the following files: +# dir/System/mySystemFile +# dir/newDir/anotherFile +# Then, during the copy phase, mySystemFile will be copied into the System +# folder and a folder newDir will be created and anotherFile will be copied +# into there. +COPYBOOTDIRS= + +# By default, the build expects that you have GSplus in the path: +# /Applications/GSplus.app/Contents/MacOS/gsplus +# If you have it in a different location, specify that here. +# GSPLUS=/Applications/GSplus.app/Contents/MacOS/gsplus + +# By default, the build uses no arguments with GSplus. If you would like to +# use different arguments, specify that here. +# GSPLUSARGS= + +# By default, the build expects that you have GSport in the path: +# /Applications/GSport/GSport.app/Contents/MacOS/GSport +# If you have it in a different location, specify that here. +# GSPORT=/Applications/GSport/GSport.app/Contents/MacOS/GSport + +# By default, the build uses no arguments with GSport. If you would like to +# use different arguments, specify that here. +# GSPORTARGS= + +# By default, the build expects that you have Ample/mame in the path: +# /Applications/Ample.app/Contents/MacOS/mame64 +# If you have it in a different location, specify that here. +# MAME=/Applications/Ample.app/Contents/MacOS/mame64 + +# By default, the build expects that you have the mame ROMs/libs in the path: +# $(HOME)/Library/Application Support/Ample +# If you have it in a different location, specify that here. +# MAMELIB=$(HOME)/Library/Application Support/Ample + +# By default, the build uses these arguments with mame: +# apple2gs -skip_gameinfo -mouse -window -resolution 1408x1056 -ramsize 4M -sl7 cffa202 +# If you would like to use different arguments, specify that here. +# MAMEARGS=apple2gs -skip_gameinfo -speed 2 -mouse -window -resolution 1408x1056 -ramsize 4M -sl7 cffa202 + +# For a desktop application, it can operate in 640x200 or 320x200 +# resolution. This setting is used to define which horizontal +# resolution you want to use for a desktop application. Other +# target types ignore this value. +# DESKTOP_RES_MODE=640 + +# For a desktop application, it can support opening and printing +# files based on paths sent to it by the message center. This +# option controls if that is or is not supported in the +# application (note: only the C desktop template supports message +# center today) +# MESSAGE_CENTER=0 + +# 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. You should generate these files in the $(GENDIR) +# directory or within a subdirectory under $(GENDIR) which you create +# yourself. +# +# All of your commands associated with a rule _must_ start with a tab +# character. Xcode makes it a bit tough to type a tab character by +# default. Press option-tab within Xcode to insert a tab character. +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 diff --git a/Listener/main.c b/Listener/main.c new file mode 100644 index 0000000..8ce4b7e --- /dev/null +++ b/Listener/main.c @@ -0,0 +1,189 @@ +/* + * main.c + * Listener + * + * Created by Jeremy Rand on 2021-07-16. + * Copyright (c) 2021 ___ORGANIZATIONNAME___. All rights reserved. + * + */ + + +#pragma nda NDAOpen NDAClose NDAAction NDAInit -1 0x03FF " Listener\\H**" + + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "main.h" + + +static BOOLEAN ndaActive; +static GrafPortPtr winPtr; +static unsigned int userId; + + +void NDAClose(void) +{ + if (ndaActive) { + CloseWindow(winPtr); + winPtr = NULL; + ndaActive = FALSE; + } + + ResourceShutDown(); +} + + +void NDAInit(int code) +{ + /* When code is 1, this is tool startup, otherwise tool + * shutdown. + */ + + if (code) { + ndaActive = FALSE; + userId = MMStartUp(); + } else { + if (ndaActive) + NDAClose(); + } +} + + +#pragma databank 1 +void DrawContents(void) +{ + PenNormal(); + MoveTo(7,10); + DrawCString("Hello, world!"); +} +#pragma databank 0 + + +GrafPortPtr NDAOpen(void) +{ + unsigned int oldResourceApp; + LevelRecGS levelDCB; + unsigned int oldLevel; + SysPrefsRecGS prefsDCB; + unsigned int oldPrefs; + + if (ndaActive) + return NULL; + + levelDCB.pCount = 2; + GetLevelGS(&levelDCB); + oldLevel = levelDCB.level; + levelDCB.level = 0; + SetLevelGS(&levelDCB); + + prefsDCB.pCount = 1; + GetSysPrefsGS(&prefsDCB); + oldPrefs = prefsDCB.preferences; + prefsDCB.preferences = (prefsDCB.preferences & 0x1fff) | 0x8000; + SetSysPrefsGS(&prefsDCB); + + oldResourceApp = OpenResourceFileByID(readEnable, userId); + + winPtr = NewWindow2("\p Listener ", 0, DrawContents, NULL, 0x02, windowRes, rWindParam1); + + SetSysWindow(winPtr); + ShowWindow(winPtr); + SelectWindow(winPtr); + + ndaActive = TRUE; + + prefsDCB.preferences = oldPrefs; + SetSysPrefsGS(&prefsDCB); + + levelDCB.level = oldLevel; + SetLevelGS(&levelDCB); + + SetCurResourceApp(oldResourceApp); + + return winPtr; +} + + +void HandleRun(void) +{ +} + + +void HandleControl(EventRecord *event) +{ +} + + +void HandleKey(EventRecord *event) +{ +} + + +void HandleCursor(void) +{ +} + + +void HandleMenu(int menuItem) +{ +} + + +BOOLEAN NDAAction(EventRecord *sysEvent, int code) +{ + static EventRecord localEvent; + unsigned int eventCode; + BOOLEAN result = FALSE; + + switch (code) { + case runAction: + HandleRun(); + break; + + case eventAction: + BlockMove((Pointer)sysEvent, (Pointer)&localEvent, 16); + localEvent.wmTaskMask = 0x001FFFFF; + eventCode = TaskMasterDA(0, &localEvent); + switch(eventCode) { + case updateEvt: + BeginUpdate(winPtr); + DrawContents(); + EndUpdate(winPtr); + break; + + case wInControl: + HandleControl(&localEvent); + break; + + case keyDownEvt: + case autoKeyEvt: + HandleKey(&localEvent); + break; + } + break; + + case cursorAction: + HandleCursor(); + break; + + case cutAction: + case copyAction: + case pasteAction: + case clearAction: + result = TRUE; + HandleMenu(code); + break; + } + + return result; +} + diff --git a/Listener/main.h b/Listener/main.h new file mode 100644 index 0000000..cc3d162 --- /dev/null +++ b/Listener/main.h @@ -0,0 +1,17 @@ +/* + * main.h + * Listener + * + * Created by Jeremy Rand on 2021-07-16. + * Copyright (c) 2021 ___ORGANIZATIONNAME___. All rights reserved. + * + */ + +#ifndef _GUARD_PROJECTListener_FILEmain_ +#define _GUARD_PROJECTListener_FILEmain_ + + +#define windowRes 1001 + + +#endif /* defined(_GUARD_PROJECTListener_FILEmain_) */ diff --git a/Listener/main.rez b/Listener/main.rez new file mode 100644 index 0000000..4abe934 --- /dev/null +++ b/Listener/main.rez @@ -0,0 +1,48 @@ +/* + * main.rez + * Listener + * + * Created by Jeremy Rand on 2021-07-16. + * + */ + + +#include "types.rez" + +#include "main.h" + + +resource rVersion (1) { + { + 0, /* Major version number in BCD */ + 1, /* Minor version number in BCD */ + 0, /* Bug version number in BCD */ + development,/* Development phase */ + 0 /* Release number */ + }, + verUS, + "Listener", + "Copyright \$A9 2021 Jeremy Rand" +}; + + +resource rWindParam1 (windowRes) { + $C0A5, /* wFrameBits */ + nil, /* wTitle */ + 0, /* wRefCon */ + {0,0,0,0}, /* ZoomRect */ + $07FF0001, /* wColor ID */ + {0,0}, /* Origin */ + {0,0}, /* data size */ + {0,0}, /* max height-width */ + {0,0}, /* scroll ver hors */ + {0,0}, /* page ver horiz */ + 0, /* winfoRefcon */ + 0, /* wInfoHeight */ + {50,50,62,200}, /* wposition */ + infront, /* wPlane */ + nil, /* wStorage */ + $0800 /* wInVerb */ +}; + + diff --git a/Listener/make/config.txt b/Listener/make/config.txt new file mode 100644 index 0000000..76d0ff9 --- /dev/null +++ b/Listener/make/config.txt @@ -0,0 +1,47 @@ +# GSport configuration file version 0.31 + +s5d1 = +s5d2 = + +s6d1 = +s6d2 = + +s7d1 = + +g_joystick_type = 0 +g_limit_speed = 0 + + +bram1[00] = 00 00 00 01 00 00 0d 06 02 01 01 00 01 00 00 00 +bram1[10] = 00 00 07 06 02 01 01 00 00 00 0f 06 06 00 05 06 +bram1[20] = 01 00 00 00 00 00 00 01 00 00 00 00 03 02 02 02 +bram1[30] = 00 00 00 00 00 00 00 00 08 00 01 02 03 04 05 06 +bram1[40] = 07 0a 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d +bram1[50] = 0e 0f ff ff ff ff ff ff ff 00 ff ff ff ff ff 81 +bram1[60] = ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff +bram1[70] = ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff +bram1[80] = ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff +bram1[90] = ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff +bram1[a0] = ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff +bram1[b0] = ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff +bram1[c0] = ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff +bram1[d0] = ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff +bram1[e0] = ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff +bram1[f0] = ff ff ff ff ff ff ff ff ff ff ff ff 52 06 f8 ac + +bram3[00] = 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +bram3[10] = 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +bram3[20] = 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +bram3[30] = 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +bram3[40] = 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +bram3[50] = 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +bram3[60] = 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +bram3[70] = 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +bram3[80] = 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +bram3[90] = 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +bram3[a0] = 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +bram3[b0] = 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +bram3[c0] = 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +bram3[d0] = 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +bram3[e0] = 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +bram3[f0] = 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 diff --git a/Listener/make/createDiskImage b/Listener/make/createDiskImage new file mode 100755 index 0000000..f69693e --- /dev/null +++ b/Listener/make/createDiskImage @@ -0,0 +1,252 @@ +#!/bin/sh + +if [ $# -lt 3 ] +then + echo USAGE: $0 diskimage bootimage file [bootdest] + exit 1 +fi + +DISKIMAGE="$1" +shift + +DESTBOOTIMAGE="$1" +shift + +FILE="$1" +shift + +BOOTCOPYPATH="$1" + +PROGRAM=`basename "$FILE"` +TMPDIR=/tmp/a2gs_mount.$$ +MOUNTDIR="${TMPDIR}/$PROGRAM" +TMPDISKIMAGE=/tmp/a2gs_diskimage_$$.2mg +TMPBOOTIMAGE=/tmp/a2gs_bootimage_$$.2mg +TMPARCHIVE=/tmp/s2gs_archive_$$.shk +TEMPLATEDISKIMAGE="make/empty.2mg" +TEMPLATEBOOTIMAGE="make/$BOOTIMAGE" +ARCHIVE=`dirname "$DISKIMAGE"`/"${PROGRAM}.shk" + +# It looks like on Linux, the cp command needs a special argument to preserve the resource fork. This isn't ideal +# but for now, if uname is Darwin, then this is MacOS and we don't need any cp args. If not Darwin, then assume +# this is Linux and ask for extended attributes to be preserved through the copy. +# +# Ultimately, it could be that other platforms (BSD, does Solaris still exist?) or even other Linux versions or +# distributions need different arguments for this rather special thing. If true, this may need to be a build time +# option which can be set. +if [ "`uname`" = Darwin ] +then + CPARGS="" +else + CPARGS="--preserve=xattr" +fi + + +printErrorAndExit() +{ + echo "`pwd`/Makefile:0:0: error: $*" >&2 + umount "$MOUNTDIR" 2> /dev/null + rm -f "$TMPDISKIMAGE" 2> /dev/null + rm -f "$TMPBOOTIMAGE" 2> /dev/null + rm -f "$TMPARCHIVE" 2> /dev/null + rm -f "$DISKIMAGE" 2> /dev/null + rm -f "$DESTBOOTIMAGE" 2> /dev/null + rm -rf "$TMPDIR" 2> /dev/null + exit 1 +} + + +unmount() +{ + RETRIES=0 + while [ $RETRIES -lt 5 ] + do + umount "$1" + if [ $? -eq 0 ] + then + break + fi + + RETRIES=`expr $RETRIES + 1` + sleep 1 + done + + if [ $RETRIES -ge 5 ] + then + printErrorAndExit "Unable to unmount the disk image." + fi +} + + +validateProDOSName() +{ + NAME=`basename $1` + echo $NAME | egrep '^[a-zA-Z][a-zA-Z0-9.]{0,14}$' > /dev/null +} + + +mkdirProDOS() +{ + validateProDOSName "$1" + if [ $? -ne 0 ] + then + printErrorAndExit "Invalid ProDOS name of directory `basename $1`. ProDOS names must be 1 to 15 characters, start with a letter and only letters, numbers and a period can be used in the name." + fi + + mkdir -p "$1" + if [ $? -ne 0 ] + then + printErrorAndExit "Unable to create directory $1" + fi +} + + +cpProDOS() +{ + validateProDOSName "$2" + if [ $? -ne 0 ] + then + printErrorAndExit "Invalid ProDOS name of file `basename $2`. ProDOS names must be 1 to 15 characters, start with a letter and only letters, numbers and a period can be used in the name." + fi + + cp $CPARGS "$1" "$2" + if [ $? -ne 0 ] + then + printErrorAndExit "Unable to create directory $1" + fi +} + + +copyDirs() +{ + OLDDIR=`pwd` + for COPYDIR in $* + do + cd "$COPYDIR" + if [ $? != 0 ] + then + printErrorAndExit "Unable to find $COPYDIR" + fi + + find . -print | while read FILEORDIR + do + if [ "$FILEORDIR" = "." ] + then + continue + fi + if [ -d "$FILEORDIR" ] + then + mkdirProDOS "${MOUNTDIR}/$FILEORDIR" + elif [ -f "$FILEORDIR" ] + then + cpProDOS "$FILEORDIR" "${MOUNTDIR}/$FILEORDIR" + fi + done + cd "$OLDDIR" + done +} + + +if [ ! -f "$TEMPLATEDISKIMAGE" ] +then + printErrorAndExit "Unable to find the template disk image, $TEMPLATEDISKIMAGE" +fi + +if [ ! -f "$TEMPLATEBOOTIMAGE" ] +then + printErrorAndExit "Unable to find the template boot image, $TEMPLATEBOOTIMAGE" +fi + +mkdir "$TMPDIR" +if [ $? != 0 ] +then + printErrorAndExit "Unable to create the mount directory." +fi + +mkdir "$MOUNTDIR" +if [ $? != 0 ] +then + printErrorAndExit "Unable to create the mount directory." +fi + +cp "$TEMPLATEBOOTIMAGE" "$TMPBOOTIMAGE" +if [ $? != 0 ] +then + printErrorAndExit "Unable to copy template boot image." +fi +if [ ! -z "$COPYBOOTDIRS" ] || [ ! -z "BOOTCOPYPATH" ] +then + profuse -orw "$TMPBOOTIMAGE" "$MOUNTDIR" + if [ $? != 0 ] + then + printErrorAndExit "Unable to mount the boot image." + fi + + if [ ! -z "$BOOTCOPYPATH" ] + then + cpProDOS "$FILE" "$MOUNTDIR/$BOOTCOPYPATH" + if [ $? != 0 ] + then + printErrorAndExit "Unable to copy the file to the boot image." + fi + fi + + copyDirs $COPYBOOTDIRS + + unmount "$MOUNTDIR" +fi + +cp "$TEMPLATEDISKIMAGE" "$TMPDISKIMAGE" +if [ $? != 0 ] +then + printErrorAndExit "Unable to copy template disk image." +fi + +profuse -orw "$TMPDISKIMAGE" "$MOUNTDIR" +if [ $? != 0 ] +then + printErrorAndExit "Unable to mount the disk image." +fi + +cpProDOS "$FILE" "$MOUNTDIR" +if [ $? != 0 ] +then + printErrorAndExit "Unable to copy the file to the disk image." +fi + +copyDirs $COPYDIRS + +OLDDIR=`pwd` +cd "$TMPDIR" +$ORCA "$OLDDIR/make/tar" cf "$TMPARCHIVE" "$PROGRAM" +if [ $? != 0 ] +then + printErrorAndExit "Unable to create archive." +fi +cd "$OLDDIR" + +unmount "$MOUNTDIR" + +cp "$TMPDISKIMAGE" "$DISKIMAGE" +if [ $? != 0 ] +then + printErrorAndExit "Unable to copy the disk image to the destination." +fi + +cp "$TMPBOOTIMAGE" "$DESTBOOTIMAGE" +if [ $? != 0 ] +then + printErrorAndExit "Unable to copy the boot image to the destination." +fi + +cp "$TMPARCHIVE" "$ARCHIVE" +if [ $? != 0 ] +then + printErrorAndExit "Unable to copy the archive to the destination." +fi + +rm -f "$TMPDISKIMAGE" +rm -f "$TMPBOOTIMAGE" +rm -f "$TMPARCHIVE" +rm -rf "$TMPDIR" +exit 0 diff --git a/Listener/make/empty.2mg b/Listener/make/empty.2mg new file mode 100644 index 0000000..4b1474b Binary files /dev/null and b/Listener/make/empty.2mg differ diff --git a/Listener/make/head.mk b/Listener/make/head.mk new file mode 100644 index 0000000..b176c59 --- /dev/null +++ b/Listener/make/head.mk @@ -0,0 +1,125 @@ +# +# head.mk +# + +ORCA_HOME := $(HOME)/orca + +ORCA_BINDIR = /usr/local/bin + +export ORCA=$(ORCA_BINDIR)/orca + +TARGETTYPE=shell + +ASSEMBLER=orcam + +MERLIN_DIR=/usr/local +export MERLIN_BIN=$(MERLIN_DIR)/bin/Merlin32 +export MERLIN_LIB=$(MERLIN_DIR)/lib/Merlin +MERLIN_ASM=make/merlin-asm + +SRCDIRS=. + +# Check for Xcode build variables for the locations of build outputs and fall back +# to the current directory if not set. +ifeq ($(OBJECT_FILE_DIR),) + OBJDIR=. +else + export OBJECT_FILE_DIR + OBJDIR=$(OBJECT_FILE_DIR) +endif + +ifeq ($(DERIVED_SOURCES_DIR),) + GENDIR=. +else + export DERIVED_SOURCES_DIR + GENDIR=$(DERIVED_SOURCES_DIR) +endif + +ifeq ($(TARGET_BUILD_DIR),) + TARGETDIR=. +else + export TARGET_BUILD_DIR + TARGETDIR=$(TARGET_BUILD_DIR) +endif + +COMPILE=make/orca-cc +CFLAGS= -P -I +ROOTCFILE=main.c +DEFINES= +INCLUDE_PATHS= + +REZ=make/orca-rez +REZFLAGS= + +MACGEN=make/orca-macgen +MACGENFLAGS=-P +MACGENMACROS=13/ORCAInclude/m= + +ASSEMBLE=make/orca-asm +ASMFLAGS=-P + +LINK=$(ORCA) link +LDFLAGS=-P + +CHTYP=$(ORCA) chtyp + +RM=rm -f +CP=cp +MV=mv +MKDIR=mkdir -p + +DESKTOP_RES_MODE=640 +MESSAGE_CENTER=0 + +GSPLUS=/Applications/GSplus.app/Contents/MacOS/gsplus +GSPLUSARGS= +GSPORT=/Applications/GSport/GSport.app/Contents/MacOS/GSport +GSPORTARGS= +MAME=/Applications/Ample.app/Contents/MacOS/mame64 +MAMELIB=$(HOME)/Library/Application Support/Ample +MAMEARGS=apple2gs -skip_gameinfo -speed 2 -mouse -window -resolution 1408x1056 -ramsize 4M -sl7 cffa202 + +export GSPLUS +export GSPLUSARGS +export GSPORT +export GSPORTARGS +export MAME +export MAMELIB +export MAMEARGS + +ifneq (,$(wildcard $GSPLUS)) + EMULATOR=gsplus +else ifneq (,$(wildcard $MAME)) + EMULATOR=mame +else ifneq (,$(wildcard $GSPORT)) + EMULATOR=gsport +else + EMULATOR=gsplus +endif + +export EMULATOR + +BOOTIMAGE=system601.2mg +export BOOTIMAGE + +COPYDIRS= +export COPYDIRS +COPYBOOTDIRS= +export COPYBOOTDIRS + +XCODE_PATH=/Applications/Xcode.app +XCODE_INFO=$(XCODE_PATH)/Contents/Info.plist + +ORCAM_PLUGIN_PATH=$(HOME)/Library/Developer/Xcode/Plug-ins/OrcaM.ideplugin +ORCAM_PLUGIN_INFO=$(ORCAM_PLUGIN_PATH)/Contents/Info.plist + +XCODE_PLUGIN_COMPATIBILITY=DVTPlugInCompatibilityUUID + + +.PHONY: all gen genclean + +all: + $(MKDIR) $(OBJDIR) $(GENDIR) $(TARGETDIR) + @make -f $(firstword $(MAKEFILE_LIST)) gen + @make -f $(firstword $(MAKEFILE_LIST)) build + diff --git a/Listener/make/launchEmulator b/Listener/make/launchEmulator new file mode 100755 index 0000000..2ee547b --- /dev/null +++ b/Listener/make/launchEmulator @@ -0,0 +1,84 @@ +#!/bin/sh + +TMPDIR="/tmp/a2gs_emulator.$$" + +cleanupAndExit() +{ + cd + if [ ! -z $PID ] + then + kill $PID 2> /dev/null + fi + rm -rf $TMPDIR + exit 0 +} + +createConfigTxt() +{ + mkdir "$TMPDIR" + sed "s:^s7d1 *=.*$:s7d1 = $BOOTIMAGE: +s:^s5d1 *=.*:s5d1 = $DISKIMAGE:" < make/config.txt > "$TMPDIR/config.txt" + +} + +if [ $# -ne 2 ] +then + echo USAGE $0: diskimage bootimage + exit 1 +fi + +DISKIMAGE="$1" +if echo $DISKIMAGE | grep -v '^/' > /dev/null +then + DISKIMAGE="$PWD/$DISKIMAGE" +fi + +BOOTIMAGE="$2" +if echo $BOOTIMAGE | grep -v '^/' > /dev/null +then + BOOTIMAGE="$PWD/$BOOTIMAGE" +fi + +case "$EMULATOR" in + gsplus) + EMULATORPATH="$GSPLUS" + EMULATORARGS="$GSPLUSARGS" + EMULATORDIR="$TMPDIR" + createConfigTxt + ;; + gsport) + EMULATORPATH="$GSPORT" + EMULATORARGS="$GSPORTARGS" + EMULATORDIR="$TMPDIR" + createConfigTxt + ;; + mame) + EMULATORPATH="$MAME" + EMULATORARGS="$MAMEARGS -hard1 "$BOOTIMAGE" -flop3 "$DISKIMAGE"" + EMULATORDIR="$MAMELIB" + ;; + *) + echo Invalid emulator specified, \"$EMULATOR\" + exit 1 + ;; +esac + +if [ ! -x "$EMULATORPATH" ] +then + echo Unable to find $EMULATOR at $EMULATORPATH + exit 1 +fi + +if [ ! -d "$EMULATORDIR" ] +then + echo Unable to find $EMULATOR library at $EMULATORDIR + exit 1 +fi + +cd "$EMULATORDIR" +# This magic ensure that clicking stop in Xcode results in the emulator terminating. +"$EMULATORPATH" $EMULATORARGS & +PID=$! + +trap cleanupAndExit SIGTERM SIGINT SIGHUP EXIT +wait diff --git a/Listener/make/md2teach b/Listener/make/md2teach new file mode 100644 index 0000000..d456eb5 Binary files /dev/null and b/Listener/make/md2teach differ diff --git a/Listener/make/orca-asm b/Listener/make/orca-asm new file mode 100755 index 0000000..ed41452 --- /dev/null +++ b/Listener/make/orca-asm @@ -0,0 +1,102 @@ +#!/bin/bash + +TMPFILE=/tmp/orca-macgen.$$ +ERROUTPUT=/tmp/orca-asm-errs.$$ + +FILENAME="$1" +shift + +DESTBASENAME="$1" +shift + +if echo $FILENAME | grep -v '\.s$' > /dev/null +then + echo Expected second argument to be a *.s file but got $FILENAME + exit 1 +fi + +SRCBASENAME=`echo $FILENAME | sed 's/\.s$//'` +SRCMACROSNAME="${SRCBASENAME}.macros" +SRCROOTNAME="${SRCBASENAME}.ROOT" +SRCOBJNAME="${SRCBASENAME}.a" + +DESTMACROSNAME="${DESTBASENAME}.macros" +DESTDEPSNAME="${DESTBASENAME}.macros.d" +DESTROOTNAME="${DESTBASENAME}.ROOT" +DESTOBJNAME="${DESTBASENAME}.a" + +$ORCA --trace-gsos macgen $MACGENFLAGS "$FILENAME" "$SRCMACROSNAME" $MACGENMACROS < /dev/null 2> $TMPFILE +RESULT=$? + +sed '/^[A-Za-z][A-Za-z]*(.*)$/d' $TMPFILE >&2 + +if [ "$RESULT" -ne 0 ] +then + rm -f "$TMPFILE" + rm -f "$SRCMACROSNAME" + exit $RESULT +fi + +DEPS=`awk ' + /^FastFileLoad/ { + sub(/^FastFileLoad\(/, ""); + sub(/\)$/, ""); + print}' $TMPFILE | sort -u | while read FILE + do + if [ -f "$FILE" ] + then + echo $FILE + fi + done | tr '\012' ' '` + +rm -f $TMPFILE + +DIRNAME=`dirname $FILENAME` +BASENAME=`basename $FILENAME .s` + +pushd "$DIRNAME" > /dev/null +$ORCA assemble $* keep="${BASENAME}" "${BASENAME}.s" 2> $ERROUTPUT +RESULT=$? +popd > /dev/null + +if [ -s $ERROUTPUT ] +then + RESULT=1 + awk ' + { + print $0 + } + + /^Error /{ + $1="" + $2="" + LINENO=$3 + $3="" + printf("%s/%s:%d:0: error: %s\n", PWD, FILE, LINENO, $0) + } + ' "PWD=`pwd`" "FILE=${BASENAME}.s" $ERROUTPUT +fi +rm -f $ERROUTPUT + +if [ "$RESULT" -ne 0 ] +then + rm -f "$SRCROOTNAME" + rm -f "$SRCMACROSNAME" + rm -f "$SRCOBJNAME" + rm -f "$DESTROOTNAME" + rm -f "$DESTMACROSNAME" + rm -f "$DESTOBJNAME" + rm -f "$DESTDEPSNAME" + exit 1 +fi + +mkdir -p `dirname "$DESTROOTNAME"` +mv -f "$SRCROOTNAME" "$DESTROOTNAME" 2> /dev/null +mv -f "$SRCMACROSNAME" "$DESTMACROSNAME" 2> /dev/null +mv -f "$SRCOBJNAME" "$DESTOBJNAME" 2> /dev/null + +cat > $DESTDEPSNAME << EOF +$DESTROOTNAME: $DEPS +EOF + +exit 0 diff --git a/Listener/make/orca-cc b/Listener/make/orca-cc new file mode 100755 index 0000000..0f6b429 --- /dev/null +++ b/Listener/make/orca-cc @@ -0,0 +1,95 @@ +#!/bin/bash + +STDOUTPUT=/tmp/orca-cc-std.$$ +ERROUTPUT=/tmp/orca-cc-errs.$$ + +FILENAME="$1" +shift + +DESTBASENAME="$1" +shift + +if echo $FILENAME | grep -v '\.c$' > /dev/null +then + echo Expected first argument to be a *.c file but got $FILENAME + exit 1 +fi + +CCARGS="" +COMPILEARGS="" +for ARG in $* +do + if echo $ARG | grep '^-[id]' > /dev/null + then + CCARGS="$CCARGS cc=$ARG" + else + COMPILEARGS="$COMPILEARGS $ARG" + fi +done + +SRCBASENAME=`echo "$FILENAME" | sed 's/\.c$//'` +SRCOBJNAME="${SRCBASENAME}.a" +SRCROOTNAME="${SRCBASENAME}.root" + +DESTDEPSNAME="${DESTBASENAME}.d" +DESTOBJNAME="${DESTBASENAME}.a" +DESTROOTNAME="${DESTBASENAME}.root" + +$ORCA --trace-gsos compile $COMPILEARGS "$FILENAME" keep="${SRCBASENAME}" $CCARGS > $STDOUTPUT 2> $ERROUTPUT +RESULT=$? + +awk ' + { + print $0 + } + + $1 ~ /^[0-9][0-9]*$/ { + LINENO=$1 + } + + /^ *\^/ { + sub(/^ *\^/, "", $0) + printf("%s/%s:%d:0: error: %s\n", PWD, FILE, LINENO, $0) + } +' "PWD=`pwd`" "FILE=$FILENAME" $STDOUTPUT + + +sed '/^[A-Za-z][A-Za-z]*(.*)$/d' $ERROUTPUT >&2 + +if [ "$RESULT" -ne 0 ] +then + rm -f $ERROUTPUT + rm -f $STDOUTPUT + rm -f $SRCOBJNAME + rm -f $SRCROOTNAME + exit $RESULT +fi + +mkdir -p `dirname "$DESTOBJNAME"` +mv -f "$SRCOBJNAME" "$DESTOBJNAME" 2> /dev/null +mv -f "$SRCROOTNAME" "$DESTROOTNAME" 2> /dev/null + +DEPS=`awk ' + /^FastFileLoad/ { + sub(/^FastFileLoad\(/, ""); + sub(/\)$/, ""); + print}' $ERROUTPUT | sort -u | while read FILE + do + if [ -f "$FILE" ] + then + echo $FILE + fi + done | tr '\012' ' '` + +rm -f $ERROUTPUT +rm -f $STDOUTPUT + +# We add a dependency for both the .o and the .root file. If this is the +# main.c file being compiled, we need the dependency on the .root file. +cat > $DESTDEPSNAME << EOF +$DESTOBJNAME: $DEPS + +$DESTROOTNAME: $DEPS +EOF + +exit 0 diff --git a/Listener/make/orca-rez b/Listener/make/orca-rez new file mode 100755 index 0000000..d5204e4 --- /dev/null +++ b/Listener/make/orca-rez @@ -0,0 +1,68 @@ +#!/bin/bash + +ERROUTPUT=/tmp/orca-rez-err.$$ + +FILENAME="$1" +shift + +DESTBASENAME="$1" +shift + +if echo $FILENAME | grep -v '\.rez$' > /dev/null +then + echo Expected first argument to be a *.rez file but got $FILENAME + exit 1 +fi + +SRCBASENAME=`echo $FILENAME | sed 's/\.rez$//'` +SRCOBJNAME="${SRCBASENAME}.r" + +DESTDEPSNAME="${DESTBASENAME}.rez.d" +DESTOBJNAME="${DESTBASENAME}.r" + +$ORCA --trace-gsos compile "$@" keep="${SRCOBJNAME}" "$FILENAME" 2> $ERROUTPUT +RESULT=$? + +awk ' + /^[A-Za-z][A-Za-z]*\(.*\)$/ { + next + } + + { + print + } + + /^File [^ ]*; Line [0-9][0-9]*;/ { + sub(/;/,"",$4) + LINENO=$4 + sub(/^File [^ ]*; Line [0-9][0-9]*/, "", $0) + printf("%s/%s:%d:0: error: %s\n", PWD, FILE, LINENO, $0) + } +' "PWD=`pwd`" "FILE=$FILENAME" $ERROUTPUT >&2 + +if [ "$RESULT" -ne 0 ] +then + rm -f $ERROUTPUT + rm -f $SRCOBJNAME + exit $RESULT +fi + +mkdir -p `dirname "$DESTOBJNAME"` +mv -f "$SRCOBJNAME" "$DESTOBJNAME" 2> /dev/null + +DEPS=`awk ' + /^FastFileLoad/ { + sub(/^FastFileLoad\(/, ""); + sub(/\)$/, ""); + print}' $ERROUTPUT | sort -u | while read FILE + do + if [ -f "$FILE" ] + then + echo $FILE + fi + done` + +echo $DESTOBJNAME: $DEPS > $DESTDEPSNAME +rm -f $ERROUTPUT + +exit 0 diff --git a/Listener/make/system601.2mg b/Listener/make/system601.2mg new file mode 100644 index 0000000..ff5588b Binary files /dev/null and b/Listener/make/system601.2mg differ diff --git a/Listener/make/tail.mk b/Listener/make/tail.mk new file mode 100644 index 0000000..b4bd32b --- /dev/null +++ b/Listener/make/tail.mk @@ -0,0 +1,239 @@ +# +# tail.mk +# + +export PATH := $(PATH):$(ORCA_BIN) + +CWD=$(shell pwd) + +DISKIMAGE=$(TARGETDIR)/$(PGM).2mg +ARCHIVE=$(TARGETDIR)/$(PGM).shk +DESTBOOTIMAGE=$(TARGETDIR)/$(BOOTIMAGE) +BUILDTARGET=$(DISKIMAGE) +EXECTARGET=executeGUI +BOOTCOPYPATH= +AUXTYPE= +CFLAGS+=-i$(GENDIR) + +vpath $(GENDIR) + +ifeq ($(TARGETTYPE),shell) + FILETYPE=exe + EXECTARGET=executeShell + BUILDTARGET=$(TARGETDIR)/$(PGM) +else ifeq ($(TARGETTYPE),desktop) + FILETYPE=s16 + ifeq ($(MESSAGE_CENTER),1) + AUXTYPE=-a 0x0000db07 + else + AUXTYPE=-a 0x0000db03 + endif + CFLAGS+=-dMESSAGE_CENTER=$(MESSAGE_CENTER) + REZFLAGS+=rez='-d DESKTOP_RES_MODE=$(DESKTOP_RES_MODE)' + REZFLAGS+=rez='-d MESSAGE_CENTER=$(MESSAGE_CENTER)' +else ifeq ($(TARGETTYPE),cda) + FILETYPE=cda + BOOTCOPYPATH=System/Desk.Accs +else ifeq ($(TARGETTYPE),cdev) + BINTARGET=$(TARGETDIR)/$(PGM).bin + FILETYPE=199 + BOOTCOPYPATH=System/CDevs + REZFLAGS+=rez='-d BINTARGET="$(BINTARGET)"' +else ifeq ($(TARGETTYPE),nba) + FILETYPE=exe + BUILDTARGET=$(TARGETDIR)/$(PGM) +else ifeq ($(TARGETTYPE),nda) + FILETYPE=nda + BOOTCOPYPATH=System/Desk.Accs +else ifeq ($(TARGETTYPE),xcmd) + FILETYPE=exe + BUILDTARGET=$(TARGETDIR)/$(PGM) +endif + + +ASM_SRCS=$(patsubst $(GENDIR)/%, %, $(patsubst ./%, %, $(wildcard $(addsuffix /*.s, $(SRCDIRS))))) + +ifeq ($(ASSEMBLER),orcam) + ASM_MACROS=$(patsubst %.s, $(OBJDIR)/%.macros, $(ASM_SRCS)) + ASM_DEPS=$(patsubst %.s, $(OBJDIR)/%.macros.d, $(ASM_SRCS)) + ASM_ROOTS=$(patsubst %.s, $(OBJDIR)/%.ROOT, $(ASM_SRCS)) + ASM_OBJS=$(patsubst %.s, $(OBJDIR)/%.a, $(ASM_SRCS)) + + ifeq ($(wildcard $(ROOTCFILE)),) + ROOTCFILE= + endif + + C_ROOTS=$(patsubst %.c, $(OBJDIR)/%.root, $(ROOTCFILE)) + C_SRCS+=$(filter-out $(ROOTCFILE), $(patsubst $(GENDIR)/%, %, $(patsubst ./%, %, $(wildcard $(addsuffix /*.c, $(SRCDIRS)))))) + C_OBJS=$(patsubst %.c, $(OBJDIR)/%.a, $(C_SRCS)) + C_DEPS=$(patsubst %.c, $(OBJDIR)/%.d, $(ROOTCFILE)) $(patsubst %.c, $(OBJDIR)/%.d, $(C_SRCS)) +endif + +REZ_SRCS=$(patsubst $(GENDIR)/%, %, $(patsubst ./%, %, $(wildcard $(addsuffix /*.rez, $(SRCDIRS))))) +REZ_DEPS=$(patsubst %.rez, $(OBJDIR)/%.rez.d, $(REZ_SRCS)) +REZ_OBJS=$(patsubst %.rez, $(OBJDIR)/%.r, $(REZ_SRCS)) + +TEACH_FILES=$(patsubst %.md, $(GENDIR)/Teach/%, $(MD_SRCS)) +ifneq ($(TEACH_FILES),) + COPYDIRS+=$(GENDIR)/Teach +endif + +ifneq ($(firstword $(REZ_SRCS)), $(lastword $(REZ_SRCS))) + $(error Only a single resource file supported, found $(REZ_SRCS)) +endif + +BUILD_OBJS=$(C_ROOTS) $(C_OBJS) $(ASM_ROOTS) $(TEACH_FILES) +ifeq ($(BINTARGET),) + BUILD_OBJS+=$(REZ_OBJS) +endif +BUILD_OBJS_NOSUFFIX=$(C_ROOTS:.root=) $(C_OBJS:.a=) $(ASM_ROOTS:.ROOT=) + +ALL_OBJS=$(C_ROOTS:.root=.a) $(C_OBJS) $(ASM_OBJS) $(REZ_OBJS) $(TEACH_FILES) +ALL_ROOTS=$(C_ROOTS) $(C_OBJS:.a=.root) $(ASM_ROOTS) +ALL_DEPS=$(C_DEPS) $(ASM_DEPS) $(REZ_DEPS) + +EXECCMD= + +.PHONY: build execute executeShell executeGUI clean xcodefix + +.PRECIOUS: $(ASM_MACROS) + +build: $(BUILDTARGET) + +gen: xcodefix + +xcodefix: + [ "`uname`" = Darwin ] && defaults write "$(ORCAM_PLUGIN_INFO)" $(XCODE_PLUGIN_COMPATIBILITY)s -array `defaults read "$(XCODE_INFO)" $(XCODE_PLUGIN_COMPATIBILITY)` || true + +clean: genclean + $(RM) "$(TARGETDIR)/$(PGM)" $(BINTARGET) + $(RM) $(ALL_OBJS) + $(RM) $(ALL_ROOTS) + $(RM) $(ALL_DEPS) + $(RM) $(ASM_MACROS) + $(RM) "$(DISKIMAGE)" + $(RM) "$(DESTBOOTIMAGE)" + $(RM) "$(ARCHIVE)" + +createPackage: + pkg/createPackage + +cleanMacCruft: + rm -rf pkg + + +ifeq ($(BINTARGET),) + ifeq ($(ASSEMBLER),orcam) + +# This is a standard ORCA build where we generate the resources if any and +# then link the binary over that same file creating the resource fork first +# and the data fork second. +$(TARGETDIR)/$(PGM): $(BUILD_OBJS) + $(MKDIR) $(TARGETDIR) +ifneq ($(REZ_OBJS),) + $(RM) $(TARGETDIR)/$(PGM) + $(CP) $(REZ_OBJS) $(TARGETDIR)/$(PGM) +endif + cd $(OBJDIR); $(LINK) $(LDFLAGS) $(patsubst $(OBJDIR)/%, %, $(BUILD_OBJS_NOSUFFIX)) keep="$(abspath $(TARGETDIR)/$(PGM))" + $(CHTYP) -t $(FILETYPE) $(AUXTYPE) $(TARGETDIR)/$(PGM) + + endif + + ifeq ($(ASSEMBLER),merlin) +# This is a standard Merlin build where we generate the resources if any and +# then link the binary over that same file creating the resource fork first +# and the data fork second. + +$(TARGETDIR)/$(PGM): $(BUILD_OBJS) $(ASM_SRCS) + $(MKDIR) $(TARGETDIR) + $(RM) $(TARGETDIR)/$(PGM) + $(MERLIN_ASM) linkscript.s $(PGM) $(TARGETDIR)/$(PGM) +ifneq ($(REZ_OBJS),) + $(CP) $(REZ_OBJS)/..namedfork/rsrc $(TARGETDIR)/$(PGM)/..namedfork/rsrc +endif + $(CHTYP) -t $(FILETYPE) $(AUXTYPE) $(TARGETDIR)/$(PGM) + + endif + +else + + ifeq ($(ASSEMBLER),orcam) +# This is a special build for CDevs under ORCA where we build the binary into +# a $(PGM).bin file and then build the resources into the $(PGM) target. The +# resource compile will read the $(PGM).bin binary and load it into the +# resources also. +$(BINTARGET): $(BUILD_OBJS) + cd $(OBJDIR); $(LINK) $(LDFLAGS) $(patsubst $(OBJDIR)/%, %, $(BUILD_OBJS_NOSUFFIX)) keep="$(abspath $(BINTARGET))" + + endif + + ifeq ($(ASSEMBLER),merlin) +# This is a special build for CDevs under Merlin where we build the binary into +# a $(PGM).bin file and then build the resources into the $(PGM) target. The +# resource compile will read the $(PGM).bin binary and load it into the +# resources # also. +$(BINTARGET): $(BUILD_OBJS) $(ASM_SRCS) + $(MERLIN_ASM) linkscript.s $(PGM) $(BINTARGET) + + endif + +$(REZ_OBJS): $(BINTARGET) + +$(TARGETDIR)/$(PGM): $(REZ_OBJS) + $(MKDIR) $(TARGETDIR) + $(RM) $(TARGETDIR)/$(PGM) + $(CP) $(REZ_OBJS) $(TARGETDIR)/$(PGM) + $(CHTYP) -t $(FILETYPE) $(AUXTYPE) $(TARGETDIR)/$(PGM) + +endif + +$(DISKIMAGE): $(TARGETDIR)/$(PGM) make/empty.2mg make/$(BOOTIMAGE) + make/createDiskImage "$(DISKIMAGE)" $(DESTBOOTIMAGE) "$(TARGETDIR)/$(PGM)" $(BOOTCOPYPATH) + +execute: $(EXECTARGET) + +executeGUI: all + make/launchEmulator "$(DISKIMAGE)" "$(DESTBOOTIMAGE)" + +executeShell: all + $(ORCA) $(TARGETDIR)/$(PGM) + +$(OBJDIR)/%.a: %.c + $(COMPILE) $< $(@:.a=) $(CFLAGS) --noroot + +$(OBJDIR)/%.a: $(GENDIR)/%.c + $(COMPILE) $< $(@:.a=) $(CFLAGS) --noroot + +$(OBJDIR)/%.root: %.c + $(COMPILE) $< $(@:.root=) $(CFLAGS) + +$(OBJDIR)/%.root: $(GENDIR)/%.c + $(COMPILE) $< $(@:.root=) $(CFLAGS) + +$(OBJDIR)/%.ROOT: %.s + MACGENFLAGS="$(MACGENFLAGS)" MACGENMACROS="$(MACGENMACROS)" $(ASSEMBLE) $< $(@:.ROOT=) $(ASMFLAGS) + +$(OBJDIR)/%.ROOT: $(GENDIR)/%.s + MACGENFLAGS="$(MACGENFLAGS)" MACGENMACROS="$(MACGENMACROS)" $(ASSEMBLE) $< $(@:.ROOT=) $(ASMFLAGS) + +$(OBJDIR)/%.r: %.rez + $(REZ) $< $(@:.r=) $(REZFLAGS) +ifneq ($(RLINT_PATH),) + $(ORCA) $(RLINT_PATH) $@ +endif + +$(OBJDIR)/%.r: $(GENDIR)/%.rez + $(REZ) $< $(@:.r=) $(REZFLAGS) +ifneq ($(RLINT_PATH),) + $(ORCA) $(RLINT_PATH) $@ +endif + +$(GENDIR)/Teach/%: %.md + $(MKDIR) "$(GENDIR)/Teach" + $(ORCA) make/md2teach "$<" "$@" + +$(OBJS): Makefile + +# Include the C and rez dependencies which were generated from the last build +# so we recompile correctly on .h file changes. +-include $(ALL_DEPS) diff --git a/Listener/make/tar b/Listener/make/tar new file mode 100644 index 0000000..3e14264 Binary files /dev/null and b/Listener/make/tar differ