SarahW
03b5a44aca
More CPU sanitisation.
2019-02-08 21:17:56 +00:00
SarahW
1af0b660b3
First pass at sanitising CPU headers.
2019-02-07 21:30:53 +00:00
SarahW
ca89a51478
Remove redundant oldcs variable - when processing an exception, oldcs and CS are the same.
2019-01-28 20:00:49 +00:00
SarahW
c3250ca63e
Don't set oldcpl at the start of each instruction; instead, only set it following a successful CS load.
2019-01-27 20:51:13 +00:00
SarahW
a4d3aa1912
Move flags and eflags variables into cpu_struct.
2018-11-28 09:42:04 +00:00
SarahW
f1df9be8f6
Added recompiled versions of JMP, CALL, RET, PUSH and POP.
2018-08-05 16:24:15 +01:00
SarahW
91143d3c68
Move CPU segment structures into cpu_state structure.
2018-07-22 12:56:03 +01:00
SarahW
5416c948a3
Don't push exception error code on triple fault reset. Patch from Greatpsycho.
2018-01-08 20:54:47 +00:00
SarahW
8a5b552a9a
Correct CS:IP initialisation on 286+ reset. Patch from Greatpsycho.
2018-01-08 20:50:48 +00:00
SarahW
717d815604
Tweak flat DS/SS dynarec optimisation, should reduce block churn when routines are called both with and without flat DS/SS.
...
Fixed incorrect STACK32 flag when entering V86 mode that was hidden by block churn.
Protected and V86 mode status now considered when selecting block.
2017-11-15 21:55:27 +00:00
SarahW
9946bf2b73
Fixed task switch to V86 mode.
2017-07-24 19:36:46 +01:00
SarahW
b6b9aab6dc
Fix access to undefined variable in x86 task switch code.
2017-07-19 19:47:00 +01:00
SarahW
51ed6ea341
Protected mode improvements :
...
- LTR now sets TSS state to busy
- LMSW preserves ET bit in CR0
- Fixed PC size in 16-bit system segment on CALL/JMP
Patch from Greatpsycho
2017-07-16 15:51:19 +01:00
SarahW
807b710a5d
Improvements to path handling. Patch from bit.
2017-07-06 21:25:10 +01:00
SarahW
c05689a9ec
More task switching fixes. Patch from Greatpsycho.
2017-07-06 18:41:51 +01:00
SarahW
2ac22b03d5
Fixes to task switching. Patch from Greatpsycho.
2017-07-05 21:40:02 +01:00
SarahW
4446a6cdaf
Implemented 16-bit task switching. Patch from Greatpsycho.
2017-06-19 19:55:59 +01:00
SarahW
fa9d9381b7
Clear flat DS/SS status on segment load during block. Fixes LBA 2.
2017-06-02 22:01:09 +01:00
SarahW
8cd767091a
Fixed stack size bug introducted in rev 729.
2017-05-25 18:06:40 +01:00
SarahW
083ca3d4a2
Slight optimisation when DS/SS are 'flat' (base=0, limit=4G).
2017-05-24 21:50:37 +01:00
SarahW
2b892d2a7a
Fixed compiler warnings for Windows builds.
...
Added -Werror to Windows makefiles.
2017-04-11 19:34:41 +01:00
SarahW
31a97096ec
Trigger TS fault correctly on IRET with NT flag set when back link selector invalid. Fixes NTVDM issues with Windows 2000.
2017-02-04 21:39:28 +00:00
SarahW
a4f3b2013e
Added AMI 386DX and MR 386DX models (both based on OPTi 495 chipset). AMI 386DX supports external cache, useful for with prefetch emulation.
...
Also commit a few fixes required :
- Set EDX correctly on soft reset
- LOCK NOP is now treated as an illegal instruction
- Tweaks to FDC sense interrupt handling following FDC reset
2016-11-27 21:53:13 +00:00
SarahW
eb126fd822
Moved more variables into cpu_state structure.
2016-08-21 21:28:23 +01:00
SarahW
c664682758
Move some more variables into cpu_state structure. Minor speedup (~2%).
2016-08-17 21:28:16 +01:00
SarahW
535604b760
Pack decoded ModR/M data into a single word - minor recompiler speedup.
2016-08-14 16:29:54 +01:00
SarahW
c81a91fd72
Moved integer registers, PC and flags_* variables into new cpu_state structure. Reduces recompiled code size slightly, small speedup (1-3%).
2016-04-20 21:39:41 +01:00
TomW
8d90f77279
Access bit now set in selector descriptors.
2016-03-29 20:06:55 +01:00
TomW
c06d8913ce
Corrected faulted selector on not present fault when JMPing to call gate pointing to not-present selector. Fixes OS/2 2.0 with some video drivers. Patch from Battler.
2016-03-24 20:21:56 +00:00
TomW
94f33aa873
More accurate timing for INT, IRET, CALL far, RET far and JMP far.
2016-02-06 18:08:10 +00:00
TomW
38fb86cb95
stack32 is now always 0 or 1, to prevent failed comparisons in 386_dynarec.c.
...
Only clear an entry in codeblock_hash if it's pointing to the block actually being deleted.
Speeds up menus in Railroad Tycoon II significantly.
2016-01-23 14:36:59 +00:00
TomW
f90c4053c4
Nested Task flag is cleared on JMP to task gate. Fixes GO32.
2015-08-29 10:57:15 +01:00
TomW
f339f00315
Interpreter and dynamic recompiler now present in a single binary.
2015-08-21 20:55:36 +01:00
TomW
0e76e79962
Fixed CPL in IRET and RETF instructions when returning to conforming code segment.
2015-08-10 17:50:15 +01:00
TomW
68546ea3cb
Corrected CPL on INT to conformant code segment.
2015-08-10 15:01:36 +01:00
TomW
08254b8dfb
Initial 64-bit recompiler.
...
Various 64-bit fixes.
Various fixes to allow building under MinGW-w64.
2015-07-18 12:11:54 +01:00
TomW
51489d031c
Reduced number of segment/selector checks in recompiler - minor speedup.
2015-07-08 20:40:37 +01:00
TomW
b5a498683a
Writing to read-only data selector now causes a fault.
2015-06-21 14:54:58 +01:00
TomW
d1422eee39
Fixed loaded CPL on interrupt, Coherent now works.
2015-02-09 15:37:09 +00:00
TomW
cd2c3b47ed
Implemented selector limits on some instructions - fixes LBA2.
...
GPFs in real mode now work.
Selectors correctly zeroed on far return to lower privilege.
2014-08-13 20:33:56 +01:00
TomW
1493306d5e
Restore correct ESP value on fault during IRET - fixes issues in at least Windows NT 3.51, NT 4.0, OS/2 2.0, OS/2 Warp. Thanks to SA1988.
...
Hack to mirror IDE register writes to both drives, fixes IDE issues on NT.
Fixed occasional PCem crash when accessing a faulting page, fixes crash in OS/2 2.0.
2014-04-09 19:55:14 +01:00
TomW
e737d2fa45
Loading a segment register in real mode no longer clears USE32.
...
CR3 no longer masks values written to it.
Real mode interrupts now take IDT base into account.
Fixes 'huge unreal' mode (flat assembler).
2014-03-29 14:28:13 +00:00
TomW
119fe36820
Added MMX emulation (probably some bugs). Implemented RDMSR/WRMSR for Winchip.
2013-08-03 15:05:50 +01:00
TomW
9312de19ac
Now up to date with current dev version.
...
Changes since v0.7 :
- Major CPU reorganisation. This has possibly broken some stuff, though I fixed all the regressions I could find
- Lazy flags. This brought 10% speed improvement at one point, but that's probably been lost now
- 430 VX chipset emulation
- IDT Winchip emulation (currently sans MMX). Timing is probably wrong
- Fixed a few FPU bugs
- Timer reorganisation
- Sound reorganisation
- Other general reorganisation
- AdLib Gold emulation
- Windows Sound System emulation
- Pro Audio Spectrum 16 emulation. This currently works with most DOS stuff, but not in Windows
- Major improvements to GUS emulation. Has the downside that it now conflicts with SB emulation, so probably best to not enable both simultaneously
- New graphics cards :
- ATI-18800 (VGA Edge-16)
- ATI-28800 (VGA Charger)
- ATI Mach64GX (Graphics Pro Turbo). Quite a few features missing, but Windows doesn't seem to use half the features of this card
- Cirrus Logic CL-GD5429. Blitter is a bit broken
- Oak OTI-067
- S3 Trio64 (Number Nine 9FX)
- S3 Virge. Only framebuffer stuff at the minute, Windows won't recognise the card
- Trident TGUI-9440
- VGA. Doesn't work yet
- Beginnings of 3DFX emulation, however this is in extremely early stages and doesn't do anything useful
- Fixed DMA bug stopping floppy drives working in Windows 3.x
- Fixed some other stuff probably
- Broke some other stuff probably as well
2013-05-27 17:46:42 +01:00
TomW
3c253c2cf8
Add v0.7 source
2013-04-21 14:54:35 +01:00