mirror of
https://github.com/holub/mame
synced 2025-04-24 17:30:55 +03:00
a couple timer_set removed (nw)
This commit is contained in:
parent
2e84e89345
commit
6d55813a59
@ -55,7 +55,6 @@ write:
|
||||
#include "includes/dday.h"
|
||||
|
||||
#include "cpu/z80/z80.h"
|
||||
#include "sound/ay8910.h"
|
||||
#include "speaker.h"
|
||||
|
||||
|
||||
@ -240,8 +239,6 @@ GFXDECODE_END
|
||||
|
||||
void dday_state::machine_start()
|
||||
{
|
||||
m_ay1 = machine().device("ay1");
|
||||
|
||||
save_item(NAME(m_control));
|
||||
save_item(NAME(m_sl_enable));
|
||||
save_item(NAME(m_sl_image));
|
||||
|
@ -235,7 +235,7 @@ INTERRUPT_GEN_MEMBER(metro_state::karatour_interrupt)
|
||||
m_requested_int[m_vblank_bit] = 1;
|
||||
|
||||
/* write to scroll registers, the duration is a guess */
|
||||
timer_set(attotime::from_usec(2500), TIMER_KARATOUR_IRQ);
|
||||
m_karatour_irq_timer->adjust(attotime::from_usec(2500));
|
||||
m_requested_int[5] = 1;
|
||||
|
||||
update_irq_state();
|
||||
@ -617,7 +617,7 @@ WRITE16_MEMBER(metro_state::metro_blitter_w)
|
||||
another blit. */
|
||||
if (b1 == 0)
|
||||
{
|
||||
timer_set(attotime::from_usec(500), TIMER_METRO_BLIT_DONE);
|
||||
m_blit_done_timer->adjust(attotime::from_usec(500));
|
||||
return;
|
||||
}
|
||||
|
||||
@ -6214,6 +6214,8 @@ void metro_state::metro_common( )
|
||||
m_irq_line = 2;
|
||||
|
||||
*m_irq_enable = 0;
|
||||
|
||||
m_blit_done_timer = timer_alloc(TIMER_METRO_BLIT_DONE);
|
||||
}
|
||||
|
||||
|
||||
@ -6241,6 +6243,8 @@ DRIVER_INIT_MEMBER(metro_state,karatour)
|
||||
m_vram_2[i] = machine().rand();
|
||||
}
|
||||
|
||||
m_karatour_irq_timer = timer_alloc(TIMER_KARATOUR_IRQ);
|
||||
|
||||
DRIVER_INIT_CALL(metro);
|
||||
}
|
||||
|
||||
@ -6297,6 +6301,8 @@ DRIVER_INIT_MEMBER(metro_state,blzntrnd)
|
||||
{
|
||||
metro_common();
|
||||
m_irq_line = 1;
|
||||
|
||||
m_karatour_irq_timer = timer_alloc(TIMER_KARATOUR_IRQ);
|
||||
}
|
||||
|
||||
DRIVER_INIT_MEMBER(metro_state,vmetal)
|
||||
|
@ -6,6 +6,7 @@
|
||||
|
||||
*************************************************************************/
|
||||
#include "screen.h"
|
||||
#include "sound/ay8910.h"
|
||||
|
||||
|
||||
class dday_state : public driver_device
|
||||
@ -20,7 +21,8 @@ public:
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_gfxdecode(*this, "gfxdecode"),
|
||||
m_screen(*this, "screen"),
|
||||
m_palette(*this, "palette") { }
|
||||
m_palette(*this, "palette"),
|
||||
m_ay1(*this, "ay1") { }
|
||||
|
||||
/* memory pointers */
|
||||
required_shared_ptr<uint8_t> m_textvideoram;
|
||||
@ -38,9 +40,9 @@ public:
|
||||
int m_sl_image;
|
||||
int m_sl_enable;
|
||||
int m_timer_value;
|
||||
emu_timer *m_countdown_timer;
|
||||
|
||||
/* devices */
|
||||
device_t *m_ay1;
|
||||
DECLARE_READ8_MEMBER(dday_countdown_timer_r);
|
||||
DECLARE_WRITE8_MEMBER(dday_bgvideoram_w);
|
||||
DECLARE_WRITE8_MEMBER(dday_fgvideoram_w);
|
||||
@ -64,4 +66,5 @@ public:
|
||||
required_device<gfxdecode_device> m_gfxdecode;
|
||||
required_device<screen_device> m_screen;
|
||||
required_device<palette_device> m_palette;
|
||||
required_device<ay8910_device> m_ay1;
|
||||
};
|
||||
|
@ -98,6 +98,7 @@ public:
|
||||
int m_sprite_xoffs;
|
||||
int m_sprite_yoffs;
|
||||
int m_sprite_xoffs_dx;
|
||||
emu_timer *m_blit_done_timer;
|
||||
|
||||
std::unique_ptr<uint8_t[]> m_expanded_gfx1;
|
||||
|
||||
@ -105,8 +106,9 @@ public:
|
||||
int m_vblank_bit;
|
||||
int m_blitter_bit;
|
||||
int m_irq_line;
|
||||
uint8_t m_requested_int[8];
|
||||
uint8_t m_requested_int[8];
|
||||
emu_timer *m_mouja_irq_timer;
|
||||
emu_timer *m_karatour_irq_timer;
|
||||
|
||||
/* sound related */
|
||||
uint16_t m_soundstatus;
|
||||
|
@ -37,7 +37,7 @@ void dday_state::start_countdown_timer()
|
||||
{
|
||||
m_timer_value = 0;
|
||||
|
||||
machine().scheduler().timer_pulse(attotime::from_seconds(1), timer_expired_delegate(FUNC(dday_state::countdown_timer_callback),this));
|
||||
m_countdown_timer->adjust(attotime::from_seconds(1), 0, attotime::from_seconds(1));
|
||||
}
|
||||
|
||||
|
||||
@ -216,6 +216,8 @@ void dday_state::video_start()
|
||||
m_fg_tilemap->set_transparent_pen(0);
|
||||
m_text_tilemap->set_transparent_pen(0);
|
||||
|
||||
m_countdown_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(dday_state::countdown_timer_callback), this));
|
||||
|
||||
start_countdown_timer();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user