mirror of
https://github.com/holub/mame
synced 2025-04-20 23:42:22 +03:00
diexec: remove duplicate getter
This commit is contained in:
parent
fe7a73df4b
commit
28ec18ab96
@ -960,7 +960,7 @@ uint8_t bbc_tube_matchbox_device::z80_opcode_r(offs_t offset)
|
||||
{
|
||||
if (!machine().side_effects_disabled())
|
||||
{
|
||||
if (offset == 0x0066 && m_z80->input_state(INPUT_LINE_NMI))
|
||||
if (offset == 0x0066 && m_z80->input_line_state(INPUT_LINE_NMI))
|
||||
m_z80_view.select(0);
|
||||
else if (offset & 0x8000)
|
||||
m_z80_view.disable();
|
||||
|
@ -177,7 +177,7 @@ uint8_t bbc_tube_z80_device::opcode_r(offs_t offset)
|
||||
{
|
||||
if (!machine().side_effects_disabled())
|
||||
{
|
||||
if (offset == 0x0066 && m_z80->input_state(INPUT_LINE_NMI))
|
||||
if (offset == 0x0066 && m_z80->input_line_state(INPUT_LINE_NMI))
|
||||
m_rom_enabled = true;
|
||||
else if (offset >= 0x8000)
|
||||
m_rom_enabled = false;
|
||||
|
@ -166,7 +166,7 @@ u8 mtu130_datamover_base_device::status_r()
|
||||
(m_irq6502_req ? 0x80 : 0x00) |
|
||||
(m_irq4_req ? 0x40 : 0x00) |
|
||||
(m_irq6502_en ? 0x20 : 0x00) |
|
||||
(m_cpu->input_state(INPUT_LINE_HALT) ? 0x00 : 0x10) |
|
||||
(m_cpu->input_line_state(INPUT_LINE_HALT) ? 0x00 : 0x10) |
|
||||
(m_ram_visible ? 0x00 : 0x08) |
|
||||
m_ram_bank;
|
||||
}
|
||||
|
@ -1175,7 +1175,7 @@ void adsp21xx_device::execute_set_input(int inputnum, int state)
|
||||
void adsp21xx_device::execute_run()
|
||||
{
|
||||
// Return if CPU is halted
|
||||
if (current_input_state(INPUT_LINE_HALT)) {
|
||||
if (input_line_state(INPUT_LINE_HALT)) {
|
||||
debugger_wait_hook();
|
||||
m_icount = 0;
|
||||
return;
|
||||
|
@ -163,7 +163,7 @@ public:
|
||||
void set_input_line(int linenum, int state) { assert(device().started()); m_input[linenum].set_state_synced(state); }
|
||||
void set_input_line_vector(int linenum, int vector) { assert(device().started()); m_input[linenum].set_vector(vector); }
|
||||
void set_input_line_and_vector(int linenum, int state, int vector) { assert(device().started()); m_input[linenum].set_state_synced(state, vector); }
|
||||
int input_state(int linenum) const { assert(device().started()); return m_input[linenum].m_curstate; }
|
||||
s32 input_line_state(int linenum) const { assert(device().started()); return m_input[linenum].m_curstate; }
|
||||
void pulse_input_line(int irqline, const attotime &duration);
|
||||
|
||||
// suspend/resume
|
||||
@ -188,8 +188,7 @@ public:
|
||||
// required operation overrides
|
||||
void run() { execute_run(); }
|
||||
|
||||
// deliberately ambiguous functions; if you have the execute interface
|
||||
// just use it
|
||||
// deliberately ambiguous functions; if you have the execute interface just use it
|
||||
device_execute_interface &execute() { return *this; }
|
||||
|
||||
protected:
|
||||
@ -216,7 +215,6 @@ protected:
|
||||
virtual void interface_clock_changed(bool sync_on_new_clock_domain) override;
|
||||
|
||||
// for use by devcpu for now...
|
||||
int current_input_state(unsigned i) const { return m_input[i].m_curstate; }
|
||||
void set_icountptr(int &icount) { assert(!m_icountptr); m_icountptr = &icount; }
|
||||
int standard_irq_callback(int irqline, offs_t pc);
|
||||
|
||||
|
@ -2734,7 +2734,7 @@ uint8_t amstrad_state::amstrad_psg_porta_read()
|
||||
IRQ_CALLBACK_MEMBER(amstrad_state::amstrad_cpu_acknowledge_int)
|
||||
{
|
||||
// DMA interrupts can be automatically cleared if bit 0 of &6805 is set to 0
|
||||
if( m_asic.enabled && m_plus_irq_cause != 0x06 && m_asic.dma_clear & 0x01)
|
||||
if (m_asic.enabled && m_plus_irq_cause != 0x06 && m_asic.dma_clear & 0x01)
|
||||
{
|
||||
logerror("IRQ: Not cleared, IRQ was called by DMA [%i]\n",m_plus_irq_cause);
|
||||
m_asic.ram[0x2c0f] &= ~0x80; // not a raster interrupt, so this bit is reset
|
||||
@ -2742,9 +2742,9 @@ IRQ_CALLBACK_MEMBER(amstrad_state::amstrad_cpu_acknowledge_int)
|
||||
}
|
||||
m_maincpu->set_input_line(0, CLEAR_LINE);
|
||||
m_gate_array.hsync_counter &= 0x1F;
|
||||
if ( m_asic.enabled )
|
||||
if (m_asic.enabled)
|
||||
{
|
||||
if(m_plus_irq_cause == 6) // bit 7 is set "if last interrupt acknowledge cycle was caused by a raster interrupt"
|
||||
if (m_plus_irq_cause == 6) // bit 7 is set "if last interrupt acknowledge cycle was caused by a raster interrupt"
|
||||
m_asic.ram[0x2c0f] |= 0x80;
|
||||
else
|
||||
{
|
||||
@ -2753,33 +2753,33 @@ IRQ_CALLBACK_MEMBER(amstrad_state::amstrad_cpu_acknowledge_int)
|
||||
}
|
||||
return (m_asic.ram[0x2805] & 0xf8) | m_plus_irq_cause;
|
||||
}
|
||||
if(m_system_type != SYSTEM_GX4000)
|
||||
if (m_system_type != SYSTEM_GX4000)
|
||||
{
|
||||
// update AMX mouse inputs (normally done every 1/300th of a second)
|
||||
if (m_io_ctrltype.read_safe(0) == 2)
|
||||
{
|
||||
// update AMX mouse inputs (normally done every 1/300th of a second)
|
||||
if (m_io_ctrltype.read_safe(0) == 2)
|
||||
{
|
||||
static uint8_t prev_x,prev_y;
|
||||
uint8_t data_x, data_y;
|
||||
|
||||
m_amx_mouse_data = 0x0f;
|
||||
data_x = m_io_mouse[0].read_safe(0);
|
||||
data_y = m_io_mouse[1].read_safe(0);
|
||||
|
||||
if(data_x > prev_x)
|
||||
m_amx_mouse_data &= ~0x08;
|
||||
if(data_x < prev_x)
|
||||
m_amx_mouse_data &= ~0x04;
|
||||
if(data_y > prev_y)
|
||||
m_amx_mouse_data &= ~0x02;
|
||||
if(data_y < prev_y)
|
||||
m_amx_mouse_data &= ~0x01;
|
||||
m_amx_mouse_data |= (m_io_mouse[2].read_safe(0) << 4);
|
||||
prev_x = data_x;
|
||||
prev_y = data_y;
|
||||
|
||||
m_amx_mouse_data |= (m_io_kbrow[9].read_safe(0) & 0x80); // DEL key
|
||||
}
|
||||
static uint8_t prev_x,prev_y;
|
||||
uint8_t data_x, data_y;
|
||||
|
||||
m_amx_mouse_data = 0x0f;
|
||||
data_x = m_io_mouse[0].read_safe(0);
|
||||
data_y = m_io_mouse[1].read_safe(0);
|
||||
|
||||
if(data_x > prev_x)
|
||||
m_amx_mouse_data &= ~0x08;
|
||||
if(data_x < prev_x)
|
||||
m_amx_mouse_data &= ~0x04;
|
||||
if(data_y > prev_y)
|
||||
m_amx_mouse_data &= ~0x02;
|
||||
if(data_y < prev_y)
|
||||
m_amx_mouse_data &= ~0x01;
|
||||
m_amx_mouse_data |= (m_io_mouse[2].read_safe(0) << 4);
|
||||
prev_x = data_x;
|
||||
prev_y = data_y;
|
||||
|
||||
m_amx_mouse_data |= (m_io_kbrow[9].read_safe(0) & 0x80); // DEL key
|
||||
}
|
||||
}
|
||||
return 0xFF;
|
||||
}
|
||||
|
||||
|
@ -351,7 +351,7 @@ void galgames_cart_device::set_pic_reset_line(int state)
|
||||
|
||||
// logerror("reset line = %x\n", state);
|
||||
|
||||
if (!m_pic->input_state(INPUT_LINE_RESET) && state)
|
||||
if (!m_pic->input_line_state(INPUT_LINE_RESET) && state)
|
||||
pic_comm_reset();
|
||||
|
||||
m_pic->set_input_line(INPUT_LINE_RESET, state);
|
||||
|
@ -9290,7 +9290,7 @@ void mmpanic_state::mmpanic_irq(int state)
|
||||
/* I haven't found a irq ack register, so I need this kludge to
|
||||
make sure I don't lose any interrupt generated by the blitter,
|
||||
otherwise quizchq would lock up. */
|
||||
//if (downcast<cpu_device *>(m_maincpu)->input_state(0))
|
||||
//if (downcast<cpu_device *>(m_maincpu)->input_line_state(0))
|
||||
// return;
|
||||
|
||||
m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0xcf); // Z80 - RST 08, vblank
|
||||
|
@ -453,7 +453,7 @@ void xpander_state::haltset_w(u8 data)
|
||||
|
||||
// Bit 4: RES* (voice cpu reset).
|
||||
const bool reset_voice = !BIT(data, 4); // Active low.
|
||||
const bool voice_resetting = (m_voicecpu->input_state(INPUT_LINE_RESET) == ASSERT_LINE);
|
||||
const bool voice_resetting = (m_voicecpu->input_line_state(INPUT_LINE_RESET) == ASSERT_LINE);
|
||||
if (reset_voice != voice_resetting)
|
||||
{
|
||||
m_voicecpu->set_input_line(INPUT_LINE_RESET, reset_voice ? ASSERT_LINE : CLEAR_LINE);
|
||||
|
@ -722,7 +722,7 @@ namespace
|
||||
}
|
||||
|
||||
// Update input pin status if it has changed
|
||||
if (m_iop->input_state(irq.first) != state) {
|
||||
if (m_iop->input_line_state(irq.first) != state) {
|
||||
if (irq.first != INPUT_LINE_IRQ6)
|
||||
{
|
||||
LOGMASKED(LOG_INTERRUPT, "Setting IOP input line %d to %d\n", irq.first, state ? 1 : 0);
|
||||
@ -781,7 +781,7 @@ namespace
|
||||
{
|
||||
// Update input pin status if it has changed
|
||||
const bool state = BIT(active_irq, irq.second);
|
||||
if (m_cpu->input_state(irq.first) != state)
|
||||
if (m_cpu->input_line_state(irq.first) != state)
|
||||
{
|
||||
if (irq.first != INPUT_LINE_IRQ6)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user