Ejemplo n.º 1
0
int CCodecBase::InternalSetStateWrapper(const void *pState, size_t cb)
{
	if (IsLogWriterInitializedOrDebugBuild())
	{
		char buf[256];
		FormatBinary(buf, pState, cb, GetStateSize());
		LOGPRINTF("%p CCodecBase::InternalSetStateWrapper(pState=%s, cb=%" PRIuSZT ")", this, buf, cb);
	}

	int ret = InternalSetState(pState, cb);
	LOGPRINTF("%p CCodecBase::InternalSetStateWrapper return %d", this, ret);
	return ret;
}
Ejemplo n.º 2
0
int CCodecBase::DecodeQuery(utvf_t outfmt, unsigned int width, unsigned int height, const void *pExtraData, size_t cbExtraData)
{
	if (IsLogWriterInitializedOrDebugBuild())
	{
		char buf[256];
		FormatBinary(buf, pExtraData, cbExtraData, EncodeGetExtraDataSize());
		LOGPRINTF("%p CCodecBase::DecodeQuery(outfmt=%08X, width=%u, height=%u, pExtraData=%s, cbExtraData=%" PRIuSZT ")", this, outfmt, width, height, buf, cbExtraData);
	}

	int ret = InternalDecodeQuery(outfmt, width, height, pExtraData, cbExtraData);
	LOGPRINTF("%p CCodecBase::DecodeQuery return %d", this, ret);
	return ret;
}
Ejemplo n.º 3
0
BOOL CBasicCPU1EAX::OnSetActive()
   {
    CPUregs regs;
    GetAndReport(1, regs);

    EAX1b EAX;
    EAX.w = regs.EAX;
    CString s;
    s= FormatBinary(EAX.Intel.Reserved, 4);
    c_Reserved_31_28.SetWindowText(s+_T("B"));

    s.Format(_T("%XH"), EAX.Intel.ExtendedFamily);
    c_ExtendedFamilyID.SetWindowText(s);

    //****************************************************************
    // Special computation: Extended family
    //****************************************************************
    if(EAX.Intel.FamilyID == 0x0F)
       { /* extended family ID */
        UINT ComputedFamily = EAX.Intel.FamilyID + EAX.Intel.ExtendedFamily;
        
        s.Format(_T("%04XH"), ComputedFamily);
        c_ComputedFamilyID.SetWindowText(s);

        c_ComputedFamilyID.ShowWindow(SW_SHOW);
        x_ComputedFamilyID.ShowWindow(SW_SHOW);
        c_ExtendedFamily1Line.ShowWindow(SW_SHOW);
        c_ExtendedFamily2Line.ShowWindow(SW_SHOW);
        c_ExtendedFamily3Line.ShowWindow(SW_SHOW);
       } /* extended family ID */
    else
       { /* not extended */
        c_ComputedFamilyID.ShowWindow(SW_HIDE);
        x_ComputedFamilyID.ShowWindow(SW_HIDE);
        c_ExtendedFamily1Line.ShowWindow(SW_HIDE);
        c_ExtendedFamily2Line.ShowWindow(SW_HIDE);
        c_ExtendedFamily3Line.ShowWindow(SW_HIDE);
       } /* not extended */

    //****************************************************************

    s.Format(_T("%XH"), EAX.Intel.ExtendedModel);
    c_ExtendedModelID.SetWindowText(s);

    //****************************************************************
    // Special computation: Computed model
    //****************************************************************

    if(EAX.Intel.FamilyID == 0x06 || EAX.Intel.FamilyID == 0x0F)
       { /* extended model */
        UINT ComputedModel = EAX.Intel.ModelID + (EAX.Intel.ExtendedModel << 4);

        s.Format(_T("%04XH"), ComputedModel);
        c_ComputedModel.SetWindowText(s);

        c_ComputedModel1Line.ShowWindow(SW_SHOW);
        c_ComputedModel2Line.ShowWindow(SW_SHOW);
        c_ComputedModel.ShowWindow(SW_SHOW);
        x_ComputedModel.ShowWindow(SW_SHOW);
       } /* extended model */
    else
       { /* not extended model */
        c_ComputedModel1Line.ShowWindow(SW_HIDE);
        c_ComputedModel2Line.ShowWindow(SW_HIDE);
        c_ComputedModel.ShowWindow(SW_HIDE);
        x_ComputedModel.ShowWindow(SW_HIDE);
       } /* not extended model */

    s.Format(_T("%XH"), EAX.Intel.FamilyID);
    c_FamilyID.SetWindowText(s);

    s.Format(_T("%XH"), EAX.Intel.ModelID);
    c_Model.SetWindowText(s);

    s.Format(_T("%d"), EAX.Intel.SteppingID);
    c_SteppingID.SetWindowText(s);
    
    return CLeaves::OnSetActive();
   }