Other cheats ...

This commit is contained in:
Angelo Salese 2011-01-01 18:19:57 +00:00
parent 6ac3011fa9
commit b95307cb6d

View File

@ -1921,6 +1921,7 @@ static struct
{
int x,y;
int min_x,min_y,max_x,max_y;
UINT16 hitbox;
}cop_collision_info[2];
/* Taken from Seibu Cup Soccer bootleg (TODO: understand the algorythm and remove this) */
@ -2216,7 +2217,8 @@ static WRITE16_HANDLER( generic_cop_w )
case (0x044/2):
{
cop_scale = data;
/*TODO: this appears to control sine cosine maths, but all games here doesn't seem to like current implementation ... */
cop_scale = 1;
break;
}
@ -2436,12 +2438,22 @@ static WRITE16_HANDLER( generic_cop_w )
if(COP_CMD(0xb40,0xbc0,0xbc2,0x000,0x000,0x000,0x000,0x000,u1,u2))
{
/* Take hitbox param, TODO */
//cop_collision_info[0].hitbox = space->read_word(cop_register[2]);
cop_collision_info[0].hitbox = space->read_word(cop_register[2]);
if(cop_collision_info[0].hitbox == 0xc8) //hack for SD Gundam
{
cop_collision_info[0].min_x = cop_collision_info[0].x + (0 << 16);
cop_collision_info[0].min_y = cop_collision_info[0].y - (0x10 << 16);
cop_collision_info[0].max_x = cop_collision_info[0].x + (0xc0 << 16);
cop_collision_info[0].max_y = cop_collision_info[0].y + (0 << 16);
}
else
{
cop_collision_info[0].min_x = cop_collision_info[0].x + (0 << 16);
cop_collision_info[0].min_y = cop_collision_info[0].y + (0 << 16);
cop_collision_info[0].max_x = cop_collision_info[0].x + (0x10 << 16);
cop_collision_info[0].max_y = cop_collision_info[0].y + (0x10 << 16);
}
/* do the math */
cop_hit_status = cop_calculate_collsion_detection(space->machine);
return;
@ -2458,14 +2470,15 @@ static WRITE16_HANDLER( generic_cop_w )
if(COP_CMD(0xb60,0xbe0,0xbe2,0x000,0x000,0x000,0x000,0x000,u1,u2))
{
/* Take hitbox param, TODO */
//cop_collision_info[1].hitbox = space->read_word(cop_register[3]);
cop_collision_info[1].hitbox = space->read_word(cop_register[3]);
cop_collision_info[1].min_x = cop_collision_info[1].x + (0 << 16);
cop_collision_info[1].min_y = cop_collision_info[1].y + (0 << 16);
cop_collision_info[1].max_x = cop_collision_info[1].x + (0x10 << 16);
cop_collision_info[1].max_y = cop_collision_info[1].y + (0x10 << 16);
//if(cop_collision_info[0].x || cop_collision_info[1].x)
// popmessage("%08x %08x",cop_collision_info[0].x,cop_collision_info[1].x);
popmessage("0: %08x %08x %08x 1: %08x %08x %08x",cop_collision_info[0].x,cop_collision_info[0].y,cop_collision_info[0].hitbox,cop_collision_info[1].x,cop_collision_info[1].y,cop_collision_info[1].hitbox);
/* do the math */
cop_hit_status = cop_calculate_collsion_detection(space->machine);
@ -2531,8 +2544,8 @@ static WRITE16_HANDLER( generic_cop_w )
//space->write_byte(cop_register[0]+(0x34^3), test ^ 0x80);
}
if(cop_mcu_ram[offset] != 0x3bb0)
printf("%04x\n",cop_mcu_ram[offset]);
break;
}