What are user scripts?
User scripts will be executed similar to bash or console commands. You
can run any assembler and / or emulator in the same way you would do when
calling these tools from the console or a batch file.
You can define several actions that should be executed. Use multiple lines
in your script to define multiple actions.
Adding new scripts
To add a new script, simply change the script name (in the related
text field). Once you changed the script name, the apply-button's text will
change to Add script. Edit the script in the text area below and
add the script by clicking on the button.
If you press the New Script button, all fields will be cleared and you
can enter script name and script lines.
Updating existing scripts
To change or update an existing script, simply select the script from the dropdown list,
but do not change the script name (in the related
text field). Edit the script in the text area below and save the changes by
clicking on the button Update script.
Relaunch64 options
To set a specific behaviour of Relaunch64 when compiling scripts, use a command line starting
with R64, followed by one of these switches:
-
-iw - ignore warnings; assembler warnings will be ignored, i.e. warning
messages will still be logged, however, compile process continue and not being stopped.
-
-wait - wait for script execution to be finished; Same as unchecking the option "Don't
wait when running scripts" in the preferences. Using this switch means that you will first have
to wait for compiling to be done and emulators have to be closed before you can continue editing
in Relaunch64. Overrides the setting in the preferences.
-
-nowait - don't wait for script execution to be finished; Same as the option "Don't
wait when running scripts" in the preferences. Using this switch means that you can continue editing
in Relaunch64, while any emulator with a compiled script is still running. Overrides the setting in the preferences.
Note: See user script examples below.
Placeholders
To specifiy directories or input and output files, there are following
constants that should be used:
- SOURCEFILE - The input file, typically the asm-file (
/path/to/file.asm
).
-
RSOURCEFILE - The input file, typically the asm-file. The relative path is used. Since the
working directory is set to the source file path, only the file name is used, without path information (
file.asm
).
- SOURCEDIR - The parent directory of the input file, i.e. the directory where the source asm-file is located (
/path/to/
).
- SOURCENAME - The input file name, without path and file-extension (alternative to SOURCEFILE) (
file
).
- OUTFILE - The ouput file that will be compiled, typically the prg-file (
/path/to/file.prg
).
-
ROUTFILE - The ouput file that will be compiled, typically the prg-file. The relative path is used. Since the
working directory is set to the source file path, only the file name is used, without path information (
file.prg
).
- OUTNAME - The ouput file that will be compiled, without path and file-extension (alternative to OUTPUT) (
file
).
- START - The start address of the source code. This placeholder can be used for cruncher and packer.
-
UNCOMPFILE - The uncompressed file, used as input file for cruncher or packer. Mostly identical to OUTFILE (
/path/to/file.prg
).
Note: if OUTFILE is relative (i.e. if you use ROUTFILE), the relative filename will automatically be used for UNCOMPFILE (file.prg
).
-
COMPFILE - The compressed output file, used for cruncher or packer (
/path/to/file-compressed.prg
).
Note: if OUTFILE is relative (i.e. if you use ROUTFILE), the relative filename will automatically be used for COMPFILE (file-compressed.prg
).
Note 1: In some cases you may have to add the "open" command to the command line (e.g., on
OS X, starting Vice will throw an access denied error without the open-parameter). See examples below.
Note 2: If you specify full pathes to your assembler or emulator and the path contains whitechars (spaces),
you need to set the path in quotes (see examples below). Placeholders like SOURCEFILE or OUTFILE, however,
will be automatically quoted if necessary. You don't need to quote the placeholders.
Note 3: To make use of the START placeholder, you have to specify the start address in
a comment line with following syntax:
<comment sign> start=<start address>, for instance:
// start=$c000 (for Kick Assembler)
; start=12288 (for other assemblers)
Drag & Drop
You can drag & drop executables from assemblers, crunchers and emulators from the explorer (or file browser) window
onto the script text field. Relaunch64 will then automatically generate a proper scriptline, including recommended
parameter settings (in case the assembler, cruncher or emulator is recognized and supported).
Examples
Using KickAss and Vice on OS X
java -jar /<path to kickass>/KickAss.jar SOURCEFILE
open /Applications/Vice/x64.app OUTFILE
ACME and Vice, when ACME- and VICE-Path are in PATH-Environment
acme -v4 RSOURCEFILE
x64 ROUTFILE
Using ACME, ignore assembler warnings, don't wait for script
R64 -iw -nowait
C:\Users\<username>\Documents\C64\acme.exe --outfile ROUTFILE --format cbm RSOURCEFILE
C:\Users\<username>\Documents\C64\WinVICE-2.4\x64.exe COMPFILE
ACME and Vice, when ACME-Path is in PATH-Environment (Vice is not)
acme --outfile ROUTFILE --format cbm RSOURCEFILE
"C:\Users\<username>\Documents\C64\WinVICE 2.4\x64.exe" ROUTFILE
64tass on OS X
/usr/local/bin/64tass -C -a -i SOURCEFILE -o OUTFILE
open /Applications/Vice64/x64.app OUTFILE
64tass on OS X, ignore assembler warnings
R64 -iw
/usr/local/bin/64tass -C -a -i SOURCEFILE -o OUTFILE
open /Applications/Vice64/x64.app OUTFILE
Using KickAss and Vice on Windows
java -jar C:\Users\<username>\Documents\C64\KickAss\KickAss.jar RSOURCEFILE
C:\Users\<username>\Documents\C64\WinVICE-2.4\x64.exe ROUTFILE
Using ACME, PuCrunch and Vice on OS X
/usr/local/bin/acme --outfile OUTFILE --format cbm SOURCEFILE
/usr/local/bin/pucrunch UNCOMPFILE COMPFILE -xSTART
open /Applications/Vice64/x64.app COMPFILE
Using ACME, Exomizer and Vice, with white space in path
"C:\Users\<username>\Documents\C64\sontige tools\acme 0.9\acme.exe" --outfile ROUTFILE --format cbm RSOURCEFILE
C:\Users\<username>\Documents\C64\Exomizer\exomizer.exe sfx basic UNCOMPFILE -o COMPFILE
C:\Users\<username>\Documents\C64\WinVICE-2.4\x64.exe COMPFILE
Using ACME and VICE on OS X
/usr/local/bin/acme --outfile OUTFILE --format cbm SOURCEFILE
open /Applications/Vice64/x64.app OUTFILE