#!/bin/bash

export PATH=$PATH:/opt/amiga/bin

vasmm68k_mot -quiet -phxass -Fhunk -m68020 -o PREFSFILE.uncut prefsfile.a -I/opt/amiga/m68k-amigaos/ndk-include -I/opt/amiga/m68k-amigaos/include -I/mnt/d/FloppyDriveSpeaker/ahi/Include/Asm

# remove 0x28 bytes from the start
dd bs=1 skip=40 if=PREFSFILE.uncut of=FLOPPYAUDIO

m68k-amigaos-gcc floppyaudio.c asmfuncs.s -O3 -o floppyaudio.audio -Wall -Wextra -Wno-unused-parameter -nostartfiles -m68020 -ldebug -I/mnt/c/Users/djrob/.vscode/extensions/prb28.amiga-assembly-1.8.13/resources/bin/win32/targets/m68k-amigaos/include -I/mnt/d/FloppyDriveSpeaker/ahi/Include/C