Commit Graph

22 Commits

Author SHA1 Message Date
Zalka Ernő
b7f217c507 Merge branch 'develop' into pentium-pro 2017-09-20 16:44:32 +02:00
Jonathan Campbell
0441a1a605 begin Weitek coprocessor stub code 2017-09-16 21:54:45 -07:00
ern0
274c217729 Two patches applied. 2017-09-13 22:29:26 +02:00
Jonathan Campbell
bdc7e2f214 read and cache segment "expand down" flag and use it for segment limit
checking.
2015-05-26 02:04:48 -07:00
Jonathan Campbell
155ded4ad0 begin adding code to track segment limit (like the cache on real
hardware).
2015-05-26 01:00:13 -07:00
Jonathan Campbell
42e38d2939 new 8086 separate code 2015-04-05 17:12:14 -07:00
Jonathan Campbell
202ff39f73 add stub constants and code for eventual support of 80186 level CPU
emulation.
2015-04-05 09:13:08 -07:00
Jonathan Campbell
b6cd655e0b copy normal core, to make 286 normal core. 2015-04-04 13:21:53 -07:00
Jonathan Campbell
cd8e2084ad add constants and support code for new options cputype=286 and
cputype=8086 for 8088 and 286 level CPU emulation respectively. At this
time, all the setting does is change the prefetch queue and how the
FLAGS register acts. So far I have tested that cputype=286 is able to
trick programs into detecting a 286 rather than a 386 (those using
Intel's CPU detection algorithm).

Test results:
 cputype=286    Windows 3.1 seems to attempt 286-ish mode switching (doesn't work yet)
 cputype=8086   Windows 3.1 errors out, says it needs 286 for standard mode

Notes:
 MSD.EXE (Microsoft Diagnostics) reports the CPU as 80186 when
cputype=8086. How do we fix this?
 MSD.EXE correctly reports CPU as 80286 when cputype=286, but then
reports the FPU as a 80387. How do we fix that?

These first steps will eventually lead to an alternate normal/prefetch
core that implements 286-level decoding, and another with 8086-level
decoding (including opcode 0x0F as "pop cs" and other oddities).
2015-04-04 09:33:22 -07:00
Jonathan Campbell
29737491b4 Added Double Fault and Triple Fault emulation. One common way for
286-level DOS programs to force their way out of protected mode back to
real mode was to initiate CPU reset by deliberately setting up protected
mode in a way that caused an exception, then a double fault, then a
triple fault. On actual hardware the CPU starts a shutdown cycle which
IBM hardware recognizes and initiates CPU reset instead. Using the CMOS
shutdown byte and the reset vector, a DOS program can "crash" it's way
back to real mode fairly quickly this way.

In case this new emulation causes any problems, you can disable the
double & triple fault emulation from dosbox.conf.
2015-03-29 10:25:28 -07:00
Jonathan Campbell
ffbad0b2b3 svn mainline r3878:
Year update.
2015-01-25 21:13:25 -08:00
Jonathan Campbell
40fd8ff30f remove full core trap path, doesn't work right. 2014-08-30 10:25:28 -07:00
Jonathan Campbell
b42b23b557 core=full added code to emulate the trap flag. apparently it was never
implemented for the full core, which explains why SECOND.EXE crashed on
startup when core=full.
2014-08-24 23:38:31 -07:00
Jonathan Campbell
a224bf2afd NMI emulation: add NMI gate variable, and modify CMOS emulation (port
70h) to accept bit 7 of the index as a control to enable/disable NMI
(just like on real hardware).
2014-06-08 23:27:54 -07:00
Jonathan Campbell
1e3e43bc1f core NMI (Non-maskable interrupt) emulation added. NMITEST program added
to allow user to trigger one delibrately.
2014-06-08 15:42:24 -07:00
Jonathan Campbell
db5ef7de40 move force vm86 I/O init to bios stage 2013-10-26 13:33:18 -07:00
Jonathan Campbell
8a9cc1441d CPU: add code to force feed virtual 8086 mode fake I/O instructions 2013-10-26 11:14:43 -07:00
Jonathan Campbell
5301ed74c2 restore the dynamic core. many things including Windows 95 are PAINFULLY
SLOW without it!
2013-10-20 21:15:47 -07:00
Jonathan Campbell
822293dad4 remainder of save state code removed from h/w and system emulation 2013-10-20 13:27:17 -07:00
Jonathan Campbell
ee0f444b19 remove and rip out dynamic x86 core. DOSBox is noticeably slower now,
but that's OK, we're going to restructure soon.
2013-10-20 12:17:37 -07:00
Jonathan Campbell
21614b8c3f toss out my copy, integrate tawoongs's daum branch code into mine,
remove what won't compile, begin work.
2013-10-14 05:07:26 -07:00
root
f331824031 port from svn 2013-07-07 20:39:49 -07:00