Game Turbo Android Apk

1 view
Skip to first unread message

Enrique Fats

unread,
Aug 3, 2024, 6:02:23 PM8/3/24
to nadistocu

Yesterday I bought NVIDIA Shield and installed RetroArch Plus from Google play. I love this application so far but I have a few questions which I was unable to answer myself. Please I need clarification if the following is possible.

Button sequence - is it possible to program one button. Lets say L1 which would act as if I have pressed B and then after 0.5 seconds button A. Imagine a NES game Turtles 3 when you do a special attack. But you could do that with a single button press.

Similar to 1. - Is it possible to map a trigger button like L1 which when held down would turn other buttons like R1-3, L2-3 and others to different buttons altogether. I mean for example if you bind L3 to save a gamestate but if you press and hold L1 and then press L3 you instead can load a gamesave.

The turbo functionality is fairly similar, but not exactly as you describe. You can map a button as the turbo button and when you hold it, it toggles any other buttons into turbo mode until you repeat the process (i.e., hold and then press other buttons).

We're gonna focus on the Turbo Native for Android lib. I feel like Turbo Native for iOS has a lot more attention, so I want to focus on Android for a bit. It's also the platform I am more familiar with, to be honest.

In Android development, each screen used to be its own Activity, but that has changed over the years and now the "Single Activity" approach seems to be the way to go. Watch this talk called "Single activity: why, when, and how". In short, we're gonna have a single activity and each screen will be represented by a Fragment and we'll use Google's Navigation component library to decide which fragment to present.

Next, you're going to need to create a Virtual Device, next to the "run" icon (the green right-arrow in toolbar at the top), there's a dropdown with the "Device Manager" option. Click on it. In the sidebar that opens, click on the "Create Device" option. Choose whatever device you want to emulate, I'll go with a Pixel 2.

Now, let's add the Turbo lib. On the left sidebar, there's a "Gradle Scripts" section dropdown. Open it. In there, you should see 2 files named build.gradle, one for the project and one for th module. Open the module one. On it, scroll to the bottom where your dependencies are listed and add the Turbo Native one:

Before we start, let's create a util package where we're going to have a Constants Kotlin file. To do that, right-click on the root package and choosing the "New > Package" option. Then create the "util" package.

Now, create a Kotlin class called MainSessionNavHostFragment. This class will extend the TurboSessionNavHostFragment class that ships with Turbo, feel free to copy the body of the class (make sure the imports are correct and the package name too):

Okay, now let's create our configuration.json file. Right-click on the project root named "app" and choose "New > Directory", then call it "assets/json". Then, right-click on the json directory we just created, and add a new file called configuration.json with the following contents:

We only have one rule defined in this file right now. This is the "catch-all" rule, which will be applied to every navigation started by Turbo. By default, it will render the fragment configured as the turbo://fragment/web URI. Let's create that fragment and register it in our MainSessionNavHostFragment.

To create the fragment, let's first create a "features" package and then a "web" package inside of it. The "features" package will be where we keep our fragments and we can create sub packages for each subsystem we may have. For now, we only have one which we'll call "web".

Notice that we're annotating this class as the turbo://fragment/web URI using the TurboNavGraphDestination annotation. This matches our URI config for the catch-all rule in our configuration.json file.

Next, we need to update our MainActivity to use the MainSessionNavHostFragment we have just created. But before we do that, let's do a refactor and also move it to the "main" package. You may have to do it twice for the refactoring to take effect.

This activity class is referenced in the AndroidManifest.xml file, make sure you update the reference to also use the .main package. You can edit the manifest by clicking on the "app/manifests" section on your left sidebar. Since we're changing the manifest, let's also make sure we add the INTERNET permission to our app, otherwise we won't be able to make network requests.

As of right now, mobile users have access to all the features exactly the way it works on mobile. As long as we build our features with a mobile first mentality using responsive UIs, we should be good most of the time. However, as of right now, you may notice our app is a little weird to use on mobile. Let's tweak our app so it looks better.

I've tried to mount the .gog file directly but it keeps telling me that the game needs the cd, and if I edit the .dat file and delete the .ogg part it mounts it, but still ask for the cd when I execute the game.

Well, I bouth the original game in 1998 too, and I thought this version would be easier to make it work, that's why I bought it again. If you can help me to mount my original cd (after converting it to .iso or .bin), I would thank you too.

I had similar trouble getting the gog versions of dungeon keeper and
theme hospital running on Linux.
After hours of searching, it turned out that dosbox needed to be built
with SDL_sound support included in order to mount those type of images.
I'm assuming that you have no way of loading the SDL_sound and its dev
packages on Android, then re-compiling dosbox, so you'll probably need to get the
Dosbox Turbo author to re-build his version with it included.
Sorry.

The Android ports of DosBox are compiled w/o sdl_sound library in order to save resources on mobile devices. That means no CD-Audio support in your bin/cue file if using OGG or MP3. Best option is to modify the cue file as above (ie. remove the audio tracks from the cue file), or just mount the bin/iso/gog file instead of trying to mouse the cue/inst file. Once you've mounted the bin file, install the game and run the setup.exe to select either soundblaster or midi for the music.

Worked for every GOG game I've tried on DosBox Turbo. If you really desire MP3/OGG audio support, contact the dosbox turbo author and let him know. He told me if theres enough demand, he'll recompile with sdl_sound... but who knows what kind of performance impact that would have.

[EDIT] I assume you are using legally purchased GoG images... as no support can be provided for abandonware!
[EDIT2] Latest version of DosBox Turbo now supports mixed mode cd's (ie. CD-Audio) for MP3&OGG. No need to edit cue files anymore.

libjpeg-turbo is a JPEG image codec that uses SIMD instructions to accelerate baseline JPEG compression and decompression on x86, x86-64, Arm, PowerPC, and MIPS systems, as well as progressive JPEG compression on x86, x86-64, and Arm systems. On such systems, libjpeg-turbo is generally 2-6x as fast as libjpeg, all else being equal. On other types of systems, libjpeg-turbo can still outperform libjpeg by a significant amount, by virtue of its highly-optimized Huffman coding routines. In many cases, the performance of libjpeg-turbo rivals that of proprietary high-speed JPEG codecs.

libjpeg-turbo implements both the traditional libjpeg API as well as the less powerful but more straightforward TurboJPEG API. libjpeg-turbo also features colorspace extensions that allow it to compress from/decompress to 32-bit and big-endian pixel buffers (RGBX, XBGR, etc.), as well as a full-featured Java interface.

libjpeg-turbo was originally based on libjpeg/SIMD, an MMX-accelerated derivative of libjpeg v6b developed by Miyasaka Masaru. The TigerVNC and VirtualGL projects made numerous enhancements to the codec in 2009, and in early 2010, libjpeg-turbo spun off into an independent project, with the goal of making high-speed JPEG compression/decompression technology available to a broader range of users and developers.

TurboJPEG API
This API provides an easy-to-use interface for compressing and decompressing JPEG images in memory. It also provides some functionality that would not be straightforward to achieve using the underlying libjpeg API, such as generating planar YUV images and performing multiple simultaneous lossless transforms on an image. The Java interface for libjpeg-turbo is written on top of the TurboJPEG API. The TurboJPEG API is recommended for first-time users of libjpeg-turbo. Refer to tjexample.c and TJExample.java for examples of its usage and to -turbo.org/Documentation/Documentation for API documentation.

libjpeg API
This is the de facto industry-standard API for compressing and decompressing JPEG images. It is more difficult to use than the TurboJPEG API but also more powerful. The libjpeg API implementation in libjpeg-turbo is both API/ABI-compatible and mathematically compatible with libjpeg v6b. It can also optionally be configured to be API/ABI-compatible with libjpeg v7 and v8 (see below.) Refer to cjpeg.c and djpeg.c for examples of its usage and to libjpeg.txt for API documentation.

libjpeg-turbo includes extensions that allow JPEG images to be compressed directly from (and decompressed directly to) buffers that use BGR, BGRX, RGBX, XBGR, and XRGB pixel ordering. This is implemented with ten new colorspace constants:

Setting cinfo.in_color_space (compression) or cinfo.out_color_space (decompression) to one of these values will cause libjpeg-turbo to read the red, green, and blue values from (or write them to) the appropriate position in the pixel when compressing from/decompressing to an RGB buffer.

When using the RGBX, BGRX, XBGR, and XRGB colorspaces during decompression, the X byte is undefined, and in order to ensure the best performance, libjpeg-turbo can set that byte to whatever value it wishes. If an application expects the X byte to be used as an alpha channel, then it should specify JCS_EXT_RGBA, JCS_EXT_BGRA, JCS_EXT_ABGR, or JCS_EXT_ARGB. When these colorspace constants are used, the X byte is guaranteed to be 0xFF, which is interpreted as opaque.

c80f0f1006
Reply all
Reply to author
Forward
0 new messages