X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=plugins%2Fgpulib%2Fgpu.c;h=bef297fb5eb34dfa6447cce3a959fe7363cd8573;hb=ae097dfb64926c50902b08b681cbf805b98e3751;hp=8e92c782c52ebfaad266b35bf712d2eb375fd6d2;hpb=89df80c636609625bb2e89099805f49cfef3ead0;p=pcsx_rearmed.git diff --git a/plugins/gpulib/gpu.c b/plugins/gpulib/gpu.c index 8e92c782..bef297fb 100644 --- a/plugins/gpulib/gpu.c +++ b/plugins/gpulib/gpu.c @@ -360,7 +360,7 @@ static void start_vram_transfer(uint32_t pos_word, uint32_t size_word, int is_re if (is_read) { gpu.status |= PSX_GPU_STATUS_IMG; // XXX: wrong for width 1 - memcpy(&gpu.gp0, VRAM_MEM_XY(gpu.dma.x, gpu.dma.y), 4); + gpu.gp0 = LE32TOH(*(uint32_t *) VRAM_MEM_XY(gpu.dma.x, gpu.dma.y)); gpu.state.last_vram_read_frame = *gpu.state.frame_count; } @@ -612,8 +612,11 @@ uint32_t GPUreadData(void) flush_cmd_buffer(); ret = gpu.gp0; - if (gpu.dma.h) + if (gpu.dma.h) { + ret = HTOLE32(ret); do_vram_io(&ret, 1, 1); + ret = LE32TOH(ret); + } log_io("gpu_read %08x\n", ret); return ret;