Commit graph pcem/src/386_dynarec.c
Author SHA1 Message Date
SarahW
5f0d43f782 Prefetch simulation no longer counts prefixes when prefetch calculation disabled (eg when CPU cache enabled). Fixes hang on reset on 486+ CPUs. 2017-10-15 21:29:49 +01:00
SarahW
132a2eb110 Add NMI support to dynamic recompiler. 2017-10-13 22:42:59 +01:00
SarahW
a96e87527e Reorganised REP instructions. 2017-07-20 21:06:21 +01:00
SarahW
1f33b52451 Added VME emulation to Intel DX4, Pentium and Pentium MMX.
Temporarily disabled recompilation of CLI and STI.
2017-06-30 20:42:19 +01:00
SarahW
3a7c4687d6 Reduce self modifying code granularity from 64 bytes to 16. 2017-06-13 21:05:10 +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
7c7961c578 Fixed inconsistent declaration of biosmask 2016-12-17 21:53:58 +00:00
SarahW
bfc69a4bea Cleaned up ibm.h a bit 2016-11-28 20:06:17 +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
1b73963997 Added prefetch timing approximation for 286/386 CPUs, with configurable memory timing. 2016-11-25 21:32:02 +00:00
SarahW
a174a88c49 Codeblock tree now includes both physical and virtual addresses into key. Fixes performance issues with Windows 3.1. 2016-11-08 21:30:48 +00:00
SarahW
75f9316c11 x86-32 recompiler compiles FPU instructions using direct access to register stack when top-of-stack is static. Minor speedup. 2016-09-11 15:38:05 +01: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
42237ac1f8 Recompiler now only recompiles a block after seeing it twice. Improves performance on stuff that uses self modifying code - eg Doom, Duke Nukem 3D, Windows 95 idle 2016-07-31 12:33:37 +01:00
SarahW
4ae8f2d260 REP instructions now handle trap flag correctly, Windows NT 3.51 now works on 386 systems. 2016-06-28 21:58:21 +01:00
SarahW
7fbb99fe75 Don't quit emulator on triple fault when dynamic recompiler enabled. 2016-05-21 21:14:00 +01:00
SarahW
52636936e9 Limited how long REP instructions are uninterruptable for, improves sound on games/demos that use high-frequency timer interrupts for sound output (eg Crystal Dream, Cronologia) 2016-05-03 21:31:05 +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
SarahW
36bb949126 If recompiler block hash table points to wrong block, then walk tree to find correct block instead of recompiling. Speedups of 10-20% on games that were seeing hash aliasing, eg Quake III, System Shock 2, UltraHLE etc 2016-04-06 20:48:36 +01:00
TomW
673a3527af Don't cause illegal instruction exception on unknown REP instruction. Patch from Battler. 2016-03-17 21:47: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
673d785743 Writing to a memory page with code present only causes code block flushes if the data changes, or if a block is currently being recompiled. 2016-02-03 21:09:05 +00:00
TomW
79202cc5c0 Changed timer base frequency on XT models to 14.318MHz - PIT, CGA and 4.77MHz CPU should now stay in perfect sync. 2015-11-25 21:50:38 +00:00
TomW
2efc56e882 Reset triggered by keyboard controller should now be handled correctly by dynamic recompiler. 2015-08-31 19:31:23 +01:00
TomW
f339f00315 Interpreter and dynamic recompiler now present in a single binary. 2015-08-21 20:55:36 +01:00
TomW
2db98723c7 REP instructions in 32-bit mode with both 0x66 and 0x67 prefixes now work correctly - fixes QEMM and DESQview. 2015-08-07 21:31:00 +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
854a2ee2a6 Fixed Final Fantasy 7 broken by rev 277. 2015-07-14 20:09:14 +01:00
TomW
6bc394b4c6 Recompiler now handles reset caused by a newly generated codeblock. 2015-07-12 15:22:58 +01:00
TomW
9061c5d2fc Added code generation for :
- TEST immediate
- register versions of NOT and NEG
- fixed shift versions of SHL, SHR and SAR
- MOVZX and MOVSX
- LEA
- CMP with memory destination
- JL, JNL, JLE, JNLE, JBE, JNBE
2015-05-30 17:08:54 +01:00
TomW
1fb4de4507 Dynamic recompiler now works on Linux (32-bit only) 2015-04-11 18:31:51 +01:00
TomW
a97e89e857 Added code generation for register and immediate PUSH/POP, RET, relative CALL and JMP instructions. 2015-03-30 20:42:33 +01:00
TomW
ba715706b6 Added code generation for memory versions of MOV, and memory source versions of ADD, SUB, AND, OR, XOR and CMP. 2015-02-08 17:17:14 +00:00
TomW
ea5e96569d Lazy flags code now handles carry flag. 2015-02-02 19:54:01 +00:00
TomW
b4592cdea3 Implemented new memory mapping to improve performance of self modifying code.
New scheme allows code blocks to cross pages.
Reduced code block size down to 2kB.
2015-01-28 21:58:02 +00:00
TomW
f38e2be43f Implemented trap flag on dynamic recompiler. 2015-01-18 17:13:49 +00:00
TomW
00f6271ec8 Recompiled code blocks are no longer allowed to cross pages.
Recompiling of blocks is aborted if the code page becomes dirty.
Fixes Windows 98 setup.
2014-12-06 16:35:45 +00:00
TomW
4855071ead Effective address calculations now implemented by recompiled code. Up to 30% performance gain seen. 2014-11-30 17:48:10 +00:00
TomW
84ac04d2df Added Intel Premiere/PCI (Batman's Revenge) and Advanced/EV (Endeavor) motherboards.
Added emulation of i430LX and i430FX chipsets.
Added support for PCI configuration type 2, used by i430LX.
Added AT disable keyboard command, and fixed enable keyboard command.
Added emulation of Intel 28F001BXT flash ROM, used by Advanced/EV.
Fixed a bug in REP when using multiple 66/67 prefixes.
2014-11-23 20:27:41 +00:00
TomW
2905c43db8 Cycle counts for recompiled blocks now generated at compile time. 2014-11-12 19:33:49 +00:00
TomW
4676daade4 Initial commit of dynamic recompiler.
Various CPU changes to support dynamic recompiler.
2014-11-05 21:24:16 +00:00