aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--NEWS1
-rw-r--r--backends/intern.h1
-rw-r--r--backends/psp/Makefile81
-rw-r--r--backends/psp/README.PSP87
-rw-r--r--backends/psp/kbd_l_c.cpp213
-rw-r--r--backends/psp/kbd_ls_c.cpp224
-rw-r--r--backends/psp/kbd_s_c.cpp206
-rw-r--r--backends/psp/kbd_ss_c.cpp212
-rw-r--r--backends/psp/osys_psp.cpp657
-rw-r--r--backends/psp/osys_psp.h137
-rw-r--r--backends/psp/osys_psp_gu.cpp609
-rw-r--r--backends/psp/osys_psp_gu.h62
-rw-r--r--backends/psp/portdefs.h61
-rw-r--r--backends/psp/psp_fs.cpp162
-rw-r--r--backends/psp/psp_main.cpp129
-rw-r--r--backends/psp/trace.cpp74
-rw-r--r--backends/psp/trace.h39
-rw-r--r--base/main.cpp2
-rw-r--r--common/config-manager.cpp2
-rw-r--r--common/savefile.cpp2
-rw-r--r--common/scummsys.h19
-rw-r--r--common/stdafx.h2
-rw-r--r--common/system.cpp2
-rw-r--r--queen/journal.cpp1
-rw-r--r--simon/debug.cpp4
25 files changed, 2984 insertions, 5 deletions
diff --git a/NEWS b/NEWS
index 704005abc0..fa8d033f8a 100644
--- a/NEWS
+++ b/NEWS
@@ -9,6 +9,7 @@ For a more comprehensive changelog for the latest experimental CVS code, see:
New Ports:
- Added PlayStation 2 port.
+ - Added PlayStation Portable (PSP) port.
- Added AmigaOS 4 port.
- Added EPOC/SymbianOS port.
diff --git a/backends/intern.h b/backends/intern.h
index 5b8f712ee1..29cabd85c0 100644
--- a/backends/intern.h
+++ b/backends/intern.h
@@ -37,6 +37,7 @@ extern OSystem *OSystem_MAC_create(int gfx_mode, bool full_screen);
extern OSystem *OSystem_GP32_create();
extern OSystem *OSystem_PALMOS_create();
extern OSystem *OSystem_PS2_create();
+extern OSystem *OSystem_PSP_create();
extern OSystem *OSystem_SymbianOS_create();
diff --git a/backends/psp/Makefile b/backends/psp/Makefile
new file mode 100644
index 0000000000..33196735cb
--- /dev/null
+++ b/backends/psp/Makefile
@@ -0,0 +1,81 @@
+# SCUMMVM-PSP MakeFile
+# $Header$
+
+#control build
+DISABLE_SCALERS = true
+DISABLE_HQ_SCALERS = true
+DISABLE_HE = true
+DISABLE_KYRA = true
+
+srcdir = ../..
+VPATH = $(srcdir)
+HAVE_GCC3 = false
+
+PSPSDK=$(shell psp-config --pspsdk-path)
+PSPBIN = $(PSPSDK)/../bin
+LDFLAGS =
+
+CXX = psp-g++
+AS = psp-gcc
+LD = psp-g++
+AR = psp-ar cru
+RANLIB = psp-ranlib
+STRIP = psp-strip
+MKDIR = mkdir -p
+RM = rm -f
+
+INCDIR = ../../
+
+#check PSPSDK presence
+ifeq ($(PSPSDK),)
+$(error $$(PSPSDK) is undefined. Use "PSPSDK := $$(shell psp-config --pspsdk-path)" in your Makefile)
+endif
+
+# Add in PSPSDK includes and libraries.
+INCDIR := $(INCDIR) . $(PSPSDK)/include
+LIBDIR := $(LIBDIR) . $(PSPSDK)/lib
+
+CFLAGS = -O2 -G0 -Wall -D__PSP__ -DNONSTANDARD_PORT -DUSE_ZLIB -Wno-multichar `$(PSPBIN)/sdl-config --cflags`
+CFLAGS := $(addprefix -I,$(INCDIR)) $(CFLAGS)
+LDFLAGS := $(addprefix -L,$(LIBDIR)) $(LDFLAGS)
+LIBS =
+
+#comment this out if you don't want to use libmad
+CFLAGS += -DUSE_MAD
+LIBS += -lmad
+
+#comment this out if you don't want to use libtremor
+CFLAGS += -DUSE_TREMOR
+LIBS += -lvorbisidec
+
+#comment this out if you don't want to use libmpeg2
+CFLAGS += -DUSE_MPEG2
+LIBS += -lmpeg2
+
+LIBS += -lz -lm `$(PSPBIN)/sdl-config --libs` -lc -lpspgu -lpspctrl -lpspkernel -lpspuser
+
+
+CXXFLAGS := $(CFLAGS) $(CXXFLAGS) -fno-exceptions -fno-rtti
+ASFLAGS := $(CFLAGS) $(ASFLAGS)
+
+TARGET = scummvm-psp.elf
+OBJS := psp_main.o \
+ psp_fs.o \
+ osys_psp.o \
+ osys_psp_gu.o \
+ kbd_ss_c.o \
+ kbd_s_c.o \
+ kbd_ls_c.o \
+ kbd_l_c.o \
+ trace.o
+
+MODULE_DIRS += .
+
+include $(srcdir)/Makefile.common
+
+all: $(TARGET)
+ $(STRIP) $(TARGET)
+
+$(TARGET): $(OBJS)
+ $(LINK.cpp) $(OBJS) $(LIBS) -o $@
+
diff --git a/backends/psp/README.PSP b/backends/psp/README.PSP
new file mode 100644
index 0000000000..5991bb7a70
--- /dev/null
+++ b/backends/psp/README.PSP
@@ -0,0 +1,87 @@
+ScummVM-PSP 0.8.0CVS README
+===========================
+
+Installation
+============
+ - Copy the relevant game datafiles to your memory stick (location
+ doesn't matter).
+ - Install ScummVM like any other homebrew
+ - Run ScummVM and use the launcher to add games and run them
+
+
+Controls
+========
+
+Left trigger - ESC
+Right trigger - Enter
+Analog - Mouse movement
+Directionals - Mouse movement
+Analog + triangle - Fine control mouse
+Cross - Mouse button 1
+Circle - Mouse button 2
+Square - '.' (skip dialogue in some games)
+Select - Show/Hide Virtual Keyboard
+Start - F5
+
+Notes
+=====
+
+- While it's possible to compress certain game resources to reduce their size,
+ this can (and usually will) cause games (especially animation) to be choppy
+ sometimes, as it ofcourse needs extra CPU power to decode these files.
+ As such, it is recommended to play games in their original, uncompressed,
+ form whenever possible.
+
+
+Frequently Asked Question
+=========================
+
+Q: What do I need to run the games?
+A: A 1.00 or 1.50 firmware PSP and the necessary datafiles for the game you
+ want to play and obviously this ScummVM port.
+
+Q: Can I run this on my 1.52/1.52/2.00 firmware PSP?
+A: No, you can't as of yet.
+
+Q: My Monkey Island 1 doesn't have any music, what gives?
+A: If your version of Monkey Island came on a CD then it has the music
+ as CD Audio tracks. You need to rip those to MP3/Ogg and copy them
+ to the same directory as the game datafiles for music to work.
+
+Q: Game X crashes, or feature Y doesn't work. Can you fix this?
+A: Possibly.
+ Because of the large amount of games ScummVM supports we obviously haven't
+ played them all start-to-finish on the PSP, so it's very possible there
+ are bugs or issues that we're not aware of.
+ When you encounter such a bug, please use the "Bug Tracker" you find linked
+ on the ScummVM website, and mention all relevant info (i.e. that you're
+ using the PSP version, which ScummVM version it is, which build date it has,
+ a detailed description of the problem, and if at all possible a nearby
+ savegame), this will make it much easier for us to reproduce
+ (and hopefully fix) the problem.
+
+
+Building the source code
+========================
+To build ScummVM for PSP you need:
+
+- PSP toolchain (svn co svn://svn.pspdev.org/psp/trunk/toolchain)
+- PSPSDK (svn co svn://svn.pspdev.org/psp/trunk/pspsdk)
+- SDL (svn co svn://svn.pspdev.org/psp/trunk/SDL)
+- zlib (svn co svn://svn.pspdev.org/psp/trunk/zlib)
+- libmad (svn co svn://svn.pspdev.org/psp/trunk/libmad)
+- libTremor (svn co svn://svn.pspdev.org/psp/trunk/libTremor)
+- libmpeg2 (http://libmpeg2.sf.net)
+
+When you've installed these libraries, type "make" to build scummvm-psp.elf
+
+You can control most of the build process (engines and libraries used) from
+the Makefile.
+
+Port Authors
+============
+
+Joost Peters (joostp@scummvm.org)
+Paolo Costabel (paoloc@pacbell.net)
+Thomas Mayer (tommybear@internode.on.net)
+
diff --git a/backends/psp/kbd_l_c.cpp b/backends/psp/kbd_l_c.cpp
new file mode 100644
index 0000000000..5f10da0611
--- /dev/null
+++ b/backends/psp/kbd_l_c.cpp
@@ -0,0 +1,213 @@
+#ifndef __keyboard_letters_compressed__
+#define __keyboard_letters_compressed__
+
+unsigned int size_keyboard_letters_compressed = 3271;
+unsigned char keyboard_letters_compressed[] __attribute__((aligned(16))) = {
+ 0x78, 0x9c, 0xed, 0x9d, 0x69, 0x97, 0xb4, 0x36, 0x0e, 0x46, 0x99, 0xec, 0x99, 0xc9, 0x32, 0x93,
+ 0x3d, 0xb3, 0xfd, 0xff, 0x5f, 0x48, 0xbe, 0xe6, 0xa4, 0xbb, 0x0b, 0x4b, 0xb2, 0x24, 0xdb, 0xd8,
+ 0x66, 0x11, 0xcf, 0x3d, 0x27, 0xd5, 0x14, 0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 0xf9, 0x65, 0xba, 0xde, 0x30, 0xf3, 0xcb, 0xc0, 0xcd, 0x81, 0xdf, 0xd8, 0xc0, 0x6f, 0x6c, 0x34,
+ 0xbf, 0x10, 0x1c, 0x06, 0x55, 0x2f, 0xfc, 0x86, 0x41, 0xf7, 0x0b, 0xc1, 0x41, 0x30, 0xf4, 0xc2,
+ 0x6f, 0x10, 0x2c, 0xbf, 0x10, 0x1c, 0x02, 0x53, 0x2f, 0x0c, 0x07, 0xc0, 0xb3, 0x0b, 0xc3, 0x77,
+ 0xa7, 0x64, 0x17, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x18, 0xc2, 0x9f, 0xfe, 0xbb, 0x89, 0xf5
+};
+
+#endif
diff --git a/backends/psp/kbd_ls_c.cpp b/backends/psp/kbd_ls_c.cpp
new file mode 100644
index 0000000000..6f199377c0
--- /dev/null
+++ b/backends/psp/kbd_ls_c.cpp
@@ -0,0 +1,224 @@
+#ifndef __keyboard_letters_shift_compressed__
+#define __keyboard_letters_shift_compressed__
+
+unsigned int size_keyboard_letters_shift_compressed = 3450;
+unsigned char keyboard_letters_shift_compressed[] __attribute__((aligned(16))) = {
+ 0x78, 0x9c, 0xed, 0x9d, 0xe9, 0xb6, 0xab, 0x38, 0x0e, 0x46, 0xe9, 0xae, 0xb9, 0xbb, 0x86, 0xee,
+ 0x9a, 0xab, 0xa7, 0xf7, 0x7f, 0x42, 0xea, 0x6f, 0xaf, 0x73, 0x13, 0xb0, 0x24, 0x4b, 0xb2, 0xc1,
+ 0x03, 0x41, 0xf9, 0xf6, 0x5a, 0x27, 0x21, 0x58, 0x36, 0x0e, 0x1b, 0x8c, 0x31, 0xf1, 0xbd, 0x7f,
+ 0xfe, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x8d, 0x58, 0xc1,
+ 0x8d, 0x81, 0xdd, 0xe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0x7e, 0x21, 0x38, 0x08,
+ 0x86, 0x5e, 0xf8, 0x0d, 0x82, 0xe5, 0x17, 0x82, 0x43, 0x60, 0xea, 0x85, 0xe1, 0x00, 0x78, 0x76,
+ 0x61, 0xf8, 0xee, 0x94, 0xec, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x5d, 0xf8, 0x3f, 0x67, 0xcc, 0x42, 0xb8
+};
+
+#endif
diff --git a/backends/psp/kbd_s_c.cpp b/backends/psp/kbd_s_c.cpp
new file mode 100644
index 0000000000..cf745b64b0
--- /dev/null
+++ b/backends/psp/kbd_s_c.cpp
@@ -0,0 +1,206 @@
+#ifndef __keyboard_symbols_compressed__
+#define __keyboard_symbols_compressed__
+
+unsigned int size_keyboard_symbols_compressed = 3155;
+unsigned char keyboard_symbols_compressed[] __attribute__((aligned(16))) = {
+ 0x78, 0x9c, 0xed, 0x9d, 0xe9, 0xb6, 0xac, 0x36, 0x0e, 0x46, 0xe9, 0xcc, 0xe9, 0x4c, 0xdd, 0x99,
+ 0xa7, 0xee, 0xf7, 0x7f, 0x42, 0xf2, 0x37, 0x2b, 0xe7, 0x9e, 0x02, 0x49, 0x96, 0x64, 0x1b, 0x0f,
+ 0x80, 0xf8, 0xf6, 0x5a, 0xa9, 0x43, 0x61, 0xd9, 0x18, 0x36, 0x18, 0x63, 0xca, 0x37, 0x7f, 0xfd,
+ 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x8d, 0x58, 0xc1, 0x8d,
+ 0x81, 0xdd, 0xe8, 0xc0, 0x6e, 0x74, 0xa0, 0x37, 0x38, 0xf0, 0x1b, 0x1b, 0xe8, 0x0d, 0x0e, 0xfc,
+ 0xc6, 0x06, 0x7a, 0x83, 0x03, 0xbf, 0xb1, 0x81, 0xdf, 0xd8, 0xe4, 0xfc, 0xfe, 0xcb, 0x84, 0x97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 0x54, 0xbd, 0x61, 0xe6, 0xa7, 0x60, 0x7e, 0x99, 0xae, 0x37,
+ 0xcc, 0xfc, 0x32, 0x70, 0x73, 0xe0, 0x37, 0x36, 0xf0, 0x1b, 0x1b, 0xcd, 0x2f, 0x04, 0x87, 0x41,
+ 0xd5, 0x0b, 0xbf, 0x61, 0xd0, 0xfd, 0x42, 0x70, 0x10, 0x0c, 0xbd, 0xf0, 0x1b, 0x04, 0xcb, 0x2f,
+ 0x04, 0x87, 0xc0, 0xd4, 0x0b, 0xc3, 0x01, 0xf0, 0xec, 0xc2, 0xf0, 0xdd, 0xc9, 0xd9, 0x05, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xba, 0xf0, 0x37, 0x6c,
+ 0x6c, 0x3d, 0x8c
+};
+
+#endif
diff --git a/backends/psp/kbd_ss_c.cpp b/backends/psp/kbd_ss_c.cpp
new file mode 100644
index 0000000000..7c10227b2c
--- /dev/null
+++ b/backends/psp/kbd_ss_c.cpp
@@ -0,0 +1,212 @@
+#ifndef __keyboard_symbols_shift_compressed__
+#define __keyboard_symbols_shift_compressed__
+
+unsigned int size_keyboard_symbols_shift_compressed = 3263;
+unsigned char keyboard_symbols_shift_compressed[] __attribute__((aligned(16))) = {
+ 0x78, 0x9c, 0xed, 0x9d, 0xe9, 0xb6, 0xac, 0xb8, 0x0d, 0x46, 0x49, 0x0f, 0x49, 0x77, 0x7a, 0x4a,
+ 0x7a, 0x1e, 0x92, 0xbc, 0xff, 0x13, 0xd2, 0x7f, 0xd3, 0xe7, 0x9c, 0x02, 0x4b, 0xb2, 0x24, 0x1b,
+ 0x6c, 0x33, 0x88, 0x6f, 0xaf, 0x75, 0xab, 0x28, 0x90, 0x8d, 0x8b, 0x5d, 0x36, 0xc6, 0xe0, 0x73,
+ 0xff, 0xfc, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,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xf7, 0x0b, 0xc1, 0x41, 0x30, 0xf4, 0xc2, 0x6f, 0x10, 0x2c, 0xbf, 0x10, 0x1c, 0x02, 0x53, 0x2f,
+ 0x0c, 0x07, 0xc0, 0xb3, 0x0b, 0xc3, 0x77, 0xa7, 0x64, 0x17, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0xc2, 0xff, 0x01, 0x7c, 0x20, 0xed, 0x46
+};
+
+#endif
diff --git a/backends/psp/osys_psp.cpp b/backends/psp/osys_psp.cpp
new file mode 100644
index 0000000000..1437bcfa91
--- /dev/null
+++ b/backends/psp/osys_psp.cpp
@@ -0,0 +1,657 @@
+/* ScummVM - Scumm Interpreter
+ * Copyright (C) 2005 The ScummVM project
+ * Copyright (C) 2005 Joost Peters PSP Backend
+ * Copyright (C) 2005 Thomas Mayer PSP Backend
+ * Copyright (C) 2005 Paolo Costabel PSP Backend
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * $Header$
+ *
+ */
+
+#include "common/stdafx.h"
+#include "common/scummsys.h"
+
+#include "common/rect.h"
+#include "backends/psp/osys_psp.h"
+
+#include "common/config-manager.h"
+
+#include <pspgu.h>
+
+#include "./trace.h"
+
+#define SCREEN_WIDTH 480
+#define SCREEN_HEIGHT 272
+
+extern bool g_quit;
+
+unsigned short *DrawBuffer = (unsigned short *)0x44044000;
+unsigned short *DisplayBuffer = (unsigned short *)0x44000000;
+
+unsigned long RGBToColour(unsigned long r, unsigned long g, unsigned long b) {
+ return (((b >> 3) << 10) | ((g >> 3) << 5) | ((r >> 3) << 0)) | 0x8000;
+}
+
+void putPixel(uint16 x, uint16 y, unsigned long colour) {
+ *(unsigned short *)(DrawBuffer + (y << 9) + x ) = colour;
+}
+
+const OSystem::GraphicsMode OSystem_PSP::s_supportedGraphicsModes[] = {
+ { "320x200 (centered)", "320x200 16-bit centered", CENTERED_320X200 },
+ { "353x272 (best-fit, centered)", "353x272 16-bit centered", CENTERED_435X272 },
+ { "480x272 (full screen)", "480x272 16-bit stretched", STRETCHED_480X272 },
+ { "362x272 (4:3, centered)", "362x272 16-bit centered", CENTERED_362X272 },
+ {0, 0, 0}
+};
+
+
+OSystem_PSP::OSystem_PSP() : _screenWidth(0), _screenHeight(0), _offscreen(0), _overlayBuffer(0), _overlayVisible(false), _shakePos(0), _mouseBuf(0), _prevButtons(0), _lastPadCheck(0), _padAccel(0) {
+
+ memset(_palette, 0, sizeof(_palette));
+
+ _samplesPerSec = 0;
+
+ //init SDL
+ uint32 sdlFlags = SDL_INIT_AUDIO | SDL_INIT_TIMER;
+ SDL_Init(sdlFlags);
+
+ sceDisplaySetMode(0, SCREEN_WIDTH, SCREEN_HEIGHT);
+ sceDisplaySetFrameBuf((char *)DisplayBuffer, 512, 1, 1);
+ sceDisplayWaitVblankStart();
+}
+
+OSystem_PSP::~OSystem_PSP() {
+ if (_offscreen) free(_offscreen);
+ if (_overlayBuffer) free(_overlayBuffer);
+ if (_mouseBuf) free(_mouseBuf);
+}
+
+bool OSystem_PSP::hasFeature(Feature f)
+{
+ return false;
+}
+
+void OSystem_PSP::setFeatureState(Feature f, bool enable)
+{
+}
+
+bool OSystem_PSP::getFeatureState(Feature f)
+{
+ return false;
+}
+
+const OSystem::GraphicsMode* OSystem_PSP::getSupportedGraphicsModes() const
+{
+ return s_supportedGraphicsModes;
+}
+
+
+int OSystem_PSP::getDefaultGraphicsMode() const
+{
+ return -1;
+}
+
+bool OSystem_PSP::setGraphicsMode(int mode)
+{
+ return true;
+}
+
+bool OSystem_PSP::setGraphicsMode(const char *name)
+{
+ return true;
+}
+
+int OSystem_PSP::getGraphicsMode() const
+{
+ return -1;
+}
+
+void OSystem_PSP::initSize(uint width, uint height, int overlayScale) {
+ _screenWidth = width;
+ _screenHeight = height;
+ _offscreen = (byte *)malloc(width * height);
+
+ if(overlayScale == -1)
+ overlayScale = 1;
+
+ _overlayScale = overlayScale;
+ _overlayBuffer = (OverlayColor *)malloc(width * overlayScale * height * overlayScale * sizeof(OverlayColor));
+ bzero(_offscreen, width * height);
+ bzero(_overlayBuffer, width * overlayScale * height * overlayScale);
+
+ _mouseVisible = false;
+}
+
+int16 OSystem_PSP::getHeight() {
+ return _screenHeight;
+}
+
+int16 OSystem_PSP::getWidth() {
+ return _screenWidth;
+}
+
+void OSystem_PSP::setPalette(const byte *colors, uint start, uint num) {
+ const byte *b = colors;
+
+ for (uint i = 0; i < num; ++i) {
+ _palette[start + i] = RGBToColour(b[0], b[1], b[2]);
+ b += 4;
+ }
+}
+
+void OSystem_PSP::copyRectToScreen(const byte *buf, int pitch, int x, int y, int w, int h) {
+ //Clip the coordinates
+ if (x < 0) {
+ w += x;
+ buf -= x;
+ x = 0;
+ }
+
+ if (y < 0) {
+ h += y;
+ buf -= y * pitch;
+ y = 0;
+ }
+
+ if (w > _screenWidth - x) {
+ w = _screenWidth - x;
+ }
+
+ if (h > _screenHeight - y) {
+ h = _screenHeight - y;
+ }
+
+ if (w <= 0 || h <= 0)
+ return;
+
+
+ byte *dst = _offscreen + y * _screenWidth + x;
+ if (_screenWidth == pitch && pitch == w) {
+ memcpy(dst, buf, h * w);
+ } else {
+ do {
+ memcpy(dst, buf, w);
+ buf += pitch;
+ dst += _screenWidth;
+ } while (--h);
+ }
+}
+
+void OSystem_PSP::updateScreen() {
+ unsigned short *temp;
+
+ uint xStart = (SCREEN_WIDTH >> 1) - (_screenWidth >> 1);
+ uint yStart = (SCREEN_HEIGHT >> 1) - (_screenHeight >> 1);
+
+ for (int i = 0; i < _screenHeight; ++i) {
+ for (int j = 0; j < _screenWidth; ++j) {
+ putPixel(xStart + j, yStart + i, _palette[_offscreen[i * _screenWidth +j]]);
+ }
+ }
+
+ if(_overlayVisible) {
+ for (int i = 0; i < _screenHeight * _overlayScale; ++i) {
+ for (int j = 0; j < _screenWidth * _overlayScale; ++j) {
+
+ OverlayColor pixel = _overlayBuffer[(i * _screenWidth +j)];
+
+ if(pixel & 0x8000)
+ putPixel(xStart + j, yStart + i, pixel);
+ }
+ }
+ }
+
+ //draw mouse on top
+ if (_mouseVisible) {
+ for (int y = 0; y < _mouseHeight; ++y) {
+ for (int x = 0; x < _mouseWidth; ++x) {
+ if (_mouseBuf[y * _mouseHeight + x] != _mouseKeyColour) {
+ int my = _mouseY + y; // + _mouseHotspotY;
+ int mx = _mouseX + x; // + _mouseHotspotX;
+
+ if (mx >= 0 && mx < _screenWidth && my >= 0 && my < _screenHeight)
+ putPixel(xStart + mx, yStart + my, _palette[_mouseBuf[y * _mouseHeight + x]]);
+ }
+ }
+ }
+ }
+
+
+ // switch buffers
+ temp = DrawBuffer;
+ DrawBuffer = DisplayBuffer;
+ DisplayBuffer = temp;
+ sceDisplayWaitVblankStart();
+ sceDisplaySetFrameBuf((char *)DisplayBuffer, 512, 1, 1);
+
+}
+
+void OSystem_PSP::setShakePos(int shakeOffset) {
+ _shakePos = shakeOffset;
+}
+
+void OSystem_PSP::showOverlay ()
+{
+ _overlayVisible = true;
+}
+
+void OSystem_PSP::hideOverlay ()
+{
+ PSPDebugTrace("OSystem_PSP::hideOverlay called\n");
+ _overlayVisible = false;
+}
+
+void OSystem_PSP::clearOverlay ()
+{
+ PSPDebugTrace("clearOverlay\n");
+ bzero(_overlayBuffer, _screenWidth * _overlayScale * _screenHeight * _overlayScale * sizeof(OverlayColor));
+}
+
+void OSystem_PSP::grabOverlay (OverlayColor *buf, int pitch)
+{
+}
+
+void OSystem_PSP::copyRectToOverlay (const OverlayColor *buf, int pitch, int x, int y, int w, int h)
+{
+ PSPDebugTrace("copyRectToOverlay\n");
+
+ //Clip the coordinates
+ if (x < 0) {
+ w += x;
+ buf -= x;
+ x = 0;
+ }
+
+ if (y < 0) {
+ h += y;
+ buf -= y * pitch;
+ y = 0;
+ }
+
+ if (w > _screenWidth*_overlayScale - x) {
+ w = _screenWidth*_overlayScale - x;
+ }
+
+ if (h > _screenHeight*_overlayScale - y) {
+ h = _screenHeight*_overlayScale - y;
+ }
+
+ if (w <= 0 || h <= 0)
+ return;
+
+
+ OverlayColor *dst = _overlayBuffer +( y * _screenWidth * _overlayScale + x);
+ if (_screenWidth == pitch && pitch == w) {
+ memcpy(dst, buf, h * _overlayScale * w * _overlayScale * sizeof(OverlayColor));
+ } else {
+ do {
+ memcpy(dst, buf, w * _overlayScale * sizeof(OverlayColor));
+ buf += pitch;
+ dst += _screenWidth * _overlayScale;
+ } while (--h);
+ }
+}
+
+int16 OSystem_PSP::getOverlayHeight()
+{
+ return getHeight() * _overlayScale;
+}
+
+int16 OSystem_PSP::getOverlayWidth()
+{
+ return getWidth() * _overlayScale;
+}
+
+OverlayColor OSystem_PSP::RGBToColor(uint8 r, uint8 g, uint8 b)
+{
+ return (((r >> 3) & 0x1F) | (((g >> 3) & 0x1F) << 5) | (((b >> 3) & 0x1F) << 10 ) ) | 0x8000;
+}
+
+void OSystem_PSP::colorToRGB(OverlayColor color, uint8 &r, uint8 &g, uint8 &b)
+{
+ r = ((color & 0x1F) << 3);
+ g = (((color >> 5) & 0x1F) << 3);
+ b = (((color >> 10) & 0x1F) << 3);
+}
+
+OverlayColor OSystem_PSP::ARGBToColor(uint8 a, uint8 r, uint8 g, uint8 b)
+{
+ OverlayColor color = RGBToColor(r, g, b);
+
+ if(a == 255)
+ color |= 0x8000;
+
+ return color;
+}
+
+void OSystem_PSP::colorToARGB(OverlayColor color, uint8 &a, uint8 &r, uint8 &g, uint8 &b)
+{
+ colorToRGB(color, r, g, b);
+ if(color & 0x8000)
+ a = 255;
+ else
+ a = 0;
+}
+
+void OSystem_PSP::grabPalette(byte *colors, uint start, uint num)
+{
+ uint i;
+ uint16 color;
+
+ for(i=start; i < start+num; i++)
+ {
+ color = _palette[i];
+ *colors++ = ((color & 0x1F) << 3);
+ *colors++ = (((color >> 5) & 0x1F) << 3);
+ *colors++ = (((color >> 10) & 0x1F) << 3);
+ *colors++ = (color & 0x8000 ? 255 : 0);
+ }
+}
+
+bool OSystem_PSP::showMouse(bool visible) {
+ bool last = _mouseVisible;
+ _mouseVisible = visible;
+ return last;
+}
+
+void OSystem_PSP::warpMouse(int x, int y) {
+ //assert(x > 0 && x < _screenWidth);
+ //assert(y > 0 && y < _screenHeight);
+ _mouseX = x;
+ _mouseY = y;
+}
+
+void OSystem_PSP::setMouseCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY, byte keycolor, int cursorTargetScale) {
+ //TODO: handle cursorTargetScale
+ _mouseWidth = w;
+ _mouseHeight = h;
+
+ _mouseHotspotX = hotspotX;
+ _mouseHotspotY = hotspotY;
+
+ _mouseKeyColour = keycolor;
+
+ if (_mouseBuf)
+ free(_mouseBuf);
+
+ _mouseBuf = (byte *)malloc(w * h);
+ memcpy(_mouseBuf, buf, w * h);
+}
+
+#define PAD_CHECK_TIME 40
+#define PAD_DIR_MASK (PSP_CTRL_UP | PSP_CTRL_DOWN | PSP_CTRL_LEFT | PSP_CTRL_RIGHT)
+
+bool OSystem_PSP::pollEvent(Event &event) {
+ s8 analogStepAmountX = 0;
+ s8 analogStepAmountY = 0;
+/*
+ SceCtrlData pad;
+
+ sceCtrlSetSamplingCycle(0);
+ sceCtrlSetSamplingMode(1);
+ sceCtrlReadBufferPositive(&pad, 1);
+*/
+ uint32 buttonsChanged = pad.Buttons ^ _prevButtons;
+
+ /* check if user exited using the Home button */
+ if (g_quit) {
+ g_quit = false; //set g_quit back to false or else pollEvent keeps looping..
+
+ warning("g_quit signal caught, sending EVENT_QUIT to VM engine");
+ event.type = OSystem::EVENT_QUIT;
+ return true;
+ }
+
+ if (buttonsChanged & (PSP_CTRL_CROSS | PSP_CTRL_CIRCLE | PSP_CTRL_LTRIGGER | PSP_CTRL_RTRIGGER | PSP_CTRL_START | PSP_CTRL_SELECT | PSP_CTRL_SQUARE)) {
+ if (buttonsChanged & PSP_CTRL_CROSS) {
+ event.type = (pad.Buttons & PSP_CTRL_CROSS) ? OSystem::EVENT_LBUTTONDOWN : OSystem::EVENT_LBUTTONUP;
+ }
+ else if (buttonsChanged & PSP_CTRL_CIRCLE) {
+ event.type = (pad.Buttons & PSP_CTRL_CIRCLE) ? OSystem::EVENT_RBUTTONDOWN : OSystem::EVENT_RBUTTONUP;
+ }
+ else {
+ //any of the other buttons.
+ event.type = buttonsChanged & pad.Buttons ? OSystem::EVENT_KEYDOWN : OSystem::EVENT_KEYUP;
+ event.kbd.flags = 0;
+
+ if (buttonsChanged & PSP_CTRL_LTRIGGER) {
+ event.kbd.keycode = SDLK_ESCAPE;
+ event.kbd.ascii = 27;
+ } else if (buttonsChanged & PSP_CTRL_RTRIGGER) {
+ event.kbd.keycode = SDLK_RETURN;
+ event.kbd.ascii = 13;
+ } else if (buttonsChanged & PSP_CTRL_START) {
+ event.kbd.keycode = SDLK_F5;
+ event.kbd.ascii = 319;
+/* } else if (buttonsChanged & PSP_CTRL_SELECT) {
+ event.kbd.keycode = SDLK_0;
+ event.kbd.ascii = '0';
+*/ } else if (buttonsChanged & PSP_CTRL_SQUARE) {
+ event.kbd.keycode = SDLK_PERIOD;
+ event.kbd.ascii = '.';
+ }
+
+ }
+
+ event.mouse.x = _mouseX;
+ event.mouse.y = _mouseY;
+ _prevButtons = pad.Buttons;
+ return true;
+ }
+
+ uint32 time = getMillis();
+ if (time - _lastPadCheck > PAD_CHECK_TIME) {
+ _lastPadCheck = time;
+ int16 newX = _mouseX;
+ int16 newY = _mouseY;
+
+ if (pad.Lx < 100) {
+ analogStepAmountX = pad.Lx - 100;
+ }
+ else if (pad.Lx > 155) {
+ analogStepAmountX = pad.Lx - 155;
+ }
+
+ if (pad.Ly < 100) {
+ analogStepAmountY = pad.Ly - 100;
+ }
+ else if (pad.Ly > 155) {
+ analogStepAmountY = pad.Ly - 155;
+ }
+
+ if (pad.Buttons & PAD_DIR_MASK ||
+ analogStepAmountX != 0 || analogStepAmountY != 0) {
+ if (_prevButtons & PAD_DIR_MASK) {
+ if (_padAccel < 16) _padAccel++;
+ } else _padAccel = 0;
+
+ _prevButtons = pad.Buttons;
+
+ if (pad.Buttons & PSP_CTRL_LEFT)
+ newX -= _padAccel >> 2;
+ if (pad.Buttons & PSP_CTRL_RIGHT)
+ newX += _padAccel >> 2;
+ if (pad.Buttons & PSP_CTRL_UP)
+ newY -= _padAccel >> 2;
+ if (pad.Buttons & PSP_CTRL_DOWN)
+ newY += _padAccel >> 2;
+
+ // If no movement then this has no effect
+ if (pad.Buttons & PSP_CTRL_TRIANGLE) {
+ // Fine control mode for analog
+ if (analogStepAmountX != 0)
+ if (analogStepAmountX > 0)
+ newX += analogStepAmountX - (analogStepAmountX - 1);
+ else
+ newX -= -analogStepAmountX - (-analogStepAmountX - 1);
+
+ if (analogStepAmountY != 0)
+ if (analogStepAmountY > 0)
+ newY += analogStepAmountY - (analogStepAmountY - 1);
+ else
+ newY -= -analogStepAmountY - (-analogStepAmountY - 1);
+ }
+ else {
+ newX += analogStepAmountX >> ((_screenWidth == 640 || (_overlayVisible && _overlayScale > 1)) ? 2 : 3);
+ newY += analogStepAmountY >> ((_screenWidth == 640 || (_overlayVisible && _overlayScale > 1)) ? 2 : 3);
+ }
+
+ if (newX < 0) newX = 0;
+ if (newY < 0) newY = 0;
+ if(_overlayVisible)
+ {
+ if (newX >= _screenWidth*_overlayScale) newX = _screenWidth*_overlayScale - 1;
+ if (newY >= _screenHeight*_overlayScale) newY = _screenHeight*_overlayScale - 1;
+ }
+ else
+ {
+ if (newX >= _screenWidth) newX = _screenWidth - 1;
+ if (newY >= _screenHeight) newY = _screenHeight - 1;
+ }
+
+ if ((_mouseX != newX) || (_mouseY != newY)) {
+ event.type = OSystem::EVENT_MOUSEMOVE;
+ event.mouse.x = _mouseX = newX;
+ event.mouse.y = _mouseY = newY;
+ return true;
+ }
+ } else {
+ //reset pad acceleration
+ _padAccel = 0;
+ }
+ }
+
+ return false;
+}
+
+uint32 OSystem_PSP::getMillis() {
+ return SDL_GetTicks();
+}
+
+void OSystem_PSP::delayMillis(uint msecs) {
+ sceKernelDelayThread(1); // Sleep thread for 1 millionth of a second to allow callback threads to run
+ SDL_Delay(msecs);
+}
+
+void OSystem_PSP::setTimerCallback(TimerProc callback, int interval) {
+ SDL_SetTimer(interval, (SDL_TimerCallback)callback);
+}
+
+OSystem::MutexRef OSystem_PSP::createMutex(void) {
+ return (MutexRef)SDL_CreateMutex();
+}
+
+void OSystem_PSP::lockMutex(MutexRef mutex) {
+ SDL_mutexP((SDL_mutex *)mutex);
+}
+
+void OSystem_PSP::unlockMutex(MutexRef mutex) {
+ SDL_mutexV((SDL_mutex *)mutex);
+}
+
+void OSystem_PSP::deleteMutex(MutexRef mutex) {
+ SDL_DestroyMutex((SDL_mutex *)mutex);
+}
+
+bool OSystem_PSP::setSoundCallback(SoundProc proc, void *param) {
+ SDL_AudioSpec desired;
+ SDL_AudioSpec obtained;
+
+ memset(&desired, 0, sizeof(desired));
+
+ if (ConfMan.hasKey("output_rate"))
+ _samplesPerSec = ConfMan.getInt("output_rate");
+ else
+ _samplesPerSec = SAMPLES_PER_SEC;
+
+ // Originally, we always used 2048 samples. This loop will produce the
+ // same result at 22050 Hz, and should hopefully produce something
+ // sensible for other frequencies. Note that it must be a power of two.
+
+ uint16 samples = 0x8000;
+
+ for (;;) {
+ if (samples / (_samplesPerSec / 1000) < 100)
+ break;
+ samples >>= 1;
+ }
+
+ desired.freq = _samplesPerSec;
+ desired.format = AUDIO_S16SYS;
+ desired.channels = 2;
+ desired.samples = samples;
+ desired.callback = proc;
+ desired.userdata = param;
+ if (SDL_OpenAudio(&desired, &obtained) != 0) {
+ return false;
+ }
+ // Note: This should be the obtained output rate, but it seems that at
+ // least on some platforms SDL will lie and claim it did get the rate
+ // even if it didn't. Probably only happens for "weird" rates, though.
+ _samplesPerSec = obtained.freq;
+ SDL_PauseAudio(0);
+ return true;
+}
+
+void OSystem_PSP::clearSoundCallback() {
+ SDL_CloseAudio();
+}
+
+int OSystem_PSP::getOutputSampleRate() const {
+ return _samplesPerSec;
+}
+
+bool OSystem_PSP::openCD(int drive) {
+ return false;
+}
+
+bool OSystem_PSP::pollCD() {
+ return false;
+}
+
+void OSystem_PSP::playCD(int track, int num_loops, int start_frame, int duration) {
+}
+
+void OSystem_PSP::stopCD() {
+}
+
+void OSystem_PSP::updateCD() {
+}
+
+void OSystem_PSP::quit() {
+ clearSoundCallback();
+ SDL_Quit();
+ sceGuTerm();
+ sceKernelExitGame();
+}
+
+void OSystem_PSP::setWindowCaption(const char *caption) {
+}
+
+void OSystem_PSP::displayMessageOnOSD(const char *msg) {
+}
+
+
+/* moved to psp-gu.cpp */
+/*
+OSystem *OSystem_PSP_create() {
+ return new OSystem_PSP();
+}
+*/
+// Correct pixel format ABBBBBGGGGGRRRRR
+int gBitFormat = 1555;
+
diff --git a/backends/psp/osys_psp.h b/backends/psp/osys_psp.h
new file mode 100644
index 0000000000..8709dcd3c1
--- /dev/null
+++ b/backends/psp/osys_psp.h
@@ -0,0 +1,137 @@
+/* ScummVM - Scumm Interpreter
+ * Copyright (C) 2005 The ScummVM project
+ * Copyright (C) 2005 Joost Peters PSP Backend
+ * Copyright (C) 2005 Thomas Mayer PSP Backend
+ * Copyright (C) 2005 Paolo Costabel PSP Backend
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * $Header$
+ *
+ */
+
+#include "common/stdafx.h"
+#include "common/scummsys.h"
+#include "common/system.h"
+#include "backends/intern.h"
+
+#include <SDL.h>
+
+enum GraphicModeID {
+ CENTERED_320X200,
+ CENTERED_435X272,
+ STRETCHED_480X272,
+ CENTERED_362X272
+};
+
+class OSystem_PSP : public OSystem {
+public:
+ static const OSystem::GraphicsMode s_supportedGraphicsModes[];
+ static OSystem *instance();
+
+protected:
+ uint16 _screenWidth;
+ uint16 _screenHeight;
+ uint16 _overlayScale;
+ byte *_offscreen;
+ OverlayColor *_overlayBuffer;
+ uint16 _palette[256];
+ bool _overlayVisible;
+ uint32 _shakePos;
+
+
+ bool _mouseVisible;
+ int _mouseX, _mouseY;
+ int _mouseWidth, _mouseHeight;
+ int _mouseHotspotX, _mouseHotspotY;
+ byte _mouseKeyColour;
+ byte *_mouseBuf;
+
+ uint32 _prevButtons;
+ uint32 _lastPadCheck;
+ uint32 _padAccel;
+
+ uint32 _samplesPerSec;
+ SceCtrlData pad;
+
+public:
+
+ OSystem_PSP();
+ virtual ~OSystem_PSP();
+
+ virtual bool hasFeature(Feature f);
+ virtual void setFeatureState(Feature f, bool enable);
+ virtual bool getFeatureState(Feature f);
+ virtual const GraphicsMode *getSupportedGraphicsModes() const;
+ virtual int getDefaultGraphicsMode() const;
+ virtual bool setGraphicsMode(int mode);
+ bool setGraphicsMode(const char *name);
+ virtual int getGraphicsMode() const;
+ virtual void initSize(uint width, uint height, int overlayScale);
+ virtual int16 getHeight();
+ virtual int16 getWidth();
+ virtual void setPalette(const byte *colors, uint start, uint num);
+ virtual void copyRectToScreen(const byte *buf, int pitch, int x, int y, int w, int h);
+ virtual void updateScreen();
+ virtual void setShakePos(int shakeOffset);
+
+ virtual void showOverlay();
+ virtual void hideOverlay();
+ virtual void clearOverlay();
+ virtual void grabOverlay(OverlayColor *buf, int pitch);
+ virtual void copyRectToOverlay(const OverlayColor *buf, int pitch, int x, int y, int w, int h);
+ virtual int16 getOverlayHeight();
+ virtual int16 getOverlayWidth();
+ virtual OverlayColor RGBToColor(uint8 r, uint8 g, uint8 b);
+ virtual void colorToRGB(OverlayColor color, uint8 &r, uint8 &g, uint8 &b);
+ virtual OverlayColor ARGBToColor(uint8 a, uint8 r, uint8 g, uint8 b);
+ virtual void colorToARGB(OverlayColor color, uint8 &a, uint8 &r, uint8 &g, uint8 &b);
+ virtual void grabPalette(byte *colors, uint start, uint num);
+
+ virtual bool showMouse(bool visible);
+
+ virtual void warpMouse(int x, int y);
+ virtual void setMouseCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY, byte keycolor = 255, int cursorTargetScale = 1);
+
+ virtual bool pollEvent(Event &event);
+ virtual uint32 getMillis();
+ virtual void delayMillis(uint msecs);
+
+ virtual void setTimerCallback(TimerProc callback, int interval);
+
+ virtual MutexRef createMutex(void);
+ virtual void lockMutex(MutexRef mutex);
+ virtual void unlockMutex(MutexRef mutex);
+ virtual void deleteMutex(MutexRef mutex);
+
+ virtual bool setSoundCallback(SoundProc proc, void *param);
+ virtual void clearSoundCallback();
+ virtual int getOutputSampleRate() const;
+
+ virtual bool openCD(int drive);
+ virtual bool pollCD();
+
+ virtual void playCD(int track, int num_loops, int start_frame, int duration);
+ virtual void stopCD();
+ virtual void updateCD();
+
+ virtual void quit();
+
+ virtual void setWindowCaption(const char *caption);
+
+ virtual void displayMessageOnOSD(const char *msg);
+
+};
+
diff --git a/backends/psp/osys_psp_gu.cpp b/backends/psp/osys_psp_gu.cpp
new file mode 100644
index 0000000000..9438b4953d
--- /dev/null
+++ b/backends/psp/osys_psp_gu.cpp
@@ -0,0 +1,609 @@
+/* ScummVM - Scumm Interpreter
+ * Copyright (C) 2005 The ScummVM project
+ * Copyright (C) 2005 Joost Peters PSP Backend
+ * Copyright (C) 2005 Thomas Mayer PSP Backend
+ * Copyright (C) 2005 Paolo Costabel PSP Backend
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * $Header$
+ */
+
+#include <zlib.h>
+#include "osys_psp_gu.h"
+#include "./trace.h"
+
+#define PIXEL_SIZE (4)
+#define BUF_WIDTH (512)
+#define PSP_SCREEN_WIDTH 480
+#define PSP_SCREEN_HEIGHT 272
+#define PSP_FRAME_SIZE (BUF_WIDTH * PSP_SCREEN_HEIGHT * PIXEL_SIZE)
+#define MOUSE_SIZE 128
+#define KBD_DATA_SIZE 130560
+
+unsigned int __attribute__((aligned(16))) list[262144];
+unsigned short __attribute__((aligned(16))) clut256[256];
+unsigned short __attribute__((aligned(16))) mouseClut[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);
+
+extern unsigned int size_keyboard_symbols_compressed;
+extern unsigned char keyboard_symbols_compressed[];
+extern unsigned int size_keyboard_symbols_shift_compressed;
+extern unsigned char keyboard_symbols_shift_compressed[];
+extern unsigned int size_keyboard_letters_compressed;
+extern unsigned char keyboard_letters_compressed[];
+extern unsigned int size_keyboard_letters_shift_compressed;
+extern unsigned char keyboard_letters_shift_compressed[];
+unsigned char *keyboard_symbols;
+unsigned char *keyboard_symbols_shift;
+unsigned char *keyboard_letters;
+unsigned char *keyboard_letters_shift;
+
+unsigned char kbd_ascii[] = {'1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '-', '=', '[', ']', '\\', ';', '\'', ',', '.', '/', '`'};
+unsigned int kbd_code[] = {SDLK_1, SDLK_2, SDLK_3, SDLK_4, SDLK_5, SDLK_6, SDLK_7, SDLK_8, SDLK_9, SDLK_0, SDLK_MINUS, SDLK_EQUALS, SDLK_LEFTBRACKET, SDLK_RIGHTBRACKET,
+ SDLK_BACKSLASH, SDLK_SEMICOLON, SDLK_QUOTE, SDLK_COMMA, SDLK_PERIOD, SDLK_SLASH, SDLK_BACKQUOTE};
+unsigned char kbd_ascii_cl[] = {'!', '@', '#', '$', '%', '^', '&', '*', '(', ')', '_', '+', '{', '}', '|', ':', '"', '<', '>', '?', '~'};
+unsigned int kbd_code_cl[] = {SDLK_EXCLAIM, SDLK_AT, SDLK_HASH, SDLK_DOLLAR, 37, SDLK_CARET, SDLK_AMPERSAND, SDLK_ASTERISK, SDLK_LEFTPAREN, SDLK_RIGHTPAREN, SDLK_UNDERSCORE,
+ SDLK_PLUS, 123, 125, 124, SDLK_COLON, SDLK_QUOTEDBL, SDLK_LESS, SDLK_GREATER, SDLK_QUESTION, 126};
+#define CAPS_LOCK (1 << 0)
+#define SYMBOLS (1 << 1)
+
+extern bool g_quit;
+
+OSystem_PSP_GU::OSystem_PSP_GU() {
+ //sceKernelDcacheWritebackAll();
+
+ // setup
+ sceGuInit();
+ sceGuStart(0, list);
+ sceGuDrawBuffer(GU_PSM_8888, (void *)0, BUF_WIDTH);
+ sceGuDispBuffer(PSP_SCREEN_WIDTH, PSP_SCREEN_HEIGHT, (void*)PSP_FRAME_SIZE, BUF_WIDTH);
+ sceGuDepthBuffer((void*)(PSP_FRAME_SIZE * 2), BUF_WIDTH);
+ sceGuOffset(2048 - (PSP_SCREEN_WIDTH/2), 2048 - (PSP_SCREEN_HEIGHT/2));
+ sceGuViewport(2048, 2048, PSP_SCREEN_WIDTH, PSP_SCREEN_HEIGHT);
+ sceGuDepthRange(0xc350, 0x2710);
+ sceGuScissor(0, 0, PSP_SCREEN_WIDTH, PSP_SCREEN_HEIGHT);
+ sceGuEnable(GU_SCISSOR_TEST);
+ sceGuFrontFace(GU_CW);
+ sceGuEnable(GU_TEXTURE_2D);
+ sceGuClear(GU_COLOR_BUFFER_BIT|GU_DEPTH_BUFFER_BIT);
+ sceGuFinish();
+ sceGuSync(0,0);
+
+ sceDisplayWaitVblankStart();
+ sceGuDisplay(1);
+
+ //decompress keyboard data
+ uLongf kbdSize = KBD_DATA_SIZE;
+ keyboard_letters = (unsigned char *)memalign(16, KBD_DATA_SIZE);
+ assert(Z_OK == uncompress((Bytef *)keyboard_letters, &kbdSize, (const Bytef *)keyboard_letters_compressed, size_keyboard_letters_compressed));
+ uncompress((Bytef *)keyboard_letters, &kbdSize, (const Bytef *)keyboard_letters_compressed, size_keyboard_letters_compressed);
+
+ kbdSize = KBD_DATA_SIZE;
+ keyboard_letters_shift = (unsigned char *)memalign(16, KBD_DATA_SIZE);
+ assert(Z_OK == uncompress((Bytef *)keyboard_letters_shift, &kbdSize, (const Bytef *)keyboard_letters_shift_compressed, size_keyboard_letters_shift_compressed));
+
+ kbdSize = KBD_DATA_SIZE;
+ keyboard_symbols = (unsigned char *)memalign(16, KBD_DATA_SIZE);
+ assert(Z_OK == uncompress((Bytef *)keyboard_symbols, &kbdSize, (const Bytef *)keyboard_symbols_compressed, size_keyboard_symbols_compressed));
+
+ kbdSize = KBD_DATA_SIZE;
+ keyboard_symbols_shift = (unsigned char *)memalign(16, KBD_DATA_SIZE);
+ assert(Z_OK == uncompress((Bytef *)keyboard_symbols_shift, &kbdSize, (const Bytef *)keyboard_symbols_shift_compressed, size_keyboard_symbols_shift_compressed));
+
+ _keyboardVisible = false;
+ _clut = (unsigned short*)(((unsigned int)clut256)|0x40000000);
+ _kbdClut = (unsigned short*)(((unsigned int)kbClut)|0x40000000);
+ _mouseBuf = (byte *)mouseBuf256;
+ _graphicMode = STRETCHED_480X272;
+ _keySelected = 1;
+ _keyboardMode = 0;
+ //_graphicMode = CENTERED_435X272;
+ //_graphicMode = CENTERED_320X200;
+ //_graphicMode = CENTERED_362X272;
+}
+
+OSystem_PSP_GU::~OSystem_PSP_GU()
+{
+ free(keyboard_symbols_shift);
+ free(keyboard_symbols);
+ free(keyboard_letters_shift);
+ free(keyboard_letters);
+
+ _offscreen = 0;
+ _overlayBuffer = 0;
+ _mouseBuf = 0;
+ sceGuTerm();
+}
+
+void OSystem_PSP_GU::initSize(uint width, uint height, int overlayScale) {
+ PSPDebugTrace("initSize\n");
+ _screenWidth = width;
+ _screenHeight = height;
+// _offscreen = (byte *)offscreen256;
+ _overlayBuffer = (OverlayColor *)0x44000000 + PSP_FRAME_SIZE;
+
+ if(overlayScale == -1 || width == 640)
+ overlayScale = 1;
+
+ _overlayScale = overlayScale;
+ _offscreen = (unsigned byte *)_overlayBuffer+_screenWidth*_screenHeight*_overlayScale*_overlayScale*sizeof(OverlayColor);
+ bzero(_offscreen, width * height);
+ bzero(_overlayBuffer, width * overlayScale * height * overlayScale);
+ _kbdClut[0] = 0xffff;
+ _kbdClut[246] = 0x4ccc;
+ _kbdClut[247] = 0x0000;
+ for(int i=1;i<31;i++)
+ _kbdClut[i] = 0xf888;
+ _mouseVisible = false;
+ sceKernelDcacheWritebackAll();
+}
+
+int OSystem_PSP_GU::getDefaultGraphicsMode() const
+{
+ return STRETCHED_480X272;
+}
+
+bool OSystem_PSP_GU::setGraphicsMode(int mode)
+{
+ _graphicMode = mode;
+ return true;
+}
+
+bool OSystem_PSP_GU::setGraphicsMode(const char *name)
+{
+ int i = 0;
+
+ while(s_supportedGraphicsModes[i].name)
+ {
+ if(!strcmpi(s_supportedGraphicsModes[i].name, name))
+ {
+ _graphicMode = s_supportedGraphicsModes[i].id;
+ return true;
+ }
+ i++;
+ }
+
+ return false;
+}
+
+int OSystem_PSP_GU::getGraphicsMode() const
+{
+ return _graphicMode;
+}
+
+void OSystem_PSP_GU::setMouseCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY, byte keycolor, int cursorTargetScale) {
+ //TODO: handle cursorTargetScale
+ _mouseWidth = w;
+ _mouseHeight = h;
+
+ _mouseHotspotX = hotspotX;
+ _mouseHotspotY = hotspotY;
+
+ _mouseKeyColour = keycolor;
+
+ 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);
+}
+
+void OSystem_PSP_GU::setPalette(const byte *colors, uint start, uint num) {
+ const byte *b = colors;
+
+ for (uint i = 0; i < num; ++i) {
+ _palette[start + i] = RGBToColour(b[0], b[1], b[2]);
+ b += 4;
+ }
+
+ //copy to CLUT
+ memcpy(_clut, _palette, 256*sizeof(unsigned short));
+
+ //force update of mouse CLUT as well, as it may have been set up before this palette was set
+ memcpy(mouseClut, _palette, 256*sizeof(unsigned short));
+ mouseClut[_mouseKeyColour] = 0;
+
+ sceKernelDcacheWritebackAll();
+}
+
+
+void OSystem_PSP_GU::copyRectToScreen(const byte *buf, int pitch, int x, int y, int w, int h)
+{
+ byte *dst = _offscreen + y * _screenWidth + x;
+
+ if (_screenWidth == pitch && pitch == w)
+ {
+ memcpy(dst, buf, h * w);
+/*
+ sceGuStart(0,list);
+ sceGuCopyImage( 3, 0, 0, w/2, h, w/2, (void *)buf, x/2, y, _screenWidth /2, _offscreen);
+ sceGuFinish();
+ sceGuSync(0,0);
+*/
+ }
+ else
+ {
+ do
+ {
+ memcpy(dst, buf, w);
+ buf += pitch;
+ dst += _screenWidth;
+ } while (--h);
+ }
+}
+
+void
+OSystem_PSP_GU::updateScreen()
+{
+ float scale;
+
+ sceGuStart(0,list);
+
+ sceGuClearColor(0xff000000);
+ sceGuClear(GU_COLOR_BUFFER_BIT);
+
+ sceGuClutMode(GU_PSM_5551, 0, 0xff, 0);
+ sceGuClutLoad(32, clut256); // upload 32*8 entries (256)
+ sceGuTexMode(GU_PSM_T8, 0, 0, 0); // 8-bit image
+ if(_screenWidth == 320)
+ sceGuTexImage(0, 512, 256, _screenWidth, _offscreen);
+ else
+ sceGuTexImage(0, 512, 512, _screenWidth, _offscreen);
+ sceGuTexFunc(GU_TFX_REPLACE, GU_TCC_RGB);
+ sceGuTexFilter(GU_LINEAR, GU_LINEAR);
+ sceGuTexOffset(0,0);
+ sceGuAmbientColor(0xffffffff);
+ sceGuColor(0xffffffff);
+
+ struct Vertex* vertices = (struct Vertex*)sceGuGetMemory(2 * sizeof(struct Vertex));
+ vertices[0].u = 0.5; vertices[0].v = 0.5;
+ vertices[1].u = _screenWidth-0.5; vertices[1].v = _screenHeight-0.5;
+ switch(_graphicMode)
+ {
+ case CENTERED_320X200:
+ vertices[0].x = (PSP_SCREEN_WIDTH-320)/2; vertices[0].y = (PSP_SCREEN_HEIGHT-200)/2; vertices[0].z = 0;
+ vertices[1].x = PSP_SCREEN_WIDTH-(PSP_SCREEN_WIDTH-320)/2; vertices[1].y = PSP_SCREEN_HEIGHT-(PSP_SCREEN_HEIGHT-200)/2; vertices[1].z = 0;
+ break;
+ case CENTERED_435X272:
+ vertices[0].x = (PSP_SCREEN_WIDTH-435)/2; vertices[0].y = 0; vertices[0].z = 0;
+ vertices[1].x = PSP_SCREEN_WIDTH-(PSP_SCREEN_WIDTH-435)/2; vertices[1].y = PSP_SCREEN_HEIGHT; vertices[1].z = 0;
+ break;
+ case STRETCHED_480X272:
+ vertices[0].x = 0; vertices[0].y = 0; vertices[0].z = 0;
+ vertices[1].x = PSP_SCREEN_WIDTH; vertices[1].y = PSP_SCREEN_HEIGHT; vertices[1].z = 0;
+ break;
+ case CENTERED_362X272:
+ vertices[0].x = (PSP_SCREEN_WIDTH-362)/2; vertices[0].y = 0; vertices[0].z = 0;
+ vertices[1].x = PSP_SCREEN_WIDTH-(PSP_SCREEN_WIDTH-362)/2; vertices[1].y = PSP_SCREEN_HEIGHT; vertices[1].z = 0;
+ break;
+ }
+
+ if (_shakePos) {
+ vertices[0].y += _shakePos;
+ vertices[1].y += _shakePos;
+ }
+
+ sceGuDrawArray(GU_SPRITES,GU_TEXTURE_32BITF|GU_VERTEX_32BITF|GU_TRANSFORM_2D,2,0,vertices);
+ if(_screenWidth==640)
+ {
+ sceGuTexImage(0, 512, 512, _screenWidth, _offscreen+512);
+ vertices[0].u = 512 + 0.5; vertices[1].v = _screenHeight - 0.5;
+ vertices[0].x += (vertices[1].x-vertices[0].x)*511/640; vertices[0].y = 0; vertices[0].z = 0;
+ sceGuDrawArray(GU_SPRITES,GU_TEXTURE_32BITF|GU_VERTEX_32BITF|GU_TRANSFORM_2D,2,0,vertices);
+ }
+
+
+ // draw overlay
+ if(_overlayVisible)
+ {
+ vertices[0].x = 0; vertices[0].y = 0; vertices[0].z = 0;
+ vertices[1].x = PSP_SCREEN_WIDTH; vertices[1].y = PSP_SCREEN_HEIGHT; vertices[1].z = 0;
+ vertices[0].u = 0.5; vertices[0].v = 0.5;
+ vertices[1].u = _screenWidth*_overlayScale-0.5; vertices[1].v = _screenHeight*_overlayScale-0.5;
+ sceGuTexMode(GU_PSM_5551, 0, 0, 0); // 16-bit image
+ sceGuAlphaFunc(GU_GREATER,0,0xff);
+ sceGuEnable(GU_ALPHA_TEST);
+ if(_overlayScale==2 || _screenWidth == 640)
+ sceGuTexImage(0, 512, 512, _screenWidth*_overlayScale, _overlayBuffer);
+ else
+ sceGuTexImage(0, 512, 256, _screenWidth*_overlayScale, _overlayBuffer);
+ sceGuTexFunc(GU_TFX_MODULATE, GU_TCC_RGBA);
+ sceGuDrawArray(GU_SPRITES,GU_TEXTURE_32BITF|GU_VERTEX_32BITF|GU_TRANSFORM_2D,2,0,vertices);
+ // need to render twice for textures > 512
+ if(_overlayScale==2 || _screenWidth == 640)
+ {
+ sceGuTexImage(0, 512, 512, _screenWidth*_overlayScale, _overlayBuffer+512);
+ vertices[0].u = 512 + 0.5; vertices[1].v = _screenHeight * _overlayScale - 0.5;
+ vertices[0].x = PSP_SCREEN_WIDTH*512/640; vertices[0].y = 0; vertices[0].z = 0;
+ sceGuDrawArray(GU_SPRITES,GU_TEXTURE_32BITF|GU_VERTEX_32BITF|GU_TRANSFORM_2D,2,0,vertices);
+ }
+
+ }
+
+ // draw mouse
+ if (_mouseVisible)
+ {
+ sceGuTexMode(GU_PSM_T8, 0, 0, 0); // 8-bit image
+ sceGuClutMode(GU_PSM_5551, 0, 0xff, 0);
+ sceGuClutLoad(32, mouseClut); // upload 32*8 entries (256)
+ sceGuAlphaFunc(GU_GREATER,0,0xff);
+ sceGuEnable(GU_ALPHA_TEST);
+ sceGuTexImage(0, MOUSE_SIZE, MOUSE_SIZE, MOUSE_SIZE, _mouseBuf);
+ sceGuTexFunc(GU_TFX_MODULATE, GU_TCC_RGBA);
+
+ vertices[0].u = 0.5; vertices[0].v = 0.5;
+ vertices[1].u = _mouseWidth-0.5; vertices[1].v = _mouseHeight-0.5;
+
+ //adjust cursor position
+ int mX = _mouseX - _mouseHotspotX;
+ int mY = _mouseY - _mouseHotspotY;
+
+ if(_overlayVisible)
+ {
+ float scalex, scaley;
+
+ scalex = (float)PSP_SCREEN_WIDTH/(_screenWidth*_overlayScale);
+ scaley = (float)PSP_SCREEN_HEIGHT/(_screenHeight*_overlayScale);
+
+ vertices[0].x = mX*scalex; vertices[0].y = mY*scaley; vertices[0].z = 0;
+ vertices[1].x = vertices[0].x+_mouseWidth*scalex; vertices[1].y = vertices[0].y + _mouseHeight*scaley; vertices[0].z = 0;
+ }
+ else
+ switch(_graphicMode)
+ {
+ case CENTERED_320X200:
+ vertices[0].x = (PSP_SCREEN_WIDTH-320)/2+mX; vertices[0].y = (PSP_SCREEN_HEIGHT-200)/2+mY; vertices[0].z = 0;
+ vertices[1].x = vertices[0].x+_mouseWidth; vertices[1].y = vertices[0].y + _mouseHeight; vertices[1].z = 0;
+ break;
+ case CENTERED_435X272:
+ {
+ scale = 435.0f/_screenWidth;
+ vertices[0].x = (PSP_SCREEN_WIDTH-435)/2 +mX*scale; vertices[0].y = mY*scale; vertices[0].z = 0;
+ vertices[1].x = vertices[0].x+_mouseWidth*scale; vertices[1].y = vertices[0].y + _mouseHeight*scale; vertices[0].z = 0;
+ }
+ break;
+ case CENTERED_362X272:
+ {
+ float scalex, scaley;
+
+ scalex = 362.0f/_screenWidth;
+ scaley = 272.0f/_screenHeight;
+
+ vertices[0].x = (PSP_SCREEN_WIDTH-362)/2 +mX*scalex; vertices[0].y = mY*scaley; vertices[0].z = 0;
+ vertices[1].x = vertices[0].x+_mouseWidth*scalex; vertices[1].y = vertices[0].y + _mouseHeight*scaley; vertices[0].z = 0;
+ }
+ break;
+ case STRETCHED_480X272:
+ {
+ float scalex, scaley;
+
+ scalex = (float)PSP_SCREEN_WIDTH/_screenWidth;
+ scaley = (float)PSP_SCREEN_HEIGHT/_screenHeight;
+
+ vertices[0].x = mX*scalex; vertices[0].y = mY*scaley; vertices[0].z = 0;
+ vertices[1].x = vertices[0].x+_mouseWidth*scalex; vertices[1].y = vertices[0].y + _mouseHeight*scaley; vertices[0].z = 0;
+ }
+ break;
+ }
+ sceGuDrawArray(GU_SPRITES,GU_TEXTURE_32BITF|GU_VERTEX_32BITF|GU_TRANSFORM_2D,2,0,vertices);
+ }
+
+ if(_keyboardVisible)
+ {
+ sceGuTexMode(GU_PSM_T8, 0, 0, 0); // 8-bit image
+ sceGuClutMode(GU_PSM_4444, 0, 0xff, 0);
+ sceGuClutLoad(32, kbClut); // upload 32*8 entries (256)
+ sceGuDisable(GU_ALPHA_TEST);
+ sceGuEnable(GU_BLEND);
+ sceGuBlendFunc(GU_ADD, GU_SRC_ALPHA, GU_ONE_MINUS_SRC_ALPHA, 0, 0);
+ switch(_keyboardMode)
+ {
+ case 0:
+ sceGuTexImage(0, 512, 512, 480, keyboard_letters);
+ break;
+ case CAPS_LOCK:
+ sceGuTexImage(0, 512, 512, 480, keyboard_letters_shift);
+ break;
+ case SYMBOLS:
+ sceGuTexImage(0, 512, 512, 480, keyboard_symbols);
+ break;
+ case (CAPS_LOCK | SYMBOLS):
+ sceGuTexImage(0, 512, 512, 480, keyboard_symbols_shift);
+ break;
+ }
+ sceGuTexFunc(GU_TFX_REPLACE, GU_TCC_RGBA);
+
+ vertices[0].u = 0.5; vertices[0].v = 0.5;
+ vertices[1].u = PSP_SCREEN_WIDTH-0.5; vertices[1].v = PSP_SCREEN_HEIGHT-0.5;
+ vertices[0].x = 0; vertices[0].y = 0; vertices[0].z = 0;
+ vertices[1].x = PSP_SCREEN_WIDTH; vertices[1].y = PSP_SCREEN_HEIGHT; vertices[0].z = 0;
+ sceGuDrawArray(GU_SPRITES,GU_TEXTURE_32BITF|GU_VERTEX_32BITF|GU_TRANSFORM_2D,2,0,vertices);
+ sceGuDisable(GU_BLEND);
+ }
+ sceKernelDcacheWritebackAll();
+
+ sceGuFinish();
+ sceGuSync(0,0);
+
+ sceDisplayWaitVblankStart();
+ sceGuSwapBuffers();
+
+ //sceKernelDcacheWritebackAll();
+}
+
+bool OSystem_PSP_GU::pollEvent(Event &event) {
+ float nub_angle = -1;
+ int x, y;
+
+ sceCtrlSetSamplingCycle(0);
+ sceCtrlSetSamplingMode(1);
+ sceCtrlReadBufferPositive(&pad, 1);
+
+ uint32 buttonsChanged = pad.Buttons ^ _prevButtons;
+
+ /* check if user exited using the Home button */
+ if (g_quit) {
+ g_quit = false; //set g_quit back to false or else pollEvent keeps looping..
+
+ warning("g_quit signal caught, sending EVENT_QUIT to VM engine");
+ event.type = OSystem::EVENT_QUIT;
+ return true;
+ }
+
+ if ((buttonsChanged & PSP_CTRL_SELECT) || (pad.Buttons & PSP_CTRL_SELECT))
+ {
+ if( !(pad.Buttons & PSP_CTRL_SELECT) )
+ _keyboardVisible = !_keyboardVisible;
+ _prevButtons = pad.Buttons;
+ return false;
+ }
+
+ if(!_keyboardVisible)
+ return OSystem_PSP::pollEvent(event);
+
+ if ( (buttonsChanged & PSP_CTRL_RTRIGGER) && !(pad.Buttons & PSP_CTRL_RTRIGGER))
+ _keyboardMode ^= CAPS_LOCK;
+
+ if ( (buttonsChanged & PSP_CTRL_LTRIGGER) && !(pad.Buttons & PSP_CTRL_LTRIGGER))
+ _keyboardMode ^= SYMBOLS;
+
+ if ( (buttonsChanged & PSP_CTRL_LEFT) && !(pad.Buttons & PSP_CTRL_LEFT))
+ {
+ event.kbd.flags = 0;
+ event.kbd.ascii = 0;
+ event.kbd.keycode = SDLK_LEFT;
+ _prevButtons = pad.Buttons;
+ return true;
+ }
+
+ if ( (buttonsChanged & PSP_CTRL_RIGHT) && !(pad.Buttons & PSP_CTRL_RIGHT))
+ {
+ event.kbd.flags = 0;
+ event.kbd.ascii = 0;
+ event.kbd.keycode = SDLK_RIGHT;
+ _prevButtons = pad.Buttons;
+ return true;
+ }
+
+ if ( (buttonsChanged & PSP_CTRL_UP) && !(pad.Buttons & PSP_CTRL_UP))
+ {
+ event.kbd.flags = 0;
+ event.kbd.ascii = 0;
+ event.kbd.keycode = SDLK_UP;
+ _prevButtons = pad.Buttons;
+ return true;
+ }
+
+ if ( (buttonsChanged & PSP_CTRL_DOWN) && !(pad.Buttons & PSP_CTRL_DOWN))
+ {
+ event.kbd.flags = 0;
+ event.kbd.ascii = 0;
+ event.kbd.keycode = SDLK_DOWN;
+ _prevButtons = pad.Buttons;
+ return true;
+ }
+
+ // compute nub direction
+ //
+ x = pad.Lx-128;
+ y = pad.Ly-128;
+ _kbdClut[_keySelected] = 0xf888;
+ if(x*x + y*y > 10000)
+ {
+ nub_angle = atan2(y, x);
+ _keySelected = (int)(1+(M_PI+nub_angle)*30/(2*M_PI));
+ _keySelected -= 2;
+ if(_keySelected < 1)
+ _keySelected += 30;
+ _kbdClut[_keySelected] = 0xffff;
+
+ if (buttonsChanged & PSP_CTRL_CROSS)
+ {
+ event.type = (pad.Buttons & PSP_CTRL_CROSS) ? OSystem::EVENT_KEYDOWN : OSystem::EVENT_KEYUP;
+ if(_keySelected >26)
+ {
+ event.kbd.flags = 0;
+ switch(_keySelected)
+ {
+ case 27:
+ event.kbd.ascii = ' ';
+ event.kbd.keycode = SDLK_SPACE;
+ break;
+ case 28:
+ event.kbd.ascii = 127;
+ event.kbd.keycode = SDLK_DELETE;
+ break;
+ case 29:
+ event.kbd.ascii = 8;
+ event.kbd.keycode = SDLK_BACKSPACE;
+ break;
+ case 30:
+ event.kbd.ascii = 13;
+ event.kbd.keycode = SDLK_RETURN;
+ break;
+ }
+ }
+ else
+ {
+ switch( _keyboardMode)
+ {
+ case 0:
+ event.kbd.flags = 0;
+ event.kbd.ascii = 'a'+_keySelected-1;
+ event.kbd.keycode = SDLK_a + _keySelected-1;
+ break;
+ case CAPS_LOCK:
+ event.kbd.ascii = 'A'+_keySelected-1;
+ event.kbd.keycode = SDLK_a + _keySelected-1;
+ event.kbd.flags = KBD_SHIFT;
+ break;
+ case SYMBOLS:
+ if(_keySelected < 21)
+ {
+ event.kbd.flags = 0;
+ event.kbd.ascii = kbd_ascii[_keySelected-1];
+ event.kbd.keycode = kbd_code[ _keySelected-1];
+ }
+ break;
+ case (SYMBOLS|CAPS_LOCK):
+ if(_keySelected < 21)
+ {
+ event.kbd.flags = 0;
+ event.kbd.ascii = kbd_ascii_cl[_keySelected-1];
+ event.kbd.keycode = kbd_code_cl[ _keySelected-1];
+ }
+ break;
+ }
+ }
+ _prevButtons = pad.Buttons;
+ return true;
+ }
+ }
+
+ _prevButtons = pad.Buttons;
+ return false;
+}
+
+OSystem *OSystem_PSP_create() {
+ return new OSystem_PSP_GU();
+}
+
diff --git a/backends/psp/osys_psp_gu.h b/backends/psp/osys_psp_gu.h
new file mode 100644
index 0000000000..2fd48055ef
--- /dev/null
+++ b/backends/psp/osys_psp_gu.h
@@ -0,0 +1,62 @@
+/* ScummVM - Scumm Interpreter
+ * Copyright (C) 2005 The ScummVM project
+ * Copyright (C) 2005 Joost Peters PSP Backend
+ * Copyright (C) 2005 Thomas Mayer PSP Backend
+ * Copyright (C) 2005 Paolo Costabel PSP Backend
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ *
+ */
+
+#include <pspgu.h>
+#include "common/stdafx.h"
+#include "common/scummsys.h"
+
+#include "common/rect.h"
+#include "osys_psp.h"
+
+#define min(a,b) (a > b ? b : a)
+
+class OSystem_PSP_GU : public OSystem_PSP
+{
+public:
+ struct Vertex
+ {
+ float u,v;
+ float x,y,z;
+ };
+
+ OSystem_PSP_GU();
+ ~OSystem_PSP_GU();
+ void updateScreen();
+ void initSize(uint width, uint height, int overlayScale);
+ int getDefaultGraphicsMode() const;
+ bool setGraphicsMode(int mode);
+ bool setGraphicsMode(const char *name);
+ int getGraphicsMode() const;
+ void setMouseCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY, byte keycolor, int cursorTargetScale);
+ void copyRectToScreen(const byte *buf, int pitch, int x, int y, int w, int h) ;
+ void setPalette(const byte *colors, uint start, uint num);
+ bool pollEvent(Event &event);
+ int _graphicMode;
+ struct Vertex *_vertices;
+ unsigned short* _clut;
+ unsigned short* _kbdClut;
+ bool _keyboardVisible;
+ int _keySelected;
+ int _keyboardMode;
+};
+
diff --git a/backends/psp/portdefs.h b/backends/psp/portdefs.h
new file mode 100644
index 0000000000..99fec22746
--- /dev/null
+++ b/backends/psp/portdefs.h
@@ -0,0 +1,61 @@
+/* ScummVM - Scumm Interpreter
+ * Copyright (C) 2005 The ScummVM project
+ * Copyright (C) 2005 Joost Peters PSP Backend
+ * Copyright (C) 2005 Thomas Mayer PSP Backend
+ * Copyright (C) 2005 Paolo Costabel PSP Backend
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * $Header$
+ *
+ */
+
+#ifndef PORTDEFS_H
+#define PORTDEFS_H
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <stdarg.h>
+#include <malloc.h>
+#include <math.h>
+#include <time.h>
+#include <ctype.h>
+#include <assert.h>
+
+#include <pspkernel.h>
+#include <pspdebug.h>
+#include <pspdisplay.h>
+#include <pspctrl.h>
+
+#include "trace.h"
+
+#define SCUMMVM_SAVEPATH "ms0:/scummvm_savegames"
+
+#define BREAKPOINT asm("break\n")
+
+
+//#define printf pspDebugScreenPrintf
+#define exit(x) printf("exit() called\n"); sceKernelSleepThread();
+
+#undef main
+
+#ifndef REAL_MAIN
+#define main scummvm_main
+#endif
+
+#endif /* PORTDEFS_H */
+
+
diff --git a/backends/psp/psp_fs.cpp b/backends/psp/psp_fs.cpp
new file mode 100644
index 0000000000..d69e66a37d
--- /dev/null
+++ b/backends/psp/psp_fs.cpp
@@ -0,0 +1,162 @@
+/* ScummVM - Scumm Interpreter
+ * Copyright (C) 2005 The ScummVM project
+ * Copyright (C) 2005 Joost Peters PSP Backend
+ * Copyright (C) 2005 Thomas Mayer PSP Backend
+ * Copyright (C) 2005 Paolo Costabel PSP Backend
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * $Header$
+ */
+
+#ifdef __PSP__
+#include "base/engine.h"
+
+#include "backends/fs/fs.h"
+#include <stdio.h>
+#include <stdlib.h>
+
+/*
+ * Implementation of the ScummVM file system API based on PSPSDK API.
+ */
+
+class PSPFilesystemNode : public AbstractFilesystemNode {
+protected:
+ String _displayName;
+ bool _isDirectory;
+ bool _isValid;
+ bool _isPseudoRoot;
+ String _path;
+
+public:
+ PSPFilesystemNode();
+ PSPFilesystemNode(const String &path);
+ PSPFilesystemNode(const PSPFilesystemNode *node);
+
+ virtual String displayName() const { return _displayName; }
+ virtual bool isValid() const { return _isValid; }
+ virtual bool isDirectory() const { return _isDirectory; }
+ virtual String path() const { return _path; }
+
+ virtual FSList listDir(ListMode) const;
+ virtual AbstractFilesystemNode *parent() const;
+};
+
+AbstractFilesystemNode *FilesystemNode::getRoot() {
+ return new PSPFilesystemNode();
+}
+
+PSPFilesystemNode::PSPFilesystemNode() {
+ _isDirectory = true;
+ _displayName = "Root";
+ _isValid = true;
+ _path = "ms0:/";
+ _isPseudoRoot = true;
+}
+
+PSPFilesystemNode::PSPFilesystemNode(const Common::String &p)
+{
+ _displayName = p;
+ _isValid = true;
+ _isDirectory = true;
+ _path = p;
+}
+
+
+PSPFilesystemNode::PSPFilesystemNode(const PSPFilesystemNode *node) {
+ _displayName = node->_displayName;
+ _isDirectory = node->_isDirectory;
+ _isValid = node->_isValid;
+ _isPseudoRoot = node->_isPseudoRoot;
+ _path = node->_path;
+}
+
+AbstractFilesystemNode *FilesystemNode::getNodeForPath(const String &path)
+{
+ return new PSPFilesystemNode(path);
+}
+
+
+FSList PSPFilesystemNode::listDir(ListMode mode) const {
+ assert(_isDirectory);
+
+ int dfd;
+ FSList myList;
+
+ dfd = sceIoDopen(_path.c_str());
+ if (dfd > 0) {
+ SceIoDirent dir;
+ memset(&dir, 0, sizeof(dir));
+
+ while (sceIoDread(dfd, &dir) > 0) {
+ // Skip 'invisible files
+ if (dir.d_name[0] == '.')
+ continue;
+
+ PSPFilesystemNode entry;
+
+ entry._isValid = true;
+ entry._isPseudoRoot = false;
+ entry._displayName = dir.d_name;
+ entry._path = _path;
+ entry._path += dir.d_name;
+ entry._isDirectory = dir.d_stat.st_attr & FIO_SO_IFDIR;
+ if (entry._isDirectory)
+ entry._path += "/";
+
+ // Honor the chosen mode
+ if ((mode == kListFilesOnly && entry._isDirectory) ||
+ (mode == kListDirectoriesOnly && !entry._isDirectory))
+ continue;
+
+ myList.push_back(wrap(new PSPFilesystemNode(&entry)));
+ }
+ sceIoDclose(dfd);
+ }
+
+ return myList;
+}
+
+const char *lastPathComponent(const Common::String &str) {
+ const char *start = str.c_str();
+ const char *cur = start + str.size() - 2;
+
+ while (cur > start && *cur != '/') {
+ --cur;
+ }
+
+ return cur + 1;
+}
+
+AbstractFilesystemNode *PSPFilesystemNode::parent() const {
+ assert(_isValid || _isPseudoRoot);
+ if (_isPseudoRoot)
+ return 0;
+ PSPFilesystemNode *p = new PSPFilesystemNode();
+ if (_path.size() > 5) {
+ const char *start = _path.c_str();
+ const char *end = lastPathComponent(_path);
+
+ p = new PSPFilesystemNode();
+ p->_path = String(start, end - start);
+ p->_isValid = true;
+ p->_isDirectory = true;
+ p->_displayName = lastPathComponent(p->_path);
+ p->_isPseudoRoot = false;
+ }
+ return p;
+}
+
+#endif // PSP
diff --git a/backends/psp/psp_main.cpp b/backends/psp/psp_main.cpp
new file mode 100644
index 0000000000..0a4b8fa05d
--- /dev/null
+++ b/backends/psp/psp_main.cpp
@@ -0,0 +1,129 @@
+/* ScummVM - Scumm Interpreter
+ * Copyright (C) 2005 The ScummVM project
+ * Copyright (C) 2005 Joost Peters PSP Backend
+ * Copyright (C) 2005 Thomas Mayer PSP Backend
+ * Copyright (C) 2005 Paolo Costabel PSP Backend
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * $Header$
+ *
+ */
+
+#include <pspkernel.h>
+#include <pspdebug.h>
+#include <stdlib.h>
+#include <string.h>
+
+#define REAL_MAIN
+#include <common/stdafx.h>
+#include <common/scummsys.h>
+#include <base/engine.h>
+#include <base/gameDetector.h>
+#include <base/plugins.h>
+
+#include <pspgu.h>
+#include "./trace.h"
+
+PSP_MODULE_INFO("SCUMMVM-PSP", 0x1000, 1, 1);
+
+/* Define the main thread's attribute value (optional) */
+PSP_MAIN_THREAD_ATTR(/*THREAD_ATTR_USER | THREAD_ATTR_VFPU*/ 0);
+
+/* global quit flag, this is used to let the VM engine shutdown properly */
+bool g_quit = false;
+
+void MyExceptionHandler(PspDebugRegBlock *regs) {
+ /* Do normal initial dump, setup screen etc */
+
+ pspDebugScreenInit();
+
+ pspDebugScreenSetBackColor(0x00FF0000);
+ pspDebugScreenSetTextColor(0xFFFFFFFF);
+ pspDebugScreenClear();
+
+ pspDebugScreenPrintf("Exception Details:\n");
+ pspDebugDumpException(regs);
+
+ while (1) ;
+}
+
+
+/* Exit callback */
+SceKernelCallbackFunction exit_callback(int /*arg1*/, int /*arg2*/, void * /*common*/) {
+ g_quit = true; //Set g_quit so our backend can shutdown the VM
+ sceKernelDelayThread(1000);
+ return 0;
+}
+
+/* Callback thread */
+int CallbackThread(SceSize /*size*/, void *arg) {
+ int cbid;
+
+ cbid = sceKernelCreateCallback("Exit Callback", (SceKernelCallbackFunction)exit_callback, NULL);
+ sceKernelRegisterExitCallback(cbid);
+
+ sceKernelSleepThreadCB();
+ return 0;
+}
+
+/* Sets up the callback thread and returns its thread id */
+int SetupCallbacks(void)
+{
+ int thid = 0;
+
+ thid = sceKernelCreateThread("update_thread", CallbackThread, 0x11, 0xFA0, THREAD_ATTR_USER, 0);
+ if(thid >= 0)
+ {
+ sceKernelStartThread(thid, 0, 0);
+ }
+
+ return thid;
+}
+
+
+extern "C" int scummvm_main(int argc, char *argv[]);
+
+int main(void)
+{
+ //PSPDebugTrace("Init debug screen\n");
+ pspDebugScreenInit();
+
+ //PSPDebugTrace("Setup callbacks\n");
+ SetupCallbacks();
+
+ //install exception handler
+ pspDebugInstallErrorHandler(MyExceptionHandler);
+
+ //check if the save directory exists
+ SceUID fd = sceIoDopen(SCUMMVM_SAVEPATH);
+ if (fd < 0) {
+ //No? then let's create it.
+ sceIoMkdir(SCUMMVM_SAVEPATH, 0777);
+ } else {
+ //it exists, so close it again.
+ sceIoDclose(fd);
+ }
+
+ static char *argv[] = { "scummvm", "--force-1x-overlay", NULL };
+ static int argc = sizeof(argv)/sizeof(char *)-1;
+
+ scummvm_main(argc, argv);
+
+ sceKernelSleepThread();
+
+ return 0;
+}
+
diff --git a/backends/psp/trace.cpp b/backends/psp/trace.cpp
new file mode 100644
index 0000000000..fb737df13f
--- /dev/null
+++ b/backends/psp/trace.cpp
@@ -0,0 +1,74 @@
+/* ScummVM - Scumm Interpreter
+ * Copyright (C) 2005 The ScummVM project
+ * Copyright (C) 2005 Joost Peters PSP Backend
+ * Copyright (C) 2005 Thomas Mayer PSP Backend
+ * Copyright (C) 2005 Paolo Costabel PSP Backend
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * $Header$
+ *
+ */
+
+
+#include "./trace.h"
+
+
+//#define __DEBUG__
+
+void PSPDebugTrace (const char *format, ...) {
+#ifdef __DEBUG__
+ va_list opt;
+ char buff[2048];
+ int bufsz, fd;
+
+ va_start(opt, format);
+ bufsz = vsnprintf( buff, (size_t) sizeof(buff), format, opt);
+ va_end(opt);
+
+ fd = sceIoOpen("MS0:/DTRACE.TXT", PSP_O_RDWR | PSP_O_CREAT | PSP_O_APPEND, 0777);
+
+ if(fd <= 0)
+ {
+ return;
+ }
+
+ sceIoWrite(fd, (const void*)buff, bufsz);
+ sceIoClose(fd);
+#endif
+}
+
+void PSPDebugTrace (const char * filename, const char *format, ...) {
+#ifdef __DEBUG__
+ va_list opt;
+ char buff[2048];
+ int bufsz, fd;
+
+ va_start(opt, format);
+ bufsz = vsnprintf( buff, (size_t) sizeof(buff), format, opt);
+ va_end(opt);
+
+ fd = sceIoOpen(filename, PSP_O_RDWR | PSP_O_CREAT | PSP_O_APPEND, 0777);
+
+ if(fd <= 0)
+ {
+ return;
+ }
+
+ sceIoWrite(fd, (const void*)buff, bufsz);
+ sceIoClose(fd);
+#endif
+}
+
diff --git a/backends/psp/trace.h b/backends/psp/trace.h
new file mode 100644
index 0000000000..5482699e3b
--- /dev/null
+++ b/backends/psp/trace.h
@@ -0,0 +1,39 @@
+/* ScummVM - Scumm Interpreter
+ * Copyright (C) 2005 The ScummVM project
+ * Copyright (C) 2005 Joost Peters PSP Backend
+ * Copyright (C) 2005 Thomas Mayer PSP Backend
+ * Copyright (C) 2005 Paolo Costabel PSP Backend
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * $Header$
+ *
+ */
+
+
+#ifndef TRACE_H
+#define TRACE_H
+
+#include <stdio.h>
+#include <psptypes.h>
+#include <pspkernel.h>
+#include <stdarg.h>
+#include <pspdebug.h>
+
+void PSPDebugTrace (const char *filename, const char *format, ...);
+void PSPDebugTrace (const char *format, ...);
+
+#endif // TRACE_H
+
diff --git a/base/main.cpp b/base/main.cpp
index 47e70194fd..f3d04a325c 100644
--- a/base/main.cpp
+++ b/base/main.cpp
@@ -320,7 +320,7 @@ static int runGame(GameDetector &detector, OSystem &system) {
#ifdef _WIN32_WCE
extern "C" int scummvm_main(GameDetector &detector, int argc, char *argv[]) {
-#elif defined(__PLAYSTATION2__)
+#elif defined(__PLAYSTATION2__) || defined(__PSP__)
extern "C" int scummvm_main(int argc, char *argv[]) {
#else
extern "C" int main(int argc, char *argv[]) {
diff --git a/common/config-manager.cpp b/common/config-manager.cpp
index ae152bc825..49bc3f062c 100644
--- a/common/config-manager.cpp
+++ b/common/config-manager.cpp
@@ -93,6 +93,8 @@ void ConfigManager::loadDefaultConfigFile() {
strcpy(configFile,"/PALM/Programs/ScummVM/" DEFAULT_CONFIG_FILE);
#elif defined(__PLAYSTATION2__)
strcpy(configFile, "mc0:ScummVM/" DEFAULT_CONFIG_FILE);
+ #elif defined(__PSP__)
+ strcpy(configFile, "ms0:/" DEFAULT_CONFIG_FILE);
#elif defined (__SYMBIAN32__)
strcpy(configFile, SYMBIAN32_DOC_DIR DEFAULT_CONFIG_FILE);
#else
diff --git a/common/savefile.cpp b/common/savefile.cpp
index 3f332af9d3..b3f888dfe7 100644
--- a/common/savefile.cpp
+++ b/common/savefile.cpp
@@ -35,7 +35,7 @@ namespace Common {
const char *SaveFileManager::getSavePath() const {
-#if defined(__PALM_OS__)
+#if defined(__PALM_OS__) || defined(__PSP__)
return SCUMMVM_SAVEPATH;
#else
diff --git a/common/scummsys.h b/common/scummsys.h
index b2952dd72c..ee569439aa 100644
--- a/common/scummsys.h
+++ b/common/scummsys.h
@@ -279,6 +279,25 @@
#define fsize(a) ps2_fsize(a)
extern void ps2_disableHandleCaching(void);
+#elif defined (__PSP__)
+ #define SCUMM_NEED_ALIGNMENT
+ #define SCUMM_LITTLE_ENDIAN
+
+ #define scumm_stricmp strcasecmp
+ #define scumm_strnicmp strncasecmp
+
+ typedef unsigned char byte;
+ typedef unsigned char uint8;
+ typedef unsigned short uint16;
+ typedef unsigned int uint32;
+ typedef unsigned int uint;
+ typedef unsigned long uint64;
+ typedef signed char int8;
+ typedef signed short int16;
+ typedef signed int int32;
+
+ #define START_PACK_STRUCTS pack (push, 1)
+ #define END_PACK_STRUCTS pack(pop)
#elif defined (__amigaos4__)
#include <exec/types.h>
diff --git a/common/stdafx.h b/common/stdafx.h
index ac582a1206..2e15d84c33 100644
--- a/common/stdafx.h
+++ b/common/stdafx.h
@@ -115,7 +115,7 @@
#endif
#if !defined(macintosh)
#include <sys/types.h>
-#if !defined(__PLAYSTATION2__) && !defined(__amigaos4__)
+#if !defined(__PLAYSTATION2__) && !defined(__PSP__) && !defined(__amigaos4__)
#include <sys/uio.h>
#endif
#if !defined(__amigaos4__)
diff --git a/common/system.cpp b/common/system.cpp
index 0336a135a6..c2bf42ebbe 100644
--- a/common/system.cpp
+++ b/common/system.cpp
@@ -56,6 +56,8 @@ OSystem *OSystem::makeInstance() {
return OSystem_PALMOS_create();
#elif defined(__PLAYSTATION2__)
return OSystem_PS2_create();
+#elif defined(__PSP__)
+ return OSystem_PSP_create();
#elif defined(__SYMBIAN32__) // SumthinWicked / Sprawl
return OSystem_SymbianOS_create();
#else
diff --git a/queen/journal.cpp b/queen/journal.cpp
index 3fc1e63860..6074bb1c05 100644
--- a/queen/journal.cpp
+++ b/queen/journal.cpp
@@ -86,6 +86,7 @@ void Journal::use() {
}
}
_system->delayMillis(20);
+ _system->updateScreen();
}
_vm->writeOptionSettings();
diff --git a/simon/debug.cpp b/simon/debug.cpp
index 4359d6c72a..1cd466eddc 100644
--- a/simon/debug.cpp
+++ b/simon/debug.cpp
@@ -353,7 +353,7 @@ static void dump_bitmap(const char *filename, const byte *offs, int w, int h, in
void SimonEngine::dump_single_bitmap(int file, int image, const byte *offs, int w, int h, byte base) {
char buf[40];
-#if !defined(__PALM_OS__) && !defined(__DC__)
+#if !defined(__PALM_OS__) && !defined(__DC__) && !defined(__PSP__)
struct stat statbuf;
#endif
@@ -363,7 +363,7 @@ void SimonEngine::dump_single_bitmap(int file, int image, const byte *offs, int
sprintf(buf, "dumps/File%d_Image%d.bmp", file, image);
#endif
-#if !defined(__PALM_OS__) && !defined(__DC__)
+#if !defined(__PALM_OS__) && !defined(__DC__) && !defined(__PSP__)
if (stat(buf, &statbuf) == 0)
return;
#endif