Commit Graph

52 Commits

Author SHA1 Message Date
Allofich
4d7be1c15b Remove redundant #ifndef conditionals for includes 2021-08-22 15:13:27 +09:00
Allofich
67ebe980a7 Remove unneeded includes 2021-06-06 04:39:54 +09:00
Allofich
9294d450ec SVN r4412
Update copyright.
2021-03-06 21:18:08 +09:00
Wengier
ab8ac65103 fix build 2021-01-30 04:31:08 -05:00
Wengier
124d908f59 Fix Issue #2221 2021-01-30 01:20:12 -05:00
Jonathan Campbell
5533eaf704 Begin consolidation of dynamic core mapping, and making it more flexible 2020-11-30 23:59:22 -08:00
Emmanuel Gil Peyrot
c0a106535e Replace Bit32u with uint32_t 2020-09-28 17:14:35 +02:00
Emmanuel Gil Peyrot
a431d81213 Replace Bit16u with uint16_t 2020-09-28 17:14:35 +02:00
rderooy
608a657b50 Update copyright year for dosbox and dosbox-x assets and update FSF address 2020-06-25 08:42:32 +02:00
Wengier
1743167d9e Update MMX code to new version (https://www.vogons.org/viewtopic.php?f=32&t=74877&p=868569) 2020-06-23 19:16:55 -04:00
Wengier
c99472d4b2 Save state includes 2020-06-03 21:35:49 -04:00
Allofich
038566362e Fix Cppcheck funcArgNamesDifferent warnings 2019-10-21 22:08:39 +09:00
Allofich
0626fffe83 Fix typecast warnings 2019-06-28 23:08:51 +09:00
Allofich
40d2d90e91 Type-conversion warning fixes 2019-06-22 21:07:26 +09:00
Allofich
8598f90386 Remove undefined function declarations 2019-06-15 20:13:21 +09:00
Allofich
59dd5c6882 SVN r4201
Improve prefetch and simple cores to not switch to normal core on trap
execution. Fixes the demo version of Prehistorik 2 and similar cases
that use the trap flag and prefetch tricks.
2019-06-08 17:44:07 +09:00
Allofich
d84a812743 SVN r4183 (second half)
Update year
2019-06-03 23:01:41 +09:00
Allofich
05619dd023 SVN r4183 (first half)
Update address of FSF
2019-06-03 22:54:46 +09:00
Allofich
402a9f4af7 Fix value conversion warnings 2019-06-02 11:08:33 +09:00
Allofich
15aa16a1a7 SVN r3991
Raise lower limit of cycles in autodetermine mode to improve stability.
2019-05-14 00:41:28 +09:00
Jonathan Campbell
64749ee2b6 Add proper 8086 prefetch core 2019-04-10 20:24:22 -07:00
Jonathan Campbell
6fe3d12b44 286 prefetch core 2019-04-10 19:33:42 -07:00
Jonathan Campbell
6c64397321 more cleanup 2018-05-30 08:05:19 -07:00
Jonathan Campbell
d490b4e130 signed/unsigned Wconversion fixes 2018-05-29 14:41:45 -07:00
Jonathan Campbell
7af2a98180 more const func 2018-05-25 20:29:24 -07:00
Jonathan Campbell
fe66a7f24b Some methods of Descriptor should be declared const 2018-05-25 20:26:39 -07:00
Jonathan Campbell
bd6a20c24b cleanup, typedef 2018-05-25 20:22:59 -07:00
Jonathan Campbell
f00bf2726e CPU cycles count typedef 2018-05-25 19:09:15 -07:00
Jonathan Campbell
0fc64ad967 more 2018-05-25 09:13:39 -07:00
Jonathan Campbell
2e7a9be555 more 2018-05-25 09:12:32 -07:00
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