Updated some BCD notes

This commit is contained in:
Angelo Salese 2009-07-02 16:32:35 +00:00
parent e31ada08d6
commit 490e4b5c6d

View File

@ -166,45 +166,6 @@ static UINT8 xy_check;
flip_screen_set(space->machine, _flip_); \
} \
#if 0
/*TODO: numbers over 65535?*/
static UINT32 protection_bcd_jsr(UINT16 prot_data)
{
UINT32 res,bcd_data;
res = 0;
bcd_data = prot_data;
popmessage("%08x",bcd_data);
while(bcd_data > 0)
{
if(bcd_data > 999)
{
res+=0x01000000;
bcd_data-=1000;
}
else if(bcd_data > 99)
{
res+=0x00010000;
bcd_data-=100;
}
else if(bcd_data > 9)
{
res+=0x00000100;
bcd_data-=10;
}
else
{
res++;
bcd_data--;
}
}
return res & 0x0f0f0f0f;
}
#endif
/*TODO: -move x-axis limits,to calculate basing on the screen xy-axis values*/
/* -the second value should be end of calculation (in other words,check everything between the two values) */
#define PLAYER 0
@ -1129,17 +1090,6 @@ static READ16_HANDLER( generic_cop_r )
default:
seibu_cop_log("%06x: COPX unhandled read returning %04x from offset %04x\n", cpu_get_pc(space->cpu), retvalue, offset*2);
return retvalue;
/* BCD protection reads */
#if 0
case (0x190/2): { return ((prot_bcd[0] & 0x0000ffff) >> 0 ) + 0x3030; }
case (0x192/2): { return ((prot_bcd[0] & 0xffff0000) >> 16) + 0x3030; }
case (0x194/2): { return ((prot_bcd[1] & 0x0000ffff) >> 0 ) + 0x3030; }
case (0x196/2): { return ((prot_bcd[1] & 0xffff0000) >> 16) + 0x3030; }
case (0x198/2): { return ((prot_bcd[2] & 0x0000ffff) >> 0 ) + 0x3030; }
case (0x19a/2): { return ((prot_bcd[2] & 0xffff0000) >> 16) + 0x3030; }
case (0x19c/2): { return 0x3030; }
#endif
}
}
@ -1156,7 +1106,6 @@ static WRITE16_HANDLER( generic_cop_w )
/* BCD Protection */
case (0x020/2):
case (0x022/2):
case (0x024/2):
temp32 = (cop_mcu_ram[0x020/2]) | (cop_mcu_ram[0x022/2] << 16);
cop_mcu_ram[0x190/2] = (((temp32 / 1) % 10) + (((temp32 / 10) % 10) << 8) + 0x3030);
cop_mcu_ram[0x192/2] = (((temp32 / 100) % 10) + (((temp32 / 1000) % 10) << 8) + 0x3030);
@ -1164,6 +1113,14 @@ static WRITE16_HANDLER( generic_cop_w )
cop_mcu_ram[0x196/2] = (((temp32 / 1000000) % 10) + (((temp32 / 10000000) % 10) << 8) + 0x3030);
cop_mcu_ram[0x198/2] = (((temp32 / 100000000) % 10) + (((temp32 / 1000000000) % 10) << 8) + 0x3030);
break;
case (0x024/2):
/*
This looks like a register for the BCD...
Godzilla and Heated Barrel sets 3
Denjin Makai sets 3 at start-up and toggles between 2 and 3 during gameplay on the BCD subroutine
SD Gundam sets 0 (maybe there's a mirror somewhere else? 0x01e for example is setted with an 8)
*/
break;
/* Command tables for 0x500 / 0x502 commands */
case (0x032/2): { copd2_set_tabledata(space->machine, data); break; }