//-------------------------------------------------------------------------------------------------------------------------------------
void DrvInitDamageXsound()
{
// init controller port
*(UINT8 *)(0x2010007F)=0;
*(UINT8 *)(0x2010007D)=3;
*(UINT8 *)(0x20100079)=96;
*(UINT8 *)(0x2010007B)=96;
// turn off the 68000
*(UINT8 *)(0x2010001F)=7;
for(int w=0;w<500;w++)
{
asm("nop\n"); // waste time
}
*(UINT16 *)(0x5B00400)=0x20F;
for(int w=0;w<500;w++)
{
asm("nop\n"); // waste time
}
*(UINT16 *)(0x5B00402)=0x3F;
for(int w=0;w<500;w++)
{
asm("nop\n"); // waste time
}
GFS_Load(GFS_NameToId("VGM68.BIN"),0,(void *)0x5A00000,4640);
// turn on the 68000
*(UINT8 *)(0x2010001F)=6;
while(*(UINT16 *)(0x25A0010C)!=0)
{
for(int w=0;w<500;w++)
{
asm("nop\n"); // waste time
}
}
UINT32 end = *(UINT32 *)(0x25A00100);
GFS_Load(GFS_NameToId("02.VGM"),0,(void *)(0x5A00000+end),14952);
// memcpy((UINT16 *)(0x25A00104),(UINT16 *)(0x25A00100),sizeof(UINT16));//
*(UINT32 *)(0x25A00104)=end;
*(UINT16 *)(0x25A00108)=1;