Installation using a Windows PC

July 29, 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 Nano Apple IIe device.

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

Software needed:

In order to use the SD card:

  • NIB and HDV images

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
  • Start Gowin. You should see the following screen

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 one file have to be flashed:
    • The core itself: nanoapple2_tn20k.fs
  • Than you can choose from the drop downs the parameter you see on the pictures.

Important:

  • nanoapple2_tn20k.fs is written to address 0x000000

  • For the FS file please choose the nanoapple2_tn20k.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:

TypeTN20kTP20kTP25kTM138kTM60k
FPGA bitstream0x0000000x0000000x0000000x0000000x000000ROM size

You might need to use an older version of the Gowin Programmer SW for the GW1NR device.

shell / command line Programming alternative

Windows shell and Gowin Programmer
programmer_cli -r 36 --fsFile NanoApple2_tn9k.fs --cable-index 1 --d GW1NR-9C
programmer_cli -r 36 --fsFile nanoapple2_tn20k.fs --spiaddr 0x000000 --cable-index 1 --d GW2AR-18C
programmer_cli -r 36 --fsFile NanoApple2_tp20k.fs --spiaddr 0x000000 --cable-index 1 --d GW2A-18C
programmer_cli -r 36 --fsFile NanoApple2_tp25k.fs --spiaddr 0x000000 --cable-index 1 --d GW5A-25A
programmer_cli -r 36 --fsFile nanoapple2_tm60k.fs --spiaddr 0x000000 --cable-index 1 --d GW5AT-60B
programmer_cli -r 36 --fsFile NanoApple2_tm138k_pro.fs --spiaddr 0x000000 --cable-index 1 --d GW5AST-138B
programmer_cli -r 36 --fsFile NanoApple2_tc60k.fs --spiaddr 0x000000 --cable-index 1 --d GW5AT-60B
programmer_cli -r 36 --fsFile NanoApple2_tc138k.fs --spiaddr 0x000000 --cable-index 1 --d GW5AST-138B

That´s it for the Tang Nano 20k

Flashing the BL616 µC

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

  • 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”

buffstart

  • 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 fpga_companion_bl616.bin (contains a unified firmware)
  • Choose “Open Uart” and than press “Create & Download”. The firmware should now be flashed

bufffinish

Prepare the SD card

Format the SD card in FAT32. Copy your cartrige files files on it. You can organize your files in subdirectories.
These files can later be selected using the on-screen-display (OSD).