diff options
author | Mike <mike.harris@gmail.com> | 2020-04-25 05:05:05 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-25 08:05:05 -0400 |
commit | 3a6317b0f47a1596777537b7c7544818076f9397 (patch) | |
tree | bd47a00ea1c571f0272b98bdca5218e09b6dd13a /src/mame/machine/namco06.h | |
parent | f5fad035dedb01fd3fce400d25b0b991abccf189 (diff) |
Namco custom chip improvements. (#6589)
* Wire up reset lines on namco custom chips.
* namco51: emulate via low level cpu
Previously, this was using high-level emulation. This had some
game-specific hacks.
* namco06: Emulate the NMI and chip select lines more accurately.
Three control bits are used for the clock divider.
* mb88xx: fix interrupt handling.
m_nf is basically the IF flag. It should be set when the int line is
active (when its low). Only trigger an int when the line was previously
high.
* namco custom chips: remove debug logging
* galaga, polepos: Remove quantum hacks.
With the better Namco custom chip emulation, this doesn't seem to be
required anymore.
Diffstat (limited to 'src/mame/machine/namco06.h')
-rw-r--r-- | src/mame/machine/namco06.h | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/src/mame/machine/namco06.h b/src/mame/machine/namco06.h index 0043bd9a87e..5015083d849 100644 --- a/src/mame/machine/namco06.h +++ b/src/mame/machine/namco06.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:Aaron Giles +// copyright-holders:Mike Harris, Aaron Giles #ifndef MAME_MACHINE_NAMCO06_H #define MAME_MACHINE_NAMCO06_H @@ -14,10 +14,9 @@ public: template <typename T> void set_maincpu(T &&tag) { m_nmicpu.set_tag(std::forward<T>(tag)); } + template <unsigned N> auto chip_select_callback() { return m_chipsel[N].bind(); } + template <unsigned N> auto rw_callback() { return m_rw[N].bind(); } template <unsigned N> auto read_callback() { return m_read[N].bind(); } - - template <unsigned N> auto read_request_callback() { return m_readreq[N].bind(); } - template <unsigned N> auto write_callback() { return m_write[N].bind(); } uint8_t data_r(offs_t offset); @@ -29,20 +28,26 @@ protected: // device-level overrides virtual void device_start() override; virtual void device_reset() override; + private: + void set_nmi(int state); TIMER_CALLBACK_MEMBER( nmi_generate ); // internal state - uint8_t m_control; emu_timer *m_nmi_timer; + uint8_t m_control; + bool m_next_timer_state; + bool m_nmi_stretch; + bool m_rw_stretch; + bool m_rw_change; + required_device<cpu_device> m_nmicpu; + devcb_write_line::array<4> m_chipsel; + devcb_write_line::array<4> m_rw; devcb_read8::array<4> m_read; - - devcb_write_line::array<4> m_readreq; - devcb_write8::array<4> m_write; }; |