mirror of
https://github.com/holub/mame
synced 2025-06-05 04:16:28 +03:00
small cleanup (nw)
This commit is contained in:
parent
a0314377c7
commit
509b07300b
@ -21,11 +21,12 @@ class pc_state : public driver_device
|
|||||||
public:
|
public:
|
||||||
pc_state(const machine_config &mconfig, device_type type, const char *tag)
|
pc_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||||
: driver_device(mconfig, type, tag),
|
: driver_device(mconfig, type, tag),
|
||||||
|
m_maincpu(*this, "maincpu"),
|
||||||
m_dma8237(*this, "dma8237"),
|
m_dma8237(*this, "dma8237"),
|
||||||
m_pc_kbdc(*this, "pc_kbdc"),
|
m_pc_kbdc(*this, "pc_kbdc"),
|
||||||
m_speaker(*this, "speaker") { }
|
m_speaker(*this, "speaker") { }
|
||||||
|
|
||||||
cpu_device *m_maincpu;
|
required_device<cpu_device> m_maincpu;
|
||||||
device_t *m_pic8259;
|
device_t *m_pic8259;
|
||||||
optional_device<am9517a_device> m_dma8237;
|
optional_device<am9517a_device> m_dma8237;
|
||||||
device_t *m_pit8253;
|
device_t *m_pit8253;
|
||||||
|
@ -804,7 +804,7 @@ static void lynx_blitter(running_machine &machine)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
machine.scheduler().timer_set(machine.device<cpu_device>("maincpu")->cycles_to_attotime(state->m_blitter.memory_accesses), timer_expired_delegate(FUNC(lynx_state::lynx_blitter_timer),state));
|
machine.scheduler().timer_set(state->m_maincpu->cycles_to_attotime(state->m_blitter.memory_accesses), timer_expired_delegate(FUNC(lynx_state::lynx_blitter_timer),state));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1471,7 +1471,6 @@ MACHINE_START_MEMBER(pc_state,pc)
|
|||||||
{
|
{
|
||||||
m_pic8259 = machine().device("pic8259");
|
m_pic8259 = machine().device("pic8259");
|
||||||
m_pit8253 = machine().device("pit8253");
|
m_pit8253 = machine().device("pit8253");
|
||||||
m_maincpu = machine().device<cpu_device>("maincpu" );
|
|
||||||
m_maincpu->set_irq_acknowledge_callback(device_irq_acknowledge_delegate(FUNC(pc_state::pc_irq_callback),this));
|
m_maincpu->set_irq_acknowledge_callback(device_irq_acknowledge_delegate(FUNC(pc_state::pc_irq_callback),this));
|
||||||
|
|
||||||
pc_fdc_interface *fdc = machine().device<pc_fdc_interface>("fdc");
|
pc_fdc_interface *fdc = machine().device<pc_fdc_interface>("fdc");
|
||||||
@ -1505,7 +1504,6 @@ MACHINE_RESET_MEMBER(pc_state,pc)
|
|||||||
|
|
||||||
MACHINE_START_MEMBER(pc_state,mc1502)
|
MACHINE_START_MEMBER(pc_state,mc1502)
|
||||||
{
|
{
|
||||||
m_maincpu = machine().device<cpu_device>("maincpu" );
|
|
||||||
m_maincpu->set_irq_acknowledge_callback(device_irq_acknowledge_delegate(FUNC(pc_state::pc_irq_callback),this));
|
m_maincpu->set_irq_acknowledge_callback(device_irq_acknowledge_delegate(FUNC(pc_state::pc_irq_callback),this));
|
||||||
|
|
||||||
m_pic8259 = machine().device("pic8259");
|
m_pic8259 = machine().device("pic8259");
|
||||||
@ -1533,7 +1531,6 @@ MACHINE_START_MEMBER(pc_state,pcjr)
|
|||||||
pc_int_delay_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(pc_state::pcjr_delayed_pic8259_irq),this));
|
pc_int_delay_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(pc_state::pcjr_delayed_pic8259_irq),this));
|
||||||
m_pcjr_watchdog = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(pc_state::pcjr_fdc_watchdog),this));
|
m_pcjr_watchdog = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(pc_state::pcjr_fdc_watchdog),this));
|
||||||
pcjr_keyb.keyb_signal_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(pc_state::pcjr_keyb_signal_callback),this));
|
pcjr_keyb.keyb_signal_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(pc_state::pcjr_keyb_signal_callback),this));
|
||||||
m_maincpu = machine().device<cpu_device>("maincpu");
|
|
||||||
m_maincpu->set_irq_acknowledge_callback(device_irq_acknowledge_delegate(FUNC(pc_state::pc_irq_callback),this));
|
m_maincpu->set_irq_acknowledge_callback(device_irq_acknowledge_delegate(FUNC(pc_state::pc_irq_callback),this));
|
||||||
|
|
||||||
machine().device<upd765a_device>("upd765")->set_ready_line_connected(false);
|
machine().device<upd765a_device>("upd765")->set_ready_line_connected(false);
|
||||||
|
@ -1509,7 +1509,7 @@ static UINT8 pce_cd_get_cd_data_byte(running_machine &machine)
|
|||||||
if ( pce_cd.scsi_IO )
|
if ( pce_cd.scsi_IO )
|
||||||
{
|
{
|
||||||
pce_cd.scsi_ACK = 1;
|
pce_cd.scsi_ACK = 1;
|
||||||
machine.scheduler().timer_set(machine.device<cpu_device>("maincpu")->cycles_to_attotime(15), timer_expired_delegate(FUNC(pce_state::pce_cd_clear_ack),state));
|
machine.scheduler().timer_set(state->m_maincpu->cycles_to_attotime(15), timer_expired_delegate(FUNC(pce_state::pce_cd_clear_ack),state));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return data;
|
return data;
|
||||||
|
@ -894,7 +894,7 @@ static void draw_sprites(running_machine &machine, const rectangle* rect)
|
|||||||
state->m_video.towns_sprite_page = 0;
|
state->m_video.towns_sprite_page = 0;
|
||||||
|
|
||||||
state->m_video.towns_sprite_flag = 1; // we are now drawing
|
state->m_video.towns_sprite_flag = 1; // we are now drawing
|
||||||
state->m_video.sprite_timer->adjust(machine.device<cpu_device>("maincpu")->cycles_to_attotime(128 * (1025-sprite_limit)));
|
state->m_video.sprite_timer->adjust(state->m_maincpu->cycles_to_attotime(128 * (1025-sprite_limit)));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void towns_crtc_draw_scan_layer_hicolour(running_machine &machine, bitmap_rgb32 &bitmap,const rectangle* rect,int layer,int line,int scanline)
|
static void towns_crtc_draw_scan_layer_hicolour(running_machine &machine, bitmap_rgb32 &bitmap,const rectangle* rect,int layer,int line,int scanline)
|
||||||
|
Loading…
Reference in New Issue
Block a user