Compare commits

...

39 Commits
1.5 ... master

Author SHA1 Message Date
Jeremy Rand d7dd4797f8 Update signing for the package 2023-09-17 23:25:39 -04:00
Jeremy Rand 8f3940d292 Clean up indenting in template plist files 2023-09-17 23:04:51 -04:00
Jeremy Rand 9ed46d562a
Update README.md 2019-08-09 23:57:22 -04:00
Jeremy Rand f957565ef5 Bump the version number 2019-08-09 23:44:00 -04:00
Jeremy Rand 371edbaa1c Add the build products to the project templates 2019-08-09 00:04:19 -04:00
Jeremy Rand ebbb3add28 Fix bug with copying extra files as part of the build 2019-08-08 22:55:01 -04:00
Jeremy Rand a012826948
Update README.md 2019-07-20 13:45:50 -05:00
Jeremy Rand 31089ad01a Merge branch 'master' of https://github.com/jeremysrand/Apple2BuildPipeline 2019-07-20 13:29:37 -05:00
Jeremy Rand ff3fa53d26 More cleanup of the Makefile to make things clearer for generated files 2019-07-20 13:29:19 -05:00
Jeremy Rand 24422041e0
Update README.md 2019-07-20 11:52:12 -05:00
Jeremy Rand 8dbbb22624 Update Makefile comments to describe the new GENDIR variable 2019-07-20 11:27:59 -05:00
Jeremy Rand e5e042f0a4
Update README.md 2019-07-20 11:05:26 -05:00
Jeremy Rand d685336160 Bump the version number 2019-07-20 10:52:08 -05:00
Jeremy Rand eca46476a1 Move all build products to the standard Xcode directories. Eliminate support for the old version of cc65 because I don't want to test it 2019-07-20 10:46:32 -05:00
Jeremy Rand 05c15ce006 Fix the error message format so they work again with the latest Xcode. 2019-07-19 15:31:57 -05:00
Jeremy Rand 8a578abf08 Ensure that the include path for the old and new version of the cc65 package is correct so auto-complete in C works in both cases. 2019-07-04 22:31:11 -04:00
Jeremy Rand 7e0b7d5411
Add acknowledgment 2018-10-18 21:24:22 -04:00
Jeremy Rand 3e4210dfc8 Add support for cc65 v2.17 2018-10-18 21:12:52 -04:00
Jeremy Rand 3bd512faec Ignore any error during the build when trying to update the xcode compatibility for the plugin. 2018-08-09 22:57:11 -04:00
Jeremy Rand 6714922fd4 Add a comment to highlight that commands in a Makefile need a real tab at the beginning and describe how to insert a real tab on Xcode. 2018-08-02 23:09:40 -04:00
Jeremy Rand 55b679d6c1 Fix some remaining typos 2018-07-21 12:14:58 -05:00
Jeremy Rand f5899a2fa3 Remove references to very old version of Xcode 2018-07-21 12:02:52 -05:00
Jeremy Rand 0f7c120a6b Update the readme for version 2.5 which includes Merlin support 2018-07-21 11:58:36 -05:00
Jeremy Rand a481e32e38 Add support for Merlin32 built projects 2018-07-21 11:15:30 -05:00
Jeremy Rand d1fc0ac9e0
Update the readme for v2.1 2018-07-19 18:58:49 -05:00
Jeremy Rand 3701fd5b62 Filter out the copyright symbol from Applesoft programs because the Apple // does not seem to like unicode for some reason. 2018-07-18 20:45:36 -05:00
Jeremy Rand 2be79b8fd5 Add support for Applesoft BASIC projects 2018-07-18 20:00:01 -05:00
Jeremy Rand 4b833136e9
Add documentation for the unknown permission problem. 2018-06-29 23:12:25 -04:00
Jeremy Rand 0680c36ee2
Fix URLs to cc65 docs 2018-06-29 23:07:19 -04:00
Jeremy Rand 22cb3ade31
Fix some issues in the documentation due to changes in Xcode. 2018-06-28 23:59:45 -04:00
Jeremy Rand be36259fbb Update the readme for v2.0. 2018-06-25 23:23:59 -04:00
Jeremy Rand 192a615aa9 Capture build errors in xcode 2018-06-25 22:54:53 -04:00
Jeremy Rand e4e28bedb6 Eliminate the assembly sources list from the makefile now that we just provide a list of directories with source files. 2018-06-19 22:53:02 -04:00
Jeremy Rand 7c7e6ab828 Implement the code to copy custom files to the disk image in the build 2018-06-18 23:23:59 -04:00
Jeremy Rand 448ae4deb9 Update to the latest version of Apple Commander. Update to the latest version of ProDOS (Thanks John!) Fix some bugs in createDiskImage. 2018-06-17 23:38:09 -04:00
Jeremy Rand 2990c4cb53 Add the ability to link in drivers by just enabling them in the root Makefile 2018-06-14 23:51:01 -04:00
Jeremy Rand 0d9c1a6333 Add a gen phase to the build. Add the xcode compatibility fix to the build. Add the option to copy files to the disk image to the build but the copy script does not yet do the copies. Separate the build from build and run targets in xcode for Apple II projects. Add a doNotBuild target with the appropriate build settings so we get code completion working even with cc65 header files. 2018-06-13 22:58:56 -04:00
Jeremy Rand e9183b8877 Add a plugin to provide cc65 assembly syntax highlighting. Fix the C file template so the guards work. Supporting adding extra directories to look for source files to build. 2018-06-12 23:27:01 -04:00
Jeremy Rand 406b08ece8 Add support for the no slot clock in the prodos template disk 2015-08-18 23:20:04 -04:00
46 changed files with 3442 additions and 170 deletions

202
Makefile
View File

@ -18,10 +18,6 @@ include make/head.mk
# The name of your system or binary file to build goes here:
PGM=___PACKAGENAME___
# 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
@ -34,6 +30,13 @@ PGM=___PACKAGENAME___
# MACHINE = apple2enh-loader
# MACHINE = apple2enh-reboot
# Uncomment the appropriate project type. If your entry point is
# main() in a .c file, then your project type is cc65. If your
# entry point is in an assembly file, then you project type is
# ca65:
# PROJECT_TYPE = cc65
# PROJECT_TYPE = ca65
# Uncomment and set this to your starting address in Apple II memory
# if necessary:
# START_ADDR = 6000
@ -48,26 +51,19 @@ PGM=___PACKAGENAME___
# 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)
# Add any other directories where you are putting C or assembly source
# files to this list. Note that if you are generating source files into
# $(GENDIR), you should add $(GENDIR) to SRCDIRS here:
SRCDIRS+=
# If you have a non-standard cc65 install, you may need to change
# some of these. Uncomment the following line and change it to the
# correct path to CC65_HOME if the default is not correct:
# export CC65_HOME := /usr/local/lib/cc65
# correct path to CC65_HOME if the default is not correct. If you
# are using cc65 v2.13.3, the default is:
# /usr/local/lib/cc65
# If you are using cc65 v2.17, the default is:
# /usr/local/share/cc65
# export CC65_HOME := /path/to/your/cc65/directory
#
# If the path to the cc65 binaries is not correct, uncomment this
# line and change it:
@ -85,10 +81,174 @@ PGM=___PACKAGENAME___
# this variable:
# LDFLAGS += -v
# If you want to add arguments to the BASIC tokenizer commandline,
# add them to this valiable:
# BASICFLAGS += --optimize
# If you want to link the lores graphics driver with your executable,
# uncomment the next line.
# DRIVERS += loresgr
#
# To use the lores driver, add code which looks like this to your
# project:
#
# #include "drivers/a2_lores_drv.h"
# int main(void)
# {
# tgi_install(&a2_lores_drv);
# tgi_init();
# // Use the graphics driver
# tgi_uninstall();
# }
#
# Read the $CC65_HOME/include/tgi.h file to see what the
# driver interface provides. Also check out
# $CC65_HOME/include/apple2.h to see the colour definitions.
# If you want to link the hires graphics driver with your executable,
# uncomment the next line.
# DRIVERS += hiresgr
#
# To use the hires driver, add code which looks like this to your
# project:
#
# #include "drivers/a2_hires_drv.h"
# int main(void)
# {
# tgi_install(&a2_hires_drv);
# tgi_init();
# // Use the graphics driver
# tgi_uninstall();
# }
#
# Read the $CC65_HOME/cc65/include/tgi.h file to see what the
# driver interface provides. Also check out
# $CC65_HOME/include/apple2.h to see the colour definitions.
# If you want to link the extended memory driver with your executable,
# uncomment the next line.
# DRIVERS += auxmem
#
# To use the auxmem driver, add code which looks like this to your
# project:
#
# #include "drivers/a2_auxmem_drv.h"
# int main(void)
# {
# em_install(&a2_auxmem_drv);
# // Use the auxmem driver
# em_uninstall();
# }
#
# Read the $CC65_HOME/include/em.h file to see what the
# driver interface provides.
# If you want to link the joystick driver with your executable,
# uncomment the next line.
# DRIVERS += joystick
#
# To use the joystick driver, add code which looks like this to your
# project:
#
# #include "drivers/a2_joystick_drv.h"
# int main(void)
# {
# joy_install(&a2_joystick_drv);
# // Use the joystick driver
# joy_uninstall();
# }
#
# Read the $CC65_HOME/include/joystick.h file to see what the
# driver interface provides.
# If you want to link the mouse driver with your executable,
# uncomment the next line.
# DRIVERS += mouse
#
# To use the mouse driver, add code which looks like this to your
# project:
#
# #include "drivers/a2_mouse_drv.h"
# int main(void)
# {
# mouse_install(&mouse_def_callbacks, &a2_mouse_drv);
# // Use the mouse driver
# mouse_uninstall();
# }
#
# Read the $CC65_HOME/include/mouse.h file to see what the
# driver interface provides.
# If you want to link the serial driver with your executable,
# uncomment the next line.
# DRIVERS += serial
#
# To use the serial driver, add code which looks like this to your
# project:
#
# #include "drivers/a2_serial_drv.h"
# int main(void)
# {
# ser_install(&a2_serial_drv);
# // Use the serial driver
# ser_uninstall();
# }
#
# Read the $CC65_HOME/include/serial.h file to see what the
# driver interface provides.
# If you have java installed in a non-standard location, you can set
# the path to it by uncommenting the following line:
# export JAVA=/usr/bin/java
# If you want to copy one or more files or directories to the target disk
# image, add the root directory to this variable. All files will be
# copied from the source to the target using the same path from the source.
#
# For example, if you set COPYDIRS to dir and in your project you have
# the following files:
# dir/mySystemFile
# dir/newDir/anotherFile
#
# Then, during the copy phase, mySystemFile will be copied into the root
# of the disk and anotherFile will be copied into a directory named
# newDir. The newDir directory will be created if it does not already
# exist.
#
# The name of the file to copy is checked and if it ends in:
# .as - It assumes the file is in AppleSingle format. The .as
# suffix is stripped from the name when copied to the
# disk image.
# .<char> - If the file ends with a single character which matches
# a DOS 3.3 file type (A, B, T, etc) it uses that value as
# the file type of the file copied to the disk image. The
# single character is removed from the file name.
# .<TLA> - If the file ends with a three letter alpha extension, it
# uses that TLA as the file type of the file copied to the
# disk image. The TLA is removed from the file name.
#
# If you do not provide any type information for your filenames,
# it will be copied as a binary.
#
COPYDIRS=
# Add any rules you want to execute before any compiles or assembly
# commands are called here, if any. You can generate .c, .s or .h
# files for example. You can generate data files. Whatever you
# might need.
#
# 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

107
README.md
View File

@ -1,57 +1,116 @@
Apple2BuildPipeline
===================
A build pipeline for making Apple II software on OS X.
A build pipeline for making 8-bit Apple II software on OS X using cc65, Applesoft BASIC or Merlin32.
Features:
=========
This project was built based on the one created by [Quinn Dunki](http://quinndunki.com/blondihacks/?p=1904) but it has been expanded to add the following features:
* You can create Applesoft BASIC, ca65 assembly, cc65 C and Merlin32 assembly projects.
* Attempts to hide all of the infrastructure which you don't need to modify in a make directory.
* On Mac OS X, Virtual II will start when you do a "build and run" and the emulator will execute your program. This works for all supported Apple configurations with cc65 based projects. It also works with Applesoft and Merlin32 based projects. Also, it uses a hardware configuration which is stored in the make directory in your project. That way, you can modify the hardware configuration to be exactly the config you want to test under.
* The Mac OS X deliverable is now an installer which will create the Xcode project templates. So, to start a new Apple II project in Xcode, select File->New->Project. Under the "Cross-platform" tab, you will see an "Apple II" section with the different project types.
* Code completion works now in Xcode. You can even complete functions from the standard library in cc65 based projects and jump to those function definitions in the headers. Code completion also works in Applesoft and Merlin32 projects.
* Syntax colouring is supported for all project types including assembly files and Applesoft BASIC files.
* The Makefile template provides a gen phase which executes before all compiles. If you want to generate code or other data files in your project, this is supported.
* You can specify one or more directories in your project which contain files you want to copy to the disk image at the end of the build. So, if you have files beyond the executable itself which need to be on the disk image, you can use this feature to do so.
With cc65 based projects, the following features are supported:
* Supports linking together multiple C and assembly files. To add a new file to the project, just create a new *.c or *.s file in the project directory.
* If you change a header file, the right source files will rebuild automatically. Header file dependencies are generated during the build.
* Supports all cc65 Apple configurations. So, if you want to target enhanced Apple IIe's running DOS 3.3, knock yourself out. Just set the configuration you want in the Makefile and the build will do the right thing to create a disk image for that configuration.
* On Mac OS X, Virtual II will start when you build and the emulator with execute your program. This works for all supported cc65 Apple configurations. Also, it uses a machine configuration which is stored in the make directory in your project. That way, you can modify the machine configuration to be exactly the config you want to test under.
* The Mac OS X deliverable is now an installer which will create an Xcode project template. So, to start a new Apple II project in Xcode, select File->New->Project. Among the iOS and OS X project templates, you will find the "Apple II Asm Project" and "Apple II C Project" options. Select either and you will have a new Apple II project ready to go.
* Build errors from the compiler, assembler or linker will be displayed inline in your source code next to the problematic line.
* You can easily add drivers from the cc65 project by uncommenting a single line in the template Makefile. Drivers for lores graphics, hires graphics, aux memory, joysticks, mouse and serial devices are supported.
Mac OS X Installation:
----------------------
In order to use this infrastructure from Mac OS X, follow these instructions:
1. Install [Xcode from Apple](https://itunes.apple.com/us/app/xcode/id497799835?mt=12&uo=4). Xcode is generally the most popular app in the Mac App Store in the "Developer Tools" category. Xcode is free and you do not need to be a registered Apple developer to download and use it, especially if you are building Apple II programs. I have only tested with Xcode 6 which is the latest version. It appears as though project templates are a feature introduced in Xcode 4 so the Apple II project template may work with Xcode 4 or 5 but I have not tested them.
2. Install the [cc65 v2.13.3 package](https://github.com/jeremysrand/Apple2BuildPipeline/releases/download/1.0/cc65.2.13.3.pkg).
3. Install the [Apple II project template](https://github.com/jeremysrand/Apple2BuildPipeline/releases/download/1.5/AppleXcodeTemplate.pkg).
4. Install and setup [Virtual II](http://www.virtualii.com).
1. Install [Xcode from Apple](https://itunes.apple.com/us/app/xcode/id497799835?mt=12&uo=4). Xcode is generally the most popular app in the Mac App Store in the "Developer Tools" category. Xcode is free and you do not need to be a registered Apple developer to download and use it, especially if you are building Apple II programs. I am generally running the latest version of Xcode so if you are trying to use these templates with an old version, you may run into problems.
2. Install the [Apple II project templates](https://github.com/jeremysrand/Apple2BuildPipeline/releases/download/2.7.3/AppleXcodeTemplate.pkg).
3. Install and setup [Virtual II](http://www.virtualii.com).
4. If you plan to use cc65 based projects, install the [cc65 v2.17 package](https://github.com/jeremysrand/Apple2BuildPipeline/releases/download/2.6/cc65-2.17.pkg). Both versions should work with the latest project templates but all of my testing from now on will be with the newer version. I haven't tested without cc65 installed but in theory, if you only plan to use Applesoft or Merlin32 based projects, you don't need to install cc65.
5. If you plan to use Merlin32 based projects, install the [Merlin32 binaries and libraries](https://www.brutaldeluxe.fr/products/crossdevtools/merlin/). By default, the build system assumes you have installed the Merlin32 binary in /usr/local/bin and put the library macro files in /usr/local/lib/Merlin. If you installed them somewhere else, you can override these location in your projects.
Your First Project:
-------------------
Note that on your first launch of Xcode after installing the project templates, you may be asked if it is OK to load a cc65 plug-in bundle. You should allow this to load. If you do not do this, syntax highlighting and code completion will not work in assembly or Applesoft files.
Everything you need is now installed. To create a new Apple II project in Xcode:
Your First cc65 Based Project:
------------------------------
To create a new cc65 based project for the Apple II in Xcode:
1. Start Xcode and create a new project by using File->New->Project...
2. In the dialog, you will see an "Apple II" option below the OS X section. Select that and select "Apple II C Project" for a basic C-based project. Or select "Apple II Asm Project" for a basic assembly project. Click "Next".
2. In the dialog, you will see an "Apple II" option below the Cross-platform section. Select "Apple II cc65 Project" for a C based project. Or select "Apple II ca65 Project" for an assembly project. Click "Next".
3. A dialog box with a few text fields will appear. In product name, put in the name of the Apple II executable you want to build. Organization Name and Organization Identifier can be anything you want it to be. Leave Build Tool set to "/usr/bin/make". Click "Next".
4. Xcode now prompts you where you want to save your project. The name of the project will be the product name you already gave. Pick a good directory for your project. Your Documents foler is a reasonable option. Click "Create".
5. Your project is now ready for you. If you select Product->Build, it will build and execute the template code in Virtual II. On your first build, you may be prompted by Mac OS X to install a Java runtime. Java is required so if you get this prompt, you should install it. Once Java is installed, go back to Xcode and select Product->Clean and then Product->Build. Virtual II should launch this time.
4. Xcode now prompts you where you want to save your project. The name of the project will be the product name you already gave. Pick a good directory for your project. Your Documents folder is a reasonable option. Click "Create".
5. Your project is now ready for you. If you select Product->Build, it will build your code. If you select Product->Run, it will build and execute the template code in Virtual II. On your first build, you may be prompted by Mac OS X to install a Java runtime. Java is required so if you get this prompt, you should install it. Once Java is installed, go back to Xcode and select Product->Clean and then Product->Run. Virtual II should launch this time.
6. At this point everything should work and you should see "HELLO, WORLD!" in the emulator. Press any key in the emulator to quit the executable and go back to the BASIC prompt.
7. Review the Makefile and set any options you want. The file has lots of comments to help you understand the configuration options.
8. Change main.c (or main.s if you created an assembly project) and write more code in new C or assembly files until you have the program you always wanted to build. To add new files, select File->New->File. In the dialog, you will see an Apple II option in the OS X section. Select that and in there, you will see options to create a new C file or a new Assembly File. Select the one you want to add the file to your project. Put the new file in the same directory as Makefile. You can add assembly files in a C project or add C files in an assembly project. The only difference between them is the type of the default source file in the project template.
8. Change main.c (or main.s if you created an assembly project) and write more code in new C or assembly files until you have the program you always wanted to build. To add new files, select File->New->File. In the dialog, you will see an Apple II section in the macOS tab. In there, you will see options to create a new "C File" or a new "ca65 Assembly File". Select the one you want to add the file to your project. Put the new file in the same directory as Makefile. You can add assembly files in a C project or add C files in an assembly project. The only difference between them is the type of the default source file in the project template.
9. Do not add a "Merlin Assembly File" to your project. You cannot link Merlin files in a cc65 based project.
10. You can add a "Basic File" to your project. Any Applesoft files added to the project will be tokenized during the build and will be copied to the disk image. But when you build and run, the cc65 binary will be executed.
UNIX Installation:
------------------
This build infrastructure can be used in a non-Mac environment. You need cc65 2.13.3 from ftp://ftp.musoftware.de/pub/uz/cc65/cc65-sources-2.13.3.tar.bz2 and then these commands should work to build the sources:
Your First Applesoft BASIC Project:
-----------------------------------
<pre>
$ tar xvjf cc65-sources-2.13.3.tar.bz2
$ cd cc65-2.13.3
$ make -f make/gcc.mak
$ sudo make -f make/gcc.mak install
</pre>
To create a new Applesoft BASIC project for the Apple II in Xcode:
1. Start Xcode and create a new project by using File->New->Project...
2. In the dialog, you will see an "Apple II" option below the Cross-platform section. Select "Apple II Basic Project" for an Applesoft project. Click "Next".
3. A dialog box with a few text fields will appear. In product name, put in the name of the Apple II program you want to build. Organization Name and Organization Identifier can be anything you want it to be. Leave Build Tool set to "/usr/bin/make". Click "Next".
4. Xcode now prompts you where you want to save your project. The name of the project will be the product name you already gave. Pick a good directory for your project. Your Documents folder is a reasonable option. Click "Create".
5. Your project is now ready for you. If you select Product->Build, it will tokenize your BASIC code. If you select Product->Run, it will tokenize and execute the template code in Virtual II. On your first build, you may be prompted by Mac OS X to install a Java runtime. Java is required so if you get this prompt, you should install it. Once Java is installed, go back to Xcode and select Product->Clean and then Product->Run. Virtual II should launch this time.
6. At this point everything should work and you should see "HELLO, WORLD!" in the emulator.
7. Review the Makefile and set any options you want. The file has lots of comments to help you understand the configuration options. Definitely check out the optimization option for BASIC programs.
8. Change the file containting the Applesoft code until you have the program you always wanted to build.
9. You can add other C and assembly files to your projects but they will be ignored. Today, there is no way to add a binary built by cc65 or Merlin32 and include that in a BASIC project (let me know if you wan this). You can add BASIC files to your cc65 and Merlin32 based projects though.
10. You can add a second, third, etc "Basic File" to your project. Any Applesoft files added to the project will be tokenized during the build and will be copied to the disk image. But when you build and run, only the original BASIC file will be executed.
Your First Merlin32 Based Project:
----------------------------------
To create a new Merlin32 based project for the Apple II in Xcode:
1. Start Xcode and create a new project by using File->New->Project...
2. In the dialog, you will see an "Apple II" option below the Cross-platform section. Select "Apple II Merlin Project". Click "Next".
3. A dialog box with a few text fields will appear. In product name, put in the name of the Apple II executable you want to build. Organization Name and Organization Identifier can be anything you want it to be. Leave Build Tool set to "/usr/bin/make". Click "Next".
4. Xcode now prompts you where you want to save your project. The name of the project will be the product name you already gave. Pick a good directory for your project. Your Documents folder is a reasonable option. Click "Create".
5. Your project is now ready for you. If you select Product->Build, it will build your code. If you select Product->Run, it will build and execute the template code in Virtual II. On your first build, you may be prompted by Mac OS X to install a Java runtime. Java is required so if you get this prompt, you should install it. Once Java is installed, go back to Xcode and select Product->Clean and then Product->Run. Virtual II should launch this time.
6. At this point everything should work and you should see "HELLO, WORLD!" in the emulator. Press any key in the emulator to quit the executable and go back to the BASIC prompt.
7. Review the Makefile and the linkscript.s file and set any options you want. Remember that this is a project for 8-bit Apple II's so don't enable features which produce Apple IIgs binaries.
8. Change main.s and write more code in new assembly files until you have the program you always wanted to build. To add new files, select File->New->File. In the dialog, you will see an Apple II section in the macOS tab. In there, you will see options to create a new "Merlin Assembly File". Put the new file in the same directory as Makefile. You also need to add the new file to the linkscript.s file to ensure that Merlin assembles its contents.
9. Note that the Merlin assembly files contain "]XCODESTART" and "]XCODEEND" variables defined at the beginning and the end of every file. If you remove those, your build will still work. These markers are here to convince Xcode that the code is the body of a function. I have told Xcode that a function in Merlin assembly start and end with these tokens. With this in place, we get better indentation handling. If you remove them, things will work but the editor may drive you crazy. If I can find a way to solve this without this Xcode cruft in your files, I will implement that in the future.
10. Do not add a "C File" or "ca65 Assembly File" to your project. You cannot link cc65 files in a Merlin based project.
11. You can add a "Basic File" to your project. Any Applesoft files added to the project will be tokenized during the build and will be copied to the disk image. But when you build and run, the binary produced by Merlin32 will be executed.
Common Problems:
----------------
There are some known issues which can crop up:
* If you aren't seeing the "ca65 Assembly" option under Editor->Syntax Coloring, you may be having an Xcode compatibility problem. These syntax colouring files are provided as part of an Xcode plugin and plugins must advertize their compatibility. During install, the plugin is set to be compatible with the version of Xcode you have. If you upgrade Xcode, the plugin will be assumed to be incompatible and will not be loaded. To workaround this, we force the plugin to be marked as compatible on every build of a Apple II target. So, you should do a build and then quit and re-launch Xcode. You should see a warning asking if you want to load the plugin and if you allow the plugin to load, you should see the ca65 syntax colouring option.
If these suggestions do not help or you are having some other problem, please contact me and I will try to help you out.
Upgrading Existing Projects:
----------------------------
As these templates evolve, you may have projects you started under older versions of the project templates which you will want to upgrade. The best method for doing this is:
1. Create a brand new project with the same name in Xcode and select the appropriate project type.
2. Review your changes to the Makefile in the old project. Apply the appropriate changes to the Makefile in the new project to pick up those customizations.
3. Copy all of the code from your old project into your new project. You should be able to drag it into the Xcode sidebar. Be sure to copy main.c or main.s also.
4. Test the project. It should build and run at this point if you have duplicated everything.
It is possible to upgrade projects in other ways like copying the make directory from a new project into the old project. The contents of the make directory is where much of the functionality is located so this picks up most things but not necessarily everything. The preferred approach is to create a new project and migrate your code into that project.
Once that is done, you can edit the Makefile from the Apple II build pipeline and add new source files as described above. Be sure to set PGM to the name of your executable in the Makefile. When you build the project in a non-Mac environment, you should end up with a .dsk file but it will not try to execute that like it would on a Mac. In theory, other emulators on the Mac or on other host systems could be added to the build infrastructure and feel free to add support for your favourite.
Acknowledgements:
-----------------
Thanks to Quinn Dunki and Carrington Vanston who were instrumental in getting this working. [Carrington's presentation](http://monsterfeet.com/kfest/) at KansasFest 2014 is where the basic concepts of a better Apple II build environment were demonstrated. [Quinn built on that](http://quinndunki.com/blondihacks/?p=1904) and included support for automatically starting the program in Virtual II using Applescript. Without their work, I wouldn't have been able to create this. Thanks!
Kris Kennaway provided some patches to the build pipeline providing cc65 v2.17 support. This was instrumental in getting v2.6 of the build pipeline released. I appreciate the support.

Binary file not shown.

Binary file not shown.

34
make/bt Executable file
View File

@ -0,0 +1,34 @@
#!/bin/sh
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
INPUTFILE=$1
shift
tr -d '©' < "$INPUTFILE" > /tmp/bt_filtered.$$
"$JAVA" -jar make/bastokenizer-tools-bt-0.2.0.jar $* /tmp/bt_filtered.$$
RESULT=$?
rm /tmp/bt_filtered.$$
exit $RESULT

View File

@ -1,8 +1,13 @@
#!/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>'
echo USAGE: $0 '<AppleCommander> <machine> <diskimage> <binary> <startaddress> <otherfilesordirs...>'
exit 1
fi
@ -29,16 +34,21 @@ then
fi
APPLECOMMANDER=$1
MACHINE=$2
DISKIMAGE=$3
PROGRAM=$4
STARTADDR=`echo $5 | sed 's/^0*//'`
shift
if [ ! -f "$PROGRAM" ]
then
echo "Cannot file executable $PROGRAM"
exit 1
fi
MACHINE=$1
shift
DISKIMAGE=$1
shift
PROGRAM=$1
shift
STARTADDR=`echo $1 | sed 's/^0*//'`
shift
SOURCEFILE=$PROGRAM
case "$MACHINE" in
apple2)
@ -46,8 +56,10 @@ case "$MACHINE" in
DELETELOADER=1
RENAMELOADER=0
DELETEBASIC=0
COPYBINARY=1
HASHEADER=1
FILETYPE="bin"
BASICFILETYPE="bas"
TARGETFILE=`basename $PROGRAM`
MAXFILENAMELEN=15
;;
@ -57,8 +69,10 @@ case "$MACHINE" in
DELETELOADER=1
RENAMELOADER=0
DELETEBASIC=0
COPYBINARY=1
HASHEADER=1
FILETYPE="bin"
BASICFILETYPE="bas"
TARGETFILE=`basename $PROGRAM`
MAXFILENAMELEN=15
;;
@ -68,8 +82,10 @@ case "$MACHINE" in
DELETELOADER=0
RENAMELOADER=0
DELETEBASIC=0
COPYBINARY=1
HASHEADER=1
FILETYPE="bin"
FILETYPE="B"
BASICFILETYPE="A"
TARGETFILE=`basename $PROGRAM`
MAXFILENAMELEN=30
;;
@ -79,8 +95,10 @@ case "$MACHINE" in
DELETELOADER=0
RENAMELOADER=0
DELETEBASIC=0
COPYBINARY=1
HASHEADER=1
FILETYPE="bin"
FILETYPE="B"
BASICFILETYPE="A"
TARGETFILE=`basename $PROGRAM`
MAXFILENAMELEN=30
;;
@ -90,8 +108,10 @@ case "$MACHINE" in
DELETELOADER=1
RENAMELOADER=0
DELETEBASIC=1
COPYBINARY=1
HASHEADER=0
FILETYPE="sys"
BASICFILETYPE="bas"
TARGETFILE=`basename $PROGRAM`.system
MAXFILENAMELEN=15
;;
@ -101,8 +121,10 @@ case "$MACHINE" in
DELETELOADER=1
RENAMELOADER=0
DELETEBASIC=1
COPYBINARY=1
HASHEADER=0
FILETYPE="sys"
BASICFILETYPE="bas"
TARGETFILE=`basename $PROGRAM`.system
MAXFILENAMELEN=15
;;
@ -112,8 +134,10 @@ case "$MACHINE" in
DELETELOADER=0
RENAMELOADER=1
DELETEBASIC=1
COPYBINARY=1
HASHEADER=1
FILETYPE="bin"
BASICFILETYPE="bas"
TARGETFILE=`basename $PROGRAM`
MAXFILENAMELEN=15
;;
@ -123,8 +147,10 @@ case "$MACHINE" in
DELETELOADER=0
RENAMELOADER=1
DELETEBASIC=1
COPYBINARY=1
HASHEADER=1
FILETYPE="bin"
BASICFILETYPE="bas"
TARGETFILE=`basename $PROGRAM`
MAXFILENAMELEN=15
;;
@ -134,8 +160,10 @@ case "$MACHINE" in
DELETELOADER=0
RENAMELOADER=1
DELETEBASIC=1
COPYBINARY=1
HASHEADER=1
FILETYPE="bin"
BASICFILETYPE="bas"
TARGETFILE=`basename $PROGRAM`
MAXFILENAMELEN=15
;;
@ -145,10 +173,68 @@ case "$MACHINE" in
DELETELOADER=0
RENAMELOADER=1
DELETEBASIC=1
COPYBINARY=1
HASHEADER=1
FILETYPE="bin"
BASICFILETYPE="bas"
TARGETFILE=`basename $PROGRAM`
MAXFILENAMELEN=8
MAXFILENAMELEN=15
;;
apple2-basic)
TEMPLATE="make/prodos_template.dsk"
DELETELOADER=1
RENAMELOADER=0
DELETEBASIC=0
COPYBINARY=0
FILETYPE="bas"
BASICFILETYPE="bas"
TARGETFILE=`basename $PROGRAM`
SOURCEFILE=${PROGRAM}.tok
MAXFILENAMELEN=15
;;
apple2-dos33-basic)
TEMPLATE="make/dos33_template.dsk"
DELETELOADER=0
RENAMELOADER=0
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`
;;
*)
@ -157,6 +243,19 @@ case "$MACHINE" in
;;
esac
STARTARG=""
if [ ! -z "$STARTADDR" ]
then
STARTARG="0x$STARTADDR"
fi
if [ ! -f "$SOURCEFILE" ]
then
echo "Cannot file executable $SOURCEFILE"
exit 1
fi
if [ ${#TARGETFILE} -gt $MAXFILENAMELEN ]
then
echo "The filename $TARGETFILE exceeds the max name length of the filesystem ($MAXFILENAMELEN)"
@ -185,7 +284,7 @@ then
rm -f "$DISKIMAGE"
exit 1
fi
"$JAVA" -jar "$APPLECOMMANDER" -e "$DISKIMAGE" LOADER.SYSTEM | "$JAVA" -jar "$APPLECOMMANDER" -p "$DISKIMAGE" "$LOADERFILE" sys
"$JAVA" -jar "$APPLECOMMANDER" -g "$DISKIMAGE" LOADER.SYSTEM | "$JAVA" -jar "$APPLECOMMANDER" -p "$DISKIMAGE" "$LOADERFILE" sys
"$JAVA" -jar "$APPLECOMMANDER" -d "$DISKIMAGE" LOADER.SYSTEM
fi
@ -194,15 +293,81 @@ then
"$JAVA" -jar "$APPLECOMMANDER" -d "$DISKIMAGE" BASIC.SYSTEM
fi
if [ $HASHEADER -eq 1 ]
if [ $COPYBINARY -eq 1 ]
then
HDR_STARTADDR=`od -t x2 -N 2 < "$PROGRAM" | head -1 | awk '{print $2}' | sed 's/^0*//'`
if [ "$HDR_STARTADDR" = "$STARTADDR" ]
if [ "$CC65_SUPPORTS_APPLE_SINGLE" -eq 1 ]
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"
"$JAVA" -jar "$APPLECOMMANDER" -as "$DISKIMAGE" "$TARGETFILE" < "$SOURCEFILE"
elif [ $HASHEADER -eq 1 ]
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 $STARTARG
else
"$JAVA" -jar "$APPLECOMMANDER" -p "$DISKIMAGE" "$TARGETFILE" $FILETYPE $STARTARG < "$SOURCEFILE"
fi
else
"$JAVA" -jar "$APPLECOMMANDER" -p "$DISKIMAGE" "$TARGETFILE" $FILETYPE $STARTARG < "$SOURCEFILE"
fi
else
"$JAVA" -jar "$APPLECOMMANDER" -p "$DISKIMAGE" "$TARGETFILE" $FILETYPE < "$PROGRAM"
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=`basename "$ITEM" | sed 's/\.tok$//'`
"$JAVA" -jar "$APPLECOMMANDER" -p "$DISKIMAGE" "$DESTFILE" "$BASICFILETYPE" 0x801 < "$ITEM"
continue
fi
if [ ! -d "$ITEM" ]
then
echo Unable to find directory $ITEM
exit 1
fi
OLDPWD=`pwd`
cd $ITEM
find . -type f -print | while read FILE
do
TRANSFERARG=-p
FILETYPE=bin
DESTFILE=`echo $FILE | sed 's/^\.\///'`
if echo $FILE | egrep '\.as$' > /dev/null
then
# If the file ends with .as, this means the input is AppleSingle format.
# Strip the .as from the end of the file name and set the args to do
# an AppleSingle transfer.
TRANSFERARG=-as
FILETYPE=""
DESTFILE=`echo $DESTFILE | sed 's/\.as$//'`
elif echo $FILE | egrep '\.[ABITSRab]$' > /dev/null
then
# If the file ends with a single character DOS 3.3 file type, then use
# that as the file type.
FILETYPE=`echo $DESTFILE | awk -F. '{print $NF}'`
DESTFILE=`echo $DESTFILE | sed 's/\.[ABITSRab]$//'`
elif echo $FILE | egrep '\.[a-zA-Z][a-zA-Z][a-zA-Z]$' > /dev/null
then
# If the file ends with a three letter extension, use that as
# the file type.
FILETYPE=`echo $DESTFILE | awk -F. '{print $NF}'`
DESTFILE=`echo $DESTFILE | sed 's/\.[a-zA-Z][a-zA-Z][a-zA-Z]$//'`
fi
# If the file type is text, convert the line feeds to carriage return
if [ $FILETYPE = txt ] || [ $FILETYPE = T ]
then
tr '\n' '\r' < $FILE | "$JAVA" -jar "$OLDPWD/$APPLECOMMANDER" $TRANSFERARG "$DISKIMAGE" "$DESTFILE" $FILETYPE
else
"$JAVA" -jar "$OLDPWD/$APPLECOMMANDER" $TRANSFERARG "$DISKIMAGE" "$DESTFILE" $FILETYPE < $FILE
fi
done
cd "$OLDPWD"
done

59
make/errorFilter.sh Executable file
View File

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

View File

@ -10,21 +10,74 @@
# http://www.quinndunki.com/blondihacks
#
export CC65_HOME := /usr/local/lib/cc65
CC65_BIN=/usr/local/bin
CC65_BIN = /usr/local/bin
ifneq ($(wildcard /usr/local/lib/cc65),)
export CC65_HOME := /usr/local/lib/cc65
else
export CC65_HOME := /usr/local/share/cc65
endif
CL65=$(CC65_BIN)/cl65
CA65=$(CC65_BIN)/ca65
CC65=$(CC65_BIN)/cc65
CO65=$(CC65_BIN)/co65
MERLIN_DIR=/usr/local
export MERLIN_BIN=$(MERLIN_DIR)/bin/Merlin32
export MERLIN_LIB=$(MERLIN_DIR)/lib/Merlin
MERLIN_ASM=make/merlin-asm
AC=make/AppleCommander.jar
C_SRCS=$(wildcard *.c)
ASM_SRCS=$(wildcard *.s)
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
MACHINE=apple2
CPU=6502
CFLAGS=
ASMFLAGS=
LDFLAGS=
DRIVERS=
DRVDIR=$(GENDIR)/drivers
MKDIR=mkdir -p
XCODE_PATH=/Applications/Xcode.app
XCODE_INFO=$(XCODE_PATH)/Contents/Info.plist
CC65_PLUGIN_PATH=$(HOME)/Library/Developer/Xcode/Plug-ins/cc65.ideplugin
CC65_PLUGIN_INFO=$(CC65_PLUGIN_PATH)/Contents/Info.plist
XCODE_PLUGIN_COMPATIBILITY=DVTPlugInCompatibilityUUID
.PHONY: all gen genclean
all:
@make gen
@make build

38
make/merlin-asm Executable file
View File

@ -0,0 +1,38 @@
#!/bin/bash
ERROUTPUT=/tmp/merlin-err.$$
LINKSCRIPT="$1"
shift
OUTFILE="$1"
shift
TARGETOUTPUT="$1"
shift
cleanup()
{
rm -r error_output.txt
rm -f _FileInformation.txt
rm -f _Output.txt
rm -f "$ERROUTPUT"
}
"$MERLIN_BIN" -V "$MERLIN_LIB" "$LINKSCRIPT" 2>&1 | tee "$ERROUTPUT"
if [ ! -f "$OUTFILE" ]
then
cat error_output.txt
tr "'" '"' < "$ERROUTPUT" |
grep '\[Error\]' |
sed 's!^.*\[Error\] \(.*file "\([^"]*\.s\)".*line \([1-9][0-9]*\).*\)$!'`pwd`'/\2:\3:0: error: \1!' |
sed 's!^.*\[Error\] \(.*line \([1-9][0-9]*\).*file "\([^"]*\.s\)".*\)$!'`pwd`'/\3:\2:0: error: \1!'
cleanup
exit 1
fi
mv "$OUTFILE" "$TARGETOUTPUT"
cleanup
exit 0

Binary file not shown.

View File

@ -10,98 +10,280 @@
# 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)
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=
DISKIMAGE=$(TARGETDIR)/$(PGM).dsk
EXECCMD=
ALLTARGET=$(DISKIMAGE)
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Darwin)
ALLTARGET=execute
endif
vpath $(GENDIR)
ifneq ($(START_ADDR),)
# If the MACHINE is set to an option which does not support a variable start
# address, then error.
BASIC_SRCS=$(patsubst $(GENDIR)/%, %, $(patsubst ./%, %, $(wildcard $(addsuffix /*.bas, $(SRCDIRS)))))
BASIC_OBJS=$(patsubst %.bas, $(TARGETDIR)/%.tok, $(BASIC_SRCS))
ifeq ($(BUILD_TYPE),cc65)
export PATH := $(PATH):$(CC65_BIN)
# By default, use the a2 drivers. If the machine is one of the enhanced
# targets though, use the a2e drivers.
DRV_BASE_MACHINE=a2
BASE_MACHINE = apple2
ifneq ($(filter $(MACHINE), apple2enh apple2enh-dos33 apple2enh-system apple2enh-loader apple2enh-reboot),)
DRV_BASE_MACHINE=a2e
BASE_MACHINE = apple2enh
endif
export CC65_SUPPORTS_APPLE_SINGLE=1
CC65_CREATE_DEP_ARG=--create-dep $(@:.o=.u)
CC65_LIST_ARG=-l $(@:.o=.lst)
CC65_DRV_DIR=$(CC65_HOME)/target/$(BASE_MACHINE)/drv
MACHCONFIG= -t $(BASE_MACHINE)
ifneq ($(filter $(MACHINE), apple2-system apple2enh-system),)
$(error You cannot change start address with this machine type)
MACHCONFIG += -C $(BASE_MACHINE)-system.cfg
else
ifeq ($(PROJECT_TYPE),ca65)
MACHCONFIG += -C $(BASE_MACHINE)-asm.cfg
LDFLAGS += -u __EXEHDR__
else
MACHCONFIG += -C $(BASE_MACHINE).cfg
endif
endif
CFLAGS+=-I $(GENDIR)
ifneq ($(DRIVERS),)
SRCDIRS+=$(DRVDIR)
endif
C_SRCS=$(patsubst $(GENDIR)/%, %, $(patsubst ./%, %, $(wildcard $(addsuffix /*.c, $(SRCDIRS)))))
C_OBJS=$(patsubst %.c, $(OBJDIR)/%.o, $(C_SRCS))
C_DEPS=$(patsubst %.c, $(OBJDIR)/%.u, $(C_SRCS))
ASM_SRCS=$(patsubst $(GENDIR)/%, %, $(patsubst ./%, %, $(wildcard $(addsuffix /*.s, $(SRCDIRS)))))
ASM_OBJS=$(patsubst %.s, $(OBJDIR)/%.o, $(ASM_SRCS))
ASM_LSTS=$(patsubst %.s, $(OBJDIR)/%.lst, $(ASM_SRCS))
MAPFILE=$(TARGETDIR)/$(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),)
$(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
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)
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=$(TARGETDIR)/_Output.txt
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
ifeq ($(BUILD_TYPE),basic)
MAPFILE=
EXECCMD=$(shell echo run $(PGM) | tr '[a-z]' '[A-Z]')
endif
ifeq ($(filter $(MACHINE), apple2 apple2enh),)
MACHCONFIG += -C $(MACHINE).cfg
OBJS=$(C_OBJS) $(ASM_OBJS)
ALLTARGET=$(DISKIMAGE)
.PHONY: build execute clean cleandrivers xcodefix
build: $(ALLTARGET)
$(DISKIMAGE): $(TARGETDIR)/$(PGM) $(BASIC_OBJS)
make/createDiskImage $(AC) $(MACHINE) "$(DISKIMAGE)" "$(TARGETDIR)/$(PGM)" "$(START_ADDR)" $(BASIC_OBJS) $(COPYDIRS)
execute: $(DISKIMAGE)
osascript make/V2Make.scpt "$(TARGETDIR)" "$(PGM)" "$(CWD)/make/DevApple.vii" "$(EXECCMD)"
$(TARGETDIR)/%.tok: %.bas
$(MKDIR) `dirname $@`
make/bt $< $(BASICFLAGS) -o $@
ifneq ($(DRIVERS),)
cleandrivers:
rm -Rf "$(DRVDIR)"
else
cleandrivers:
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
clean: genclean cleandrivers
rm -f "$(TARGETDIR)/$(PGM)" $(OBJS) $(BASIC_OBJS) $(C_DEPS) $(MAPFILE) $(ASM_LSTS) "$(DISKIMAGE)"
cleanMacCruft:
rm -rf pkg
$(PGM): $(OBJS)
$(CL65) $(MACHCONFIG) --mapfile $(MAPFILE) $(LDFLAGS) -o "$(PGM)" $(OBJS)
# Some gen phase stuff...
gen: xcodefix $(DRIVERS)
$(DISKIMAGE): $(PGM)
make/createDiskImage $(AC) $(MACHINE) "$(DISKIMAGE)" "$(PGM)" "$(START_ADDR)"
xcodefix:
defaults write "$(CC65_PLUGIN_INFO)" $(XCODE_PLUGIN_COMPATIBILITY)s -array `defaults read "$(XCODE_INFO)" $(XCODE_PLUGIN_COMPATIBILITY)` || true
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
ifeq ($(BUILD_TYPE),basic)
# Build rules for BASIC projects
%.o: %.s
$(CL65) $(MACHCONFIG) --cpu $(CPU) $(ASMFLAGS) -l -c -o $@ $<
$(TARGETDIR)/$(PGM): $(BASIC_OBJS)
cp $(TARGETDIR)/$(PGM).tok $(TARGETDIR)/$(PGM)
$(BASIC_OBJS): Makefile
endif
ifeq ($(BUILD_TYPE),merlin)
# Build rules for Merlin projects
$(TARGETDIR)/$(PGM): $(ASM_SRCS) Makefile
$(MKDIR) $(TARGETDIR)
rm -f $(TARGETDIR)/$(PGM)
$(MERLIN_ASM) linkscript.s $(PGM) $(TARGETDIR)/$(PGM)
endif
ifeq ($(BUILD_TYPE),cc65)
# Build rules for cc65 projects
$(TARGETDIR)/$(PGM): $(OBJS)
$(MKDIR) `dirname $@`
make/errorFilter.sh $(CL65) $(MACHCONFIG) --mapfile $(MAPFILE) $(LDFLAGS) -o "$(TARGETDIR)/$(PGM)" $(OBJS)
$(OBJS): Makefile
$(OBJDIR)/%.o: %.c
$(MKDIR) `dirname $@`
make/errorFilter.sh $(CL65) $(MACHCONFIG) $(CFLAGS) $(CC65_CREATE_DEP_ARG) -c -o $@ $<
sed -i .bak 's/\.s:/.o:/' $(@:.o=.u)
rm -f $(@:.o=.u).bak
$(OBJDIR)/%.o: $(GENDIR)/%.c
$(MKDIR) `dirname $@`
make/errorFilter.sh $(CL65) $(MACHCONFIG) $(CFLAGS) $(CC65_CREATE_DEP_ARG) -c -o $@ $<
sed -i .bak 's/\.s:/.o:/' $(@:.o=.u)
rm -f $(@:.o=.u).bak
$(OBJDIR)/%.o: %.s
$(MKDIR) `dirname $@`
make/errorFilter.sh $(CL65) $(MACHCONFIG) --cpu $(CPU) $(ASMFLAGS) $(CC65_LIST_ARG) -c -o $@ $<
$(OBJDIR)/%.o: $(GENDIR)/%.s
$(MKDIR) `dirname $@`
make/errorFilter.sh $(CL65) $(MACHCONFIG) --cpu $(CPU) $(ASMFLAGS) $(CC65_LIST_ARG) -c -o $@ $<
.PHONY: loresgr hiresgr auxmem joystick mouse serial
# Lores driver codegen
loresgr: $(DRVDIR)/a2_lores_drv.s $(DRVDIR)/a2_lores_drv.h
$(DRVDIR)/a2_lores_drv.s: $(CC65_DRV_DIR)/tgi/$(DRV_BASE_MACHINE).lo.tgi
mkdir -p $(DRVDIR)
$(CO65) --code-label _a2_lores_drv -o $@ $(CC65_DRV_DIR)/tgi/$(DRV_BASE_MACHINE).lo.tgi
$(DRVDIR)/a2_lores_drv.h:
mkdir -p $(DRVDIR)
echo '#include <tgi.h>' > $@
echo 'extern char a2_lores_drv;' >> $@
# Hires driver codegen
hiresgr: $(DRVDIR)/a2_hires_drv.s $(DRVDIR)/a2_hires_drv.h
$(DRVDIR)/a2_hires_drv.s: $(CC65_DRV_DIR)/tgi/$(DRV_BASE_MACHINE).hi.tgi
mkdir -p $(DRVDIR)
$(CO65) --code-label _a2_hires_drv -o $@ $(CC65_DRV_DIR)/tgi/$(DRV_BASE_MACHINE).hi.tgi
$(DRVDIR)/a2_hires_drv.h:
mkdir -p $(DRVDIR)
echo '#include <tgi.h>' > $@
echo 'extern char a2_hires_drv;' >> $@
# Auxmem driver codegen
auxmem: $(DRVDIR)/a2_auxmem_drv.s $(DRVDIR)/a2_auxmem_drv.h
$(DRVDIR)/a2_auxmem_drv.s: $(CC65_DRV_DIR)/emd/$(DRV_BASE_MACHINE).auxmem.emd
mkdir -p $(DRVDIR)
$(CO65) --code-label _a2_auxmem_drv -o $@ $(CC65_DRV_DIR)/emd/$(DRV_BASE_MACHINE).auxmem.emd
$(DRVDIR)/a2_auxmem_drv.h:
mkdir -p $(DRVDIR)
echo '#include <em.h>' > $@
echo 'extern char a2_auxmem_drv;' >> $@
# Joystick driver codegen
joystick: $(DRVDIR)/a2_joystick_drv.s $(DRVDIR)/a2_joystick_drv.h
$(DRVDIR)/a2_joystick_drv.s: $(CC65_DRV_DIR)/joy/$(DRV_BASE_MACHINE).stdjoy.joy
mkdir -p $(DRVDIR)
$(CO65) --code-label _a2_joystick_drv -o $@ $(CC65_DRV_DIR)/joy/$(DRV_BASE_MACHINE).stdjoy.joy
$(DRVDIR)/a2_joystick_drv.h:
mkdir -p $(DRVDIR)
echo '#include <joystick.h>' > $@
echo 'extern char a2_joystick_drv;' >> $@
# Mouse driver codegen
mouse: $(DRVDIR)/a2_mouse_drv.s $(DRVDIR)/a2_mouse_drv.h
$(DRVDIR)/a2_mouse_drv.s: $(CC65_DRV_DIR)/mou/$(DRV_BASE_MACHINE).stdmou.mou
mkdir -p $(DRVDIR)
$(CO65) --code-label _a2_mouse_drv -o $@ $(CC65_DRV_DIR)/mou/$(DRV_BASE_MACHINE).stdmou.mou
$(DRVDIR)/a2_mouse_drv.h:
mkdir -p $(DRVDIR)
echo '#include <mouse.h>' > $@
echo 'extern char a2_mouse_drv;' >> $@
# Serial driver codegen
serial: $(DRVDIR)/a2_serial_drv.s $(DRVDIR)/a2_serial_drv.h
$(DRVDIR)/a2_serial_drv.s: $(CC65_DRV_DIR)/ser/$(DRV_BASE_MACHINE).ssc.ser
mkdir -p $(DRVDIR)
$(CO65) --code-label _a2_serial_drv -o $@ $(CC65_DRV_DIR)/ser/$(DRV_BASE_MACHINE).ssc.ser
$(DRVDIR)/a2_serial_drv.h:
mkdir -p $(DRVDIR)
echo '#include <serial.h>' > $@
echo 'extern char a2_serial_drv;' >> $@
endif
-include $(C_DEPS)

View File

@ -0,0 +1,36 @@
<?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>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleIdentifier</key>
<string>com.rand-family.xcode.cc65</string>
<key>CFBundleName</key>
<string>cc65 Xcode Plug-in</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleSupportedPlatforms</key>
<array>
<string>MacOSX</string>
</array>
<key>DVTPlugInCompatibilityUUIDs</key>
<array>
<string>DF11C142-1584-4A99-87AC-1925D5F5652A</string>
<string>8A66E736-A720-4B3C-92F1-33D9962C69DF</string>
<string>65C57D32-1E9B-44B8-8C04-A27BA7AAE2C4</string>
<string>DA4FDFD8-C509-4D8B-8B55-84A7B66AE701</string>
<string>E0A62D1F-3C18-4D74-BFE5-A4167D643966</string>
<string>DFFB3951-EB0A-4C09-9DAC-5F2D28CC839C</string>
<string>CA351AD8-3176-41CB-875C-42A05C7CDEC7</string>
</array>
</dict>
</plist>

View File

@ -0,0 +1,225 @@
<?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>plug-in</key>
<dict>
<key>extensions</key>
<dict>
<key>Xcode.FileDataType.ca65.Assembly</key>
<dict>
<key>id</key>
<string>Xcode.FileDataType.ca65.Assembly</string>
<key>localizedDescription</key>
<string>ca65 Assembly Source</string>
<key>name</key>
<string>File type for ca65 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.ca65</string>
<key>version</key>
<string>1.0</string>
</dict>
<key>Xcode.FileDataTypeDetector.ca65.Assembly</key>
<dict>
<key>detectedTypeIdentifier</key>
<string>com.rand-family.xcode.ca65</string>
<key>id</key>
<string>Xcode.FileDataTypeDetector.ca65.Assembly</string>
<key>matchesExtension</key>
<string>s</string>
<key>point</key>
<string>Xcode.FileDataTypeDetector</string>
</dict>
<key>Xcode.SourceCodeLanguage.ca65-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.ca65</string>
</dict>
</array>
<key>id</key>
<string>Xcode.SourceCodeLanguage.ca65-Assembly</string>
<key>languageName</key>
<string>ca65 Assembly</string>
<key>languageSpecification</key>
<string>xcode.lang.asm.ca65</string>
<key>name</key>
<string>ca65 Assembly</string>
<key>point</key>
<string>Xcode.SourceCodeLanguage</string>
<key>supportsIndentation</key>
<string>true</string>
<key>version</key>
<string>1.0</string>
</dict>
<key>Xcode.FileDataType.Basic.Applesoft</key>
<dict>
<key>id</key>
<string>Xcode.FileDataType.Basic.Applesoft</string>
<key>localizedDescription</key>
<string>Applesoft BASIC Source</string>
<key>name</key>
<string>File type for Applesoft BASIC</string>
<key>point</key>
<string>Xcode.FileDataType</string>
<key>typeConformedTo</key>
<array>
<dict>
<key>typeIdentifier</key>
<string>public.source-code</string>
</dict>
</array>
<key>typeIdentifier</key>
<string>com.rand-family.xcode.applesoft</string>
<key>version</key>
<string>1.0</string>
</dict>
<key>Xcode.FileDataTypeDetector.Basic.Applesoft</key>
<dict>
<key>detectedTypeIdentifier</key>
<string>com.rand-family.xcode.applesoft</string>
<key>id</key>
<string>Xcode.FileDataTypeDetector.Basic.Applesoft</string>
<key>matchesExtension</key>
<string>bas</string>
<key>point</key>
<string>Xcode.FileDataTypeDetector</string>
</dict>
<key>Xcode.SourceCodeLanguage.Applesoft</key>
<dict>
<key>commentSyntax</key>
<array>
<dict>
<key>prefix</key>
<string>REM</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.applesoft</string>
</dict>
</array>
<key>id</key>
<string>Xcode.SourceCodeLanguage.Applesoft</string>
<key>languageName</key>
<string>Applesoft BASIC</string>
<key>languageSpecification</key>
<string>xcode.lang.basic.applesoft</string>
<key>name</key>
<string>Applesoft BASIC</string>
<key>point</key>
<string>Xcode.SourceCodeLanguage</string>
<key>supportsIndentation</key>
<string>false</string>
<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>
</plist>

View File

@ -0,0 +1,181 @@
// Applesoft BASIC language specs
(
/****************************************************************************/
// MARK: Keywords
/****************************************************************************/
{
Identifier = "xcode.lang.basic.applesoft.identifier";
Syntax = {
CaseSensitive = NO;
StartChars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
Chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
Type = "xcode.syntax.identifier";
};
},
{
Identifier = "xcode.lang.basic.applesoft.keyword";
Syntax = {
CaseSensitive = NO;
StartChars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
Chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$";
Words = (
"NEW",
"CLEAR",
"LIST",
"RUN",
"LOAD",
"SAVE",
"DIM",
"AND",
"OR",
"NOT",
"ABS",
"SGN",
"INT",
"SQR",
"SIN",
"COS",
"TAN",
"ATN",
"EXP",
"LOG",
"RND",
"DEF",
"LEN",
"LEFT$",
"MID$",
"RIGHT$",
"STR$",
"VAL",
"CHR$",
"ASC",
"GOTO",
"ON",
"IF",
"THEN",
"FOR",
"TO",
"STEP",
"NEXT",
"GOSUB",
"RETURN",
"POP",
"ONERR",
"RESUME",
"STOP",
"CONT",
"END",
"PEEK",
"POKE",
"CALL",
"USR",
"HIMEM",
"LOMEM",
"FRE",
"TRACE",
"NOTRACE",
"GR",
"COLOR",
"PLOT",
"HLIN",
"VLIN",
"SCRN",
"HGR",
"HGR2",
"HCOLOR",
"HPLOT",
"DRAW",
"AT",
"XDRAW",
"SCALE",
"ROT",
"IN#",
"INPUT",
"GET",
"READ",
"DATA",
"RESTORE",
"PDL",
"PR#",
"PRINT",
"TEXT",
"HOME",
"HTAB",
"VTAB",
"INVERSE",
"NORMAL",
"FLASH"
);
Type = "xcode.syntax.keyword";
AltType = "xcode.syntax.identifier";
};
},
/****************************************************************************/
// MARK: Simple Syntax Coloring
/****************************************************************************/
{
Identifier = "xcode.lang.basic.applesoft";
Description = "Applesoft BASIC Coloring";
BasedOn = "xcode.lang.simpleColoring";
IncludeInMenu = YES;
Name = "Applesoft BASIC";
Syntax = {
Tokenizer = "xcode.lang.basic.applesoft.lexer";
IncludeRules = (
"xcode.lang.basic.applesoft.codeblock",
);
Type = "xcode.syntax.plain";
};
},
{
Identifier = "xcode.lang.basic.applesoft.lexer";
Syntax = {
IncludeRules = (
"xcode.lang.basic.applesoft.comment.rem",
"xcode.lang.string",
"xcode.lang.character",
"xcode.lang.number",
"xcode.lang.basic.applesoft.keyword",
"xcode.lang.basic.applesoft.identifier",
);
};
},
{
Identifier = "xcode.lang.basic.applesoft.comment.rem";
Syntax = {
Start = "REM";
End = "\n";
IncludeRules = ( "xcode.lang.url", "xcode.lang.url.mail", "xcode.lang.comment.mark" );
Type = "xcode.syntax.comment";
};
},
{
Identifier = "xcode.lang.basic.applesoft.codeblock";
Syntax = {
Tokenizer = "xcode.lang.applesoft.lexer.lexer";
Start = "{";
End = "}";
Recursive = YES;
Foldable = YES;
Type = "xcode.syntax.definition.function";
IncludeRules = (
);
};
},
)

View File

@ -0,0 +1,334 @@
// ca65 Assembler language specs
(
/****************************************************************************/
// MARK: Keywords
/****************************************************************************/
{
Identifier = "xcode.lang.asm.ca65.identifier";
Syntax = {
CaseSensitive = NO;
StartChars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ@";
Chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
Type = "xcode.syntax.identifier";
};
},
{
Identifier = "xcode.lang.asm.ca65.keyword";
Syntax = {
CaseSensitive = NO;
StartChars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_~";
Chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_~";
Words = (
"adc",
"and",
"asl",
"bcc",
"bcs",
"beq",
"bge",
"bit",
"blt",
"bmi",
"bne",
"bpl",
"bra",
"brk",
"brl",
"bvc",
"bvs",
"clc",
"cld",
"cli",
"clv",
"cmp",
"cop",
"cpa",
"cpx",
"cpy",
"dec",
"dex",
"dey",
"eor",
"inc",
"inx",
"iny",
"jmp",
"jsl",
"jsr",
"lda",
"ldx",
"ldy",
"lsr",
"mvn",
"mvp",
"nop",
"ora",
"pea",
"pei",
"per",
"pha",
"phb",
"phd",
"phk",
"php",
"phx",
"phy",
"pla",
"plb",
"pld",
"plp",
"plx",
"ply",
"rep",
"rol",
"ror",
"rti",
"rtl",
"rts",
"sbc",
"sec",
"sed",
"sei",
"sep",
"sta",
"stp",
"stx",
"sty",
"stz",
"tax",
"tay",
"tcd",
"tcs",
"tdc",
"trb",
"tsb",
"tsc",
"tsx",
"txa",
"txs",
"txy",
"tya",
"tyx",
"wai",
"wdm",
"xba",
"xce",
".asize",
".cpu",
".isize",
".paramcount",
".time",
".version",
".addrsize",
".bank",
".bankbyte",
".blank",
".concat",
".const",
".hibyte",
".hiword",
".ident",
".left",
".lobyte",
".loword",
".match",
".max",
".mid",
".min",
".ref",
".referenced",
".right",
".sizeof",
".strat",
".sprintf",
".string",
".strlen",
".tcount",
".xmatch",
".a16",
".a8",
".addr",
".align",
".asciiz",
".assert",
".autoimport",
".bankbytes",
".bss",
".byt",
".byte",
".case",
".charmap",
".code",
".condes",
".constructor",
".data",
".dbyt",
".debuginfo",
".define",
".delmac",
".delmacro",
".def",
".defined",
".definemacro",
".destructor",
".dword",
".else",
".elseif",
".end",
".endenum",
".endif",
".endmac",
".endmacro",
".endproc",
".endrep",
".endrepeat",
".endscope",
".endstruct",
".endunion",
".enum",
".error",
".exitmac",
".exitmacro",
".export",
".exportzp",
".faraddr",
".fatal",
".feature",
".fileopt",
".fopt",
".forceimport",
".global",
".globalzp",
".hibytes",
".i16",
".i8",
".if",
".ifblank",
".ifconst",
".ifdef",
".ifnblank",
".ifndef",
".ifnref",
".ifp02",
".ifp4510",
".ifp816",
".ifpc02",
".ifpsc02",
".ifref",
".import",
".importzp",
".incbin",
".include",
".interruptor",
".ismnem",
".ismnemonic",
".linecont",
".list",
".listbytes",
".lobytes",
".local",
".localchar",
".macpack",
".mac",
".macro",
".org",
".out",
".p02",
".p4510",
".p816",
".pagelen",
".pagelength",
".pc02",
".popcpu",
".popseg",
".proc",
".psc02",
".pushcpu",
".pushseg",
".reloc",
".repeat",
".res",
".rodata",
".scope",
".segment",
".set",
".setcpu",
".smart",
".struct",
".tag",
".undef",
".undefine",
".union",
".warning",
".word",
".zeropage"
);
Type = "xcode.syntax.keyword";
AltType = "xcode.syntax.identifier";
};
},
/****************************************************************************/
// MARK: Simple Syntax Coloring
/****************************************************************************/
{
Identifier = "xcode.lang.asm.ca65";
Description = "ca65 Assembler Coloring";
BasedOn = "xcode.lang.simpleColoring";
IncludeInMenu = YES;
Name = "Assembly (ca65)";
Syntax = {
Tokenizer = "xcode.lang.asm.ca65.lexer";
IncludeRules = (
"xcode.lang.asm.ca65.codeblock",
);
Type = "xcode.syntax.plain";
};
},
{
Identifier = "xcode.lang.asm.ca65.lexer";
Syntax = {
IncludeRules = (
"xcode.lang.asm.ca65.comment.semi",
"xcode.lang.string",
"xcode.lang.character",
"xcode.lang.number",
"xcode.lang.asm.ca65.keyword",
"xcode.lang.asm.ca65.identifier",
);
};
},
{
Identifier = "xcode.lang.asm.ca65.comment.semi";
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.ca65.codeblock";
Syntax = {
Tokenizer = "xcode.lang.asm.ca65.lexer";
Start = ".proc";
End = ".endproc";
Recursive = NO;
Foldable = YES;
Type = "xcode.syntax.definition.function";
IncludeRules = (
);
};
},
)

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,89 @@
#
# 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. Note that if you are generating source files into
# $(GENDIR), you should add $(GENDIR) to SRCDIRS here:
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.
#
# 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

View File

@ -0,0 +1,234 @@
<?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>___PACKAGENAME___.bas</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>___PACKAGENAME___.bas</key>
<dict>
<key>Path</key>
<string>___PACKAGENAME___.bas</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.apple2BasicBuildSystem</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 Basic code project. The project starts with a single Applesoft 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>Binary</string>
<key>SharedSettings</key>
<dict>
<key>PRODUCT_NAME</key>
<string>___PACKAGENAME___</string>
</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>DiskImage</string>
<key>SharedSettings</key>
<dict>
<key>PRODUCT_NAME</key>
<string>___PACKAGENAME___.dsk</string>
</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>$TEMP_ROOT/___PACKAGENAME___.build/$CONFIGURATION/___PACKAGENAME___.build/DerivedSources /usr/local/share/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,6 @@
10 REM ___FILENAME___
20 REM ___PROJECTNAME___
30 REM Created by ___FULLUSERNAME___ on ___DATE___.
40 REM ___COPYRIGHT___
100 PRINT "HELLO, WORLD!"

View File

@ -0,0 +1,110 @@
<?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 = "OBJECT_FILE_DIR=$OBJECT_FILE_DIR"
isEnabled = "YES">
</CommandLineArgument>
<CommandLineArgument
argument = "DERIVED_SOURCES_DIR=$DERIVED_SOURCES_DIR"
isEnabled = "YES">
</CommandLineArgument>
<CommandLineArgument
argument = "TARGET_BUILD_DIR=$TARGET_BUILD_DIR"
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,106 @@
#
# 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. Note that if you are generating source files into
# $(GENDIR), you should add $(GENDIR) to SRCDIRS here:
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.
#
# 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

View File

@ -0,0 +1,248 @@
<?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/merlin-asm</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/merlin-asm</key>
<dict>
<key>Group</key>
<string>make</string>
<key>Path</key>
<string>make/merlin-asm</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>Binary</string>
<key>SharedSettings</key>
<dict>
<key>PRODUCT_NAME</key>
<string>___PACKAGENAME___</string>
</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>DiskImage</string>
<key>SharedSettings</key>
<dict>
<key>PRODUCT_NAME</key>
<string>___PACKAGENAME___.dsk</string>
</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>$TEMP_ROOT/___PACKAGENAME___.build/$CONFIGURATION/___PACKAGENAME___.build/DerivedSources /usr/local/share/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,110 @@
<?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 = "OBJECT_FILE_DIR=$OBJECT_FILE_DIR"
isEnabled = "YES">
</CommandLineArgument>
<CommandLineArgument
argument = "DERIVED_SOURCES_DIR=$DERIVED_SOURCES_DIR"
isEnabled = "YES">
</CommandLineArgument>
<CommandLineArgument
argument = "TARGET_BUILD_DIR=$TARGET_BUILD_DIR"
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,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

@ -7,13 +7,17 @@
<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>
@ -29,6 +33,13 @@
<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>
@ -71,6 +82,13 @@
<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>
@ -78,16 +96,32 @@
<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.apple2AsmBuildSystem</string>
<string>com.halcyontouch.apple2Ca65BuildSystem</string>
<key>Ancestors</key>
<array>
<string>com.apple.dt.unit.externalBuildSystem</string>
@ -95,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>
@ -131,6 +165,70 @@
<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>Binary</string>
<key>SharedSettings</key>
<dict>
<key>PRODUCT_NAME</key>
<string>___PACKAGENAME___</string>
</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>DiskImage</string>
<key>SharedSettings</key>
<dict>
<key>PRODUCT_NAME</key>
<string>___PACKAGENAME___.dsk</string>
</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>$TEMP_ROOT/___PACKAGENAME___.build/$CONFIGURATION/___PACKAGENAME___.build/DerivedSources /usr/local/share/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,110 @@
<?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 = "OBJECT_FILE_DIR=$OBJECT_FILE_DIR"
isEnabled = "YES">
</CommandLineArgument>
<CommandLineArgument
argument = "DERIVED_SOURCES_DIR=$DERIVED_SOURCES_DIR"
isEnabled = "YES">
</CommandLineArgument>
<CommandLineArgument
argument = "TARGET_BUILD_DIR=$TARGET_BUILD_DIR"
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

@ -3,15 +3,18 @@
; ___PROJECTNAME___
;
; Created by ___FULLUSERNAME___ on ___DATE___.
;___COPYRIGHT___
; ___COPYRIGHT___
;
.include "apple2.inc"
COUT = $fded
KEYBOARD = $c000
STROBE = $c010
CR = $8d
.proc main
lda #CR
jsr COUT
main:
ldx #$00
loop:
lda msg, X
@ -22,9 +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

@ -7,13 +7,17 @@
<string>main.c</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>
@ -29,6 +33,13 @@
<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>
@ -71,6 +82,13 @@
<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>
@ -78,16 +96,32 @@
<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.apple2CBuildSystem</string>
<string>com.halcyontouch.apple2Cc65BuildSystem</string>
<key>Ancestors</key>
<array>
<string>com.apple.dt.unit.externalBuildSystem</string>
@ -95,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>
@ -131,6 +165,70 @@
<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>Binary</string>
<key>SharedSettings</key>
<dict>
<key>PRODUCT_NAME</key>
<string>___PACKAGENAME___</string>
</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>DiskImage</string>
<key>SharedSettings</key>
<dict>
<key>PRODUCT_NAME</key>
<string>___PACKAGENAME___.dsk</string>
</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>$TEMP_ROOT/___PACKAGENAME___.build/$CONFIGURATION/___PACKAGENAME___.build/DerivedSources /usr/local/share/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,110 @@
<?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 = "OBJECT_FILE_DIR=$OBJECT_FILE_DIR"
isEnabled = "YES">
</CommandLineArgument>
<CommandLineArgument
argument = "DERIVED_SOURCES_DIR=$DERIVED_SOURCES_DIR"
isEnabled = "YES">
</CommandLineArgument>
<CommandLineArgument
argument = "TARGET_BUILD_DIR=$TARGET_BUILD_DIR"
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.applesoft</string>
</array>
<key>DefaultCompletionName</key>
<string>File</string>
<key>Description</key>
<string>An Applesoft BASIC source file.</string>
<key>Kind</key>
<string>Xcode.IDEKit.TextSubstitutionFileTemplateKind</string>
<key>MainTemplateFile</key>
<string>___FILEBASENAME___.bas</string>
<key>Summary</key>
<string>An Applesoft BASIC source file</string>
</dict>
</plist>

View File

@ -0,0 +1,5 @@
10 REM ___FILENAME___
20 REM ___PROJECTNAME___
30 REM Created by ___FULLUSERNAME___ on ___DATE___.
40 REM ___COPYRIGHT___

View File

@ -3,7 +3,7 @@
// ___PROJECTNAME___
//
// Created by ___FULLUSERNAME___ on ___DATE___.
//___COPYRIGHT___
// ___COPYRIGHT___
//
#include <stdio.h>

View File

@ -3,7 +3,7 @@
// ___PROJECTNAME___
//
// Created by ___FULLUSERNAME___ on ___DATE___.
//___COPYRIGHT___
// ___COPYRIGHT___
//
#include "___FILEBASENAME___.h"

View File

@ -3,12 +3,12 @@
// ___PROJECTNAME___
//
// Created by ___FULLUSERNAME___ on ___DATE___.
//___COPYRIGHT___
// ___COPYRIGHT___
//
#ifndef _____PROJECTNAMEASIDENTIFIER________FILEBASENAMEASIDENTIFIER_____
#define _____PROJECTNAMEASIDENTIFIER________FILEBASENAMEASIDENTIFIER_____
#ifndef _GUARD_PROJECT___PROJECTNAMEASIDENTIFIER____FILE___FILEBASENAMEASIDENTIFIER____
#define _GUARD_PROJECT___PROJECTNAMEASIDENTIFIER____FILE___FILEBASENAMEASIDENTIFIER____
#endif /* defined(_____PROJECTNAMEASIDENTIFIER________FILEBASENAMEASIDENTIFIER_____) */
#endif /* define _GUARD_PROJECT___PROJECTNAMEASIDENTIFIER____FILE___FILEBASENAMEASIDENTIFIER____ */

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

@ -2,15 +2,19 @@
<!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.ca65</string>
</array>
<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

@ -3,5 +3,5 @@
; ___PROJECTNAME___
;
; Created by ___FULLUSERNAME___ on ___DATE___.
;___COPYRIGHT___
; ___COPYRIGHT___
;

View File

@ -2,19 +2,26 @@
TMPDIR=/tmp/pkg.$$
mkdir $TMPDIR
cp -R pkg/Templates $TMPDIR
cp -R pkg/Specifications $TMPDIR
cp -R pkg/Plug-ins $TMPDIR
cp -R make $TMPDIR/'Apple II/Apple II C Project.xctemplate/'
cp Makefile $TMPDIR/'Apple II/Apple II C Project.xctemplate/'
cp main.c $TMPDIR/'Apple II/Apple II C Project.xctemplate/'
cp -R make $TMPDIR/Templates/'Apple II/Apple II cc65 Project.xctemplate/'
sed '/PROJECT_TYPE = cc65/s/^# *//' < Makefile > $TMPDIR/Templates/'Apple II/Apple II cc65 Project.xctemplate'/Makefile
cp main.c $TMPDIR/Templates/'Apple II/Apple II cc65 Project.xctemplate/'
cp -R make $TMPDIR/'Apple II/Apple II Asm Project.xctemplate/'
cp Makefile $TMPDIR/'Apple II/Apple II Asm Project.xctemplate/'
cp -R make $TMPDIR/Templates/'Apple II/Apple II ca65 Project.xctemplate/'
sed '/PROJECT_TYPE = ca65/s/^# *//' < Makefile > $TMPDIR/Templates/'Apple II/Apple II ca65 Project.xctemplate'/Makefile
pkgbuild --root $TMPDIR --version 1.4 --identifier com.halcyontouch.Apple2Template.pkg --install-location /Library/Developer/Xcode/Templates/ --scripts pkg/scripts/ AppleXcodeTemplate.pkg
cp -R make $TMPDIR/Templates/'Apple II/Apple II Basic Project.xctemplate/'
cp -R make $TMPDIR/Templates/'Apple II/Apple II Merlin Project.xctemplate/'
pkgbuild --root $TMPDIR --version 2.7.3 --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
productsign --sign "3rd Party Mac Developer Installer" temp.pkg AppleXcodeTemplate.pkg
rm temp.pkg
rm -rf $TMPDIR

11
pkg/scripts/postinstall Executable file
View File

@ -0,0 +1,11 @@
#!/bin/bash
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"