v9938.c: Removed set_resolution() method, simplifying the code a bit. All drivers were defaulting to the 'HIGH' setting anyway. This also puts the drivers back in charge of setting the screen parameters. (nw)

This commit is contained in:
Wilbert Pol 2015-07-17 21:10:47 +02:00
parent 4b9d68194f
commit edc09b4f48
9 changed files with 216 additions and 528 deletions

File diff suppressed because it is too large Load Diff

View File

@ -29,16 +29,6 @@
#define MCFG_V99X8_INTERRUPT_CALLBACK(_irq) \
downcast<v99x8_device *>(device)->set_interrupt_callback(DEVCB_##_irq);
// init functions
#define MODEL_V9938 (0)
#define MODEL_V9958 (1)
// resolutions
#define RENDER_HIGH (0)
#define RENDER_LOW (1)
#define RENDER_AUTO (2)
//**************************************************************************
// GLOBAL VARIABLES
@ -50,7 +40,6 @@ extern const device_type V9958;
//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
@ -70,7 +59,6 @@ public:
m_int_callback.set_callback(irq);
}
int interrupt ();
void set_resolution (int);
int get_transpen();
bitmap_ind16 &get_bitmap() { return m_bitmap; }
void update_mouse_state(int mx_delta, int my_delta, int button_state);
@ -113,24 +101,24 @@ private:
void check_int();
void register_write(int reg, int data);
template<typename _PixelType, int _Width> void default_border(const pen_t *pens, _PixelType *ln);
template<typename _PixelType, int _Width> void graphic7_border(const pen_t *pens, _PixelType *ln);
template<typename _PixelType, int _Width> void graphic5_border(const pen_t *pens, _PixelType *ln);
template<typename _PixelType, int _Width> void mode_text1(const pen_t *pens, _PixelType *ln, int line);
template<typename _PixelType, int _Width> void mode_text2(const pen_t *pens, _PixelType *ln, int line);
template<typename _PixelType, int _Width> void mode_multi(const pen_t *pens, _PixelType *ln, int line);
template<typename _PixelType, int _Width> void mode_graphic1(const pen_t *pens, _PixelType *ln, int line);
template<typename _PixelType, int _Width> void mode_graphic23(const pen_t *pens, _PixelType *ln, int line);
template<typename _PixelType, int _Width> void mode_graphic4(const pen_t *pens, _PixelType *ln, int line);
template<typename _PixelType, int _Width> void mode_graphic5(const pen_t *pens, _PixelType *ln, int line);
template<typename _PixelType, int _Width> void mode_graphic6(const pen_t *pens, _PixelType *ln, int line);
template<typename _PixelType, int _Width> void mode_graphic7(const pen_t *pens, _PixelType *ln, int line);
void default_border(const pen_t *pens, UINT16 *ln);
void graphic7_border(const pen_t *pens, UINT16 *ln);
void graphic5_border(const pen_t *pens, UINT16 *ln);
void mode_text1(const pen_t *pens, UINT16 *ln, int line);
void mode_text2(const pen_t *pens, UINT16 *ln, int line);
void mode_multi(const pen_t *pens, UINT16 *ln, int line);
void mode_graphic1(const pen_t *pens, UINT16 *ln, int line);
void mode_graphic23(const pen_t *pens, UINT16 *ln, int line);
void mode_graphic4(const pen_t *pens, UINT16 *ln, int line);
void mode_graphic5(const pen_t *pens, UINT16 *ln, int line);
void mode_graphic6(const pen_t *pens, UINT16 *ln, int line);
void mode_graphic7(const pen_t *pens, UINT16 *ln, int line);
// template<typename _PixelType, int _Width> void mode_yae(const pen_t *pens, _PixelType *ln, int line);
// template<typename _PixelType, int _Width> void mode_yjk(const pen_t *pens, _PixelType *ln, int line);
template<typename _PixelType, int _Width> void mode_unknown(const pen_t *pens, _PixelType *ln, int line);
template<typename _PixelType, int _Width> void default_draw_sprite(const pen_t *pens, _PixelType *ln, UINT8 *col);
template<typename _PixelType, int _Width> void graphic5_draw_sprite(const pen_t *pens, _PixelType *ln, UINT8 *col);
template<typename _PixelType, int _Width> void graphic7_draw_sprite(const pen_t *pens, _PixelType *ln, UINT8 *col);
void mode_unknown(const pen_t *pens, UINT16 *ln, int line);
void default_draw_sprite(const pen_t *pens, UINT16 *ln, UINT8 *col);
void graphic5_draw_sprite(const pen_t *pens, UINT16 *ln, UINT8 *col);
void graphic7_draw_sprite(const pen_t *pens, UINT16 *ln, UINT8 *col);
void sprite_mode1(int line, UINT8 *col);
void sprite_mode2(int line, UINT8 *col);
@ -197,8 +185,6 @@ private:
int m_scanline;
// blinking
int m_blink, m_blink_count;
// size
int m_size, m_size_old, m_size_auto, m_size_now;
// mouse
UINT8 m_mx_delta, m_my_delta;
// mouse & lightpen
@ -228,12 +214,9 @@ private:
{
UINT8 m;
void (v99x8_device::*visible_16)(const pen_t *, UINT16*, int);
void (v99x8_device::*visible_16s)(const pen_t *, UINT16*, int);
void (v99x8_device::*border_16)(const pen_t *, UINT16*);
void (v99x8_device::*border_16s)(const pen_t *, UINT16*);
void (v99x8_device::*sprites)(int, UINT8*);
void (v99x8_device::*draw_sprite_16)(const pen_t *, UINT16*, UINT8*);
void (v99x8_device::*draw_sprite_16s)(const pen_t *, UINT16*, UINT8*);
} ;
static const v99x8_mode s_modes[];
required_device<palette_device> m_palette;

View File

@ -443,7 +443,6 @@ TIMER_DEVICE_CALLBACK_MEMBER(csplayh5_state::csplayh5_irq)
if((scanline % 2) == 0)
{
m_v9958->set_resolution(RENDER_HIGH);
m_v9958->interrupt();
}
}

View File

@ -266,7 +266,6 @@ WRITE_LINE_MEMBER(kurukuru_state::kurukuru_vdp_interrupt)
TIMER_DEVICE_CALLBACK_MEMBER(kurukuru_state::kurukuru_vdp_scanline)
{
m_v9938->set_resolution(0);
m_v9938->interrupt();
}

View File

@ -301,10 +301,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(meritm_state::meritm_interrupt)
if((scanline % 2) == 0)
{
m_v9938_0->set_resolution(RENDER_HIGH);
m_v9938_0->interrupt();
m_v9938_1->set_resolution(RENDER_HIGH);
m_v9938_1->interrupt();
}
}

View File

@ -444,7 +444,6 @@ TIMER_DEVICE_CALLBACK_MEMBER(sangho_state::sangho_interrupt)
if((scanline % 2) == 0)
{
m_v9958->set_resolution(RENDER_HIGH);
m_v9958->interrupt();
}
}

View File

@ -215,7 +215,6 @@ void tonton_state::machine_reset()
TIMER_DEVICE_CALLBACK_MEMBER(tonton_state::tonton_interrupt)
{
m_v9938->set_resolution(0);
m_v9938->interrupt();
}

View File

@ -635,10 +635,6 @@ static INPUT_PORTS_START( msx_dips )
PORT_DIPNAME( 0x40, 0, "Swap game port 1 and 2")
PORT_DIPSETTING( 0, DEF_STR( No ) )
PORT_DIPSETTING( 0x40, DEF_STR( Yes ) )
PORT_DIPNAME ( 0x03, 0, "Render resolution")
PORT_DIPSETTING( 0, DEF_STR( High ))
PORT_DIPSETTING( 1, DEF_STR( Low ))
PORT_DIPSETTING( 2, "Auto" )
PORT_START("MOUSE0")
PORT_BIT( 0xff00, 0x00, IPT_TRACKBALL_X) PORT_SENSITIVITY(100) PORT_KEYDELTA(0) PORT_PLAYER(1)

View File

@ -214,13 +214,11 @@ void msx_state::post_load()
TIMER_DEVICE_CALLBACK_MEMBER(msx_state::msx2_interrupt)
{
m_v9938->set_resolution(m_io_dsw->read() & 0x03);
m_v9938->interrupt();
}
TIMER_DEVICE_CALLBACK_MEMBER(msx_state::msx2p_interrupt)
{
m_v9958->set_resolution(m_io_dsw->read() & 0x03);
m_v9958->interrupt();
}