• Login
  • Register
  • Dolphin Forums
  • Home
  • FAQ
  • Download
  • Wiki
  • Code


Dolphin, the GameCube and Wii emulator - Forums › Dolphin Emulator Discussion and Support › Android v
« Previous 1 ... 110 111 112 113 114 ... 126 Next »

Why there isn't the x86_64 recompiler in Dolphin Mobile
View New Posts | View Today's Posts

Pages (2): 1 2 Next »
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Thread Modes
Why there isn't the x86_64 recompiler in Dolphin Mobile
04-10-2015, 08:54 AM (This post was last modified: 09-21-2015, 01:04 AM by Sonicadvance1.)
#1
Sonicadvance1 Offline
Professional Hand Holder
**********
Developers (Some Administrators and Super Moderators)
Posts: 716
Threads: 15
Joined: Jan 2013
Dolphin mobile doesn't currently build with the x86_64 recompiler inside of it. At least one of you wanted to know why it hasn't been added yet.
The Dolphin Mobile UI is actually even set up so when the x86_64 recompiler is built and added to the APK, it will automatically show up on these x86_64 devices.

Let's go through the list of problems to determine what is needed to be done to get the recompiler working on Android.
  1. PIC (Position Independent Code) in the x86_64 recompilers (CPU, DSP LLE, Vertex Loader)
Okay, I lied a bit; The list of problems only contains one item. PIC support is a mandated requirement of Android 5.0 for all 64bit targets (x86_64, AArch64, MIPS64) and we don't support it on x86_64. In particular this issue can be tested on desktops by running a hardened Linux install with ASLR enabled, or just building our binary with -fPIE enabled.
Many Gentoo and Arch users have noticed this issue because it immediately throws an error about being unable to get memory in the lower 2GB range and then promptly crashing out. Android will hit this same issue.

Now you know the problem, and cry why won't I fix it? There's a couple of reasons for that.
  1. I don't like x86 (x86_64 included in that)
  2. It's a decent chunk of work and I don't have time for that.
  3. I already maintain two architectures myself, and you can see how one is in the middle of dying.
So if someone fixes PIC on x86_64, I'll of course compile in the library and throw it in the APK.
There are a couple of Android devices that are available(at the time of posting) that can potentially run Dolphin Mobile once the PIC issue is fixed.
  1. Nexus Player
  2. Nokia N1 (Hard to find outside of China, not impossible)
  3. Dell Venue 10 7000 (Not yet available, will be the end of this month)
  4. Dell Venue 8 7000 (Running Android 4.4, will get the 5.0 update soon)
  5. Maybe some other minor ones. I tend to ignore x86 Android devices.
[Edit]
Minor update to this since I posted a link to this on Reddit.
I've checked all of the x86 Android devices on the market and currently none of them run a 64bit userspace.
So even though the hardware is capable of x86_64, the userspace is only set up to run 32bit x86 applications.
So until that problem is resolved, there isn't even a chance of Dolphin running on these x86 devices, because we dropped support for 32bit devices quite a while ago.
[/Edit]

So in particular one user was berating me about "just try it on the Nexus Player." I have no need to, I already know what the result is going to be. It's going to load the game, throw an error in logcat and then promptly crash.
This is why Dolphin Mobile doesn't have the x86_64 recompiler yet.
Find
Reply
04-10-2015, 09:10 AM
#2
agrabren Offline
Junior Member
**
Posts: 26
Threads: 0
Joined: Mar 2015
Very good explanation. Although I find it sad that anyone in the community would spend their time berating the people who contribute their time and resources to this project. There is nothing trivial about the Dolphin Emulator. If someone wants support for something, they should step up and help add it. Contribute to the project, don't berate those who are working hard to make it work for the majority of users.
Find
Reply
04-10-2015, 03:24 PM
#3
Nintonito Offline
Posting Freak
*****
Posts: 951
Threads: 81
Joined: Jan 2014
Well this is a welcome thread.  I was quite curious what the hold up was.  I'm no expert,  but why is PIC important,  and therefore used,  and what is t that prevents it from being circumvented?  Also, what are your reasons for disliking x86?  Lastly,  you mentioned one JIT is dying.  Are you implying that development on Armv7 is hitting a wall,  or just that maintenance has been a pain?
Find
Reply
04-10-2015, 03:42 PM
#4
tueidj Offline
Senior Member
****
Posts: 552
Threads: 0
Joined: Apr 2013
PIC is important because it's both a security issue and a memory size issue. If code is PIC compliant it a) never gets marked as writable (preventing modification) and b) can be mapped directly into any processes that use it, instead of requiring some sections to be duplicated for each process (reducing memory requirements).
Find
Reply
04-11-2015, 03:15 PM
#5
KHg8m3r Offline
Doesn't sleep, just Dolphin and Robots
*******
Posts: 5,914
Threads: 4
Joined: Sep 2013
I think iOS has this same issue : https://forums.dolphin-emu.org/Thread-dolphin-on-ios?page=2
Find
Reply
09-11-2015, 11:47 PM
#6
castrwilliam
Unregistered
 
I know there was a patch for the dynamic linker to let Android run non-position-independent executables when lollipop came out on armv7. Does anyone think a similar hack could be implemented in a custom ROM to either disable mandatory ASLR or disable ASLR altogether?
Reply
09-12-2015, 12:21 AM
#7
Sonicadvance1 Offline
Professional Hand Holder
**********
Developers (Some Administrators and Super Moderators)
Posts: 716
Threads: 15
Joined: Jan 2013
It doesn't really matter. There /still/ isn't an x86_64 device that runs a 64bit userspace that I have found.
Once there is, I'm sure that there will be a stronger push from somebody(even if that is me) to support PIC correctly on x86_64.
Find
Reply
09-13-2015, 03:31 AM
#8
castrwilliam
Unregistered
 
I would think that this means we can run 64 bit code, right?

CM 12.1, Asus Zenfone 2, 64GB/4GB model


Attached Files Thumbnail(s)
   
Reply
09-13-2015, 04:31 AM
#9
Sonicadvance1 Offline
Professional Hand Holder
**********
Developers (Some Administrators and Super Moderators)
Posts: 716
Threads: 15
Joined: Jan 2013
Nope, it just means it is running a 64bit kernel.
do an `ls /vendor/` and see if there is a lib64 folder in there, if so it'll be able to run x86_64 applications.
I've already dumped that device's firmware, and I know that it doesn't support x86_64.
Find
Reply
09-13-2015, 04:51 AM
#10
castrwilliam
Unregistered
 
(09-13-2015, 04:31 AM)Sonicadvance1 Wrote: Nope, it just means it is running a 64bit kernel.
do an `ls /vendor/` and see if there is a lib64 folder in there, if so it'll be able to run x86_64 applications.
I've already dumped that device's firmware, and I know that it doesn't support x86_64.

Yeah, there isn't any, just some libraries directly inside /vendor. I also pulled /system/lib/libEGL.so and my Arch box says it's a 32-bit library. Dammit.

I imagine the devices that have 32 bit userspace now will never get 64 bit because of all the proprietary stuff involved in making these ROMs. I guess even Intel can be lazy if they have the opportunity.
Reply
« Next Oldest | Next Newest »
Pages (2): 1 2 Next »


  • View a Printable Version
  • Subscribe to this thread
Forum Jump:


Users browsing this thread: 1 Guest(s)



Powered By MyBB | Theme by Fragma

Linear Mode
Threaded Mode