ZenHAX

Free Game Research Forum | Official QuickBMS support | twitter @zenhax | SSL HTTPS://zenhax.com
It is currently Mon Jun 21, 2021 1:05 am

All times are UTC




Post new topic  Reply to topic  [ 580 posts ]  Go to page Previous 125 26 27 28 29 Next
Author Message
PostPosted: Fri Jan 08, 2021 9:03 am 
User avatar

Joined: Sat Sep 15, 2018 5:22 am
Posts: 397
sir aluigi, everything works fine in QuickBMS (at least i can't see any problem in current beta until now)
i think updating userDefineLang.xml of Notepad++ is needed
and i am pretty sure there is many useful things in QuickBMS that not included in quickbms.txt
i hope you have good time, thank you


Top
   
PostPosted: Tue Feb 02, 2021 3:03 pm 
User avatar

Joined: Sat Sep 15, 2018 5:22 am
Posts: 397
one of the things that QuickBMS can do is handling c strings and replacing forbidden characters and good handling of output file name

two things really needed
1)make an option to dissable all c-string errors (for example: when we want to use a wrong escape. and that option should replace 0x0D and 0x0A with a tag like <bms_tag=break> if we want to disable c-string error and use single line string)
2) using open FDSE NAME 2 not working if NAME have a forbidden chatacter (in this case, NAME string is "star*file.bin", but "*" replaced to "_" in exporting, and problem is that can't open exported file with open command based on exported NAME string)
open FDSE NAME 2
but it just trying to open "star*file.bin" instead of "star_file.bin"


Top
   
PostPosted: Sun Feb 07, 2021 10:20 pm 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 12296
1) I don't think I can implement any alternative encoding/method because it would take time and effort. And the lack of standards doesn't help. I'm sure we already discussed about it.

2) You can't use the * character on most filesystems. It's used as wildcard interpreted by console and terminals.
https://en.wikipedia.org/wiki/Filename# ... imitations


Top
   
PostPosted: Sat Feb 13, 2021 3:09 am 
User avatar

Joined: Sat Sep 15, 2018 5:22 am
Posts: 397
1) then i will keep to the current standard, thank you. but if you get free time, please think about xml slog, sir aluigi. because xml is easy to detecting errors, and it can be multi line and people can add id and label to their localization strings

2) i attached a open_naming.zip, and there is a file.bms in it that checks if a file exist or not before extraction
real file name is *my_file*.star in file.bin, and since it has forbidden character, then QuickBMS turn it to "_", but when i want to try open a forbidden named file with OPEN command, it's trying to open it with real forbidden name instead of fixed name with "_" chars


Attachments:
open_naming.zip [663 Bytes]
Downloaded 46 times
Top
   
PostPosted: Mon Feb 15, 2021 12:46 am 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 12296
2) Interesting, I will check it.


Top
   
PostPosted: Mon Feb 15, 2021 1:03 am 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 12296
ok I double checked.
The filename is passed as-is to the _wfopen and fopen API.
I also checked the unicode name and it's just intact.

The different behavior between input and output is due to security and "cleaning" reasons, the former needs maximum freedom for which no filters are applied while the latter must be filtered and limited.

So it's all ok.


Top
   
PostPosted: Sat Feb 27, 2021 12:52 pm 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 12296
New beta out.
There was a lame bug recently introduced in unzip_dynamic/zlib_noerror/deflate_noerror that returned an error.
I also added support for the dictionary in that same code since it costed me nothing.
Now tcc supports 64bit (long long) variables.


Top
   
PostPosted: Sat Feb 27, 2021 6:47 pm 
User avatar

Joined: Sat Sep 15, 2018 5:22 am
Posts: 397
i found a problem
Code:
string MY_SCRIPT_NAME = "script.bms"
include MY_SCRIPT_NAME


problem is that can't use a variable as a string for include command


Top
   
PostPosted: Sun Feb 28, 2021 10:49 am 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 12296
"include" only works with constant filenames because they get immediately loaded while parsing the script.


Top
   
PostPosted: Sun Feb 28, 2021 11:33 am 
User avatar

Joined: Sat Sep 15, 2018 5:22 am
Posts: 397
aluigi wrote:
"include" only works with constant filenames because they get immediately loaded while parsing the script.

can you please make it work with string variables in next beta? please fix it to use string var. please...
it's really needed

or atleast make a option to read include script from exe folder instead of bms folder
like this
Code:
include "my_script.bms" 1

1 for reading from exe folder and 0 from bms folder (default)


Top
   
PostPosted: Mon Mar 01, 2021 10:12 am 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 12296
It's a core function so I can't implement string variables.

While for the second request, "include" already does that automatically.
When you use include "file.bms" it will try the following locations in this order:
- bms_folder
- exe_folder
- file_folder
- current_folder
- output_folder

Isn't your file loaded automatically?

Here it works perfectly, just tested.


Top
   
PostPosted: Mon Mar 01, 2021 1:11 pm 
User avatar

Joined: Sat Sep 15, 2018 5:22 am
Posts: 397
core function? so many things will messed up if you touch it, i understand

works fine... but can you add a option to force using of a default location? i mean make it optional by adding number
or better, use types!
like below command
Code:
include "my_script.bms" exe_folder

for when we have same bms name in both exe folder and bms folder


Top
   
PostPosted: Mon Mar 01, 2021 4:30 pm 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 12296
It's possible to add that argument but honestly it's not useful at all.
The include feature is rarely used and 100% of times the name of the script is different than the main script, so what would be the advantage?


Top
   
PostPosted: Tue Mar 02, 2021 11:49 am 
User avatar

Joined: Sat Sep 15, 2018 5:22 am
Posts: 397
it's useful when we have same bms names in different folders

and can you do something about putdstring command to use default size of variable? i mean without writing length and just set it to "" to use real size of variable
Code:
getdstring MY_STRING 5

putdstring MY_STRING ""





found two problem (tested with last beta)

1) 0x for hex numbers
Code:
set MEMORY_FILE1 binary "0xFE"
goto 0 MEMORY_FILE1
getdstring HEX_NUMBER 4
if HEX_NUMBER = "0xFE"
print "value is right!"
endif

i know 0x used for hex numbers, but has problem with if command as string type

2) writing ] at end of a string that starts with [ while using a function (or [string])
there is no problem out of function, problem happens when used in a function
Code:
set MEMORY_FILE1 binary ""
goto 0 MEMORY_FILE1
callfunction PUT_STRING

startfunction PUT_STRING
putdstring "[a]" 2 MEMORY_FILE1
endfunction PUT_STRING


Top
   
PostPosted: Tue Mar 02, 2021 3:24 pm 

Joined: Sat Sep 28, 2019 7:00 pm
Posts: 380
@Shokoniraya:
1) Improper usage, should be: "getdstring HEX_NUMBER 4 MEMORY_FILE1". Also, it's not correct in general, since cstring looks different.
2) Also improper usage, should be: "putdstring "[a]" 3 MEMORY_FILE1" (since there are 3 characters in the string). A waaay more incorrect than the case above in general.
Just fyi, a lot of your "code" is working only because of casts and workarounds in quickbms. In all other languages you would be screwed around first few lines of the code. Please don't make this topic a generic stackoverflow board.

_________________
You can request AES keys on rin forums (the list with keys is also there)
AES keys finder and latest UE4 bms scripts: in this post


Top
   
PostPosted: Tue Mar 02, 2021 6:07 pm 
User avatar

Joined: Sat Sep 15, 2018 5:22 am
Posts: 397
1)
Code:
set MEMORY_FILE1 binary "0xFE"
get MEM_SIZE1 asize MEMORY_FILE1
print "%MEM_SIZE1%"
getdstring HEX_NUMBER 4 MEMORY_FILE1
if HEX_NUMBER = 0xFE
print "value is right!"
endif

0xFE readed as a hex number, but if i add ED to 0xFE ("0xFE" to ""0xFEED"), it will be read as real string, but if 0x works as hex, then why it's turn to real string instead of \xFE\xED in outupt?

2) spiritovod, code is correct (based on QuickBMS capabilitys), problem happens in function
Code:
set MEMORY_FILE1 binary ""
goto 0 MEMORY_FILE1
putdstring "[a]" 2 MEMORY_FILE1
get MEM_SIZE1 asize MEMORY_FILE1
log test 0 MEM_SIZE1 MEMORY_FILE1



i know you trying to help, but please check everything and spot people situation before getting mad on someone, i really appreciate your help, guys like sir aluigi and you (and others, sorry i don't have all names) keeping this forum up
unfortunately, QuickBMS has a limitation and can't write more that 4096 lines (am i right? tell me if i wrong), but to be honest, it will be so heavy to compute for long scripts (about QuickBMS) and i can't and don't have much time to do everything by hand, i know how C or other languages works, QuickBMS is a compatible language and you can't just do such things in any language, if i want to create a program with assembly language, i have to spend a lot of time to write many mechanism, that is why QuickBMS is a fast way to do it, a good io and file processor, i know all of this things, please don't make me wrong or a unwise guy


Top
   
PostPosted: Tue Mar 02, 2021 6:52 pm 

Joined: Sat Sep 28, 2019 7:00 pm
Posts: 380
@Shokoniraya: Scroll up to the case with jumping into "for" cycles. You're getting those results because you're using those functions in a wrong way from the beginning. But instead of "why it doesn't work for me", you're implying that it's quickbms problem - while in 90% cases it's your own problem, who don't understand basic programming logic and it seems you don't want to understand and simply relying on alugi's help for creating more workarounds for your sake. I'm not even close to being mad, but for now this topic looks more like support-for-a-single-person thread with weird requests most of the times.

_________________
You can request AES keys on rin forums (the list with keys is also there)
AES keys finder and latest UE4 bms scripts: in this post


Top
   
PostPosted: Tue Mar 02, 2021 10:35 pm 
User avatar

Joined: Sat Sep 15, 2018 5:22 am
Posts: 397
yes, jumping into a for-next was a stupid thing, but some of them was idea for next release or problem reporting, and they solved with newer beta version, how can i learn it without learning. and it's a forum, someone can read those comments in future and learn some things, just like what people doing with books
programing logic? programing means turning human-reading algorithim to logic mechanism (look at your keyboard or thouch screen, or monitor, it's power and mechanism, anything can be done with mechanism), just like droping domino in any way you want, and know that im doing this as a hobby, i have my own job and own stuff, im not doing this for money or dealing, never! i don't want to push on someone or make him upset, so my sake is my hobby and caring about this programming idea
i don't have any other reason to telling you, spiritovod, and please don't make this post to a back-talk chat page, and i aplogize you if make you sad, im not good at talking with people

to sir aluigi
im just doing this to brought you some idea for next versions of QuickBMS and probably bugs and my hobby, you can rewrite your project and turn it to a fast and powerful language in future (fast, i mean fast scripting), but if you think im making you sad or harming you, please delete my account from your website and database, im not gonna sad
i never used anyone, this is my last comment. sayonara


Top
   
PostPosted: Wed Mar 03, 2021 11:10 am 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 12296
@Shokoniraya
I'm super happy of your contributions, really.
I can even state that you have helped the development of quickbms more than anyone else with your suggestions and bug reports (me included).

Indeed in the beta I have added tons of the things you suggested in the last year.
So for me it's all ok, go forward showing any doubts and suggestions, and then we discuss them together and check if and how implement them.
Don't worry if we get mad at you :D


I like the idea of putdstring VAR -1 and it's easy to implement with just one line of C code (already added in my local beta).
The only "problem" is that putdstring uses a variable as input and not a C string, in short "putdstring "\x41\x42" 2 MEMORY_FILE" will write \x instead of AB.
In case of negative size (you suggested "" but it would be 0 so better to use -1) the size will be the NUL-delimited string keeping zeroes out.
I can bypass that limitation (in case the user needs binary data) with the -J option available also in the quickbmsver command.


Regarding the question of 0xFE I guess you should first convert/cast the string to number with: math NUM = STRING

I don't see any problem with 'putdstring "[a]" 3' since the output is just [a] as expected, there is no mess caused by multidimensional arrays.

I'm not aware of any limitations about 4096 lines but please show me how to replicate the problem.


Top
   
PostPosted: Wed Mar 03, 2021 8:24 pm 
User avatar

Joined: Sat Sep 15, 2018 5:22 am
Posts: 397
i don't know what to say, words not enough...
thank you, you have a great heart, but seeing this kind of judgment make me sad when it's not true

(tested with last beta)
that the error of limtation
Error: the BMS script uses more commands than those supported by this tool (4096 / 4096)

and about ] (or [string]) inside a function
here cmd command "quickbms.exe" "script.bms" "script.bms"
any other string can be write but not if starts and ends with [ and ], or if contain such string (like "my[a]string"), but empty [] is fine, like "my[]text"
Code:
set MEMORY_FILE1 binary ""
goto 0 MEMORY_FILE1
callfunction PUT_STRING

startfunction PUT_STRING
putdstring "[a]" 3 MEMORY_FILE1
endfunction PUT_STRING

-------------------
An error or crash occurred:

*EH* ExceptionCode c0000005 access violation
*EH* ExceptionFlags 00000000
*EH* ExceptionAddress 001B944A
000D0000 + 000e944a quickbms.exe
*EH* NumberParameters 00000002
*EH* 00000001
*EH* 00000008

Last script line before the error or that produced the error:
3 callfunction PUT_STRING
coverage file 0 0% 0 157 . offset 00000000


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 580 posts ]  Go to page Previous 125 26 27 28 29 Next

All times are UTC


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Limited