Comments (24)
This is not a NOP. NOP in Thumb/ThumbV2 execution set is BF00, or any MOV Rd,Rd. BICGT is a working instruction: https://developer.arm.com/documentation/ddi0406/cb/Application-Level-Architecture/Instruction-Details/Alphabetical-list-of-instructions/BIC--register-
Hmm, that's games original opcode, and what we are going to write is NOP. (0x8000F3AF) All the patch has been verified by me in IDA.
from jpatch.
@RusJJ I have an idea but I don't want to open another issue so I'll say here.
In PC version, emergency vehicles have two kinds of siren, the second siren can be actived by keeping pressing H while the default siren is on.
Mobile disabled it by bad code implement. I have an idea to reenable that:
-
Place a 4-byte NOP at
CVehicle::ProcessSirenAndHorn
+ 0x7A -
Place 0x2100 ( MOVS R1, #0 ) at
CVehicle::ProcessSirenAndHorn
+ 0x7A + 4 -
Place a 4-byte NOP at
CVehicle::ProcessSirenAndHorn
+ 0xB0
That's "SecondSirenFix" at all.
from jpatch.
That's "SecondSirenFix" at all.
Grab the artifact at https://github.com/AndroidModLoader/JPatch/actions/runs/5796999054 and test it if you like. Let me know!
from jpatch.
@RusJJ I'm glad to see that you did it. I tried it :)
The second siren works well but after releasing the button the siren state will be reversed. I think the code implement should be that:
aml->Write(pGTASA + 0x590132, "\xAF\xF3\x00\x80\x00\x21", 6);
aml->Write(pGTASA + 0x590168, "\xAF\xF3\x00\x80", 4); // It's NOP.W so it doesn't make glitch (maybe?)
Based on cleo code:
{$CLEO .csa}
0DD0: 11@ = get_label_addr @CVehicle_ProcessSirenAndHorn
0DD1: 11@ = get_func_addr_by_cstr_name 11@
11@ -= 1
11@ += 0x7A // MOVS R1, #0
0DD9: write_mem_addr 11@ value 0x8000F3AF size 4 add_ib 0 protect 1 // NOP.W
11@ += 4 // CMP.W R1, R0,LSR#7
0DD9: write_mem_addr 11@ value 0x2100 size 2 add_ib 0 protect 1 // MOVS R1, #0
11@ += 0x32 // BICGT.W R2, R2, #0x8000
0DD9: write_mem_addr 11@ value 0x8000F3AF size 4 add_ib 0 protect 1 // NOP.W
:CVehicle_ProcessSirenAndHorn
hex
"_ZN8CVehicle19ProcessSirenAndHornEb" 00
end
from jpatch.
BICGT.W R2, R2, #0x8000
This is not a NOP. NOP in Thumb/ThumbV2 execution set is BF00, or any MOV Rd,Rd. BICGT is a working instruction: https://developer.arm.com/documentation/ddi0406/cb/Application-Level-Architecture/Instruction-Details/Alphabetical-list-of-instructions/BIC--register-
from jpatch.
No, that's not the reason. Try now.
from jpatch.
I tried again and the problem doesn't change. The third step (to make game don't reverse siren state when press the horn button for more than 0.2 second) was strange but my cleo code works properly. PlaceNOP(xxx, 2)
will write 00 BF 00 BF
in memory, but my idea is write AF F3 00 80
in memory. Or try that in IDA, change these bytes and decompile that function.
from jpatch.
@RusJJ At least, I found the way to enable to control polmavs' searchlight.
Just hook CPad::HornJustDown(), check if the vehicle is a polmav, if so, call CTouchInterface::IsReleased(), if not, call original function.;)
from jpatch.
Because, polmavs' vehicle class is 3, and HornJustDown will check that, so we need to do a special check.
And about the second siren fix, we really need to write a 64-bit NOP at pGTASA + 0x590168, or the code logic will be wrong(?).
from jpatch.
Bros what is the answer for my request?
from jpatch.
@bloodyplayer I see. For №2, that's by game design, no bug.
For crosshair of flamethrower, that's related to whether we are aiming.
And crouch ability, PC mixsets will not make us able to crouch with file ex, that's true.
About LV pay'n spray, even a small cleo script can do that.
At last, tanks won't shoot at some fixed point on screen, the crosshair will be useless. Or you need a useful crosshair, sadly we need to rewrite game's tank fire system at all, that's to difficult.(A PC mod did that, but still has many problems)
from jpatch.
from jpatch.
Can we see idle cam in the next update it will be look cool
Like in ps2/pc
from jpatch.
we really need to write a 64-bit NOP at pGTASA + 0x590168, or the code logic will be wrong(?)
Ok, i got some time to investigate on this. Yes, it should be 4-byte opcode, otherwise the next important opcode "EOR" will be always called no matter what (because of IT instruction).
Can we see idle cam in the next update it will be look cool
Checked the game code, probably, that's possible. But dont wait for it now.
idle in air
Most likely it's a glitch. Im not going to add this.
from jpatch.
@RusJJ Works properly :)
Jetpack can be hovered in, just press Q and E on PC (some versions have bug, but no matter). It's also a command to look back, so pressing screen in mobile version makes jetpack to hover. Add a button to control is a good idea perhaps? Like control hydra's jet mode by button.
from jpatch.
Add a button to control is a good idea perhaps? Like control hydra's jet mode by button.
After 5 minutes trying, I found a VERY simple method to let us hover jetpack by button:In CPad::GetJetpackHover()
func, turn CTouchInterface::IsHeldDown(175, 1)
to CTouchInterface::IsTouched(30, 1, 0)
3FA49A: MOVS R0, #175 -> MOVS R0, #30 ; We can use any widget id but 30 (nitro ctrl) is the best I think ;)
3FA4A0: BLX j__ZN15CTouchInterface10IsHeldDownENS_9WidgetIDsEi -> BLX j__ZN15CTouchInterface9IsTouchedENS_9WidgetIDsEP9CVector2Di ; Now we needn't long press
from jpatch.
Add a button to control is a good idea perhaps? Like control hydra's jet mode by button.
After 5 minutes trying, I found a VERY simple method to let us hover jetpack by button:In
CPad::GetJetpackHover()
func, turnCTouchInterface::IsHeldDown(175, 1)
toCTouchInterface::IsTouched(30, 1, 0)
3FA49A: MOVS R0, #175 -> MOVS R0, #30 ; We can use any widget id but 30 (nitro ctrl) is the best I think ;) 3FA4A0: BLX j__ZN15CTouchInterface10IsHeldDownENS_9WidgetIDsEi -> BLX j__ZN15CTouchInterface9IsTouchedENS_9WidgetIDsEP9CVector2Di ; Now we needn't long press
Will it available for players soon bro?
from jpatch.
Will it available for players soon bro?
It's up to Killman to decide.
from jpatch.
from jpatch.
It seems that my jetpack patch solution does not define the R2 register, will make a bug. So the best way is hook CTouchInterface::IsHeldDown
, do a special check if player is on a jetpack, and call IsTouched(30, 0, 2)
.
@RusJJ What's more, boat Predator has a fixed gun can used by player and cops, but in mobile version, it has messed up. A very simple way to patch is that:
5E2940: MOVS R1, #0 -> #1
And it will work when FixMissingShootBtnForSWAT option of JPatch is enabled.
from jpatch.
from jpatch.
Thank u for ur reply guys I have two requests: 1) for jetpack instead of holding the screen for being idle in air instead add a lock button for being idle it would be easy for rotating the camera 360° and shooting 2) can the countermeasures of hydra can restored? For mobile war drum studios screwed that to implement in the game I think so 🤔 #(shooting a minigun/flamethrower when Crouching it's animation is weird) I hope u guys rock for gta sa mobile improvements
…
On Sun, Aug 13, 2023, 6:46 AM 小流汗黄豆 @.> wrote: @bloodyplayer https://github.com/bloodyplayer I see. For №2, that's by game design, no bug. For crosshair of flamethrower, that's related to whether we are aiming. And crouch ability, PC mixsets will not make us able to crouch with file ex, that's true. About LV pay'n spray, even a small cleo script can do that. At last, tanks won't shoot at some fixed point on screen, the crosshair will be useless. Or you need a useful crosshair, sadly we need to rewrite game's tank fire system at all, that's to difficult.(A PC mod did that, but still has many problems) — Reply to this email directly, view it on GitHub <#15 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/A6U3YZL37BLS4BQGIPHSRSDXVATILANCNFSM6AAAAAA3AS34MM . You are receiving this because you were mentioned.Message ID: @.>
Will these things get a response in future?
from jpatch.
No, if you will beg for it every day
from jpatch.
Some of the features will be in the future JPatch. If they are not, that means im not going to do this. Like asking me to add missing icon in a third-party main.scm ... 🤦
from jpatch.
Related Issues (20)
- Polmav lights HOT 6
- JPatch
- Add Extended Gang Wars support HOT 2
- Things to do HOT 6
- Is it somehow possible to fix sharp, wall-like draw distance cutoff due to less dense distant fog? HOT 5
- CJ body doesnt update in interiors HOT 3
- FixIsCharDead0HP breaks scripts HOT 3
- Do not take weapons after being admitted to the hospital. HOT 4
- FixEmergencyVehicles causing fps drop in some places HOT 1
- Restore broken features(forgotten features) HOT 6
- A few improvements HOT 3
- Exclusive cheat codes GTA SA Mobile HOT 15
- [Feature] Any solution for a working frame limiter in GTA Vice City Mobile HOT 12
- repair few mechanics in game HOT 4
- gta sa: game crashes when trying to enter a cheat code HOT 3
- Stunt smoke? HOT 2
- Improve gangster AI
- An idea to why player is forced to close the door when leaving a car HOT 1
- GTA SA: game crashes after activating cheat codes HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jpatch.