I think I am having a problem here... 80386EX - Page 1
Forum section: electronics / general

author: technix
author_rank: Super Contributor
timestamp: March 18, 2019, 06:21:48 pm
content: A few days ago I bought a few Intel 80386EX samples (as an order padding for my replenishment stock of CY7C68013.)What can I do with those 5V QU80386EX-33TC chips? Can it run underclocked at 3.3V at 25MHz, just like the QU80386EX-25TB version? Being a 32-bit processor with full MMU what can I run on it? What is the appropriate firmware to use - SeaBIOS or just go with TianoCore UEFI? And what is the appropriate graphics stack for it?

author: Ampera
author_rank: Super Contributor
timestamp: March 22, 2019, 06:00:58 pm
content: What can you do with it? Well what do you want to do with it?You seem to be putting the 386 in general in a fairly high light. 386s, and /especially/ the 386EX are old, and quite slow chips. Any modern ARM chip is going to trounce a 386, and you'll probably find some microcontrollers taking shots at the 386.Lemme answer your questions to start off with. Can you underclock it? Yes, the 386EX specifically can run as slow as you like, even to the point of being halted. You should be able to underclock even normal 33Mhz 386s to 25Mhz no problem. There's no restrictions, and there isn't even a clock multiplier.Can it run at 3.3V? No clue, check the datasheet. If it says it's a 3.3V chip, then it runs at 3.3V. If it says it's a 5V chip, then it runs at 5V. The clock speed isn't really going to change that if that's part of what you're asking.What can you run on it? Not much. The 386EX is cut down compared to a desktop 386, and that's already not a good starting point. As far as I know, Linux won't run on a 386, not without extensive modifications (which might have been done for you) due to the lack of an x87 FPU. Even if it does run, you'd probably have thrown away most of your performance at that point, so you'd likely want to stick to running your own software written in C, Pascal, or Assembly. There is a large set of special purpose embedded DOS software, and if you want a few things like file system management done for you, DOS is a good starting point. Probably the most impressive thing you'd be able to manage is an IP stack, IMO.What firmware to use? Even today we argue if UEFI is a significant performance/resource hog compared to BIOS implementations, but regardless of the implications compared to a modern machine, I'd wager that any UEFI implementation is going to be A. massively overkill B. uselessly slow, if available at all. Since you're going to be stuck with DOS or PC booters anyways, BIOS is about all you'd be looking at.Graphics depends on what you want to do with it. If you intend to use it as a PC, throw it out and get a real 386 and a real 386 motherboard. If you want it for your own embedded tasks that particularly need graphics, you could in reality throw whatever you want on there. Keep in mind you are limited to a 16 bit data bus, which is going to kill performance, even if you put whatever graphics solution you use right on the bus. If you plan to run your own software, use whatever, if you intend to run DOS with other people's software, you'd be looking at either emulating, FPGAing or using some sort of MDA/CGA/EGA/VGA/SVGA graphics solution, either on the system bus, or adhering to a standard like ISA, VLB, MCA, EISA, or potentially PCI.TL;DR, while I am a fond collector of old PCs and their components, you might as well stick them on a shelf and look at them. Unless you have an embedded task that specifically needs a 386 for some archaic reason, you're better off using just about anything else, even if the point is to have a 386. I'm not gonna tell you to not have fun with it, but there are better and more interesting chips in my opinion to have fun with. You won't run anything fancy on it.

author: james_s
author_rank: Super Contributor
timestamp: March 23, 2019, 04:14:12 am
content: I remember when a 386DX-33 was hot stuff but that was >30 years ago, by modern standards it would be *really* slow, although I will say that vintage software on a vintage PC didn't feel all that much slower than modern software on a modern PC. I'd say as a retro project it could be fun, but just don't expect much in the way of performance. A modern low end ARM chip is going to blow it away by a huge margin. The lowest end Raspberry Pi is vastly more powerful than the fastest 386 PCs.

author: technix
author_rank: Super Contributor
timestamp: March 23, 2019, 11:59:35 am
content: Quote from: Ampera on March 22, 2019, 06:00:58 pmAFAIK Linux just dropped 80386 support not long ago. The original Linux kernel version 0.12 runs only on a 386 (which was what Linus had back then) and it grew from there.Quote from: Ampera on March 22, 2019, 06:00:58 pmSince there is next to no chance I can write a BIOS de novo, should I start with the open source SeaBIOS and work from there? Or take the source code of some abandonware BIOS and start from there?Quote from: Ampera on March 22, 2019, 06:00:58 pmI think I will have to FPGA it (since I need FPGA for SDRAM support anyway.) I wonder if I can use a Cortex-M7 chip like a STM32F767 as a GPU to the 80386, using a modern-ish shared main memory + dedicated VRAM architecture?Quote from: james_s on March 23, 2019, 04:14:12 amIt has modern amenities while still using old software. Hopefully it can be faster than an actual 30-year-old machine.

author: ebastler
author_rank: Super Contributor
timestamp: March 23, 2019, 01:09:10 pm
content: Quote from: technix on March 23, 2019, 11:59:35 amWell, we all set our own goals and rules/constraints for such hobby projects; so you are obviously free to build this. But I must say that this seems like a rather awkward and forced concept to me. The Cortex-M7 will have more computing power than the 386. (And, depending on its size, probably the FPGA will too.) Feels a bit like building a relay computer and then using a powerful microcontroller to connect a keyboard...

author: Ampera
author_rank: Super Contributor
timestamp: March 27, 2019, 05:45:33 am
content: Let me just get this across, the 386EX is /not/ a normal 386. You're dealing with many limitations, some potentially helpful and some potentially damning.I have to agree with ebastler, this is a very strange project. If the goal is to just have a 386, you'd save yourself so much time and effort by simply picking up a 386 motherboard, 386 DX33 (idk if there was a DX40), and a few cheap ISA cards off ebay. I did it for my 486 build and am quite happy with it.Even if the goal is to design your own PC compatible, there's tons of better ideas than using a 386EX. Base something around the 8088/8086, as those are far simpler chips, and you don't have to deal with complicated memory architectures, and shit like that. If you do want to make something 386, why stop at a 386EX? Make your own full fat 386 motherboard, I know people have done it as a hobby project already, and if you look around, people might have been kind enough to document the process, and give you really important schematics and information you'd need.If you are thinking this is going to be faster than an actual 30 year old machine (than a real 386 DX-33/DX-25) then you are thoroughly mistaken, it's going to end up slower and less capable. The 386EX is a cut down 386, it's not clock increased, it has no "modern amenities" beyond a 32-bit ISA and I guess an MMU. You are also limited to 64MiB of DRAM, which is probably not a problem since nothing powerful enough to need that much will run here.To just put into scale of how terribly slow this chip is (especially at 25mhz), 1993's Doom was a hit FPS years after the 386 first hit the market, and was targeted primarily at the available 486 chips on PC, with the ability to just /barely/ eke by on a 386 if you are particularly insane. This chip would absolutely DIE even harder than a desktop 386 if you tried to do something as modernly simple as Doom. This chip came out in 1994, and was intended to be a very low power solution for the time, intended for things like GPSes, satellite phones, and even things like microsatellites.I can still get just wanting to use /this/ chip, because you happen to have it, and think it might be an interesting challenge, so if that's what you /really/ want, then I can provide some better pointers than just do something else.As for BIOS, if you're worried about IBM PC compatibility, then you might as well not even bother with the FPGA, and simply implement a real ISA bus. Any 32-bit bus is out of the question, as you only have a 16-bit data bus available, and doing any fancy shit would be far outside the scope of this sort of project. That way you can use a real VGA card (or FPGA your own if you really want), as well as things like real I/O cards, drive controllers, and whatnot.If you don't care about it being IBM PC compatible, and just plan to run your own software, then you might as well write your own basic firmware while you're at it instead of modifying the rather complex IBM firmware. You can then throw out any woes about ISA bus, switching, among other goodies, and can just have your own thing load in programs from whatever.

author: technix
author_rank: Super Contributor
timestamp: March 28, 2019, 03:59:06 pm
content: Quote from: Ampera on March 27, 2019, 05:45:33 amI am sampling a few Microsemi SmartFusion (the original SmartFusion, not the SmartFusion 2 version) for this project. That chip combines a 80MHz Cortex-M3 and a FPGA in one. Also unlike the TQFP variant of SmartFusion 2, the TQFP-208 version of the original SmartFusion has two FPGA-accessible ports to the internal AMBA AHB-Lite bus matrix, one bus master to allow the vintage CPU to join the bus as an equal to the Cortex-M3, and one bus slave for additional peripherals I need to implement.While I am trying to be code compatible with IBM PC, I am not hoping for hardware compatibility. As of modern amenities, I have things like DM9000A for Ethernet, CH375 for USB OTG, and JMH330 for proper SATA SSD interface.

author: Ampera
author_rank: Super Contributor
timestamp: March 28, 2019, 07:41:49 pm
content: Yeah, none of that's gonna run like you think it is. Your 80Mhz Cortex-M3 would run absolute circles around that 386, and you'd be lucky to get 10mbps Ethernet and USB1.1 speeds, not to mention there is /nothing/ that a 386 could reasonably run that even supports SATA, USB, or maybe even your Ethernet adapter. Most modern thing you could eke by with is MAYBE an old version of FreeBSD with a bunch of the packages stripped out.

author: james_s
author_rank: Super Contributor
timestamp: March 28, 2019, 09:34:01 pm
content: The first time I ever saw USB was on a Pentium-133 running Windows 98 and that was the primitive early stages when USB was cutting edge and only used for keyboards, mice and game controllers. The early systems were primitive enough that many BIOS didn't support USB natively so a USB keyboard couldn't work until Windows booted. This was years after the 386 was already obsolete.Things changed way faster back then too. A 3 year old computer was almost hopelessly obsolete. By the time it was a year old it wouldn't run some of the latest software. Completely different than today where a 10 year old computer is still quite usable.

author: rsjsouza
author_rank: Super Contributor
timestamp: April 07, 2019, 10:19:31 pm
content: Not an EX, but for the full featured 386s out there... You may want to take a look at this (already old) project:https://hackaday.com/2015/11/17/a-modern-386-development-board/Back then, the 386 had a huge gap when compared to its successor, which was the absence of a math coprocessor (at least one that wouldn't set you back $500). So many avenues were opened by this feature at the time that the 386SX/DX family was very quickly sent to oblivion. The EX was one of the multiple attempts to get into embedded, with some success (I have seen it in many telecommunications devices such as car phones and automotive GPS units).

author: technix
author_rank: Super Contributor
timestamp: May 08, 2019, 07:47:41 pm
content: Quote from: james_s on March 28, 2019, 09:34:01 pmI am using USB and Ethernet chips with internal protocol offloading though. CH375 is a USB 1.1 OTG chip with USB Mass Storage offloading. DM9000A has Ethernet layer 2 offloading and if I go with W5100 that thing even offloads layers 3 and 4.Quote from: james_s on March 28, 2019, 09:34:01 pmI believe smartphones are to blame here, forcing developers to either scale their software back or move execution to the cloud (aka server-side operations.) Hardware is progressing just as fast, but software is scaling down instead. The proregress is curious.

author: james_s
author_rank: Super Contributor
timestamp: May 08, 2019, 10:26:25 pm
content: I don't think it's that, smartphones have had the same sort of crazy fast development followed by a recent plateau. PCs just got to the point where they got faster than most people need. Software reached the point where it does everything people need it to do and there is power to spare in even rather low end machines for what most use them for.

author: rsjsouza
author_rank: Super Contributor
timestamp: May 09, 2019, 12:20:55 pm
content: Exactly this^^^The industry will have to come up with something a bit more exciting than purely advertising "5G", given that internet access is good enough for the early adopter societies, and keep investing in gizmos or features or accessories that may cause a disruption in the market.

author: james_s
author_rank: Super Contributor
timestamp: May 09, 2019, 04:56:17 pm
content: I would prefer they just accept the fact that people don't need to upgrade as often and adjust to deal with lower sales. Even when things were progressing faster I've thought it's ridiculous and wasteful how often people replace smartphones. I'm on only the third mobile phone I've ever owned, I've used them an average of 5 years each and when I retired the first two due to obsolescence they were still in excellent condition. I see so many late model smartphones with cracked screens it's just ridiculous, I've always treated mine like the expensive precision instrument that it is, with a little care they can last years.

author: technix
author_rank: Super Contributor
timestamp: May 09, 2019, 07:55:38 pm
content: Quote from: james_s on May 09, 2019, 04:56:17 pmYet they don't want to accept it.On the CPU side things are stalling. My dual socket workstation was bought in 2013 - 5 years old already - but after some cheap upgrades its multi-core performance with two Xeon E5-2680 is on par with a Core i7-9700K at stock clocks, so it is unlikely that I will upgrade that base machine anytime soon. And I still have the room to go with two Xeon E5-2697v2.On the other hand the graphics card world is fast moving. One of the more recent upgrades - the GTX 1060 3GB - is already showing its age under the stress of Windows 10 Pro for Workstation version 1809, a 4K monitor and KiCad OpenCL rendering at that resolution.Quote from: james_s on May 08, 2019, 10:26:25 pmEven now smartphone processing power is nowhere near that of full PC's - even counting Apple's crazy A12X chip on iPad Pro which is the highest performance mobile processor ever produced as of May 2019. Since we are seeing a lot of apps being shared across mobile devices and PC's, and since I believe that no developer in their sane mind would maintain two separate code bases targeting PC and smartphones, it means the whole codebase must scale down to fit that processor.Also since the mobile world is a resource-scarce environment the optimizers in compilers are improving fast too. Especially the LLVM stack who have Apple, Google, IBM, Intel and AMD all contributing code and optimizers. (It also explains why recent versions of LLVM has became such CPU hogs when switching on optimizations at -O2, -Os, -O3 or -Ofast levels. Too bad there isn't a way to set up a machine with 32 threads, all running at 4GHz or above, and runs macOS.)

author: james_s
author_rank: Super Contributor
timestamp: May 10, 2019, 05:12:44 am
content: Quote from: technix on May 09, 2019, 07:55:38 pmI never said it was, but smartphones have reached the point where they are more than powerful enough for the things most people want to do on them. Nobody is doing proper video editing, audio production, CAD, 3D rendering or other heavy duty stuff on mobile devices, or if they are then they're using the wrong tool for the job. I use my smartphone for phone stuff, text messaging, checking my email, GPS navigation, my grocery shopping list, taking photos, fitness tracking, light duty web browsing, for all of these things the phone I've had for a couple years now is more than adequate. I don't foresee needing more processing power or memory for years and when I do it will probably be artificial bloat added to apps and web pages, not the addition of useful new capabilities.