Opened 14 years ago

Closed 9 years ago

#2266 closed defect (fixed)

MANIACNES: Screen width incorrect, camera halts sometimes

Reported by: SF/dfabulich Owned by: sev-
Priority: normal Component: Engine: SCUMM
Keywords: Cc:
Game: Maniac Mansion

Description

In the attached save, USE the radio and dial 3412 (the
number for the Meteor Police). You'll see the Earth
from space, and then pan right to a Meteor Police car.
Then the game will just hang there forever until you
press F5 or ESC.

(Yesterday, I posted on the forums saying that this
made the come non-completable; today when I realized
you could at least press ESC to get on with the game.
It sure had ME stuck!)

I'm testing on Windows 2000, using Maniac NES (English
US), ScummVM 0.8.0CVS (Oct 15 2005 21:10:23), Features
compiled in: Vorbis FLAC MP3 zLib MPEG2

Ticket imported from: #1328120. Ticket imported from: bugs/2266.

Attachments (2)

maniaca.s11 (6.9 KB) - added by SF/dfabulich 14 years ago.
Save right before Bernard calls police
maniachang.png (10.8 KB) - added by SF/dfabulich 14 years ago.
Screenshot of hang

Download all attachments as: .zip

Change History (14)

Changed 14 years ago by SF/dfabulich

Attachment: maniaca.s11 added

Save right before Bernard calls police

comment:1 Changed 14 years ago by SF/dfabulich

I've also attached a screenshot of the hang.

Changed 14 years ago by SF/dfabulich

Attachment: maniachang.png added

Screenshot of hang

comment:2 Changed 13 years ago by SF/quietust

Several scenes in the game start the camera at the far
left side of the room and then attempt to pan all the
way to the right before proceeding. Since the NES
engine treats the screen width as 224 (ignoring the
left and right 16 pixels) while ScummVM treats it as
256, the camera is unable to pan far enough and the
scene hangs (until aborted with ESC).

The most obvious occurrence is the "Maniac Mansion"
logo scroll during the intro, though this also happens
when calling the Meteor Police.

comment:3 Changed 13 years ago by Kirben

Summary: MANIACNES: Hang when Bernard cals Meteor PoliceMANIACNES: Screen width incorrect, camera halts sometimes

comment:4 Changed 13 years ago by sev-

Owner: set to sev-

comment:5 Changed 13 years ago by sev-

More comments from quietust

the "proper" way to fix the scrolling issue in MM NES would
be to define 2 extra "panes" on the window 16 pixels wide on
each side.

though handling sprites in those areas would be tricky

the NES engine treats the screen as only 224 pixels wide the
easiest way to fix that is to actually MAKE the screen 224
pixels wide and then pad it to 256 within the graphics code

an extra 2 virtual screens would probably be simplest
the NES version doesn't even allow you to move the cursor
into them so you wouldn't have to respond to clicks in them

comment:6 Changed 12 years ago by fingolfin

Summary: MANIACNES: Screen width incorrect, camera halts sometimes: Screen width incorrect, camera halts sometimes

comment:7 Changed 12 years ago by fingolfin

I am not sure whether adding 2 extra "panes" on the window side would be a good idea. At least I don't see how it would allow to emulate the original game correctly (aside from the fact it would be quite difficult to implement).

Today I experimented with some changes, but there still is something I can't quite grasp, making it hard for me to come up with a proper solution.

In particular, I am not sure how to reconcile the following observations (made with the help of a NES emulator):
* In the intro (meteor crashing down etc.), there are no bordes left or right. The room is 480 pixel wide, and is scrolled to its full extent
* In the first actual game playing room (the one with the big moon etc.), the room is only 224 pixels. The missing 32 pixels are added as black borders left and right
* In the second room (in front of the mansion), things are different yet again -- it is 480 pixels wide (like the intro screen), but here a 16 pixel black border is added to the left, while a 8 pixel wide black border is added on the right

Now, it wouldn't be hard to add a 16pixel border on the left, and a 8 (or 16, if needed) wide border to the right on the fly. But that doesn't explain why the intro screen looked different. Anybody got some idea? Maybe the engine itself handled it differently?

comment:8 Changed 12 years ago by fingolfin

Summary: : Screen width incorrect, camera halts sometimesMANIACNES: Screen width incorrect, camera halts sometimes

comment:9 Changed 12 years ago by sev-

In original all this depended on room width. Narrower rooms had those borders added. But here is the trick, when a wide room is drawn, 0 starts at third column, and game used this feature of wider display, i.e. in kitchen you could see Edna before she notices you and escape.

What is in SVN now is a dirty attempt to reach that functionality. If you would come with a cleaner solution, that would be fantastic.

comment:10 Changed 12 years ago by fingolfin

I still don't understand how this explains the difference I observed on the intro room... ?

comment:11 Changed 9 years ago by sev-

Resolution: fixed
Status: newclosed

comment:12 Changed 9 years ago by sev-

Fixed in SVN. Though I do not see screen paning in this particular case (a regression?), now intro works well and also on the kitchen it is possible to see Edna without her noticing you first.

Note: See TracTickets for help on using tickets.