ESP8266 TVout library

The TVout library for the Arduino was a huge success.
Now it’s time to run composite  video output on the ESP8266.

The ESP8266-TVout library pushes pixels out on the i2s data line with DMA.
So very little of the CPU (10%) is wasted.

First version is only B/W video supporting these resolutions:

  • 1024×224 mono gfx
  • 640×400 mono gfx
  • 640×200 mono gfx
  • 512×448 mono gfx
  • 512×224 mono gfx
  • 320×400 mono gfx
  • 320×200 mono gfx
  • 256×448 grayscale gfx
  • 256×224 mono gfx
  • 256×224 grayscale gfx
  • 256×112 grayscale doublebuffer gfx
  • Debug window

Could you run Wolfenstein on it?

With the 224×112 doublebuffer mode you probably can.

PC-XT Emulator on a ESP8266

IMG_20180222_191015

Can you run a 8086 PC-XT emulation with 640K RAM, 80×25 CGA composite video and a 1.44MB MS-DOS disk on a ESP12E without additional components?

Yes, you can and I did.

The CPU emulator is a port of Mike Chambers FAKE86.
And the composite video is based on the work of Cnlohr and Hrvoje Cavrak

ESP8266_CBVS

The video is output using DMA i2s and uses only about 10% of the CPU.
The components makes a lowpass filter at 7MHz and a correct NTSC CVBS signal.

The video has a resolution of 640×200 and is a subset of the upcoming ESP8266 TVout library.

1MB of the flash is used as a swapfile and creates virtual RAM space to the emulation through a MMU caching system.

The MS-DOS 3.3 1.44 MB bootdisk image is uploaded into the ESP8266 flash and accessed from the emulator as drive A:

It has been tested with MS-DOS 6.22 and works as well.

I used MS-DOS for reference. To not break any copyright you can use a Free-DOS image available here: http://www.fdos.org/bootdisks/

A HDD can be supported through SPI and the SD library.
Networking is supported through the ESP8266 Wi-Fi.

I’m using a 3.5″ TFT CBVS display so the text is quite small.
A larger CBVS monitor will show a crisper picture.

Source code available here

Some people have noted that it is too slow for any useful work. But it’s not.

At the moment the code has no keyboard so to be able to get past BIOS boot the irq1 line is flooded with keyboard presses.

This slows the emulation down.

The ESP8266 runs at 160MHz and makes the emulated 8086 run at about 300K instructions per sec, nearly the same as the original 4.77MHz 8086.

Once keyboard code is added it is actually very useable.

Once keyboard and mouse code is added, here are 2 of the GUI’s it will run:

Windows 3.0

WIN3.0

GEM Desktop

GEM