

TinyLlama Wavetable
A tiny x86 retro computer
- Size
- 45 × 76 mm
- Copper layers
- 2
- Thickness
- 1.6 mm
- Parts
- 11
- Nets
- 73
- Pads
- 132
- Tracks, vias
- 134, 28
- Pours
- 2
- Routed
- Yes
- KiCad
- KiCad 7 (file 20221018)
- Created
- 10 Feb 2023
- Updated
- 21 Aug 2023
Overview
TinyLlama Wavetable 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 2-layer board of 45 × 76 mm with 11 parts on 73 nets, routed with 134 tracks and 28 vias.
Its parts include 6 connectors, 1 capacitor, 1 resistor and 1 switch.
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
- Summary
- Project Goals
- What's New In Version 2?
- Full system specs
- Building
- MT-32 / General MIDI
- WiFi Connectivity
- Wiki
- Help
- Roadmap
- Contributing
- License
- Contact
- Acknowledgements
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
- Maximum resolution: 1024x768, 60 Hz
- 4 MB SRAM
- Alternative graphics cards
- 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
- Custom Coreboot/SeaBIOS ROM
- MS-DOS / FreeDOS
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
- GY-PCM5102 DAC module
- Raspberry Pi Zero 2 W with a microSD card
- An mt32-pi compatible OLED display, optional but nice
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
- Download the latest firmware binary from this repo, in the
hidman-binaryfolder. Alternatively, get the latest source code from the official repo and compile it yourself. - Download and install
WCHISPTool_Setup.exefrom 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. - Open the
WCHISPTool_CH54x-55xapplication. - Make sure the TinyLlama is powered off.
- Remove the jumper from the "HID_POWER" pin header on the PCB (to ensure that the computer doesn't backpower the TinyLlama).
- Connect a USB cable (type A to type A) between one of the HID USB ports on the TinyLlama and the Windows computer.
- Press and hold the "PRG" button on the bottom side of the TinyLlama until the CH559 device pops up in the WCHISPTool.
- Select the firmware binary file under Download File -> Object File1.
- Click the "Download" button. Hopefully you'll get a success message in the log section on the right side of the program window.
- Disconnect the USB cable.
- Add the jumper to the "HID_POWER" pin header on the PCB.
- 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:
- 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.
- Do a block-level transfer of the
INITBIOS.IMGfrom this repo to the USB drive. Use Balena Etcher, or the command line if you know what you're doing (macOS example):
$ diskutil list
(Find your USB drive, eg. /dev/disk2)
$ diskutil unmountDisk /dev/disk2
$ sudo dd if=INITBIOS.IMG of=/dev/rdisk2 bs=1m- Insert the USB flash drive into the TinyLlama and turn it on. It'll hopefully boot into MS-DOS. Then, to flash the ROM:
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.
- 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.
- Insert it, turn on the system, press F12 to bring up the boot menu, and select the virtual floppy drive.
- Use
fdiskfrom the command prompt to partition the SD/USB drive and set it to beActive. - Restart and again select to boot from the virtual floppy.
Useformat c: /s /uto format the drive and copy over system files. Finally usefdisk /mbrto make sure the Master Boot Record is correct and the drive should be bootable. - Copy over the
DOSfolder from A: to C:.
You can either do this manually and createCONFIG.SYSandAUTOEXEC.BATfiles to your liking, or more conveniently, just run theSETUP.BATscript 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
- Copy the
CS4237BandUNISOUNDfolders from this GitHub repo over to your SD/USB boot drive and start the system. - To program the firmware, run the
RESOURCE.EXEcommand below and check that you get the same output:
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- Make sure the correct
BLASTERenvironment variable is set andUNISOUND.COMcommand is called fromAUTOEXEC.BAT. Note that the 8-bit DMA channel is 1 and the IRQ is 7:
SET BLASTER=A220 I7 D1 P330 T4
C:\UNISOUND\UNISOUND.EXE /V60 /VW60 /VF60 /VL60 /VP60 /VC0 /VM0- Reboot the system, and you should get the following output:
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]- Feel free to experiment with the different volume levels, look at the
C:\UNISOUND\UNISOUND.TXTfile for further guidance. - 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:
C:\SOFTMPU\>softmpu /mpu:330 /sb:220 /irq:7If 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
- Sergey Kiselev for sparking my interest in designing and building computers.
- Rasteri for introducing me to the CS4237B chip.
- The Vogons forum for inspiration, help and support.
- 86Duino / DMP for making a great and affordable system-on-module.
- Dale Whinham / mt32-pi for making the best synth emulator software.
Parts
11| Qty | Value | Footprint | References |
|---|---|---|---|
| 2 | H_HOLE | llama_shared:H_440_HOLE | H1, H2 |
| 1 | 10k | Resistor_SMD:R_0603_1608Metric | R1 |
| 1 | 10uF | Capacitor_SMD:C_0603_1608Metric | C1 |
| 1 | AUDIO_OUT | llama_shared:P_CONN_02X03_SMD | J4 |
| 1 | PI_WT_TOGGLE | llama_shared:SW_1MS1T2B4M6QES | SW1 |
| 1 | PI_ZERO | llama_shared:J_CONN_RPI_SMD | J2 |
| 1 | P_CONN_01X03 | llama_shared:P_CONN_01X03_SMD | J5 |
| 1 | P_CONN_01x06 | llama_shared:P_CONN_01X06_SMD | J6 |
| 1 | TINYLLAMA_PI_CONN | llama_shared:J_CONN_RPI_MIRRORED_SMD | J1 |
| 1 | WAVETABLE | llama_shared:J_CONN_WAVETABLE | J3 |
More from eivindbohler/tinyllama2
1- 4 layers100 × 77 mm

Similar boards
- 2 layers60 × 30 mm

Controller
google/mozc-devices
Circuit diagrams and firmware source code for Gboard DIY keyboards
11 parts3kApache-2.0 - 2 layers103 × 30.5 mm

- 2 layers26 × 30 mm

Expansion Card
FrameworkComputer/ExpansionCards
Reference designs and documentation to create Expansion Cards for the Framework Laptop
11 parts1.1kCC-BY-4.0 - 2 layers53.9 × 23.2 mm

Buffer
hoglet67/RGBtoHDMI
Bare-metal Raspberry Pi project that provides pixel-perfect sampling of Retro Computer RGB/YUV video and conversion to HDMI
11 parts1kGPL-3.0 - 2 layers10 × 20 mm

2 connector Sensor Board
hackclub/OnBoard
💡 Join 1,000 teenagers and make your first PCB with a $100 grant!
11 parts915 - 2 layers

- 2 layers47 × 33 mm

Sevensegment led display module
tardate/LittleArduinoProjects
a collection of "Little Electronic & Arduino Projects", most involving electronics or an Arduino in one way or another!
11 parts803MIT - 2 layers42.5 × 36.8 mm

Devboard
basilfx/TRADFRI-Hacking
Hacking IKEA TRÅDFRI products, such as light bulbs, window blinds and other accessories.
11 parts743CC-BY-4.0
Questions
How big is the TinyLlama Wavetable PCB?
It measures 45 × 76 mm and has 2 copper layers, 1.6 mm thick.
What parts does the TinyLlama Wavetable use?
11 parts. 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 Wavetable KiCad files?
From the eivindbohler/tinyllama2 repository on GitHub, at the commit this page was made from: the board is wavetable-adapter/kicad/TinyLlama-Wavetable.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 Wavetable 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).