mirror of
https://github.com/holub/mame
synced 2025-05-21 13:18:56 +03:00
small cleanup (nw)
This commit is contained in:
parent
3d7524a02d
commit
7a4840affd
@ -330,7 +330,7 @@ WRITE16_MEMBER(armedf_state::terraf_io_w)
|
|||||||
WRITE16_MEMBER(armedf_state::terrafjb_io_w)
|
WRITE16_MEMBER(armedf_state::terrafjb_io_w)
|
||||||
{
|
{
|
||||||
if(data & 0x4000 && ((m_vreg & 0x4000) == 0)) //0 -> 1 transition
|
if(data & 0x4000 && ((m_vreg & 0x4000) == 0)) //0 -> 1 transition
|
||||||
machine().device("extra")->execute().set_input_line(0, HOLD_LINE);
|
m_extra->set_input_line(0, HOLD_LINE);
|
||||||
|
|
||||||
COMBINE_DATA(&m_vreg);
|
COMBINE_DATA(&m_vreg);
|
||||||
|
|
||||||
|
@ -41,8 +41,8 @@ void eprom_state::update_interrupts()
|
|||||||
{
|
{
|
||||||
m_maincpu->set_input_line(4, m_video_int_state ? ASSERT_LINE : CLEAR_LINE);
|
m_maincpu->set_input_line(4, m_video_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||||
|
|
||||||
if (subdevice("extra") != NULL)
|
if (m_extra != NULL)
|
||||||
subdevice("extra")->execute().set_input_line(4, m_video_int_state ? ASSERT_LINE : CLEAR_LINE);
|
m_extra->set_input_line(4, m_video_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||||
|
|
||||||
m_maincpu->set_input_line(6, m_sound_int_state ? ASSERT_LINE : CLEAR_LINE);
|
m_maincpu->set_input_line(6, m_sound_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||||
}
|
}
|
||||||
@ -94,13 +94,13 @@ READ16_MEMBER(eprom_state::adc_r)
|
|||||||
|
|
||||||
WRITE16_MEMBER(eprom_state::eprom_latch_w)
|
WRITE16_MEMBER(eprom_state::eprom_latch_w)
|
||||||
{
|
{
|
||||||
if (ACCESSING_BITS_0_7 && (machine().device("extra") != NULL))
|
if (ACCESSING_BITS_0_7 && (m_extra != NULL))
|
||||||
{
|
{
|
||||||
/* bit 0: reset extra CPU */
|
/* bit 0: reset extra CPU */
|
||||||
if (data & 1)
|
if (data & 1)
|
||||||
machine().device("extra")->execute().set_input_line(INPUT_LINE_RESET, CLEAR_LINE);
|
m_extra->set_input_line(INPUT_LINE_RESET, CLEAR_LINE);
|
||||||
else
|
else
|
||||||
machine().device("extra")->execute().set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
|
m_extra->set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
|
||||||
|
|
||||||
/* bits 1-4: screen intensity */
|
/* bits 1-4: screen intensity */
|
||||||
m_screen_intensity = (data & 0x1e) >> 1;
|
m_screen_intensity = (data & 0x1e) >> 1;
|
||||||
@ -707,7 +707,7 @@ DRIVER_INIT_MEMBER(eprom_state,eprom)
|
|||||||
|
|
||||||
/* install CPU synchronization handlers */
|
/* install CPU synchronization handlers */
|
||||||
m_sync_data = m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0x16cc00, 0x16cc01, read16_delegate(FUNC(eprom_state::sync_r),this), write16_delegate(FUNC(eprom_state::sync_w),this));
|
m_sync_data = m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0x16cc00, 0x16cc01, read16_delegate(FUNC(eprom_state::sync_r),this), write16_delegate(FUNC(eprom_state::sync_w),this));
|
||||||
m_sync_data = machine().device("extra")->memory().space(AS_PROGRAM).install_readwrite_handler(0x16cc00, 0x16cc01, read16_delegate(FUNC(eprom_state::sync_r),this), write16_delegate(FUNC(eprom_state::sync_w),this));
|
m_sync_data = m_extra->space(AS_PROGRAM).install_readwrite_handler(0x16cc00, 0x16cc01, read16_delegate(FUNC(eprom_state::sync_r),this), write16_delegate(FUNC(eprom_state::sync_w),this));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -35,7 +35,7 @@
|
|||||||
void thunderj_state::update_interrupts()
|
void thunderj_state::update_interrupts()
|
||||||
{
|
{
|
||||||
m_maincpu->set_input_line(4, m_scanline_int_state ? ASSERT_LINE : CLEAR_LINE);
|
m_maincpu->set_input_line(4, m_scanline_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||||
subdevice("extra")->execute().set_input_line(4, m_scanline_int_state ? ASSERT_LINE : CLEAR_LINE);
|
m_extra->set_input_line(4, m_scanline_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||||
m_maincpu->set_input_line(6, m_sound_int_state ? ASSERT_LINE : CLEAR_LINE);
|
m_maincpu->set_input_line(6, m_sound_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -81,9 +81,9 @@ WRITE16_MEMBER(thunderj_state::latch_w)
|
|||||||
{
|
{
|
||||||
/* 0 means hold CPU 2's reset low */
|
/* 0 means hold CPU 2's reset low */
|
||||||
if (data & 1)
|
if (data & 1)
|
||||||
machine().device("extra")->execute().set_input_line(INPUT_LINE_RESET, CLEAR_LINE);
|
m_extra->set_input_line(INPUT_LINE_RESET, CLEAR_LINE);
|
||||||
else
|
else
|
||||||
machine().device("extra")->execute().set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
|
m_extra->set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
|
||||||
|
|
||||||
/* bits 2-5 are the alpha bank */
|
/* bits 2-5 are the alpha bank */
|
||||||
if (m_alpha_tile_bank != ((data >> 2) & 7))
|
if (m_alpha_tile_bank != ((data >> 2) & 7))
|
||||||
|
@ -9,7 +9,8 @@ public:
|
|||||||
m_spr_pal_clut(*this, "spr_pal_clut"),
|
m_spr_pal_clut(*this, "spr_pal_clut"),
|
||||||
m_fg_videoram(*this, "fg_videoram"),
|
m_fg_videoram(*this, "fg_videoram"),
|
||||||
m_bg_videoram(*this, "bg_videoram"),
|
m_bg_videoram(*this, "bg_videoram"),
|
||||||
m_maincpu(*this, "maincpu") { }
|
m_maincpu(*this, "maincpu"),
|
||||||
|
m_extra(*this, "extra") { }
|
||||||
|
|
||||||
/* memory pointers */
|
/* memory pointers */
|
||||||
UINT8 * m_text_videoram;
|
UINT8 * m_text_videoram;
|
||||||
@ -87,6 +88,7 @@ public:
|
|||||||
int transparent_color);
|
int transparent_color);
|
||||||
|
|
||||||
required_device<cpu_device> m_maincpu;
|
required_device<cpu_device> m_maincpu;
|
||||||
|
optional_device<cpu_device> m_extra;
|
||||||
};
|
};
|
||||||
|
|
||||||
class bigfghtr_state : public armedf_state
|
class bigfghtr_state : public armedf_state
|
||||||
|
@ -10,7 +10,8 @@ class eprom_state : public atarigen_state
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
eprom_state(const machine_config &mconfig, device_type type, const char *tag)
|
eprom_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||||
: atarigen_state(mconfig, type, tag) { }
|
: atarigen_state(mconfig, type, tag),
|
||||||
|
m_extra(*this, "extra") { }
|
||||||
|
|
||||||
int m_screen_intensity;
|
int m_screen_intensity;
|
||||||
int m_video_disable;
|
int m_video_disable;
|
||||||
@ -36,6 +37,7 @@ public:
|
|||||||
UINT32 screen_update_eprom(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
UINT32 screen_update_eprom(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||||
UINT32 screen_update_guts(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
UINT32 screen_update_guts(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||||
void update_palette();
|
void update_palette();
|
||||||
|
optional_device<cpu_device> m_extra;
|
||||||
};
|
};
|
||||||
|
|
||||||
/*----------- defined in video/eprom.c -----------*/
|
/*----------- defined in video/eprom.c -----------*/
|
||||||
|
@ -10,7 +10,8 @@ class thunderj_state : public atarigen_state
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
thunderj_state(const machine_config &mconfig, device_type type, const char *tag)
|
thunderj_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||||
: atarigen_state(mconfig, type, tag) { }
|
: atarigen_state(mconfig, type, tag),
|
||||||
|
m_extra(*this, "extra") { }
|
||||||
|
|
||||||
UINT8 m_alpha_tile_bank;
|
UINT8 m_alpha_tile_bank;
|
||||||
virtual void update_interrupts();
|
virtual void update_interrupts();
|
||||||
@ -26,4 +27,5 @@ public:
|
|||||||
DECLARE_MACHINE_RESET(thunderj);
|
DECLARE_MACHINE_RESET(thunderj);
|
||||||
DECLARE_VIDEO_START(thunderj);
|
DECLARE_VIDEO_START(thunderj);
|
||||||
UINT32 screen_update_thunderj(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
UINT32 screen_update_thunderj(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||||
|
required_device<cpu_device> m_extra;
|
||||||
};
|
};
|
||||||
|
@ -79,7 +79,7 @@ void exterm_scanline_update(screen_device &screen, bitmap_ind16 &bitmap, int sca
|
|||||||
int x;
|
int x;
|
||||||
|
|
||||||
/* get parameters for the slave CPU */
|
/* get parameters for the slave CPU */
|
||||||
tms34010_get_display_params(screen.machine().device("slave"), &fgparams);
|
tms34010_get_display_params(state->m_slave, &fgparams);
|
||||||
|
|
||||||
/* compute info about the slave vram */
|
/* compute info about the slave vram */
|
||||||
if (fgparams.enabled && scanline >= fgparams.veblnk && scanline < fgparams.vsblnk && fgparams.heblnk < fgparams.hsblnk)
|
if (fgparams.enabled && scanline >= fgparams.veblnk && scanline < fgparams.vsblnk && fgparams.heblnk < fgparams.hsblnk)
|
||||||
|
@ -730,7 +730,7 @@ MACHINE_RESET_MEMBER(sat_console_state,saturn)
|
|||||||
//memset(stv_m_workram_h, 0, 0x100000);
|
//memset(stv_m_workram_h, 0, 0x100000);
|
||||||
|
|
||||||
m_maincpu->set_unscaled_clock(MASTER_CLOCK_320/2);
|
m_maincpu->set_unscaled_clock(MASTER_CLOCK_320/2);
|
||||||
machine().device("slave")->set_unscaled_clock(MASTER_CLOCK_320/2);
|
m_slave->set_unscaled_clock(MASTER_CLOCK_320/2);
|
||||||
|
|
||||||
stvcd_reset();
|
stvcd_reset();
|
||||||
|
|
||||||
@ -843,7 +843,7 @@ void sat_console_state::saturn_init_driver(int rgn)
|
|||||||
|
|
||||||
// set compatible options
|
// set compatible options
|
||||||
sh2drc_set_options(m_maincpu, SH2DRC_STRICT_VERIFY|SH2DRC_STRICT_PCREL);
|
sh2drc_set_options(m_maincpu, SH2DRC_STRICT_VERIFY|SH2DRC_STRICT_PCREL);
|
||||||
sh2drc_set_options(machine().device("slave"), SH2DRC_STRICT_VERIFY|SH2DRC_STRICT_PCREL);
|
sh2drc_set_options(m_slave, SH2DRC_STRICT_VERIFY|SH2DRC_STRICT_PCREL);
|
||||||
|
|
||||||
/* amount of time to boost interleave for on MINIT / SINIT, needed for communication to work */
|
/* amount of time to boost interleave for on MINIT / SINIT, needed for communication to work */
|
||||||
m_minit_boost = 400;
|
m_minit_boost = 400;
|
||||||
|
Loading…
Reference in New Issue
Block a user