Example #1
0
static CPU_RESET( tms )
{
	tms32051_state *cpustate = get_safe_token(device);

	// reset registers
	cpustate->st0.intm  = 1;
	cpustate->st0.ov    = 0;
	cpustate->st1.c     = 1;
	cpustate->st1.cnf   = 0;
	cpustate->st1.hm    = 1;
	cpustate->st1.pm    = 0;
	cpustate->st1.sxm   = 1;
	cpustate->st1.xf    = 1;
	cpustate->pmst.avis = 0;
	cpustate->pmst.braf = 0;
	cpustate->pmst.iptr = 0;
	cpustate->pmst.ndx  = 0;
	cpustate->pmst.ovly = 0;
	cpustate->pmst.ram  = 0;
	cpustate->pmst.mpmc = 0; // TODO: this is set to logical pin state at reset
	cpustate->pmst.trm  = 0;
	cpustate->ifr       = 0;
	cpustate->cbcr      = 0;
	cpustate->rptc      = -1;

	// simulate internal rom boot loader (can be removed when the dsp rom(s) is dumped)
	cpustate->st0.intm  = 1;
	cpustate->st1.cnf   = 1;
	cpustate->pmst.ram  = 1;
	cpustate->pmst.ovly = 0;

	int i;
	UINT16 src, dst, length;

	src = 0x7800;
	dst = DM_READ16(cpustate, src++);
	length = DM_READ16(cpustate, src++);

	CHANGE_PC(cpustate, dst);

	/* TODO: if you soft reset on Taito JC it tries to do a 0x7802->0x9007 (0xff00) transfer. */
	for (i=0; i < (length & 0x7ff); i++)
	{
		UINT16 data = DM_READ16(cpustate, src++);
		PM_WRITE16(cpustate, dst++, data);
	}
}
static CPU_RESET( tms )
{
	tms32051_state *cpustate = get_safe_token(device);
	int i;
	UINT16 src, dst, length;

	src = 0x7800;
	dst = DM_READ16(cpustate, src++);
	length = DM_READ16(cpustate, src++);

	CHANGE_PC(cpustate, dst);

	/* TODO: if you soft reset on Taito JC it tries to do a 0x7802->0x9007 (0xff00) transfer. */
	for (i=0; i < (length & 0x7ff); i++)
	{
		UINT16 data = DM_READ16(cpustate, src++);
		PM_WRITE16(cpustate, dst++, data);
	}

	cpustate->st0.intm	= 1;
	cpustate->st0.ov	= 0;
	cpustate->st1.c		= 1;
	cpustate->st1.cnf	= 0;
	cpustate->st1.hm	= 1;
	cpustate->st1.pm	= 0;
	cpustate->st1.sxm	= 1;
	cpustate->st1.xf	= 1;
	cpustate->pmst.avis	= 0;
	cpustate->pmst.braf	= 0;
	cpustate->pmst.iptr	= 0;
	cpustate->pmst.ndx	= 0;
	cpustate->pmst.ovly	= 0;
	cpustate->pmst.ram	= 0;
	cpustate->pmst.trm	= 0;
	cpustate->ifr		= 0;
	cpustate->cbcr		= 0;
	cpustate->rptc		= -1;
}
Example #3
0
static CPU_RESET( tms )
{
	tms32051_state *cpustate = get_safe_token(device);
	int i;
	UINT16 src, dst, length;

	src = 0x7800;
	dst = DM_READ16(cpustate, src++);
	length = DM_READ16(cpustate, src++);

	CHANGE_PC(cpustate, dst);

	for (i=0; i < length; i++)
	{
		UINT16 data = DM_READ16(cpustate, src++);
		PM_WRITE16(cpustate, dst++, data);
	}

	cpustate->st0.intm	= 1;
	cpustate->st0.ov		= 0;
	cpustate->st1.c		= 1;
	cpustate->st1.cnf		= 0;
	cpustate->st1.hm		= 1;
	cpustate->st1.pm		= 0;
	cpustate->st1.sxm		= 1;
	cpustate->st1.xf		= 1;
	cpustate->pmst.avis	= 0;
	cpustate->pmst.braf	= 0;
	cpustate->pmst.iptr	= 0;
	cpustate->pmst.ndx	= 0;
	cpustate->pmst.ovly	= 0;
	cpustate->pmst.ram	= 0;
	cpustate->pmst.trm	= 0;
	cpustate->ifr			= 0;
	cpustate->cbcr		= 0;
	cpustate->rptc		= -1;
}
Example #4
0
static void tms_reset(void)
{
	int i;
	UINT16 src, dst, length;

	src = 0x7800;
	dst = DM_READ16(src++);
	length = DM_READ16(src++);

	CHANGE_PC(dst);

	for (i=0; i < length; i++)
	{
		UINT16 data = DM_READ16(src++);
		PM_WRITE16(dst++, data);
	}

	tms.st0.intm	= 1;
	tms.st0.ov		= 0;
	tms.st1.c		= 1;
	tms.st1.cnf		= 0;
	tms.st1.hm		= 1;
	tms.st1.pm		= 0;
	tms.st1.sxm		= 1;
	tms.st1.xf		= 1;
	tms.pmst.avis	= 0;
	tms.pmst.braf	= 0;
	tms.pmst.iptr	= 0;
	tms.pmst.ndx	= 0;
	tms.pmst.ovly	= 0;
	tms.pmst.ram	= 0;
	tms.pmst.trm	= 0;
	tms.ifr			= 0;
	tms.cbcr		= 0;
	tms.rptc		= -1;
}