Hacker News new | past | comments | ask | show | jobs | submit login
PC-XT Emulator on a ESP8266 (2018) (mcuhacker.wordpress.com)
112 points by DanBC on April 9, 2020 | hide | past | favorite | 33 comments



I'm always fascinated to see these projects on ESP8266. The board is great, but the ESP32 is a lot better - bluetooth LE, WiFi and dual-core at 240mhz, vs the WiFi and 80mhz available on the 8266. The firmware wasn't as robust until recently, but these days I use it constantly for little projects.


I’ve got projects on both, but honestly the extra power of the ESP32 is sort of overwhelming. If I want to use DMA SPC on the 8266, there’s only one pin I can use. On the 32, I can choose between most of the pins, but certain choices will prevent me from using certain other features, not that I necessarily need other features right now but maybe later, and also it affects my circuit layout. So the mental overhead is a lot higher!


I'm in the same boat, plus the ESP8266 (and the ESP8285, there are some very nice bare packages of it) is only $1.8, so I can toss it into whatever throwaway thing and not care.


The $1 cost of the ESP8266 makes it usable for throw-away devices. Want a device to sit in the bottom of every coffee cup and notify you when the coffee is cold...? ESP8266 might be doable, the ESP32 won't be unless your coffee is very expensive...


No more electronic waste please. I doubt a termochromic paint strip costs more than $1 USD.


The ESP32 is a lot better in many ways, but it suffers a bit from version 2 syndrome. The decision to go dual-core in particular. Personally I'm looking forward to the ESP32-S2 coming in quantity.


The S2 lacks Bluetooth though, doesn't it?

The second core is meant to handle the network stack, leaving the first core to focus on program logic. With ESP8266s, it can be hard to write complex applications while keeping heavy WiFi usage stable.

Although, I'll bet the 8266 firmwares and libraries have improved a lot since I was using them.


The ESP32-S2 is best thought of as a spiritual successor to the ESP8266. If you need Bluetooth, I’m pretty sure the ESP32 is still being produced.


What's wrong with having dual core?


Because it’s simply too slow for dual core to be useful. Few people will bother investing programming resources to extract maximal benefit out of those dual cores when faster single cores are dirt cheap.


What I (and, probably, a lot of people) would actually like to have is a 486 emulator (with at least 8 MB RAM) with a working ISA bus I could connect old extension cards to. That would be a way more practical (in fact insanely cool) although a ghost of a genuine antique like 640K XT still surely is a fun thing to touch. That could even have commercial applications - I believe there are many 486/ISA-based solutions still running in production in the wild.


There's ISA to USB devices for under $40 so you can hook the hardware up to a modern machine

Then I'm sure you can use one of the many emulator solutions on the market to bridge the rest and if none are suitable it can't be that hard, the data is making it to the machine...

I'll happily make it happen if you need to hack something like qemu, sounds like fun.


I think a lot of these ISA cards are for industrial control in realtime systems, so the added latency of USB is not going to work.


Are you sure? We aren't in the world of USB 1.1 latency any more. Things have improved vastly since then.


I found two people who measured latencies, one a PCIe parallel port and the other USB 3.0:

https://stackoverflow.com/questions/41987430/what-is-the-low...

https://stackoverflow.com/questions/13831008/what-is-the-min...

PCIe parallel port: 4-8us

USB 3.0: 30us

I believe a regular PCI or even ISA parallel port can be below 1us. Those are "real" buses, unlike USB and PCIe which are more similar to packet-switched networks.


I don’t know about ISA, but pci (not e) can easily be under 1us. It would be an odd design to have even that much latency.

As measured on the bus.


Theoretical one-way latency on PCIe 3.0 ×1 for a 256-byte packet is < 0.5µs. A single register write should be < 0.1µs.


There's still latency getting data DMAed through buffers from Host to slave no matter how fast the link is. It's also non-deterministic.


Not only are they used in production, new boards are still being made and sold today. Search for PC104, which specifies a common form factor and interfaces.

There are also adapters for connecting PC104 to ISA.


Re: PC/104: There’s actually a few different variations of it. The original one used an ISA bus, yes, but as new buses were developed, new “versions” of PC/104 were released:

* PC/104: ISA

* PC/104 Plus: ISA/PCI

* PCI/104: PCI

* PCI/104 Express: PCI/PCIe

* PCIe/104: PCIe


You can easily get ARM MCUs with parallel bus interfaces, stick a CPLD on and you can make ISA out of that. The trickiest part is likely ISA DMA emulation.

e.g. STM32H750 (< $10, Cortex-M7, 480 MHz, 1MB RAM) should easily give you room for emulating a 486.


> 486/ISA-based solutions still running in production in the wild

I shudder to confirm that you are correct.

And the day one of mine truly breaks down is probably going to be the day I go looking for a new job. >D


You can buy native x86 w ISA boards still.


The same person also has a C-64 emulator working on the same board.

https://mcuhacker.wordpress.com/2018/03/03/running-the-c64-o...


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

That sounds like it would wear out the flash very quickly, especially given that the embedded flash on MCUs like these are not really designed for much in the way of write cycles (the usual case being firmware updates and configuration changes, both not high-frequency operations.)

Interesting hack nonetheless, it reminds me of this: https://dmitry.gr/?r=05.Projects&proj=07.%20Linux%20on%208bi...


Yeah, it’d almost be better to use SD for virtual memory to at least put the flash wear on something consumable.


> something consumable

ESP8266s can be had for ~$1...


On the other hand ESP8266 is probably cheaper than as SD card


Maybe not run this in mission critical production systems


Ok that is impressive... Very well done. And then to imagine I paid thousands for one back in the day (though my dad's work "PC at home" project).

I could have just waited 35 years and spent 1 buck for the ESP8266 :)


Yet, “you get what you pay for” is still true...


Can it run Wolfenstein 3D and Duke Nukem?


He has another post where he runs a super low Res Wolfenstein on an ESP8266.

https://mcuhacker.wordpress.com/2018/03/06/esp8266-tvout-lib...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: