Setting a Default Configuration for Multiple Programs

For firmware 1.2.0+ on THEC64 Mini or THEC64

Please read the guidance on using the File Loader (or read CHAPTER 8 of THEC64 User Manual for details regarding Media access on THEC64) before you read the following these additional instructions for enhancements to the use of CJM files.

Your THEC64 device allows you to override the default settings applied to a USB program through either filename flags, or a C64 Joystick Map (CJM) file. Starting with firmware 1.2.0 and above, you can provide default settings for all files within a folder. This is particularly useful if you have multiple files that you wish to apply the same settings for.

Creating a default configuration for a folder

To configure programs within a folder, you create a CJM file in exactly the same way you would if you were configuring an individual program, and place it in the folder with the special filename THEC64-default.cjm

If present, THEC64 device will use this CJM configuration whenever there is no file-specific CJM file for the program being loaded.

An important and useful point to note is that THEC64 device will apply the settings supplied by a thec64-default.cjm file to all programs within the folder in which it is placed, even if the programs are in sub-folders.

How THEC64 device applies settings

THEC64 device will apply settings in the following order:

1. If a CJM file is present for the program being loaded from a USB stick, its settings are applied;
2. Otherwise, if a default CJM file is present in the folder containing the program (or one of its parent folders) then those settings are applied;
3. Otherwise, any filename flags present at the end of the program filename are applied as settings;
4. Otherwise, the built-in default THEC64 device settings are applied to the program.

Structuring your files and folders on the USB stick

The folder level configuration feature works best when your virtual media files (d64, g64, tap, crt, etc.) and folders are arranged in a logical order on the USB memory stick. For example:


The content of the file is the same as you would expect from any other cjm file used by THEC64 device. For example, in the above \pal\j1 folder is thec64-default.cjm:


Every program stored in that folder will run on a PAL C64, and use Joystick port 1 as the primary controller.

If THEC64 device doesn’t find thec64-default.cjm file in the folder, then it comes out of the current folder and looks in the parent folder instead. It continues to behave this way, working its way back up the folder structure until it reaches the root of the USB memory stick.

If it doesn’t find thec64-default.cjm file then it will run the currently selected program file based upon an individually named cjm file, or by filename flags as you would expect. As a last resort it will apply the system default settings, which are joystick 2 as the primary port and either PAL or NTSC (based upon if THEC64 Mini is a European or North American model, respectively OR whatever the Computer model settings are on THEC64).

Note: If you need different settings for each program file (e.g. joystick buttons, vertical shift and so on), then use the standard cjm method, naming the cjm file after the individual C64 program file rather than using this alternative default method.