You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current objective is to automate the process of updating opcode.txt. Sanny would need to:
Compile using a specific edit mode (working)
Decompile with an updated edit mode
Make opcode.txt from the output file
Use a settings.ini specific to this task
The command line process doesn't work well when Sanny is already running. I usually make a duplicate of the exe (Sanny3) to manage batch processing. Perhaps a compact experimental command line only compiler might be more appropriate for these tasks. A different tool could use a different settings.ini and games.xml and be independent of Sanny's current configuration, but still operate from the same program directory.
Decoupling the disassembler and the compiler from the IDE is one of the primary goals for the next major version (4.0?). I'd been making a few attempts in the past but they are far from completion.
Would it help in the interim if there is a new CLI option in addition to the existing \decompile one to also produce a new opcode.txt file? Something like:
sanny.exe -d test.scm --update-opcodes-txt
(note that I would like also to switch from backward slashes for CLI options to the more conventional dashes)
Yes, but... It would also help to document the \decompile option under About Sanny Builder.
An update option would avoid issues of deleting temp files when all I need is the opcode.txt.
How about? sanny.exe -u path1\test.txt -oldmode path2\opcodes-txt -newmode
Make opcodes.txt itself is a very straightforward tool and it can be extracted into an external CLI application. Then you can write a simple shell script that will decompile a source script with Sanny Builder (another option is needed to specify an edit mode to use during this task) and then invoke Make opcodes.txt on the generated source.
Let me re-phase the txt to txt conversion idea as I've complicated my update process by trying to add the proper use of constants in constant specific opcodes. I'm going to lose those constants in the update process.
Related issues:
I'm using a specialized CustomVariable.ini to mantain variable names, and CustomLabels that are highly sensitive to changes in the variables used and number of objects,
Efforts to switch to SCR like formats are frustrated because without the $Version directive I can't mix and match my code from previous projects.
Custom comments and high-level constructs are lost with a compile/decompile conversion or update process.
So... Wouldn't it be cool if Sanny could convert or update the commands and argument order in the selected text or whole script without messing with anything else? And given that new feature, it'd be pretty cool to use it from the CLI.
I suspect there are all kinds of complications with this suggestion but I'm trying to think beyond the particular annoyances of my current project to something that would be useful to everyone.
BTW, there is no easy setting to disable GXT comments like there is for most of the other options that add comment to the script text. Moving or renaming the file is kind of a brutal work around.
Make opcodes.txt itself is a very straightforward tool and it can be extracted into an external CLI application. Then you can write a simple shell script that will decompile a source script with Sanny Builder (another option is needed to specify an edit mode to use during this task) and then invoke Make opcodes.txt on the generated source.
also should help with #43 as running an external app would have its own admin rights prompt separate from the rest of the app.
there is no easy setting to disable GXT comments like there is for most of the other options that add comment to the script text. Moving or renaming the file is kind of a brutal work around.
should now be possible with <text> entry in modes.xml. Omitting this entry would leave the disassembled file without GXT comments.
This opcode.txt business needs to be my next priority. When can an external make_opcode tool be available? Batch processing probably won't be a concern right away but I'm optimistic about the new CLI options and would like to test out the whole process.
should now be possible with entry in modes.xml. Omitting this entry would leave the disassembled file without GXT comments
Yeah, now that I've got my files arranged the way I want it should be a trivial matter to make a copy of a root edit mode and remove all the GXT entries. I was planning on using special label files to hold jump addresses constant anyway, and maybe special variables and data files too, so a special root mode seems like the ideal solution.
@OrionSR have you tried that tool yet? Any feedback?
It does not fully match existing Sanny's behavior, as it completely ignores lines not having opcode prefix, but I figured this better suits that nature of the tool. Sanny is able to recognize keywords and classes and add them into the opcodes.txt, but for opcode search it might not be needed (there is Ctrl+Space for that matter).
No, sorry. I have not. I wasn't expecting the tool to be ready so quickly, or the GTA3 files to be so messed up. I'm a bit confused and worried about the functionality now though. This isn't a concern for development, I can manage the data manually easily enough.
I was considering creating an alternate example text for RockStyle commands where no opcodes are necessary due to the complete keyword list. The script can be decompiled with Write Opcodes disabled, and I'm hoping make_opcodes will generate the same number of commands as if it was enabled. I'm a very long ways from working up a class base format with keywords for all other opcodes. Bit it sounds like this isn't going to work as I'd hoped.
Can make command in CLI where used concrete case converting text strings? By default compiler use the setting SB. For example:
-string_case upper // or lower, as is
It will help avoid the need to edit settings. Useful when need to use formatting text:
0AD0: show_formatted_text_lowpriority "Text: %d" time 2000 1 // uppercase: INCORRECT FORMAT
0AD0: show_formatted_text_lowpriority "Text: %d" time 2000 1 // lowercase: good format. But other text is always small
0AD0: show_formatted_text_lowpriority "Text: %d" time 2000 1 // as is: GOOD
I'm hoping make_opcodes will generate the same number of commands as if it was enabled
I have created a separate repo for the make_opcodes rewrite. It now supports keywords and classes, and I'm planning to start using this tool in the next release.
An external tool also has its own security configuration which in theory should help with UAC on Windows 10 when Sanny is not in admin mode.
After #74 it's unclear where to save the list of commands extracted from a source with multiple extensions. Each extension owns their own opcodes.txt.
Short-term: overwrite default''s opcodes.txt
Long-term: analyze commands and sort them by extensions. Make separate opcodes.txt for each extensions and save into appropriate locations. Requires providing extensions information (currently known as extensions.txt) into make_opcodes
Activity
x87 commentedon Feb 8, 2020
Decoupling the disassembler and the compiler from the IDE is one of the primary goals for the next major version (4.0?). I'd been making a few attempts in the past but they are far from completion.
Would it help in the interim if there is a new CLI option in addition to the existing \decompile one to also produce a new opcode.txt file? Something like:
sanny.exe -d test.scm --update-opcodes-txt
(note that I would like also to switch from backward slashes for CLI options to the more conventional dashes)
OrionSR commentedon Feb 8, 2020
Yes, but... It would also help to document the \decompile option under About Sanny Builder.
An update option would avoid issues of deleting temp files when all I need is the opcode.txt.
How about? sanny.exe -u path1\test.txt -oldmode path2\opcodes-txt -newmode
x87 commentedon Feb 12, 2020
Make opcodes.txt itself is a very straightforward tool and it can be extracted into an external CLI application. Then you can write a simple shell script that will decompile a source script with Sanny Builder (another option is needed to specify an edit mode to use during this task) and then invoke Make opcodes.txt on the generated source.
#!/usr/bin/env sh sanny.exe -d input.scm -e sa_scr -o output.txt make_opcodes.exe output.txtOrionSR commentedon Feb 13, 2020
Let me re-phase the txt to txt conversion idea as I've complicated my update process by trying to add the proper use of constants in constant specific opcodes. I'm going to lose those constants in the update process.
Related issues:
So... Wouldn't it be cool if Sanny could convert or update the commands and argument order in the selected text or whole script without messing with anything else? And given that new feature, it'd be pretty cool to use it from the CLI.
I suspect there are all kinds of complications with this suggestion but I'm trying to think beyond the particular annoyances of my current project to something that would be useful to everyone.
BTW, there is no easy setting to disable GXT comments like there is for most of the other options that add comment to the script text. Moving or renaming the file is kind of a brutal work around.
x87 commentedon Sep 20, 2020
also should help with #43 as running an external app would have its own admin rights prompt separate from the rest of the app.
should now be possible with
<text>entry in modes.xml. Omitting this entry would leave the disassembled file without GXT comments.OrionSR commentedon Sep 20, 2020
This opcode.txt business needs to be my next priority. When can an external make_opcode tool be available? Batch processing probably won't be a concern right away but I'm optimistic about the new CLI options and would like to test out the whole process.
Yeah, now that I've got my files arranged the way I want it should be a trivial matter to make a copy of a root edit mode and remove all the GXT entries. I was planning on using special label files to hold jump addresses constant anyway, and maybe special variables and data files too, so a special root mode seems like the ideal solution.
x87 commentedon Sep 21, 2020
Try this one: https://sannybuilder.com/dev/make_opcodes.zip
Run as:
x87 commentedon Sep 26, 2020
@OrionSR have you tried that tool yet? Any feedback?
It does not fully match existing Sanny's behavior, as it completely ignores lines not having opcode prefix, but I figured this better suits that nature of the tool. Sanny is able to recognize keywords and classes and add them into the opcodes.txt, but for opcode search it might not be needed (there is Ctrl+Space for that matter).
OrionSR commentedon Sep 26, 2020
No, sorry. I have not. I wasn't expecting the tool to be ready so quickly, or the GTA3 files to be so messed up. I'm a bit confused and worried about the functionality now though. This isn't a concern for development, I can manage the data manually easily enough.
I was considering creating an alternate example text for RockStyle commands where no opcodes are necessary due to the complete keyword list. The script can be decompiled with Write Opcodes disabled, and I'm hoping make_opcodes will generate the same number of commands as if it was enabled. I'm a very long ways from working up a class base format with keywords for all other opcodes. Bit it sounds like this isn't going to work as I'd hoped.
wmysterio commentedon Oct 23, 2020
Can make command in CLI where used concrete case converting text strings? By default compiler use the setting SB. For example:
It will help avoid the need to edit settings. Useful when need to use formatting text:
Or is this feature already there?
x87 commentedon Oct 23, 2020
@wmysterio good idea, definitely worth it 👍
x87 commentedon Nov 16, 2020
I have created a separate repo for the make_opcodes rewrite. It now supports keywords and classes, and I'm planning to start using this tool in the next release.
An external tool also has its own security configuration which in theory should help with UAC on Windows 10 when Sanny is not in admin mode.
x87 commentedon Nov 30, 2020
I have released v0.1.1 of make_opcodes
https://github.com/sannybuilder/make_opcodes/releases
Usage: https://github.com/sannybuilder/make_opcodes#usage
Appreciate any early feedback.
x87 commentedon Nov 30, 2020
After #74 it's unclear where to save the list of commands extracted from a source with multiple extensions. Each extension owns their own
opcodes.txt.Short-term: overwrite
default''s opcodes.txtLong-term: analyze commands and sort them by extensions. Make separate opcodes.txt for each extensions and save into appropriate locations. Requires providing extensions information (currently known as
extensions.txt) intomake_opcodes