Skip to content

kfetro/espc-x86

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

72 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ESPC-x86

ESPC-x86

PC/XT 8086 ESP32-Emulation
An IBM PC/XT 8086 emulator for the ESP32

What is ESPC‑x86?HardwareFeaturesInstallationConfigurationControlsScreenshotsLicense


What is ESPC‑x86?

ESPC‑x86 (PC/XT 8086 ESP32‑Emulation) is an emulator of a classic IBM PC/XT (8086) computer running on an ESP32 microcontroller.

The project is specially designed for the LilyGo TTGo VGA32 board. With ESPC‑x86, the ESP32 becomes a fully functional retro PC capable of running classic DOS software and Games, recreating the experience of an early IBM‑compatible computer using inexpensive modern hardware.

Hardware

ESPC‑86 is primarily developed and tested on the following board:

Supported board

Features

  • Custom GLaBIOS PC/XT compatible BIOS.
  • Intel 8086 processor (CPU) emulation compatible with PC/XT era software.
  • Intel 8087 math coprocessor (FPU) emulation (experimental)
  • PS/2 keyboard and mouse support.
  • CGA graphics card emulation (40×25 and 80×25 text modes, 320x200 4‑color and 640x200 2‑color graphics modes).
  • Hercules/monochrome (HGC/MDA) graphics card emulation with 720x348 monochrome graphics mode.
  • Tandy graphics emulation supporting 160x200 and 320x200 graphics modes with 16 colors.
  • Partial EGA graphics card emulation (up to 128 KB VRAM, 320x200 16-colors graphics mode).
  • MCGA graphics emulation (320x200 graphics mode with 256 colors1, experimental).
  • PC Speaker / buzzer sound emulation.
  • AdLib (OPL2) sound card emulation.

Installation

The easiest way to install ESPC‑x86 is using the online firmware flasher.

Web installer (recommended)

  1. Connect your TTGo VGA32 board to your computer via USB
  2. Open the following link in a Chromium‑based browser (Chrome, Edge, Brave, etc.): https://aristoteles.dma.fi.upm.es/espc-86/
  3. Follow the instructions on the webpage to flash the firmware

Make sure no other application is using the serial port before flashing.

Windows installation

  1. Download and open the Flash Download Tools from Espressif.
  2. Select ESP32 as chip type and choose Develop as work mode.
  3. Select the correct COM port.
  4. Load the firmware .bin file at address 0x0 and start flashing.

Configuration

SD Card

espc-x86 requires a specific directory structure to work. If these directories are not found during the first boot, the emulator will create them automatically for you.

Directory Structure Example:

/
└── [espc-x86]
    ├── setup.cfg          <-- Global settings (edited via Ctrl+F1 menu)
    ├── [media]            <-- All floppy and hard drive images (.img)
    │   ├── msdos622.img   <-- Your primary OS disk image
    │   └── tmp_a.img      <-- Virtual disk generated from a ZIP
    ├── [disks]            <-- Software library in .ZIP format
    │   ├── prince.zip     <-- Games, Apps, Windows 3.11, etc.
    │   └── gwbasic.zip
    └── [snapshots]        <-- Saved CPU and RAM states

Detailed Description:

  • media/: This directory contains all the virtual disk images (.img) used by the emulator. It stores both your previously created bootable images and the temporary images generated during emulation. When you select a ZIP, its content is extracted into an image file here (e.g., tmp_a.img for Drive A:) to be mounted. If you load new software into the same unit, the corresponding file in this directory will be overwritten.
  • disks/: This directory holds your applications and games compressed in .zip format. These are not mounted directly; instead, their content is extracted into a virtual disk image within the media/ directory to be used as a floppy or hard drive.
  • snapshots/: This directory is used to store the saved states of the CPU and RAM.

Note: The SD card must be formatted as FAT32.

Controls

Keyboard

  • Ctrl+F1: Main OSD Menu (System configuration and machine setup)
  • Ctrl+F2 / F3: Mount Floppy/Hard Disk (Opens a file browser to mount images, supports .zip files)
  • Ctrl+F4: Pause
  • Ctrl+F5: Mute
  • Ctrl+F6 / F7: Volume Down/Up (Displays an OSD level indicator in text mode)
  • Ctrl+F8: Snapshot (Snapshots are saved to the SD card root directory sequentially as snapshot0.bmp, snapshot1.bmp, ...)
  • Ctrl+F9: Composite Filter (Simulate CGA composite color artifacting)
  • Ctrl+F11: Hard Reset (Physical reset button simulation)
  • Ctrl+F12: Soft Reboot (Warm boot / Ctrl+Alt+Del)

Note on Mounting: After mounting a floppy image, the OSD closes and returns to the emulation. However, mounting a hard disk image will automatically trigger a system reboot to apply the changes.

Screenshots

Budokan running on ESPC-86 Lakers vs Celtics and the NBA Playoffs

Project Status

ESPC‑x86 is under active development.

The project is:

  • Usable, featuring an intuitive interface and a straightforward setup.
  • Extensible, allowing for easy integration of new features and hardware components.
  • Intended for experimentation, learning, and retro‑computing fun.

Feedback, testing, and contributions are welcome.

References and Credits

This project is a fork and continuation of FabGL, and includes code derived from 8086tiny.

ESPC‑86 extends, modifies, and integrates these works into a dedicated PC/XT emulator for ESP32.

License

This project is released under the GNU General Public License v3.0 (GPL‑3.0 or later).

See the LICENSE file for details.

Author

Jesus Martinez‑Mateo
jesus.martinez.mateo@gmail.com


Retro computing on modern microcontrollers

Footnotes

  1. Note that while 256 colors are emulated, the LilyGo VGA32 hardware can only physically display up to 64 colors.

About

PC/XT 8086 ESP32-Emulation

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors