Skip to the content
PCBKitNew board
4 layers100 × 77 mmTinyLlama, the printed circuit board in 3D

A tiny x86 retro computer

Size
100 × 77 mm
Copper layers
4
Thickness
1.59 mm
Parts
139
Nets
306
Pads
793
Tracks, vias
1,842, 168
Pours
6
Routed
Yes
KiCad
KiCad 7 (file 20221018)
Created
10 Feb 2023
Updated
21 Aug 2023

Overview

TinyLlama is an open-source printed circuit board by eivindbohler, from the eivindbohler/tinyllama2 repository on GitHub, published under the GPL-3.0 licence. It is a 4-layer board of 100 × 77 mm with 139 parts on 306 nets, routed with 1,842 tracks and 168 vias.

It is built around the CR1220-2. Its parts include 46 capacitors, 38 resistors, 14 connectors, 8 ICs and 6 switches. It belongs with the ESP8266 boards of this library.

Main components

1

README

README.md


  • A fully-fledged 486/Pentium-class PC in a tiny form factor
  • Integrated Sound Blaster Pro-compatible audio
  • Add a Raspberry Pi Zero 2 for Roland MT‑32 and General MIDI music
  • Open-source hardware schematics, board layout and BIOS - build your own!
  • Perfect for playing DOS games!

Note
YouTube walkthrough + setup coming soon!

Table of Contents



Project Goals

The goal of the TinyLlama project is:

  • To create a fully x86-compatible DIY DOS computer with a sound card
  • To keep the size as small as possible while keeping decent connectivity
  • To keep the cost low

What's New In Version 2?

Last year I released version 1 of the TinyLlama.
While I was very happy with it and it worked great, there were a couple of things I felt were still missing + a few bugs.

The two main new features in version 2 are:

  • Built-in hardware USB HID (keyboard+mouse) to PS/2 emulation using rasteri's HIDman firmware running on a CH559 microcontroller
  • On-board Wemos D1 Mini ESP8266 for providing either a Hayes-compatible modem-over-WiFi or ethernet-over-WiFi (SLIP), depending on the firmware on the ESP.

Both the CH559 and the ESP8266 can be easily re-flashed/programmed in-place.
Look at Programming the CH559 and Programming the ESP8266.

Full system specs (revision 2.1)

Hardware

  • 86Duino System-on-module
    • Vortex86EX CPU running at 60-500 MHz
    • 16 KB L1 cache (can be disabled)
    • 128 KB L2 cache
    • 128 MB DDR3 RAM
    • 8 MB programmable flash ROM
  • Vortex86VGA module running off a x1 PCI-e lane
  • Crystal CS4237B all-in-one audio chip
  • 12mm PC-speaker
  • CR1220 battery for persistent real-time clock
  • Power and reset buttons
  • Connectivity
    • USB-C for power
    • 2 x USB Type-A connectors for HID-compliant keyboard and mice
    • 2 x USB Type-A connectors for storage devices (USB 2.0)
    • MicroSD slot for storage
    • DE-9 RS232 serial port (COM1)
    • Modem or Ethernet/SLIP over WiFi (COM2)
    • Internal 2.54mm pin-header for connecting a fan (5V or 3.3V selectable)
    • 3.5mm line-out audio jack
  • mt32-pi subsystem
    • 40-pin connector for a Raspberry Pi Zero 2
    • Pin headers for attaching a GY-PCM5102 I²S DAC module
    • Button for toggling between MT32 / General MIDI mode
    • Button for switching between audio ROMs / soundbanks
    • 4-pin I²C connector for an OLED display

Software

Building

Sourcing Parts

Full BOM (bill of materials) can be found in the wiki.

  • The TinyLlama PCB rev2.1
  • Modern SMD and through-hole components, as seen in the BOM
  • 86Duino system-on-module (SOM-128-EX)
  • Vortex86VGA Mini PCI-e module
  • Crystal CS4237B 100-pin TQFP. Discontinued, but readily available
  • Wemos D1 Mini ESP8266, optional
  • A CR1220 battery if you want a persistent real-time clock
  • One or more USB flash drives + an optional microSD card
  • A USB-C power adapter (minimum 2A)
For MT-32/MIDI - optional

Assembly

Solder all components onto the TinyLlama rev2.1 PCB. As always, it's easier to start with the low-profile ones first, like resistors and capacitors. If you're willing to spend slightly more, I recommended you let the PCB manufacturer pre-assemble most of the common components for you. Plus, some of the SMD components can be a bit tricky to solder. Take a look at the wiki for more in-depth assembly instructions.

Programming the CH559

  1. Download the latest firmware binary from this repo, in the hidman-binary folder. Alternatively, get the latest source code from the official repo and compile it yourself.
  2. Download and install WCHISPTool_Setup.exe from WCH's website. Unfortunately, this tool only supports Windows. If you're on macOS or Linux, maybe try using virtualization software, or even another computer.
  3. Open the WCHISPTool_CH54x-55x application.
  4. Make sure the TinyLlama is powered off.
  5. Remove the jumper from the "HID_POWER" pin header on the PCB (to ensure that the computer doesn't backpower the TinyLlama).
  6. Connect a USB cable (type A to type A) between one of the HID USB ports on the TinyLlama and the Windows computer.
  7. Press and hold the "PRG" button on the bottom side of the TinyLlama until the CH559 device pops up in the WCHISPTool.
  8. Select the firmware binary file under Download File -> Object File1.
  9. Click the "Download" button. Hopefully you'll get a success message in the log section on the right side of the program window.
  10. Disconnect the USB cable.
  11. Add the jumper to the "HID_POWER" pin header on the PCB.
  12. Connect a keyboard to one of the HID USB ports. You should be good to go!

Programming the BIOS

When purchasing the SOM-128-EX module from DMP, its ROM chip comes preinstalled with an Arduino-like bootloader which isn't what we want. Also, the "crossbar" is configured for using the module with the 86Duino Zero/One boards - meaning its default pin layout is completely different from what we need for the TinyLlama.

Follow these steps to flash the ROM with the TinyLlama BIOS for the first time:

  1. Find a USB flash drive, must be minimum 32 MB in size (shouldn't be a problem these days). Note that not all USB drives are bootable. Use a well-known bootable drive. NB: You have to use a USB stick for this, an SD card won't work since the crossbar is configured to use different pins on the SOM for SD traffic.
  2. Do a block-level transfer of the INITBIOS.IMG from this repo to the USB drive. Use Balena Etcher, or the command line if you know what you're doing (macOS example):
text
$ diskutil list
(Find your USB drive, eg. /dev/disk2)
$ diskutil unmountDisk /dev/disk2
$ sudo dd if=INITBIOS.IMG of=/dev/rdisk2 bs=1m
  1. Insert the USB flash drive into the TinyLlama and turn it on. It'll hopefully boot into MS-DOS. Then, to flash the ROM:
text
C:\>anybios w initbios.rom

...and reboot.

For subsequent BIOS updates, you can use the ROM's built-in virtual floppy drive available from the boot menu (press F12).
When booted from this you'll only need a regular USB stick (formatted as FAT16/FAT32) containing the new BIOS file.

Installing MS-DOS

A note on selecting the DOS type:
I've gone with MS-DOS 6.22 for maximum compatibility.
If you prefer FreeDOS (or another DOS variant), prepare a bootable USB installer disk and use that instead of the built-in virtual floppy.

  1. Pick a bootable USB drive or Micro SD card to use as the boot drive - for MS-DOS 6.22 you'll be limited to FAT16 and 2 GB per partition (though you can have several). For FreeDOS with FAT32 you can go all the way up to 2 TB.
  2. Insert it, turn on the system, press F12 to bring up the boot menu, and select the virtual floppy drive.
  3. Use fdisk from the command prompt to partition the SD/USB drive and set it to be Active.
  4. Restart and again select to boot from the virtual floppy.
    Use format c: /s /u to format the drive and copy over system files. Finally use fdisk /mbr to make sure the Master Boot Record is correct and the drive should be bootable.
  5. Copy over the DOS folder from A: to C:.
    You can either do this manually and create CONFIG.SYS and AUTOEXEC.BAT files to your liking, or more conveniently, just run the SETUP.BAT script that'll do this for you. The provided config files lets you choose from a clean boot or a QEMM-based one with XMS, EMS and 631 kB of free conventional memory.

Programming the CS4237B Firmware

  1. Copy the CS4237B and UNISOUND folders from this GitHub repo over to your SD/USB boot drive and start the system.
  2. To program the firmware, run the RESOURCE.EXE command below and check that you get the same output:
text
C:\>cd cs4237b
C:\CS4237B>resource /f=0x120 /r=cs4237b.asm /e

Reading data from CS4237B.ASM
Length = 292    Programming EEPROM Block: 1 2    EEPROM programmed

Verifying EEPROM:
Verifying CS4237B.ASM against EEPROM . . .      Verified OKAY
  1. Make sure the correct BLASTER environment variable is set and UNISOUND.COM command is called from AUTOEXEC.BAT. Note that the 8-bit DMA channel is 1 and the IRQ is 7:
text
SET BLASTER=A220 I7 D1 P330 T4
C:\UNISOUND\UNISOUND.EXE /V60 /VW60 /VF60 /VL60 /VP60 /VC0 /VM0
  1. Reboot the system, and you should get the following output:
text
Universal ISA PnP Sound Card Driver for DOS v0.76f. (c) JazeFox 2019-21
-----------------------------------------------------------------------
PnP card found: [CSC7537] CS4237B
BLASTER environment var found! Loading settings...
ADD:220 WSS:534 OPL:388 IRQ:7 DMA:1/1 MPU:330/I9 CTR:120 JOY:200
Initialization done.
Crystal Mixer [VOL:85 WAV:80 FM:80 LIN:0 CD:0 MIC:0]
  1. Feel free to experiment with the different volume levels, look at the C:\UNISOUND\UNISOUND.TXT file for further guidance.
  2. Fire up a few games to test that Adlib, SoundBlaster FM and digital sound effects are working properly.

MT-32 / General MIDI

If you've installed mt32-pi on a Raspberry Pi Zero 2 and connected it to the TinyLlama, it should be ready to go using IO port 330. Use the third button from the left (labeled "SYNTH_SW" on the PCB) to switch between MT-32 and General MIDI mode.
If you want to play old games that require "MPU-401 Intelligent Mode" (Sierra games, Monkey Island 1, etc), try running SoftMPU:

text
C:\SOFTMPU\>softmpu /mpu:330 /sb:220 /irq:7

If you want to hook up an I²C OLED display to the mt32-pi, there's a pin header on the TinyLlama labeled "I2C_OLED". The order of the pins from 1 to 4 is: GND, VCC, SCL, SDA with pin 1 being the one closest to the 3.5mm audio jack.

WiFi Connectivity

There's a section in the wiki dedicated to this, take a look.

Wiki

For an in-depth discussion of the various components, installation, configuration, etc, take a look at the wiki.

Help

This project is indended for people with a fair bit of hardware- and DOS knowledge. If you have questions or need help, please look at the wiki and FAQ section first.

Roadmap

Coming.
In the mean time feel free to post an issue if you have tips, suggestions or want to report an error.

License

GNU General Public License v3.0

Contact

Development thread: Vogons
Mastodon: @eivindbohler@techhub.social
Twitter: @eivindbohler
YouTube: @eivindbohler

Acknowledgements

Many thanks to

Parts

139
QtyValueFootprintReferences
220.1uFCapacitor_SMD:C_0603_1608MetricC10, C11, C12, C13, C14, C15, C16, C17, C18, C19, C20, C21, C22, C23, C24, C25 +6
84.7kResistor_SMD:R_0603_1608MetricR14, R15, R16, R17, R18, R19, R20, R21
847kResistor_SMD:R_0603_1608MetricR31, R32, R33, R34, R35, R36, R37, R38
847uFCapacitor_SMD:C_1206_3216MetricC39, C40, C41, C42, C43, C44, C45, C46
610uFCapacitor_SMD:C_0805_2012MetricC33, C34, C35, C36, C37, C38
633Resistor_SMD:R_0603_1608MetricR2, R3, R4, R5, R6, R7
41nFCapacitor_SMD:C_0603_1608MetricC3, C4, C5, C6
46.8kResistor_SMD:R_0603_1608MetricR24, R25, R26, R27
4FFuse:Fuse_0603_1608MetricF1, F2, F3, F4
4H_HOLEllama_shared:H_440_HOLEH1, H2, H3, H4
4L_EMI_FILTERllama_shared:L_EMI_FILTER_MCM2012B900GBEL1, L2, L3, L4
31kResistor_SMD:R_0603_1608MetricR10, R11, R12
210kResistor_SMD:R_0603_1608MetricR28, R29
222pFCapacitor_SMD:C_0603_1608MetricC1, C2
25.1kResistor_SMD:R_0603_1608MetricR22, R23
2FBResistor_SMD:R_0805_2012MetricFB1, FB2
10Resistor_SMD:R_0603_1608MetricR1
11.5kResistor_SMD:R_0603_1608MetricR13
110nFCapacitor_SMD:C_0603_1608MetricC8
116.9344MHzllama_shared:X_Crystal_SMD_HC49S-MINIX1
11N4148Diode_SMD:D_SOD-323FD1
11uFCapacitor_SMD:C_0805_2012MetricC31
12.7nFCapacitor_SMD:C_0603_1608MetricC7
1200Resistor_SMD:R_0603_1608MetricR8
120kResistor_SMD:R_0603_1608MetricR30
13.3uFCapacitor_SMD:C_0603_1608MetricC32
1470Resistor_SMD:R_0603_1608MetricR9
1AudioJack3llama_shared:J_AUDIO35_C95463J3
1CONNDiode_SMD:D_0603_1608MetricD2
1CR1220llama_shared:BT_MY-1220-03BT1
1D1_MINIllama_shared:J_WEMOS_D1_MINIJ8
1ESP_DEBUGllama_shared:P_CONN_01X02_SQUAREP4
1ESP_POWERllama_shared:P_CONN_01X02_SQUAREJP2
1FAN_PWRllama_shared:P_CONN_01X03_SQUAREP2
1FLASHllama_shared:SW_B3FS-1010SW3
1GY-PCM5102llama_shared:U_GY-PCM5102U7
1HID_POWERllama_shared:P_CONN_01X02_SQUAREJP3
1I2C_OLEDllama_shared:P_CONN_01X04_SQUAREP5
1J_MINI_PCIEllama_shared:J_MINI_PCIEJ2
1J_PI_ZEROllama_shared:J_CONN_RPI_SMDJ7
1J_USB_Cllama_shared:J_USB_TYPE-C-31-M-12J1
1Llama_logollama_shared:LLAMA_LOGOLOGO1
1MICRO_SDllama_shared:J_MicroSD_TF01AJ4
1NPNllama_shared:Q_BJT_SOT-23-3Q2
1PANEL_BTNSllama_shared:P_CONN_01X05_SQUAREP6
1POWERllama_shared:SW_B3FS-1010SW1
1PRGllama_shared:SW_B3FS-1010SW6
1P_DE9Mllama_shared:P_DE9MP3
1P_SOM-128-EXllama_shared:P_CONN_SOM-128-EXP1
1Q_PMOS_GDSllama_shared:Q_PFET_ENH_SOT-23-3Q1
1RESETllama_shared:SW_B3FS-1010SW2
1ROM_SWllama_shared:SW_B3FS-1010SW5
1RXDiode_SMD:D_0805_2012MetricD4
1SPEAKERllama_shared:SPSP1
1SPKR_VOLllama_shared:P_CONN_01X03_SQUAREJP1
1SYNTH_SWllama_shared:SW_B3FS-1010SW4
1TXDiode_SMD:D_0805_2012MetricD3
1USB_HIDllama_shared:J_USB_A_C12049J6
1USB_NATIVEllama_shared:J_USB_A_C12049J5
1U_74LVC1G04llama_shared:U_SOT-23-5U4
1U_AMS1117-3.3llama_shared:U_SOT-223-3_NOTABU2
1U_CH559Lllama_shared:U_QFP-12x12_14x14_Pitch0.5mmU8
1U_CS4237B-KQllama_shared:U_TQFP-100_14x14mm_P0.5mm_HandSolderingU3
1U_K24C08llama_shared:U_SOT-23-5U5
1U_MAX16054llama_shared:U_TSOT-23-6U1
1U_MAX3243llama_shared:U_SSOP-28_5.3x10.2mm_P0.65mmU6

Questions

How big is the TinyLlama PCB?

It measures 100 × 77 mm and has 4 copper layers, 1.59 mm thick.

What parts does the TinyLlama use?

139 parts, built around the CR1220-2. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the TinyLlama KiCad files?

From the eivindbohler/tinyllama2 repository on GitHub, at the commit this page was made from: the board is kicad/TinyLlama.kicad_pcb and its schematic kicad/TinyLlama.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the TinyLlama design in my own project?

Its repository publishes it under the GPL-3.0 licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).

More from eivindbohler/tinyllama2

1
  • 2 layers45 × 76 mmTinyLlama Wavetable, the printed circuit board in 3D

    TinyLlama Wavetable

    eivindbohler/tinyllama2

    A tiny x86 retro computer

    11 parts138GPL-3.0

Similar boards

  • 4 layers100 × 66 mmTinyllama, the printed circuit board in 3D

    Tinyllama

    eivindbohler/tinyllama

    A tiny x86 retro computer

    114 parts309GPL-3.0
  • 2 layers18.3 × 31.1 mmNwX287, the printed circuit board in 3D

    NwX287

    necroware/nwX287

    Drop-In replacement for Dallas, Benchmarq, Odin and other RTC modules

    5 parts236GPL-3.0
  • 2 layers96 × 74.4 mmMonolith, the printed circuit board in 3D

    Monolith

    luftaquila/monolith

    DIY wireless real-time datalogging platform for Student Formula and Baja.

    138 parts45
  • 4 layers100 × 100 mmUaefi, the printed circuit board in 3D

    Uaefi

    rusefi/uaefi

    🔴Community support ONLY 🔴 https://www.facebook.com/groups/rusEfi 🔴 Discord🔴 Commercial Support 🔴

    171 parts39
  • 4 layers108 × 50 mmFED3, the printed circuit board in 3D

    FED3

    KravitzLabDevices/FED3

    Feeding Experimentation Device version 3

    114 parts36GPL-3.0
  • 2 layers60 × 100 mmEsp gps ntp, the printed circuit board in 3D

    Esp gps ntp

    liebman/esp32-gps-ntp

    This is an esp-idf app using platformio.

    28 parts22MIT
  • 4 layers99.1 × 91.4 mmPanel, the printed circuit board in 3D

    Panel

    bfrigon/alarm-clock-v3

    Alarm clock (v3)

    187 parts18CC-BY-SA-4.0
  • 2 layers70 × 56 mmOrbigator, the printed circuit board in 3D

    Orbigator

    wyolum/orbigator

    Analog orbit propagator.

    61 parts17