Commit graph pcem/src/pit.c
Author SHA1 Message Date
SarahW
a7d006b637 Rewrote timer code.
The new code is based on timestamps, rather than delays. This eliminates the
need to update every timer in timer_process(), which cost a non-trivial amount
of CPU time on low-end machines.

This involved changes to every user of the timer code, so this change almost
certainly introduces bugs.
2018-08-02 22:06:10 +01:00
SarahW
e4ddbd8441 Remove waitstates from PIT register accesses. Fixes speed issues with Desert Strike. 2018-04-18 21:10:01 +01:00
SarahW
b530bdafea Cleaned up turbo handling. 2018-03-11 16:43:32 +00:00
SarahW
ff94c18a91 PIT readback of timer with mode 3 and gate disabled now reads the counter directly rather than converting the emulator timer value. Fixes 101 error on Compaq Portable Plus. 2018-02-24 14:44:24 +00:00
SarahW
3c431794f0 Cleared null count bit in PIT status byte. Fixes Wing Commander III, Wings of Fury and probably other Origin games. 2018-01-09 20:07:27 +00:00
SarahW
e6d20ca199 Fixed PIT readback command, and timing synchronisation when loading a timer. Fixes Sound Blaster detection in Lemmings 2. 2017-12-03 12:55:53 +00:00
SarahW
f2e1e307c6 Don't write directly to PC speaker state when writing PIT control byte. Fixes engine cacophony in Hard Drivin' II. 2017-11-06 21:38:07 +00:00
SarahW
2b892d2a7a Fixed compiler warnings for Windows builds.
Added -Werror to Windows makefiles.
2017-04-11 19:34:41 +01:00
SarahW
9c1d8e5022 Add PS/2 Model 50 emulation.
This commit also adds basic MCA emulation.
This commit also adds emulation of the PS/2 Type 1 DMA controller.
2017-04-06 22:00:40 +01:00
SarahW
1ad8c6c5fe PIT emulation now more modular. 2017-04-06 21:56:49 +01:00
SarahW
bfc69a4bea Cleaned up ibm.h a bit 2016-11-28 20:06:17 +00:00
SarahW
eb126fd822 Moved more variables into cpu_state structure. 2016-08-21 21:28:23 +01:00
SarahW
9021d9f2c2 PIT now supports read-back of timer status - Sidewinder Windows 9x driver setup no longer hangs. 2016-06-21 21:55:06 +01:00
TomW
3a57341837 Refactored sound code - slight speedup. 2016-02-10 20:49:28 +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
71a2af82c4 Tweaked PIT GATE handling, fixes Lemmings 2. 2015-10-18 15:35:56 +01:00
TomW
6602a32304 Reverted rev 339. Fixes Adlib Gold jukebox.
Disable PIT timer operation between write of control word and initial count. Lemmings High Performance PC mode now works without incorrect rev 339 commit.
2015-10-10 14:32:50 +01:00
TomW
6b82be0624 Tweaks to PIT latch operation - Juko XT now boots again. 2015-09-15 21:53:45 +01:00
TomW
5260f5f5cd PIC clears pending flag when acknowledging interrupt.
PIT latch mode works correctly.
Fixes 'High Performance PC' mode in Lemmings.
2015-09-12 14:57:14 +01:00
TomW
91eaa9c83b Writing PIT control byte with mode 0 resets PIT output. Fixes 103 error on PS/1. 2015-08-26 20:34:05 +01:00
TomW
8ee5c763bd PIT now reloads the timer count when hardware triggered strobe completes - no longer causes the emulator to hang. 2015-08-09 12:17:34 +01:00
TomW
b96dabbe98 Silence PC speaker output at very high frequencies - fixes Lemmings and other games that use high frequency as "speaker off". 2014-09-28 11:33:08 +01:00
TomW
b0320ae16c Moved PIT to common timer API. 2014-06-19 21:02:59 +01:00
TomW
62afac2a71 Reverted revision 107. 2014-06-09 18:13:57 +01:00
TomW
c9fbb6e934 Bodged PIT reads slightly, fixed Lotus III hangs. 2014-06-08 15:53:09 +01:00
TomW
f18f10574a Preliminary PCjr emulation.
Improvements to PIT and serial emulation.
2014-01-12 11:37:09 +00:00
TomW
36cdd540b2 PIT timers can now be restarted using GATE input - CPU speed detection on SiS496/497 now works.
Added missing port 0x61 to Olivetti M24 - PC speaker now works on that machine.
Some code tidying.
2013-11-08 22:32:34 +00:00
TomW
a514d2fe4b Cleaned up DMA emulation. 2013-10-27 14:37:01 +00:00
TomW
58085bcc87 Re-organisation of video emulation. 2013-06-24 20:42:35 +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