Commit graph pcem/src/mem.h
Author SHA1 Message Date
SarahW
fda3832e3a Add Gigabyte GA-686BX emulation.
As part of this, add i440BX chipset, PIIX4, and i28F002BC Flash.
2020-11-14 19:33:03 +00:00
SarahW
16bc3bb6ec Don't call addreadlookup() from get_phys() unless the address being translated is in RAM. Fixes Windows 95 install on Packard Bell PB410. 2019-04-27 18:31:22 +01:00
SarahW
ab124776a0 Rework self modifying code handling.
Code blocks now have a varying level of granularity in the page and dirty masks.
Most blocks have 64-byte granularity, but blocks that are repeatedly modified
drop to 1-byte granularity. This reduces the maximum size of the affected block
significantly, but reduces recompilation due to data located too close to code.

If the block is still marked as dirty, then it is recompiled without any
immediate instruction parameters being baked into the recompiled code, instead
being fetched from the RAM array as needed. This severely reduces recompilation
rates on some SMC-heavy games, eg Duke Nukem 3D, System Shock, Screamer etc,
giving a major speedup.
2019-03-16 14:53:26 +00:00
SarahW
03b5a44aca More CPU sanitisation. 2019-02-08 21:17:56 +00:00
SarahW
5b58b202a1 More CPU sanitisation. 2019-02-07 22:10:34 +00:00
SarahW
2735920f58 De-duplicate allocation code in mem_init(). 2019-02-07 20:34:06 +00:00
SarahW
3c2dbf063e Remove unused and superfluous variables from mem.c. 2019-02-07 20:23:14 +00:00
SarahW
d461bc7cda Fix invalid page check in get_phys_noabrt(). 2019-01-24 20:36:20 +00:00
SarahW
c1f0b7c35d Use readlookup cache in get_phys(). 2019-01-22 21:41:00 +00:00
SarahW
bf392ffd3a Maintain a list of free code blocks, and allocate new blocks from the list rather than evicting at random.
Also maintain a list of memory pages with dirty code blocks that can be evicted. This allows the recompiler to evict dirty blocks in preference to freeing usable blocks when the free list is empty.
Increase the number of available code blocks on x86.
Increase the non-ARM code allocator memory to 128 MB.
This reduces the amount of code block churning when running software with a lot of code, eg Windows XP.
2019-01-19 21:54:14 +00:00
SarahW
9ff1c7f409 Further reductions to codeblock_t size - replace link pointers with uint16_t block indicies, shrink ins to uint8_t, remove endpc. codeblock_t now fits in a 64-byte cacheline on 32-bit platforms. 2018-11-29 20:05:12 +00:00
SarahW
8ac2157f87 Fixed AT systems broken by rev 1184. 2018-06-04 21:38:18 +01:00
SarahW
8546ce14f0 Added waitstates on instruction fetch from ROM. 2018-03-11 11:03:20 +00:00
SarahW
72c2cb6f7d Added basic emulation of ACC Micro 2036 chipset (used by Packard Bell Legend 300SX). 2018-02-12 15:55:25 +00:00
SarahW
2c2e325f60 Added emulation of Adaptec AHA-1542C and BusLogic BT-545S SCSI adapters. 2017-10-01 16:26:12 +01:00
SarahW
7ec1adb65f SCAT memory changes. Patch from Greatpsycho. 2017-08-01 13:53:13 +01:00
SarahW
3a7c4687d6 Reduce self modifying code granularity from 64 bytes to 16. 2017-06-13 21:05:10 +01:00
SarahW
aeccbd8bd6 Added emulation of IBM 80386 Memory Expansion Adapter. PS/2 Model 80 now supports up to 12MB RAM. 2017-04-18 22:14:32 +01:00
SarahW
345f83cb2a Improvements to SCAT chipset (Award 286 clone). Patch from Greatpsycho. 2017-04-12 20:38:15 +01:00
SarahW
2b892d2a7a Fixed compiler warnings for Windows builds.
Added -Werror to Windows makefiles.
2017-04-11 19:34:41 +01:00
SarahW
6757fbfb94 Added PS/2 Model 55SX emulation. 2017-04-09 14:52:02 +01:00
SarahW
7c7961c578 Fixed inconsistent declaration of biosmask 2016-12-17 21:53:58 +00:00
SarahW
f311c9e17f Removed dire cache 'emulation' 2016-12-13 20:59:23 +00:00
SarahW
273ef3847a Improvements to flash ROM emulation on Premiere/PCI, Advanced/EV and Award 430VX PCI modules. Patch from Battler. 2016-09-18 15:57:46 +01:00
SarahW
0724cfcae4 Add emulation of IBM PS/1 Model 2121.
As part of this :
- FDC Specify command now completes immediately
- Implemented keyboard system flag status
- Added ability to remap 384kb reserved memory to above extended memory
2016-05-02 20:06:49 +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
cef4049bf5 Added missing return types to get_phys() functions. Patch from John Elliott. 2016-02-04 20:35:43 +00:00
TomW
2bc2bbc939 Cached results of MMU lookup in get_phys(). 2016-01-27 21:05:28 +00:00
TomW
7b7e9139aa Fixed Tandy memory configurations less than 640kb. 2015-11-22 21:11:31 +00:00
TomW
d79814692f Flush memory->codeblock list heads on CPU reset - fixes "block->next->pc=0" errors on reset on some machines. 2015-07-12 14:53:03 +01:00
TomW
80555e9d2a Added Compaq Deskpro 386 emulation. 2015-06-30 20:17:43 +01:00
TomW
d6c177a3c0 DMA now causes page dirty mask to be updated. 2015-02-09 18:26:59 +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
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
2ca4ead570 Implemented preliminary S3 ViRGE 2D blitter emulation.
Misc ViRGE fixes.
Changes to memory mapping.
Changes to PCI handling.
Disabled 'AMI WinBIOS 486 PCI' due to incomplete chipset emulation.
Invalid GUS register reads no longer kill the emulator.
2014-03-20 14:03:55 +00:00
TomW
7735e82085 Altered device memory mapping. 2013-10-19 17:06:55 +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