[Scummvm-cvs-logs] SF.net SVN: scummvm:[45324] scummvm/branches/branch-1-0-0/backends/platform /psp/osys_psp_gu.cpp
Bluddy at users.sourceforge.net
Bluddy at users.sourceforge.net
Thu Oct 22 07:52:45 CEST 2009
Revision: 45324
http://scummvm.svn.sourceforge.net/scummvm/?rev=45324&view=rev
Author: Bluddy
Date: 2009-10-22 05:52:45 +0000 (Thu, 22 Oct 2009)
Log Message:
-----------
Back port of PSP fix to bsword1: cache coherency issue
Modified Paths:
--------------
scummvm/branches/branch-1-0-0/backends/platform/psp/osys_psp_gu.cpp
Modified: scummvm/branches/branch-1-0-0/backends/platform/psp/osys_psp_gu.cpp
===================================================================
--- scummvm/branches/branch-1-0-0/backends/platform/psp/osys_psp_gu.cpp 2009-10-22 05:42:14 UTC (rev 45323)
+++ scummvm/branches/branch-1-0-0/backends/platform/psp/osys_psp_gu.cpp 2009-10-22 05:52:45 UTC (rev 45324)
@@ -46,8 +46,6 @@
unsigned short __attribute__((aligned(16))) mouseClut[256];
unsigned short __attribute__((aligned(16))) cursorPalette[256];
unsigned short __attribute__((aligned(16))) kbClut[256];
-//unsigned int __attribute__((aligned(16))) offscreen256[640*480];
-//unsigned int __attribute__((aligned(16))) overlayBuffer256[640*480*2];
unsigned int __attribute__((aligned(16))) mouseBuf256[MOUSE_SIZE*MOUSE_SIZE];
extern unsigned long RGBToColour(unsigned long r, unsigned long g, unsigned long b);
@@ -120,7 +118,7 @@
error("OSystem_PSP_GU: uncompressing keyboard_symbols_shift failed");
_keyboardVisible = false;
- _clut = (unsigned short*)(((unsigned int)clut256)|0x40000000);
+ _clut = clut256; // Not uncached to prevent cache coherency issues
_kbdClut = (unsigned short*)(((unsigned int)kbClut)|0x40000000);
_mouseBuf = (byte *)mouseBuf256;
_graphicMode = STRETCHED_480X272;
@@ -150,7 +148,6 @@
_overlayWidth = PSP_SCREEN_WIDTH; //width;
_overlayHeight = PSP_SCREEN_HEIGHT; //height;
-// _offscreen = (byte *)offscreen256;
_overlayBuffer = (OverlayColor *)0x44000000 + PSP_FRAME_SIZE;
_offscreen = (byte *)_overlayBuffer + _overlayWidth * _overlayHeight * sizeof(OverlayColor);
@@ -205,10 +202,11 @@
memcpy(mouseClut, _palette, 256*sizeof(unsigned short));
mouseClut[_mouseKeyColour] = 0;
- sceKernelDcacheWritebackAll();
for (unsigned int i=0;i<h;i++)
memcpy(_mouseBuf+i*MOUSE_SIZE, buf+i*w, w);
+
+ sceKernelDcacheWritebackAll();
}
void OSystem_PSP_GU::setPalette(const byte *colors, uint start, uint num) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list