ScummVM logo Forum Index - ScummVM website - Contact us - Buy Supported Games: GOG.com Rules - Search - Register - Login curved edge
Folder Forum Index > Android Port > Mips port
Mips port
  Author    Thread Reply to topic
jsmtux



Joined: 28 Jan 2012
Posts: 9
Mips port 

Hi all, i've recently bought an android tablet named ainol Paladin.
It's quite good but it has a mips architecture instead of arm and scummvm doesn't work.
Could someone recompile it with mips libs?.
I've tried myself downloading the ndk and following instructions on wiki . scummvm . org/index.php/Compiling_ScummVM/Android changing the arm toolchain with the mips one and the architecture name so that it could find the c compiler.
However it keeps giving errors when compiling sdl although i know it could compile flawlessly.
Could you help me?
Thank you

 Reply with quote  
Post Sat Jan 28, 2012 2:42 pm 
 View user's profile Send private message
Lubomyr



Joined: 07 Mar 2008
Posts: 90
Location: L'viv, Ukraine
 

I recommend to try magiccode utility
http://forum.xda-developers.com/showthread.php?t=1411879
This utils transform arm-code to mips, and many games sucessfully run on mips-devices, but not tested with scummvm
You can try it with official or sdl-based port.
If this don't help, must wait for new version Android NDK with MIPS support

 Reply with quote  
Post Sat Jan 28, 2012 4:05 pm 
 View user's profile Send private message Visit poster's website
jsmtux



Joined: 28 Jan 2012
Posts: 9
 

Yes, i've tried with magic code but it closes after giving an error.
There is already a version of android sdk with mips support but I don't know what things do I have to change in the configure script.
I've already compiled apps just changing some values in the application.mk file, but I don't know where to start here.

 Reply with quote  
Post Sat Jan 28, 2012 5:18 pm 
 View user's profile Send private message
jsmtux



Joined: 28 Jan 2012
Posts: 9
 

Hi, I'm trying to compile scummvm for mips; Ive compiled the sdl library and libiconv without problems.
However, when I'm compiling scummvm it is ok until it reaches the plugins part; linking scum plugin(the first one) it says it doesn't find libscummvm.so.
I didn't find it either, when it compiles scummvm it just creates a file named scummvm, and I think it is then when it should have created the libscummvm.so.
Any suggestions?
Thanks!

 Reply with quote  
Post Thu Feb 02, 2012 1:07 pm 
 View user's profile Send private message
jsmtux



Joined: 28 Jan 2012
Posts: 9
 

Well, I've managed to succesfully compile it with minor tweaks to the config file and android.mk.
Once it gets compiled and packed into Apk's I can install it in my tablet but when I open scummvm it force closes itself.
I'll try with some debugging program but I don't know what to do.
If any of you has any suggestions please tell me
Thanks

 Reply with quote  
Post Fri Feb 03, 2012 5:35 pm 
 View user's profile Send private message
jsmtux



Joined: 28 Jan 2012
Posts: 9
 

Ok, it was a silly bug; it was looking for the .so libraries in the armeabi folder instead of the mips one.
Now it loads ok and I can go through the menues. The only problem is it doesn't find games. I have the day of the tentacle, which scummvm 1.3.1 finds in my computer, but when I load it on the tablet and tell scummvm to go there it says there is no game in there altough I installed the scumm engine.
Any idea?

 Reply with quote  
Post Sat Feb 04, 2012 11:53 am 
 View user's profile Send private message
fuzzie
ScummVM Developer


Joined: 24 May 2010
Posts: 178
 

quote:
Originally posted by jsmtux
Ok, it was a silly bug; it was looking for the .so libraries in the armeabi folder instead of the mips one.
Now it loads ok and I can go through the menues. The only problem is it doesn't find games.


Look in the 'About' dialog to see if it manages to load the plugins. The default plugin manifest also specifies the 'armeabi' folder. I have a patch which de-hardcodes the ABI, I'll try and find time to apply it.

Perhaps you could supply details about what you've done so that we can look at doing MIPS builds on our buildbot?
 Reply with quote  
Post Sat Feb 04, 2012 12:22 pm 
 View user's profile Send private message
jsmtux



Joined: 28 Jan 2012
Posts: 9
 

Thanks for your time.
I've compiled sdl and libicon libraries with the mips ndk. In the configure file i've added:

code:

android-mips)
   _host_os=android
   _host_cpu=mips
   _host_alias=mips-linux-android
   ;;



in line 1119, changed lines 1823 to 1863 to:
code:

android)
      case $_host in
         android)
            CXXFLAGS="$CXXFLAGS -march=armv5te"
            CXXFLAGS="$CXXFLAGS -mtune=xscale"
            CXXFLAGS="$CXXFLAGS -msoft-float"
            ;;
         android-v7a)
            CXXFLAGS="$CXXFLAGS -march=armv7-a"
            CXXFLAGS="$CXXFLAGS -mfloat-abi=softfp"
            CXXFLAGS="$CXXFLAGS -mfpu=vfp"
            LDFLAGS="$LDFLAGS -Wl,--fix-cortex-a8"
            ;;
         android-mips)
            ;;
      esac
      case $_host in
         android|android-v7a)
            CXXFLAGS="$CXXFLAGS --sysroot=$ANDROID_NDK/platforms/android-4/arch-arm"
            # FIXME: Why is the following in CXXFLAGS and not in DEFINES? Change or document this.
            CXXFLAGS="$CXXFLAGS -D__ARM_ARCH_5__"
            CXXFLAGS="$CXXFLAGS -D__ARM_ARCH_5T__"
            CXXFLAGS="$CXXFLAGS -D__ARM_ARCH_5E__"
            CXXFLAGS="$CXXFLAGS -D__ARM_ARCH_5TE__"
            LDFLAGS="$LDFLAGS --sysroot=$ANDROID_NDK/platforms/android-4/arch-arm"
            CXXFLAGS="$CXXFLAGS -mthumb-interwork"
            ;;
         android-mips)         
            CXXFLAGS="$CXXFLAGS --sysroot=$ANDROID_NDK/platforms/android-14/arch-mips"
            LDFLAGS="$LDFLAGS --sysroot=$ANDROID_NDK/platforms/android-14/arch-mips"
            ;;
      esac
      CXXFLAGS="$CXXFLAGS -fpic"
      CXXFLAGS="$CXXFLAGS -ffunction-sections"
      CXXFLAGS="$CXXFLAGS -funwind-tables"
      if test "$_debug_build" = yes; then
         CXXFLAGS="$CXXFLAGS -fno-omit-frame-pointer"
         CXXFLAGS="$CXXFLAGS -fno-strict-aliasing"
      else
         CXXFLAGS="$CXXFLAGS -fomit-frame-pointer"
         CXXFLAGS="$CXXFLAGS -fstrict-aliasing"
      fi
      CXXFLAGS="$CXXFLAGS -finline-limit=300"
      _optimization_level=-Os
      # supress 'mangling of 'va_list' has changed in GCC 4.4'
      CXXFLAGS="$CXXFLAGS -Wno-psabi"
      add_line_to_config_mk "ANDROID_SDK = $ANDROID_SDK"
      _seq_midi=no
      ;;



and line 2108 to
code:

android | android-v7a | android-mips)



in backends/platform/android/android.mk changed armeabi folders to mips and set /platforms/android-14, but I don't thing this last change was necessary.
In unpacker.java i changed line 274 to
code:
 .path("mylib/mips/libscummvm.so").


Also, I commented line 40 in /usr/include/wchar.h in the platform folder of the ndk as it gave me an error and it wasn't used. I don't think it is the best way to do it but it worked Very Happy
My environment was set through:
code:

export ANDROID_NDK=~/Paladin/dev/android-ndk-r7m/
export ANDROID_SDK=~/Paladin/dev/android-sdk-linux/
export PATH=$PATH:~/Paladin/dev/android-ndk-r7m/toolchains/mips-linux-android-4.4.3/prebuilt/linux-x86/bin/
export MACHDEP="--sysroot=$ANDROID_NDK/platforms/android-14/arch-mips/"



I think that's all.
 Reply with quote  
Post Sat Feb 04, 2012 1:07 pm 
 View user's profile Send private message
jsmtux



Joined: 28 Jan 2012
Posts: 9
 

well, I've done it, it runs
But it is going quite slow and I don't know why, even on the menues it takes a lot of time to move the arrow and make it click on things.
And it is weird as the cpu shows little use and there is a lot of available ram.
Do you have any idea why is this happening?
Thanks

 Reply with quote  
Post Sun Feb 05, 2012 11:35 am 
 View user's profile Send private message
fuzzie
ScummVM Developer


Joined: 24 May 2010
Posts: 178
 

quote:
Originally posted by jsmtux
well, I've done it, it runs
But it is going quite slow and I don't know why, even on the menues it takes a lot of time to move the arrow and make it click on things.
And it is weird as the cpu shows little use and there is a lot of available ram.
Do you have any idea why is this happening?
Thanks


Broken/slow OpenGL, perhaps? How is performance with other OpenGL applications? If the Paladin is the Novo 7, benchmark performance doesn't look too bad but perhaps it doesn't provide acceleration for the texture formats we need.. do you have the log of the startup with details of the OpenGL driver/modes?
 Reply with quote  
Post Sun Feb 05, 2012 2:56 pm 
 View user's profile Send private message
jsmtux



Joined: 28 Jan 2012
Posts: 9
 

Yes, it is novo 7
OpenGL performance is not excellent but quite good.
About the log : http://pastebin.com/a6f6Q178
Could it be that I'm using SDL 1.2 and it is not optimized for android?
I tried 1.3 but I'm having an issue as there is two lines of ARM assembler code I don't know how to port.
Anyway shouldn't it work without even opengl?, devices like dingoo which have a processor similar but weaker than mine and no HW acceleration run scummvm with no problems.

 Reply with quote  
Post Sun Feb 05, 2012 4:27 pm 
 View user's profile Send private message
fuzzie
ScummVM Developer


Joined: 24 May 2010
Posts: 178
 

quote:
Originally posted by jsmtux
Yes, it is novo 7
OpenGL performance is not excellent but quite good.
About the log : http://pastebin.com/a6f6Q178
Could it be that I'm using SDL 1.2 and it is not optimized for android?
I tried 1.3 but I'm having an issue as there is two lines of ARM assembler code I don't know how to port.


Well, we don't support SDL builds (although lubomyr does unsupported SDL builds from master, so presumably it is possible if you wish) and it doesn't look like you're doing an SDL build.. if you're doing a native ScummVM Android build then ScummVM should provide OpenGL information itself in the log.

Edit: (And please try and provide that information from the log if you can!)

Is it slow everywhere or just in the menus?

quote:
Originally posted by jsmtux
Anyway shouldn't it work without even opengl?, devices like dingoo which have a processor similar but weaker than mine and no HW acceleration run scummvm with no problems.


Android needs OpenGL. If you install a non-Android OS then it should be fine.
 Reply with quote  
Post Sun Feb 05, 2012 5:14 pm 
 View user's profile Send private message
jsmtux



Joined: 28 Jan 2012
Posts: 9
 

well, it was a problem with my device
Various testers reported it worked correctly
Thank you very much for your support

 Reply with quote  
Post Sun Feb 05, 2012 9:57 pm 
 View user's profile Send private message
digitall
ScummVM Developer


Joined: 02 Aug 2012
Posts: 822
 

We now have experimental daily builds for Android MIPS here:
http://buildbot.scummvm.org/builds.html

Feel free to test, though you may have issues as these are very experimental.

 Reply with quote  
Post Mon May 05, 2014 8:04 am 
 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