Author Topic: GLideN64 Android port  (Read 141000 times)

Offline littleguy

  • Moderator
  • double
  • *****
  • Posts: 1945
    • View Profile
Re: GLideN64 Android port
« Reply #165 on: May 21, 2015, 10:32:37 AM »
@Gonetz

Some good news.  If we build against APP_PLATFORM 18, the native code runs on older devices (at least the ones in my signature).  The caveat is that we can only include the GLES 2.0 and 3.0 variants of GLideN64, but not the GLES 3.1 variant.  But overall this is still good news because it means we can can get at least the first two variants into the master branch.  With some more work on my end we may be able to get the GLES 3.1 variant into master eventually.

I have heavily rebased the gliden64-integration branch
https://github.com/mupen64plus-ae/mupen64plus-ae/commits/master
https://github.com/mupen64plus-ae/mupen64plus-ae/commits/gliden64-integration
https://github.com/mupen64plus-ae/mupen64plus-ae/commits/gliden64-gles31

I renamed the original gliden64-integration branch to defunct/gliden64-integration/1 so that we don't lose the discussions attached as comments on that branch.  But we should consider that branch dead.

Highlights of the rebased branches
 - Eliminated unneeded changes to manifest, SDL2, mupen64plus-core, and ae-bridge (integration no longer requires upstream involvement :) )
 - Cleaned up and logically separated the changes to the makefile, assets, resources, and java code
 - Split the GLES 3.1 changes into a new branch, so that we can still test that variant on supported devices
« Last Edit: May 21, 2015, 10:35:48 AM by littleguy »
2012 Nexus 7, rooted stock Lollipop
Samsung Galaxy Victory, rooted stock Jelly Bean
Xperia PLAY, stock Gingerbread
OUYA, retail version

Offline littleguy

  • Moderator
  • double
  • *****
  • Posts: 1945
    • View Profile
Re: GLideN64 Android port
« Reply #166 on: May 21, 2015, 10:35:06 AM »
I need help again.

@Gonetz - I can help on this after work, hopefully this evening.  Note that I just rebased the gliden64-integration branch (see last post) so you might want to try the boost merge process again.
2012 Nexus 7, rooted stock Lollipop
Samsung Galaxy Victory, rooted stock Jelly Bean
Xperia PLAY, stock Gingerbread
OUYA, retail version

Offline DonzBegonz

  • byte
  • *
  • Posts: 12
    • View Profile
Re: GLideN64 Android port
« Reply #167 on: May 21, 2015, 04:15:54 PM »
I just tried out the new gliden64 plugin using the 3.1 Gles version on my Nvidia shield tablet. the game I was running was Mario Tennis, and I have to say, what a major improvement. the game still has major slowdowns during the replays and there's also still some graphical issues on the ball, but this completely blows every other plugin out of the water.

will you guys be doing a version for speed vs accuracy like you did with all of the other plugins?

Offline littleguy

  • Moderator
  • double
  • *****
  • Posts: 1945
    • View Profile
Re: GLideN64 Android port
« Reply #168 on: May 21, 2015, 05:32:27 PM »
@DonzBegonz Yes, if necessary.  That's just a front-end tweak and will be done at the very end when we've decided which settings are most important on Android.

Testers: Great news, GLideN64 is now being built by Paul's auto-build bot.  So it should be a little easier to find the latest builds with the new plugin :)

The most important build right now is the one containing the GLES 2.0 and 3.0 variants of the plugin, since I am about ready to merge this to master.  This version is installable on devices as old as Froyo.  The GLES 3.0 variant of the plugin obviously requires a newer device, but everyone should be able to test the GLES 2.0 variant.  If anyone experiences any crashes with this build, please let me know ASAP.
http://www.paulscode.com/source/Mupen64Plus-AE/AutoBuilds/Mupen64PlusAE_gliden64-integration_201505211206_141bda0.apk

If you have a Lollipop device with GLES 3.1 support, you can test that variant of the plugin using this build:
http://www.paulscode.com/source/Mupen64Plus-AE/AutoBuilds/Mupen64PlusAE_gliden64-gles31_201505211203_cf44cae.apk

Finally, if you just want the latest version that doesn't include GLideN64, here it is.  You might want to run this as a comparison if the other builds crash on you.
http://www.paulscode.com/source/Mupen64Plus-AE/AutoBuilds/Mupen64PlusAE_master_201505211102_a188bbe.apk
2012 Nexus 7, rooted stock Lollipop
Samsung Galaxy Victory, rooted stock Jelly Bean
Xperia PLAY, stock Gingerbread
OUYA, retail version

Offline DonzBegonz

  • byte
  • *
  • Posts: 12
    • View Profile
Re: GLideN64 Android port
« Reply #169 on: May 21, 2015, 07:46:27 PM »
@littleguy you are an absolute gentleman and a scholar

Offline littleguy

  • Moderator
  • double
  • *****
  • Posts: 1945
    • View Profile
Re: GLideN64 Android port
« Reply #170 on: May 21, 2015, 08:30:09 PM »
@DonzBegonz That's debatable :P but thanks

@Gonetz Bumped into this and wondered if it had anything to do with the missing textures in GLES 2.0
http://developer.android.com/guide/topics/graphics/opengl.html#textures
2012 Nexus 7, rooted stock Lollipop
Samsung Galaxy Victory, rooted stock Jelly Bean
Xperia PLAY, stock Gingerbread
OUYA, retail version

Offline IDSG

  • byte
  • *
  • Posts: 11
    • View Profile
Re: GLideN64 Android port
« Reply #171 on: May 21, 2015, 09:58:12 PM »
Tested the GLES 2.0 version and, now it shows something on my tablet (MALI400MP), its really slow and have black textures but at least is working now and showing some things

Offline littleguy

  • Moderator
  • double
  • *****
  • Posts: 1945
    • View Profile
Re: GLideN64 Android port
« Reply #172 on: May 21, 2015, 10:44:26 PM »
@Gonetz I think I fixed the makefile for boost/GLideNHQ.  It looks like there are still a few link errors unrelated to boost/png.  Please see my personal branch at
https://github.com/littleguy77/mupen64plus-ae/commits/gliden64-glidenhq

The Android makefile has a lot of quirks.  A few things to note:
 - NDK views boost as a non-system, pre-built library, so we define a few new modules accordingly
 - We are already building libpng as a module, so we link using the mechanisms used in e.g. glide64mk2
 - Linking with libpng will automatically link with libz, due to how jni/png/Android.mk is written
 - To link GLideN64/GLideNHQ with boost/png, we use the LOCAL_STATIC_LIBRARIES parameter
 - LOCAL_LDLIBS is generally used only for "system" libraries that are bundled with the NDK

You can browse the diff here: https://github.com/littleguy77/mupen64plus-ae/commit/8fa5d5b96b1445d979f31c791e5ccb84bc5820a6

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 #173 on: May 21, 2015, 11:51:18 PM »
Updated with the variant build and GLideN64 still works and has the textures.

Banjo-Tooie has a new issue where the screen goes black when no HUD items are on the screen.
If I make the egg ammo appear,the screen returns,but when that goes away,it turns solid black again.
My results are still with slightly displaced skybox textures and a rectangle shadow along with paths being visible through walls as if the polygon offset hack was in a bad position,even if the hack is disabled or changed.
I do have my "no frameskip" 60fps code on though.

Edit: Yoshi's Story is not exiting!

I am using GLES2 variant:
Jungle Puddle water is unfortunately freaking out on the surface :( while the light rays and the water itself is okay.
The top left fruit dot is changing size randomly.
The surface colors are there but glitched around a bit and shaking like crazy.
Really gotta sort this top left corner of the screen out.
I think it has something to do with FBEmulation since Gex 3 doesn't have the minor left side of some models texture displacement with it disabled.
« Last Edit: May 22, 2015, 12:04:50 AM by retroben »

Offline Gonetz

  • Developer
  • long
  • *****
  • Posts: 104
    • View Profile
Re: GLideN64 Android port
« Reply #174 on: May 22, 2015, 12:22:29 AM »
@Gonetz Bumped into this and wondered if it had anything to do with the missing textures in GLES 2.0
http://developer.android.com/guide/topics/graphics/opengl.html#textures
I recall that I already had problem with textures on my Note 2 year ago, when I worked on my first Android port. That time I solved the problem by copying Textures.cpp from gln64. Sources were not so different as now.
So, the problem is probably in texture formats (most likely internal formats), which are available in GLES2 but not supported by Mali400 drivers.

Offline Gonetz

  • Developer
  • long
  • *****
  • Posts: 104
    • View Profile
Re: GLideN64 Android port
« Reply #175 on: May 22, 2015, 12:26:41 AM »
@littleguy - many thanks for the help and explanations! I'll check your branch for link errors. BTW, is it possible to build GLideNHQ as separate lib and link together with GLideN64 dll, as it is intended? If it is possible, it's better to make it this way.

Offline retroben

  • float
  • ****
  • Posts: 432
    • View Profile
Re: GLideN64 Android port
« Reply #176 on: May 22, 2015, 12:39:04 AM »
Read Gonetz's reply above.

Just finished testing Smash Bros. on the variant build and it also no longe exits.

The primary thing to fix besides Mali is texture sizes.
On a few characters,occasionally: Luigi and Mario are missing their over-alls' buttons,Kirby is missing his face,Yoshi's back is weird,and Jigglypuff can be missing half her face.

On Hyrule,the distance sometimes has giant texturing when you are close to your opponent while being farther makes them fix briefly.
Shields are displaced at times and fireballs overlap their image the first few shots.

GLideN64 is actually now the fastest plugin on Super Smash Bros. (was gln64) when FBEmulation is disabled,and this is with more accuracy sorta like Glide64 has.
Four DKs on Hyrule can actually reach 60fps at times!
The graphics (like "full powered" lighting) still render "properly" while the outer screen is glitched.
I do get the black square replacing the magnifying glass when a player is near a death zone.
A good feature to add for manual triggering is "buffer clear" so the outer screen will look clean without needing FBEmulation enabled if you are trying to squeeze out the most speed.

Edit: Conker is still giving me a black screen but runs and also no longer exits.

Turning off FBEmulation makes visuals appear and the framerate is really smooth!
(using the "Framerate Fix" cheat I ported to NTSC)
The textures are perfect from what I experienced,and the effects like the sunlight and Mrs. Bee's wings are fully intact.
Speech bubbles seem perfect but I think there is a minor few pixels missing on some of them.
There is some instances where I can see other floors through some walls.
And I am obviously getting a rectangle shadow for Conker and the square on the top left of the screen like the original glN64.

I wonder what's causing the black screen in Conker,and I am puzzled Banjo-Tooie also gets some black screen moments when no HUD elements are onscreen.
« Last Edit: May 22, 2015, 01:07:47 AM by retroben »

Offline retroben

  • float
  • ****
  • Posts: 432
    • View Profile
Re: GLideN64 Android port
« Reply #177 on: May 22, 2015, 01:32:04 AM »
Paper Mario no longer exits,and I now know that the Star speech is visible,but the same glitches I mentioned before,and additional general issues like a fence's texture changing size.
During fighting Bowser when he becomes invincible,the screen resolution gets too big and overlaps the screen on the cutscenes when you are attacking him there. Forgot to mention the star on the bottom right after speech ends is glitched out in a rectangle shape.

OKAY.

First unique issue.

Kirby 64 has flipped images for Nintendo and HAL Laboratory before the title screen.
The fairy cutscene looks perfect,but the end had a glitched background.
File select textures are repeating,and after hitting a star block in level 1,the Health HUD changed to tiny repeating ones. (though this one is a general issue like most other games with texture sizes)

Edit: Zelda Ocarina no longer exits,as I mentioned on several games... skybox displaced textures,and wrong sized textures at times on walls and floors.
Unique issues like no triangles when Z-Targeting an enemy,HUD icon for A is too small,and last heart is missing from the screen.

Most irritating issue at the moment is the one for pretty much every game with the wrong size textures issue.
So I will probably try to leave out any more non-unique texture size issues for any further test results.

A special treat...

Majora's Mask European Debugger Build: With four controllers enabled,the debug stats will appear at boot time,the stats are colored squares instead of text and the timestamp. (Glide64 shows these)
Missing afterimage effect on title sequence because it sticks to the screen background. :(
Graphics are okay and some identical issues from Ocarina,and it is missing the item moving into place of choice when selecting one.
Lens of Truth works fine on the Snowhead climbing challenge. ;D
Also,oddly,the A button is fine.

Unique one,the time of day HUD is missing all of the sprites making it impossible to know what time it is. :'(
Someone please test GLES2 with Majora's Mask (U) for this issue.

On a final note (heh note pun) for now,Banjo-Kazooie looks great,but it appears the blue or otherwise underwater effect is missing.
« Last Edit: May 22, 2015, 02:42:41 AM by retroben »

Offline rafar

  • int
  • **
  • Posts: 67
    • View Profile
Re: GLideN64 Android port
« Reply #178 on: May 22, 2015, 04:04:51 AM »
on my lg g2 with snapdragon 800 I only can run and play with GLES 2.0, I dont know if GLES 3.0 could be run correctly, actually with many glitches.

Offline littleguy

  • Moderator
  • double
  • *****
  • Posts: 1945
    • View Profile
Re: GLideN64 Android port
« Reply #179 on: May 22, 2015, 07:40:15 AM »
BTW, is it possible to build GLideNHQ as separate lib and link together with GLideN64 dll, as it is intended? If it is possible, it's better to make it this way.

Sure, and in fact that seems to have taken care of the remaining link errors.  Try my latest:
https://github.com/littleguy77/mupen64plus-ae/commit/4b0624f8e27591a0d3203b3d71566ccc99c40988
2012 Nexus 7, rooted stock Lollipop
Samsung Galaxy Victory, rooted stock Jelly Bean
Xperia PLAY, stock Gingerbread
OUYA, retail version