Fixed silly regression introduced in suprslam while trying to fix f1gp2 (in svn 7621). Also, decided for fixed linectrl ram in 053936

This commit is contained in:
Fabio Priuli 2009-12-21 17:14:28 +00:00
parent 685bac3770
commit c3b3bf2f93
5 changed files with 10 additions and 28 deletions

View File

@ -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 */
};

View File

@ -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 */
};

View File

@ -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 )

View File

@ -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);
}
/***************************************************************************/

View File

@ -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;