ScummVM logo Forum Index - ScummVM website - Contact us - Buy Supported Games: GOG.com Rules - Search - Register - Login curved edge
Folder Forum Index > Help and Support > Aspect ratio problems with King's Quest V (Macintosh)
Aspect ratio problems with King's Quest V (Macintosh)
  Author    Thread Reply to topic
almeath



Joined: 14 Mar 2008
Posts: 34
Aspect ratio problems with King's Quest V (Macintosh) 

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.

 Reply with quote  
Post Thu Mar 23, 2017 2:35 pm 
 View user's profile Send private message
almeath



Joined: 14 Mar 2008
Posts: 34
 

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.

 Reply with quote  
Post Fri Mar 24, 2017 10:34 am 
 View user's profile Send private message
almeath



Joined: 14 Mar 2008
Posts: 34
 

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.

 Reply with quote  
Post Sat Mar 25, 2017 4:39 pm 
 View user's profile Send private message
criezy
ScummVM Developer


Joined: 23 Sep 2006
Posts: 459
Location: West Sussex, UK
 

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/master/engines/sci/graphics/screen.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/master/backends/graphics/opengl/opengl-graphics.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.

 Reply with quote  
Post Sat Mar 25, 2017 5:36 pm 
 View user's profile Send private message
almeath



Joined: 14 Mar 2008
Posts: 34
 

Well, it worked! Very Happy

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. Smile

 Reply with quote  
Post Mon Mar 27, 2017 4:58 am 
 View user's profile Send private message
OmerMor
Got a warning


Joined: 17 Nov 2005
Posts: 143
Location: Israel
 

Pull request?

 Reply with quote  
Post Mon Mar 27, 2017 6:58 pm 
 View user's profile Send private message Visit poster's website
criezy
ScummVM Developer


Joined: 23 Sep 2006
Posts: 459
Location: West Sussex, UK
 

I have a commit on GitHub with the change (https://github.com/criezy/scummvm/commit/3acad0a79ed92f79e8cdb9af3fe6796846ce5555). I was waiting for feedback from SCI devs on IRC before landing it though.

 Reply with quote  
Post Mon Mar 27, 2017 8:02 pm 
 View user's profile Send private message
OmerMor
Got a warning


Joined: 17 Nov 2005
Posts: 143
Location: Israel
 

Thanks!

 Reply with quote  
Post Tue Mar 28, 2017 6:28 pm 
 View user's profile Send private message Visit poster's website
almeath



Joined: 14 Mar 2008
Posts: 34
 

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?

 Reply with quote  
Post Wed Mar 29, 2017 4:22 am 
 View user's profile Send private message
criezy
ScummVM Developer


Joined: 23 Sep 2006
Posts: 459
Location: West Sussex, UK
 

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/).

 Reply with quote  
Post Wed Mar 29, 2017 7:11 pm 
 View user's profile Send private message
almeath



Joined: 14 Mar 2008
Posts: 34
 

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.

 Reply with quote  
Post Mon Apr 03, 2017 2:49 am 
 View user's profile Send private message
almeath



Joined: 14 Mar 2008
Posts: 34
 

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.

 Reply with quote  
Post Tue Apr 18, 2017 2:25 pm 
 View user's profile Send private message
  Display posts from previous:      
Reply to topic

Forum Jump:
 



Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Powered by phpBB © 2001, 2006 phpBB Group
Forum design by ScummVM team, icons by raina
curved edge   curved edge