Add support for Merlin32 built projects

This commit is contained in:
Jeremy Rand 2018-07-21 11:15:30 -05:00
parent d1fc0ac9e0
commit a481e32e38
28 changed files with 1170 additions and 125 deletions

View File

@ -33,11 +33,6 @@ PGM=___PACKAGENAME___
# MACHINE = apple2enh-system
# MACHINE = apple2enh-loader
# MACHINE = apple2enh-reboot
#
# These are special machine definitions beyond those defined in cc65
# which are used for BASIC projects:
# MACHINE = apple2-basic
# MACHINE = apple2-dos33-basic
# Uncomment and set this to your starting address in Apple II memory
# if necessary:

View File

@ -1,5 +1,10 @@
#!/bin/sh
merlinStartAddr() {
awk '$1 ~ /^[oO][rR][gG]$/{print $2}' linkscript.s | sed 's/^[0$]*//'
}
if [ $# -lt 5 ]
then
echo USAGE: $0 '<AppleCommander> <machine> <diskimage> <binary>'
@ -54,6 +59,7 @@ case "$MACHINE" in
COPYBINARY=1
HASHEADER=1
FILETYPE="bin"
BASICFILETYPE="bas"
TARGETFILE=`basename $PROGRAM`
MAXFILENAMELEN=15
;;
@ -66,6 +72,7 @@ case "$MACHINE" in
COPYBINARY=1
HASHEADER=1
FILETYPE="bin"
BASICFILETYPE="bas"
TARGETFILE=`basename $PROGRAM`
MAXFILENAMELEN=15
;;
@ -77,7 +84,8 @@ case "$MACHINE" in
DELETEBASIC=0
COPYBINARY=1
HASHEADER=1
FILETYPE="bin"
FILETYPE="B"
BASICFILETYPE="A"
TARGETFILE=`basename $PROGRAM`
MAXFILENAMELEN=30
;;
@ -89,7 +97,8 @@ case "$MACHINE" in
DELETEBASIC=0
COPYBINARY=1
HASHEADER=1
FILETYPE="bin"
FILETYPE="B"
BASICFILETYPE="A"
TARGETFILE=`basename $PROGRAM`
MAXFILENAMELEN=30
;;
@ -102,6 +111,7 @@ case "$MACHINE" in
COPYBINARY=1
HASHEADER=0
FILETYPE="sys"
BASICFILETYPE="bas"
TARGETFILE=`basename $PROGRAM`.system
MAXFILENAMELEN=15
;;
@ -114,6 +124,7 @@ case "$MACHINE" in
COPYBINARY=1
HASHEADER=0
FILETYPE="sys"
BASICFILETYPE="bas"
TARGETFILE=`basename $PROGRAM`.system
MAXFILENAMELEN=15
;;
@ -126,6 +137,7 @@ case "$MACHINE" in
COPYBINARY=1
HASHEADER=1
FILETYPE="bin"
BASICFILETYPE="bas"
TARGETFILE=`basename $PROGRAM`
MAXFILENAMELEN=15
;;
@ -138,6 +150,7 @@ case "$MACHINE" in
COPYBINARY=1
HASHEADER=1
FILETYPE="bin"
BASICFILETYPE="bas"
TARGETFILE=`basename $PROGRAM`
MAXFILENAMELEN=15
;;
@ -150,6 +163,7 @@ case "$MACHINE" in
COPYBINARY=1
HASHEADER=1
FILETYPE="bin"
BASICFILETYPE="bas"
TARGETFILE=`basename $PROGRAM`
MAXFILENAMELEN=15
;;
@ -162,6 +176,7 @@ case "$MACHINE" in
COPYBINARY=1
HASHEADER=1
FILETYPE="bin"
BASICFILETYPE="bas"
TARGETFILE=`basename $PROGRAM`
MAXFILENAMELEN=15
;;
@ -173,6 +188,7 @@ case "$MACHINE" in
DELETEBASIC=0
COPYBINARY=0
FILETYPE="bas"
BASICFILETYPE="bas"
TARGETFILE=`basename $PROGRAM`
SOURCEFILE=${PROGRAM}.tok
MAXFILENAMELEN=15
@ -185,17 +201,54 @@ case "$MACHINE" in
DELETEBASIC=0
COPYBINARY=0
FILETYPE="A"
BASICFILETYPE="A"
TARGETFILE=`basename $PROGRAM`
SOURCEFILE=${PROGRAM}.tok
MAXFILENAMELEN=30
;;
apple2-merlin)
TEMPLATE="make/prodos_template.dsk"
DELETELOADER=1
RENAMELOADER=0
DELETEBASIC=0
COPYBINARY=1
HASHEADER=0
FILETYPE="bin"
BASICFILETYPE="bas"
TARGETFILE=`basename $PROGRAM`
MAXFILENAMELEN=15
STARTADDR=`merlinStartAddr`
;;
apple2-dos33-merlin)
TEMPLATE="make/dos33_template.dsk"
DELETELOADER=0
RENAMELOADER=0
DELETEBASIC=0
COPYBINARY=1
HASHEADER=0
FILETYPE="B"
BASICFILETYPE="A"
TARGETFILE=`basename $PROGRAM`
MAXFILENAMELEN=30
STARTADDR=`merlinStartAddr`
;;
*)
echo "Invalid machine type $MACHINE"
exit 1
;;
esac
STARTARG=""
if [ ! -z "$STARTADDR" ]
then
STARTARG="0x$STARTADDR"
fi
if [ ! -f "$SOURCEFILE" ]
then
echo "Cannot file executable $SOURCEFILE"
@ -247,21 +300,23 @@ then
HDR_STARTADDR=`od -t x2 -N 2 < "$SOURCEFILE" | head -1 | awk '{print $2}' | sed 's/^0*//'`
if [ "$HDR_STARTADDR" = "$STARTADDR" ]
then
dd if="$SOURCEFILE" bs=4 skip=1 | "$JAVA" -jar "$APPLECOMMANDER" -p "$DISKIMAGE" "$TARGETFILE" $FILETYPE 0x$STARTADDR
dd if="$SOURCEFILE" bs=4 skip=1 | "$JAVA" -jar "$APPLECOMMANDER" -p "$DISKIMAGE" "$TARGETFILE" $FILETYPE $STARTARG
else
"$JAVA" -jar "$APPLECOMMANDER" -p "$DISKIMAGE" "$TARGETFILE" $FILETYPE 0x$STARTADDR < "$SOURCEFILE"
"$JAVA" -jar "$APPLECOMMANDER" -p "$DISKIMAGE" "$TARGETFILE" $FILETYPE $STARTARG < "$SOURCEFILE"
fi
else
"$JAVA" -jar "$APPLECOMMANDER" -p "$DISKIMAGE" "$TARGETFILE" $FILETYPE < "$SOURCEFILE"
"$JAVA" -jar "$APPLECOMMANDER" -p "$DISKIMAGE" "$TARGETFILE" $FILETYPE $STARTARG < "$SOURCEFILE"
fi
fi
for ITEM in $*
do
# If this is a file matching *.tok, then this is an Applesoft BASIC file
# to copy to the disk image.
if [ -f "$ITEM" ] && echo "$ITEM" | grep '\.tok$' > /dev/null
then
DESTFILE=`echo "$ITEM" | sed 's/\.tok$//'`
"$JAVA" -jar "$APPLECOMMANDER" -p "$DISKIMAGE" "$DESTFILE" $FILETYPE 0x801 < "$ITEM"
"$JAVA" -jar "$APPLECOMMANDER" -p "$DISKIMAGE" "$DESTFILE" "$BASICFILETYPE" 0x801 < "$ITEM"
continue
fi

View File

@ -12,13 +12,17 @@
export CC65_HOME := /usr/local/lib/cc65
CC65_BIN = /usr/local/bin
CC65_BIN=/usr/local/bin
CL65=$(CC65_BIN)/cl65
CA65=$(CC65_BIN)/ca65
CC65=$(CC65_BIN)/cc65
CO65=$(CC65_BIN)/co65
MERLIN_DIR=/usr/local
MERLIN_BIN=$(MERLIN_DIR)/bin/Merlin32
MERLIN_LIB=$(MERLIN_DIR)/lib/Merlin
AC=make/AppleCommander.jar
SRCDIRS=.

View File

@ -10,115 +10,165 @@
# http://www.quinndunki.com/blondihacks
#
export PATH := $(PATH):$(CC65_BIN)
BUILD_TYPE := $(shell if echo $(MACHINE) | grep -q -- -basic; then echo basic; elif echo $(MACHINE) | grep -q -- -merlin; then echo merlin; else echo cc65; fi)
CWD=$(shell pwd)
ifneq ($(DRIVERS),)
SRCDIRS+=$(DRVDIR)
endif
DISKIMAGE=$(PGM).dsk
C_SRCS=$(patsubst ./%, %, $(wildcard $(addsuffix /*.c, $(SRCDIRS))))
C_OBJS=$(C_SRCS:.c=.o)
C_DEPS=$(C_SRCS:.c=.u)
ASM_SRCS=$(patsubst ./%, %, $(wildcard $(addsuffix /*.s, $(SRCDIRS))))
ASM_OBJS=$(ASM_SRCS:.s=.o)
ASM_LSTS=$(ASM_SRCS:.s=.lst)
EXECCMD=
BASIC_SRCS=$(patsubst ./%, %, $(wildcard $(addsuffix /*.bas, $(SRCDIRS))))
BASIC_OBJS=$(BASIC_SRCS:.bas=.tok)
OBJS=$(C_OBJS) $(ASM_OBJS) $(BASIC_OBJS)
ifeq ($(BUILD_TYPE),cc65)
export PATH := $(PATH):$(CC65_BIN)
MAPFILE=$(PGM).map
DISKIMAGE=$(PGM).dsk
ifneq ($(DRIVERS),)
SRCDIRS+=$(DRVDIR)
endif
LINK_ARGS=
C_SRCS=$(patsubst ./%, %, $(wildcard $(addsuffix /*.c, $(SRCDIRS))))
C_OBJS=$(C_SRCS:.c=.o)
C_DEPS=$(C_SRCS:.c=.u)
EXECCMD=
ASM_SRCS=$(patsubst ./%, %, $(wildcard $(addsuffix /*.s, $(SRCDIRS))))
ASM_OBJS=$(ASM_SRCS:.s=.o)
ASM_LSTS=$(ASM_SRCS:.s=.lst)
ALLTARGET=$(DISKIMAGE)
MAPFILE=$(PGM).map
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 apple2-basic apple2-dos33-basic),)
$(error You cannot change start address with this machine type)
ifneq ($(START_ADDR),)
# If the MACHINE is set to an option which does not support a variable
# start address, then error.
ifneq ($(filter $(MACHINE), apple2-system apple2enh-system),)
$(error You cannot change start address with this machine type)
endif
else
# If not set, then use the default for the config as per cc65
# documentation
ifneq ($(filter $(MACHINE), apple2 apple2-dos33 apple2enh apple2enh-dos33),)
START_ADDR=803
endif
ifneq ($(filter $(MACHINE), apple2-system apple2enh-system),)
START_ADDR=2000
endif
ifneq ($(filter $(MACHINE), apple2-loader apple2-reboot apple2enh-loader apple2enh-reboot),)
START_ADDR=800
endif
endif
LDFLAGS += --start-addr 0x$(START_ADDR)
ifneq ($(filter $(MACHINE), apple2 apple2enh apple2-dos33 apple2enh-dos33),)
EXECCMD=$(shell echo brun $(PGM) | tr '[a-z]' '[A-Z]')
endif
# By default, use the a2 drivers. If the machine is one of the enhanced
# targets though, use the a2e drivers.
DRV_BASE_MACHINE=a2
ifneq ($(filter $(MACHINE), apple2enh apple2enh-dos33 apple2enh-system apple2enh-loader apple2enh-reboot),)
DRV_BASE_MACHINE=a2e
endif
MACHCONFIG= -t apple2
ifneq ($(filter $(MACHINE), apple2enh apple2enh-dos33 apple2enh-system apple2enh-loader apple2enh-reboot),)
MACHCONFIG= -t apple2enh
endif
ifeq ($(filter $(MACHINE), apple2 apple2enh),)
MACHCONFIG += -C $(MACHINE).cfg
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
ifneq ($(filter $(MACHINE), apple2-basic apple2-dos33-basic),)
START_ADDR=801
endif
endif
LDFLAGS += --start-addr 0x$(START_ADDR)
C_OBJS=
C_DEPS=
ifneq ($(filter $(MACHINE), apple2 apple2enh apple2-dos33 apple2enh-dos33),)
ASM_OBJS=
ASM_LSTS=
endif
ifeq ($(BUILD_TYPE),merlin)
ASM_SRCS=$(patsubst ./%, %, $(wildcard $(addsuffix /*.s, $(SRCDIRS))))
MAPFILE=_Output.txt
EXECCMD=$(shell echo brun $(PGM) | tr '[a-z]' '[A-Z]')
endif
ifneq ($(filter $(MACHINE), apple2-basic apple2-dos33-basic),)
ifeq ($(BUILD_TYPE),basic)
MAPFILE=
EXECCMD=$(shell echo run $(PGM) | tr '[a-z]' '[A-Z]')
endif
# By default, use the a2 drivers. If the machine is one of the enhanced
# targets though, use the a2e drivers.
DRV_BASE_MACHINE=a2
ifneq ($(filter $(MACHINE), apple2enh apple2enh-dos33 apple2enh-system apple2enh-loader apple2enh-reboot),)
DRV_BASE_MACHINE=a2e
endif
OBJS=$(C_OBJS) $(ASM_OBJS) $(BASIC_OBJS)
MACHCONFIG= -t apple2
ALLTARGET=$(DISKIMAGE)
ifneq ($(filter $(MACHINE), apple2enh apple2apple2enh-dos33 apple2enh-system apple2enh-loader apple2enh-reboot),)
MACHCONFIG= -t apple2enh
endif
ifeq ($(filter $(MACHINE), apple2 apple2enh),)
MACHCONFIG += -C $(MACHINE).cfg
endif
.PHONY: build execute clean cleandrivers xcodefix
.PHONY: build execute clean xcodefix loresgr hiresgr auxmem joystick mouse serial
build: $(ALLTARGET)
clean: genclean
rm -f "$(PGM)"
rm -f $(OBJS)
rm -f $(C_DEPS)
rm -f $(MAPFILE)
rm -f $(ASM_LSTS)
rm -f "$(DISKIMAGE)"
rm -Rf "$(DRVDIR)"
cleanMacCruft:
rm -rf pkg
ifneq ($(filter $(MACHINE), apple2-basic apple2-dos33-basic),)
$(PGM): $(OBJS)
else
$(PGM): $(OBJS)
make/errorFilter.sh $(CL65) $(MACHCONFIG) --mapfile $(MAPFILE) $(LDFLAGS) -o "$(PGM)" $(OBJS)
endif
$(DISKIMAGE): $(PGM)
make/createDiskImage $(AC) $(MACHINE) "$(DISKIMAGE)" "$(PGM)" "$(START_ADDR)" $(BASIC_OBJS) $(COPYDIRS)
execute: $(DISKIMAGE)
osascript make/V2Make.scpt "$(CWD)" "$(PGM)" "$(CWD)/make/DevApple.vii" "$(EXECCMD)"
%.tok: %.bas
make/bt $< $(BASICFLAGS) -o $@
ifneq ($(DRIVERS),)
cleandrivers:
rm -Rf "$(DRVDIR)"
else
cleandrivers:
endif
clean: genclean cleandrivers
rm -f "$(PGM)" $(OBJS) $(C_DEPS) $(MAPFILE) $(ASM_LSTS) "$(DISKIMAGE)"
cleanMacCruft:
rm -rf pkg
# Some gen phase stuff...
gen: xcodefix $(DRIVERS)
xcodefix:
defaults write "$(CC65_PLUGIN_INFO)" $(XCODE_PLUGIN_COMPATIBILITY)s -array `defaults read "$(XCODE_INFO)" $(XCODE_PLUGIN_COMPATIBILITY)`
ifeq ($(BUILD_TYPE),basic)
# Build rules for BASIC projects
$(PGM): $(OBJS)
cp $(PGM).tok $(PGM)
$(OBJS): Makefile
endif
ifeq ($(BUILD_TYPE),merlin)
# Build rules for Merlin projects
$(PGM): $(ASM_SRCS) Makefile
$(MERLIN_BIN) -V $(MERLIN_LIB) linkscript.s
rm -f _FileInformation.txt
endif
ifeq ($(BUILD_TYPE),cc65)
# Build rules for cc65 projects
$(PGM): $(OBJS)
make/errorFilter.sh $(CL65) $(MACHCONFIG) --mapfile $(MAPFILE) $(LDFLAGS) -o "$(PGM)" $(OBJS)
$(OBJS): Makefile
%.o: %.c
make/errorFilter.sh $(CL65) $(MACHCONFIG) $(CFLAGS) --create-dep -c -o $@ $<
sed -i .bak 's/\.s:/.o:/' $(@:.o=.u)
@ -127,19 +177,8 @@ execute: $(DISKIMAGE)
%.o: %.s
make/errorFilter.sh $(CL65) $(MACHCONFIG) --cpu $(CPU) $(ASMFLAGS) -l -c -o $@ $<
%.tok: %.bas
make/bt $< $(BASICFLAGS) -o $@
$(OBJS): Makefile
# Some gen phase stuff...
gen: xcodefix $(DRIVERS)
xcodefix:
defaults write "$(CC65_PLUGIN_INFO)" $(XCODE_PLUGIN_COMPATIBILITY)s -array `defaults read "$(XCODE_INFO)" $(XCODE_PLUGIN_COMPATIBILITY)`
.PHONY: loresgr hiresgr auxmem joystick mouse serial
# Lores driver codegen
loresgr: $(DRVDIR)/a2_lores_drv.s $(DRVDIR)/a2_lores_drv.h
@ -217,5 +256,7 @@ $(DRVDIR)/a2_serial_drv.h:
echo '#include <serial.h>' > $@
echo 'extern char a2_serial_drv;' >> $@
endif
-include $(C_DEPS)

View File

@ -148,6 +148,77 @@
<key>version</key>
<string>1.0</string>
</dict>
<key>Xcode.FileDataType.merlin.Assembly</key>
<dict>
<key>id</key>
<string>Xcode.FileDataType.merlin.Assembly</string>
<key>localizedDescription</key>
<string>Merlin Assembly Source</string>
<key>name</key>
<string>File type for Merlin assembly</string>
<key>point</key>
<string>Xcode.FileDataType</string>
<key>typeConformedTo</key>
<array>
<dict>
<key>typeIdentifier</key>
<string>public.assembly-source</string>
</dict>
</array>
<key>typeIdentifier</key>
<string>com.rand-family.xcode.merlin</string>
<key>version</key>
<string>1.0</string>
</dict>
<key>Xcode.FileDataTypeDetector.merlin.Assembly</key>
<dict>
<key>detectedTypeIdentifier</key>
<string>com.rand-family.xcode.merlin</string>
<key>id</key>
<string>Xcode.FileDataTypeDetector.merlin.Assembly</string>
<key>matchesExtension</key>
<string>s</string>
<key>point</key>
<string>Xcode.FileDataTypeDetector</string>
</dict>
<key>Xcode.SourceCodeLanguage.merlin-Assembly</key>
<dict>
<key>commentSyntax</key>
<array>
<dict>
<key>prefix</key>
<string>;</string>
</dict>
</array>
<key>conformsTo</key>
<array>
<dict>
<key>identifier</key>
<string>Xcode.SourceCodeLanguage.Generic</string>
</dict>
</array>
<key>fileDataType</key>
<array>
<dict>
<key>identifier</key>
<string>com.rand-family.xcode.merlin</string>
</dict>
</array>
<key>id</key>
<string>Xcode.SourceCodeLanguage.merlin-Assembly</string>
<key>languageName</key>
<string>Merlin Assembly</string>
<key>languageSpecification</key>
<string>xcode.lang.asm.merlin</string>
<key>name</key>
<string>Merlin Assembly</string>
<key>point</key>
<string>Xcode.SourceCodeLanguage</string>
<key>supportsIndentation</key>
<string>true</string>
<key>version</key>
<string>1.0</string>
</dict>
</dict>
</dict>
</dict>

View File

@ -0,0 +1,283 @@
// Merlin Assembler language specs
(
/****************************************************************************/
// MARK: Keywords
/****************************************************************************/
{
Identifier = "xcode.lang.asm.merlin.identifier";
Syntax = {
CaseSensitive = NO;
StartChars = ":;<=>?@abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_{|}~";
Chars = "0123456789:;<=>?@abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_{|}~";
Type = "xcode.syntax.identifier";
};
},
{
Identifier = "xcode.lang.asm.merlin.keyword";
Syntax = {
CaseSensitive = NO;
StartChars = ":;<=>?@abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_{|}~";
Chars = "0123456789:;<=>?@abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_{|}~";
Words = (
"]xcodestart",
"]xcodeend",
"adc",
"adcl",
"and",
"andl",
"asl",
"bcc",
"blt",
"bcs",
"bge",
"beq",
"bge",
"bit",
"blt",
"bmi",
"bne",
"bpl",
"bra",
"brk",
"brl",
"bvc",
"bvs",
"clc",
"cld",
"cli",
"clv",
"cmp",
"cmpl",
"cop",
"cpa",
"cpx",
"cpy",
"dec",
"dex",
"dey",
"eor",
"eorl",
"inc",
"inx",
"iny",
"jmp",
"jmpl",
"jsl",
"jsr",
"lda",
"ldal",
"ldx",
"ldy",
"lsr",
"mvn",
"mvp",
"nop",
"ora",
"oral",
"pea",
"pei",
"per",
"pha",
"phb",
"phd",
"phk",
"php",
"phx",
"phy",
"pla",
"plb",
"pld",
"plp",
"plx",
"ply",
"rep",
"rol",
"ror",
"rti",
"rtl",
"rts",
"sbc",
"sbcl",
"sec",
"sed",
"sei",
"sep",
"sta",
"stal",
"stp",
"stx",
"sty",
"stz",
"tax",
"tay",
"tcd",
"tad",
"tas",
"tcs",
"tdc",
"tda",
"trb",
"tsb",
"tsc",
"tsa",
"tsx",
"txa",
"txs",
"txy",
"tya",
"tyx",
"wai",
"wdm",
"xba",
"swa",
"xce",
"equ",
"ext",
"ent",
"org",
"dsk",
"sav",
"ds",
"rel",
"lnk",
"link",
"asm",
"sna",
"obj",
"put",
"putbin",
"use",
"var",
"knd",
"ali",
"typ",
"end",
"dum",
"dend",
"dat",
"asc",
"dci",
"inv",
"fls",
"rev",
"str",
"strl",
"da",
"dw",
"ddb",
"dfb",
"db",
"adr",
"adrl",
"hex",
"ds",
"do",
"else",
"if",
"fin",
"chk",
"err",
"lup",
"mx",
"usr",
"xc",
"mac",
"eom",
"<<<",
"pmc",
">>>",
);
Type = "xcode.syntax.keyword";
AltType = "xcode.syntax.identifier";
};
},
/****************************************************************************/
// MARK: Simple Syntax Coloring
/****************************************************************************/
{
Identifier = "xcode.lang.asm.merlin";
Description = "Merlin Assembler Coloring";
BasedOn = "xcode.lang.simpleColoring";
IncludeInMenu = YES;
Name = "Assembly (Merlin)";
Syntax = {
Tokenizer = "xcode.lang.asm.merlin.lexer";
IncludeRules = (
"xcode.lang.asm.merlin.codeblock",
);
Type = "xcode.syntax.plain";
};
},
{
Identifier = "xcode.lang.asm.merlin.lexer";
Syntax = {
IncludeRules = (
"xcode.lang.asm.merlin.comment.semi",
"xcode.lang.asm.merlin.comment.star",
"xcode.lang.asm.merlin.number",
"xcode.lang.asm.merlin.keyword",
"xcode.lang.asm.merlin.identifier",
);
};
},
{
Identifier = "xcode.lang.asm.merlin.comment.semi";
Syntax = {
StartAtBOL = NO;
StartAtColumnZero = NO;
Start = ";";
End = "\n";
IncludeRules = ( "xcode.lang.url", "xcode.lang.url.mail", "xcode.lang.comment.mark" );
Type = "xcode.syntax.comment";
};
},
{
Identifier = "xcode.lang.asm.merlin.comment.star";
Syntax = {
StartAtBOL = YES;
StartAtColumnZero = YES;
Start = "*";
End = "\n";
IncludeRules = ( "xcode.lang.url", "xcode.lang.url.mail", "xcode.lang.comment.mark" );
Type = "xcode.syntax.comment";
};
},
{
Identifier = "xcode.lang.asm.merlin.number";
Syntax = {
StartChars = "#$%0123456789";
Match = "[#$%0-9][<>^$]?[0-9A-Fa-f]*";
Type = "xcode.syntax.number";
};
},
{
Identifier = "xcode.lang.asm.merlin.codeblock";
Syntax = {
Tokenizer = "xcode.lang.asm.merlin.lexer";
Start = "]xcodestart";
End = "]xcodeend";
Recursive = NO;
Foldable = YES;
Type = "xcode.syntax.definition.function";
IncludeRules = (
);
};
},
)

View File

@ -0,0 +1,81 @@
#
# 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=___PACKAGENAME___
# These are special machine definitions beyond those defined in cc65
# which are used for BASIC projects:
MACHINE = apple2-basic
# MACHINE = apple2-dos33-basic
# Add any other directories where you are putting other BASIC files
# to this list:
SRCDIRS+=
# If you want to add arguments to the BASIC tokenizer commandline,
# add them to this valiable:
# BASICFLAGS += --optimize
# If you have java installed in a non-standard location, you can set
# the path to it by uncommenting the following line:
# export JAVA=/usr/bin/java
# If you want to copy one or more files or directories to the target disk
# image, add the root directory to this variable. All files will be
# copied from the source to the target using the same path from the source.
#
# For example, if you set COPYDIRS to dir and in your project you have
# the following files:
# dir/mySystemFile
# dir/newDir/anotherFile
#
# Then, during the copy phase, mySystemFile will be copied into the root
# of the disk and anotherFile will be copied into a directory named
# newDir. The newDir directory will be created if it does not already
# exist.
#
# The name of the file to copy is checked and if it ends in:
# .as - It assumes the file is in AppleSingle format. The .as
# suffix is stripped from the name when copied to the
# disk image.
# .<char> - If the file ends with a single character which matches
# a DOS 3.3 file type (A, B, T, etc) it uses that value as
# the file type of the file copied to the disk image. The
# single character is removed from the file name.
# .<TLA> - If the file ends with a three letter alpha extension, it
# uses that TLA as the file type of the file copied to the
# disk image. The TLA is removed from the file name.
#
# If you do not provide any type information for your filenames,
# it will be copied as a binary.
#
COPYDIRS=
# Add any rules you want to execute before any compiles or assembly
# commands are called here, if any. You can generate .c, .s or .h
# files for example. You can generate data files. Whatever you
# might need.
gen:
# For any files you generated in the gen target above, you should
# add rules in genclean to remove those generated files when you
# clean your build.
genclean:
# Do not change anything else below here...
include make/tail.mk

View File

@ -0,0 +1,98 @@
#
# 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. Keep this
# name consistent with the "dsk" name from the linkscript.s file.
PGM=___PACKAGENAME___
# These are special machine definitions for ProDOS or DOS 3.3 Merlin
# projects:
MACHINE = apple2-merlin
# MACHINE = apple2-dos33-merlin
# If you have a non-standard Merlin 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:
# MERLIN_DIR = /usr/local
#
# If the path to the Merlin binary is not correct, uncomment this line
# and change it:
# MERLIN_BIN = $(MERLIN_DIR)/bin/Merlin32
#
# If the path to the Merlin library is not correct, uncomment this line
# and change it:
# MERLIN_LIB = $(MERLIN_DIR)/lib/Merlin
# Add any other directories where you are putting C or assembly source
# files to this list. Note that you must manually add all source files
# to the linkscript.s file. All this does is help the build system
# see what files it should consider important to deciding whether to do
# a re-build.
SRCDIRS+=
# If you want to add arguments to the BASIC tokenizer commandline,
# add them to this valiable:
# BASICFLAGS += --optimize
# If you have java installed in a non-standard location, you can set
# the path to it by uncommenting the following line:
# export JAVA=/usr/bin/java
# If you want to copy one or more files or directories to the target disk
# image, add the root directory to this variable. All files will be
# copied from the source to the target using the same path from the source.
#
# For example, if you set COPYDIRS to dir and in your project you have
# the following files:
# dir/mySystemFile
# dir/newDir/anotherFile
#
# Then, during the copy phase, mySystemFile will be copied into the root
# of the disk and anotherFile will be copied into a directory named
# newDir. The newDir directory will be created if it does not already
# exist.
#
# The name of the file to copy is checked and if it ends in:
# .as - It assumes the file is in AppleSingle format. The .as
# suffix is stripped from the name when copied to the
# disk image.
# .<char> - If the file ends with a single character which matches
# a DOS 3.3 file type (A, B, T, etc) it uses that value as
# the file type of the file copied to the disk image. The
# single character is removed from the file name.
# .<TLA> - If the file ends with a three letter alpha extension, it
# uses that TLA as the file type of the file copied to the
# disk image. The TLA is removed from the file name.
#
# If you do not provide any type information for your filenames,
# it will be copied as a binary.
#
COPYDIRS=
# Add any rules you want to execute before any compiles or assembly
# commands are called here, if any. You can generate .c, .s or .h
# files for example. You can generate data files. Whatever you
# might need.
gen:
# For any files you generated in the gen target above, you should
# add rules in genclean to remove those generated files when you
# clean your build.
genclean:
# Do not change anything else below here...
include make/tail.mk

View File

@ -0,0 +1,214 @@
<?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>Nodes</key>
<array>
<string>linkscript.s</string>
<string>main.s</string>
<string>Makefile</string>
<string>make/AppleCommander.jar</string>
<string>make/bastokenizer-tools-bt-0.2.0.jar</string>
<string>make/createDiskImage</string>
<string>make/bt</string>
<string>make/DevApple.vii</string>
<string>make/dos33_template.dsk</string>
<string>make/errorFilter.sh</string>
<string>make/head.mk</string>
<string>make/prodos_template.dsk</string>
<string>make/tail.mk</string>
<string>make/V2Make.scpt</string>
<string>../___PACKAGENAME___.xcodeproj/xcshareddata/xcschemes/___PACKAGENAME___.xcscheme</string>
</array>
<key>Definitions</key>
<dict>
<key>linkscript.s</key>
<dict>
<key>Path</key>
<string>linkscript.s</string>
</dict>
<key>main.s</key>
<dict>
<key>Path</key>
<string>main.s</string>
</dict>
<key>make/V2Make.scpt</key>
<dict>
<key>Group</key>
<string>make</string>
<key>Path</key>
<string>make/V2Make.scpt</string>
</dict>
<key>make/errorFilter.sh</key>
<dict>
<key>Group</key>
<string>make</string>
<key>Path</key>
<string>make/errorFilter.sh</string>
</dict>
<key>make/tail.mk</key>
<dict>
<key>Group</key>
<string>make</string>
<key>Path</key>
<string>make/tail.mk</string>
</dict>
<key>make/prodos_template.dsk</key>
<dict>
<key>Group</key>
<string>make</string>
<key>Path</key>
<string>make/prodos_template.dsk</string>
</dict>
<key>make/head.mk</key>
<dict>
<key>Group</key>
<string>make</string>
<key>Path</key>
<string>make/head.mk</string>
</dict>
<key>make/dos33_template.dsk</key>
<dict>
<key>Group</key>
<string>make</string>
<key>Path</key>
<string>make/dos33_template.dsk</string>
</dict>
<key>make/DevApple.vii</key>
<dict>
<key>Group</key>
<string>make</string>
<key>Path</key>
<string>make/DevApple.vii</string>
</dict>
<key>make/createDiskImage</key>
<dict>
<key>Group</key>
<string>make</string>
<key>Path</key>
<string>make/createDiskImage</string>
</dict>
<key>make/bt</key>
<dict>
<key>Group</key>
<string>make</string>
<key>Path</key>
<string>make/bt</string>
</dict>
<key>make/AppleCommander.jar</key>
<dict>
<key>Path</key>
<string>make/AppleCommander.jar</string>
<key>Group</key>
<string>make</string>
</dict>
<key>make/bastokenizer-tools-bt-0.2.0.jar</key>
<dict>
<key>Path</key>
<string>make/bastokenizer-tools-bt-0.2.0.jar</string>
<key>Group</key>
<string>make</string>
</dict>
<key>Makefile</key>
<dict>
<key>Path</key>
<string>Makefile</string>
</dict>
<key>../___PACKAGENAME___.xcodeproj/xcshareddata/xcschemes/___PACKAGENAME___.xcscheme</key>
<dict>
<key>Group</key>
<array>
<string>Supporting Files</string>
</array>
<key>Path</key>
<string>___PACKAGENAME___.xcscheme</string>
</dict>
</dict>
<key>Kind</key>
<string>Xcode.Xcode3.ProjectTemplateUnitKind</string>
<key>Identifier</key>
<string>com.halcyontouch.apple2MerlinAsmBuildSystem</string>
<key>Ancestors</key>
<array>
<string>com.apple.dt.unit.externalBuildSystem</string>
</array>
<key>Concrete</key>
<true/>
<key>Description</key>
<string>This template creates an Apple II Merlin assembly code project. The project starts with a single assembly file which you can modify.</string>
<key>Options</key>
<array/>
<key>Targets</key>
<array>
<dict>
<key>TargetType</key>
<string>Legacy</string>
<key>TargetIdentifier</key>
<string>com.apple.dt.cocoaLegacyTarget</string>
<key>BuildToolPath</key>
<string>___VARIABLE_buildToolPath___</string>
<key>BuildToolArgsString</key>
<string>-C ___PACKAGENAME___ $(ACTION)</string>
<key>SharedSettings</key>
<dict>
<key>OTHER_CFLAGS</key>
<string></string>
<key>OTHER_LDFLAGS</key>
<string></string>
</dict>
<key>Configurations</key>
<dict>
<key>Debug</key>
<dict>
<key>DEBUGGING_SYMBOLS</key>
<string>YES</string>
<key>GCC_GENERATE_DEBUGGING_SYMBOLS</key>
<string>YES</string>
<key>GCC_OPTIMIZATION_LEVEL</key>
<string>0</string>
</dict>
<key>Release</key>
<dict/>
</dict>
</dict>
<dict>
<key>ProductType</key>
<string>com.apple.product-type.tool</string>
<key>TargetIdentifier</key>
<string>com.apple.dt.commandLineToolTarget</string>
<key>Name</key>
<string>doNotBuild</string>
<key>SharedSettings</key>
<dict>
<key>PRODUCT_NAME</key>
<string>doNotBuild</string>
<key>GCC_PREPROCESSOR_DEFINITIONS</key>
<string>__fastcall__=""</string>
<key>HEADER_SEARCH_PATHS</key>
<string>/usr/local/lib/cc65/include</string>
</dict>
<key>BuildPhases</key>
<array>
<dict>
<key>Class</key>
<string>Sources</string>
</dict>
<dict>
<key>Class</key>
<string>Frameworks</string>
</dict>
<dict>
<key>Class</key>
<string>CopyFiles</string>
<key>DstPath</key>
<string>/usr/share/man/man1/</string>
<key>DstSubfolderSpec</key>
<string>0</string>
<key>RunOnlyForDeploymentPostprocessing</key>
<string>YES</string>
</dict>
</array>
</dict>
</array>
</dict>
</plist>

View File

@ -0,0 +1,16 @@
*
* ___FILENAME___
* ___PROJECTNAME___
*
* Created by ___FULLUSERNAME___ on ___DATE___.
* ___COPYRIGHT___
typ $06 ; Binary file at fixed address
dsk ___PROJECTNAME___
org $803
asm main.s
sna main

View File

@ -0,0 +1,39 @@
*
* ___FILENAME___
* ___PROJECTNAME___
*
* Created by ___FULLUSERNAME___ on ___DATE___.
* ___COPYRIGHT___
*
]XCODESTART ; Keep this at the start and put your code after this
COUT equ $fded
KEYBOARD equ $c000
STROBE equ $c010
DOSWARM equ $3d0
CR equ #$8d
START lda CR
jsr COUT
ldx #$00
LOOP lda MSG,X
beq WAIT
jsr COUT
inx
jmp LOOP
WAIT lda KEYBOARD
bpl WAIT
lda STROBE
lda CR
jsr COUT
jmp DOSWARM
MSG asc "HELLO, WORLD",00
]XCODEEND ; Keep this at the end and put your code above this

View File

@ -121,7 +121,7 @@
<key>Kind</key>
<string>Xcode.Xcode3.ProjectTemplateUnitKind</string>
<key>Identifier</key>
<string>com.halcyontouch.apple2AsmBuildSystem</string>
<string>com.halcyontouch.apple2Ca65BuildSystem</string>
<key>Ancestors</key>
<array>
<string>com.apple.dt.unit.externalBuildSystem</string>
@ -129,7 +129,7 @@
<key>Concrete</key>
<true/>
<key>Description</key>
<string>This template creates an Apple II assembly code project. The project starts with a single assembly file which you can modify. You can also add more assembly or C files as you may like.</string>
<string>This template creates an Apple II ca65 assembly code project. The project starts with a single assembly file which you can modify. You can also add more assembly or C files as you may like.</string>
<key>Options</key>
<array/>
<key>Targets</key>

View File

@ -6,12 +6,15 @@
; ___COPYRIGHT___
;
.include "apple2.inc"
COUT = $fded
KEYBOARD = $c000
STROBE = $c010
CR = $8d
.proc main
lda #CR
jsr COUT
ldx #$00
loop:
lda msg, X
@ -22,10 +25,15 @@ loop:
jmp loop
wait:
lda KEYBOARD
lda KBD
bpl wait
lda STROBE
rts
lda KBDSTRB
lda #CR
jsr COUT
jmp DOSWARM
.endproc
msg: .asciiz "HELLO, WORLD"

View File

@ -121,7 +121,7 @@
<key>Kind</key>
<string>Xcode.Xcode3.ProjectTemplateUnitKind</string>
<key>Identifier</key>
<string>com.halcyontouch.apple2CBuildSystem</string>
<string>com.halcyontouch.apple2Cc65BuildSystem</string>
<key>Ancestors</key>
<array>
<string>com.apple.dt.unit.externalBuildSystem</string>
@ -129,7 +129,7 @@
<key>Concrete</key>
<true/>
<key>Description</key>
<string>This template creates an Apple II C code project. The project starts with a single C file which you can modify. You can also add more assembly or C files as you may like.</string>
<string>This template creates an Apple II cc65 C code project. The project starts with a single C file which you can modify. You can also add more assembly or C files as you may like.</string>
<key>Options</key>
<array/>
<key>Targets</key>

View File

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

View File

@ -0,0 +1,20 @@
<?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>AllowedTypes</key>
<array>
<string>com.rand-family.xcode.merlin</string>
</array>
<key>DefaultCompletionName</key>
<string>File</string>
<key>Description</key>
<string>A Merlin assembly source file.</string>
<key>Kind</key>
<string>Xcode.IDEKit.TextSubstitutionFileTemplateKind</string>
<key>MainTemplateFile</key>
<string>___FILEBASENAME___.s</string>
<key>Summary</key>
<string>A Merlin assembly source file</string>
</dict>
</plist>

View File

@ -0,0 +1,16 @@
*
* ___FILENAME___
* ___PROJECTNAME___
*
* Created by ___FULLUSERNAME___ on ___DATE___.
* ___COPYRIGHT___
*
]XCODESTART ; Keep this at the start and put your code after this
* Put your code here. We need these markers to convince Xcode to indent
* properly. If you delete them or put your code outside the markers, your
* build will work but the Xcode editor will be annoying.
]XCODEEND ; Keep this at the end and put your code above this

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

View File

@ -9,12 +9,12 @@
<key>DefaultCompletionName</key>
<string>File</string>
<key>Description</key>
<string>An assembly source file.</string>
<string>A ca65 assembly source file.</string>
<key>Kind</key>
<string>Xcode.IDEKit.TextSubstitutionFileTemplateKind</string>
<key>MainTemplateFile</key>
<string>___FILEBASENAME___.s</string>
<key>Summary</key>
<string>An assembly source file</string>
<string>A ca65 assembly source file</string>
</dict>
</plist>

View File

@ -7,17 +7,18 @@ cp -R pkg/Templates $TMPDIR
cp -R pkg/Specifications $TMPDIR
cp -R pkg/Plug-ins $TMPDIR
cp -R make $TMPDIR/Templates/'Apple II/Apple II C Project.xctemplate/'
cp Makefile $TMPDIR/Templates/'Apple II/Apple II C Project.xctemplate/'
cp main.c $TMPDIR/Templates/'Apple II/Apple II C Project.xctemplate/'
cp -R make $TMPDIR/Templates/'Apple II/Apple II cc65 Project.xctemplate/'
cp Makefile $TMPDIR/Templates/'Apple II/Apple II cc65 Project.xctemplate/'
cp main.c $TMPDIR/Templates/'Apple II/Apple II cc65 Project.xctemplate/'
cp -R make $TMPDIR/Templates/'Apple II/Apple II Asm Project.xctemplate/'
cp Makefile $TMPDIR/Templates/'Apple II/Apple II Asm Project.xctemplate/'
cp -R make $TMPDIR/Templates/'Apple II/Apple II ca65 Project.xctemplate/'
cp Makefile $TMPDIR/Templates/'Apple II/Apple II ca65 Project.xctemplate/'
cp -R make $TMPDIR/Templates/'Apple II/Apple II Basic Project.xctemplate/'
sed 's/^# MACHINE = apple2-basic/MACHINE = apple2-basic/' < Makefile > $TMPDIR/Templates/'Apple II/Apple II Basic Project.xctemplate'/Makefile
pkgbuild --root $TMPDIR --version 2.0 --identifier com.halcyontouch.Apple2Template.pkg --install-location /Library/Developer/Xcode/ --scripts pkg/scripts/ AppleXcodeTemplate.pkg
cp -R make $TMPDIR/Templates/'Apple II/Apple II Merlin Project.xctemplate/'
pkgbuild --root $TMPDIR --version 2.2 --identifier com.halcyontouch.Apple2Template.pkg --install-location /Library/Developer/Xcode/ --scripts pkg/scripts/ AppleXcodeTemplate.pkg
productbuild --distribution pkg/Distribution.xml --resource ./pkg temp.pkg
rm AppleXcodeTemplate.pkg
productsign --sign "Developer ID Installer" temp.pkg AppleXcodeTemplate.pkg

View File

@ -1,3 +1,11 @@
#!/bin/bash
defaults write ~/Library/Developer/Xcode/Plug-ins/cc65.ideplugin/Contents/Info.plist DVTPlugInCompatibilityUUIDs -array $(defaults read /Applications/Xcode.app/Contents/Info.plist DVTPlugInCompatibilityUUID)
if [ ! -f /Applications/Xcode.app/Contents/Info.plist ]
then
exit 0
fi
UUID=`defaults read /Applications/Xcode.app/Contents/Info.plist DVTPlugInCompatibilityUUID`
defaults write "$2/Plug-ins/cc65.ideplugin/Contents/Info.plist" DVTPlugInCompatibilityUUIDs -array-add "${UUID}"

View File

@ -1,9 +1,6 @@
#!/bin/bash
for item in ~/"Library/Developer/Xcode/Templates/Apple ][" ~/"Library/Developer/Xcode/Templates/File Templates/Apple ]["
do
if [ -d "$item" ]
then
rm -rf "$item"
fi
done
rm -rf "$2/Templates/Apple II"
rm -rf "$2/Templates/File Templates/Apple II"
rm -rf "$2/Plug-ins/cc65.ideplugin"