mirror of
https://github.com/holub/mame
synced 2025-10-05 08:41:31 +03:00
i186: use static set irq and clean up leftovers (nw)
This commit is contained in:
parent
5b80814347
commit
88c077394d
@ -126,6 +126,7 @@ i80188_cpu_device::i80188_cpu_device(const machine_config &mconfig, const char *
|
|||||||
{
|
{
|
||||||
memcpy(m_timing, m_i80186_timing, sizeof(m_i80186_timing));
|
memcpy(m_timing, m_i80186_timing, sizeof(m_i80186_timing));
|
||||||
m_fetch_xor = 0;
|
m_fetch_xor = 0;
|
||||||
|
static_set_irq_acknowledge_callback(*this, device_irq_acknowledge_delegate(FUNC(i80186_cpu_device::int_callback), this));
|
||||||
}
|
}
|
||||||
|
|
||||||
i80186_cpu_device::i80186_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
|
i80186_cpu_device::i80186_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
|
||||||
@ -139,6 +140,7 @@ i80186_cpu_device::i80186_cpu_device(const machine_config &mconfig, const char *
|
|||||||
{
|
{
|
||||||
memcpy(m_timing, m_i80186_timing, sizeof(m_i80186_timing));
|
memcpy(m_timing, m_i80186_timing, sizeof(m_i80186_timing));
|
||||||
m_fetch_xor = BYTE_XOR_LE(0);
|
m_fetch_xor = BYTE_XOR_LE(0);
|
||||||
|
static_set_irq_acknowledge_callback(*this, device_irq_acknowledge_delegate(FUNC(i80186_cpu_device::int_callback), this));
|
||||||
}
|
}
|
||||||
|
|
||||||
i80186_cpu_device::i80186_cpu_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source, int data_bus_size)
|
i80186_cpu_device::i80186_cpu_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source, int data_bus_size)
|
||||||
@ -642,8 +644,6 @@ void i80186_cpu_device::device_reset()
|
|||||||
m_timer[0].control = 0;
|
m_timer[0].control = 0;
|
||||||
m_timer[1].control = 0;
|
m_timer[1].control = 0;
|
||||||
m_timer[2].control = 0;
|
m_timer[2].control = 0;
|
||||||
|
|
||||||
set_irq_acknowledge_callback(device_irq_acknowledge_delegate(FUNC(i80186_cpu_device::int_callback),this));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
UINT8 i80186_cpu_device::read_port_byte(UINT16 port)
|
UINT8 i80186_cpu_device::read_port_byte(UINT16 port)
|
||||||
|
@ -65,61 +65,6 @@ struct t_nimbus_brush
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/* 80186 internal stuff */
|
|
||||||
struct mem_state
|
|
||||||
{
|
|
||||||
UINT16 lower;
|
|
||||||
UINT16 upper;
|
|
||||||
UINT16 middle;
|
|
||||||
UINT16 middle_size;
|
|
||||||
UINT16 peripheral;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct timer_state
|
|
||||||
{
|
|
||||||
UINT16 control;
|
|
||||||
UINT16 maxA;
|
|
||||||
UINT16 maxB;
|
|
||||||
UINT16 count;
|
|
||||||
emu_timer *int_timer;
|
|
||||||
emu_timer *time_timer;
|
|
||||||
UINT8 time_timer_active;
|
|
||||||
attotime last_time;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct dma_state
|
|
||||||
{
|
|
||||||
UINT32 source;
|
|
||||||
UINT32 dest;
|
|
||||||
UINT16 count;
|
|
||||||
UINT16 control;
|
|
||||||
UINT8 finished;
|
|
||||||
emu_timer *finish_timer;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct intr_state
|
|
||||||
{
|
|
||||||
UINT8 pending;
|
|
||||||
UINT16 ack_mask;
|
|
||||||
UINT16 priority_mask;
|
|
||||||
UINT16 in_service;
|
|
||||||
UINT16 request;
|
|
||||||
UINT16 status;
|
|
||||||
UINT16 poll_status;
|
|
||||||
UINT16 timer;
|
|
||||||
UINT16 dma[2];
|
|
||||||
UINT16 ext[4];
|
|
||||||
UINT16 ext_vector[2]; // external vectors, when in cascade mode
|
|
||||||
};
|
|
||||||
|
|
||||||
struct i186_state
|
|
||||||
{
|
|
||||||
struct timer_state timer[3];
|
|
||||||
struct dma_state dma[2];
|
|
||||||
struct intr_state intr;
|
|
||||||
struct mem_state mem;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct keyboard_t
|
struct keyboard_t
|
||||||
{
|
{
|
||||||
UINT8 keyrows[NIMBUS_KEYROWS];
|
UINT8 keyrows[NIMBUS_KEYROWS];
|
||||||
@ -390,7 +335,6 @@ public:
|
|||||||
required_device<output_latch_device> m_scsi_ctrl_out;
|
required_device<output_latch_device> m_scsi_ctrl_out;
|
||||||
|
|
||||||
UINT32 m_debug_machine;
|
UINT32 m_debug_machine;
|
||||||
// i186_state m_i186;
|
|
||||||
keyboard_t m_keyboard;
|
keyboard_t m_keyboard;
|
||||||
nimbus_drives_t m_nimbus_drives;
|
nimbus_drives_t m_nimbus_drives;
|
||||||
ipc_interface_t m_ipc_interface;
|
ipc_interface_t m_ipc_interface;
|
||||||
@ -408,8 +352,6 @@ public:
|
|||||||
UINT8 m_hs_count;
|
UINT8 m_hs_count;
|
||||||
UINT32 m_debug_video;
|
UINT32 m_debug_video;
|
||||||
UINT8 m_vector;
|
UINT8 m_vector;
|
||||||
// DECLARE_READ16_MEMBER(nimbus_i186_internal_port_r);
|
|
||||||
// DECLARE_WRITE16_MEMBER(nimbus_i186_internal_port_w);
|
|
||||||
DECLARE_READ8_MEMBER(nimbus_mcu_r);
|
DECLARE_READ8_MEMBER(nimbus_mcu_r);
|
||||||
DECLARE_WRITE8_MEMBER(nimbus_mcu_w);
|
DECLARE_WRITE8_MEMBER(nimbus_mcu_w);
|
||||||
DECLARE_READ16_MEMBER(nimbus_io_r);
|
DECLARE_READ16_MEMBER(nimbus_io_r);
|
||||||
@ -440,8 +382,6 @@ public:
|
|||||||
DECLARE_PALETTE_INIT(rmnimbus);
|
DECLARE_PALETTE_INIT(rmnimbus);
|
||||||
UINT32 screen_update_nimbus(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
UINT32 screen_update_nimbus(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||||
void screen_eof_nimbus(screen_device &screen, bool state);
|
void screen_eof_nimbus(screen_device &screen, bool state);
|
||||||
// TIMER_CALLBACK_MEMBER(internal_timer_int);
|
|
||||||
// TIMER_CALLBACK_MEMBER(dma_timer_callback);
|
|
||||||
TIMER_CALLBACK_MEMBER(keyscan_callback);
|
TIMER_CALLBACK_MEMBER(keyscan_callback);
|
||||||
TIMER_CALLBACK_MEMBER(mouse_callback);
|
TIMER_CALLBACK_MEMBER(mouse_callback);
|
||||||
DECLARE_WRITE_LINE_MEMBER(sio_interrupt);
|
DECLARE_WRITE_LINE_MEMBER(sio_interrupt);
|
||||||
@ -482,17 +422,8 @@ public:
|
|||||||
void write_reg_01E();
|
void write_reg_01E();
|
||||||
void write_reg_026();
|
void write_reg_026();
|
||||||
void change_palette(UINT8 bank, UINT16 colours, UINT8 regno);
|
void change_palette(UINT8 bank, UINT16 colours, UINT8 regno);
|
||||||
// void update_interrupt_state();
|
|
||||||
// void handle_eoi(int data);
|
|
||||||
void external_int(UINT16 intno, UINT8 vector);
|
void external_int(UINT16 intno, UINT8 vector);
|
||||||
DECLARE_READ8_MEMBER(cascade_callback);
|
DECLARE_READ8_MEMBER(cascade_callback);
|
||||||
// void nimbus_recalculate_ints();
|
|
||||||
// void internal_timer_sync(int which);
|
|
||||||
// void internal_timer_update(int which,int new_count,int new_maxA,int new_maxB,int new_control);
|
|
||||||
// void update_dma_control(int which, int new_control);
|
|
||||||
// void drq_callback(int which);
|
|
||||||
// void nimbus_cpu_init();
|
|
||||||
// void nimbus_cpu_reset();
|
|
||||||
void *get_dssi_ptr(address_space &space, UINT16 ds, UINT16 si);
|
void *get_dssi_ptr(address_space &space, UINT16 ds, UINT16 si);
|
||||||
void nimbus_bank_memory();
|
void nimbus_bank_memory();
|
||||||
void memory_reset();
|
void memory_reset();
|
||||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user