100%
wondertang WonrderTANG view
Description

Imported from GitHub: lfantoniosi/WonderTANG · commit 6993134 · license BSD-2-Clause

Description

TangNano 20K cartridge for MSX computers

README

WonderTANG

TangNano 20K cartridge for MSX computers

This cartridge allows any MSX computer to host a Sipeed Tang Nano 20K. The current fpga core implements:

  • MicroSD Nextor 2.1 Drive
  • FM OPLL + MSX Music ROM
  • 2MB Super Mega RAM SCC+
  • 4MB Memory Mapper
  • Sega Master System VDP + PSG to allow running SMS roms from SofaRun (Franky HDMI)

The Super Mega RAM SCC+

The Super Mega RAM SCC+ is a different ACVS-like MegaRam that support different mappers:

  • Konami4 (2MB)
  • Konami5 SCC+ (512KB)
  • ASCII8 (2MB)
  • ASCII16 (2MB)

Use the utility SMRAM.COM to allow using different mappers as well activating the SCC+, otherwise it will just work like an ordinary MegaRAM 2MB.

Board Revisions

The latest available version is V2.0b. Please, use that version to order new boards.

[!IMPORTANT] Always check your board revision when assembling or programming your WonderTANG.

The revision number is available on the front-left side of the board.

Download the specific FPGA Bitstream version required by your board version.

V2.0a/V2.0b (NEW)

This is the new version using Tang Nano 20K internal DAC amplifier.

Changes since last revision:

  • uses internal DAC for audio output
  • switches to a flatter audio connector
  • removes jumpers
  • requires the latest FPGA bitstream version

V2.0a is equivalent to V2.0b.

V2.0a prototype build
V2.0b front renderV2.0b back render

PCB

You can access V2.0b gerber files from github at:

https://github.com/lfantoniosi/WonderTANG/tree/4a21359a5136a5a96363da55edc5d934acfd37c5/kicad/gerber

I recommend JLCPCB: https://jlcpcb.com/

Bill of Materials

ReferenceValueDescriptionQtyLink
C5, C6, C7, C8, C9, C10, C11, C12DIP-100NFMLCC Monolithic Ceramic Capacitor DIP 100nF (104)8AliExpress
C1, C2ELEC-DIP-4.7UF-16VElectrolytic Capacitor DIP 4.7uF 16V2AliExpress
C13ELEC-DIP-10UF-16VElectrolytic Capacitor DIP 10uF 16V1AliExpress
R5,R6DIP-2.2KResistor PTH 2.2KR2Aliexpress
R1DIP-330RResistor PTH 330R1AliExpress
R4DIP-4.7KResistor PTH 4.7KR1AliExpress
D1LED-3MMLED 3MM Red1AliExpress
D21N5817SCHOTTKY BARRIER RECTIFIER DIODE1AliExpress
U1, U2, U3, U4, U6SOCKET-DIP-NARROW-20DIP Socket Narrow 20 pins5AliExpress
U1, U2, U3, U4, U6SN74LVC245ANOCTAL BUS TRANSCEIVER WITH 3-STATE OUTPUTS5See note
Q1,Q22N39042N3904 NPN switching Transistor2AliExpress
J2CP1-3523NCONN JACK STEREO 3.5MM R/A1AliExpress
J3Mini Micro male/female JSTMini Micro male/female JST1AliExpress
U5Tang Nano 20KTang Nano 20K1AliExpress

Build Notes

The audio J3 needs to be soldered into the TANG Nano 20K speaker pins (two small pins between the words SiPEED and TANG NANO 20K, polarity does not matter). Use the JST connector or solder it directly under the board.

74LVC245AN

Be aware of fake 74VLC245 sold from Chinese vendors like AliExpress or UTSource. There are reports of they being 74LS245 rebranded as LVC which does not work. You need genuine 75LVC245. Buy then from DigiKey, Mouser or Adafruit.

V1.02d (PREVIOUS)

[!WARNING] If you are building new boards, please use the latest available board revision instead.

This version fixes a problem with Philips MSX machines (detected on Philips VG8235 and Philips NMS8245) by properly implementing the MSX cartridge nINT signal as an open-collector.

Changes since last revision:

V1.02d front renderV1.02d back render

PCB

You can access V1.02d gerber files from github at:

https://github.com/lfantoniosi/WonderTANG/tree/0e938fb70acad34c753a95fd54bb3fdd6095d590/kicad/gerber

Bill of Materials

ReferenceValueDescriptionQtyLink
C5, C6, C7, C8, C9, C10, C11, C12DIP-100NFMLCC Monolithic Ceramic Capacitor DIP 100nF (104)8AliExpress
C1, C3, C13ELEC-DIP-10UF-16VElectrolytic Capacitor DIP 10uF 16V3AliExpress
C2, C4DIP-1UFMLCC Monolithic Ceramic Capacitor DIP 1uF (105)2AliExpress
R2, R3DIP-47RResistor PTH 47R2AliExpress
R5,R6DIP-2.2KResistor PTH 2.2KR2Aliexpress
R1DIP-330RResistor PTH 330R1AliExpress
R4DIP-4.7KResistor PTH 4.7KR1AliExpress
D1LED-3MMLED 3MM Red1AliExpress
D21N5817SCHOTTKY BARRIER RECTIFIER DIODE1AliExpress
U1, U2, U3, U4, U6SOCKET-DIP-NARROW-20DIP Socket Narrow 20 pins5AliExpress
U1, U2, U3, U4, U6SN74LVC245ANOCTAL BUS TRANSCEIVER WITH 3-STATE OUTPUTS5See note above
Q1,Q22N39042N3904 NPN switching Transistor2AliExpress
C13ELEC-DIP-10UF-16VElectrolytic Capacitor DIP 10uF 16V1AliExpress
C1, C2ELEC-DIP-4.7UF-16VElectrolytic Capacitor DIP 7.7uF 16V2AliExpress
J1, J3PH-254-S-M-40-BLACK2.54mm 1 x 40 Pin Male Single Row Pin Header Strip Black1AliExpress
J2SJ1-3533NGSJ1-3533NG Audio P4 3 Pin connector1AliExpress
U5Tang Nano 20KTang Nano 20K1AliExpress

V1.01c (OBSOLETE)

[!WARNING] If you are building new boards, please use the latest available board revision instead.

This version corrects an audio problem due to wrong connection of AUDIO and SOUNDIN capacitors.

Changes since last revision:

[!IMPORTANT] This version is known to experience problems with some Philips MSX machines.

V1.01c front renderV1.01c back render

PCB

You can access V1.01c gerber files from github at:

https://github.com/lfantoniosi/WonderTANG/tree/b9e608418bb1917098046716af13b877def6737b/kicad/gerber

Or you can order V1.01c PCBs directly from:

https://www.pcbway.com/project/shareproject/WonderTANG_v1_01c_ba2c16ea.html

A small part of the money will be donated to the author of the project.

Bill of Materials

ReferenceValueDescriptionQtyLink
C5, C6, C7, C8, C9, C10, C11, C12DIP-100NFMLCC Monolithic Ceramic Capacitor DIP 100nF (104)8AliExpress
C1, C3, C13ELEC-DIP-10UF-16VElectrolytic Capacitor DIP 10uF 16V3AliExpress
C2, C4DIP-1UFMLCC Monolithic Ceramic Capacitor DIP 1uF (105)2AliExpress
R2, R3DIP-47RResistor PTH 47R2AliExpress
R1DIP-330RResistor PTH 330R1AliExpress
R4DIP-4.7KResistor PTH 4.7KR1AliExpress
R5DIP-2.2KResistor PTH 2.2KR1
D1LED-3MMLED 3MM Red1AliExpress
D21N5817SCHOTTKY BARRIER RECTIFIER DIODE1AliExpress
U1, U2, U3, U4, U6SOCKET-DIP-NARROW-20DIP Socket Narrow 20 pins5AliExpress
U1, U2, U3, U4, U6SN74LVC245ANOCTAL BUS TRANSCEIVER WITH 3-STATE OUTPUTS5See note above
Q12N39042N3904 NPN switching Transistor1AliExpress
J1, J3PH-254-S-M-40-BLACK2.54mm 1 x 40 Pin Male Single Row Pin Header Strip Black1AliExpress
J2SJ1-3533NGSJ1-3533NG Audio P4 3 Pin connector1AliExpress
U5Tang Nano 20KTang Nano 20K1AliExpress

V1.01b (OBSOLETE)

V1.01 (OBSOLETE)

V1.0 (OBSOLETE)

FPGA Bitstream Versions

If you want to program your WonderTANG you need to download the specific FPGA bitstream for your board revision according to the following table.

Board RevisionFPGA Bitstream File
V1.0WonderTANG_v1.0-v1.01c.fs
V1.01WonderTANG_v1.0-v1.01c.fs
V1.01bWonderTANG_v1.0-v1.01c.fs
V1.01cWonderTANG_v1.0-v1.01c.fs
V1.02dWonderTANG_v1.02d.fs
V2.0bWonderTANG.fs

Programming the Cartridge

How to Program the Tang Nano 20K from Windows

Install the Gowin Educative IDE or just the programmer if you want to just flash the files on your board. You can install it from https://www.gowinsemi.com/ by providing your personal data and registering. Please reboot your computer after installing the drivers.

Connect your TangNano board to the computer USB and open the Gowin Programmer software. Please note that we will be just programming the board, so you will not effectively use the IDE at this time. You should see the following message indicating that your board/cable was recognized.

NOTE: for version 2.0b the FPGA core re-uses JTAG pins. So once flashed to re-flash the tang you need to press S1 button on it before connecting the USB-C cable and keep it pressed during all the time of the flashing process.

Cable Detected

Click Add Device. You will see a new device on the list. Click on the Series and select GW2AR.

Device Selection

Now double click the device on the list and set Access Mode = External Flash Mode, Operation = exFlash Erase, Program thru GAO-Bridge. Click the elipsis and select the specific .fs file for your WonderTANG board revision (see FPGA bitstream versions). Select Generic Flash as the Device and make sure the address 0x000000 is selected. Click Save.

Alt text

Click Add Device again. Set the Series to GW2AR. Double click on the device and set Access Mode = External Flash Mode, select Operation = exFlash C Bin Erase, Program thru GAO-Bridge. Click the elipsis and select the Nextor-2.1.1.WonderTANG.ROM.bin file. Select Generic Flash as the Device and make sure the address 0x100000 is selected. Click Save.

Alt text

Now Enable just the first device on the list, go to the Edit menu and select Program/Configure (or click the program button).

Repeat the steps now enabling just the second device on the list. That will save the BIOS on the flash.

How to Program the Tang Nano 20K from Linux

As the native programmer of the Gowin IDE does not properly work in Linux, it is recommended to use openFPGALoader to program the Tang Nano 20K of the WonderTANG.

This procedure has been tested successfully using openFPGALoader v0.10.0.

Assuming that you already downloaded the specific .fs file for your WonderTANG board revision (see FPGA bitstream versions) and Nextor-2.1.1.WonderTANG.ROM files, and that your Tang Nano 20K is connected to your computer using a USB cable, you can proceed as follows:

  • Upload the bitstream (in this case path_to_your/WonderTANG/fpga/impl/pnr/WonderTang.fs) using the following command:
openFPGALoader -f -b tangnano20k --external-flash path_to_your/WonderTANG/fpga/impl/pnr/WonderTANG.fs
  • Upload the WonderTANG ROM file path_to_your/WonderTANG/kernel/Tang/Nextor-2.1.1.WonderTANG.ROM using the following command:
openFPGALoader -f -b tangnano20k --external-flash -o 1048576 path_to_your/WonderTANG/kernel/Tang/Nextor-2.1.1.WonderTANG.ROM
Comments
Sign in to comment

No comments yet. Be the first to ask about this board.