diff options
author | David Haywood <28625134+DavidHaywood@users.noreply.github.com> | 2019-11-15 19:15:11 +0000 |
---|---|---|
committer | ajrhacker <ajrhacker@users.noreply.github.com> | 2019-11-15 14:15:11 -0500 |
commit | c9a6c7ff4d7dceb7cdb67d50afc7f4b5f717c531 (patch) | |
tree | 9905210ed1e7e015f17bb5cdc0a59a914d788dac /src/mame/machine | |
parent | a0e2b82b634f796c186dec0db895028088a542e9 (diff) |
new WORKING machines (ABL Pinball) + temp disable timer IRQ in rad_bb3 + significant nes_vt cleanups / state chop (#5900)
new WORKING machines
--------------------
Pinball (P8002, ABL TV Game) [David Haywood, Morten Kirkegaard, Peter Wilhelmsen]
* divided up large nes_vt.cpp class, and did some general tidy up, commented some known addresses etc. to stop code rot.
* temporarily disabled timer on elan when running rad_bb3 until timer enable can be identified, made a few notes.
Diffstat (limited to 'src/mame/machine')
-rw-r--r-- | src/mame/machine/elan_eu3a05commonsys.cpp | 42 | ||||
-rw-r--r-- | src/mame/machine/elan_eu3a05commonsys.h | 3 |
2 files changed, 42 insertions, 3 deletions
diff --git a/src/mame/machine/elan_eu3a05commonsys.cpp b/src/mame/machine/elan_eu3a05commonsys.cpp index a655ae2be1e..3f8de8ec50c 100644 --- a/src/mame/machine/elan_eu3a05commonsys.cpp +++ b/src/mame/machine/elan_eu3a05commonsys.cpp @@ -173,7 +173,8 @@ elan_eu3a05commonsys_device::elan_eu3a05commonsys_device(const machine_config &m device_t(mconfig, type, tag, owner, clock), m_cpu(*this, finder_base::DUMMY_TAG), m_bank(*this, finder_base::DUMMY_TAG), - m_is_pal(false) + m_is_pal(false), + m_allow_timer_irq(true) { } @@ -182,6 +183,31 @@ elan_eu3a05commonsys_device::elan_eu3a05commonsys_device(const machine_config &m { } +/* + +rad_bb3 plays with address 0x5009 in this way, but never sets it, something else must set it (and 1->0 is 'activate' or 'acknowledge') + +lda $5009 +and #$ef +sta $5009 + +lda $5009 +and #$df +sta $5009 + +0x5006 looks interesting too, again just seems to be masking out bits + +(as one block of code) +lda $5006 +and #$f0 +sta $5006 +lda $5006 +and $#8f +sta $5006 + +todo: investigate rad_hnt3 which polls this address + +*/ void elan_eu3a05commonsys_device::map(address_map &map) { @@ -207,7 +233,10 @@ void elan_eu3a05commonsys_device::device_timer(emu_timer &timer, device_timer_id { case TIMER_UNK: { - generate_custom_interrupt(0); + // rad_bb3 unmasks the interrupt, but the jumps use pointers in RAM, which haven't been set up at the time + // of unmasking, so we need to find some kind of global enable / disable, or timer enable. + if (m_allow_timer_irq) + generate_custom_interrupt(0); break; } } @@ -297,6 +326,9 @@ READ8_MEMBER(elan_eu3a05commonsys_device::nmi_vector_r) } else { + if(machine().side_effects_disabled()) + return 0x00; + fatalerror("NMI without custom vector!"); } } @@ -304,12 +336,18 @@ READ8_MEMBER(elan_eu3a05commonsys_device::nmi_vector_r) // not currently used READ8_MEMBER(elan_eu3a05commonsys_device::irq_vector_r) { + if(machine().side_effects_disabled()) + return 0x00; + if (m_custom_irq) { return m_custom_irq_vector >> (offset*8); } else { + if(machine().side_effects_disabled()) + return 0x00; + fatalerror("IRQ without custom vector!"); } } diff --git a/src/mame/machine/elan_eu3a05commonsys.h b/src/mame/machine/elan_eu3a05commonsys.h index c7a1fec12dd..5980701d0a0 100644 --- a/src/mame/machine/elan_eu3a05commonsys.h +++ b/src/mame/machine/elan_eu3a05commonsys.h @@ -16,6 +16,7 @@ public: template <typename T> void set_cpu(T &&tag) { m_cpu.set_tag(std::forward<T>(tag)); } template <typename T> void set_addrbank(T &&tag) { m_bank.set_tag(std::forward<T>(tag)); } void set_pal(void) { m_is_pal = true; } + void disable_timer_irq(void) { m_allow_timer_irq = false; } void generate_custom_interrupt(int level); @@ -44,7 +45,7 @@ protected: uint8_t m_rombank_lo; bool m_is_pal; // this is usually a jumper connected to the chip that the software can read (clocks also differ on PAL units) - + bool m_allow_timer_irq; private: DECLARE_READ8_MEMBER(intmask_r); DECLARE_WRITE8_MEMBER(intmask_w); |