Upgrade THEC64

Firmware upgrades for THEC64 provide new features and/or correct any technical issues. We always recommend that you upgrade to the latest version of the firmware.

Ensure that your USB memory stick is formatted using FAT32 (with MBR), else your upgrade file will not be detected. See the FAQ for further details.

Visit here for the firmware upgrade details page for THEC64 Mini.


Version 1.3.2 – Changes

Previous changes included in version 1.3.2


How to Upgrade THEC64

    1. In Classic mode, press MENU, select Options > Device settings > System information
    2. In Carousel mode, select Device settings (spanner icon) > System information
    3. Look for the Build version (e.g. theC64-1.3.0-amora)
    4. Check that the latest version linked to above is greater than the version installed on your device
    5. Download and save the file (e.g. theC64-1_4_0.bin) to your USB memory stick. Don’t place the file inside a folder on the stick or rename the file. If you do, THEC64 won’t find the upgrade
    6. Insert the USB memory stick into an unoccupied USB port on THEC64
    7. Press MENU and choose Device settings> System information from the menu
    8. The upgrade file is detected and you are asked to Close or Apply
    9. If you choose not to upgrade at this time, select Close and press FIRE, or just press the MENU button on the joystick If you Apply the upgrade, the following screen will appear showing the upgrade process:

After a successful upgrade, THEC64 will restart automatically.

You can check the firmware version afterwards by following point (1) above.

Note that you cannot install a firmware earlier than the build version currently installed.

Manuals

Download the Quick Guide or the main User Manual for the full-size THEC64 from this page.

Please only print these documents if you have to and if you do, please consider printing on paper that can be recycled. Thank you.

We recommend you ensure that your THEC64 is always running the latest up-to-date firmware.

THEC64 – Quick Guide

This is the Quick Guide, which is included in THEC64 box. This manual is intended to get THEC64 up and running. For full instructions, download THEC64 User Manual (below).

THEC64 – User Manual

This is the User Manual for THEC64, with full details on how to use all of the functionality, including VIC 20 mode and Media access.

For Warranty information, please visit the warranty page.

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:

X:64,pal
J:1*:JU,JD,JL,JR,JF,JF,1,2,JF,A,B,C,JF,3,4
J:2:JU,JD,JL,JR,JF,JF,1,2,JF,A,B,C,JF,3,4

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.

Virtual Joystick

For THEC64 Mini firmware v1.2.0 and above

Connecting a USB keyboard (that includes a numeric keypad and function keys up to at least F11) to THEC64 Mini gives access to a Virtual Joystick as well as all the benefits of a real keyboard.

Use the Virtual Joystick to navigate menus, select options and play games without needing a USB Joystick, or use the Virtual Joystick as a second controller if you only have one USB joystick attached.

You can choose between two Virtual Joystick layouts. Both layouts use the numeric keypad and the function keys F9, F10 and F11.

The current layout depends on whether your keyboard’s ‘Num Lock’ key is in the ON or OFF state. By default, the ‘Num Lock’ is OFF when you connect a USB keyboard to THEC64 Mini. Press the ‘Num Lock’ key to change from OFF to ON or vice versa. Some USB keyboards include a ‘Num Lock’ LED to show its current state.

Num Lock OFF (default)

Num Lock ON

Diagonals are achieved by pressing UP+RIGHT,
UP+LEFT, DOWN+LEFT or DOWN+RIGHT together

Note that the ‘Num Lock’ ON layout gives you more choice. You can mix and match the LEFT, RIGHT, UP and DOWN keys if you want to. For example, using 6, 3, 8 and 9 instead of 1, 2, 6 and 3.

Regardless of which layout you use, you have a choice of which keys to use as Left and Right FIRE, as you can see from the diagram above. The . key (the , key on a German USB keyboard) always acts as the Joystick’s MENU button, giving access to the usual Save/load game, Virtual keyboard and Exit game options. The TL and TR buttons are / and * respectively.

 

Keys F9, F10 and F11 perform the same functions as THEC64 Joystick buttons A, B and C.

Allocating Controllers

When you run a C64 program from the GAMES CAROUSEL or via the File Loader, THEC64 Mini will always allocate the primary controller to the joystick that selected the program, whether that is a USB joystick or the Virtual Joystick.

If there is an unallocated USB joystick attached, then THEC64 Mini chooses that as the secondary controller (if one is required). If not, then it will allocate the Virtual Joystick as the secondary controller, assuming that a suitable USB keyboard is attached and assuming that the Virtual Joystick has not already been allocated as the primary controller.

THEC64 Mini can only allocate one Virtual Joystick, even if you were to connect two USB keyboards.

Firmware Upgrade 1.3.1. and above

New keys are added to the Virtual Joystick when in THEC64 Mini menus and screens:

U = Joystick UP
J= Joystick DOWN
N = Joystick DOWN
H = Joystick LEFT
O = Joystick LEFT
K = Joystick RIGHT
P = Joystick RIGHT
SPACE = Press Joystick Left FIRE button
G = Press Joystick Left FIRE button
RETURN = Press Joystick Right FIRE button
L = Press Joystick Right FIRE button
Y = Press Joystick button TL
X = Press Joystick button TR
A = Press Joystick button A
B = Press Joystick button B
C = Press Joystick button C
Left Shift + ~ (top-left corner of keyboard) = Press Joystick MENU button (at any time)
M = Press Joystick MENU button (only when already in THEC64 menus)

Social Media

Find us on Social Media by selecting one of the links shown below.

Facebook

Twitter

YouTube

Keyboards

This information is for people who connect a USB keyboard to THEC64 Mini.

Links

A number of useful C64-related web sites are listed below as web links. Start becoming creative using THEC64 Mini!

Disclaimer

Although we do periodically check that the web sites listed below are legal, honest, decent and truthful, Retro Games Ltd cannot take responsibility for any pages maintained by third parties that are linked to from here.

Any views expressed by the content providers on the third party web sites listed above are not necessarily those of Retro Games Ltd.

CBM .prg Studio

CBM prg Studio is a Windows Integrated Development Environment (IDE) which allows you to type a BASIC or machine code program and convert it to a ‘.prg’ file (as used by THEC64 Mini, an original C64 and a number of other programs). It also includes character, sprite and screen editors and a fully featured 6510/65816 debugger…

C64 Bites

The easiest way to start programming Commodore 64. Life is too short to read twenty-year-old books. Learn BASIC and 6502 Assembly with bite-sized video tutorials today!

Retro Game Development – C64 Edition

RetroGameDev has been created to produce books, tutorials, and support for the retro game development community.

Fan Facebook group

Growing fan group for THEC64 Mini console.

THEC64 Community

Join the new fan-run forum for THEC64 Mini.

Programming Guide for Video Gamers (Thanks for the suggestion, Dylan!)

Learn about traditional games development, learn to program and discover how to get a career in games.

Manuals

Download the latest Quick Guide or full User Guide manuals for THEC64 Mini here.

Please be aware that functionality added via firmware upgrades are not included in either the Quick or User Guides. New functionality is explained via THEC64 Mini’s additional Support section of this web site.

Please only print these documents if you have to and if you do, please consider printing on paper that can be recycled. Thank you.

THEC64 Mini – Quick Guide

THEC64 Mini – User Guide

For Warranty information, please visit the warranty page.

Upgrade THEC64 Mini Firmware

Firmware upgrades for THEC64 Mini provide new features and/or correct any technical issues. We always recommend that you upgrade to the latest version of the firmware.

Ensure that your USB memory stick is formatted using FAT32 (with MBR), else your upgrade file will not be detected. See the FAQ for further details.

Visit here for the firmware upgrade details page for THEC64.


Version 1.3.2 – Changes

Previous changes included in version 1.3.2


How to Upgrade

    1. Check the current firmware version on THEC64 Mini by selecting the SYSTEM icon from the OPTIONS on the HOME screen, and then choose System information from the menu. Look for the Build version (e.g. theC64-1.2.0-argent)
    2. Check that the latest version linked to above is greater than the version installed on your Mini
    3. Download and save the file (e.g. theC64-1_4_0.bin) to your USB memory stick. Don’t place the file inside a folder on the stick or rename the file. If you do, THEC64 Mini won’t find the upgrade
    4. Insert the USB memory stick into an unoccupied USB port on THEC64 Mini
    5. Select the SYSTEM icon from the OPTIONS on the HOME screen on the Mini, and choose System Information
    6. The upgrade file is detected and you are asked to Close or Apply
    7. If you choose not to upgrade at this time, select Close and press FIRE, or just press the MENU button on the joystick If you Apply the upgrade, the following screen will appear showing the upgrade process:

After a successful upgrade, your Mini will shut down and restart automatically.

You can check the firmware version afterwards by following point (1) above.

Note that you cannot install a firmware earlier than the build version currently installed.

Frequently Asked Questions

The most frequently asked questions about THEC64 Mini and THEC64 are answered here.


# Why isn’t <insert the name of your favourite C64 game here> included?

A huge amount of time has been spent officially licensing the included games from their respective IP owners. Sadly, some IP rights prove to be prohibitively expensive to license and others are untraceable or too complex to untangle. We believe there is a good mix of game genres in the supplied titles, and all of them were highly rated upon original publication. There’s something for everyone!


# Can I attach <insert your favourite C64 peripheral here> to THEC64 or THEC64 Mini?

THEC64 range uses modern USB ports for attaching keyboard, controllers and memory sticks. That unfortunately rules out connecting with any of the original C64 peripherals like cassette decks, disk drives, printers, cartridges and so on.


# Are there any two-player games included?

Yes. A number of the supplied games can be two-player. Some require two joysticks for a two-player game, whilst others can be played between two players using just one joystick and taking alternate goes. The remaining supplied games are for one player. See games for details of each game.


# Can I buy a second joystick?

Yes. THEC64 Joystick can be purchased separately. Please check with any retailer that stocks THEC64 Mini.


# Does THEC64 Joystick use micro switches?

The original THEC64 Joystick uses tactile switches. However, a new version of the joystick that uses micro switches is supplied with THEC64 and is available to purchase separately.


# Is the keyboard on THEC64 Mini functional?

No, it isn’t.  It was decided to include an on-screen virtual keyboard, and allow full USB keyboards to connect instead to keep the size small. The full-size THEC64 includes a fully functional integral keyboard as part of the package.


# Can I add my own keyboard?

Yes. Connect a USB keyboard to THEC64 Mini whilst on the HOME screen. Specify your keyboard layout from a selection including UK, US, French, German, Spanish and Italian. Other layouts maybe added to THEC64 Mini in future, via a firmware upgrade. Please see the section on Keyboards for more information.


# Can THEC64 and THEC64 Mini be upgraded?

There are no user-serviceable parts inside THEC64 or THEC64 Mini, but the firmware can be upgraded via the appropriate upgrade page. New features, changes in software and other improvements can be delivered using the ‘System Information’ option on THEC64 Mini and a downloaded firmware update file saved onto a FAT32 formatted USB memory stick. When formatting, please ensure that your stick is formatted with MBR rather than GPT, otherwise the stick won’t be recognised by THEC64 or THEC64 Mini.


# Can I load other programs onto THEC64 and THEC64 Mini?

There are a few ways to load other programs. They all involve compatible files stored on a USB memory stick. Please see Loading Programs in C64 BASIC for further details on loading from within BASIC on THEC64 Mini, see File Loader for details on auto-loading directly from a USB memory stick on the HOME screen on THEC64 (in Carousel mode) and THEC64 Mini. Lastly, Media access on THEC64 in Classic mode can also load files from USB whilst in BASIC.


# Can a USB hub be used on THEC64 or THEC64 Mini?

It’s impossible to guarantee that they will all work, but in general you should be able to connect a USB hub and use it on THEC64 or THEC64 Mini. We only recommend powered hubs (that use a separate power supply).


# THEC64 Mini is behaving oddly!

If you have problems with sound, games quitting back to the HOME screen unexpectedly, freezing (press and hold the power button for approximately six seconds to reboot), this could be a power issue. Out-of-the-box THEC64 Mini requires a 5v/1A supply. Add in additional USB devices (e.g. hubs, second joysticks, memory sticks) and the power requirements could increase. If THEC64 Mini needs more power than it receives, then any or all of these symptoms could happen. If possible, use a powered USB hub rather than one that takes power via THEC64 Mini. Also see Troubleshooting for further details.


# Why am I seeing a delay between my joystick actions and the screen?

A number of HD TVs apply image processing to the image output from THEC64 or THEC64 Mini before displaying it on the screen. This introduces a slight delay, which makes it look like games are slow to respond to your movements or button presses. There is nothing wrong with THEC64 device, the joystick or the TV. However, to reduce or eradicate this problem requires you to change image processing options on your TV, or engage ‘Game Mode’ on the TV. Please refer to the manual for your TV for further information.


# Can I use my own USB controller as well as – or instead of – THEC64 Joystick?

Yes, you can. We can’t guarantee they all work but other USB controllers can be connected.

THEC64 and THEC64 Mini expects a controller to have a minimum of eight buttons. When you connect a controller, THEC64 Mini will attempt to automatically configure the controller, assigning the left FIRE, right FIRE, TL, TR, A, B, C and MENU buttons for you.

Typical USB gamepad shoulder buttons are usually assigned as left FIRE and right FIRE by THEC64 Mini. The SELECT button is typically assigned as button C, and START becomes the MENU button, giving access to all of the expected menu options that THEC64 Mini needs. Most controllers will have their X and Y buttons as THEC64 Mini’s TL and TR buttons, leaving their A and B buttons to be A and B.

Having connected a USB controller to THEC64 Mini, it should only take a second or two for THEC64 Mini to register the controller. You can then use the controller to navigate the GAMES CAROUSEL and the OPTIONS windows on the HOME SCREEN and play games. When there are two control devices attached, either one can be used to navigate the screens and menus on offer and select and play games.

To further test an alternative USB controller, launch a game and check each button’s functionality against the online instructions for the game found at games.


# Can I change how THEC64 and THEC64 Mini displays on my TV or monitor?

There are six different display modes available to try. Pixel perfect, European 4:3 and North American 4:3. Each mode can then have a CRT filter applied, to match how the C64 games displayed on older TVs. You don’t have to adjust any settings on your HD TV or Monitor when switching between these display modes.


# Why am I seeing odd things at the bottom of the screen when I assign certain display values to the V: entity in my CJM files?

This will happen if the C64 program is running on an NTSC C64 and you have a V: entity value higher than 7 or 8 (depending on your TV or Monitor). An NTSC C64 has less room above and below the main C64 display than a PAL C64, so the display can only be shifted up part-way before you begin to see a part of the C64 display that you were never meant to view. To avoid this, don’t go above 7 or 8 when assigning a vertical shift value for any NTSC C64 programs loaded from USB. See File Loader for further details about CJM files and the V: entity.


# Can I program on THEC64 or THEC64 Mini?

You have access to BASIC via the Games Carousel (or via Classic mode on THEC64) specifically to allow programming. Attach a USB keyboard to enhance the experience on THEC64 Mini. Add a USB memory stick and you can also save and load your programs as well. See Programming in C64 BASIC for more information.


# Why am I seeing a READONLY disk in BASIC when I have a USB memory stick connected?

Your USB memory stick isn’t detected. There are a few possible explanations. The USB memory stick wasn’t inserted before BASIC was launched from the GAMES CAROUSEL. Another explanation is that the memory stick isn’t formatted to FAT32. A third possibility is that the memory stick is faulty. Memory sticks up to 64Gb have been tested and confirmed as working on THEC64 Mini, but it’s not possible to test every single brand and size available. Please try a different memory stick. If you are using a USB hub, try accessing the memory stick by directly connecting it to THEC64 Mini, rather than using a hub. See Programming in C64 BASIC for more information on programming in BASIC.


# Why isn’t my THEC64-drive8.d64 file detected by BASIC on THEC64 Mini?

Apart from the USB memory stick issues mentioned elsewhere in this FAQ, it could be because your file is incorrectly named, especially if you named the file on a Windows-based PC and don’t have the file extensions shown. This could result in your file actually being named THEC64-drive8.d64.d64 (for example). Double-check that the name is correct by showing file extensions in Windows, so you can see the exact full name of the file before you try running it on THEC64 Mini.


# Do you use any Open Source code in THEC64 Mini?

Yes, some. You may obtain the corresponding Open Source code from us for a period of three years after our last shipment of this product, by sending a money order or cheque for 5 GBP to: GPL Compliance Division, Retro Games Ltd. West Wing Studios, Unit 166, The Mall, Luton, England. LU1 2TL.

Please write “source for <firmware version number>” in the memo line of your payment.


# I need help playing one of the games supplied on THEC64 or THEC64 Mini!

Have you read the instructions available via the games menu link on this web site? There are plenty of web sites that give hints and tips for playing the games included on THEC64 and THEC64 Mini. YouTube is also a very good source for tutorials and solutions.


# The joysticks have changed over when in a two player, two joystick game!

You just need to be aware that some of the included games switch the joysticks, so what would be player one’s joystick becomes player two’s joystick in a two player, two joystick game and vice versa. Just swap over your controllers without unplugging them.


# Why have some of the games been altered?

A small number of games have been slightly amended to improve your game playing experience when using THEC64 and THEC64 Mini. Any changes have been kept to an absolute minimum and have only been made when absolutely necessary. We have endeavoured to keep THEC64 range as authentic as possible.


# I can’t overwrite an existing file when saving in BASIC to my USB memory stick!

To save over an existing file with the same filename, add @0: to the front, like this: SAVE “@0:RGL”,8 (replace RGL with your chosen filename). Please be aware that C64 BASIC won’t give any warnings that you are over-writing the file when you do this.


# I think I have found a problem on THEC64or THEC64 Mini. How do I report it?

We always welcome feedback. To report a potential problem, please go to the Contact page and complete the online form. We will do our best to respond as quickly as possible.

Programming in C64 BASIC

Learn how to program using C64 BASIC, available on THEC64 Mini and THEC64.

The GAMES CAROUSEL on THEC64 Mini gives you access to the BASIC programming language. On the full-size THEC64, boot or switch to Classic mode to access BASIC.

If you want to follow through the BASIC examples, we strongly recommend connecting a USB keyboard to THEC64 Mini, rather than trying to use the Virtual Keyboard. Please read CHAPTER 6: KEYBOARDS In the User Guide PDF for THEC64 Mini before starting this introduction to BASIC.

Use the provided keyboard if accessing BASIC from Classic mode on the full-size THEC64.

If a compatible USB memory stick (formatted to FAT32) is attached to the full-size THEC64 or to THEC64 Mini, then you can save your BASIC code to the memory stick. For the USB stick to be detected on THEC64 Mini, attach it before BASIC is launched. Also see Saving and Loading below for further information.

Without a USB stick, you save to one of the four available save slots for BASIC on THEC64 Mini or THEC64 itself.


WHAT IS BASIC?

When you power-on a C64 computer, the first thing you see is BASIC. We provide access to BASIC for those who wish to experience programming using version 2 of the C64 variant of the Beginners All-purpose Symbolic Instruction Code.

BASIC is a high-level programming language, designed to be easy to use. It is an interpreted language, meaning any BASIC instructions you type have to be translated by the computer before it can run them. This actually happens quite quickly and is done invisibly and automatically by the computer.

Computers like natively ‘talk’ in machine code, which is a series of zeros (0) and ones (1). When they use machine code, they operate very fast. However, people don’t directly program in machine code, so we use a different way to send instructions to the computer, using programming languages that are closer to what we are used to.

Some programming languages are a few steps closer to machine code, and so they are interpreted (or translated if you prefer) quicker than those that aren’t.

BASIC has always been an excellent introduction to programming for complete beginners even though it is quite a few steps away from machine code.

Learning to program using C64 BASIC helps you think programatically, and it also teaches you how to type on a keyboard. Both of these skills are important to learn.


BASIC KEYWORDS

C64 BASIC has a series of keywords that tell the computer what to do next. Learn those and you will be writing BASIC code in no time at all. There are 71 BASIC keywords to discover.

If you think 71 sounds a lot, don’t worry. You don’t have to learn them all at once. Many of them are related to doing mathematical calculations, and only come into play when you start doing more complex coding. More on keywords later!


LAUNCHING C64 BASIC

When you first launch BASIC on a C64, you see a blue screen. It begins by revealing how much computer memory is available for programming. Underneath that information is a READY prompt and underneath that is a steadily blinking square cursor.

Staring at the cursor won’t get you very far. It’s ready and waiting for you to enter your first BASIC commands.

There are two ways of entering BASIC code. You can type it in and press RETURN. The computer will immediately try and run your code. However, to repeat the same code later on, you have to type it in again. That’s not so good. The second method is a lot more efficient. You place numbers at the start of each line of your code that tells the computer in which order to run them. The great thing is that using line numbers also means it won’t run your code until you type the RUN keyword *and* it means you don’t have to type it all in again (as long as you don’t turn off the computer).


YOUR FIRST BASIC PROGRAM

Below is an example BASIC program. We will look at each line of code in turn before doing this for real.

There are three separate lines of BASIC code to explain.
10 PRINT “RETRO GAMES LIMITED”
20 PRINT “HELLO WORLD!”
30 GOTO 10

Line 10 uses the keyword PRINT which sends whatever appears between the quotation marks “” to the computer screen (and not to a printer as you might expect!).

Line 20 does the same as line 10 but will send different words to the screen.

Line 30 instructs the computer to go to line 10, which places the computer in a loop of running line 10, then line 20, then line 30 telling it to go back to line 10 again and so on.

The line numbers are in units of ten just in case we want to insert extra lines of code, e.g. a line 15 that comes between line 10 and line 20. If you type a line of code that begins with the same line number as an existing line, the new line will replace the old one as soon as you press RETURN, without any warnings. If you type just the line number and nothing else then press RETURN, you delete that line number.

Now type each line exactly as you see it (above). Press RETURN at the end of each numbered line to commit that line to the computer’s memory and to move down a line, before starting to type the next one.

Press RETURN at the end of line 30.

If you make a mistake, use the Backspace key on your USB keyboard (or press the C button on the joystick when using the Virtual keyboard). Each press will erase the character immediately to the left of the cursor’s position on the screen.

If you’re happy that you’ve typed everything in correctly, type the RUN keyword (without a line number). Your code will then run!

If you’re wondering how to stop your new BASIC code from running forever, try pressing ESC (on a USB keyboard attached to THEC64 Mini) or RUN/STOP (if using the virtual keyboard or the full-size THEC64 keyboard). You have instructed the computer to BREAK into your code. Don’t worry – it’s not as bad as it sounds!

To see your code is still intact, you can type the following keyword at the square cursor:
LIST
Your three lines of code are displayed, safe and sound just as they were the last time you saw them.


BASIC Keywords

Believe it or not, you’ve already used four BASIC keywords. To prove it, here is a table showing all 71 of them.

ABS AND ASC ATN CHR$ CLOSE CLR CMD
CONT COS DATA DEF DIM END EXP FN
FOR FRE GET GET$ GOSUB GOTO IF INPUT
INPUT$ INT LEFT$ LEN LET LIST LOAD LOG
MID$ NEW NEXT NOT ON OPEN OR PEEK
POKE POS PRINT PRINT$ READ REM RESTORE RETURN
RIGHT$ RND RUN SAVE SGN SIN SPC SQR
STATUS STEP STOP STR$ SYS TAB TAN THEN
TIME TIME$ TO USR VAL VERIFY WAIT

We’re now going to slightly change your code so that it only prints the two lines of text five times before stopping, rather than going on forever.
5 FOR A=1 TO 5
10 PRINT “RETRO GAMES LIMITED”
20 PRINT “HELLO WORLD!”
30 NEXT A

You should immediately notice that we have added a line number 5 and we have changed what was on line 30.

Look at these two new lines of code for a moment and ignore lines 10 and 20 in-between. These lines introduce two new concepts to your BASIC knowledge as well as two new keywords.

One concept is defining and using variables in your code. In this example, we are using ‘A’ as a container to temporarily store a number inside. The letter A was chosen but it could easily have been the word ‘WORLD’, so it could have read…
5 FOR WORLD=1 TO 5
10 PRINT “RETRO GAMES LIMITED”
20 PRINT “HELLO WORLD!”
30 NEXT WORLD

… and your program would still have worked. You could also have changed the number at the end of your line of code from 5 to 6, for example. Variable names are chosen by you and can (almost) be anything you like. However, there are rules to naming these handy variables for storing things in.

You can’t use reserved keywords used by BASIC or by the C64 for its own system variables. How do you know which ones can’t be used? Well, if you had used LIST as your variable name, running the program would have produced:
?SYNTAX ERROR IN 5
It’s not the most helpful of errors, but if the computer returns that error, you know something is wrong. Remember that index of C64 BASIC keywords? Don’t use any of those as names for your variables and you can’t go far wrong.

Try to keep your variable names short, but relevant where you can. If your code isn’t overly complex, then you can just use A, B, C and so on, just as long as you remember what they are used for!


Types of Variable

The only other thing to know is that there are three types of variable, and they are defined by what type of information is stored in them.

The two most common that you will use are integer and string variables.

An integer is simply a whole number, so no fractions or decimal points. A string is letters or letters and numbers.

How do you say which type of variable you want to use? For integers, you just use a name for your variable, without anything else, e.g. WORLD. For strings, you add a $ to the end of the variable name, so RECIPE$ might be used to store the name of your favourite cake or biscuit recipe, e.g. “Rocky Road”.

So, looking at your amended BASIC example, we know that ‘A’ is used to store a whole number (which can actually be between -32768 up to 32767). In our example, it is only going to reach a maximum value of 5.

Now let’s discuss the FOR and NEXT keywords. These are paired together and create a FOR… NEXT loop. What this does is from the FOR keyword, the computer stores a number inside ‘A’ that starts at 1 and will end at 5 (in this particular example).

Each time the running code encounters the NEXT ‘variable’ (NEXT A in our example), it returns to the line with the FOR keyword and increments (adds one to) the current number stored in the variable called ‘A’. The code then runs each line of code it comes across afterwards (i.e. line 10 and line 20) until it hits NEXT A again, then it returns to the FOR keyword and repeats the process until the value of ‘A’ equals 5, then it stops.

So, add in line 5 exactly as shown previously, change line 30, and then RUN the amended code and see what happens.

Now, it would be useful to show what the current value of ‘A’ is. Add a new line 25:
25 Print A
Now RUN your code again.

You can now see the two lines of printed text are followed by a number that goes up by one each time, e.g. 1, 2, 3, 4, 5.

It’s useful to see the value stored in variable ‘A’ as you can now see how it changes within that FOR… NEXT loop, adding one automatically whenever it reaches NEXT.

Let’s now make this look a little better by adding something to line 25.
25 PRINT “VARIABLE ‘A’ IS NOW“;A
The semi-colon at the end tells BASIC to keep the cursor on the same line as the text it is printing to the screen, and then display the value of the variable A.

RUN this latest version of your code.

That’s a little better. It’s clear now what those numbers mean and we’ve learned how to place the value of a variable into a PRINT command at the same time!

That almost concludes the introduction to C64 BASIC. However, before we finish, let’s learn how you can keep (save) your code so it can be run and amended in future.


Saving and Loading

You have a few available methods for saving your BASIC programs, with some of them depending on which product you are using.

THEC64/THEC64 Mini:

Press the MENU button and select ‘Save/Load game’ and then save to an available slot as you would do for a game or program. BASIC has four available slots in the same way that any of the games on the carousel do.

If a compatible USB memory stick (formatted to FAT32 and using MBR) is attached whilst you are using BASIC, then you can save your program to a virtual disk stored on the USB stick:

THEC64 Mini:

You can save your BASIC code to a virtual disk file on the USB memory stick if have inserted the USB stick before BASIC is launched from the carousel. When launching BASIC, THEC64 Mini looks for a specific disk image file on the memory stick. If the file isn’t found, then THEC64-drive8.d64 file is automatically created on the USB memory stick for you. You will then be able to save and load to and from this file from BASIC.

Please note that on THEC64 Mini, to accommodate THEC64 Joystick, a USB Keyboard and a USB memory stick at the same time, you need to connect a separate powered USB hub (not supplied) which gives access to additional USB ports. Retro Games Ltd cannot guarantee that all USB hubs will work with THEC64 Mini.

The commands to save to the virtual disk are shown below.

THEC64:

As on THEC64 Mini, THEC64-drive8.d64 virtual disk file is automatically created on the connected USB stick if it is not found in the root of the stick. However, unlike on the Mini, you can choose to insert another disk image from the USB stick and save to that instead if you prefer. Just press the MENU button when in BASIC, select ‘Media access’ and then browse and insert the disk of your choice by pressing FIRE.

Now follow the instructions for using the save command as explained below.


SAVE

With a compatible USB memory stick connected, you can save to the virtual disk file using the standard SAVE to disk command, e.g.

SAVE “RGL”,8

The name of the file goes between the speech marks and it can be whatever you like, as long as it isn’t longer than 15 characters. In this example, it’s nice and short. The number 8 after the filename is a device ID number for the virtual disk drive that uses your virtual disk file stored on your USB memory stick.

Press RETURN afterwards to begin the save.

BASIC will report ‘SAVING’ followed by your chosen filename, and when it is completed, it returns to the READY prompt and the square cursor.

To save over an existing file with the same filename, add @0: to the front, like this:

SAVE “@0:RGL”,8

Please be aware that C64 BASIC won’t give any warnings that you are over-writing the file when you do this.


VERIFY

You can check that the save worked by using the VERIFY keyword.

VERIFY "RGL",8
If everything is okay, you will see VERIFYING followed by OK. What it does it compare the saved file with what is currently in the computer’s memory. If you have changed your BASIC program in any way since you saved, then VERIFY will fail.


LOAD

Another time, ensure that the same USB storage device is connected as before, and then type the following command in BASIC to get your program back.
LOAD “RGL”,8


What’s on my disk?

From BASIC, you can look at a disk and see what files are on there. To do that requires use of the LOAD command, but in a slightly different way from before. Instead of typing a filename we are using the reserved variable $.
LOAD “$”,8
BASIC will report SEARCHING FOR $ followed by LOADING and then it returns to the READY prompt once again.

To see what’s on the disk is simple. Just type the following command:
LIST
Instead of listing BASIC code, this time the command shows what is on the disk.

In the above example, we have just one program on the disk and it’s the program we just saved called RGL. The program uses up 1 block on the disk and there are 663 blocks still free to save programs to in the future.

Be aware that if you load the directory of a disk and you currently have some BASIC code on the C64, the $ listing will replace the BASIC listing in the computer’s memory and you will lose your program (if you haven’t already saved it).


Read Only

If you don’t have a USB stick attached, but decide to try saving to device 8 anyway, BASIC will look like it has successfully saved but when you load the directory of the disk it will be empty. This is because without USB storage, BASIC uses a disk image that can only be read, not saved to. The tell-tale sign is the name of the disk, which is READONLY instead of THEC64. The disk is completely empty and cannot have anything saved to it.

To overcome this, you can always save in one of the four save slots, then later on insert a USB memory stick into a spare USB port, return to BASIC, restore the save slot and then save to the virtual disk file using the SAVE command detailed earlier.


Learn More

Before we finish, how many C64 BASIC commands have you used now?

ABS AND ASC ATN CHR$ CLOSE CLR CMD
CONT COS DATA DEF DIM END EXP FN
FOR FRE GET GET$ GOSUB GOTO IF INPUT
INPUT$ INT LEFT$ LEN LET LIST LOAD LOG
MID$ NEW NEXT NOT ON OPEN OR PEEK
POKE POS PRINT PRINT$ READ REM RESTORE RETURN
RIGHT$ RND RUN SAVE SGN SIN SPC SQR
STATUS STEP STOP STR$ SYS TAB TAN THEN
TIME TIME$ TO USR VAL VERIFY WAIT

You’re up to 11/71 commands already! We hope this small introductions has given you an interest to learn more. There are plenty of online resources available. Also, have a look at our Links page.

A video of this quick introductory tutorial (using THEC64 Mini) is also available to watch below.

Troubleshooting

If THEC64 or THEC64 Mini is not working as expected, there are a number of things to try:

  1. Ensure that the power supply you are using is sufficient for THEC64 Mini. This needs to be 5V/1A for the items supplied in THEC64 Mini box. When attaching any additional USB devices, a 1.5A or 2A power supply is recommended, as other USB devices may have different power requirements. If THEC64 Mini is under-powered then it is likely to not operate correctly or behave erratically
  2. Check that you are using the latest firmware for THEC64 or THEC64 Mini.
  3. Test THEC64 or THEC64 Mini by ensuring that it is connected directly to your TV or Monitor using the provided HDMI lead and is not using any other cables or devices in-between
  4. If you are using a USB hub on THEC64 Mini, we recommend a powered hub. Also see point 1
  5. If there is a time delay between performing an action on the joystick and seeing it on the screen, your TV is likely to be applying image processing which can cause a noticeable delay. Switch off all image processing options by consulting your TV manual. Some TVs include a special ‘Game Mode’ that you can also try
  6. If THEC64 Joystick is not working correctly, try connecting it to a desktop computer and testing it there. THEC64 Joystick works on Windows, Mac and Linux computers
  7. You can test the USB ports by connecting a USB gamepad/controller, USB keyboard or USB memory stick to each port and test them in turn
  8. If your USB memory stick isn’t detected, ensure that the USB stick is formatted to FAT32 with MBR (Master Boot Record). If formatting using Windows 10, ensure you perform a full format rather than enable ‘quick format’.
  9. For loading a D64 file from a USB memory stick when accessing BASIC on THEC64 Mini, the file must be named THEC64-drive8.d64. If you are naming the file using Windows, ensure you can see file extensions otherwise your file might be accidentally named THEC64-drive8.d64.d64 instead (for example). See Loading Programs in C64 BASIC for more information
  10. If your TV is playing sound from THEC64 Mini but is not displaying the picture, then it is likely to be unable to display the output signal. The North American model displays at 60Hz, whilst the European model displays at 50Hz. Try a different TV or monitor.
  11. You can also try a Factory reset, which deletes your chosen Language, Display and (on THEC64 Mini) the USB Keyboard settings, along with any stored saved game positions. A factory reset doesn’t remove any saves stored on a USB memory stick. This reset effectively restores THEC64 or THEC64 Mini to its initial factory condition (excluding the current firmware, which remains unaffected).

Also see the general Frequently Asked Questions page for additional information. THEC64 users can also download the User Manual, which includes a Troubleshooting section in Appendix A.

Loading Programs in C64 BASIC on THEC64 Mini

Aside from the File Loader function, you can also load and run your own legally obtained C64 programs (including games, demos, utilities and so on) from BASIC on THEC64 Mini by following these simple instructions.

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.

First step: Preparation

1. You need a USB memory stick (maximum size of 64Gb) which must be formatted using FAT32
2. Copy the d64 disk file that contains the program you want to load onto the root of the USB memory stick
3. Rename your disk file on the memory stick to THEC64-drive8.d64
4. You are now ready to load your program from BASIC on THEC64 Mini.

Second step: Loading your Program

1. Make sure you’re at the Carousel screen then insert your USB stick into THEC64 Mini
2. If you have firmware v1.1.0 or above installed, a USB icon will appear on the HOME screen after a few seconds
3. Launch BASIC from the Carousel
4. Type the following two commands exactly as shown here:

LOAD “$”,8
LIST

4. Identify the name of the program you want to run from the list displayed
5. Type the following command, replacing NAME with the name of the program from step 4:

LOAD “NAME”,8,1

6. Some programs will load and start automatically. For others, you may need to type the following command afterwards:

RUN

Notes

Don’t forget to press RETURN after typing each command.

There are some limitations to the existing method of loading programs from a USB memory stick when in BASIC:

If these limitations are too restrictive for you, please see the File Loader for an alternative method for loading other programs on THEC64 Mini.

Due to licensing requirements, we cannot offer advice as to which programs currently work using this method and which ones do not.

Disposal

The crossed-out wheelie bin symbol confirms that your product should not be disposed of with your general household waste, but should be taken to your nearest recycling centre for safe and responsible disposal.

Do not dispose of THEC64 Mini as general household waste

WEEE wheelie bin

This will help prevent any potential negative impact on the environment and on human health and is in compliance with current EU legislation.

European Commission – Waste Electrical & Electronic Equipment (WEEE)

Please contact your local authority or retailer for further recycling advice.

Warranty

In the first instance, customers should always refer to the following web site, which explains your consumer rights:

www.which.co.uk

The first point of contact in the process should be between you and the retailer.

This warranty includes THEC64, THEC64 Mini and THEC64 Joystick (jointly referred to as ‘the Hardware’), the user interface software (referred to as the ‘UI’) and any original supplied games included with the Hardware at the time of payment/purchase (referred to as ‘the Games’). Collectively, they are referred to as ‘the Product’.

Subject to the terms and exclusions detailed below, Retro Games Ltd warrants to the original consumer purchasing the Product in any country of the European Economic Area or Switzerland (“you”) that, for a period of 24 months from the date of the payment/purchase of the Product by you, the Product will be free from defects in both materials and workmanship.

EXCLUSIONS

Please be aware that this warranty does not cover the following:

(a) software (other than the UI) or Games (whether included with the Product at the time of payment/purchase or not);

(b) accessories, peripherals or other items intended for use with the Product that are not manufactured by or for Retro Games Ltd (whether included with the Product at the time of payment/purchase or not);

(c) the Product if it has been resold, or used for rental or commercial purposes;

(d) defects in the Product that are caused by accidental damage, your and/or any third party’s negligence, unreasonable use, modification, use with products or software files not supplied, licensed or authorised for use with the Product by Retro Games Ltd (including, but not limited to, non-licensed game enhancements, copier devices, adapters, power supplies or non-licensed accessories), computer viruses or use of the product otherwise than in accordance with the respective instructions, or any other cause unrelated to defects in material and workmanship;

(e) defects in the Product that are caused by the use of faulty, damaged or inappropriate power supplies or related leads or connectors;

(f) the Product if it has been opened, modified or repaired by any person or company other than Retro Games Ltd or its authorised partners;

(g) loss of any data that has been loaded onto or stored on the Product by any person or company other than Retro Games Ltd or its authorised partners;

(h) loss of data or any other content, such as the UI or the supplied Games, as a result of formatting the memory of the Product.

IF YOU NEED TO MAKE A CLAIM

To make a valid claim under this warranty, you must firstly follow the process as described in the consumer rights article, linked to above. If you are unable to resolve your issue following that process, then you may do the following:

Notify Retro Games Ltd of the steps already taken and the perceived defect in the Product within 24 months of the date of the payment/purchase of the Product by you, and only when instructed to, return the Product to Retro Games Ltd within 30 days of notifying Retro Games Ltd of that defect. To make a claim, please contact us via our website contact form.

Before sending the Product to our customer support (after getting in touch using the contact form), you should remove or delete any private or confidential files or data stored on the Product.

By sending the Product to Retro Games Ltd you accept and agree that Retro Games Ltd will not be responsible for any loss, deletion or corruption of your files or data that has not been deleted or removed.

When sending the Product to Retro Games Ltd Customer Support:

  1. please use the original packaging supplied where possible;
  2. please provide a detailed description of the perceived defect;
  3. please attach a copy of your original proof of payment/purchase from the retailer you purchased the Product from, which indicates the date of payment/purchase of the Product and whom it was purchased from.

If, having inspected the Product, Retro Games Ltd accepts that the Product is defective as described, Retro Games Ltd will (at its sole discretion) either repair or replace the faulty part causing the defect, or replace the relevant element of the Product without charge to you.

If the above 24-month warranty period has already expired at the time the defect is notified to Retro Games Ltd or if the defect is not covered by this warranty, Retro Games Ltd may still be prepared to repair or replace the part causing the defect or replace the relevant element of the Product (at its sole discretion). For further information or, in particular, details of any charges for such services, please contact Retro Games Ltd Customer Support via our website contact form.

This manufacturer’s warranty does not affect any usual statutory rights which you may have under consumer protection legislation as the purchaser of goods. The benefits described here are in addition to those rights.