示例#1
0
void applyVideoFormat(MDFN_Surface &surface)
{
	VDC_SetPixelFormat(surface.format);
	#ifndef MDFN_PIXELFORMAT_SINGLE_BPP
	if(bpp == 16)
	{
		vdcRunFunc = VDC_RunFrame<uint16>;
	}
	else
	{
		vdcRunFunc = VDC_RunFrame<uint32>;
	}
	#endif
}
示例#2
0
void applyVideoFormat(EmulateSpecStruct *espec)
{
	VDC_SetPixelFormat(espec->surface->format, espec->CustomPalette, espec->CustomPaletteNumEntries); //.Rshift, espec->surface->format.Gshift,
}
示例#3
0
static void Emulate(EmulateSpecStruct *espec)
{
    INPUT_Frame();

    MDFNMP_ApplyPeriodicCheats();

#if 0
    {
        static bool firstcat = true;
        MDFN_PixelFormat nf;

        nf.bpp = 16;
        nf.colorspace = MDFN_COLORSPACE_RGB;
        nf.Rshift = 11;
        nf.Gshift = 5;
        nf.Bshift = 0;
        nf.Ashift = 16;

        nf.Rprec = 5;
        nf.Gprec = 6;
        nf.Bprec = 5;
        nf.Aprec = 8;

        espec->surface->SetFormat(nf, false);
        espec->VideoFormatChanged = firstcat;
        firstcat = false;
    }
#endif

#if 0
    static bool firstcat = true;

    MDFN_PixelFormat tmp_pf;

    tmp_pf.Rshift = 0;
    tmp_pf.Gshift = 0;
    tmp_pf.Bshift = 0;
    tmp_pf.Ashift = 8;

    tmp_pf.Rprec = 0;
    tmp_pf.Gprec = 0;
    tmp_pf.Bprec = 0;
    tmp_pf.Aprec = 0;

    tmp_pf.bpp = 8;
    tmp_pf.colorspace = MDFN_COLORSPACE_RGB;

    espec->surface->SetFormat(tmp_pf, false);
    espec->VideoFormatChanged = firstcat;
    firstcat = false;
#endif

    if(espec->VideoFormatChanged)
        VDC_SetPixelFormat(espec->surface->format); //.Rshift, espec->surface->format.Gshift, espec->surface->format.Bshift);

    if(espec->SoundFormatChanged)
    {
        for(int y = 0; y < 2; y++)
        {
            sbuf[y].set_sample_rate(espec->SoundRate ? espec->SoundRate : 44100, 50);
            sbuf[y].clock_rate((long)(PCE_MASTER_CLOCK / 3));
            sbuf[y].bass_freq(20);
        }
    }
    VDC_RunFrame(espec->surface, &espec->DisplayRect, espec->LineWidths, IsHES ? 1 : espec->skip);
    /*
     if(PCE_IsCD)
     {
      int32 dummy_ne;

      dummy_ne = PCECD_Run(HuCPU.timestamp * 3);
     }
    */
    psg->EndFrame(HuCPU.timestamp / pce_overclocked);

    if(espec->SoundBuf)
    {
        for(int y = 0; y < 2; y++)
        {
            sbuf[y].end_frame(HuCPU.timestamp / pce_overclocked);
            espec->SoundBufSize = sbuf[y].read_samples(espec->SoundBuf + y, espec->SoundBufMaxSize, 1);
        }
    }

    espec->MasterCycles = HuCPU.timestamp * 3;

    INPUT_FixTS();

    HuC6280_ResetTS();
    /*
     if(PCE_IsCD)
      PCECD_ResetTS();
    */
}
示例#4
0
void applyVideoFormat(EmulateSpecStruct *espec)
{
	VDC_SetPixelFormat(espec->surface->format);
}