FORUMS
Remove All Ads from XDA

Half-Life 2 (portal) playable on non-tegra devices [How to]

3 posts
Thanks Meter: 16
 
By Marchelino, Junior Member on 2nd June 2014, 09:18 AM
Post Reply Email Thread
23rd June 2016, 01:02 PM |#151  
Senior Member
Flag Porto
Thanks Meter: 133
 
More
Quote:
Originally Posted by cpurage

Then why the hell it is loading on the full screen of Mali GPUs or even on older Adreno GPUs or even I saw in some threads on older PowerVRs, so it's not a bug at all, if needed a custom bootloader or special plugins to make it to full screen, please someone to share it ... I know that the app is not compatible with other chipsets different than TEGRA, that's because of scumbag VALVE/NVIDIA "ooouuuuhhh we are the best, we are going to port it only for SHIELD", whatever ...

Hello? You did read everything i wrote, right?
It's EMULATION, it's not guaranteed to work on every hardware or Android version available out there, and it's natural that newer hardware has more difficulty because of the newer drivers, instructions, etc, etc, etc. Older hardware is by now entirely scrutinated and well developed, so it's easier to know how to make these sort of things work.
It has nothing to do with bootloaders or whatever, you, like me and others, just have to wait. Either for the game to update, or the app/driver to update.
 
 
5th July 2016, 09:56 PM |#152  
Senior Member
Thanks Meter: 44
 
More
Did it that way, crashes in the middle of the Valve Logo.

I'm using a GPD XD Handheld, maybe mali t760 is not supported?

Quote:
Originally Posted by vuhuy

Here's a working configuration to play Half-Life 2 on rooted devices with a Mediatek MT6753 SOC (Mali T720 GPU) running Android Lollipop. Tested on a DOOGEE F5, but it should work on other MT6753 devices as well. This guide also explains how to use the Sixaxis Controller App with a DualShock Controller to play Half-Life 2 (including weapon switching).

Prerequisites

  • Rooted Android Phone with Mediatek MT6753
  • Half-Life 2 APK
  • GLtools APK
  • Compatible controller

In my case I've used a rooted DOOGEE F5 running Android 5.1 Lollipop (20160303), Half-Life 2 v56 APK that I've pulled from my NVIDIA SHIELD tablet, and GLTools v1.99 APK. The GLtools APK is distributed for free on the XDA forums, but if you want to support the developer you can download it from the Play Store.

Installation
  1. Install GLtools APK.
  2. Open GLtools and select the TEX(DE)coder driver from Saem Persun. If you don't select this driver, you will be running into some rendering problems (e.g. black textures). An internet connection is required for this option to show up.
  3. Tick the boxes that state you're aware of the conditions, and install the driver. I've used the 'normal' installation instead of flashing it with recovery, since flashing with recovery didn't work for me with the stock recovery on my DOOGEE F5.
  4. Grant GLtools SU rights if you haven't granted it before.
  5. If using non-recovery installation, your device will reboot shortly after installation.
  6. If using recovery installation, reboot to recovery and apply the install_gltools.zip located on your internal storage / SD card.
  7. After installation and rebooting, install the Half-Life 2 APK.
  8. Configure GLtools to run Half-Life 2 (next section).
  9. Optionally configure your controller to play Half-Life 2 (next section).

Configure GLtools to run Half-Life 2
  1. Open GLtools and select Half-Life 2 in the list.
  2. Use the following configuration (based on default settings):
    • Check "Enable custom settings for this app"
    • Check "Use fake GPU info"
    • Tap on "Use a template" and select GPU/CPU: Tegra 4 (SHIELD)
    • Check "Simple MapBuffer emulation"
    • Check "Software VBO emulation"
    • Check "Use packed stencil buffer"

Full configuration list:
Code:
Enable custom settings for this app: checked
Anti-aliasing (MSAA/CSAA): default (defined by app)
Use lower render resolution: 1x (disabled)
Force 16 bit rendering: unchecked
Optimize GLSL shaders: unchecked

Textures
Enable texture decompression: unsupported only
Enable texture recompression: decompressed only
Downscale textures: disable

FPS counter
Disable or use logcat if you want to see the FPS counter.

GPU name/emulation
Use fake GPU info: checked
Use fake CPU/RAM info: unchecked
Use a template: GPU/CPU Tegra 4 (SHIELD)
All other settings filled in by selected template

Emulation options
Simple MapBuffer emulation: checked
Software VBO emulation: checked
Used packed stencil buffer: checked
Half-float texture hack: unchecked
Fix FBO attachment sizes: unchecked
Decode sRGB: unchecked
Shader attribute reordering: unchecked

Expert options
Leave all options unchecked
Shader processing: don't do anything
The folder used for shaders: <path to android/data folder on SD card>/com.nvidia.valvesoftware.halflife2/files


Configure your controller
In some cases, you might need to adjust your controller mappings to play Half-Life 2 on your Android device. This is the case for MOBA and Playstation controllers. XBOX controllers should work fine after connecting via USB-OTG / wireless.

I'm using a wireless Playstation DualShock 3 controller with the app Sixaxis Controller v0.8.3. You can get this app of the Play Store. After pairing my controller with Bluetooth, I've configured the application for playing Half-Life 2:
  1. In the Sixaxis app, go to settings (can be found under the 'hamburger' menu).
  2. Tap on "Gamepad Settings".
  3. Check "Enable Gamepad".
  4. Tap on "Edit Mappings".
  5. Map your controller as it was a XBOX / SHIELD controller (cross: A, circle: B, square: X, triangle: Y).
  6. Fix the digital pad for weapon switching (next section).

DualShock Digital pad and Sixaxis Controller
In case you're using the same controller setup as me (Playstation DualShock 3 Controller with Sixaxis Controller app), everything will work fine except for the digital pad. In Half-Life 2, the digital pad is used for weapon switching. In order to make weapon switching work in the game, we'll need to adjust the bindings in the configuration file of the game. I'm using ES File Explorer for this task, which you can grab for free at the Play Store. You can also use your favorite file explorer, but ES has everything I needed for this task.
  1. Enable Root Explorer and mount system as R/W (read and write).
    1. Open the hamburger menu in ES File Explorer.
    2. Scroll down and tap on "Tools".
    3. Enable "Root Explorer" .
    4. Tap on in it, and a pop-up will open.
    5. Tap op "Mount R/W" and set "/system" as "RW".
    6. Grant ES File Explorer SU rights if your haven't granted it before.
  2. Copy the original configuration file "config.cfg" to your SD card. The file is located in "/data/data/com.nvidia.valvesoftware.halflife2/files/hl2/cfg".
  3. Also, write down the permissions, owner and group of the original configuration file mentioned in the previous step.
    1. Select the file by holding on to it.
    2. Tap on "Properties" (the properties button might be located under "More" in ES File Explorer")
    3. Write down the permissions, owner and group of the configuration file (e.g. mine has only RW for the owner [rw- --- ---] and is owned by u0_a114 in group u0_a114)
  4. Create an additional copy of the configuration file on your SD card as back up.
  5. Modify the copied "config.cfg" on your SD card using your favorite text-editor, or just use the ES Note Editor which comes with ES File Explorer.
  6. Change the digital pad bindings to make it work with the DualShock controller. Half-Life 2 is using UP / RIGHT / DOWN / LEFT as bindings, but you'll need to change this to UPARROW / RIGHTARROW / DOWNARROW / LEFTARROW. You will end up having this:
    Code:
    [...]
    bind "UPARROW" "slot1"
    bind "RIGHTARROW" "slot2"
    bind "DOWNARROW" "slot3"
    bind "LEFTARROW" "slot4"
    [...]
  7. Save the file, and copy it back to its original location.
  8. Restore the permissions, owner and group of the file.
  9. Mount "/system" back to read-only (RO).

Optimization
Please skip this part if you want to play the game. This section is for discussion only. I have tried various other optimizing functions of GLtools, with no success. Here are my findings:
  • Anti-aliasing (MSAA/CSAA). Disabling might improve performance. But it seems to me there is no MSAA/CSAA in this game, so default and disabled are basically the same thing.
  • User lower render resolution. Game will crash of set other than 1x (disabled).
  • Force 16 bit rendering. Game will crash if enabled.
  • Optimize GLSL shaders. Causes artifacts to non-static models (e.g. character faces) if enabled.
  • Enable texture recompression. Disabling this might improve performance, don't know yet. Might cause your device running out of memory.
  • Downscale textures. Makes game run smoother, but causes rendering problems (e.g. black textures) aside from the lower texture quality (hello there Sherlock).
Note that some performance tweaking is also available by editing the configuration file. Although not every command is available, I just snooped some extra FPS by disabling HDR and such.

Enjoy your City 17 guys! Don't forget to take a look to Xash3D for bringing the original Half-Life to your Android phone. Happy gaming.

22nd August 2016, 05:05 PM |#153  
Junior Member
Flag Bordeaux
Thanks Meter: 1
 
More
Hello tried on mtk6735p and near playable (i don't have controller and gamekeyboard.apk close when load the game...(1gbram))
This days buy a Lenovo Z2 (z2131) rooted in different way. With zui2 rom HL2 ends before valve logo and with cm13 unofficial it's 1.5 seconds with sound.... and crash !
Perhaps the root is not "enough" or is there any incompatibility with snapdragon 820 !
Did someone test with snapdragon820 & adreno 530 ?
24th August 2016, 12:25 PM |#154  
Senior Member
Flag Porto
Thanks Meter: 133
 
More
Quote:
Originally Posted by Ubi_fr

Hello tried on mtk6735p and near playable (i don't have controller and gamekeyboard.apk close when load the game...(1gbram))
This days buy a Lenovo Z2 (z2131) rooted in different way. With zui2 rom HL2 ends before valve logo and with cm13 unofficial it's 1.5 seconds with sound.... and crash !
Perhaps the root is not "enough" or is there any incompatibility with snapdragon 820 !
Did someone test with snapdragon820 & adreno 530 ?

It has been said before, HL2 doesn't work on Android M through this method. The game itself has been updated to M compatibility, so Tegra owners can play it with no problems, but for us it's Lollipop or nothing if we want the game to run.
Post Reply Subscribe to Thread

Tags
gltools, half-life 2, how to, non-tegra, portal

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes