TheC64 Max UART Mod
- Gary Metheringham
- Feb 2, 2020
- 8 min read
Disclamer
This is not my own work. it is taken form the, TheC64 Mini wiki page
Warning
The modifications described below will no doubt void your warranty, so use your own personal judgement on whether this modification path is suitable for you.
As the modifications require some soldering and connecting of a UART converter cable, be mindful that your hardware may be damaged due to poor soldering or incorrect connections of UART pins, or the voltage level of your UART converter being set incorrectly (be sure to use 3.3V and not 5V, be sure not to mix up the RX/TX connections, be sure not to connect the power line).
Anyone choosing to make these modifications takes personal responsibility for the risks involved.
With all those ominous warnings out of the way, if you take care, read the instructions carefully, things should work out fine for you.
Walkthrough
I will start with Spannernick's English translation of Chiller's German walkthrough, found here:
Required hardware
- An FTDI / UART adapter (cable version allows easier connection). Here you can find similar post with more information about it (German): THEC64 Mini modding: UART interface for serial root access


WARNING: in any case, you need to connect (solder) only 3 wires: Tx, Rx, GND. If possible, check output voltage before soldering. It should be 3,3V, not 5V.
- Pin header 2.54mm RM for the UART connection on the C64 mini board (4 pins) + soldering iron (and additional accessories). Instead of soldering, a rubber band could be used - to clamp it on without soldering. In that case use a 4 pin header that is straight (even) and aligned tightly to the board (UART adapter needs a proper connection). More about that method: http://thec64community.online/post/544/thread Angled model is recommended, because it is always easy to hang / plug the adapter.
When soldering the 4 pin on the C64 Mini board do not leave the soldering iron on the pads too long because you could damage the traces on the board and the serial will not work,just a about 2 seconds on each pad and solder the pins on,one at a time.
- A USB stick with Fat32 and MBR partition / formatted
- A C64 mini :)
Required software
The following software is required (Intended for Windows users, Linux users should adapt it where/if needed)
- Putty (or another Terminal Program) (Putty's not needed for Linux users, although it could be used - preinstalled system terminal is more then sufficient.)
- WINVICE 2.4 (for Linux: NO SDL VICE!) (For Linux users, some system ROMs are usually missing after install. Here is how to fix it)
64-bit http://zimmers.net/anonftp/pub/cbm/crossplatform/emulators/VICE/WinVICE-2.4-x64.zip32-bit http://zimmers.net/anonftp/pub/cbm/crossplatform/emulators/VICE/WinVICE-2.4-x86.zip
- A good text editor - can recommend here Notepad ++ (again, not needed for Linux - preinstalled Pluma or Kate etc is sufficient, but here are some Notepad ++ replacements)
- 7-zip to compress the VICE snapshots, to be found at (again, not needed for Linux, it is already supported… but 7-zip works fine at *x, via Wine)
Disassembling the case
And now we can start …
First, the C64 mini must be opened, there are 4 screws under the rubber feet. Take care when removing the cover as the cable of the LED is rather short and thin and can break easily. The cable can then be removed from the board, just as the cable that leads to the hidden button in the case - you have to be more careful because its soldered badly, so the cable can come off the button,In case, solder cable again : P
The board is held only by 4 screws on the case and can be unscrewed quickly. Then you have to solder the pins on the board and then you can screw it back firmly. You do not have to do any more.
Looks like this:


On the picture you can also see how the pins are occupied from left to right.
3.3V (is not needed and must NOT be connected)RxDTxDGND (this is the square soldering point on the board - the rightest one on picture)
Preparing your USB stick
Next, it makes sense to format the USB stick first. (GParted for Linux users, probably already came with OS)
Use the downloaded tool and create a FAT32 partition:

NOTE: For Path B (if you want your extra games on the USB stick only), you will need to create a 2nd partition formatted to ext4My suggested method for doing this is using a user-friendly gui-based partitioning tool called GPartedFor Linux users, you can install GParted via Software Manager or your distro's package installer utility (yum/zypper/apt-get, etc) if it is not already there, preinstalled (usually it is).For Windows/Mac users, you can download the bootable cd iso image version, burn it onto a CD and boot up your PC with it.Hopefully there are enough GParted walkthroughs online for you to figure this bit out. If there is demand for it, I can add more verbose steps here.
Now you have a stick, which is also recognised by the C64 mini.
Sets the following directories on the stick (note lower case):
+ games/
+-- games/
+-- covers/
+-- screens/
I.e. Make the directory games, then within the games directory you add the sub-directories: games, covers and screens.
Then you can connect the stick to any of the two ports of the C64 mini.
Preparing your UART converter cable
Please check for safety's sake that your UART adapter provides 3.3V and not 5V (put adapter in the PC in a USB port and use multimeter to measure the voltage between TxD and GND). The adapter should have a jumper, make sure it is set at 3.3V,not 5V and then you are ready to go.
Next, you connect the UART adapter to The C64 Mini. Connection is set like we are using our phones: one talk > other side listen, and same in the other direction. Think about it this way and you will never miss it - nor burn your hardware by accident. :)
Tx stands for transmit, Rx for receive, GND is ground (earthing):
Tx > > > > > > Rx
Rx < < < < < < Tx
GND = = = = = GND
So, connect GND to GND, RxD to TxD, TxD to RxD and now dedicate yourself to the Putty software. This is a simple .EXE where nothing needs to be installed, just start it. First select Connection Type Serial and then you will be using Serial Line

Preparing your Comms Software
Windows
The COM port of your adapter (COM1, COM2, …. COM9) and Speed 115200. Under “Devices and Printers” you can see what kind of COM port the adapter uses ,port.

In my case it is port COM9 … Attention, if you later use another USB port then the COM port will change.

Next you go down to Serial.
Enter the remaining data there. it should already say Serial Line and Speed from before.
Data Bits = 8Stop Bits = 1Parity = NoneFlow Control = None

Then go to Open and should get a blank black terminal window with a green cursor in the corner.
Linux
Here is much more detailed walkthrough: http://linux-sunxi.org/UART - if you stuck, check it there.
Open terminal, hook up your USB UART adapter cable if you didn't already.
dmesg to see to which tty your UART is connected to (usually ttyUSB0). It should be at the end, probably the very last line of long listing
(dmesg | less to scroll through the output). Alternatively, check syslog at /var/log.
Let's start.
stty -F /dev/ttyUSB0 -crtscts (this is to turn off hardware flow control - the cable has no wires for that)
Most common way for serial connection is to use “cu” utility (usually preinstalled). Enter:
cu -s 115200 -l /dev/ttyUSB0
if you get “permission denied”, try again with sudo: sudo cu -s 115200 -l /dev/ttyUSB0 If it is still denied, for Ubuntu / Linux Mint you have to enter sudo usermod –append –groups dialout myusername, then log out and log in again (replace “myusername” with your own username). From now on it should work, without sudo. For other distros, check troubleshooting dedicated section from link above.
Getting into the U-boot prompt
The c64 mini does not need to be connected to a TV or monitor, you only need Putty (at Linux: cu) to connect to it, and UART of course.. :)
The next step is a bit awkward because you have to do 2 things at the same time. The easiest way to ask a friend in the household shortly for help (to press a key on the keyboard “s”). Or you do it yourself somehow …
You must now have selected your terminal window and hold down the “s” key on your PC keyboard and then supply the C64 mini with the micro USB plug with power. This stops the boot process of TheC64 mini. Remember, as soon as the UART adapter connected to the mini you can no longer use the power button to turn it off / on. If it did not work the first time, you just have to unplug the power, plug in again. and repeat it again.
How can I tell if it worked?
If you end up with the following message, then it has not worked.

If you see this message, then it worked.

Setting the root password
Now you need the root login and set your own password. Then you can also log in without interruption on the c64 mini as root. Mind you, while waiting for new password, cursor will disappear: it will not blink, nor you will see what you type. it is common security measure of Linux (and most other Unixoids). Your machine is not frozen. When you press enter, “Retype password:” will occur - retype it, press enter and continue. Hint: commands that needs to be entered to terminal could be copy&pasted line by line from below. ctrl+c is keyboard shortcut for “copy” at Windows and Linux; ctrl+v is “paste” for Windows, ctrl+shift+v for paste into Linux terminal. alt+tab is for switching between windows at Windows and Linux, as usual.
Here is what you need to do, step by step:
setenv console ${console} ramfsbootinsmod /lib/modules/3.4.39/nand.komount /dev/nandb /mntpasswd(Type in a password )
[ The cursor does not move, the input is masked](confirm password again) [ The cursor does not move, the input is masked]
mv /mnt/etc/shadow /mnt/etc/shadow.oldcp /etc/shadow /mnt/etcumount /mnt
UPDATE: “setenv console ${console} ramfs” is used instead “setenv nand_root /dev/sda”; both works, but according to this post at community forum, this is better way to do it: “instead of doing the 'setenv nand_root /dev/sda' a better way is to do 'setenv console ${console} ramfs'. This uses the 'official' way supported by the boot script to get to the command prompt instead of failing to mount the root disk. It adds the 'ramfs' parameter to the boot arguments (by adding it to the console parameter which in itself gets added to the bootargs paramter). If the boot script sees this 'ramfs' paramter it will stop and not try to mount and run from the nand_root.” (thanks jj) Other variant is left below, for historical reasons.
Here is the entire text
You type the text in Bold the console prints the other text
redquark # setenv nand_root /dev/sda redquark # boot read boot or recovery all [48.085] sunxi flash read: offset 1000000, 11549075 bytes OK [48.100] ready to boot [48.103] [mmc]: MMC Device 2 not found [48.107] [mmc]: mmc not find, so not exit NAND_Uboot Exit NB1 : NAND_LogicExit [48.111] Starting kernel … [0.991847] rtc_hw_init (416) err: set clksrc to external losc failed! rtc time wants to be wrong [1.001419] sunxi_rtc_gettime (34): err, losc_err_flag is 1 [1.076451] [hdmi] hdmi module init [1.082448] ## fb init: w = 1280, h = 720, fbmode = 0 [1.099610] sunxi_rtc_gettime (34): err, losc_err_flag is 1 [1.105737] sunxi-rtc sunxi-rtc: hctosys: unable to read the hardware clock root = /dev/sda wait /dev/sda ready wait /dev/sda ready wait /dev/sda ready wait /dev/sda ready [4.953983] sd 0: 0: 0: 0: [sda] No Caching mode page present [4.960123] sd 0: 0: 0: 0: [sda] Assuming drive cache: / # insmod /lib/modules/3.4.39/nand.ko / # mount /dev /nandb/mnt [65.852040] EXT4-fs (nandb): could not mount as ext3 due to feature incompatibilities [65.944133] EXT4-fs (nandb): could not mount as ext2 due to feature incompatibilities / # passwd Changing password for root New password: (type in password) Retype password: (type password again) Password for root changed by root / # mv /mnt/etc/shadow /mnt/etc/shadow.old / # cp /etc/shadow /mnt/etc / # umount /mnt / #
Then restart the C64 mini and log in with login : root and the password you set. Now you have root access to the c64 Mini :)
Useful hints
When you enter Mini's file system, you will find your self at mounted /root sub-folder, not a real root! It could be confusing, because ls will not show you common file-system “tree”.
To quickly get out of it, type
cd ..
To see where are you at file system, enter this to show you more informative command line prompt: PS1=“\w $ ”
Linux login/logout - quick reminder of session procedure
stty -F /dev/ttyUSB0 -crtscts
cu -s 115200 -l /dev/ttyUSB0
login (root), password
mount /tmp/usbdrive/sda1 /mnt
mount -o remount, rw /
DO WHAT YOU NEED, THEN
mount -o remount, ro / umount /mnt poweroff
Comments