A couple of years back, I stumbled upon an intriguing project created by MCUHacker01, which involved an ESP8266 PC-XT Emulator. I was truly fascinated by the idea of a compact ESP8266 capable of booting up a DOS system. However, at the time, I was heavily occupied with other projects, so I made a mental note to return to this endeavor in the future.
I'm aware that numerous experts have already transitioned to using the ESP32 for PC-XT emulation, with some impressive projects that boast VGA output and increased speed. I intend to explore these projects in the future. However, for now, I'm content with making the most of the ESP8266 boards I currently possess and maximizing their capabilities.
A week ago, I came across a Hackaday.io article authored by Steve L, who had been actively working on the same project since 2018/2019. Seeing that the project was documented on Hackaday.io, I decided to share my own project here as well. I only wish I had discovered Steve's project logs earlier, as many of the challenges I encountered were thoroughly addressed in his project. It would have saved me a considerable amount of time spent troubleshooting. Nevertheless, I consider myself fortunate to have tackled these issues independently, which allowed me to gain a deep understanding of how an IBM PC-XT operates. In fact, I even managed to push the project a step further than Steve did.
The major breakthrough occurred when I incorporated the ESP-PSRAM64H SPI PSRAM into the project. However, due to the limitation of establishing communication between the ESP8266 and the PSRAM using a single-line SPI protocol, the RAM access speed was less than ideal. In comparison to the "standard" IBM PC-XT running at 4.77MHz, the final emulator's speed ranged from 30% to 80%, and in some cases even up to 90%. Since many games heavily rely on RAM access, they ran at a significantly reduced pace. Simpler games like PC-man and Paratrooper, which happened to be personal favorites from my childhood, ran nearly at full speed. Additionally, I managed to perform some tasks with Lotus 1-2-3. However, due to the ESP8266's limited GPIO availability, I couldn't emulate a printer port to produce printed output of my work.
Regarding the I/O ports, I successfully replicated a serial port using the two remaining GPIOs. Since there were no additional GPIOs available (though I briefly contemplated utilizing GPIO10), I had to forgo hardware flow control. Consequently, the sluggish emulator was only capable of receiving serial data at a rate of approximately 300 bits per second (bps). I established a connection between the Serial I/O port (3F8) and an ESP01s Serial Wifi Modem, crafted a basic terminal program with QBASIC, and managed to connect to several Bulletin Board Systems (BBSes).
An additional ESP01s was required to handle the WiFi connection since the primary ESP8266's WiFi function had been configured to operate in deep sleep mode. This adjustment was made because the ESP8266's WiFi radio consumed valuable heap memory, causing a slowdown in emulator performance and generating a high number of interrupts that significantly impacted video generation.
If you've successfully built a similar setup, I'd greatly appreciate your comments and feedback. I'm more than willing to provide assistance if you encounter any issues while attempting to get the emulator up and running. Furthermore, please feel free to share any code improvements you've made, as this collaborative effort can contribute to enhancing the overall project.
List of Features added:
- Added PSRAM as the emulator RAM.
- Disk image address change to 0x100000. Possible of a 1.44M or 2.88M floppy disk image;
- Video mode 2 and 3, 80x25 text mode: Text is still white, and I added a 1-bit background (black or grey);
- Added video mode 0 and 1, 40 x25 text mode: White text, 1-bit background (black or grey);
- Added video mode 4 and 5, 320x200:...Read more »