static psx_gpu_struct egpu __attribute__((aligned(256)));
-int do_cmd_list(uint32_t *list, int count, int *last_cmd)
+int do_cmd_list(uint32_t *list, int count, int *cycles, int *last_cmd)
{
int ret;
#endif
if (gpu.state.enhancement_active)
- ret = gpu_parse_enhanced(&egpu, list, count * 4, (u32 *)last_cmd);
+ ret = gpu_parse_enhanced(&egpu, list, count * 4, cycles, (u32 *)last_cmd);
else
- ret = gpu_parse(&egpu, list, count * 4, (u32 *)last_cmd);
+ ret = gpu_parse(&egpu, list, count * 4, cycles, (u32 *)last_cmd);
#if defined(__arm__) && defined(NEON_BUILD) && !defined(SIMD_BUILD)
__asm__ __volatile__("":::"q4","q5","q6","q7");
// due to intersection stuff, see the update_enhancement_buf_scanouts() mess
int s_w = max(gpu.screen.hres, gpu.screen.w);
int s_h = gpu.screen.vres;
+ if (gpu.screen.y < 0)
+ s_h -= gpu.screen.y;
s_w = min(s_w, 512);
for (i = 0; i < ARRAY_SIZE(egpu.enhancement_scanouts); i++) {
const struct psx_gpu_scanout *s = &egpu.enhancement_scanouts[i];
void renderer_sync_ecmds(uint32_t *ecmds)
{
- gpu_parse(&egpu, ecmds + 1, 6 * 4, NULL);
+ s32 dummy0 = 0;
+ u32 dummy1 = 0;
+ gpu_parse(&egpu, ecmds + 1, 6 * 4, &dummy0, &dummy1);
}
void renderer_update_caches(int x, int y, int w, int h, int state_changed)
if (gpu.state.enhancement_active) {
if (state_changed) {
+ int vres = gpu.screen.vres;
+ if (gpu.screen.y < 0)
+ vres -= gpu.screen.y;
memset(egpu.enhancement_scanouts, 0, sizeof(egpu.enhancement_scanouts));
egpu.enhancement_scanout_eselect = 0;
update_enhancement_buf_scanouts(&egpu,
- gpu.screen.src_x, gpu.screen.src_y, gpu.screen.hres, gpu.screen.vres);
+ gpu.screen.src_x, gpu.screen.src_y, gpu.screen.hres, vres);
return;
}
sync_enhancement_buffers(x, y, w, h);
void renderer_notify_scanout_change(int x, int y)
{
+ int vres = gpu.screen.vres;
if (!gpu.state.enhancement_active || !egpu.enhancement_buf_ptr)
return;
- update_enhancement_buf_scanouts(&egpu, x, y, gpu.screen.hres, gpu.screen.vres);
+ if (gpu.screen.y < 0)
+ vres -= gpu.screen.y;
+ update_enhancement_buf_scanouts(&egpu, x, y, gpu.screen.hres, vres);
}
#include "../../frontend/plugin_lib.h"