Пример #1
0
void CVif1::ExecuteCommand(StreamType& stream, CODE nCommand)
{
#ifdef _DEBUG
    DisassembleCommand(nCommand);
#endif
    switch(nCommand.nCMD)
    {
    case 0x02:
        //OFFSET
        m_OFST = nCommand.nIMM;
        m_STAT.nDBF = 0;
        m_TOPS = m_BASE;
        break;
    case 0x03:
        //BASE
        m_BASE = nCommand.nIMM;
        break;
    case 0x06:
        //MSKPATH3
        m_gif.SetPath3Masked((nCommand.nIMM & 0x8000) != 0);
        break;
    case 0x11:
        //FLUSH
        if(m_vpu.IsVuRunning())
        {
            m_STAT.nVEW = 1;
        }
        else
        {
            m_STAT.nVEW = 0;
        }
#ifdef DELAYED_MSCAL
        if(ResumeDelayedMicroProgram())
        {
            m_STAT.nVEW = 1;
            return;
        }
#endif
        break;
    case 0x13:
        //FLUSHA
        if(m_vpu.IsVuRunning())
        {
            m_STAT.nVEW = 1;
        }
        else
        {
            m_STAT.nVEW = 0;
        }
        break;
    case 0x50:
    case 0x51:
        //DIRECT/DIRECTHL
        Cmd_DIRECT(stream, nCommand);
        break;
    default:
        CVif::ExecuteCommand(stream, nCommand);
        break;
    }
}
Пример #2
0
void CVPU1::ExecuteCommand(StreamType& stream, CODE nCommand)
{
#ifdef _DEBUG
	DisassembleCommand(nCommand);
#endif
	switch(nCommand.nCMD)
	{
	case 0x02:
		//OFFSET
		m_OFST = nCommand.nIMM;
		m_STAT.nDBF = 0;
		m_TOPS = m_BASE;
		break;
	case 0x03:
		//BASE
		m_BASE = nCommand.nIMM;
		break;
	case 0x06:
		//MSKPATH3
		//Should mask bit somewhere...
		break;
	case 0x11:
		//FLUSH
		if(m_vif.IsVu1Running())
		{
			m_STAT.nVEW = 1;
		}
		else
		{
			m_STAT.nVEW = 0;
		}
#ifdef DELAYED_MSCAL
		if(ResumeDelayedMicroProgram())
		{
			m_STAT.nVEW = 1;
			return;
		}
#endif
		break;
	case 0x13:
		//FLUSHA
		if(m_vif.IsVu1Running())
		{
			m_STAT.nVEW = 1;
		}
		else
		{
			m_STAT.nVEW = 0;
		}
		break;
	case 0x50:
	case 0x51:
		//DIRECT/DIRECTHL
		Cmd_DIRECT(stream, nCommand);
		break;
	default:
		CVPU::ExecuteCommand(stream, nCommand);
		break;
	}
}