Skip to content

Commit

Permalink
Update v1.9.
Browse files Browse the repository at this point in the history
  • Loading branch information
TheOfficialFloW committed Jun 4, 2021
1 parent dce5225 commit e4ba284
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 50 deletions.
14 changes: 9 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ The port works by loading the official Android ARMv7 executable in memory, resol

## Changelog

### v1.9

- Fixed issue where some peds were invisible.
- Improved performance by using a draw speedhack in vitaGL.

### v1.8

- Updated to latest vitaGL which fixed a lot of bugs found during Bully development.
Expand Down Expand Up @@ -82,7 +87,7 @@ The port works by loading the official Android ARMv7 executable in memory, resol

## Setup Instructions (For End Users)

(If you have already installed the game and want to update to a newer release, you can simply install [GTASA.vpk](https://github.com/TheOfficialFloW/gtasa_vita/releases/download/v1.8/GTASA.vpk) on your *PS Vita*).
(If you have already installed the game and want to update to a newer release, you can simply install [GTASA.vpk](https://github.com/TheOfficialFloW/gtasa_vita/releases/download/v1.9/GTASA.vpk) on your *PS Vita*).

In order to properly install the game, you'll have to follow these steps precisely:

Expand All @@ -103,9 +108,9 @@ In order to properly install the game, you'll have to follow these steps precise
- Still in the apk, extract the file `libGTASA.so` from the `lib/armeabi-v7a` folder to `ux0:data/gtasa`.
- Open the `main.8.com.rockstargames.gtasa.obb` with your zip explorer (`.obb` files are zip files just like `.apk` files so just rename the `.obb` to `.zip`) and extract the contents to `ux0:data/gtasa`.
- Same as before, open the `patch.8.com.rockstargames.gtasa.obb` with the zip explorer and extract the contents inside the zip to `ux0:data/gtasa`.
- Download the [gamefiles.zip](https://github.com/TheOfficialFloW/gtasa_vita/releases/download/v1.8/gamefiles.zip) and extract the contents to `ux0:data/gtasa` (if it ask about overwriting files, say yes).
- Download the [gamefiles.zip](https://github.com/TheOfficialFloW/gtasa_vita/releases/download/v1.9/gamefiles.zip) and extract the contents to `ux0:data/gtasa` (if it ask about overwriting files, say yes).
- **Optional**: For a more authentic console experience, copy the file `ux0:data/gtasa/data/360Default1280x720.cfg` to `ux0:data/gtasa/` and rename it from `360Default1280x720.cfg` to `Adjustable.cfg`. This file is a leftover from the Xbox 360 version and provides you the console HUD (e.g. radar on bottom left).
- Install [GTASA.vpk](https://github.com/TheOfficialFloW/gtasa_vita/releases/download/v1.8/GTASA.vpk) on your *PS Vita*.
- Install [GTASA.vpk](https://github.com/TheOfficialFloW/gtasa_vita/releases/download/v1.9/GTASA.vpk) on your *PS Vita*.

If you have followed the steps correctly, this is how your `ux0:data/gtasa` folder should look like.

Expand All @@ -126,7 +131,6 @@ You can launch the Configurator app by clicking on the `Configuration` button lo
- You can input PC cheats by pressing **L** + **SELECT** to open the on-screen keyboard. See [CHEATS.md](CHEATS.md) for available and unavailable cheats (you can input cheat codes in lowercase as well as uppercase).
- The L2/R2 buttons are mapped to the rear touchpad on the top and the L3/R3 buttons are mapped to the front touchpad on the bottom. With v1.2 and higher, you can map L2/R2 to the front touchpad on the top.
- You can open the map by holding START and then releasing.
- There is a bug which causes invisible peds when you load a save straight after launching. To avoid that issue, start a new game and *then* load your save.
- You can get local freeroam coop and rampages working by replacing the main scripts with those of the PS3 version. See [COOP.md](COOP.md).
- Due to expired licensing, some songs were cut from the game. See [MUSIC.md](MUSIC.md) for a list of removed tracks and a guide on how to restore them.

Expand Down Expand Up @@ -190,7 +194,7 @@ Additionally, you'll need these libraries to be compiled as well with `-mfloat-a
- [vitaGL](https://github.com/Rinnegatamante/vitaGL)

- ````bash
make SOFTFP_ABI=1 SHARED_RENDERTARGETS=1 NO_DEBUG=1 install
make SOFTFP_ABI=1 SHARED_RENDERTARGETS=1 DRAW_SPEEDHACK=1 NO_DEBUG=1 install
````

Finally, in the folder of `gtasa_vita`, install SceLibc stubs using:
Expand Down
15 changes: 0 additions & 15 deletions companion/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,6 @@ bool fix_skin_weights = true;
bool ped_spec = false;
bool mobile_stuff = false;

bool allow_removed_tracks = false;
bool fuzzy_seek = false;
bool use_shader_cache = true;
bool enable_mvp_optimization = false;
Expand Down Expand Up @@ -370,8 +369,6 @@ void loadConfig(void) {
else if (strcmp("disable_ped_spec", buffer) == 0) ped_spec = value ? false : true;
else if (strcmp("ignore_mobile_stuff", buffer) == 0) mobile_stuff = value ? false : true;

else if (strcmp("allow_removed_tracks", buffer) == 0) allow_removed_tracks = (bool)value;

else if (strcmp("enable_fuzzy_seek", buffer) == 0) fuzzy_seek = (bool)value;
else if (strcmp("use_shader_cache", buffer) == 0) use_shader_cache = (bool)value;
else if (strcmp("enable_mvp_optimization", buffer) == 0) enable_mvp_optimization = (bool)value;
Expand Down Expand Up @@ -402,8 +399,6 @@ void saveConfig(void) {
fprintf(config, "%s %d\n", "disable_ped_spec", ped_spec ? false : true);
fprintf(config, "%s %d\n", "ignore_mobile_stuff", mobile_stuff ? false : true);

fprintf(config, "%s %d\n", "allow_removed_tracks", (int)allow_removed_tracks);

fprintf(config, "%s %d\n", "enable_fuzzy_seek", (int)fuzzy_seek);
fprintf(config, "%s %d\n", "use_shader_cache", (int)use_shader_cache);
fprintf(config, "%s %d\n", "enable_mvp_optimization", (int)enable_mvp_optimization);
Expand Down Expand Up @@ -480,8 +475,6 @@ char *options_descs[] = {
"When enabled, peds will have specular lighting reflections applied to their models.\nThe default value is: Disabled.", // disable_ped_spec
"When enabled, Mobile build widgets and windows will be shown (eg. App rating window, cutscene skip widgets, etc...)\nThe default value is: Disabled.", // ignore_mobile_stuff

"Allows the game to play removed tracks when using modded audio files.\nThe default value is: Disabled.", // allow_removed_tracks

"When enabled, MP3 audio loading may be faster but less accurate.\nThe default value is: Disabled.", // enable_fuzzy_seek
"Makes compiled shaders be cached on storage for subsequent usage. When enabled, the game will stutter on very first time a shader is compiled but will make the game have more fluid gameplay later.\nThe default value is: Enabled.", // use_shader_cache
"Moves MVP calculation from GPU to CPU. May improve performances.\nThe default value is: Disabled.", // enable_mvp_optimization
Expand All @@ -506,8 +499,6 @@ enum {
OPT_PED_SPEC,
OPT_MOBILE_STUFF,

OPT_ALLOW_REMOVED_TRACKS,

OPT_FUZZY_SEEK,
OPT_SHADER_CACHE,
OPT_MVP_OPT,
Expand Down Expand Up @@ -624,12 +615,6 @@ int main(int argc, char *argv[]) {
SetDescription(OPT_MOBILE_STUFF);
ImGui::Separator();

ImGui::TextColored(ImVec4(255, 255, 0, 255), "Audio");
ImGui::Text("Allow removed tracks:"); ImGui::SameLine();
ImGui::Checkbox("##check17", &allow_removed_tracks);
SetDescription(OPT_ALLOW_REMOVED_TRACKS);
ImGui::Separator();

ImGui::TextColored(ImVec4(255, 255, 0, 255), "Optimizations");
ImGui::Text("MP3 Fuzzy Seek:"); ImGui::SameLine();
ImGui::Checkbox("##check16", &fuzzy_seek);
Expand Down
1 change: 0 additions & 1 deletion gamefiles/config.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ disable_mipmaps 0
fix_skin_weights 1
disable_ped_spec 1
ignore_mobile_stuff 1
allow_removed_tracks 0
enable_fuzzy_seek 0
use_shader_cache 1
enable_mvp_optimization 0
Expand Down
2 changes: 0 additions & 2 deletions loader/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ int read_config(const char *file) {
config.fix_skin_weights = 1;
config.disable_ped_spec = 1;
config.ignore_mobile_stuff = 1;
config.allow_removed_tracks = 0;
config.enable_fuzzy_seek = 0;
config.use_shader_cache = 1;
config.enable_mvp_optimization = 0;
Expand Down Expand Up @@ -67,7 +66,6 @@ int read_config(const char *file) {
CONFIG_VAR(fix_skin_weights)
CONFIG_VAR(disable_ped_spec)
CONFIG_VAR(ignore_mobile_stuff)
CONFIG_VAR(allow_removed_tracks)
CONFIG_VAR(enable_fuzzy_seek)
CONFIG_VAR(use_shader_cache)
CONFIG_VAR(enable_mvp_optimization)
Expand Down
1 change: 0 additions & 1 deletion loader/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,6 @@ typedef struct {
int fix_skin_weights;
int disable_ped_spec;
int ignore_mobile_stuff;
int allow_removed_tracks;
int enable_fuzzy_seek;
int use_shader_cache;
int enable_mvp_optimization;
Expand Down
48 changes: 22 additions & 26 deletions loader/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@
int sceLibcHeapSize = MEMORY_SCELIBC_MB * 1024 * 1024;
int _newlib_heap_size_user = MEMORY_NEWLIB_MB * 1024 * 1024;

unsigned int _oal_thread_priority = 64;
unsigned int _oal_thread_affinity = 0x40000;

SceTouchPanelInfo panelInfoFront, panelInfoBack;

void *__wrap_memcpy(void *dest, const void *src, size_t n) {
Expand Down Expand Up @@ -205,16 +208,16 @@ void *OS_ThreadLaunch(int (* func)(), void *arg, int cpu, char *name, int unused

switch (priority) {
case 0:
vita_priority = 68;
vita_priority = 67;
break;
case 1:
vita_priority = 67;
vita_priority = 66;
break;
case 2:
vita_priority = 66;
vita_priority = 65;
break;
case 3:
vita_priority = 65;
vita_priority = 64;
break;
default:
vita_priority = 0x10000100;
Expand Down Expand Up @@ -256,11 +259,6 @@ void *OS_ThreadLaunch(int (* func)(), void *arg, int cpu, char *name, int unused
return NULL;
}

void OS_ThreadWait(void *thread) {
if (thread)
sceKernelWaitThreadEnd(*(int *)(thread + 0x24), NULL, NULL);
}

void *OS_ThreadSetValue(void *RenderQueue) {
*(uint8_t *)(RenderQueue + 601) = 0;
return NULL;
Expand Down Expand Up @@ -601,27 +599,25 @@ void patch_game(void) {
if (config.disable_detail_textures)
*(int *)so_find_addr("gNoDetailTextures") = 1;

if (config.allow_removed_tracks) {
hook_thumb(so_find_addr("_Z14IsRemovedTracki"), (uintptr_t)ret0);
hook_thumb(so_find_addr("_Z14IsRemovedTracki"), (uintptr_t)ret0);

// QueueUpTracksForStation
hook_thumb((uintptr_t)text_base + 0x003A152A, (uintptr_t)text_base + 0x003A1602 + 0x1);
// QueueUpTracksForStation
hook_thumb((uintptr_t)text_base + 0x003A152A, (uintptr_t)text_base + 0x003A1602 + 0x1);

// ChooseMusicTrackIndex
hook_thumb((uintptr_t)text_base + 0x003A35F6, (uintptr_t)text_base + 0x003A369A + 0x1);
// ChooseMusicTrackIndex
hook_thumb((uintptr_t)text_base + 0x003A35F6, (uintptr_t)text_base + 0x003A369A + 0x1);

// ChooseIdentIndex
hook_thumb((uintptr_t)text_base + 0x003A37C2, (uintptr_t)text_base + 0x003A385E + 0x1);
// ChooseIdentIndex
hook_thumb((uintptr_t)text_base + 0x003A37C2, (uintptr_t)text_base + 0x003A385E + 0x1);

// ChooseAdvertIndex
hook_thumb((uintptr_t)text_base + 0x003A3A1E, (uintptr_t)text_base + 0x003A3AA2 + 0x1);
// ChooseAdvertIndex
hook_thumb((uintptr_t)text_base + 0x003A3A1E, (uintptr_t)text_base + 0x003A3AA2 + 0x1);

// ChooseTalkRadioShow
hook_thumb((uintptr_t)text_base + 0x003A4374, (uintptr_t)text_base + 0x003A4416 + 0x1);
// ChooseTalkRadioShow
hook_thumb((uintptr_t)text_base + 0x003A4374, (uintptr_t)text_base + 0x003A4416 + 0x1);

// ChooseDJBanterIndexFromList
hook_thumb((uintptr_t)text_base + 0x003A44D6, (uintptr_t)text_base + 0x003A4562 + 0x1);
}
// ChooseDJBanterIndexFromList
hook_thumb((uintptr_t)text_base + 0x003A44D6, (uintptr_t)text_base + 0x003A4562 + 0x1);

if (config.fix_heli_plane_camera) {
// Dummy all FindPlayerVehicle calls so the right analog stick can be used as camera again
Expand Down Expand Up @@ -710,7 +706,6 @@ void patch_game(void) {

// do not use pthread
hook_thumb(so_find_addr("_Z15OS_ThreadLaunchPFjPvES_jPKci16OSThreadPriority"), (uintptr_t)OS_ThreadLaunch);
hook_thumb(so_find_addr("_Z13OS_ThreadWaitPv"), (uintptr_t)OS_ThreadWait);

// do not use mutex for RenderQueue
hook_thumb(so_find_addr("_Z17OS_ThreadSetValuePv"), (uintptr_t)OS_ThreadSetValue);
Expand Down Expand Up @@ -1237,8 +1232,9 @@ int main(int argc, char *argv[]) {
vglSetFragmentBufferSize(2 * 1024 * 1024); // default 512 * 1024
vglSetUSSEBufferSize(64 * 1024); // default 16 * 1024
vglSetVertexPoolSize(48 * 1024 * 1024);
vglInitExtended(0, SCREEN_W, SCREEN_H, MEMORY_VITAGL_THRESHOLD_MB * 1024 * 1024, config.aa_mode);
vglSetupGarbageCollector(127, 0x20000);
vglUseVram(GL_TRUE);
vglInitExtended(0, SCREEN_W, SCREEN_H, MEMORY_VITAGL_THRESHOLD_MB * 1024 * 1024, config.aa_mode);

jni_load();

Expand Down

0 comments on commit e4ba284

Please sign in to comment.