Aspect ratio problems with King's Quest V (Macintosh)

Ask for help with ScummVM problems

Moderator: ScummVM Team

Post Reply
User avatar
almeath
Posts: 178
Joined: Fri Mar 14, 2008 1:40 pm
Location: Australia

Aspect ratio problems with King's Quest V (Macintosh)

Post by almeath »

I am experiencing a problem with forcing aspect ratio correction in King's Quest V for the Macintosh (in ScummVM 1.9).

I noticed that no matter whether the setting is on or off, and in both full screen and windowed mode, the game will display a 'stretched' image.

As a reference point, I ran King's Quest V in an emulated Mac environment (System 7 in SheepShaver, 640x480 desktop resolution). Interestingly, running in a window produced a 'stretched' image and when using the "expand" menu item, the full screen image was a corrected 4:3 resolution, as illustrated in the screenshots. So it seems it is not caused by a bug in the original game.

Windowed: http://userweb.eftel.com/~almeath/mac/kq5_windowed.jpg
Expanded: http://userweb.eftel.com/~almeath/mac/kq5_expanded.jpg

So I am trying to establish why ScummVM is not applying the aspect ratio correction for this game. The setting basically has no effect.

This is not an issue that affects other Sierra SCI Macintosh games from the same time period, as Space Quest IV, when using the exact same settings, will properly display a 4:3 image in both full screen and windowed mode in ScummVM.
User avatar
almeath
Posts: 178
Joined: Fri Mar 14, 2008 1:40 pm
Location: Australia

Post by almeath »

These are the settings being used:

[kq5-mac]
filtering=false
description=King's Quest V: Absence Makes the Heart Go Yonder (Macintosh/English)
mute=false
speech_volume=192
gfx_mode=opengl
originalsaveload=false
prefer_digitalsfx=true
fullscreen=true
gameid=sci
render_mode=macintosh
language=en
gui_saveload_last_pos=1
sfx_volume=204
music_volume=204
platform=macintosh
aspect_ratio=true
native_fb01=false
guioptions=sndNoSpeech gameOption1 gameOption2 gameOption3 lang_English

I notice that the config file specifies the game ID as "sci" and if I try to use "kq5-mac" it returns the error "could not find any engine capable of running the selected game".

So these exact same settings will run both KQ5 and SQ4, both identified as "sci", but with the aspect ratio problem only affecting KQ5.
User avatar
almeath
Posts: 178
Joined: Fri Mar 14, 2008 1:40 pm
Location: Australia

Post by almeath »

With extensive testing of various ScummVM builds, graphics and resolution settings between three different SCI games, I have come to the conclusion that "aspect_ratio=true" has no effect on King's Quest V for the Mac.

As it does display the proper 4:3 mode in MacOS 7, coupled with the fact that Space Quest IV and Leisure Suit Larry 5 will properly work in 4:3 in ScummVM with the *exact* same config file (apart from the necessary game ID), it seems safe to conclude there is no fault with the original game as such. ScummVM is failing to implement the command for no obvious reason.
User avatar
criezy
ScummVM Developer
Posts: 949
Joined: Sat Sep 23, 2006 10:41 am
Location: West Sussex, UK

Post by criezy »

I am not familiar with this code but a wild guess might be that KQ5 mac uses a resolution of 320x190 instead of 320x200 (see https://github.com/scummvm/scummvm/blob ... en.cpp#L70 and the few lines that follow) while aspect ratio correction only get activated for resolutions of 320x200 and 640x400 (see https://github.com/scummvm/scummvm/blob ... .cpp#L1210).

You could try to modify the aforementioned code in opengl-graphics.cpp to also respect the aspect ratio correction setting for 320x190 games. I don't know if it would work, but this is worth a try I guess.
User avatar
almeath
Posts: 178
Joined: Fri Mar 14, 2008 1:40 pm
Location: Australia

Post by almeath »

Well, it worked! :D

I modified the line in opengl-graphics.cpp to correct a resolution of 320x190, recompiled, and now the 4:3 aspect ratio is enforced in King's Quest V.

It was also useful to see the list of other Mac SCI ports using this non-standard resolution.

Thank you very much for pointing me in the right direction. :)
OmerMor
Got a warning
Posts: 176
Joined: Thu Nov 17, 2005 9:29 pm
Location: Israel
Contact:

Post by OmerMor »

Pull request?
User avatar
criezy
ScummVM Developer
Posts: 949
Joined: Sat Sep 23, 2006 10:41 am
Location: West Sussex, UK

Post by criezy »

I have a commit on GitHub with the change (https://github.com/criezy/scummvm/commi ... 6846ce5555). I was waiting for feedback from SCI devs on IRC before landing it though.
OmerMor
Got a warning
Posts: 176
Joined: Thu Nov 17, 2005 9:29 pm
Location: Israel
Contact:

Post by OmerMor »

Thanks!
User avatar
almeath
Posts: 178
Joined: Fri Mar 14, 2008 1:40 pm
Location: Australia

Post by almeath »

When I manually edited the cpp file I replaced the 320x200 above this line:

return intToFrac(4) / 3;

I noticed in the change request that the new entry for 320x190 is followed by this line:

return intToFrac(320) / 228

Just out of interest, will these both produce the same result from a technical perspective?
User avatar
criezy
ScummVM Developer
Posts: 949
Joined: Sat Sep 23, 2006 10:41 am
Location: West Sussex, UK

Post by criezy »

No, there is a small difference. A 4/3 aspect ration means 320/240. Thus in my case I am not using a 4/3 aspect ratio, but something slightly more squashed. I assumed the mac version of the games uses the same pixel aspect ratio than the DOS version, and simply removed 10 pixels because of the space used by the mac menu at the top of the screen. Thus the same 1.2 correction is applied to all cases (we brings the 320x190 game to 320x228).

But I am not sure this is correct. Are the 190 pixels from the mac version a squashed version of the DOS 200 pixels? In which case they would still need to be displayed at 320x240 to get the correct aspect ratio. Or did they remove a few pixels at the top and/or bottom of the picture? I assumed the later (more precisely that maybe they removed the black bar you can see at the top of the screenshots for the DOS version here: http://www.scummvm.org/screenshots/sci/kq-sci/).
User avatar
almeath
Posts: 178
Joined: Fri Mar 14, 2008 1:40 pm
Location: Australia

Post by almeath »

I tested the 320/228 and 4/3 settings, using the introductory Sierra logo as the point of comparison.

With 4/3 the logo appears as an oval, slightly squashed on its vertical axis.

With no aspect ratio correction, it appears as an oval squashed on its horizontal axis.

With 320/228 it appears as a perfect circle. So this is the correct setting to use for the Mac 320x190 games.

I also looked at the DOS and Mac versions and could not perceive any difference, so I assume this means the extra 10 pixels was for the Mac menu.
User avatar
almeath
Posts: 178
Joined: Fri Mar 14, 2008 1:40 pm
Location: Australia

Post by almeath »

I realize I am moving a bit beyond the original topic of KQV, but I think these issues are relevant for the Mac SCI games in general.

After testing the Mac version of Quest for Glory, I have some additional observations for the record:

When running this game natively (i.e. in Mini vMac with System 7.x) with a 640x480 desktop resolution, the uncorrected 320x200 resolution is displayed, resulting in a stretched oval shape for the Sierra logo, squashed on its horizontal axis. It would appear that the original Macintosh ports of some Sierra SCI games did not apply 4:3 aspect ratio correction. I wonder if this is due to lax porting efforts or something else? Maybe we will never know.

In an attempt to correct this issue, I tried running a standard ScummVM 1.9 build with aspect ratio correction enabled. Surprisingly this resulted in another oval Sierra logo, squashed on its vertical axis. This is the standard build using the 4:3 setting for 320x200.

I then tried the custom build mentioned earlier in this post, applying a ratio of 4:3 to a resolution of 320x190. This resulted in aspect ratio correction not working at all. It did not work with a 320/228 ratio either. So safe to assume that QFG is not one of the 320x190 games.

I then went out on a limb and compiled a custom build with 320/228 correction applied to a resolution of 320x200. I did not expect this to work, but it actually resulted in the closest thing to a perfect circle for the Sierra logo that I can achieve.

I did not think that 320/228 should apply to a 320x200 resolution, so I am a bit puzzled as to what is going on here.

All of this aside, not using aspect ratio correction more closely approximates the original Macintosh experience for some but not all of the SCI games.
Post Reply