diff --git a/src/mame/drivers/crshrace.c b/src/mame/drivers/crshrace.c index bd3e7de988a..0bb186d617a 100644 --- a/src/mame/drivers/crshrace.c +++ b/src/mame/drivers/crshrace.c @@ -441,8 +441,7 @@ static const ym2610_interface ym2610_config = static const k053936_interface crshrace_k053936_intf = { - 1, -48, -21, /* wrap, xoff, yoff */ - 0 /* linectrl_size */ + 1, -48, -21 /* wrap, xoff, yoff */ }; diff --git a/src/mame/drivers/f1gp.c b/src/mame/drivers/f1gp.c index db035c359f3..45e372c87a3 100644 --- a/src/mame/drivers/f1gp.c +++ b/src/mame/drivers/f1gp.c @@ -422,14 +422,12 @@ static const ym2610_interface ym2610_config = static const k053936_interface f1gp_k053936_intf = { - 1, -58, -2, /* wrap, xoff, yoff */ - 0 /* linectrl_size */ + 1, -58, -2 /* wrap, xoff, yoff */ }; static const k053936_interface f1gp2_k053936_intf = { - 1, -48, -21, /* wrap, xoff, yoff */ - 0 /* linectrl_size */ + 1, -48, -21 /* wrap, xoff, yoff */ }; diff --git a/src/mame/drivers/suprslam.c b/src/mame/drivers/suprslam.c index 8f5da264fb6..51055d3b760 100644 --- a/src/mame/drivers/suprslam.c +++ b/src/mame/drivers/suprslam.c @@ -293,8 +293,7 @@ static const ym2610_interface ym2610_config = static const k053936_interface suprslam_k053936_intf = { - 1, -45, -21, /* wrap, xoff, yoff */ - 0x1000 /* linectrl_size */ + 1, -45, -21 /* wrap, xoff, yoff */ }; static MACHINE_START( suprslam ) diff --git a/src/mame/video/konicdev.c b/src/mame/video/konicdev.c index 594a5a383d3..43de8c7bb85 100644 --- a/src/mame/video/konicdev.c +++ b/src/mame/video/konicdev.c @@ -5390,7 +5390,6 @@ struct _k053936_state int wraparound; int offset[2]; - int size; }; /***************************************************************************** @@ -5492,7 +5491,8 @@ void k053936_zoom_draw( const device_config *device, bitmap_t *bitmap, const rec while (y <= maxy) { - UINT16 *lineaddr = 4 * ((y - k053936->offset[1]) & 0x1ff) + (k053936->linectrl) ? k053936->linectrl : 0; + UINT16 *lineaddr = k053936->linectrl + 4 * ((y - k053936->offset[1]) & 0x1ff); + my_clip.min_y = my_clip.max_y = y; startx = 256 * (INT16)(lineaddr[0] + k053936->ctrl[0x00]); @@ -5585,35 +5585,22 @@ static DEVICE_START( k053936 ) const k053936_interface *intf = k053936_get_interface(device); k053936->ctrl = auto_alloc_array(device->machine, UINT16, 0x20); - - if (intf->linectrl_size) - k053936->linectrl = auto_alloc_array(device->machine, UINT16, intf->linectrl_size); // FIXME: should this only be 0x1000? - else - { - /* f1gp.c & crshrace.c seem to have no linectrl ram: is it unmapped or really not present? */ - /* in the meanwhile, we alloc a fake entry to avoid debug to complain for 0-size alloc */ - k053936->linectrl = NULL; - } + k053936->linectrl = auto_alloc_array(device->machine, UINT16, 0x1000); k053936->wraparound = intf->wrap; k053936->offset[0] = intf->xoff; k053936->offset[1] = intf->yoff; - k053936->size = intf->linectrl_size; - state_save_register_device_item_pointer(device, 0, k053936->ctrl, 0x20); - - if (intf->linectrl_size) - state_save_register_device_item_pointer(device, 0, k053936->linectrl, intf->linectrl_size); + state_save_register_device_item_pointer(device, 0, k053936->linectrl, 0x1000); } static DEVICE_RESET( k053936 ) { k053936_state *k053936 = k053936_get_safe_token(device); - memset(k053936->ctrl, 0, 0x20); - if (k053936->linectrl != NULL) - memset(k053936->linectrl, 0, k053936->size); + memset(k053936->ctrl, 0, 0x20); + memset(k053936->linectrl, 0, 0x1000); } /***************************************************************************/ diff --git a/src/mame/video/konicdev.h b/src/mame/video/konicdev.h index 084a957ddc9..9f808e1e868 100644 --- a/src/mame/video/konicdev.h +++ b/src/mame/video/konicdev.h @@ -93,7 +93,6 @@ typedef struct _k053936_interface k053936_interface; struct _k053936_interface { int wrap, xoff, yoff; - int linectrl_size; }; typedef struct _k056832_interface k056832_interface;