Exemplo n.º 1
0
static void dsp32c_reset(void *param)
{
	struct dsp32_config *config = param;

	/* copy in config data */
	if (config)
		dsp32.output_pins_changed = config->output_pins_changed;

	/* reset goes to 0 */
	dsp32.PC = 0;
	memory_set_opbase(dsp32.PC);

	/* clear some registers */
	dsp32.pcw &= 0x03ff;
	update_pcr(dsp32.pcr & PCR_RESET);
	dsp32.esr = 0;
	dsp32.emr = 0xffff;

	/* initialize fixed registers */
	dsp32.R0 = dsp32.R0_ALT = 0;
	dsp32.RMM = -1;
	dsp32.RPP = 1;
	dsp32.A_0 = 0.0;
	dsp32.A_1 = 1.0;

	/* init internal stuff */
	dsp32.abufcycle[0] = dsp32.abufcycle[1] = dsp32.abufcycle[2] = dsp32.abufcycle[3] = 12345678;
	dsp32.mbufaddr[0] = dsp32.mbufaddr[1] = dsp32.mbufaddr[2] = dsp32.mbufaddr[3] = 1;
}
Exemplo n.º 2
0
void dsp32c_device::state_import(const device_state_entry &entry)
{
	switch (entry.index())
	{
		case STATE_GENFLAGS:
			break;

		case DSP32_PCR:
			update_pcr(m_iotemp);
			break;

		default:
			fatalerror("dsp32c_device::state_import called for unexpected value\n");
	}
}
Exemplo n.º 3
0
void dsp32c_device::dma_load()
{
	// only process if DMA is enabled
	if (m_pcr & PCR_DMA)
	{
		UINT32 addr = m_par | (m_pare << 16);

		// 16-bit case
		if (!(m_pcr & PCR_DMA32))
			m_pdr = RWORD(addr & 0xfffffe);

		// 32-bit case
		else
		{
			UINT32 temp = RLONG(addr & 0xfffffc);
			m_pdr = temp >> 16;
			m_pdr2 = temp & 0xffff;
		}

		// set the PDF flag to indicate we have data ready
		update_pcr(m_pcr | PCR_PDFs);
	}
Exemplo n.º 4
0
INLINE void dma_load(void)
{
	/* only process if DMA is enabled */
	if (dsp32.pcr & PCR_DMA)
	{
		UINT32 addr = dsp32.par | (dsp32.pare << 16);

		/* 16-bit case */
		if (!(dsp32.pcr & PCR_DMA32))
			dsp32.pdr = RWORD(addr & 0xfffffe);

		/* 32-bit case */
		else
		{
			UINT32 temp = RLONG(addr & 0xfffffc);
			dsp32.pdr = temp >> 16;
			dsp32.pdr2 = temp & 0xffff;
		}

		/* set the PDF flag to indicate we have data ready */
		update_pcr(dsp32.pcr | PCR_PDFs);
	}
Exemplo n.º 5
0
INLINE void dma_load(dsp32_state *cpustate)
{
	/* only process if DMA is enabled */
	if (cpustate->pcr & PCR_DMA)
	{
		UINT32 addr = cpustate->par | (cpustate->pare << 16);

		/* 16-bit case */
		if (!(cpustate->pcr & PCR_DMA32))
			cpustate->pdr = RWORD(cpustate, addr & 0xfffffe);

		/* 32-bit case */
		else
		{
			UINT32 temp = RLONG(cpustate, addr & 0xfffffc);
			cpustate->pdr = temp >> 16;
			cpustate->pdr2 = temp & 0xffff;
		}

		/* set the PDF flag to indicate we have data ready */
		update_pcr(cpustate, cpustate->pcr | PCR_PDFs);
	}
Exemplo n.º 6
0
static CPU_RESET( dsp32c )
{
	dsp32_state *cpustate = get_safe_token(device);

	/* reset goes to 0 */
	cpustate->PC = 0;

	/* clear some registers */
	cpustate->pcw &= 0x03ff;
	update_pcr(cpustate, cpustate->pcr & PCR_RESET);
	cpustate->esr = 0;
	cpustate->emr = 0xffff;

	/* initialize fixed registers */
	cpustate->R0 = cpustate->R0_ALT = 0;
	cpustate->RMM = -1;
	cpustate->RPP = 1;
	cpustate->A_0 = 0.0;
	cpustate->A_1 = 1.0;

	/* init internal stuff */
	cpustate->abufcycle[0] = cpustate->abufcycle[1] = cpustate->abufcycle[2] = cpustate->abufcycle[3] = 12345678;
	cpustate->mbufaddr[0] = cpustate->mbufaddr[1] = cpustate->mbufaddr[2] = cpustate->mbufaddr[3] = 1;
}