flat assembler
Message board for the users of flat assembler.
Index
> Projects and Ideas > EPC - 80186 emulator |
Author |
|
Artlav 20 Nov 2010, 14:30
EPC is an emulator of PC-XT and similar computers. It simulates one of 8086,8088,80186, 80188, NEC V20 or NEC V30 CPUs, with 80286 potentially planned, and can run many older DOS programs and early PC games. Here is the emulator itself and pc-dos 4 image, rather empty without the next file: http://orbides.1gb.ru/ape/epc-win32-101120.zip (1Mb) (Patch, described in post 3: http://orbides.1gb.ru/ape/epc-win32-101120-p1.zip ) And there is a collection of cpuid tools, utils, programs and some games: http://orbides.1gb.ru/ape/epc-moreprogs-101120.zip (2.2Mb) Why make it? Bochs emulates all the modern stuff, Qemu aims at running programs, DosBox aims at running games. In my case, the cut-off is around 80286, maybe a little lower if 286 turns out to be too hard. At that time the x86 architecture were the most consistent and clear, in my opinion. I want to make an emulator for the hardware of that era, bugs and oddities included (And learn how all that hardware worked). So, is there anything like it already made? Would anyone want it? What would you like to see in it? Does it even work for you? Feedback is welcome. Last edited by Artlav on 20 Nov 2010, 18:52; edited 2 times in total |
|||
20 Nov 2010, 14:30 |
|
vid 20 Nov 2010, 15:42
|
|||
20 Nov 2010, 15:42 |
|
Artlav 20 Nov 2010, 18:28
Just in case, here is a small patch, incorporating a few recent discoveries:
http://orbides.1gb.ru/ape/epc-win32-101120-p1.zip (Over 101120) -Fixed mov cs,... on various CPU's -Fixed irq and mov ss,xx on various CPU's -Fixed NEC not using AAD base, putting 10 always -Fixed NEC misdetection thru 8086 interrupt bug -Added CMOS 8086 Now all CPUID tools capable of it tell NEC and intel CPU's apart precisely. x88 against x86 is not so clear yet, the only way to tell them apart is the prefetch queue length, and how prefetching work i'm researching only now. |
|||
20 Nov 2010, 18:28 |
|
Ninho 29 Jan 2011, 16:42
If, and when, you go along and start coding the 80286 emulation, I suggest you contact me (private msg on this board) for a few tips on some undocumented or falsely documented behaviour of the proc.
I communicated some of the stuff to Ralf Brown 10 years ago or so, for eventual corrections to the interrupt list, e did acknowlege but unfortunately stopped updating his lists and that was never published. Haven't checked your EPC yet, though I don't doubt it is nice and all. What language is the emulator itself coded in ? |
|||
29 Jan 2011, 16:42 |
|
Ninho 29 Jan 2011, 16:56
Artlav wrote:
Look for Robert Collins's old pages ( at x86.org if memory serves) for hints on how prefetching works on 286 versus 386. 8086/88 are simpler yet, you'll get the idea of the mechanism involved in both prefetch and predecode queues, and how to measure those experimentally by self modifying code - you need working microprocessors in order to do the actual tests, of course. I think I remember queue lengths (without details on their actual workings) were stated on old documentation, you d'have to look for old printed or archived on the web Intel manuals/books. If your goal is a very accurate simulation of the prefetch mechanism (possibly not necessary), you must know for each processor type, at least : - the prefetch queue length in bytes - access width (surely, 1 byte on 8088/ 2 bytes on 8086) - "low water" height, when to trigger a prefetch (assuming bus available) - the predecode queue length (if any) - low water height for transferring from prefetch to predecode - possibly more... none of which were ever documented by Intel or competitors (but see R. Collins's notes) HTH |
|||
29 Jan 2011, 16:56 |
|
Artlav 29 Jan 2011, 17:43
Ninho wrote: If, and when, you go along and start coding the 80286 emulation, I suggest you contact me (private msg on this board) for a few tips on some undocumented or falsely documented behaviour of the proc. Not sure when i'll get to it, so i'll appreciate if you can send your notes over, whenever you ready/want. Ninho wrote: What language is the emulator itself coded in ? Ninho wrote: Look for Robert Collins's old pages ( at x86.org if memory serves) for hints on how prefetching works on 286 versus 386. 8086/88 are simpler yet, Here are the newer files, the emulator itself: http://orbides.1gb.ru/ape/epc-110128.zip (2.8 Mb) And the HDD image: http://orbides.1gb.ru/ape/epc-hdd.zip (54 Mb) -80186/80188 difference is now emulated, if one wants. -Loose emulation supported, which drops some precision for speed -Windows 3.0 works, many more programs work Comments are welcome, as usual. Ninho wrote: If your goal is a very accurate simulation of the prefetch mechanism |
|||
29 Jan 2011, 17:43 |
|
JavierDonoso 24 May 2011, 21:06
Don't forget to add 486 and Pentium emulation!
|
|||
24 May 2011, 21:06 |
|
Artlav 26 May 2011, 12:37
JavierDonoso wrote: Don't forget to add 486 and Pentium emulation! :) I'm working on 286 now, and that is the ceiling of what this emulator would be able to do. Even 286 is somewhat pointless - i'm at loss to find any software that would be using it's features extensively. |
|||
26 May 2011, 12:37 |
|
vid 26 May 2011, 13:54
Didn't Windows 3.x use 286 protected mode?
|
|||
26 May 2011, 13:54 |
|
Artlav 26 May 2011, 17:47
Windows 3.0 runs on 8086, so i guess no, not necessarily.
Haven't tried 3.11. But with 286 enabled, 3.0 starts using the protected mode, so i guess it can use both. No luck yet running it in PM however. I should have said commented and documented software that uses 286 is hard to find. Reverse-engineering and making the emulator at the same time is a bit tricky. |
|||
26 May 2011, 17:47 |
|
rugxulo 26 May 2011, 17:53
Win 3.0 optionally ran in three modes: 8086 (real mode), 80286 (task switching only for DOS though Win16 apps could cooperatively multitask), 80386 (386 extended pmode w/ multitasking DOS sessions). Win 3.1 was 286/386 only, and 3.11 (aka, WinForWorkgroups?) was 386 only. The internals of Win 3.x used DPMI 0.9 / 16-bit [sic] to implement its stuff.
Artlav, I did respond to you in the other thread almost a month ago, but it here sounds like you didn't even see it (oops). I know it's not much help but better than nothing! |
|||
26 May 2011, 17:53 |
|
Artlav 26 May 2011, 18:02
Sorry, apparently lost to backlog as well.
Thanks for the examples, i'll look at them. |
|||
26 May 2011, 18:02 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.