Installing the Mega 65 Kick Assembler tool chain on a Mac
This is an explanation of how I implemented Shallan50k's tool chain in a Mac environment. This has only been tested on MacOS version 11.5 but I have no reason to believe it won't work on other versions.
Install xemu
Get the latest version of xemu from:
Open the installer and drag the xmega65 icon to the applications folder.
Open the xemu65 application and configure any options required. See mega65.org for detailed instructions on how to set up the emulator
Virtual disk tools
To create and write to virtual floppy disks you will need the c1541 tool which is part of the VICE C64 emulator package.
Download the latest version of vice and install into the applications folder.
Vice can be found here:
https://vice-emu.sourceforge.io
Setting up Kick
To code for the Mega 65 you will need the current version of Jesper’s Kick Assembler for which supports 45gs02 (Thanks Jesper!)
The files can be found here:
https://gitlab.com/jespergravgaard/kickassembler65ce02/-/blob/master/release/KickAss65CE02-5.21.jar
Download the Jar file and copy to: /Applications/KickAssembler and rename it to KickAss.jar
*you don’t have to use this location but I like to keep all my Apps in the Application folder. If you chose to put it elsewhere then ensure you make changes to reflect this path later on
Creating a make file
In the same folder as the main.s file (or whatever the core source file is called) create a file, the filename is not relevant but convention says use make.sh
Copy the following into the make file:
echo Assembling Code
java -cp /Applications/KickAssembler/kickass.jar kickass.KickAssembler65CE02 main.s -odir ./bin -vicesymbols -showmem
echo making Disk
/Applications/VICE/x64sc.app/Contents/MacOS/c1541 -format "disk,0" d81 "./bin/disk.d81"
echo copying program to disk
/Applications/VICE/x64sc.app/Contents/MacOS/c1541 -attach "./bin/disk.d81" 8 -write "./bin/main.prg" main
echo launch xemu
/Applications/xmega65.app/Contents/MacOS/xmega65 -besure -prg "./bin/main.prg" &
And save the file.
From a command shell change directory to the source code folder where the make file is located and type:
chmod +x make.sh
This will allow the make file executable.
Setting up sublime
From the Sublime Text menu select preferences, then browse packages. This opens a finder window, copy the syntax file from https://github.com/smnjameson/M65_KickAsm_Macros into this folder.
From the View->Syntax menu select KickAssember (Mega65) option.
All 45gs02 code will now be highlighted correctly, to test this create a test.s file and enter a command such as ldz #$50 and ldy #$50 they should be both highlighted the same.
Go to Tools->Build System->New build system…
Replace the default text with
{
"shell_cmd": "./make.sh"
}
Then save it as mega65.sublime.build
From Tools->Build System now tick the mega65 build option.
Apple-key b will now build and run the project.
Finally and big shout out Shallan50k and Jesper for all the work they put in to get the mega 65 development environment working. All I did as put a few Apple twists to get it working on Mac.