File Loader

File Loader for firmware v1.1.0 (USB file upgrade) and above.

Using the File Loader function and a FAT32 formatted USB memory stick, THEC64 Mini loads programs from various C64 file formats. Supported file formats include:

Disk images: D64, G64, D81, D82
Tape image file:T64, TAP
Others: PRG, P00 and CRT

To make file browsing and selection less arduous, the File Loader currently has a display limit of 256 files and/or folders per-folder, including the root of the memory stick. This equates to 18 pages of listed items to navigate through with your joystick.

Please note that only C64 programs supplied by Retro Games Ltd for use on THEC64 Mini are covered by the Warranty. This does not affect your statutory rights. Please read the Warranty for further details.

Control how THEC64 Mini configures a program loaded from a USB memory stick in two ways:

Either method gives THEC64 Mini information used to load and run a program correctly from USB. Note that some programs will load and run correctly just using the default settings, explained below.

Default settings

In the absence of flags in filenames or CJM text configuration files, THEC64 Mini applies default settings to any supported file it finds on a USB memory stick:

Many programs load and run fine using the default settings. If your program does not, or you wish to change the configuration, please refer to Appendix A.

The File Loader

Whilst on the HOME screen, insert a USB memory stick that contains supported C64 files into an available USB port on THEC64 Mini. After a few seconds, an icon appears beneath the GAMES CAROUSEL to confirm the USB memory stick is connected.

Highlight the USB icon and press FIRE. The FILE LOADER screen lists any supported files and folders stored in the root of the USB memory stick.

Note that file extensions (for example, D64, TAP, CRT), flags added to filenames (for example _TP) and CJM files (for example, c64-disk.cjm) are NOT shown in the list.

Highlight a file and press FIRE. The selected file loads and runs. How long it takes to load will vary based upon the type of file and the settings used by THEC64 Mini to load it.

Move the highlight over a folder and press FIRE. The contents of the sub-folder appear. You cannot enter a folder that is empty or does not contain any other folders or supported C64 files.

When inside a folder on the USB memory stick, press button A on the joystick to move out of the current folder. Alternatively, push LEFT to come out of a folder when on the far left side of the File Loader list.

The C64 Fast Loader is switched on by default, speeding up loading times. For those programs that do not load if the fast loader is ON, press button C on the joystick (a red X appears over the Fast Loader icon) before you press FIRE to load. This turns the fast loader OFF.

Note that the faster disk access function remains ON unless you specifically turn it OFF via filename flags or a CJM file. See Appendix A for full details.

Save/Load from USB

When loading a program file from a USB memory stick, the Save/Load function (see CHAPTER 5 of the User Guide) saves and loads on the USB memory stick rather than on THEC64 Mini. You have four slots to save to per program.

Save files are stored inside a folder on the USB memory stick called .THEC64SAVE. Inside that folder are sub-folders that contain your saves.

For example, .THEC64SAVES\c64-disk\ contains saved files for a C64 disk image file called ‘c64-disk’.

BASIC and accessing a USB memory stick

Please note that the only file stored on a USB stick that can be loaded directly when running BASIC on THEC64 Mini is a disk image with the filename THEC64-drive8.d64. Please visit programming-in-c64-basic and faq for further details on BASIC and THEC64-drive8.d64 file.

APPENDIX A – CONFIGURING C64 PROGRAMS

Add flags to each filename

By adding flags to the end of the filename, you define which joystick port(s) are used, specify the machine type (PAL or NTSC), set a disk to be read-only, turn on accurate disk loading (for troublesome disk image files that won’t load quickly), and disable the on-screen disk icon.

For example, the program on a disk image file called ‘c64-disk.d64’ requires a joystick connected to port 1 on the original C64 computer. Rename your d64 file ‘c64-disk_J1.d64’.

Below is a list of all the available flags:

J1 This sets the primary joystick port as port 1. With a second Joystick connected, it automatically uses port 2
J2 This sets the primary joystick port as port 2. With a second Joystick connected, it automatically uses port 1. Note that port 2 is the default set by THEC64 Mini, so it doesn’t *have* to be specified by this flag
AD This flag turns ‘accurate disk drive’ mode on (for original slower disk loading) and turns off the fastdisk mode which is ON by default
RO This makes the disk appear as read-only (which prevents THEC64 Mini writing to the disk image)
NI This flag disables the drive icon from appearing on-screen during disk loading
TN This runs as an NTSC C64. It doesn’t affect the HDMI output
TP This runs as a PAL C64. It doesn’t affect the HDMI output

Add flags to the end of the filename in any order. For example:

c64-disk_TNROJ1.d64 or
c64-disk_ROJ1TN.d64 or
c64-disk_J1TNRO.d64

Create a CJM file for each program file

Using a computer that can create new files, create a text file on the USB memory stick that includes joystick port requirements, machine type (PAL or NTSC) settings, accurate disk loading options, additional joystick button mappings and other settings for each program file.

You can use the standard text editors that come with Windows, Linux and Mac OS to create CJM files. Ensure that your file does end with a .cjm file extension, otherwise it will not be recognised by THEC64 Mini. For those who are interested, the files needs to be UTF-8 or ASCII encoded and must not contain any non-standard characters.

Save the CJM text file in the same folder as the program file on your USB stick. For example, ‘c64-disk.d64’ has a corresponding file ‘c64-disk.cjm’.

THEC64 Mini always uses a CJM file in preference to any filename flags or default settings.

An example CJM file looks like this:


X:pal,accuratedisk,driveicon
J:2*:JU,JD,JL,JR,JF,JF,SP,1,SP,2,3,4,JF
J:1:JU,JD,JL,JR,JF,JF,JF,JF,JF,,,,JF
V:12

As you can see from the example given, each line in a CJM text file complies with the following:

type: value [,value]

Entity name Entity type Values Description
Computer configuration X pal
ntsc
driveicon
readonly
accuratedisk
This sets the parameters needed to configure the C64 computer before it loads and runs the program.

The values are case sensitive and must be in lower case.

pal – This makes the program behave as though running on a European (PAL) C64. It doesn’t affect the HDMI output of THEC64 Mini.

ntsc – This makes the program behave as though running on a North American (NTSC) C64. It doesn’t affect the HDMI output of THEC64 Mini.

driveicon – This activates the on-screen drive icon, to show when a disk is accessed.

readonly – This makes a disk read-only, meaning THEC64 Mini cannot write back to the disk.

accuratedisk – This switches ON accurate (slower) disk drive functionality, necessary for some programs to load correctly. This is off by default.

Vertical display shift V -16 to +16 This number moves the screen position up or down over a range of + or – 16 display lines (pal). This is useful if a game has graphics that appear in the top or bottom border, as an HDMI 720p television screen can otherwise clip them. For ntsc programs, going above +7 or +8 could exhibit display problems at the bottom of the screen.
Joystick configuration J See following table for allowed values

Note that the entity type is always a capital letter rather than lower case, e.g. an X rather than an x, otherwise THEC64 Mini will ignore the entity type and the values associated with it in the CJM file.

Joystick configuration consists of 13 values that define how the joystick is to operate in the program.

The first value (after the J: entity) defines the primary port (1 or 2, with primary indicated by an *), followed by what happens when the joystick is pushed UP, DOWN, LEFT or RIGHT. The next two values define what happens when the LEFT FIRE and RIGHT FIRE buttons are pressed. The next two values define what happens when the TL and TR triangle buttons are pressed. The next value is an extra joystick button (not available on THEC64 Mini Joystick) but it usually assigned the same value as the TR button. The next three values are buttons A, B and C on THEC64 Joystick. The final value is another button not available on THEC64 Joystick, but is usually assigned the same value as the TL button. For example:

In the shown example, the joystick is behaving as if connected to port 2 on the original C64 computer. Moving up, down, left and right using the stick is as you would expect. Both FIRE buttons perform the same joystick fire (JF) function. Pressing TL on the joystick is the same as pressing the Spacebar (SP). Pressing TR is the same as pressing the 1 key, and buttons A, B and C do the same job as pressing keys 2, 3 and 4 respectively.

Joystick parameters are the port assignments first, then the joystick standard functions, then the button mapping:

Joystick to key map ID Description
JU JD JL JR JF Joystick directions Up, Down, Left, Right and Fire
F1 F2 F3 F4 F5 F6 F7 F8 C64 function keys F1 to F8
AL Arrow Left
AU Arrow Up
CM C64 key
CO Comma
CT Control
CU Cursor Up
CD Cursor Down
CL Cursor Left
CR Cursor Right
DL Delete
EN Return
HM Home
RS RUN/STOP
RE RESTORE
SL SHIFT Left
SR SHIFT Right
SS SHIFT Lock
SP Spacebar
PO Pound (£)

Assigning letters and numbers to joystick buttons is easy. For example, to assign pressing key A to a Joystick button, just enter A in the CJM data for the relevant button.

Considerations

In all of the games provided with THEC64 Mini, the LEFT and RIGHT joystick FIRE buttons have the same function (JF) so both left and right-handed players can use either button as FIRE. However, the LEFT and RIGHT joystick FIRE buttons are independent, so you can assign one FIRE button to JF and the other to a different function if you wish in your CJM files.

In addition, for consistency all of the games on the GAMES CAROUSEL start by pressing TL or by pressing a FIRE button. If you wish to retain this logic, keep in mind how your program starts once it has finished loading when you assign joystick buttons in the CJM file. If FIRE does not start the program, then assign the appropriate key press to the TL button.