01965: driveyes: Access Violation

01951: cybrcycc: Crash during intro.
01964: gtg2j: Access Violation
This commit is contained in:
Aaron Giles 2008-07-06 22:48:41 +00:00
parent b261a88395
commit 1794fddf8d
3 changed files with 15 additions and 8 deletions

View File

@ -175,10 +175,13 @@ static void register_w(offs_t offset, UINT8 data)
video_screen_update_partial(tms34061.screen, video_screen_get_vpos(tms34061.screen));
/* store the hi/lo half */
if (offset & 0x02)
tms34061.regs[regnum] = (tms34061.regs[regnum] & 0x00ff) | (data << 8);
else
tms34061.regs[regnum] = (tms34061.regs[regnum] & 0xff00) | data;
if (regnum < ARRAY_LENGTH(tms34061.regs))
{
if (offset & 0x02)
tms34061.regs[regnum] = (tms34061.regs[regnum] & 0x00ff) | (data << 8);
else
tms34061.regs[regnum] = (tms34061.regs[regnum] & 0xff00) | data;
}
/* log it */
if (VERBOSE) logerror("%04X:tms34061 %s = %04x\n", activecpu_get_pc(), regnames[regnum], tms34061.regs[regnum]);
@ -238,7 +241,10 @@ static UINT8 register_r(offs_t offset)
UINT16 result;
/* extract the correct portion of the register */
result = tms34061.regs[regnum];
if (regnum < ARRAY_LENGTH(tms34061.regs))
result = tms34061.regs[regnum];
else
result = 0xffff;
/* special cases: */
switch (regnum)

View File

@ -14,7 +14,7 @@ Namco System II
#include "cpu/m6805/m6805.h"
#include "namcos2.h"
extern void namcos21_kickstart(int);
extern void namcos21_kickstart(running_machine *, int);
int namcos2_gametype;
@ -587,7 +587,7 @@ ReadWriteC148( running_machine *machine, int cpu, offs_t offset, UINT16 data, in
//printf( "dspkick=0x%x\n", data );
if( data&4 )
{
namcos21_kickstart(1);
namcos21_kickstart(machine, 1);
}
}
}

View File

@ -387,7 +387,7 @@ static void renderscanline_uvi_full(void *dest, INT32 scanline, const poly_exten
static void poly3d_DrawQuad(running_machine *machine, bitmap_t *bitmap, int textureBank, int color, Poly3dVertex pv[4], UINT16 flags, int direct, int cmode )
{
poly_extra_data *extra;
poly_vertex v[4], clipv[5];
poly_vertex v[4], clipv[6];
int clipverts;
int vertnum;
@ -406,6 +406,7 @@ static void poly3d_DrawQuad(running_machine *machine, bitmap_t *bitmap, int text
clipverts = poly_zclip_if_less(4, v, clipv, 4, MIN_Z);
if (clipverts < 3)
return;
assert(clipverts <= ARRAY_LENGTH(clipv));
for (vertnum = 0; vertnum < clipverts; vertnum++)
{
float ooz = 1.0f / clipv[vertnum].p[0];