Opened 15 years ago

Closed 15 years ago

#4471 closed defect (fixed)

CRUISE: input not working on slow machines

Reported by: SF/harrypoppins Owned by: dreammaster
Priority: normal Component: Engine: Cruise
Version: Keywords:
Cc: Game: Cruise for a Corpse


Hy everybody. I've a problem with Cruise For a Corpse. french 256 clr version. I use the ppc Osx version of Svn n° r42679 (24/07/09).

At the start of the game when "Delphine Software cinématique" appears (very, veryyyyyy lowlyyyy) the game crash at the begin of the protection codes. My computer turn totally crazy. There is zero command who works, impossible to quit scummvm. Bye.

Ticket imported from: #2826967. Ticket imported from: bugs/4471.

Change History (21)

comment:1 by joostp, 15 years ago

Component: Engine: Cruise
Game: Cruise for a Corpse
Owner: set to joostp

comment:2 by joostp, 15 years ago

I just fixed a few unaligned writes in this engine, which may or may not fix this issue. Someone on OSX please test.

comment:3 by SF/harrypoppins, 15 years ago

Thanks, i've try just know.

The presentation ( and also the game) work but only in Fullscreen mode. If it's in normal mode is the same prob as my original report.

Have a good week-end. ;-)

comment:4 by SF/harrypoppins, 15 years ago

Sorry for my precedent com.

I've retry in fullscreen mode and my computer also freeze, i've to turn off my computer manualy for quit.

comment:5 by joostp, 15 years ago

Should be fixed/worked-around for real now, could you please try again?

comment:6 by SF/harrypoppins, 15 years ago

I've try one more time. I'm sorry the game still don't work, there is no aec mouse cursor or any command who works.

Thanks & good luck ^^

comment:7 by joostp, 15 years ago

In that case I have no idea.

It works for other people on OSX (PPC) now after this fix, and for me on OSX Intel and Linux PPC. Maybe your French version is the culprit? Does it work with the Windows version of ScummVM?

comment:8 by joostp, 15 years ago

Also, are you sure you're using latest SVN?

comment:9 by SF/harrypoppins, 15 years ago

Yes i'm sure, i download the today version (to my 2nd and 3th comm it was also the recently SVN), i actually use svn42856 (28/07/2009).

There is one thing, a have forget to say (sorry) : at the begin when cruise fac has been annoced on the site. The start worked normally, but the game was very bugged (text not appears etc...). Perhaps, if you find an older version of Svn (it's one the firsts who had supported Cruise) the can be resolved. i will try my game on a window this week-end, so i'd think it's corrupted it has already work on an older Svn. However i'll try it. ^^ Bye

Ps: Sorry for the English, i'm very awfull

comment:10 by fingolfin, 15 years ago

Summary: Cruise for a corpse - start crashCRUISE: crashes during startup

comment:11 by SF/harrypoppins, 15 years ago

I'm very busy still two weeks, sorry. I've just try this one on a windows and it's work (so, there's no bug with my game). I've try it today whith the svn of 6th August and the prob is still here, the cursor is very lw (when it work) and the protection code too.

I serach after some other user of mac PPC for try the french version 256 cl of cruise for a corpse.


comment:12 by criezy, 15 years ago

I too have the french version of Cruise for a Corpse and I happen to have an old PPC laptop lying around. I used v1.0.0-pre rev42975 (nightly from august 8) for the tests on an intel iMac and a PPC iBook.

Both the Intel and PPC (with Roseta) builds of ScummVM works fine on the intel iMac. But I see similar issues as harrypoppins on the PPC iBook: 1) The "Delphine Software cinématique" appears very slowly (1min 28s to see it completely and a further 1 minute to get to the protection screen. Although this might be because my laptop is quite old (300 MHz G3 CPU).

2) When on the screen with the example on how to use the code wheel, the mouse cursor starts to spin and I have to force quit ScummVM (if I am in fullscreen I cannot do anything but force a reboot, however in window mode I can click outside the window and then do the force quit). I waited about 20 minutes on that screen to make sure it was not my laptop being very slow again.

comment:13 by joostp, 15 years ago

Unfortunately I cannot reproduce this on any of my machines.

It's a long shot, but could you try change bFastMode to 'true' in engines/cruise/cruise_main.cpp line 1624, and see if it makes a difference?

comment:14 by criezy, 15 years ago

I made a few more tests. The first thing I notice is that from the moment I start the game, it takes 100% of my CPU. I tried another graphic mode (normal mode with no scaling instead of 2X) and the "Delphine Software cinématique" appears a bit faster. The CPU is still used at 100% however, even if I do nothing. And while the protection code screen does not freeze ScummVM the mouse cursor there moves very slowly (about one move every 2 or 3 seconds). And the game is playable (just barely).

The problem is not limited to the protection screen. If I use a save game with the 2X scaler the game is freezed.

I just saw your comment. I will try that and report back. It might take a few days though as I will have to either install the developer tools on my PPC mac or learn how to cross-compile.

comment:15 by joostp, 15 years ago

Thanks, that'd be very valuable.

I had the chance to try the French version on a PPC Mac (G4 867mhz) and the game seemingly ran fine.

So this is sounding more and more like an input processing problem that rears its head under heavy load. If I run the game in valgrind on my Linux machine (2,66ghz Core 2 Duo) then the game also doesn't respond to input, I can work around it by using the "fast mode", as suggested below, hence my question.

It's likely the engine does full-screen screen updates, which is quite CPU intensive and even moreso with any scaler other than normal/1x, so the fact that it somewhat works for you at 1x only strengthens this theory.

I'm assigning this bug to dreammaster now that we've more or less established this is not actually a crash, but an input processing problem, since he's most familiar with this code.

comment:16 by joostp, 15 years ago

Owner: changed from joostp to dreammaster
Summary: CRUISE: crashes during startupCRUISE: input not working on slow machines

comment:17 by dreammaster, 15 years ago

I've just committed some code that implements dirty rect handling. The original game didn't use it, but I think the code I've added handles it fairly well. Lets see if this makes any difference to the speed problems being experienced.

comment:18 by criezy, 15 years ago

I have tried with r43416 (compiled from trunk) and the cpu load is indeed slightly better, except in the copy protection screen. There with the 2X scaler I still hit 100% CPU load and the game seems to be freezed. I don't know if the graphic is to blame as there is not much to redraw on that screen when the mouse cursor is not moving.

Anyway, using 100% of the CPU on a slow machine is not really a problem in itself (sometimes it cannot be avoided). The main problem for me is that when it happens it seems the inputs are not processed (e.g. I cannot skip the intro animation with a mouse click, the mouse cursor doesn't move, I cannot quit ScummVM or display the GMM using crtl-F5).

I tried the suggestion from joostp with bFastMode = true and while the CPU load is still close to or at 100% most of the time I can play the game nearly perfectly with the 2X scaler (there are some slow down at times but no freeze, for instance on the code protection screen the mouse cursor movements are a bit jerky).

comment:19 by dreammaster, 15 years ago

I've just committed a fix to both the release and SVN branches that should fix the input problem. See if that resolves the issue.

I'll also look into the copy protection screens to see if there's anything I can do to reduce the amount of redrawing required.

comment:20 by criezy, 15 years ago

I just tested with r43499. The game is a bit slow and the mouse cursor are jerky, but otherwise the game is now perfectly playable with 2X graphic mode on my old PPC computer.

comment:21 by dreammaster, 15 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.