Commit Graph

108 Commits

Author SHA1 Message Date
OBattler
7fed7c1510 Made the condition for asserting an IRQ stricter. 2023-10-03 20:03:13 +02:00
OBattler
71d4c4837f Revert to not updating pending IRQ's if the request results in no effective change. 2023-10-03 19:39:28 +02:00
OBattler
b363cbf884 Another PIC fix. 2023-10-03 06:28:22 +02:00
OBattler
1c8ad0b7e8 Another PIC fix. 2023-10-03 03:28:21 +02:00
OBattler
ebd5f950bc A slight PIC rework. 2023-10-01 20:37:30 +02:00
OBattler
76160c4d1d Do a spurious IRQ 7 or IRQ 15 instead, per the specification. 2023-10-01 18:00:58 +02:00
OBattler
8634cffb98 Replaced the fatal for 286+ with an error correction mechanism (clear IRQ 2 and find best PIC 1 interrupt again). 2023-10-01 17:55:31 +02:00
OBattler
ed119ed163 And another. 2023-10-01 17:33:53 +02:00
OBattler
b03df6bdd1 Attempted PIC fix. 2023-10-01 17:26:44 +02:00
OBattler
b1c7834476 Another small PIC fix. 2023-09-28 07:34:20 +02:00
OBattler
d7bc7b302d Always clear IRR on clear if the specified interrupt is not set to level-triggered on the PIC or ELCR. 2023-09-28 01:15:07 +02:00
OBattler
8bdecb1f59 Some PIC and ACPI IRQ fixes. 2023-09-28 00:20:15 +02:00
OBattler
95c9c1dc95 Reverted the PIC code to basically the old code with the new way of handing level-triggered IRQ's, fixes IDE hard disk and ATAPI CD-ROM problems. 2023-09-04 04:55:09 +02:00
Jasmine Iwanek
b8c4dee3bf More linting in src 2023-08-23 04:15:58 -04:00
OBattler
66db65e69b The PIC now once again returns IRR in invalid modes, fixes #3602. 2023-08-20 02:04:42 +02:00
OBattler
7e76e8b28d PIC and Hercules Plus compile warning fixes. 2023-08-11 21:02:15 +02:00
OBattler
782015a923 More mouse and PIC fixes and the mouse now takes of the ration between guest resolution and actual render area size, multiplied by the DPI, when returning coordinate deltas, also unified the delta return function across the various emulated mice. 2023-08-11 04:45:32 +02:00
OBattler
0e22fa6d0f Fixed a compile-breaking mistake in pic.c. 2023-08-10 05:04:24 +02:00
OBattler
f771e9e612 PIC fixes: poll mode is no longer broken. 2023-08-10 05:03:11 +02:00
OBattler
fdac446d25 The PCjr now correctly supports 64 kB of RAM, also other fixes and added support to PCjr ports 11h and 12h to the POST card (it now supports up to 4 different ports in the range). 2023-08-09 06:26:59 +02:00
OBattler
ce5e21f870 More warning and compile fixes. 2023-08-08 15:38:40 +02:00
OBattler
b4aea2f768 The PIC timer is no longer used to latch all IRQ updates on XT, but only those after writes to the mask register, which are now delayed for the duration of 1 CPU cycles, making the PCjr boot again, fixes #3500. 2023-08-08 03:52:09 +02:00
OBattler
c30d5d90b7 PCI and IRQ rework, pci.c rewritten from ground up, fixes numerous issues such as the bridge being added when the number of normal PCI devices equals the number of normal PCI slots, Windows 95 PCI operation on Intel 430NX, sharing of PCI IRQ's with non-PCI level-triggered devices, having both configuration mechanisms operating at the same time (ALi M1435), etc., and makes the code much more readable. 2023-08-07 03:04:52 +02:00
Jasmine Iwanek
998cfe5cc8 Constification 2023-07-25 17:59:24 -04:00
Jasmine Iwanek
1116aadb6f Another round of sonarlint work 2023-07-04 10:53:44 -04:00
OBattler
5b58fcfab2 The Lucky Star LS-486E and Rise R418 are now marked as having the PS/2 keyboard controller IRQ latch (new machine bus flag!) without actually having the PS/2 ports. 2023-07-02 16:58:31 +02:00
Jasmine Iwanek
ed1b369abd Yet more sonarlint fixes 2023-05-29 06:21:17 -04:00
Jasmine Iwanek
6c1e4a8e2c Some code smell fixes from sonarlint 2023-05-15 19:25:56 -04:00
OBattler
1863b72f67 Changed the way the PIC keyboard and mouse IRQ latches operate to avoid spurious IRQ's. 2023-05-16 00:38:28 +02:00
OBattler
0554b8c785 Explicitly reset the latches to disabled before attempting to enable them, fixes the latches failing to enable after a hard reset. 2023-05-04 02:20:50 +02:00
OBattler
8fca57aa79 Universalize the keyboard and mouse latches again, fixes #3280. 2023-05-01 01:35:16 +02:00
OBattler
78a897f07a Some minor fixes, the PS/2 mouse command F0h (set remote mode) is now implemented, the PS/2 mouse command F3h (set sample rate) now actually changes the host mouse polling rate, and the Intel SIO IB and ZB now forcibly initialize a keyboard and mouse IRQ latch if the board has a PS/2 keyboard controller, to simulate the presence of a latch external to the chip. 2023-04-26 01:42:23 +02:00
OBattler
ff7c0ad45f Removed some excess logging from pic.c. 2023-04-16 17:48:14 +02:00
OBattler
df24b4be0f Reverted the previous approach and switched to the new, non-hacky approach of getting rid of the accelerator and instead handling enter full screen the same way exit full screen is handled. 2023-04-13 22:47:42 +02:00
OBattler
b753c675fb Fixed the PS/2 keyboard and mouse latch initialization - now the mouse latch actually works, fixes mouse in AMI WinBios Setup and 8603 errors on MCA IBM PS/2's. 2023-04-12 20:23:31 +02: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
OBattler
289962319f Rewritten the PS/2 poll (without the password security state, that is yet to be done) and enabled the PS/2 KBC IRQ latch on all PCI machines as well (it is present at the very least on Intel SIO and PIIX), fixes Windows for Workgroups 3.11 input, and reduced mouse polling to 255 Hz (the maximums supported by PS/2 mice). 2023-04-08 00:40:57 +02:00
OBattler
c06e9b35f2 Fix PIC level-triggered interrupts on IRQ's 0 to 7 (spotted by TC1995). 2023-01-26 22:29:51 +01:00
OBattler
27ebb27db7 Makefile.mingw corrections and made the code pass much stricter checks (now mandated by Makefile.mignw) to ensure GCC 14 readiness. 2022-11-17 22:44:06 +01:00
Jasmine Iwanek
bd75bc141a Header cleanups
Tabs to spaces
Consistency
2022-11-13 21:15:47 -05:00
Jasmine Iwanek
aa2c07bed2 Random header cleanups I noticed while porting things 2022-11-05 22:12:35 -04:00
Jasmine Iwanek
e6dbaefeb1 clang-format in src/ 2022-09-18 17:19:21 -04:00
OBattler
dc38b7d950 The PIC now correctly processes slave interrupts in XT mode as well, fixes PS/2 mouse on the Xi8088, fixes #2045. 2022-08-01 03:16:44 +02:00
OBattler
69379b68b0 Implemented PIC IRQ freeze on poll mode start. 2022-07-31 04:45:26 +02:00
Adrien Moulin
2aa5d8f5b2 PIT: add alternative faster PIT
This is enabled by default on 486+ CPUs and can be forced disabled/enabled with pit_mode=0/1
2022-07-23 13:38:10 +02:00
Jasmine Iwanek
c430fbe84c Assorted cleanups I've discovered over time 2022-07-21 22:08:36 -04:00
OBattler
231afcbe11 PIC. 2022-07-16 03:23:21 +02:00
OBattler
d68121ae89 ACPI, APM, PIC, and USB. 2022-07-16 02:54:49 +02:00
OBattler
f19aaa14ae Fixed three instances of undefined behavior. 2022-02-20 20:30:20 +01:00
OBattler
1864a61b3e Fixed PIC reset on the Xi8088. 2022-02-11 00:23:57 +01:00