Initial Commit

This commit is contained in:
Jeremy Rand 2017-07-19 08:54:46 -05:00
commit a3f336e2d3
14 changed files with 776 additions and 0 deletions

View File

@ -0,0 +1,232 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objects = {
/* Begin PBXFileReference section */
9DFD77C91F1F9C2500639A48 /* main.s */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.asm; path = main.s; sourceTree = "<group>"; };
9DFD77CA1F1F9C2500639A48 /* Makefile */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.make; path = Makefile; sourceTree = "<group>"; };
9DFD77CC1F1F9C2500639A48 /* AppleCommander.jar */ = {isa = PBXFileReference; lastKnownFileType = archive.jar; name = AppleCommander.jar; path = make/AppleCommander.jar; sourceTree = "<group>"; };
9DFD77CD1F1F9C2500639A48 /* createDiskImage */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; name = createDiskImage; path = make/createDiskImage; sourceTree = "<group>"; };
9DFD77CE1F1F9C2500639A48 /* DevApple.vii */ = {isa = PBXFileReference; lastKnownFileType = file.bplist; name = DevApple.vii; path = make/DevApple.vii; sourceTree = "<group>"; };
9DFD77CF1F1F9C2500639A48 /* dos33_template.dsk */ = {isa = PBXFileReference; lastKnownFileType = file; name = dos33_template.dsk; path = make/dos33_template.dsk; sourceTree = "<group>"; };
9DFD77D01F1F9C2500639A48 /* head.mk */ = {isa = PBXFileReference; lastKnownFileType = text; name = head.mk; path = make/head.mk; sourceTree = "<group>"; };
9DFD77D11F1F9C2500639A48 /* prodos_template.dsk */ = {isa = PBXFileReference; lastKnownFileType = file; name = prodos_template.dsk; path = make/prodos_template.dsk; sourceTree = "<group>"; };
9DFD77D21F1F9C2500639A48 /* tail.mk */ = {isa = PBXFileReference; lastKnownFileType = text; name = tail.mk; path = make/tail.mk; sourceTree = "<group>"; };
9DFD77D31F1F9C2500639A48 /* V2Make.scpt */ = {isa = PBXFileReference; lastKnownFileType = file; name = V2Make.scpt; path = make/V2Make.scpt; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXGroup section */
9DFD77C21F1F9C2500639A48 = {
isa = PBXGroup;
children = (
9DFD77C81F1F9C2500639A48 /* colourgo */,
);
sourceTree = "<group>";
};
9DFD77C81F1F9C2500639A48 /* colourgo */ = {
isa = PBXGroup;
children = (
9DFD77C91F1F9C2500639A48 /* main.s */,
9DFD77CA1F1F9C2500639A48 /* Makefile */,
9DFD77CB1F1F9C2500639A48 /* make */,
);
path = colourgo;
sourceTree = "<group>";
};
9DFD77CB1F1F9C2500639A48 /* make */ = {
isa = PBXGroup;
children = (
9DFD77CC1F1F9C2500639A48 /* AppleCommander.jar */,
9DFD77CD1F1F9C2500639A48 /* createDiskImage */,
9DFD77CE1F1F9C2500639A48 /* DevApple.vii */,
9DFD77CF1F1F9C2500639A48 /* dos33_template.dsk */,
9DFD77D01F1F9C2500639A48 /* head.mk */,
9DFD77D11F1F9C2500639A48 /* prodos_template.dsk */,
9DFD77D21F1F9C2500639A48 /* tail.mk */,
9DFD77D31F1F9C2500639A48 /* V2Make.scpt */,
);
name = make;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXLegacyTarget section */
9DFD77C71F1F9C2500639A48 /* colourgo */ = {
isa = PBXLegacyTarget;
buildArgumentsString = "-C colourgo $(ACTION)";
buildConfigurationList = 9DFD77D61F1F9C2500639A48 /* Build configuration list for PBXLegacyTarget "colourgo" */;
buildPhases = (
);
buildToolPath = /usr/bin/make;
dependencies = (
);
name = colourgo;
passBuildSettingsInEnvironment = 1;
productName = colourgo;
};
/* End PBXLegacyTarget section */
/* Begin PBXProject section */
9DFD77C31F1F9C2500639A48 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0830;
ORGANIZATIONNAME = "Jeremy Rand";
TargetAttributes = {
9DFD77C71F1F9C2500639A48 = {
CreatedOnToolsVersion = 8.3.3;
ProvisioningStyle = Automatic;
};
};
};
buildConfigurationList = 9DFD77C61F1F9C2500639A48 /* Build configuration list for PBXProject "colourgo" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
en,
);
mainGroup = 9DFD77C21F1F9C2500639A48;
projectDirPath = "";
projectRoot = "";
targets = (
9DFD77C71F1F9C2500639A48 /* colourgo */,
);
};
/* End PBXProject section */
/* Begin XCBuildConfiguration section */
9DFD77D41F1F9C2500639A48 /* 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++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = 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_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
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 = gnu99;
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;
};
9DFD77D51F1F9C2500639A48 /* 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++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = 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_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
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 = gnu99;
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;
};
9DFD77D71F1F9C2500639A48 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
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;
};
9DFD77D81F1F9C2500639A48 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
OTHER_CFLAGS = "";
OTHER_LDFLAGS = "";
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
9DFD77C61F1F9C2500639A48 /* Build configuration list for PBXProject "colourgo" */ = {
isa = XCConfigurationList;
buildConfigurations = (
9DFD77D41F1F9C2500639A48 /* Debug */,
9DFD77D51F1F9C2500639A48 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
9DFD77D61F1F9C2500639A48 /* Build configuration list for PBXLegacyTarget "colourgo" */ = {
isa = XCConfigurationList;
buildConfigurations = (
9DFD77D71F1F9C2500639A48 /* Debug */,
9DFD77D81F1F9C2500639A48 /* Release */,
);
defaultConfigurationIsVisible = 0;
};
/* End XCConfigurationList section */
};
rootObject = 9DFD77C31F1F9C2500639A48 /* Project object */;
}

View File

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

View File

@ -0,0 +1,46 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0830"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
</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 = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>

View File

@ -0,0 +1,22 @@
<?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>colourgo.xcscheme</key>
<dict>
<key>orderHint</key>
<integer>0</integer>
</dict>
</dict>
<key>SuppressBuildableAutocreation</key>
<dict>
<key>9DFD77C71F1F9C2500639A48</key>
<dict>
<key>primary</key>
<true/>
</dict>
</dict>
</dict>
</plist>

94
colourgo/Makefile Normal file
View File

@ -0,0 +1,94 @@
#
# 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.
# The name of your system or binary file to build goes here:
PGM=colourgo
# 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
# Uncomment and set this to your starting address in Apple II memory
# if necessary:
# START_ADDR = 6000
# 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.
# Any *.c files in your main project directory will automatically be
# built. But, if you have subdirectories with C files in them, you
# should add them to the list of C_SRCS to build. Do that by
# uncommenting the following line and changing "someSubDir" to match
# the subdirectory you have created. Add multiple lines like this
# for each subdirectory:
# C_SRCS += $(wildcard someSubDir/*.c)
# Any *.s files in your main project directory will automatically be
# built. But, if you have subdirectories with assembly files in them,
# you should add them to the list of ASM_SRCS to build. Do that by
# uncommenting the following line and changing "someSubDir" to match
# the subdirectory you have created. Add multiple lines like this
# for each subdirectory:
# ASM_SRCS += $(wildcard someSubDir/*.s)
# 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 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

30
colourgo/main.s Normal file
View File

@ -0,0 +1,30 @@
;
; main.s
; colourgo
;
; Created by Jeremy Rand on 2017-07-19.
; Copyright © 2017 Jeremy Rand. All rights reserved.
;
COUT = $fded
KEYBOARD = $c000
STROBE = $c010
main:
ldx #$00
loop:
lda msg, X
beq wait
ora #$80
jsr COUT
inx
jmp loop
wait:
lda KEYBOARD
bpl wait
lda STROBE
rts
msg: .asciiz "HELLO, WORLD"

Binary file not shown.

BIN
colourgo/make/DevApple.vii Normal file

Binary file not shown.

BIN
colourgo/make/V2Make.scpt Normal file

Binary file not shown.

208
colourgo/make/createDiskImage Executable file
View File

@ -0,0 +1,208 @@
#!/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
MACHINE=$2
DISKIMAGE=$3
PROGRAM=$4
STARTADDR=`echo $5 | sed 's/^0*//'`
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=8
;;
*)
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" -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
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

Binary file not shown.

30
colourgo/make/head.mk Normal file
View File

@ -0,0 +1,30 @@
#
# 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
AC=make/AppleCommander.jar
C_SRCS=$(wildcard *.c)
ASM_SRCS=$(wildcard *.s)
MACHINE=apple2
CPU=6502
CFLAGS=
ASMFLAGS=
LDFLAGS=

Binary file not shown.

107
colourgo/make/tail.mk Normal file
View File

@ -0,0 +1,107 @@
#
# 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)
C_OBJS=$(C_SRCS:.c=.o)
C_DEPS=$(C_SRCS:.c=.u)
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)
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.
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
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: all execute clean
all: $(ALLTARGET)
clean:
rm -f "$(PGM)"
rm -f $(OBJS)
rm -f $(C_DEPS)
rm -f $(MAPFILE)
rm -f $(ASM_LSTS)
rm -f "$(DISKIMAGE)"
createPackage:
pkg/createPackage
cleanMacCruft:
rm -rf pkg
$(PGM): $(OBJS)
$(CL65) $(MACHCONFIG) --mapfile $(MAPFILE) $(LDFLAGS) -o "$(PGM)" $(OBJS)
$(DISKIMAGE): $(PGM)
make/createDiskImage $(AC) $(MACHINE) "$(DISKIMAGE)" "$(PGM)" "$(START_ADDR)"
execute: $(DISKIMAGE)
osascript make/V2Make.scpt "$(CWD)" "$(PGM)" "$(CWD)/make/DevApple.vii" "$(EXECCMD)"
%.o: %.c
$(CL65) $(MACHCONFIG) $(CFLAGS) --create-dep -c -o $@ $<
sed -i .bak 's/\.s:/.o:/' $(@:.o=.u)
rm -f $(@:.o=.u).bak
%.o: %.s
$(CL65) $(MACHCONFIG) --cpu $(CPU) $(ASMFLAGS) -l -c -o $@ $<
$(OBJS): Makefile
-include $(C_DEPS)