remove S9xDeinitUpdate.

This commit is contained in:
aliaspider 2014-10-31 09:12:09 +01:00
parent 532f3cf63f
commit 2e12730a7c
3 changed files with 32 additions and 39 deletions

View File

@ -12,8 +12,14 @@
#include "spc7110.h"
#include "srtc.h"
#ifdef PSP
#include <pspkernel.h>
#include <pspgu.h>
#endif
#include <libretro.h>
static retro_log_printf_t log_cb = NULL;
static retro_video_refresh_t video_cb = NULL;
static retro_input_poll_t poll_cb = NULL;
@ -179,43 +185,6 @@ bool8 S9xInitUpdate()
return (TRUE);
}
#ifdef PSP
#include <pspkernel.h>
#include <pspgu.h>
void S9xDeinitUpdate(int width, int height)
{
static unsigned int __attribute__((aligned(16))) d_list[32];
void* const texture_vram_p = (void*)(0x44200000 - (512 *
512)); // max VRAM address - frame size
sceKernelDcacheWritebackRange(GFX.Screen, GFX.Pitch * height);
sceGuStart(GU_DIRECT, d_list);
sceGuCopyImage(GU_PSM_4444, 0, 0, width, height, GFX.Pitch >> 1, GFX.Screen, 0,
0,
512, texture_vram_p);
sceGuTexSync();
sceGuTexImage(0, 512, 512, 512, texture_vram_p);
sceGuTexMode(GU_PSM_5551, 0, 0, GU_FALSE);
sceGuTexFunc(GU_TFX_REPLACE, GU_TCC_RGB);
sceGuDisable(GU_BLEND);
sceGuFinish();
video_cb(texture_vram_p, width, height, GFX.Pitch);
}
#else
void S9xDeinitUpdate(int width, int height)
{
video_cb(GFX.Screen, width, height, GFX.Pitch);
}
#endif
void _makepath(char* path, const char* drive, const char* dir,
const char* fname, const char* ext)
{
@ -425,6 +394,32 @@ void retro_run(void)
S9xMixSamples((uint8*)audio_buf, 534 << 1);
audio_batch_cb(audio_buf, 534);
#ifdef PSP
static unsigned int __attribute__((aligned(16))) d_list[32];
void* const texture_vram_p = (void*)(0x44200000 - (512 *
512)); // max VRAM address - frame size
sceKernelDcacheWritebackRange(GFX.Screen, GFX.Pitch * IPPU.RenderedScreenHeight);
sceGuStart(GU_DIRECT, d_list);
sceGuCopyImage(GU_PSM_4444, 0, 0, IPPU.RenderedScreenWidth, IPPU.RenderedScreenHeight, GFX.Pitch >> 1, GFX.Screen, 0,
0,
512, texture_vram_p);
sceGuTexSync();
sceGuTexImage(0, 512, 512, 512, texture_vram_p);
sceGuTexMode(GU_PSM_5551, 0, 0, GU_FALSE);
sceGuTexFunc(GU_TFX_REPLACE, GU_TCC_RGB);
sceGuDisable(GU_BLEND);
sceGuFinish();
video_cb(texture_vram_p, IPPU.RenderedScreenWidth, IPPU.RenderedScreenHeight, GFX.Pitch);
#else
video_cb(GFX.Screen, IPPU.RenderedScreenWidth, IPPU.RenderedScreenHeight, GFX.Pitch);
#endif
#ifdef FRAMESKIP
if (IPPU.RenderThisFrame)

View File

@ -710,7 +710,6 @@ void S9xEndScreenRefresh()
GFX.Pitch = GFX.Pitch2 = GFX.RealPitch;
GFX.PPL = GFX.PPLx2 >> 1;
S9xDeinitUpdate(IPPU.RenderedScreenWidth, IPPU.RenderedScreenHeight);
}
S9xApplyCheats();

View File

@ -108,7 +108,6 @@ extern struct SGFX GFX;
bool8 S9xGraphicsInit();
void S9xGraphicsDeinit();
bool8 S9xInitUpdate(void);
void S9xDeinitUpdate(int width, int height);
#if 0
void S9xSyncSpeed();
#else