Commit graph pcem/src/mem.c
Author SHA1 Message Date
pcem-maintainer
78d0618363 Xi 8088: add the UMB dip switch and allow the programming of the BIOS flash memory
Some checks failed
C/C++ CI / Ubuntu 64bit (gcc) (push) Has been cancelled
C/C++ CI / Windows 32bits (MSYS2) (push) Has been cancelled
C/C++ CI / Windows 64bits (MSYS2) (push) Has been cancelled
2021-07-04 18:32:57 -03:00
SarahW
8f04c11a76 Implement PIIX4 power management. Soft power off is currently 'implemented'
by killing the emulator.
2020-11-14 19:33:56 +00:00
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
22977a4ff7 Reset purgable page list on reset. Fixes crashes when switching between machines. 2020-01-15 20:00:04 +00:00
SarahW
a1e2ee3218 Set eviction/mask entries in pages[] array for remapped pages. Fixes crashes on PS/2 and possibly some other models. 2019-05-13 17:49:33 +01: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
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
5edc23a602 Reduce number of massive static arrays in mem.c. 2019-02-07 20:21:39 +00:00
SarahW
87031d4d09 Remove readmemb386l() and writememb386l(). 2019-02-07 20:18:03 +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
0f0a1c3223 Perform NULL segment checks upfront in opcode handlers, rather than on every memory access.
This removes the need to pass the segment to readmem*l()/writemem*l().
2018-07-18 22:10:18 +01:00
SarahW
b62127f7a8 Move BIOS loading out of mem.c. 2018-06-04 22:03:45 +01:00
SarahW
8ac2157f87 Fixed AT systems broken by rev 1184. 2018-06-04 21:38:18 +01:00
SarahW
38e842d88d Load BASIC on Generic XT clone if present. Patch from Greatpsycho. 2018-06-04 20:20:05 +01:00
SarahW
82fcbd99de Allow 704kb on Generic XT clone when MDA/CGA/Hercules are in use. Patch from Greatpsycho. 2018-06-04 20:19:47 +01:00
SarahW
a33f719808 Fix up ROM presence detection on Elonex PC-425X and Packard Bell PB520R and PB570. 2018-04-19 22:05:02 +01:00
SarahW
d6b74b945b Clear _mem_exec array when clearing out old memory mappings. Patch from Greatpsycho. 2018-04-11 15:25:30 +01:00
SarahW
ade27bf526 Fix MMU accesses to remapped memory. Fixes OS/2 v2.0 on PS/2 Model 70, and possibly other machines. 2018-03-25 18:03:05 +01:00
SarahW
c8e6fc7ce3 Added PS/2 Model 70 (type 3 & 4) emulation. 2018-03-11 11:45:30 +00:00
SarahW
8546ce14f0 Added waitstates on instruction fetch from ROM. 2018-03-11 11:03:20 +00:00
SarahW
c298e706a4 Added flash size and turbo switches to Xi8088. Patch from EluanCM. 2018-02-28 21:36:15 +00:00
SarahW
31dff3a509 Added Xi8088 emulation. Patch from EluanCM. 2018-02-24 18:08:36 +00:00
SarahW
ad1889864f Removed obsolete AMIBIOS hack. 2018-02-24 15:44:49 +00:00
SarahW
d7dfc6a178 Added Compaq Portable Plus emulation. Patch from dns2kv2. 2018-02-24 14:31:37 +00:00
SarahW
cc60e2b2c5 Added Packard Bell PB520r emulation. 2018-02-20 15:55:46 +00:00
SarahW
84a0f0bacb Added Intel Advanced/ZP emulation. Patch from EluanCM. 2018-02-20 10:34:46 +00:00
SarahW
ce5ae22307 Add Packard Bell PB570 emulation. 2018-02-19 22:09:56 +00:00
SarahW
4cc15d9b7e Added Elonex PC-425X emulation. 2018-02-12 20:06:00 +00:00
SarahW
1d4b9af7e2 Added Compaq Portable II. Patch from dns2kv2. 2018-02-12 13:40:17 +00:00
SarahW
788402b879 Added Thomson TO16 PC. Patch from dns2kv2. 2018-02-12 13:24:00 +00:00
SarahW
e5b38d7e68 Added NCR PC4i. Patch from dns2kv2. 2018-02-12 12:45:29 +00:00
SarahW
90c8d0939c Added Packard Bell Legend 300SX. Patch from dns2kv2. 2018-02-12 12:37:21 +00:00
SarahW
36ba814c00 Added romfread function to work around warnings from ignoring fread return value. Patch from John Elliott. 2018-02-01 18:06:41 +00:00
SarahW
8f04b6b9a4 Added Toshiba T1200 emulation. Patch from John Elliott. 2018-01-31 21:53:23 +00:00
SarahW
c40a421700 Added Toshiba T1000 emulation. Patch from John Elliott. 2018-01-10 20:44:31 +00:00
SarahW
6798ebf0a6 Correct address mask on 286/386SX systems. Patch from Greatpsycho. 2018-01-08 20:52:45 +00:00
SarahW
e070341f80 Correct high ROM mapping on 286/386SX systems. Patch from Greatpsycho. 2018-01-08 20:51:57 +00:00
SarahW
bc4f98d814 Changes to LaserXT/3 :
- Changed LaserXT/3 processor to 8086.
- Changed LaserXT/3's minimum memory size to 512KB and granularity to 128KB.
- Changed EMS size granularity to 256KB on Laser Turbo XT and 512KB on LaserXT/3. Base memory size is calculated automatically.
- The mem_set_mem_state() function call for above of 1MB is called only when the memory size is more than 1024KB.
Patch from Greatpsycho.
2017-11-04 13:45:39 +00:00
SarahW
3ba03410fd MMU now handles CPL on read-only pages correctly. Fixes AT&T SVR4 2.1. 2017-10-15 21:28:52 +01:00
SarahW
5d5fa1402a Added Toshiba T3100e emulation. Patch from John Elliott. 2017-10-14 14:20:38 +01:00
SarahW
c28490cc2f Added Epson PC AX, AX2e and AX3 models. Patch from dns2kv2. 2017-10-14 12:31:47 +01:00
SarahW
56b9c33780 Add PS/1 XTIDE variant to HDD controller list. 2017-10-12 18:31:43 +01:00
SarahW
a3ae6a6eed Added IBM XT Model 286 emulation. 2017-10-11 22:09:26 +01:00
SarahW
9f2b58b7c4 Added new SCAT chipset machines - GW-286CT GEAR, Samsung SPC-4216P and KMX-C-02. Patch from Greatpsycho. 2017-10-11 20:56:33 +01:00
SarahW
2c2e325f60 Added emulation of Adaptec AHA-1542C and BusLogic BT-545S SCSI adapters. 2017-10-01 16:26:12 +01:00
SarahW
9283d0e1b0 Added Atari PC3 emulation. Patch from dns2k. 2017-09-09 11:45:02 +01:00
SarahW
7ec1adb65f SCAT memory changes. Patch from Greatpsycho. 2017-08-01 13:53:13 +01:00