ScummVM logo Forum Index - ScummVM website - Contact us - Buy Supported Games: GOG.com Rules - Search - Register - Login curved edge
Folder Forum Index > Other Ports > Harmattan port? Goto page Previous  1, 2, 3, 4, 5, 6  Next
Harmattan port?
  Author    Thread Reply to topic
andei



Joined: 02 May 2012
Posts: 18
Location: Finland
 

I think I figured out why those nasty scaler / aspect ratio problems are happening. Right now unpatched ScummVM crashes with the following error:

code:
scummvm: graphics/scaler.cpp:209: void Normal2x(const uint8*, uint32, uint8*, uint32, int, int): Assertation '((((size_t)dstPtr) & ((4) - 1)) == 0)' failed.
Aborted (core dumped)



This is caused by small x11-fix-event-coordinates patch used in the official Harmattan SDL library. It always sets window size to full N9 screen resolution, but I suspect ScummVM prefers to choose its own window sizes. Without the SDL patch all video options work, but then of course touchscreen coordinates tracking is way off.

So either this has to be worked around in ScummVM or a different Harmattan SDL coordinates fix is needed. I'm not sure which is more feasible... and both tasks look too complex for me to tackle alone. Would anyone like to help out?

Please? Pretty please? Please pretty please with sugar on top? Very Happy
 Reply with quote  
Post Sun May 06, 2012 3:51 pm 
 View user's profile Send private message
LordHoto
ScummVM Developer


Joined: 30 Oct 2005
Posts: 1030
Location: Germany
 

quote:
Originally posted by andei
I think I figured out why those nasty scaler / aspect ratio problems are happening. Right now unpatched ScummVM crashes with the following error:
code:
scummvm: graphics/scaler.cpp:209: void Normal2x(const uint8*, uint32, uint8*, uint32, int, int): Assertation '((((size_t)dstPtr) & ((4) - 1)) == 0)' failed.
Aborted (core dumped)



This is caused by small x11-fix-event-coordinates patch used in the official Harmattan SDL library. It always sets window size to full N9 screen resolution, but I suspect ScummVM prefers to choose its own window sizes. Without the SDL patch all video options work, but then of course touchscreen coordinates tracking is way off.

So either this has to be worked around in ScummVM or a different Harmattan SDL coordinates fix is needed. I'm not sure which is more feasible... and both tasks look too complex for me to tackle alone. Would anyone like to help out?

Please? Pretty please? Please pretty please with sugar on top? :D


That assertion shows that the destination buffer is not aligned on (at least) a 4 byte boundary. You will need to assure that to allow the Normal2x scaler to work fine.
 Reply with quote  
Post Sun May 06, 2012 4:53 pm 
 View user's profile Send private message
Orologiaio



Joined: 05 Jan 2012
Posts: 13
 

I don't know if it is related to this scaler issue, but I'm not able to play The Curse of Monkey Island, it says it can't switch to 640x480.

I also noticed a small graphical glitch in the title scene of Indiana Jones and the Fate of Atlantis, with SuperSAL2x filter on. The zooming "Indiana Jones" title acts strangely till its fully zoomed. The game is however fully playable so far.

 Reply with quote  
Post Mon May 07, 2012 1:29 pm 
 View user's profile Send private message
andei



Joined: 02 May 2012
Posts: 18
Location: Finland
 

Orologiaio, The Curse of Monkey Island not working is definitely related to the same issue. Sad Right now the Harmattan port can't switch resolutions, so only games with 320x200 pixel original graphics work. If anyone knows how to fix this, please post a patch. It might take a while for me to figure it out.

And thanks LordHoto, I kind of understand... at least in some level. But not well enough, so tomorrow it's library time. Section: big and heavy programming books. I'm beginning to realize I may have jumped into the pool without first learning to swim properly.

Feel free throw a second lifebuoy at any time!

 Reply with quote  
Post Mon May 07, 2012 2:44 pm 
 View user's profile Send private message
Freddo



Joined: 31 Oct 2005
Posts: 280
 

Here is a small blog entry about the scaling routine that I guess anotherguest use for the Symbian port. No idea if it will help or not.
http://www.summeli.fi/?p=1227

Would it be possible to let ScummVM always work at 640x480 and then upscale the 320x200 games to 640x480?

 Reply with quote  
Post Mon May 07, 2012 8:04 pm 
 View user's profile Send private message
tsoliman
ScummVM Developer


Joined: 19 Jan 2011
Posts: 350
Location: Waukesha, WI
 

quote:
Originally posted by andei
Right now the Harmattan port can't switch resolutions, so only games with 320x200 pixel original graphics work.

The solution is to use OpenGL instead of SDL surface (what Maemo is using now)

I currently don't have a N9 or a N900 which would both be good candidates to develop this for.

(my N810 doesn't have any OpenGL support AFAIK)
 Reply with quote  
Post Mon May 07, 2012 9:33 pm 
 View user's profile Send private message Send e-mail
LordHoto
ScummVM Developer


Joined: 30 Oct 2005
Posts: 1030
Location: Germany
 

quote:
Originally posted by tsoliman
quote:
Originally posted by andei
Right now the Harmattan port can't switch resolutions, so only games with 320x200 pixel original graphics work.

The solution is to use OpenGL instead of SDL surface (what Maemo is using now)

I currently don't have a N9 or a N900 which would both be good candidates to develop this for.

(my N810 doesn't have any OpenGL support AFAIK)


Using the current OpenGL code is at your own risk though, it might get fully replaced without any warning.
 Reply with quote  
Post Tue May 08, 2012 12:05 am 
 View user's profile Send private message
andei



Joined: 02 May 2012
Posts: 18
Location: Finland
 

quote:
Originally posted by tsoliman
The solution is to use OpenGL instead of SDL surface (what Maemo is using now)

Hmm, I was afraid of that. Took a peek at the OpenGL enabled Android port and suddenly heard this eerie voice repeating, "You must not go there... you must not go there...". Scary complicated stuff. Shocked

I'm going to remove that x11-fix-event-coordinates patch and try to figure out a way to replicate it's functionality in ScummVM friendly fashion. Hopefully that will get SDL surface working better.

And thanks for the blog link Freddo - I'll look into that too.
 Reply with quote  
Post Wed May 09, 2012 1:59 am 
 View user's profile Send private message
andei



Joined: 02 May 2012
Posts: 18
Location: Finland
 

Here's an updated Nokia N9 port for testing:

scummvm_1.4.1_armel.deb

And here are the sources and a patch for SDL:

scummvm-1.4.1-harmattan_10052012.diff.gz
x11-alt-fix-event-coordinates.gz

A modified Harmattan SDL library (preferably statically linked) is needed for building this version. Skip the x11-fix-event-coordinates patch and use the one above. It calculates how much empty space is around the window and adjusts and clips touchscreen event coordinates accordingly. Not the most elegant solution perhaps, but it makes ScummVM happy.

Assembly optimized scalers, aspect ratio correction and different resolution games should be fixed now. I don't have The Curse of Monkey Island to test, so can you give it a spin Orologiaio? Just remove the old ScummVM package before installing this new one.

Hope everything works. Smile

 Reply with quote  
Post Thu May 10, 2012 11:29 am 
 View user's profile Send private message
HKisd



Joined: 16 May 2012
Posts: 1
Location: Finland
 

andei: Thank you. Great work! Graphics and scalers seem to work nicely in the latest version.

One small issue I noticed that sometimes volume control from buttons won't work. It controls ringer volume instead of application volume. Same also happened with the earlier version. At least Day of the Tentacle's start animation has this problem.

By the way N9 is great phone! It is unbelievable that Elop destroyed this excellent platform.

 Reply with quote  
Post Wed May 16, 2012 11:25 am 
 View user's profile Send private message
FastIkarus



Joined: 24 Nov 2007
Posts: 8
Location: Prague, Czech republic
 

Andei, wonderful work, many thanks! Making N9 even more wonderful!Smile

I have issue with Sam & Max Hit the Road (CD version/English). It just crashes whole ScummVM when I press the start button. It works.on my PC. I don't know what other info I can provide, so I am not sure that you (or anyone) can help me, but if not, I can play other games Smile again, thank you for N9 port, great job!

 Reply with quote  
Post Thu May 17, 2012 1:33 pm 
 View user's profile Send private message ICQ Number
Orologiaio



Joined: 05 Jan 2012
Posts: 13
 

quote:
Originally posted by andei
Here's an updated Nokia N9 port for testing:

scummvm_1.4.1_armel.deb

And here are the sources and a patch for SDL:

scummvm-1.4.1-harmattan_10052012.diff.gz
x11-alt-fix-event-coordinates.gz

A modified Harmattan SDL library (preferably statically linked) is needed for building this version. Skip the x11-fix-event-coordinates patch and use the one above. It calculates how much empty space is around the window and adjusts and clips touchscreen event coordinates accordingly. Not the most elegant solution perhaps, but it makes ScummVM happy.

Assembly optimized scalers, aspect ratio correction and different resolution games should be fixed now. I don't have The Curse of Monkey Island to test, so can you give it a spin Orologiaio? Just remove the old ScummVM package before installing this new one.

Hope everything works. Smile

Sorry, I didn't have the chance to come back here for some time. I'll test and get back to you as soon as possible!
Thank you.

EDIT: It works! I could play CoMI with no issues, I could also enable aspect ratio correction (and finally play older games at a decent resolution ant not in a tiny stamp Razz ).
I'm still noticing that small issue with the Indiana Jones title while it's zooming, so that's not related to the scaler which as far as I can tell is now totally fixed. And it's a trivial issue, I find it disturbing but I'm a perfectionist Wink

Thanks again for your efforts andei, and keep up the good work!
 Reply with quote  
Post Tue May 22, 2012 8:36 pm 
 View user's profile Send private message
andei



Joined: 02 May 2012
Posts: 18
Location: Finland
 

Cheers! It's so nice to hear that things are working. Well, mostly working at least. Smile

Orologiaio, now I get what you mean about the weird zoom in FoA intro. I'll see if something can be done about that.

HKisd, very strange... I'm not seeing those volume control problems in DotT. Are there other easily reproduced situations where you're experiencing this? Something like that might happen if you have other applications open that play audio and request volume button control from the OS.

And FastIkarus, Sam & Max definitely should work. Try removing the game from ScummVM list and add it back. Also try again copying the game data files from your computer. You could also try resetting all settings by deleting or renaming /home/user/.scummvmrc file.

Finally, if you have N9 developer mode enabled, start ScummVM from the Terminal application like this...

/opt/scummvm/bin/scummvm

...then run the game and look for any messages on the Terminal screen.

 Reply with quote  
Post Wed May 23, 2012 2:14 pm 
 View user's profile Send private message
FastIkarus



Joined: 24 Nov 2007
Posts: 8
Location: Prague, Czech republic
 

quote:
Originally posted by andei
And FastIkarus, Sam & Max definitely should work. Try removing the game from ScummVM list and add it back. Also try again copying the game data files from your computer. You could also try resetting all settings by deleting or renaming /home/user/.scummvmrc file.

Finally, if you have N9 developer mode enabled, start ScummVM from the Terminal application like this...

/opt/scummvm/bin/scummvm

...then run the game and look for any messages on the Terminal screen.


Terminal helped, thanks for tip. It seems like some problem with MIDI music:
code:

~ $ /opt/scummvm/bin/scummvm

WARNING: SDL mixer output buffer size: 1024 differs from desired: 2048!

Keyboard pack 'vkeybd_default' loaded successfully

User picked target 'samnmax' (gameid 'samnmax')...

Looking for a plugin supporting this gameid... SCUMM [all games]

Starting 'Sam & Max Hit the Road'

WARNING: TiMidity: connect(): Connection refused!

WARNING: TiMidity: can't open control connection (host=127.0.0.1, port=7777)!

IMuse initialization - Unknown Error!




I disabled MIDI in settings and game works without problems, even music plays, I guess at least CD version of Sam&Max doesn't need MIDI...
 Reply with quote  
Post Wed May 23, 2012 2:38 pm 
 View user's profile Send private message ICQ Number
andei



Joined: 02 May 2012
Posts: 18
Location: Finland
 

^That's great - glad you got Sam & Max working!

The N9 doesn't have a hardware synth or TiMidity packages, so MIDI music isn't really supported at the moment. WildMidi is in the official Harmattan repository, but I'm not sure if it works with ScummVM.

 Reply with quote  
Post Wed May 23, 2012 5:33 pm 
 View user's profile Send private message
  Display posts from previous:      
Reply to topic

Forum Jump:
 
Goto page Previous  1, 2, 3, 4, 5, 6  Next


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