V9938 to use devcb2 (nw)

This commit is contained in:
Miodrag Milanovic 2013-04-02 12:53:12 +00:00
parent 0e7073c4ee
commit c0a6aac7f6
18 changed files with 64 additions and 77 deletions

View File

@ -78,7 +78,7 @@ v99x8_device::v99x8_device(const machine_config &mconfig, device_type type, cons
m_address_latch(0),
m_vram_size(0),
m_int_state(0),
m_int_callback_device_name(NULL),
m_int_callback(*this),
m_scanline(0),
m_blink(0),
m_blink_count(0),
@ -577,14 +577,6 @@ void v99x8_device::static_set_vram_size(device_t &device, UINT32 vram_size)
downcast<v99x8_device &>(device).m_vram_size = vram_size;
}
void v99x8_device::static_set_interrupt_callback(device_t &device, v99x8_interrupt_delegate callback, const char *device_name)
{
v99x8_device &v99x8 = downcast<v99x8_device &>(device);
v99x8.m_int_callback = callback;
v99x8.m_int_callback_device_name = device_name;
}
/***************************************************************************
Init/stop/reset/Interrupt functions
@ -599,13 +591,7 @@ void v99x8_device::device_start()
if (!m_screen->started())
throw device_missing_dependencies();
if (!m_int_callback.isnull())
{
device_t *device = (m_int_callback_device_name != NULL) ? machine().device(m_int_callback_device_name) : NULL;
if (device != NULL)
m_int_callback.late_bind(*device);
}
m_int_callback.resolve_safe();
m_vdp_ops_count = 1;
m_vdp_engine = NULL;
@ -805,7 +791,7 @@ void v99x8_device::check_int()
** called; because of this Mr. Ghost, Xevious and SD Snatcher don't
** run. As a patch it's called every scanline
*/
m_int_callback (*this, n);
m_int_callback(n);
}
/***************************************************************************

View File

@ -23,12 +23,9 @@
MCFG_DEVICE_ADD(_tag, V9958, 0) \
v9938_device::static_set_screen(*device, _screen); \
v9938_device::static_set_vram_size(*device, _vramsize);
#define MCFG_V99X8_INTERRUPT_CALLBACK_STATIC(_func) \
v9938_device::static_set_interrupt_callback(*device, v99x8_interrupt_delegate(_func, #_func, (device_t *)0), device->tag());
#define MCFG_V99X8_INTERRUPT_CALLBACK_DEVICE(_devname, _class, _func) \
v9938_device::static_set_interrupt_callback(*device, v99x8_interrupt_delegate(&_class::_func, #_class "::" #_func, (_class *)0), _devname);
#define MCFG_V99X8_INTERRUPT_CALLBACK(_irq) \
downcast<v9938_device *>(device)->set_interrupt_callback(DEVCB2_##_irq);
// init functions
@ -56,10 +53,6 @@ extern const device_type V9958;
// TYPE DEFINITIONS
//**************************************************************************
class v99x8_device;
typedef delegate<void (v99x8_device &, int)> v99x8_interrupt_delegate;
// ======================> v99x8_device
class v99x8_device : public device_t, public device_memory_interface
@ -71,6 +64,9 @@ protected:
v99x8_device(const machine_config &mconfig, device_type type, const char *name, const char *shortname, const char *tag, device_t *owner, UINT32 clock);
public:
template<class _irq> void set_interrupt_callback(_irq irq) {
m_int_callback.set_callback(irq);
}
int interrupt ();
void set_resolution (int);
int get_transpen();
@ -91,7 +87,6 @@ public:
static void static_set_screen(device_t &device, const char *screen_name);
static void static_set_vram_size(device_t &device, UINT32 vram_size);
static void static_set_interrupt_callback(device_t &device, v99x8_interrupt_delegate callback, const char *device_name);
/* RESET pin */
void reset_line(int state) { if (state==ASSERT_LINE) device_reset(); }
@ -196,8 +191,7 @@ private:
// interrupt
UINT8 m_int_state;
v99x8_interrupt_delegate m_int_callback;
const char *m_int_callback_device_name;
devcb2_write_line m_int_callback;
int m_scanline;
// blinking
int m_blink, m_blink_count;

View File

@ -76,6 +76,7 @@ public:
DECLARE_WRITE8_MEMBER(mux_w);
virtual void machine_reset();
TIMER_DEVICE_CALLBACK_MEMBER(big10_interrupt);
DECLARE_WRITE_LINE_MEMBER(big10_vdp_interrupt);
};
@ -86,9 +87,9 @@ public:
* Interrupt handling & Video *
***************************************/
static void big10_vdp_interrupt(device_t *, v99x8_device &device, int i)
WRITE_LINE_MEMBER(big10_state::big10_vdp_interrupt)
{
device.machine().device("maincpu")->execute().set_input_line(0, (i ? ASSERT_LINE : CLEAR_LINE));
machine().device("maincpu")->execute().set_input_line(0, (state ? ASSERT_LINE : CLEAR_LINE));
}
TIMER_DEVICE_CALLBACK_MEMBER(big10_state::big10_interrupt)
@ -254,7 +255,7 @@ static MACHINE_CONFIG_START( big10, big10_state )
/* video hardware */
MCFG_V9938_ADD("v9938", "screen", VDP_MEM)
MCFG_V99X8_INTERRUPT_CALLBACK_STATIC(big10_vdp_interrupt)
MCFG_V99X8_INTERRUPT_CALLBACK(WRITELINE(big10_state, big10_vdp_interrupt))
MCFG_SCREEN_ADD("screen", RASTER)
MCFG_SCREEN_REFRESH_RATE(60)

View File

@ -81,6 +81,7 @@ public:
DECLARE_DRIVER_INIT(junai2);
virtual void machine_reset();
TIMER_DEVICE_CALLBACK_MEMBER(csplayh5_irq);
DECLARE_WRITE_LINE_MEMBER(csplayh5_vdp0_interrupt);
};
@ -95,7 +96,7 @@ public:
#define MSX2_VISIBLE_XBORDER_PIXELS 8 * 2
#define MSX2_VISIBLE_YBORDER_PIXELS 14 * 2
static void csplayh5_vdp0_interrupt(device_t *, v99x8_device &device, int i)
WRITE_LINE_MEMBER(csplayh5_state::csplayh5_vdp0_interrupt)
{
/* this is not used as the v9938 interrupt callbacks are broken
interrupts seem to be fired quite randomly */
@ -645,7 +646,7 @@ static MACHINE_CONFIG_START( csplayh5, csplayh5_state )
MCFG_VIDEO_ATTRIBUTES(VIDEO_UPDATE_BEFORE_VBLANK)
MCFG_V9958_ADD("v9958", "screen", 0x20000)
MCFG_V99X8_INTERRUPT_CALLBACK_STATIC(csplayh5_vdp0_interrupt)
MCFG_V99X8_INTERRUPT_CALLBACK(WRITELINE(csplayh5_state, csplayh5_vdp0_interrupt))
MCFG_SCREEN_ADD("screen",RASTER)
MCFG_SCREEN_REFRESH_RATE(60)

View File

@ -231,6 +231,7 @@ public:
TIMER_DEVICE_CALLBACK_MEMBER(kas89_interrupt);
TIMER_DEVICE_CALLBACK_MEMBER(kas89_nmi_cb);
TIMER_DEVICE_CALLBACK_MEMBER(kas89_sound_nmi_cb);
DECLARE_WRITE_LINE_MEMBER(kas89_vdp_interrupt);
};
#define VDP_MEM 0x40000
@ -240,9 +241,9 @@ public:
* Interrupt handling & Video *
***************************************/
static void kas89_vdp_interrupt(device_t *, v99x8_device &device, int i)
WRITE_LINE_MEMBER(kas89_state::kas89_vdp_interrupt)
{
device.machine().device("maincpu")->execute().set_input_line(0, (i ? ASSERT_LINE : CLEAR_LINE));
machine().device("maincpu")->execute().set_input_line(0, (state ? ASSERT_LINE : CLEAR_LINE));
}
TIMER_DEVICE_CALLBACK_MEMBER(kas89_state::kas89_interrupt)
@ -789,7 +790,7 @@ static MACHINE_CONFIG_START( kas89, kas89_state )
/* video hardware */
MCFG_V9938_ADD("v9938", "screen", VDP_MEM)
MCFG_V99X8_INTERRUPT_CALLBACK_STATIC(kas89_vdp_interrupt)
MCFG_V99X8_INTERRUPT_CALLBACK(WRITELINE(kas89_state,kas89_vdp_interrupt))
MCFG_SCREEN_ADD("screen", RASTER)
MCFG_SCREEN_REFRESH_RATE(60)

View File

@ -229,6 +229,7 @@ public:
virtual void machine_reset();
TIMER_DEVICE_CALLBACK_MEMBER(kurukuru_vdp_scanline);
DECLARE_WRITE_LINE_MEMBER(kurukuru_msm5205_vck);
DECLARE_WRITE_LINE_MEMBER(kurukuru_vdp_interrupt);
};
#define MAIN_CLOCK XTAL_21_4772MHz
@ -252,9 +253,9 @@ public:
* Interrupts *
*************************************************/
static void kurukuru_vdp_interrupt(device_t *, v99x8_device &device, int i)
WRITE_LINE_MEMBER(kurukuru_state::kurukuru_vdp_interrupt)
{
device.machine().device("maincpu")->execute().set_input_line(0, (i ? ASSERT_LINE : CLEAR_LINE));
machine().device("maincpu")->execute().set_input_line(0, (state ? ASSERT_LINE : CLEAR_LINE));
}
@ -287,7 +288,7 @@ void kurukuru_state::update_sound_irq(UINT8 cause)
WRITE_LINE_MEMBER(kurukuru_state::kurukuru_msm5205_vck)
{
update_sound_irq(m_sound_irq_cause | 2);
msm5205_data_w(machine().device("msm"), m_adpcm_data);
msm5205_data_w(machine().device("adpcm"), m_adpcm_data);
}
@ -575,7 +576,7 @@ static MACHINE_CONFIG_START( kurukuru, kurukuru_state )
MCFG_VIDEO_ATTRIBUTES(VIDEO_UPDATE_BEFORE_VBLANK)
MCFG_V9938_ADD("v9938", "screen", VDP_MEM)
MCFG_V99X8_INTERRUPT_CALLBACK_STATIC(kurukuru_vdp_interrupt)
MCFG_V99X8_INTERRUPT_CALLBACK(WRITELINE(kurukuru_state,kurukuru_vdp_interrupt))
MCFG_SCREEN_ADD("screen",RASTER)
MCFG_SCREEN_REFRESH_RATE(60)

View File

@ -251,6 +251,8 @@ public:
void meritm_crt250_switch_banks( );
void meritm_switch_banks( );
UINT8 binary_to_BCD(UINT8 data);
DECLARE_WRITE_LINE_MEMBER(meritm_vdp0_interrupt);
DECLARE_WRITE_LINE_MEMBER(meritm_vdp1_interrupt);
};
@ -446,13 +448,13 @@ TIMER_DEVICE_CALLBACK_MEMBER(meritm_state::meritm_interrupt)
}
}
static void meritm_vdp0_interrupt(device_t *, v99x8_device &device, int i)
WRITE_LINE_MEMBER(meritm_state::meritm_vdp0_interrupt)
{
/* this is not used as the v9938 interrupt callbacks are broken
interrupts seem to be fired quite randomly */
}
static void meritm_vdp1_interrupt(device_t *, v99x8_device &device, int i)
WRITE_LINE_MEMBER(meritm_state::meritm_vdp1_interrupt)
{
/* this is not used as the v9938 interrupt callbacks are broken
interrupts seem to be fired quite randomly */
@ -1189,10 +1191,10 @@ static MACHINE_CONFIG_START( meritm_crt250, meritm_state )
MCFG_VIDEO_ATTRIBUTES(VIDEO_UPDATE_BEFORE_VBLANK)
MCFG_V9938_ADD("v9938_0", "screen", 0x20000)
MCFG_V99X8_INTERRUPT_CALLBACK_STATIC(meritm_vdp0_interrupt)
MCFG_V99X8_INTERRUPT_CALLBACK(WRITELINE(meritm_state,meritm_vdp0_interrupt))
MCFG_V9938_ADD("v9938_1", "screen", 0x20000)
MCFG_V99X8_INTERRUPT_CALLBACK_STATIC(meritm_vdp1_interrupt)
MCFG_V99X8_INTERRUPT_CALLBACK(WRITELINE(meritm_state,meritm_vdp1_interrupt))
MCFG_SCREEN_ADD("screen",RASTER)
MCFG_SCREEN_REFRESH_RATE(60)

View File

@ -70,6 +70,7 @@ public:
TIMER_DEVICE_CALLBACK_MEMBER(sangho_interrupt);
void pzlestar_map_banks();
void sexyboom_map_bank(int bank);
DECLARE_WRITE_LINE_MEMBER(msx_vdp_interrupt);
};
@ -401,9 +402,9 @@ MACHINE_RESET_MEMBER(sangho_state,sexyboom)
sexyboom_map_bank(3);
}
static void msx_vdp_interrupt(device_t *, v99x8_device &device, int i)
{
device.machine().device("maincpu")->execute().set_input_line(0, (i ? HOLD_LINE : CLEAR_LINE));
WRITE_LINE_MEMBER(sangho_state::msx_vdp_interrupt)
{
machine().device("maincpu")->execute().set_input_line(0, (state ? HOLD_LINE : CLEAR_LINE));
}
TIMER_DEVICE_CALLBACK_MEMBER(sangho_state::sangho_interrupt)
@ -428,7 +429,7 @@ static MACHINE_CONFIG_START( pzlestar, sangho_state )
MCFG_VIDEO_ATTRIBUTES(VIDEO_UPDATE_BEFORE_VBLANK)
MCFG_V9958_ADD("v9958", "screen", 0x20000)
MCFG_V99X8_INTERRUPT_CALLBACK_STATIC(msx_vdp_interrupt)
MCFG_V99X8_INTERRUPT_CALLBACK(WRITELINE(sangho_state,msx_vdp_interrupt))
MCFG_SCREEN_ADD("screen", RASTER)
MCFG_SCREEN_REFRESH_RATE(60)
@ -460,7 +461,7 @@ static MACHINE_CONFIG_START( sexyboom, sangho_state )
MCFG_VIDEO_ATTRIBUTES(VIDEO_UPDATE_BEFORE_VBLANK)
MCFG_V9958_ADD("v9958", "screen", 0x20000)
MCFG_V99X8_INTERRUPT_CALLBACK_STATIC(msx_vdp_interrupt)
MCFG_V99X8_INTERRUPT_CALLBACK(WRITELINE(sangho_state,msx_vdp_interrupt))
MCFG_SCREEN_ADD("screen", RASTER)
MCFG_SCREEN_REFRESH_RATE(60)

View File

@ -83,6 +83,7 @@ public:
void sfkick_remap_banks();
void sfkick_bank_set(int num, int data);
DECLARE_WRITE_LINE_MEMBER(irqhandler);
DECLARE_WRITE_LINE_MEMBER(sfkick_vdp_interrupt);
};
@ -432,9 +433,9 @@ static INPUT_PORTS_START( sfkick )
PORT_DIPSETTING( 0x08, DEF_STR( 1C_5C ) )
INPUT_PORTS_END
static void sfkick_vdp_interrupt(device_t *, v99x8_device &device, int i)
WRITE_LINE_MEMBER(sfkick_state::sfkick_vdp_interrupt)
{
device.machine().device("maincpu")->execute().set_input_line(0, (i ? HOLD_LINE : CLEAR_LINE));
machine().device("maincpu")->execute().set_input_line(0, (state ? HOLD_LINE : CLEAR_LINE));
}
void sfkick_state::machine_reset()
@ -485,7 +486,7 @@ static MACHINE_CONFIG_START( sfkick, sfkick_state )
MCFG_CPU_IO_MAP(sfkick_sound_io_map)
MCFG_V9938_ADD("v9938", "screen", 0x80000)
MCFG_V99X8_INTERRUPT_CALLBACK_STATIC(sfkick_vdp_interrupt)
MCFG_V99X8_INTERRUPT_CALLBACK(WRITELINE(sfkick_state,sfkick_vdp_interrupt))
MCFG_SCREEN_ADD("screen", RASTER)
MCFG_SCREEN_REFRESH_RATE(60)

View File

@ -74,6 +74,7 @@ public:
TIMER_DEVICE_CALLBACK_MEMBER(sothello_interrupt);
DECLARE_WRITE_LINE_MEMBER(irqhandler);
DECLARE_WRITE_LINE_MEMBER(adpcm_int);
DECLARE_WRITE_LINE_MEMBER(sothello_vdp_interrupt);
};
@ -315,9 +316,9 @@ WRITE_LINE_MEMBER(sothello_state::irqhandler)
machine().device("sub")->execute().set_input_line(0, state ? ASSERT_LINE : CLEAR_LINE);
}
static void sothello_vdp_interrupt(device_t *, v99x8_device &device, int i)
WRITE_LINE_MEMBER(sothello_state::sothello_vdp_interrupt)
{
device.machine().device("maincpu")->execute().set_input_line(0, (i ? HOLD_LINE : CLEAR_LINE));
machine().device("maincpu")->execute().set_input_line(0, (state ? HOLD_LINE : CLEAR_LINE));
}
TIMER_DEVICE_CALLBACK_MEMBER(sothello_state::sothello_interrupt)
@ -375,7 +376,7 @@ static MACHINE_CONFIG_START( sothello, sothello_state )
/* video hardware */
MCFG_V9938_ADD("v9938", "screen", VDP_MEM)
MCFG_V99X8_INTERRUPT_CALLBACK_STATIC(sothello_vdp_interrupt)
MCFG_V99X8_INTERRUPT_CALLBACK(WRITELINE(sothello_state,sothello_vdp_interrupt))
MCFG_SCREEN_ADD("screen", RASTER)
MCFG_SCREEN_REFRESH_RATE(60)

View File

@ -42,6 +42,7 @@ public:
virtual void machine_start();
virtual void machine_reset();
TIMER_DEVICE_CALLBACK_MEMBER(tonton_interrupt);
DECLARE_WRITE_LINE_MEMBER(tonton_vdp0_interrupt);
};
#define MAIN_CLOCK XTAL_21_4772MHz
@ -65,9 +66,9 @@ public:
* Video Hardware *
*************************************************/
static void tonton_vdp0_interrupt(device_t *, v99x8_device &device, int i)
WRITE_LINE_MEMBER(tonton_state::tonton_vdp0_interrupt)
{
device.machine().device("maincpu")->execute().set_input_line(0, (i ? HOLD_LINE : CLEAR_LINE));
machine().device("maincpu")->execute().set_input_line(0, (state ? HOLD_LINE : CLEAR_LINE));
}
@ -268,7 +269,7 @@ static MACHINE_CONFIG_START( tonton, tonton_state )
MCFG_VIDEO_ATTRIBUTES(VIDEO_UPDATE_BEFORE_VBLANK)
MCFG_V9938_ADD("v9938", "screen", VDP_MEM)
MCFG_V99X8_INTERRUPT_CALLBACK_STATIC(tonton_vdp0_interrupt)
MCFG_V99X8_INTERRUPT_CALLBACK(WRITELINE(tonton_state,tonton_vdp0_interrupt))
MCFG_SCREEN_ADD("screen",RASTER)
MCFG_SCREEN_REFRESH_RATE(60)

View File

@ -262,7 +262,7 @@ public:
virtual void machine_reset();
TIMER_DEVICE_CALLBACK_MEMBER(geneve_hblank_interrupt);
void set_tms9901_INT2_from_v9938(v99x8_device &vdp, int state);
DECLARE_WRITE_LINE_MEMBER(set_tms9901_INT2_from_v9938);
line_state m_inta;
line_state m_intb;
@ -617,7 +617,7 @@ WRITE_LINE_MEMBER( geneve_state::mapper_ready )
/*
set the state of int2 (called by the v9938 core)
*/
void geneve_state::set_tms9901_INT2_from_v9938(v99x8_device &vdp, int state)
WRITE_LINE_MEMBER(geneve_state::set_tms9901_INT2_from_v9938)
{
m_int2 = (state!=0)? ASSERT_LINE : CLEAR_LINE;
m_tms9901->set_single_int(2, state);
@ -762,7 +762,7 @@ static MACHINE_CONFIG_START( geneve_60hz, geneve_state )
// interlace mode, but in non-interlace modes only half of the lines are
// painted. Accordingly, the full set of lines is refreshed at 30 Hz,
// not 60 Hz. This should be fixed in the v9938 emulation.
MCFG_TI_V9938_ADD(VIDEO_SYSTEM_TAG, 30, SCREEN_TAG, 2500, 512+32, (212+28)*2, DEVICE_SELF, geneve_state, set_tms9901_INT2_from_v9938)
MCFG_TI_V9938_ADD(VIDEO_SYSTEM_TAG, 30, SCREEN_TAG, 2500, 512+32, (212+28)*2, geneve_state, set_tms9901_INT2_from_v9938)
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", geneve_state, geneve_hblank_interrupt, SCREEN_TAG, 0, 1) /* 262.5 in 60Hz, 312.5 in 50Hz */
// Main board components

View File

@ -1159,7 +1159,7 @@ static MACHINE_CONFIG_START( msx2, msx_state )
/* video hardware */
MCFG_V9938_ADD("v9938", "screen", 0x20000)
MCFG_V99X8_INTERRUPT_CALLBACK_STATIC(msx_vdp_interrupt)
MCFG_V99X8_INTERRUPT_CALLBACK(WRITELINE(msx_state,msx_vdp_interrupt))
MCFG_VIDEO_ATTRIBUTES(VIDEO_UPDATE_BEFORE_VBLANK)
MCFG_SCREEN_ADD("screen", RASTER)

View File

@ -97,7 +97,7 @@ public:
DECLARE_MACHINE_RESET(ti99_4p);
TIMER_DEVICE_CALLBACK_MEMBER(sgcpu_hblank_interrupt);
void set_tms9901_INT2_from_v9938(v99x8_device &vdp, int state);
DECLARE_WRITE_LINE_MEMBER(set_tms9901_INT2_from_v9938);
tms9900_device* m_cpu;
tms9901_device* m_tms9901;
@ -840,7 +840,7 @@ void ti99_4p_state::machine_start()
/*
set the state of int2 (called by the v9938)
*/
void ti99_4p_state::set_tms9901_INT2_from_v9938(v99x8_device &vdp, int state)
WRITE_LINE_MEMBER(ti99_4p_state::set_tms9901_INT2_from_v9938)
{
m_tms9901->set_single_int(2, state);
}
@ -886,7 +886,7 @@ static MACHINE_CONFIG_START( ti99_4p_60hz, ti99_4p_state )
// interlace mode, but in non-interlace modes only half of the lines are
// painted. Accordingly, the full set of lines is refreshed at 30 Hz,
// not 60 Hz. This should be fixed in the v9938 emulation.
MCFG_TI_V9938_ADD(VIDEO_SYSTEM_TAG, 30, SCREEN_TAG, 2500, 512+32, (212+28)*2, DEVICE_SELF, ti99_4p_state, set_tms9901_INT2_from_v9938)
MCFG_TI_V9938_ADD(VIDEO_SYSTEM_TAG, 30, SCREEN_TAG, 2500, 512+32, (212+28)*2, ti99_4p_state, set_tms9901_INT2_from_v9938)
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", ti99_4p_state, sgcpu_hblank_interrupt, SCREEN_TAG, 0, 1)
// tms9901

View File

@ -78,7 +78,7 @@ public:
DECLARE_WRITE_LINE_MEMBER( set_tms9901_INT2 );
DECLARE_WRITE_LINE_MEMBER( set_tms9901_INT12 );
void set_tms9901_INT2_from_v9938(v99x8_device &vdp, int state);
DECLARE_WRITE_LINE_MEMBER( set_tms9901_INT2_from_v9938);
DECLARE_WRITE_LINE_MEMBER( extint );
DECLARE_WRITE_LINE_MEMBER( notconnected );
@ -602,7 +602,7 @@ WRITE_LINE_MEMBER( ti99_4x_state::set_tms9901_INT2 )
m_tms9901->set_single_int(2, state);
}
void ti99_4x_state::set_tms9901_INT2_from_v9938(v99x8_device &vdp, int state)
WRITE_LINE_MEMBER(ti99_4x_state::set_tms9901_INT2_from_v9938)
{
m_tms9901->set_single_int(2, state);
}
@ -1092,7 +1092,7 @@ static MACHINE_CONFIG_START( ti99_4ev_60hz, ti99_4x_state )
// interlace mode, but in non-interlace modes only half of the lines are
// painted. Accordingly, the full set of lines is refreshed at 30 Hz,
// not 60 Hz. This should be fixed in the v9938 emulation.
MCFG_TI_V9938_ADD(VIDEO_SYSTEM_TAG, 30, SCREEN_TAG, 2500, 512+32, (212+28)*2, DEVICE_SELF, ti99_4x_state, set_tms9901_INT2_from_v9938)
MCFG_TI_V9938_ADD(VIDEO_SYSTEM_TAG, 30, SCREEN_TAG, 2500, 512+32, (212+28)*2, ti99_4x_state, set_tms9901_INT2_from_v9938)
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", ti99_4x_state, ti99_4ev_hblank_interrupt, SCREEN_TAG, 0, 1)
/* Main board */

View File

@ -168,6 +168,7 @@ public:
DECLARE_DEVICE_IMAGE_LOAD_MEMBER( msx_cart );
DECLARE_DEVICE_IMAGE_UNLOAD_MEMBER( msx_cart );
DECLARE_WRITE_LINE_MEMBER(msx_vdp_interrupt);
required_memory_bank m_bank1;
required_memory_bank m_bank2;
@ -202,8 +203,6 @@ extern const i8255_interface msx_ppi8255_interface;
extern const wd17xx_interface msx_wd17xx_interface;
/* start/stop functions */
void msx_vdp_interrupt(device_t *, v99x8_device &device, int i);
/* I/O functions */
#endif /* __MSX_H__ */

View File

@ -355,11 +355,9 @@ DEVICE_IMAGE_UNLOAD_MEMBER(msx_state, msx_cart)
msx_slot_list[m_cart_state[id]->m_type].savesram (machine(), m_cart_state[id]);
}
void msx_vdp_interrupt(device_t *, v99x8_device &device, int i)
WRITE_LINE_MEMBER(msx_state::msx_vdp_interrupt)
{
msx_state *state = device.machine().driver_data<msx_state>();
state->m_maincpu->set_input_line(0, (i ? HOLD_LINE : CLEAR_LINE));
m_maincpu->set_input_line(0, (state ? HOLD_LINE : CLEAR_LINE));
}
void msx_state::msx_ch_reset_core ()

View File

@ -158,10 +158,10 @@ protected:
MCFG_TMS9928A_SCREEN_ADD_PAL( SCREEN_TAG ) \
MCFG_SCREEN_UPDATE_DEVICE( VDP_TAG, tms9928a_device, screen_update )
#define MCFG_TI_V9938_ADD(_tag, _rate, _screen, _blank, _x, _y, _devtag, _class, _int) \
#define MCFG_TI_V9938_ADD(_tag, _rate, _screen, _blank, _x, _y, _class, _int) \
MCFG_DEVICE_ADD(_tag, V9938VIDEO, 0) \
MCFG_V9938_ADD(VDP_TAG, _screen, 0x20000) \
MCFG_V99X8_INTERRUPT_CALLBACK_DEVICE(_devtag, _class, _int) \
MCFG_V99X8_INTERRUPT_CALLBACK(WRITELINE(_class, _int)) \
MCFG_SCREEN_ADD(_screen, RASTER) \
MCFG_SCREEN_REFRESH_RATE(_rate) \
MCFG_SCREEN_UPDATE_DEVICE(VDP_TAG, v9938_device, screen_update) \