Commit Graph

94 Commits

Author SHA1 Message Date
OBattler
a0b80e04cd Remove the unused mmu_perm stuff. 2025-05-06 03:18:46 +02:00
OBattler
420a08ee2c mem.c: Do not initialize the > 1 GB mapping on 64-bit binaries where it is not necessary. 2025-04-02 17:18:44 +02:00
OBattler
2a8e4d5a68 PCI and ACPI - when resetting all devices, also reset (ie. zero) all of the emulated RAM as well, fixes Windows 2000 after soft reset on later machines such as the ASUS P2B-LS. 2025-04-02 08:34:34 +02:00
OBattler
e71c30ce84 MMU: Fix behavior of 64-bit memory reads (used by FPU and MMX), should no longer waste host cycles on extra unnecessary MMU translations and should also no longer MMU translate already translated addresses which was causing unpredictable results. 2025-03-25 04:03:21 +01:00
OBattler
609f34cc49 Only flush write MMU cache on WP flag toggle as read and execute MMU cache is not affected by the flag. 2025-03-23 15:36:05 +01:00
OBattler
a886d8a9f0 Forgotten Cyrix-related fixes in mem.c. 2025-03-20 06:20:55 +01:00
OBattler
458f721897 The forgotten mem.c/h changes. 2025-01-16 23:27:44 +01:00
RichardG867
74bda71219 mem: Fix upper bits in PSE-36 translation 2024-12-21 20:43:18 -03:00
Alexander Babikov
f1a60d8242 Add PSE-36 (36-bit page size extension) support
Code ported from PCBox
2024-12-21 20:44:31 +05:00
OBattler
5e2559452c A small sanity check in mem/mem.c. 2024-12-21 13:59:40 +01:00
OBattler
80a0c48785 Memory mappings can now specify to ignore some address bits, fixes some Cirrus Logic drivers for Windows 3.1x freezing. 2024-12-18 01:19:50 +01:00
OBattler
250f477200 MMU: No longer page fault on CPU-initiated writes to write-protected pages (eg. when setting segment accessed bit), fixes OpenBSD 7.0, fixes #1853. 2024-09-29 13:23:43 +02:00
OBattler
f19a5447be Improved the SCO Xenix fix, fixes OS/2 booting, fixes #4762. 2024-08-29 01:26:32 +02:00
OBattler
91874e231a The monster FDC ROM is now optionally writable (also finally made the SCSI NVR's per-instance), closes #4623. 2024-07-22 03:19:40 +02:00
OBattler
1205392e4f Wells AT, DataExpert 386WB, Genoa Unknown 486, Gigabyte GA-486L, Alaris Cougar, and updates to CMakeLists.txt and chipset.h. to finally include opti391.c and opti499.c. 2024-07-21 06:09:03 +02:00
Alexander Babikov
bf4977b20c mem.c: Remove duplicate definitions (#4524)
Fixes building with debug registers for 486+ enabled
2024-06-10 19:51:15 -03:00
OBattler
86de260b24 mem.c: Double the pages array size for 386SX, fixes the segmentation fault when trying to use the Amstrad MegaPC with more than 16 MB and the 486+ interpreter. 2024-06-07 14:19:10 +02:00
Alexander Babikov
a07ffdecab Restore the debug register operation on 486+
But put it behind a compile-time option due to performance hits
Also add the DE flag to CPUID on supported CPUs
2024-05-24 03:35:08 +05:00
OBattler
15e3876e21 Prepare WD76C10 for 286/386 interpreter selection, exempt IBM 486BL and all Cyrix'es from the 286/386 interpreter. 2024-04-24 06:06:09 +02:00
OBattler
0a5d25fdde Memory: Disable _mem_exec in phys() accesses when not using the 486+ interpreter or dynamic recompiler, and write protect support in preparation for the WD76C10 rewrite. 2024-02-02 05:25:40 +01:00
OBattler
13330322b4 Interim mem.c/h code and a slight optimization to do_mmutranslate(). 2024-01-24 05:56:50 +01:00
OBattler
1d48363803 The 286/386 interpreter now has its own variant of x86seg.c. 2023-08-21 02:56:33 +02:00
OBattler
565421a252 Serial receive/transmit rework (uses the new fifo.c API) and a small GDB stub fix. 2023-08-18 05:57:32 +02:00
OBattler
f0ab35132b Always allocate 16 more bytes of RAM to mitigate potential segmentation faults on certain accessed by the old recompilers. 2023-08-18 03:16:37 +02:00
OBattler
b1c5cbaf47 Split the 286/386 interpreter away from the 486+ one (the 286/386 interpreter does not use the pccache's, readlookup's, and writelookup's as the emulated CPU's are too slow for them to be required, and also has more accurate FPU timings), also added a LPT status read function for future-proofing. 2023-08-08 19:39:52 +02:00
Jasmine Iwanek
998cfe5cc8 Constification 2023-07-25 17:59:24 -04:00
Jasmine Iwanek
ee695e71f9 More sonarlint work 2023-07-25 17:59:22 -04:00
Jasmine Iwanek
1116aadb6f Another round of sonarlint work 2023-07-04 10:53:44 -04:00
OBattler
2fe3bcd5d2 Do the wraparounds properly on 64-bit binaries, fixes #3421. 2023-06-25 22:20:11 +02:00
OBattler
e4d860c025 Replaced calls to flushmmucache_cr3() to direct calls to flushmmucache_nopc() and removed the #define. 2023-06-11 22:12:18 +02:00
OBattler
f4c59e907d Removed mmu_invalidate(). 2023-06-11 22:07:32 +02:00
OBattler
cf8a2aa50a Added a sanity check to mem_invalidate_range() when compiled with the new recompiler, fixes segmentation fault on with OS/2 on IBM PS/2 Model 80. 2023-06-10 19:24:44 +02:00
Jasmine Iwanek
6c1e4a8e2c Some code smell fixes from sonarlint 2023-05-15 19:25:56 -04:00
OBattler
5d9de974ee More keyboard controller clean-ups and fixes to mem/mem.c and port_92.c - OS/2 1.3 now works on IBM PS/2 MCA machines. 2023-04-22 03:48:50 +02:00
RichardG867
321d33f626 Merge branch 'master' of ssh://github.com/86Box/86Box 2023-04-11 20:19:38 -03:00
OBattler
ef17003f1b Fixed the "minor bug fix" in the AT / PS/2 keyboard controller, reworked PS/2 keyboard controller IRQ latches, and correctly disabled memory top remaps if there's more than (16 MB - remap size) RAM (fixes segmentation faults on some machines with 16+ MB of RAM). 2023-04-11 23:21:52 +02:00
RichardG867
d6d509ff45 mem: Fix RAM size integer overflow with a not-yet-supported size 2023-04-11 12:04:07 -03:00
RichardG867
7c2ec22e49 mem: Add memory map logging 2023-04-11 12:02:38 -03:00
OBattler
4eb902d853 More keyboard controller fixes. 2023-04-09 19:44:15 +02:00
Jasmine Iwanek
1860700eab Fix some small issues 2023-01-07 17:02:23 -05:00
Jasmine Iwanek
3fe4f75108 A bit more clang-format 2022-11-19 11:53:07 -05:00
Jasmine Iwanek
aa2c07bed2 Random header cleanups I noticed while porting things 2022-11-05 22:12:35 -04:00
plant
c80d2a0209 Fix CPU-Z on IBM 486
It turns out that the IBM 486 does indeed have the AC bit in EFLAGS, based on CPU-Z detection behavior.
2022-10-31 00:12:39 -06:00
OBattler
021a63e782 SiS 471 fixes - fixes the DTK 486 hang. 2022-10-23 05:06:52 +02:00
Jasmine Iwanek
4685da3fca clang-format in src/mem/ 2022-09-18 17:22:55 -04:00
OBattler
25783f137d ALi M6117-related memory and ROM fixes. 2022-07-18 23:48:18 +02:00
Alexander Babikov
710d34db97 Remove unused variables and functions 2022-04-14 07:13:50 +05:00
RichardG867
f57cbe36b1 GDB Stub: More progress 2022-03-16 00:33:01 -03:00
Jasmine Iwanek
4674756664 More newline and whitespace cleanups 2022-02-20 16:26:40 -05:00
OBattler
bc90f99350 Finally got rid of the AT and PCI global variables. 2021-12-19 20:00:27 +01:00