Skip to content

Instantly share code, notes, and snippets.

@CaptainJiNX
Last active May 20, 2017 19:58
Show Gist options
  • Save CaptainJiNX/f30d5d73256567abd7b7371b01c101fd to your computer and use it in GitHub Desktop.
Save CaptainJiNX/f30d5d73256567abd7b7371b01c101fd to your computer and use it in GitHub Desktop.
Scripts for building C64 stuff with VSCode, KickAssembler (docker version) and Vice 3.1
#!/usr/bin/env bash
set -e
workspaceRoot=$1
relativeFile=$2
baseName=$3
binDir="bin"
buildDir="$workspaceRoot/$binDir"
viceSymbols="$buildDir/$baseName.vs"
breakpoints="$buildDir/breakpoints"
monCommands="$buildDir/$baseName.mon"
dockerRoot="/app"
dockerBuildDir="$dockerRoot/$binDir"
mkdir -p $buildDir
rm -rf $breakpoints
docker run --rm -v $workspaceRoot:$dockerRoot ctjinx/kickassembler:4.12 "$dockerRoot/$relativeFile" \
-log "$dockerBuildDir/$baseName.build.log" \
-o "$dockerBuildDir/$baseName.prg" \
-vicesymbols \
-showmem \
-symbolfiledir $dockerBuildDir \
-afo :afo=true :usebin=true
cat $viceSymbols > $monCommands
if [ -f $breakpoints ]; then
cat $breakpoints >> $monCommands
fi
x64 \
-logfile "$buildDir/$baseName.vice.log" \
+confirmonexit \
-moncommands "$buildDir/$baseName.mon" \
"$buildDir/$baseName.prg"
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "0.1.0",
"tasks": [
{
"taskName": "build",
"command": "./build.sh",
"args": [
"${workspaceRoot}",
"${relativeFile}",
"${fileBasenameNoExtension}"
],
"isBuildCommand": true
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment