diff options
author | 2020-08-19 19:33:13 -0700 | |
---|---|---|
committer | 2020-08-19 19:33:13 -0700 | |
commit | f7b263de20594fd720a8ff49b7528c48a64ddb9d (patch) | |
tree | abedd8ff2f40bac0e79a587b46d2b199dbe98fb8 /src/devices/machine/pit8253.h | |
parent | 92925532c301c9ac70c908ca84b6e30a11d3febf (diff) |
Sound and other improvements to Sega G-80 games. (#7103)
Sound and other improvements to Sega G-80 games: [Aaron Giles, couriersud]
* Added netlist-based sound to Eliminator, Zektor, Space Fury, and Astro Blaster.
* Split the Sega Universal Sound Board and Speech Boards into their own separate files.
* Improved Universal Sound Board implementation for better accuracy in Star Trek and Tac/Scan.
* Wrote netlist-based backend for Universal Sound Board; currently disabled due to limitations in the system.
* Wrote netlist-based backend for Speech Board; currently disabled pending future sound system changes.
* Implemented wait states and the vector DRAW flag to help improve timing.
SP0250 Improvements: [Aaron Giles]
* Matched clock divider to real chip measurements.
* Fixed behavior when not fed enough data; addresses "gapping" in speech in Sega games.
* Implemented accurate LFR noise generator according to real chip measurements.
* Added pulse-width modulation DAC output mode for future consumption by netlist.
Netlist additions: [Aaron Giles]
* Added compile-time option to record nltool-compatible CSV files.
* Improved CD4020 implementation.
* Fixed CD4053 behavior.
* Added 74139 device.
* Added TL082 device.
8253 PIT changes: [Aaron Giles]
* Added explicit synchronization to all writes.
* Cleaned up some timing calculations to avoid double<->attotime conversions.
Diffstat (limited to 'src/devices/machine/pit8253.h')
-rw-r--r-- | src/devices/machine/pit8253.h | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/src/devices/machine/pit8253.h b/src/devices/machine/pit8253.h index 13b222478f5..a862dee8aad 100644 --- a/src/devices/machine/pit8253.h +++ b/src/devices/machine/pit8253.h @@ -42,6 +42,14 @@ class pit_counter_device : public device_t friend class pit8253_device; friend class pit8254_device; + enum + { + TID_UPDATE = 1, + TID_CONTROL, + TID_COUNT, + TID_GATE + }; + public: // construction/destruction pit_counter_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); @@ -54,6 +62,7 @@ protected: private: inline uint32_t adjusted_count() const; + inline void adjust_timer(attotime target); void decrease_counter_value(int64_t cycles); void load_counter_value(); void set_output(int output); @@ -63,18 +72,23 @@ private: uint8_t read(); void load_count(uint16_t newcount); void readback(int command); - void control_w(uint8_t data); - void count_w(uint8_t data); - void gate_w(int state); + void control_w(uint8_t data) { synchronize(TID_CONTROL, data); } + void control_w_deferred(uint8_t data); + void count_w(uint8_t data) { synchronize(TID_COUNT, data); } + void count_w_deferred(uint8_t data); + void gate_w(int state) { synchronize(TID_GATE, state); } + void gate_w_deferred(int state); void set_clock_signal(int state); void set_clockin(double new_clockin); // internal state int m_index; // index number of the timer double m_clockin; // input clock frequency in Hz + attotime m_clock_period; // precomputed input clock period int m_clock_signal; // clock signal when clockin is 0 attotime m_last_updated; // time when last updated + attotime m_next_update; // time of next update emu_timer *m_updatetimer; // MAME timer to process updates |