diff --git a/apple2048.xcodeproj/project.pbxproj b/apple2048.xcodeproj/project.pbxproj index 542ad97..d198894 100644 --- a/apple2048.xcodeproj/project.pbxproj +++ b/apple2048.xcodeproj/project.pbxproj @@ -7,42 +7,74 @@ objects = { /* Begin PBXFileReference section */ - 70E84C2E19B10B3100159159 /* Makefile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.make; path = Makefile; sourceTree = ""; }; - 9D667FA919BFF85D00717163 /* anim.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = anim.c; sourceTree = ""; }; - 9D667FAA19BFF85D00717163 /* anim.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = anim.h; sourceTree = ""; }; - 9D667FAB19BFF85D00717163 /* apple2048.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = apple2048.c; sourceTree = ""; }; - 9D667FAC19BFF85D00717163 /* game.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = game.c; sourceTree = ""; }; - 9D667FAD19BFF85D00717163 /* game.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = game.h; sourceTree = ""; }; - 9D667FAE19BFF85D00717163 /* textpage.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = textpage.h; sourceTree = ""; }; - 9D667FAF19BFF85D00717163 /* textpage.s */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.asm; path = textpage.s; sourceTree = ""; }; - 9D667FB019BFF85D00717163 /* ui.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = ui.c; sourceTree = ""; }; - 9D667FB119BFF85D00717163 /* ui.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ui.h; sourceTree = ""; }; + 9D02B4BA1A1C57D9002799E3 /* Makefile */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.make; path = Makefile; sourceTree = ""; }; + 9D02B4BC1A1C57D9002799E3 /* AppleCommander.jar */ = {isa = PBXFileReference; lastKnownFileType = archive.jar; name = AppleCommander.jar; path = make/AppleCommander.jar; sourceTree = ""; }; + 9D02B4BD1A1C57D9002799E3 /* createDiskImage */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; name = createDiskImage; path = make/createDiskImage; sourceTree = ""; }; + 9D02B4BE1A1C57D9002799E3 /* DevApple.vii */ = {isa = PBXFileReference; lastKnownFileType = file.bplist; name = DevApple.vii; path = make/DevApple.vii; sourceTree = ""; }; + 9D02B4BF1A1C57D9002799E3 /* dos33_template.dsk */ = {isa = PBXFileReference; lastKnownFileType = file; name = dos33_template.dsk; path = make/dos33_template.dsk; sourceTree = ""; }; + 9D02B4C01A1C57D9002799E3 /* head.mk */ = {isa = PBXFileReference; lastKnownFileType = text; name = head.mk; path = make/head.mk; sourceTree = ""; }; + 9D02B4C11A1C57D9002799E3 /* prodos_template.dsk */ = {isa = PBXFileReference; lastKnownFileType = file; name = prodos_template.dsk; path = make/prodos_template.dsk; sourceTree = ""; }; + 9D02B4C21A1C57D9002799E3 /* tail.mk */ = {isa = PBXFileReference; lastKnownFileType = text; name = tail.mk; path = make/tail.mk; sourceTree = ""; }; + 9D02B4C31A1C57D9002799E3 /* V2Make.scpt */ = {isa = PBXFileReference; lastKnownFileType = file; name = V2Make.scpt; path = make/V2Make.scpt; sourceTree = ""; }; + 9D02B4C91A1C584C002799E3 /* anim.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = anim.c; sourceTree = ""; }; + 9D02B4CA1A1C584C002799E3 /* anim.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = anim.h; sourceTree = ""; }; + 9D02B4CB1A1C584C002799E3 /* apple2048.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = apple2048.c; sourceTree = ""; }; + 9D02B4CC1A1C584C002799E3 /* game.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = game.c; sourceTree = ""; }; + 9D02B4CD1A1C584C002799E3 /* game.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = game.h; sourceTree = ""; }; + 9D02B4CE1A1C584C002799E3 /* textpage.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = textpage.h; sourceTree = ""; }; + 9D02B4CF1A1C584C002799E3 /* textpage.s */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.asm; path = textpage.s; sourceTree = ""; }; + 9D02B4D01A1C584C002799E3 /* ui.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = ui.c; sourceTree = ""; }; + 9D02B4D11A1C584C002799E3 /* ui.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ui.h; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXGroup section */ - 70E84C2319B10B0500159159 = { + 9D02B4B21A1C57D9002799E3 = { isa = PBXGroup; children = ( - 70E84C2E19B10B3100159159 /* Makefile */, - 9D667FA919BFF85D00717163 /* anim.c */, - 9D667FAA19BFF85D00717163 /* anim.h */, - 9D667FAB19BFF85D00717163 /* apple2048.c */, - 9D667FAC19BFF85D00717163 /* game.c */, - 9D667FAD19BFF85D00717163 /* game.h */, - 9D667FAE19BFF85D00717163 /* textpage.h */, - 9D667FAF19BFF85D00717163 /* textpage.s */, - 9D667FB019BFF85D00717163 /* ui.c */, - 9D667FB119BFF85D00717163 /* ui.h */, + 9D02B4B81A1C57D9002799E3 /* apple2048 */, ); sourceTree = ""; }; + 9D02B4B81A1C57D9002799E3 /* apple2048 */ = { + isa = PBXGroup; + children = ( + 9D02B4C91A1C584C002799E3 /* anim.c */, + 9D02B4CA1A1C584C002799E3 /* anim.h */, + 9D02B4CB1A1C584C002799E3 /* apple2048.c */, + 9D02B4CC1A1C584C002799E3 /* game.c */, + 9D02B4CD1A1C584C002799E3 /* game.h */, + 9D02B4CE1A1C584C002799E3 /* textpage.h */, + 9D02B4CF1A1C584C002799E3 /* textpage.s */, + 9D02B4D01A1C584C002799E3 /* ui.c */, + 9D02B4D11A1C584C002799E3 /* ui.h */, + 9D02B4BA1A1C57D9002799E3 /* Makefile */, + 9D02B4BB1A1C57D9002799E3 /* make */, + ); + path = apple2048; + sourceTree = ""; + }; + 9D02B4BB1A1C57D9002799E3 /* make */ = { + isa = PBXGroup; + children = ( + 9D02B4BC1A1C57D9002799E3 /* AppleCommander.jar */, + 9D02B4BD1A1C57D9002799E3 /* createDiskImage */, + 9D02B4BE1A1C57D9002799E3 /* DevApple.vii */, + 9D02B4BF1A1C57D9002799E3 /* dos33_template.dsk */, + 9D02B4C01A1C57D9002799E3 /* head.mk */, + 9D02B4C11A1C57D9002799E3 /* prodos_template.dsk */, + 9D02B4C21A1C57D9002799E3 /* tail.mk */, + 9D02B4C31A1C57D9002799E3 /* V2Make.scpt */, + ); + name = make; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXLegacyTarget section */ - 70E84C2819B10B0600159159 /* apple2048 */ = { + 9D02B4B71A1C57D9002799E3 /* apple2048 */ = { isa = PBXLegacyTarget; - buildArgumentsString = "$(ACTION)"; - buildConfigurationList = 70E84C2B19B10B0600159159 /* Build configuration list for PBXLegacyTarget "apple2048" */; + buildArgumentsString = "-C apple2048 $(ACTION)"; + buildConfigurationList = 9D02B4C61A1C57D9002799E3 /* Build configuration list for PBXLegacyTarget "apple2048" */; buildPhases = ( ); buildToolPath = /usr/bin/make; @@ -50,40 +82,40 @@ ); name = apple2048; passBuildSettingsInEnvironment = 1; - productName = Apple2BuildPipelineSample; + productName = apple2048; }; /* End PBXLegacyTarget section */ /* Begin PBXProject section */ - 70E84C2419B10B0500159159 /* Project object */ = { + 9D02B4B31A1C57D9002799E3 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0600; - ORGANIZATIONNAME = "One Girl, One Laptop Productions"; + LastUpgradeCheck = 0610; + ORGANIZATIONNAME = "Jeremy Rand"; TargetAttributes = { - 70E84C2819B10B0600159159 = { - CreatedOnToolsVersion = 6.0; + 9D02B4B71A1C57D9002799E3 = { + CreatedOnToolsVersion = 6.1; }; }; }; - buildConfigurationList = 70E84C2719B10B0500159159 /* Build configuration list for PBXProject "apple2048" */; + buildConfigurationList = 9D02B4B61A1C57D9002799E3 /* Build configuration list for PBXProject "apple2048" */; compatibilityVersion = "Xcode 3.2"; developmentRegion = English; hasScannedForEncodings = 0; knownRegions = ( en, ); - mainGroup = 70E84C2319B10B0500159159; + mainGroup = 9D02B4B21A1C57D9002799E3; projectDirPath = ""; projectRoot = ""; targets = ( - 70E84C2819B10B0600159159 /* apple2048 */, + 9D02B4B71A1C57D9002799E3 /* apple2048 */, ); }; /* End PBXProject section */ /* Begin XCBuildConfiguration section */ - 70E84C2919B10B0600159159 /* Debug */ = { + 9D02B4C41A1C57D9002799E3 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; @@ -123,7 +155,7 @@ }; name = Debug; }; - 70E84C2A19B10B0600159159 /* Release */ = { + 9D02B4C51A1C57D9002799E3 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; @@ -157,7 +189,7 @@ }; name = Release; }; - 70E84C2C19B10B0600159159 /* Debug */ = { + 9D02B4C71A1C57D9002799E3 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { DEBUGGING_SYMBOLS = YES; @@ -165,41 +197,40 @@ GCC_OPTIMIZATION_LEVEL = 0; OTHER_CFLAGS = ""; OTHER_LDFLAGS = ""; - PRODUCT_NAME = apple2048; + PRODUCT_NAME = "$(TARGET_NAME)"; }; name = Debug; }; - 70E84C2D19B10B0600159159 /* Release */ = { + 9D02B4C81A1C57D9002799E3 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { OTHER_CFLAGS = ""; OTHER_LDFLAGS = ""; - PRODUCT_NAME = apple2048; + PRODUCT_NAME = "$(TARGET_NAME)"; }; name = Release; }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ - 70E84C2719B10B0500159159 /* Build configuration list for PBXProject "apple2048" */ = { + 9D02B4B61A1C57D9002799E3 /* Build configuration list for PBXProject "apple2048" */ = { isa = XCConfigurationList; buildConfigurations = ( - 70E84C2919B10B0600159159 /* Debug */, - 70E84C2A19B10B0600159159 /* Release */, + 9D02B4C41A1C57D9002799E3 /* Debug */, + 9D02B4C51A1C57D9002799E3 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 70E84C2B19B10B0600159159 /* Build configuration list for PBXLegacyTarget "apple2048" */ = { + 9D02B4C61A1C57D9002799E3 /* Build configuration list for PBXLegacyTarget "apple2048" */ = { isa = XCConfigurationList; buildConfigurations = ( - 70E84C2C19B10B0600159159 /* Debug */, - 70E84C2D19B10B0600159159 /* Release */, + 9D02B4C71A1C57D9002799E3 /* Debug */, + 9D02B4C81A1C57D9002799E3 /* Release */, ); defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; }; /* End XCConfigurationList section */ }; - rootObject = 70E84C2419B10B0500159159 /* Project object */; + rootObject = 9D02B4B31A1C57D9002799E3 /* Project object */; } diff --git a/apple2048.xcodeproj/project.xcworkspace/xcshareddata/Apple2BuildPipelineSample.xccheckout b/apple2048.xcodeproj/project.xcworkspace/xcshareddata/Apple2BuildPipelineSample.xccheckout deleted file mode 100644 index d74be20..0000000 --- a/apple2048.xcodeproj/project.xcworkspace/xcshareddata/Apple2BuildPipelineSample.xccheckout +++ /dev/null @@ -1,53 +0,0 @@ - - - - - IDESourceControlProjectFavoriteDictionaryKey - - IDESourceControlProjectIdentifier - 1FF8E5B6-1315-475A-9CD0-FCCF194EDB92 - IDESourceControlProjectName - Apple2BuildPipelineSample - IDESourceControlProjectOriginsDictionary - - 18A177AA5F1940300C43C3E199A61FB47E277A01 - https://github.com/jeremysrand/apple2048.git - 1DDA97CB96411CB4840C13C24A3B935FA4FF778E - https://github.com/blondie7575/Apple2BuildPipeline - - IDESourceControlProjectPath - Apple2BuildPipelineSample.xcodeproj - IDESourceControlProjectRelativeInstallPathDictionary - - 18A177AA5F1940300C43C3E199A61FB47E277A01 - ../.. - 1DDA97CB96411CB4840C13C24A3B935FA4FF778E - ../../../Apple2BuildPipeline - - IDESourceControlProjectURL - https://github.com/jeremysrand/apple2048.git - IDESourceControlProjectVersion - 111 - IDESourceControlProjectWCCIdentifier - 18A177AA5F1940300C43C3E199A61FB47E277A01 - IDESourceControlProjectWCConfigurations - - - IDESourceControlRepositoryExtensionIdentifierKey - public.vcs.git - IDESourceControlWCCIdentifierKey - 1DDA97CB96411CB4840C13C24A3B935FA4FF778E - IDESourceControlWCCName - Apple2BuildPipeline - - - IDESourceControlRepositoryExtensionIdentifierKey - public.vcs.git - IDESourceControlWCCIdentifierKey - 18A177AA5F1940300C43C3E199A61FB47E277A01 - IDESourceControlWCCName - apple2048 - - - - diff --git a/apple2048.xcodeproj/project.xcworkspace/xcshareddata/apple2048.xccheckout b/apple2048.xcodeproj/project.xcworkspace/xcshareddata/apple2048.xccheckout deleted file mode 100644 index 02d25a7..0000000 --- a/apple2048.xcodeproj/project.xcworkspace/xcshareddata/apple2048.xccheckout +++ /dev/null @@ -1,41 +0,0 @@ - - - - - IDESourceControlProjectFavoriteDictionaryKey - - IDESourceControlProjectIdentifier - F6D1EEC0-C19C-4638-B0E8-8ED4C76B6DBD - IDESourceControlProjectName - apple2048 - IDESourceControlProjectOriginsDictionary - - 18A177AA5F1940300C43C3E199A61FB47E277A01 - https://github.com/jeremysrand/apple2048.git - - IDESourceControlProjectPath - apple2048.xcodeproj - IDESourceControlProjectRelativeInstallPathDictionary - - 18A177AA5F1940300C43C3E199A61FB47E277A01 - ../.. - - IDESourceControlProjectURL - https://github.com/jeremysrand/apple2048.git - IDESourceControlProjectVersion - 111 - IDESourceControlProjectWCCIdentifier - 18A177AA5F1940300C43C3E199A61FB47E277A01 - IDESourceControlProjectWCConfigurations - - - IDESourceControlRepositoryExtensionIdentifierKey - public.vcs.git - IDESourceControlWCCIdentifierKey - 18A177AA5F1940300C43C3E199A61FB47E277A01 - IDESourceControlWCCName - apple2048 - - - - diff --git a/apple2048.xcodeproj/project.xcworkspace/xcuserdata/jrand.xcuserdatad/UserInterfaceState.xcuserstate b/apple2048.xcodeproj/project.xcworkspace/xcuserdata/jrand.xcuserdatad/UserInterfaceState.xcuserstate index 2fa4128..4b2e96b 100644 Binary files a/apple2048.xcodeproj/project.xcworkspace/xcuserdata/jrand.xcuserdatad/UserInterfaceState.xcuserstate and b/apple2048.xcodeproj/project.xcworkspace/xcuserdata/jrand.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/apple2048.xcodeproj/project.xcworkspace/xcuserdata/jrand.xcuserdatad/WorkspaceSettings.xcsettings b/apple2048.xcodeproj/project.xcworkspace/xcuserdata/jrand.xcuserdatad/WorkspaceSettings.xcsettings deleted file mode 100644 index bfffcfe..0000000 --- a/apple2048.xcodeproj/project.xcworkspace/xcuserdata/jrand.xcuserdatad/WorkspaceSettings.xcsettings +++ /dev/null @@ -1,10 +0,0 @@ - - - - - HasAskedToTakeAutomaticSnapshotBeforeSignificantChanges - - SnapshotAutomaticallyBeforeSignificantChanges - - - diff --git a/apple2048.xcodeproj/xcuserdata/jrand.xcuserdatad/xcschemes/Apple2BuildPipelineSample.xcscheme b/apple2048.xcodeproj/xcuserdata/jrand.xcuserdatad/xcschemes/apple2048.xcscheme similarity index 81% rename from apple2048.xcodeproj/xcuserdata/jrand.xcuserdatad/xcschemes/Apple2BuildPipelineSample.xcscheme rename to apple2048.xcodeproj/xcuserdata/jrand.xcuserdatad/xcschemes/apple2048.xcscheme index c8532cb..93ff0ca 100644 --- a/apple2048.xcodeproj/xcuserdata/jrand.xcuserdatad/xcschemes/Apple2BuildPipelineSample.xcscheme +++ b/apple2048.xcodeproj/xcuserdata/jrand.xcuserdatad/xcschemes/apple2048.xcscheme @@ -1,6 +1,6 @@ @@ -42,7 +42,7 @@ @@ -57,6 +57,15 @@ useCustomWorkingDirectory = "NO" buildConfiguration = "Release" debugDocumentVersioning = "YES"> + + + + diff --git a/apple2048.xcodeproj/xcuserdata/jrand.xcuserdatad/xcschemes/xcschememanagement.plist b/apple2048.xcodeproj/xcuserdata/jrand.xcuserdatad/xcschemes/xcschememanagement.plist index e9f6188..cb70f35 100644 --- a/apple2048.xcodeproj/xcuserdata/jrand.xcuserdatad/xcschemes/xcschememanagement.plist +++ b/apple2048.xcodeproj/xcuserdata/jrand.xcuserdatad/xcschemes/xcschememanagement.plist @@ -4,7 +4,7 @@ SchemeUserState - Apple2BuildPipelineSample.xcscheme + apple2048.xcscheme orderHint 0 @@ -12,7 +12,7 @@ SuppressBuildableAutocreation - 70E84C2819B10B0600159159 + 9D02B4B71A1C57D9002799E3 primary diff --git a/Makefile b/apple2048/Makefile similarity index 91% rename from Makefile rename to apple2048/Makefile index a896eda..cdbcd47 100644 --- a/Makefile +++ b/apple2048/Makefile @@ -2,7 +2,7 @@ # Makefile # Apple2BuildPipelineSample # -# Part of a sample build pipeline for Apple ][ software development +# Part of a sample build pipeline for Apple II software development # # Created by Quinn Dunki on 8/15/14. # One Girl, One Laptop Productions @@ -30,12 +30,11 @@ PGM=a2048 # MACHINE = apple2-reboot # MACHINE = apple2enh # MACHINE = apple2enh-dos33 -# MACHINE = apple2enh-system +MACHINE = apple2enh-system # MACHINE = apple2enh-loader # MACHINE = apple2enh-reboot -MACHINE = apple2enh-system -# Uncomment and set this to your starting address in Apple ][ memory +# Uncomment and set this to your starting address in Apple II memory # if necessary: # START_ADDR = 6000 @@ -45,10 +44,9 @@ MACHINE = apple2enh-system # CPU = 6502 # CPU = 65SC02 # CPU = 65C02 -# CPU = 65816 +CPU = 65816 # Note: You can assemble for 65816 in 16-bit mode but the C compiler # will only produce 8-bit code. -CPU = 65816 # Any *.c files in your main project directory will automatically be # built. But, if you have subdirectories with C files in them, you @@ -87,6 +85,10 @@ CPU = 65816 # this variable: # LDFLAGS += -v +# 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 + # Do not change anything else below here... include make/tail.mk diff --git a/anim.c b/apple2048/anim.c similarity index 100% rename from anim.c rename to apple2048/anim.c diff --git a/anim.h b/apple2048/anim.h similarity index 100% rename from anim.h rename to apple2048/anim.h diff --git a/apple2048.c b/apple2048/apple2048.c similarity index 100% rename from apple2048.c rename to apple2048/apple2048.c diff --git a/game.c b/apple2048/game.c similarity index 100% rename from game.c rename to apple2048/game.c diff --git a/game.h b/apple2048/game.h similarity index 100% rename from game.h rename to apple2048/game.h diff --git a/make/AppleCommander.jar b/apple2048/make/AppleCommander.jar similarity index 100% rename from make/AppleCommander.jar rename to apple2048/make/AppleCommander.jar diff --git a/apple2048/make/DevApple.vii b/apple2048/make/DevApple.vii new file mode 100644 index 0000000..aee5f34 Binary files /dev/null and b/apple2048/make/DevApple.vii differ diff --git a/make/V2Make.scpt b/apple2048/make/V2Make.scpt similarity index 84% rename from make/V2Make.scpt rename to apple2048/make/V2Make.scpt index eb03e68..7256838 100644 Binary files a/make/V2Make.scpt and b/apple2048/make/V2Make.scpt differ diff --git a/make/createDiskImage b/apple2048/make/createDiskImage similarity index 61% rename from make/createDiskImage rename to apple2048/make/createDiskImage index 4ac697f..276c036 100755 --- a/make/createDiskImage +++ b/apple2048/make/createDiskImage @@ -6,6 +6,27 @@ then 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 MACHINE=$2 @@ -28,6 +49,7 @@ case "$MACHINE" in HASHEADER=1 FILETYPE="bin" TARGETFILE=`basename $PROGRAM` + MAXFILENAMELEN=15 ;; apple2enh) @@ -38,6 +60,7 @@ case "$MACHINE" in HASHEADER=1 FILETYPE="bin" TARGETFILE=`basename $PROGRAM` + MAXFILENAMELEN=15 ;; apple2-dos33) @@ -48,6 +71,7 @@ case "$MACHINE" in HASHEADER=1 FILETYPE="bin" TARGETFILE=`basename $PROGRAM` + MAXFILENAMELEN=30 ;; apple2enh-dos33) @@ -58,6 +82,7 @@ case "$MACHINE" in HASHEADER=1 FILETYPE="bin" TARGETFILE=`basename $PROGRAM` + MAXFILENAMELEN=30 ;; apple2-system) @@ -68,6 +93,7 @@ case "$MACHINE" in HASHEADER=0 FILETYPE="sys" TARGETFILE=`basename $PROGRAM`.system + MAXFILENAMELEN=15 ;; apple2enh-system) @@ -78,6 +104,7 @@ case "$MACHINE" in HASHEADER=0 FILETYPE="sys" TARGETFILE=`basename $PROGRAM`.system + MAXFILENAMELEN=15 ;; apple2-loader) @@ -88,6 +115,7 @@ case "$MACHINE" in HASHEADER=1 FILETYPE="bin" TARGETFILE=`basename $PROGRAM` + MAXFILENAMELEN=15 ;; apple2-reboot) @@ -98,6 +126,7 @@ case "$MACHINE" in HASHEADER=1 FILETYPE="bin" TARGETFILE=`basename $PROGRAM` + MAXFILENAMELEN=15 ;; apple2enh-loader) @@ -108,6 +137,7 @@ case "$MACHINE" in HASHEADER=1 FILETYPE="bin" TARGETFILE=`basename $PROGRAM` + MAXFILENAMELEN=15 ;; apple2enh-reboot) @@ -118,6 +148,7 @@ case "$MACHINE" in HASHEADER=1 FILETYPE="bin" TARGETFILE=`basename $PROGRAM` + MAXFILENAMELEN=8 ;; *) @@ -126,6 +157,12 @@ case "$MACHINE" in ;; 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" @@ -136,18 +173,25 @@ cp "$TEMPLATE" "$DISKIMAGE" if [ $DELETELOADER -eq 1 ] then - java -jar "$APPLECOMMANDER" -d "$DISKIMAGE" LOADER.SYSTEM + "$JAVA" -jar "$APPLECOMMANDER" -d "$DISKIMAGE" LOADER.SYSTEM fi if [ $RENAMELOADER -eq 1 ] then - java -jar "$APPLECOMMANDER" -e "$DISKIMAGE" LOADER.SYSTEM | java -jar "$APPLECOMMANDER" -p "$DISKIMAGE" "$TARGETFILE".system sys - java -jar "$APPLECOMMANDER" -d "$DISKIMAGE" LOADER.SYSTEM + 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" -e "$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 + "$JAVA" -jar "$APPLECOMMANDER" -d "$DISKIMAGE" BASIC.SYSTEM fi if [ $HASHEADER -eq 1 ] @@ -155,10 +199,10 @@ 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 + 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" + "$JAVA" -jar "$APPLECOMMANDER" -p "$DISKIMAGE" "$TARGETFILE" $FILETYPE 0x$STARTADDR < "$PROGRAM" fi else - java -jar "$APPLECOMMANDER" -p "$DISKIMAGE" "$TARGETFILE" $FILETYPE < "$PROGRAM" + "$JAVA" -jar "$APPLECOMMANDER" -p "$DISKIMAGE" "$TARGETFILE" $FILETYPE < "$PROGRAM" fi diff --git a/make/dos33_template.dsk b/apple2048/make/dos33_template.dsk similarity index 100% rename from make/dos33_template.dsk rename to apple2048/make/dos33_template.dsk diff --git a/make/head.mk b/apple2048/make/head.mk similarity index 86% rename from make/head.mk rename to apple2048/make/head.mk index 6fc2e73..0710ce8 100644 --- a/make/head.mk +++ b/apple2048/make/head.mk @@ -2,7 +2,7 @@ # head.mk # Apple2BuildPipelineSample # -# Part of a sample build pipeline for Apple ][ software development +# Part of a sample build pipeline for Apple II software development # # Created by Quinn Dunki on 8/15/14. # One Girl, One Laptop Productions @@ -27,4 +27,4 @@ MACHINE=apple2 CPU=6502 CFLAGS= ASMFLAGS= -LDFLAGS= \ No newline at end of file +LDFLAGS= diff --git a/make/prodos_template.dsk b/apple2048/make/prodos_template.dsk similarity index 100% rename from make/prodos_template.dsk rename to apple2048/make/prodos_template.dsk diff --git a/make/tail.mk b/apple2048/make/tail.mk similarity index 82% rename from make/tail.mk rename to apple2048/make/tail.mk index 917fc62..8c246d2 100644 --- a/make/tail.mk +++ b/apple2048/make/tail.mk @@ -2,7 +2,7 @@ # tail.mk # Apple2BuildPipelineSample # -# Part of a sample build pipeline for Apple ][ software development +# Part of a sample build pipeline for Apple II software development # # Created by Quinn Dunki on 8/15/14. # One Girl, One Laptop Productions @@ -12,6 +12,8 @@ export PATH := $(PATH):$(CC65_BIN) +CWD=$(shell pwd) + C_OBJS=$(C_SRCS:.c=.o) C_DEPS=$(C_SRCS:.c=.u) ASM_OBJS=$(ASM_SRCS:.s=.o) @@ -25,6 +27,12 @@ LINK_ARGS= EXECCMD= +ALLTARGET=$(DISKIMAGE) +UNAME_S := $(shell uname -s) +ifeq ($(UNAME_S),Darwin) + ALLTARGET=execute +endif + ifneq ($(START_ADDR),) # If the MACHINE is set to an option which does not support a variable start # address, then error. @@ -32,6 +40,7 @@ ifneq ($(START_ADDR),) $(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 @@ -60,7 +69,7 @@ endif .PHONY: all execute clean -all: execute +all: $(ALLTARGET) clean: rm -f $(PGM) @@ -70,6 +79,12 @@ clean: rm -f $(ASM_LSTS) rm -f $(DISKIMAGE) +createPackage: + pkg/createPackage + +cleanMacCruft: + rm -rf pkg + $(PGM): $(OBJS) $(CL65) $(MACHCONFIG) --mapfile $(MAPFILE) $(LDFLAGS) -o $(PGM) $(OBJS) @@ -77,7 +92,7 @@ $(DISKIMAGE): $(PGM) make/createDiskImage $(AC) $(MACHINE) $(DISKIMAGE) $(PGM) "$(START_ADDR)" execute: $(DISKIMAGE) - osascript make/V2Make.scpt $(PROJECT_DIR) $(PGM) $(PROJECT_DIR)/make/DevApple.vii "$(EXECCMD)" + osascript make/V2Make.scpt $(CWD) $(PGM) $(CWD)/make/DevApple.vii "$(EXECCMD)" %.o: %.c $(CL65) $(MACHCONFIG) $(CFLAGS) --create-dep -c -o $@ $< diff --git a/textpage.h b/apple2048/textpage.h similarity index 100% rename from textpage.h rename to apple2048/textpage.h diff --git a/textpage.s b/apple2048/textpage.s similarity index 100% rename from textpage.s rename to apple2048/textpage.s diff --git a/ui.c b/apple2048/ui.c similarity index 100% rename from ui.c rename to apple2048/ui.c diff --git a/ui.h b/apple2048/ui.h similarity index 100% rename from ui.h rename to apple2048/ui.h diff --git a/make/DevApple.vii b/make/DevApple.vii deleted file mode 100644 index f767a3e..0000000 Binary files a/make/DevApple.vii and /dev/null differ