mirror of
https://github.com/holub/mame
synced 2025-10-07 01:16:22 +03:00
A few timer_set removals (nw)
This commit is contained in:
parent
659eefe592
commit
2ff1340a30
@ -16,7 +16,7 @@
|
||||
output.
|
||||
|
||||
The 054321 manages three latches (maybe four) to allow communication
|
||||
between the main cpu and the soud cpu, and provides two independant
|
||||
between the main cpu and the sound cpu, and provides two independent
|
||||
busses to ensure decoupling. It also manages one global volume and
|
||||
a per-channel mute for two channels.
|
||||
|
||||
|
@ -170,6 +170,8 @@ PALETTE_INIT_MEMBER(m10_state,m10)
|
||||
|
||||
MACHINE_START_MEMBER(m10_state,m10)
|
||||
{
|
||||
m_interrupt_timer = timer_alloc(TIMER_INTERRUPT);
|
||||
|
||||
save_item(NAME(m_bottomline));
|
||||
save_item(NAME(m_flip));
|
||||
save_item(NAME(m_last));
|
||||
@ -475,12 +477,12 @@ TIMER_CALLBACK_MEMBER(m10_state::interrupt_callback)
|
||||
if (param == 0)
|
||||
{
|
||||
m_maincpu->set_input_line(0, ASSERT_LINE);
|
||||
timer_set(m_screen->time_until_pos(IREMM10_VBSTART + 16), TIMER_INTERRUPT, 1);
|
||||
m_interrupt_timer->adjust(m_screen->time_until_pos(IREMM10_VBSTART + 16), 1);
|
||||
}
|
||||
if (param == 1)
|
||||
{
|
||||
m_maincpu->set_input_line(0, ASSERT_LINE);
|
||||
timer_set(m_screen->time_until_pos(IREMM10_VBSTART + 24), TIMER_INTERRUPT, 2);
|
||||
m_interrupt_timer->adjust(m_screen->time_until_pos(IREMM10_VBSTART + 24), 2);
|
||||
}
|
||||
if (param == -1)
|
||||
m_maincpu->set_input_line(0, CLEAR_LINE);
|
||||
@ -502,7 +504,7 @@ void m10_state::device_timer(emu_timer &timer, device_timer_id id, int param, vo
|
||||
INTERRUPT_GEN_MEMBER(m10_state::m11_interrupt)
|
||||
{
|
||||
device.execute().set_input_line(0, ASSERT_LINE);
|
||||
//timer_set(m_screen->time_until_pos(IREMM10_VBEND), TIMER_INTERRUPT, -1);
|
||||
//m_interrupt_timer->adjust(m_screen->time_until_pos(IREMM10_VBEND), -1);
|
||||
}
|
||||
|
||||
INTERRUPT_GEN_MEMBER(m10_state::m10_interrupt)
|
||||
@ -514,7 +516,7 @@ INTERRUPT_GEN_MEMBER(m10_state::m10_interrupt)
|
||||
INTERRUPT_GEN_MEMBER(m10_state::m15_interrupt)
|
||||
{
|
||||
device.execute().set_input_line(0, ASSERT_LINE);
|
||||
timer_set(m_screen->time_until_pos(IREMM10_VBSTART + 1, 80), TIMER_INTERRUPT, -1);
|
||||
m_interrupt_timer->adjust(m_screen->time_until_pos(IREMM10_VBSTART + 1, 80), -1);
|
||||
}
|
||||
|
||||
/*************************************
|
||||
|
@ -44,6 +44,7 @@ public:
|
||||
optional_ioport m_light1_x;
|
||||
optional_ioport m_light1_y;
|
||||
|
||||
emu_timer *m_gen_ext1_int_timer;
|
||||
uint16_t m_blitter_data[8];
|
||||
std::unique_ptr<uint16_t[]> m_screenram;
|
||||
uint8_t m_vispage;
|
||||
@ -70,7 +71,4 @@ protected:
|
||||
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
|
||||
};
|
||||
|
||||
/*----------- defined in video/lethalj.c -----------*/
|
||||
void lethalj_scanline_update(screen_device &screen, bitmap_ind16 &bitmap, int scanline, const tms34010_display_params *params);
|
||||
|
||||
#endif // MAME_INCLUDES_LETHALJ_H
|
||||
|
@ -75,6 +75,7 @@ public:
|
||||
|
||||
/* misc */
|
||||
int m_last;
|
||||
emu_timer *m_interrupt_timer;
|
||||
|
||||
/* devices */
|
||||
required_device<cpu_device> m_maincpu;
|
||||
|
@ -55,6 +55,7 @@ public:
|
||||
required_device<pic8259_device> m_upd71059c;
|
||||
optional_device<generic_latch_8_device> m_soundlatch;
|
||||
|
||||
emu_timer *m_spritebuffer_timer;
|
||||
uint16_t m_sound_status;
|
||||
uint32_t m_raster_irq_position;
|
||||
uint16_t m_videocontrol;
|
||||
|
@ -91,6 +91,8 @@ void lethalj_state::video_start()
|
||||
/* predetermine blitter info */
|
||||
m_blitter_base = (uint16_t *)memregion("gfx1")->base();
|
||||
m_blitter_rows = memregion("gfx1")->bytes() / (2*BLITTER_SOURCE_WIDTH);
|
||||
|
||||
m_gen_ext1_int_timer = timer_alloc(TIMER_GEN_EXT1_INT);
|
||||
}
|
||||
|
||||
|
||||
@ -168,7 +170,7 @@ WRITE16_MEMBER(lethalj_state::lethalj_blitter_w)
|
||||
else
|
||||
do_blit();
|
||||
|
||||
timer_set(attotime::from_hz(XTAL_32MHz) * ((m_blitter_data[5] + 1) * (m_blitter_data[7] + 1)), TIMER_GEN_EXT1_INT);
|
||||
m_gen_ext1_int_timer->adjust(attotime::from_hz(XTAL_32MHz) * ((m_blitter_data[5] + 1) * (m_blitter_data[7] + 1)));
|
||||
}
|
||||
|
||||
/* clear the IRQ on offset 0 */
|
||||
|
@ -91,7 +91,7 @@ WRITE16_MEMBER(m92_state::m92_spritecontrol_w)
|
||||
|
||||
/* Pixel clock is 26.6666MHz (some boards 27MHz??), we have 0x800 bytes, or 0x400 words to copy from
|
||||
spriteram to the buffer. It seems safe to assume 1 word can be copied per clock. */
|
||||
timer_set(attotime::from_hz(XTAL_26_66666MHz) * 0x400, TIMER_SPRITEBUFFER);
|
||||
m_spritebuffer_timer->adjust(attotime::from_hz(XTAL_26_66666MHz) * 0x400);
|
||||
}
|
||||
// logerror("%04x: m92_spritecontrol_w %08x %08x\n",space.device().safe_pc(),offset,data);
|
||||
}
|
||||
@ -247,10 +247,10 @@ WRITE16_MEMBER(m92_state::m92_master_control_w)
|
||||
|
||||
VIDEO_START_MEMBER(m92_state,m92)
|
||||
{
|
||||
int laynum;
|
||||
m_spritebuffer_timer = timer_alloc(TIMER_SPRITEBUFFER);
|
||||
|
||||
memset(&m_pf_layer, 0, sizeof(m_pf_layer));
|
||||
for (laynum = 0; laynum < 3; laynum++)
|
||||
for (int laynum = 0; laynum < 3; laynum++)
|
||||
{
|
||||
M92_pf_layer_info *layer = &m_pf_layer[laynum];
|
||||
|
||||
@ -301,11 +301,9 @@ VIDEO_START_MEMBER(m92_state,m92)
|
||||
|
||||
VIDEO_START_MEMBER(m92_state,ppan)
|
||||
{
|
||||
int laynum;
|
||||
|
||||
VIDEO_START_CALL_MEMBER(m92);
|
||||
|
||||
for (laynum = 0; laynum < 3; laynum++)
|
||||
for (int laynum = 0; laynum < 3; laynum++)
|
||||
{
|
||||
M92_pf_layer_info *layer = &m_pf_layer[laynum];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user