mirror of
https://github.com/holub/mame
synced 2025-04-22 00:11:58 +03:00
h83003: Expose all four TEND outputs
This commit is contained in:
parent
d05a81ec59
commit
f7ad534db9
@ -29,8 +29,7 @@ h83003_device::h83003_device(const machine_config &mconfig, const char *tag, dev
|
||||
sci0(*this, "sci0"),
|
||||
sci1(*this, "sci1"),
|
||||
watchdog(*this, "watchdog"),
|
||||
tend0_cb(*this),
|
||||
tend1_cb(*this)
|
||||
tend_cb(*this)
|
||||
{
|
||||
syscr = 0;
|
||||
}
|
||||
@ -191,10 +190,10 @@ void h83003_device::device_add_mconfig(machine_config &config)
|
||||
|
||||
void h83003_device::execute_set_input(int inputnum, int state)
|
||||
{
|
||||
if(inputnum == H8_INPUT_LINE_TEND0 && !tend0_cb.isnull())
|
||||
tend0_cb(state);
|
||||
else if(inputnum == H8_INPUT_LINE_TEND1 && !tend1_cb.isnull())
|
||||
tend1_cb(state);
|
||||
if(inputnum >= H8_INPUT_LINE_TEND0 && inputnum <= H8_INPUT_LINE_TEND3) {
|
||||
if(!tend_cb[inputnum - H8_INPUT_LINE_TEND0].isnull())
|
||||
tend_cb[inputnum - H8_INPUT_LINE_TEND0](state);
|
||||
}
|
||||
else if(inputnum >= H8_INPUT_LINE_DREQ0 && inputnum <= H8_INPUT_LINE_DREQ3)
|
||||
dma->set_input(inputnum, state);
|
||||
else
|
||||
@ -265,8 +264,7 @@ void h83003_device::device_start()
|
||||
h8h_device::device_start();
|
||||
dma_device = dma;
|
||||
|
||||
tend0_cb.resolve();
|
||||
tend1_cb.resolve();
|
||||
tend_cb.resolve_all();
|
||||
}
|
||||
|
||||
void h83003_device::device_reset()
|
||||
|
@ -29,8 +29,10 @@ class h83003_device : public h8h_device {
|
||||
public:
|
||||
h83003_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
|
||||
|
||||
auto tend0() { return tend0_cb.bind(); }
|
||||
auto tend1() { return tend1_cb.bind(); }
|
||||
auto tend0() { return tend_cb[0].bind(); }
|
||||
auto tend1() { return tend_cb[1].bind(); }
|
||||
auto tend2() { return tend_cb[2].bind(); }
|
||||
auto tend3() { return tend_cb[3].bind(); }
|
||||
|
||||
void set_mode_a20() { mode_a20 = true; }
|
||||
void set_mode_a24() { mode_a20 = false; }
|
||||
@ -68,7 +70,7 @@ protected:
|
||||
uint8_t syscr;
|
||||
uint8_t rtmcsr;
|
||||
|
||||
devcb_write_line tend0_cb, tend1_cb;
|
||||
devcb_write_line::array<4> tend_cb;
|
||||
|
||||
virtual void update_irq_filter() override;
|
||||
virtual void interrupt_taken() override;
|
||||
|
Loading…
Reference in New Issue
Block a user