aboutsummaryrefslogtreecommitdiff
path: root/backends/platform/ps2/systemps2.cpp
diff options
context:
space:
mode:
authorTravis Howell2009-07-12 23:54:46 +0000
committerTravis Howell2009-07-12 23:54:46 +0000
commit7d1badc5d53c4540cfa82f361f92a151a0f2c078 (patch)
tree4d84a4de922d68b1b1fdb1459db0d6b16a46155b /backends/platform/ps2/systemps2.cpp
parent6e45d0c4aee7d129d6f68013c3f09e8a7087f552 (diff)
parent3427fb3100c84af0d63c8f8136615489fe0c7d47 (diff)
downloadscummvm-rg350-7d1badc5d53c4540cfa82f361f92a151a0f2c078.tar.gz
scummvm-rg350-7d1badc5d53c4540cfa82f361f92a151a0f2c078.tar.bz2
scummvm-rg350-7d1badc5d53c4540cfa82f361f92a151a0f2c078.zip
Merged revisions 42398,42402-42406,42418-42421,42423,42428-42430 via svnmerge from
https://scummvm.svn.sourceforge.net/svnroot/scummvm/scummvm/trunk ........ r42398 | thebluegr | 2009-07-12 09:45:54 +1000 (Sun, 12 Jul 2009) | 1 line Moved the kernel and the vocabulary outside of the engine state (they're static data, which never changes during a game) ........ r42402 | sunmax | 2009-07-12 15:34:46 +1000 (Sun, 12 Jul 2009) | 8 lines Added a temporary work-around for PS2 backend in common/array.h cause its vintage compiler does not support "new T[newCapacity]()" but only "new T[newCapacity]", this will let it compile through. It's ifdef'd as __PLAYSTATION2__, so it won't make a difference for other backends with more modern tools. ........ r42403 | sunmax | 2009-07-12 15:35:56 +1000 (Sun, 12 Jul 2009) | 5 lines I am re-commiting the FORCE_RTL as a temporary solution in trunk, so that trunk/1.0rc is au pair feature-wise with 0.13.x. ........ r42404 | sunmax | 2009-07-12 15:38:08 +1000 (Sun, 12 Jul 2009) | 24 lines ScummVM/PS2 bugs fixed by this commit: - general file write corruption (eg. ScummVM.ini, etc.) - COMI specific save crash / corruption (added option in engines/scumm/saveload.cpp to disable thumbnails on PS2, as emergency fallback in case the fix should prove to be insufficient) - implemented _screenChange logic (fixes grabOverlay & COMI popup menu) - fixed higher pitch (chipmunk fx) - made NET IRXs optional to allow it to work on fat PS2 without net+hd - fixed cursor restore on RTL - added "." as R2 to skip single lines of dialog - added write cache ........ r42405 | dreammaster | 2009-07-12 17:23:50 +1000 (Sun, 12 Jul 2009) | 1 line Added support for sub-relation message types - this fixes trying to attach the chain to the hook on the deck ........ r42406 | lordhoto | 2009-07-12 18:51:57 +1000 (Sun, 12 Jul 2009) | 1 line Add missing quotation mark to error message. ........ r42418 | lordhoto | 2009-07-13 00:29:59 +1000 (Mon, 13 Jul 2009) | 1 line Fix typo, which in fact fixes bug #2820353 "GUI: Search doesn't handle uppercase properly". ........ r42419 | knakos | 2009-07-13 01:59:27 +1000 (Mon, 13 Jul 2009) | 1 line Apply patch 2802544: WINCE: Implement OSystem::engineInit to remove hack ........ r42420 | knakos | 2009-07-13 01:59:56 +1000 (Mon, 13 Jul 2009) | 1 line fix build with arm-asm routines ........ r42421 | knakos | 2009-07-13 02:40:10 +1000 (Mon, 13 Jul 2009) | 1 line oops, fix props ........ r42423 | sev | 2009-07-13 04:52:38 +1000 (Mon, 13 Jul 2009) | 2 lines Patch #1936137: "Speech for Mac BS1 english" ........ r42428 | sunmax | 2009-07-13 07:58:00 +1000 (Mon, 13 Jul 2009) | 6 lines Split _eof vs. _err. Latter defaults to false for now, there are hooks for possible future implementation. ........ r42429 | sunmax | 2009-07-13 08:00:47 +1000 (Mon, 13 Jul 2009) | 4 lines On PS2 use "fprintf" (as in 0.13.x ) to print error messages to stderr, rather than "fputs", which is buggy in the PS2 implementation. ........ r42430 | wjpalenstijn | 2009-07-13 08:08:10 +1000 (Mon, 13 Jul 2009) | 1 line Remove double endline ........ svn-id: r42432
Diffstat (limited to 'backends/platform/ps2/systemps2.cpp')
-rw-r--r--backends/platform/ps2/systemps2.cpp44
1 files changed, 37 insertions, 7 deletions
diff --git a/backends/platform/ps2/systemps2.cpp b/backends/platform/ps2/systemps2.cpp
index f29caf2279..57a03f777d 100644
--- a/backends/platform/ps2/systemps2.cpp
+++ b/backends/platform/ps2/systemps2.cpp
@@ -66,6 +66,10 @@
#include "icon.h"
#include "ps2temp.h"
+#ifdef __PS2_DEBUG__
+#include <debug.h>
+#endif
+
// asm("mfc0 %0, $9\n" : "=r"(tickStart));
extern void *_gp;
@@ -95,6 +99,11 @@ PS2Device detectBootPath(const char *elfPath, char *bootPath);
extern AsyncFio fio;
+#ifdef __PS2_DEBUG__
+extern "C" int gdb_stub_main(int argc, char *argv[]);
+extern "C" void breakpoint(void);
+#endif
+
extern "C" int scummvm_main(int argc, char *argv[]);
extern "C" int main(int argc, char *argv[]) {
@@ -117,6 +126,10 @@ extern "C" int main(int argc, char *argv[]) {
sioprintf("Result = %d\n", res);
}
+#ifdef __PS2_DEBUG__
+ gdb_stub_main(argc, argv);
+#endif
+
sioprintf("Creating system\n");
g_system = g_systemPs2 = new OSystem_PS2(argv[0]);
@@ -241,6 +254,8 @@ OSystem_PS2::OSystem_PS2(const char *elfPath) {
_printY = 0;
_msgClearTime = 0;
_systemQuit = false;
+ _modeChanged = false;
+ _screenChangeCount = 0;
_screen = new Gs2dScreen(320, 200, TV_DONT_CARE);
@@ -327,9 +342,8 @@ OSystem_PS2::OSystem_PS2(const char *elfPath) {
void OSystem_PS2::init(void) {
sioprintf("Timer...\n");
_scummTimerManager = new DefaultTimerManager();
- _scummEventManager = new DefaultEventManager();
_scummMixer = new Audio::MixerImpl(this);
- _scummMixer->setOutputRate(44100);
+ _scummMixer->setOutputRate(48000);
_scummMixer->setReady(true);
initTimer();
@@ -520,6 +534,9 @@ void OSystem_PS2::initSize(uint width, uint height) {
_oldMouseX = width / 2;
_oldMouseY = height / 2;
+
+ _modeChanged = true;
+ _screenChangeCount++;
printf("done\n");
}
@@ -574,11 +591,11 @@ void OSystem_PS2::delayMillis(uint msecs) {
Common::TimerManager *OSystem_PS2::getTimerManager() {
return _scummTimerManager;
}
-
+/*
Common::EventManager *OSystem_PS2::getEventManager() {
- return _scummEventManager;
+ return getEventManager();
}
-
+*/
Audio::Mixer *OSystem_PS2::getMixer() {
return _scummMixer;
}
@@ -661,7 +678,7 @@ int16 OSystem_PS2::getOverlayHeight(void) {
return _screen->getOverlayHeight();
}
-Graphics::Surface *OSystem_PS2::lockScreen() {
+Graphics::Surface *OSystem_PS2::lockScreen(void) {
return _screen->lockScreen();
}
@@ -669,6 +686,10 @@ void OSystem_PS2::unlockScreen(void) {
_screen->unlockScreen();
}
+void OSystem_PS2::fillScreen(uint32 col) {
+ _screen->fillScreen(col);
+}
+
const OSystem::GraphicsMode OSystem_PS2::_graphicsMode = { NULL, NULL, 0 };
const OSystem::GraphicsMode *OSystem_PS2::getSupportedGraphicsModes(void) const {
@@ -688,7 +709,16 @@ int OSystem_PS2::getDefaultGraphicsMode(void) const {
}
bool OSystem_PS2::pollEvent(Common::Event &event) {
- bool res = _input->pollEvent(&event);
+ bool res;
+
+ if (_modeChanged) {
+ _modeChanged = false;
+ event.type = Common::EVENT_SCREEN_CHANGED;
+ return true;
+ }
+
+ res = _input->pollEvent(&event);
+
if (res && (event.type == Common::EVENT_MOUSEMOVE))
_screen->setMouseXy(event.mouse.x, event.mouse.y);
return res;