Quantcast
Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums!

    1. Red Dead Redemption 2

      1. PC
      2. Gameplay
      3. Missions
      4. Help & Support
    2. Red Dead Online

      1. Gameplay
      2. Find Lobbies & Outlaws
      3. Help & Support
      4. Frontier Pursuits
    1. Crews & Posses

      1. Recruitment
    2. Events

    1. GTA Online

      1. Diamond Casino & Resort
      2. DLC
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Grand Theft Auto Series

    3. GTA 6

    4. GTA V

      1. PC
      2. Guides & Strategies
      3. Help & Support
    5. GTA IV

      1. Episodes from Liberty City
      2. Multiplayer
      3. Guides & Strategies
      4. Help & Support
      5. GTA Mods
    6. GTA Chinatown Wars

    7. GTA Vice City Stories

    8. GTA Liberty City Stories

    9. GTA San Andreas

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    10. GTA Vice City

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    11. GTA III

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    12. Top Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    13. Wiki

      1. Merchandising
    1. GTA Modding

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    3. Featured Mods

      1. DYOM
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Red Dead Redemption

    2. Rockstar Games

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Programming
      5. Movies & TV
      6. Music
      7. Sports
      8. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    1. News

    2. Forum Support

    3. Site Suggestions

Seemann

[REL] Sanny Builder

Recommended Posts

SugarD-x

Can anyone verify this? I'm still getting this problem with every single Sanny Builder version no matter where I try to download it from. Either this is a false positive, or something malicious was slipped into the code long ago.


Edit: 3.05 is not flagged. It looks like every version after that is.

Edited by SugarD-x

Share this post


Link to post
Share on other sites
boludoz
I have some problems to decompile android scm (gta sa).
Unknown opcode 4604 at offset 83953.

it seems that it happens only with very specific versions. already solved
 I'm sorry I should have more expertise

 

 

 

Edited by boludoz

Share this post


Link to post
Share on other sites
Grinch_
3 minutes ago, Seemann said:

Version 3.2.3 is available!

  • improved support of the version of GTA San Andreas for WinStore, Xbox 360, and PS3
  • fixed an issue with opcodes 09A4 and 0A18 not being properly decompiled in SA_Mobile mode

https://sannybuilder.com/downloads.html

 

Finally something after so long!

Share this post


Link to post
Share on other sites
6Four9

Legend

Share this post


Link to post
Share on other sites
FireproofFlare
4 hours ago, Seemann said:

Version 3.2.3 is available!

  • improved support of the version of GTA San Andreas for WinStore, Xbox 360, and PS3
  • fixed an issue with opcodes 09A4 and 0A18 not being properly decompiled in SA_Mobile mode

https://sannybuilder.com/downloads.html

 

Seemann, could you please take a look at this topic of mine? It's about developing opcodes for Cleo Library. Thank you in advance and sorry if this is inappropriate.

Share this post


Link to post
Share on other sites
Vadim M.

No way! This is sweet, thanks for the update!

Share this post


Link to post
Share on other sites
Link/2019
On 8/19/2005 at 11:24 AM, Seemann said:

Seemann

Good Job.

Share this post


Link to post
Share on other sites
Vadim M.
Posted (edited)

Did some testings and, sadly, there are still some flaws left with compiling and decompiling "mobile" scripts.

First of all, if I want to compile fresh mobile scripts, it won't allow me to do it, because it doesn't like 11th value for 0A6E opcode.

Happens with Xbox 360, PS3 and fresh Android scripts. I didn't test the rest.
HnbAIXm.png

~~~

Secondly, If I manage to compile mobile scripts, SannyBuilder won't ever allow me to decompile the darn thing again.

Happens with Xbox 360, PS3. I didn't test the rest.
djmasYB.png
I didn't test it much, but it seems that the game actually loads these new scripts, however I don't know if it gives errors throughout the game.

Is it possible to fix it?

Edited by Vadim M.

Share this post


Link to post
Share on other sites
Seemann
5 hours ago, Vadim M. said:

Did some testings and, sadly, there are still some flaws left with compiling and decompiling "mobile" scripts.

First of all, if I want to compile fresh mobile scripts, it won't allow me to do it, because it doesn't like 11th value for 0A6E opcode.

Happens with Xbox 360, PS3 and fresh Android scripts. I didn't test the rest.
HnbAIXm.png

~~~

Secondly, If I manage to compile mobile scripts, SannyBuilder won't ever allow me to decompile the darn thing again.

Happens with Xbox 360, PS3. I didn't test the rest.
djmasYB.png
I didn't test it much, but it seems that the game actually loads these new scripts, however I don't if it gives errors throughout the game.

Is it possible to fix it?

 

Hi Vadim,

 

thanks for reporting, this is fixed and will be included in the next release.

 

 

 

Share this post


Link to post
Share on other sites
Seemann
Posted (edited)

Today is the Sanny Builder's 14th anniversary and I'm happy to present another update: Sanny Builder v3.2.4

 

Version Changes:

 

  • fixed bugs #0031, #0032, #0033, #0040, #0044
  • fixed regression defect when a CHM help file can not open
  • updated opcode definitions for GTA 3 and Vice City
  • added IDE support for CLEO 2.0 for III and VC

 

Edited by Seemann

Share this post


Link to post
Share on other sites
Vadim M.

Huge thanks for the update!

Share this post


Link to post
Share on other sites
OrionSR
Posted (edited)

Application Error: Exception EInOutError in module sanny.exe at 0013885A, I/O error 104.

 

Never mind, I think I've sorted things out.

 

The problem with Sanny is that it crashes and hangs when bad arguments are issued to the command line instead of... exiting with a useful error code. The strings are difficult to format so I'll probably be crashing Sanny a lot. I'll leave my inaccurate observations below in case it helps someone track down their issue.

 

Also, the Sanny application must be closed or the command line will cause Sanny to open both files for editing. (I copied sanny.exe to sanny3.exe and have been calling that file for command line compilation. So far I haven't run into any conflicts when sanny.exe is concurrently running as an application.)

 

The problem I was having with strings was a combination of special characters in C-like interfaces and spaces in the paths of filenames. The formatting below is finally working. Note the use of double slashes and \". 

 

char arguments[256] = "\\compile \"" + sourceText + "\" \"" + destinationScript + "\"";
Exec( "C:\\Sanny Builder 3\\sanny.exe", arguments , true );
\compile "C:\Users\OrionSR\Documents\GTA San Andreas User Files\Embedded\hijack.txt" "C:\Users\OrionSR\Documents\GTA San Andreas User Files\Embedded\hijack.s"

The Sanny application must be closed or the command will cause Sanny to open both files for editing.

____________________________________

 

Original observations with inaccurate conclusions:

Sanny crashes when called as an external application using command line options. Commands that work when Sanny is executed from the command line cause this error if executed by an 010 Editor script or a batch file.

 

The goal was to write a text "cleo" script with an 010 script, pass the text file to Sanny to be compiled, and then open the compiled cleo script for use by the calling 010 script. Since I couldn't be 100% confident that 010 was passing the arguments properly, I wrote a batch file to execute Sanny with hard coded arguments, but still got the same error when the batch file was called by 010 or executed from the command line of a Power Shell.

I'm not sure if this is a problem with Sanny or the Windows 10 environment, but I'm fairly confident that I've got the arguments formatted correctly. Any suggestions for how to manage this error would be appreciated. 

____________________________________

 

Update: I found a work around. Executing Sanny with command line arguments works as expected in the 010 Editor and batch files when executed while Sanny's program folder is the current working directory. This makes directory and path name management a lot more difficult but at least I can continue testing. Hopefully there's a more elegant solution.

Edited by OrionSR

Share this post


Link to post
Share on other sites
wmysterio
Posted (edited)
On 8/7/2019 at 11:08 PM, OrionSR said:

Application Error: Exception EInOutError in module sanny.exe at 0013885A, I/O error 104.

You need add mode in command line. I use this line in my GTA Script Generator:

\sa \nosplash \compile "C:\main.txt" "C:\main.scm"

For 3.2.2 it work. Today compiling to "SA SCR" automatically for some reason.

Edited by wmysterio

Share this post


Link to post
Share on other sites
OrionSR

Ah, yes. Good point. I had left out the mode as it wouldn't matter for the simple script I was compiling, and the arguments were giving me problems so I left out what I could to simplify the string. Hm... to work mode into the 010 script properly I'll need to add it as a variable, which won't clarify the formatting used in the string definition at all, so I think I'll leave it out of the example above and work it into a more complex script later. Thanks for pointing out the omission.

 

Share this post


Link to post
Share on other sites
Seemann

Sanny Builder v3.3.0

 

Version Changes:

  • added compiler support for Liberty City Stories SCM format
  • added aliases for the timer variables: TIMERA and TIMERB
  • changed the Ranges check option to apply to the global variables

Release Notes:

 

This release brings in the long-awaited support for one of the two GTA Stories games: Liberty City Stories. 

 

Sanny Builder lacked compiler support for this game mainly due to the heavily changed data types. Even though the final dissassembled file looks very similar to the GTA 3's main.scm format the underlying data types are completely different. The LCS scripts have much wider range of local variables: [email protected] to [email protected] comparing to [email protected]@ in GTA 3. At the same time number of allowed global variables was reduced down to 6655 comparing to 16 383 in GTA 3. 

 

Functions in LCS

 

It happened because of the shift to using function calls in the scripts and supporting the function's local stack. In the previous games a script had the local var space with the fixed address for each variable calculated as (var_index*4). For example, [email protected] held its value at the 4th, 5th, 6th and 7th bytes of the local var space. In LCS this approach was changed to introduce the function stack. Now a script has to maintain the base index for local variables, so the address to store the value of the variable calculated as (base_index + var_index) * 4. 

 

The new opcode 05AE and its conditional version 05AF were introduced to bring functions support in the language. The definitions of these opcodes look as follows:

 

05AE=-1,args %1d% out %2d% locals_base_index %3d% call_func %4p%
05AF=-1,  args %1d% out %2d% locals_base_index %3d% call_func %4p%

 

where args is the number of input parameters, out is the number of variables following the input parameters to store the function results and locals_base_index is the new base index for the current script.

 

:A
05AE: args 1 out 1 locals_base_index 2 call_func @B 100 $var

 

here the code starting at the A label (the A function) calls to the function located at the B label (the B function). Before calling the B function the base index becomes equal to 2, meaning the variables [email protected] and [email protected] of the current script will preserve their values during the execution of the B function. The variable [email protected] of the B function gets a new value of 100. Then the execution flow transfers to the B label and proceeds there until it finds the return command. After that the local variables of the B function are copied one by one to the variables provided as the out parameters ($var here). Finally the base index is decreased by 2.

 

Saved Variables

 

Another challenge presented in LCS was the introduction of so-called saved variables. The save system of LCS is made so some global variables preserve their values between different game sessions (this is the common behavior in the previous games) and some do not. There is a new segment at the SCM header that contains the list of the global variables preserving their values. Sanny Builder marks them with the combination of the $ and _ characters e.g. $_var. It means they are fully compatible with the other global variables but the underscore character also tells the compiler to put this variable onto the list of saved variables so they restore their values on the game load.


Timer Variables

 

In an attempt to minimize the difference between supported games and make the language more user-friendly new aliases are added for the timer variables (previously known as [email protected] and [email protected] or [email protected] and [email protected]). Now the disassembler uses TIMERA and TIMERB names respectively. While the older scripts are fully compatible it's highly encouraged to start using these aliases instead of the variables.

 

0006: TIMERA = 0

:WAIT_2S
0001: wait 0 ms
00D6: if
0019:   TIMERA > 2000
004D: jump_if_false @WAIT_2S
0662: printstring "2 seconds has passed"

 

Ranges Check for Global variables

 

While scripts may use many global variables their number is still limited (normally $2 to $3FFF). Sanny Builder allowed using numeric indexes for global variables that are out of var space bounds silently treating them as variables with string names. For example $0 would've been compiled as $2 (or any other available index). This behavior may lead to some unexpected results as the variable index changes during the compilation. Starting from this version the compiler throws an error when the option Ranges check is enabled and the variable index is not in the allowed range. Using ADMA to circumvent the ranges is still possible (&0 gets compiled as two bytes 00 00).

 

Share this post


Link to post
Share on other sites
PrakamyaKhare

Can any one help me,  how to load ini file in GTA sa Android.  I tried pc opcodes but it cause crash to my game. Please help me

On Mon Jul 29 2019 at 12:14 AM, Vadim M. said:

Did some testings and, sadly, there are still some flaws left with compiling and decompiling "mobile" scripts.

First of all, if I want to compile fresh mobile scripts, it won't allow me to do it, because it doesn't like 11th value for 0A6E opcode.

Happens with Xbox 360, PS3 and fresh Android scripts. I didn't test the rest.
HnbAIXm.png

~~~

Secondly, If I manage to compile mobile scripts, SannyBuilder won't ever allow me to decompile the darn thing again.

Happens with Xbox 360, PS3. I didn't test the rest.
djmasYB.png
I didn't test it much, but it seems that the game actually loads these new scripts, however I don't know if it gives errors throughout the game.

Is it possible to fix it?

Bro just change OA6E:  11 to OA6E:  10

It's really work. 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.