Installation using a Windows PC

November 21, 2025 · View on GitHub

This document explains how to install all the necessary files on the Tang Nano 20K and the M0S Dock in order to use it as a C64 Nano device.

This has been tested on Windows 11. It should work on older versions too.

Software needed:

In order to use the SD card for disks:

  • C64 disk images in .D64 or .G64 format
  • Cartridge images in .CRT format
  • BASIC Program files in .PRG format
  • Tape images in .TAP format
  • C64 Kernal files (8K) in .BIN format
  • SID Filter curve in .FLT format

Flashing the Tang Nano 20k

First download the Gowin IDE. The Education version is sufficient and won't need a licence.

Install the IDE on your system (follow the installation instructions from Gowin). After the Installation you should have it as an shortcut on your desktop or in your start menu.

  • Press the S2 button on the Tang Nano 20K and keep it pressed
  • Connect the Tang Nano 20k to the USB on your computer. You should hear the connecting sound of Windows.
  • Release the S2 button

Caution

A FLASH programm attempt without keeping the board in reset may lead to corruption of the C1541 DOS images stored in FLASH requiring re-programming.

  • Start Gowin. You should see the following screen

Explanation: The C64Nano core makes use of the flash memory of the Tang Nano 20k to store c1541 DOS ROMs. This may interfere with the FPGA flash process. Pressing the S2 during power up will prevent the Tang Nano 20k from booting into the C64Nano core and will make sure the flash ROM can be updated.

Now press on the “programmer” marked red on the picture above. You should see following screen:

  • Press save on the dialog
  • From there you can add a device for programming by pressing on the little icon with the green plus
  • At least three files have to be flashed:
    • The core itself: tang_nano_20k_c64.fs
    • Two c1541 DOS ROMs
  • Than you can choose from the drop downs the parameter you see on the pictures.

Important:

  • tang_nano_20k_c64.fs is written to address 0x000000
  • reserved for Atari ST ROM address 0x100000
  • c1541 DOS Dolphin 2 is written to address 0x200000
  • c1541 DOS CBM is written to address 0x20C000

Optionally two additional DOS ROMs may be flashed to the alternate addresses:

  • c1541 DOS Speeddos Plus is written to address 0x214000
  • c1541 DOS Jiffy is written to address 0x21C000

These DOS for the c1541 emulation can later be selected from the on-screen-display (OSD).

  • For the FS file please choose the tang_nano_20k_c64.fs you just downloaded
  • User Code and IDCODE can be ignored
  • Mark each of your configs and press the little icon with the green play button. You should see a progress bar and then:

At a glance the memory layout of the SPI Flash:

TypeTN20kTP25kTM60kTM138k ProConsole60k/138k
FPGA bitstream0x0000000x0000000x0000000x0000000x000000ROM size
reserved for Atari ST ROM0x1000000x1000000x5000000x9000000x500000-
c1541 Dolphin DOS 20x2000000x2000000x7000000x7000000x70000032k
c1541 CBM DOS 2.60x20C0000x20C0000x70C0000x70C0000x70C00016k
c1541 Speed DOS Plus0x2140000x2140000x7140000x7140000x71400016k
c1541 Jiffy DOS0x21C0000x21C0000x71C0000x71C0000x71C00016k

shell / command line Programming alternative

Windows shell and Gowin Programmer
programmer_cli -r 36 --fsFile tang_nano_20k_c64.fs --spiaddr 0x000000 --cable-index 1 --d GW2AR-18C
programmer_cli -r 36 --fsFile tang_nano_20k_c64_25k.fs --spiaddr 0x000000 --cable-index 1 --d GW5A-25A
programmer_cli -r 36 --fsFile tang_nano_20k_c64_60k.fs --spiaddr 0x000000 --cable-index 1 --d GW5AT-60B
programmer_cli -r 36 --fsFile tang_nano_20k_c64_138k.fs --spiaddr 0x000000 --cable-index 1 --d GW5AST-138B

programmer_cli -r 38 --mcuFile 2dosa_c.bin --spiaddr 0x200000 --cable-index 1 --d GW2AR-18C
programmer_cli -r 38 --mcuFile 2dosa_c.bin --spiaddr 0x200000 --cable-index 1 --d GW5A-25A
programmer_cli -r 38 --mcuFile 2dosa_c.bin --spiaddr 0x700000 --cable-index 1 --d GW5AT-60B
programmer_cli -r 38 --mcuFile 2dosa_c.bin --spiaddr 0x700000 --cable-index 1 --d GW5AST-138B

Linux shell and openFPGAloader.
Please read here if you run into trouble when using openFPGAloader under Linux.
openFPGALoader -b tangnano20k --external-flash -o 0x200000 2dosa_c.bin
openFPGALoader -b tangnano20k -f tang_nano_20k_c64.fs

openFPGALoader -b tangprimer25k --external-flash -o 0x200000 2dosa_c.bin
openFPGALoader -b tangmega138k --external-flash -o 0x700000 2dosa_c.bin

c1541 DOS ROM binaries
The needed DOS files you will find on the Internet.
Dolphin DOS 2
You will find 2dosa_c.bin
Program at offset 0x200000

CBM DOS
You will find dos1541-325302-01+901229-05.bin
Program at offset 0x20C000

Speed DOS Plus
You will find or here C1541.ROM
Program at offset 0x214000

Jiffy DOS
You will get a 16k JiffyDos JiffyDOS_C1541.bin file.
Program at offset 0x21C000

That´s it for the Tang Nano 20k

Flashing the BL616 µC

For the BL616 you have to extract and start the BuffaloLabDevCube.

If you use the internal BL616 present on the Tang Nano 20K you loose your possibility to flash the Tang over the USB connection. It is thus strongly recommended to use an external BL616 (e.g. a M0S Dock).

However, when using the internal BL616 you will be able to flash the original firmware to the internal BL616 again to restore the flasher functionality of the Tang Nano 20K. Using an external M0S is nevertheless recommended.

  • Press the BOOT button on your M0S Dock before you plug the USB connection on your PC. You should hear the hardware detecting sound.
  • Start the BuffaloLabDevCube from the directory where you decompressed it it ask you what chip should be used. Select BL616/BL618 and press “finish”

  • You'll now see the program screen. On the right it should auto detect your device with a COM port. If not take a look in the device manager to check for the correct device detection.
  • On the top click on MCU and browse to the firmware image file named misterynano_fw_bl616.bin (contains a unified firmware both for all cores)
  • Choose “Open Uart” and than press “Create & Download”. The firmware should now be flashed

Prepare the SD card

Format the SD card in FAT32. Copy your D64 / G64 / CRT / PRG / BIN / FLT files files on it. You can organize your files in subdirectories. These files can later be selected using the on-screen-display (OSD). Default Mountpoints:
Copy a *.D64 Disk image to your sdcard and rename it to disk8.d64 as default c1541 boot image.
Copy a *.CRT ROM image to your sdcard and rename it to c64crt.crt as default Cartridge boot image.
Copy a *.PRG BASIC file to your sdcard and rename it to c64prg.prg as default Program boot image.
Copy a *.TAP Type image to your sdcard and rename it to c64tap.tap as default tape boot image. Copy a 8k Byte C64 Kernal ROM file *.BIN to your sdcard and rename it to c64kernal.bin as default Kernal boot image.
Copy a *.FLT sid filter curve to your sdcard and rename it to c64flt.flt as default filter boot image.

That´s it for now. Have fun using the C64Nano