Author Topic: GLideN64 Android port  (Read 136681 times)

Offline Gonetz

  • Developer
  • long
  • *****
  • Posts: 104
    • View Profile
Re: GLideN64 Android port
« Reply #60 on: May 03, 2015, 12:41:07 PM »
I've installed Tegra Android Development tool. The project successfully loaded, built and run.
I've got the same error on rom run and I decided to finally enable promised C++ debug.

First, I found this hint:
https://devtalk.nvidia.com/default/topic/527587/tegra-tools/tutorial-for-using-nvidia-debug-manager-in-tadp/
I set breakpoints and run Debug as >Android NDK application. Nothing.

I found that:
http://tools.android.com/recent/usingthendkplugin
The result was as if I debug release code: all breakpoints are ignored, but I got the name of function, which crashed.

I fond this one:
http://stackoverflow.com/questions/17705109/how-to-debug-c-c-code-ndk-in-eclipse
I edit jni/Andorid.mk to set -g in LOCAL_CFLAGS for gliden64
and jni/Application.mk to set APP_OPTIM := debug
Rebuilt the project. Does not help as well, breakpoints do not work.
GDB says:
warning: Unable to find dynamic linker breakpoint function.
GDB will be unable to debug shared library initializers
and track explicitly loaded dynamic code.

Nevertheless I found the place where plugin crashed on start, fixed it  and finally got messages about shader compilation error.
Now I can work further. However, if somebody knows working recipe  how to make debugging work, please share.

Offline Gonetz

  • Developer
  • long
  • *****
  • Posts: 104
    • View Profile
Re: GLideN64 Android port
« Reply #61 on: May 04, 2015, 03:24:07 AM »
GLES3.1 compatible sources for gliden64-integration branch:
https://drive.google.com/file/d/0B0YqMPjGo3B2akh6NXlGZFVBM3c/view?usp=sharing

Works very slow atm, but seems to be fully functional. Very close to PC version capabilities.

Offline littleguy

  • Moderator
  • double
  • *****
  • Posts: 1945
    • View Profile
Re: GLideN64 Android port
« Reply #62 on: May 04, 2015, 07:20:11 AM »
Awesome!!  I can't wait to give it a try once I have an Nvidia Shield (hopefully very soon! :) )

So, I was just curious what your long-term plans were for source code, contributions, etc.  Were you going to just publish tarballs periodically, or were you going to push the development history into https://github.com/gonetz/GLideN64 and start accepting pull requests?  If the latter, any guess as to when that might happen?  Mainly just curious, as I was thinking about the workflow we'll use for building it into mupen64plus-ae.

Thanks for the amazing progress!
2012 Nexus 7, rooted stock Lollipop
Samsung Galaxy Victory, rooted stock Jelly Bean
Xperia PLAY, stock Gingerbread
OUYA, retail version

Offline Metalmusic3000

  • byte
  • *
  • Posts: 47
    • View Profile
Re: GLideN64 Android port
« Reply #63 on: May 04, 2015, 09:43:40 AM »
Nvidia shield portable has been discontinued expect a refresh soon rumors are the new shield portable 2 is coming supposidly with the tegra x1 and 3gb ram and a larger screen i expect a announcement at E3 nvidia project code name is loki alot of into can be found in the nvidia shield forum search for loki

Offline littleguy

  • Moderator
  • double
  • *****
  • Posts: 1945
    • View Profile
Re: GLideN64 Android port
« Reply #64 on: May 04, 2015, 09:49:41 AM »
I meant shield tablet, not shield portable.  But thanks for the info, sounds like another cool product :)
2012 Nexus 7, rooted stock Lollipop
Samsung Galaxy Victory, rooted stock Jelly Bean
Xperia PLAY, stock Gingerbread
OUYA, retail version

Offline Gonetz

  • Developer
  • long
  • *****
  • Posts: 104
    • View Profile
Re: GLideN64 Android port
« Reply #65 on: May 04, 2015, 12:12:34 PM »
Awesome!!  I can't wait to give it a try once I have an Nvidia Shield (hopefully very soon! :) )

So, I was just curious what your long-term plans were for source code, contributions, etc.  Were you going to just publish tarballs periodically, or were you going to push the development history into https://github.com/gonetz/GLideN64 and start accepting pull requests?  If the latter, any guess as to when that might happen?  Mainly just curious, as I was thinking about the workflow we'll use for building it into mupen64plus-ae.

Thanks for the amazing progress!

Of course, I'll  push the whole development history. When? Soon. May be even earlier.
I planned to do that after the first results with Android port, so we may start to work with somehow working code.
However, I need to make some kind of bugfix release on PC first. There are few nasty issues, which must not be in release. After that I'll push the history.

Offline Gonetz

  • Developer
  • long
  • *****
  • Posts: 104
    • View Profile
Re: GLideN64 Android port
« Reply #66 on: May 04, 2015, 12:35:49 PM »
Here the GLES30 compatible code:

https://drive.google.com/file/d/0B0YqMPjGo3B2T1NkSzBfNDhHazA/view?usp=sharing

Thanks Gillou68310 for help with it.

I've corrected manifest and .mk files to switch to android-19 platform.
This build works fine on NVidia Shield tablet, but has heavy glitches on my Galaxy Note 3.
It looks a bit better with frame buffer emulation off, but textures still don't work.

You may notice that some textures works on Note 3. These are texrects. Texture coordinate for texrect vertices are pre-calculated. Texture coordinates for normal polygons calculated by vertex shader. It's a hint, where to search the problem. I suspect that Uniforms Block functionality does not work properly on Note3.
Since the plugin works more correct with frame buffer emulation off, I suppose that glBlitFramebuffer also works incorrect. If you have other GLES3 compatible devices, please check how it works for you.

What is bad, after switch to android-19 I can't debug it as Android Native application anymore.
gdb just can't see the app.

Also, frame buffer emulation works very SLOW even on NVidia tablet.

Offline littleguy

  • Moderator
  • double
  • *****
  • Posts: 1945
    • View Profile
Re: GLideN64 Android port
« Reply #67 on: May 04, 2015, 12:42:20 PM »
When you mentioned glBlit I immediately thought of this post.  We've seen problems with Adreno drivers before...
https://dolphin-emu.org/blog/2013/09/26/dolphin-emulator-and-opengl-drivers-hall-fameshame/#horrible-qualcommadreno
2012 Nexus 7, rooted stock Lollipop
Samsung Galaxy Victory, rooted stock Jelly Bean
Xperia PLAY, stock Gingerbread
OUYA, retail version

Offline retroben

  • float
  • ****
  • Posts: 432
    • View Profile
Re: GLideN64 Android port
« Reply #68 on: May 04, 2015, 12:51:54 PM »
Is there a build of it I can get and test?

Immediately,my FireTV becomes a piece of trash again because ancient Qualcomm V@15.0 drivers I am stuck on.
(Hurry up with the MOD TechVendetta of XDA!,please!)

My Acer Iconia x86 Intel tablet has ES 3.0 support along with the OpenGL 3.0 as well.
Crappy RAM though because only 1gig.
Curious if it would even run on an Intel at all.
« Last Edit: May 04, 2015, 01:03:05 PM by retroben »

Offline Gonetz

  • Developer
  • long
  • *****
  • Posts: 104
    • View Profile
Re: GLideN64 Android port
« Reply #69 on: May 04, 2015, 01:19:23 PM »
> Is there a build of it I can get and test?

I tried to build an apk with ant, but it fails. I'm not Android dev guru. Yet :)

Offline Gonetz

  • Developer
  • long
  • *****
  • Posts: 104
    • View Profile
Re: GLideN64 Android port
« Reply #70 on: May 04, 2015, 01:25:03 PM »
When you mentioned glBlit I immediately thought of this post.  We've seen problems with Adreno drivers before...
https://dolphin-emu.org/blog/2013/09/26/dolphin-emulator-and-opengl-drivers-hall-fameshame/#horrible-qualcommadreno

It looks really horrible. I'm not ready to fight with such issues. Just hope that Adreno has better GLES2 support .

Offline littleguy

  • Moderator
  • double
  • *****
  • Posts: 1945
    • View Profile
Re: GLideN64 Android port
« Reply #71 on: May 04, 2015, 01:40:53 PM »
> Is there a build of it I can get and test?

I tried to build an apk with ant, but it fails. I'm not Android dev guru. Yet :)

Would love to have another :)

Gonetz - I can create a build for testers whenever you like.  I will wait for your signal, in case you want to phase the rollout between PC and Android.  You have a lot on your plate and fielding bug reports on an initial release tends to be overwhelming.
2012 Nexus 7, rooted stock Lollipop
Samsung Galaxy Victory, rooted stock Jelly Bean
Xperia PLAY, stock Gingerbread
OUYA, retail version

Offline xperia64

  • Moderator
  • double
  • *****
  • Posts: 591
    • View Profile
    • My Apps
Re: GLideN64 Android port
« Reply #72 on: May 04, 2015, 03:18:04 PM »
I have a build at the ready. (GLES3.0)

It's pretty slow, but fairly accurate. The puzzle piece effect in Banjo-Kazooie works fine.
I know this is an early build, but just wanted to note that Animal Forest has issues with 2D elements being nonexistant. However, the pause menu is already better in my opinion as the player character is displayed properly and the read from framebuffer effect in the background works, as opposed to random colors being displayed.

And there's this unsettling issue in CBFD: http://imgur.com/XHoK4WA,g6haqiy

(Building this version in eclipse is a bit of a pain. I had to mess around with the jar files and library dependencies).
« Last Edit: May 04, 2015, 03:31:54 PM by xperia64 »

Offline retroben

  • float
  • ****
  • Posts: 432
    • View Profile
Re: GLideN64 Android port
« Reply #73 on: May 04, 2015, 04:33:25 PM »
Could ya help a playa out? ;D
Would you either test Yoshi Story on Jungle Puddle or please help me obtain a build for testing it myself?

Offline xperia64

  • Moderator
  • double
  • *****
  • Posts: 591
    • View Profile
    • My Apps
Re: GLideN64 Android port
« Reply #74 on: May 04, 2015, 05:10:34 PM »