Coding

 Reply to this postStart new topic

Offline opcode database

Wesser
post Jan 30 2012, 09:52 AM
Post #21


The Assistant

Posts: 84
From: Matera, IT
Joined: 16-June 11



Thanks. It would help me to define a proper sintax. smile.gif

Strings are usually parenthesized but sometimes parentheses are omitted. Why in your opinion? I noticed they may interfere with loaded constants from data files.
Go to the top of the page
 
+Quote Post
LINK/2012
post Jan 30 2012, 10:19 AM
Post #22


I will kill you

Posts: 126
Joined: 13-May 11



Wow, that is... no words, I'm very surprised!

Thanks to share Deji smile.gif

edit: edited tongue.gif

This post has been edited by LINK2012: Jan 30 2012, 10:39 AM
Go to the top of the page
 
+Quote Post
Deji
post Jan 30 2012, 10:38 PM
Post #23


Coding like a Rockstar!

Group Icon

Posts: 1,468
From: ???
Joined: 28-May 09



QUOTE (Wesser @ Jan 30 2012, 09:52 AM) *
Thanks. It would help me to define a proper sintax. smile.gif

Strings are usually parenthesized but sometimes parentheses are omitted. Why in your opinion? I noticed they may interfere with loaded constants from data files.


Indeed. I wondered if it was only constanted values that had to have the parenthesis, but I'm not too sure. What's more, real "long" strings didn't exist until SA. VC strings had a max of 8 chars, which was immediate data (no data type):
CODE
A4 03 49 5F 53 41 56 45 00 00


Wheras SA is more automated over how it decides to retrieve strings:
CODE
A4 03 09 50 53 41 56 45 31 00 00


And of course, 05B6 adds another factor to the mystery if strings in SCR syntax tongue.gif


EDIT
And yeah, SCR uses constants from files. AudioEvents.txt seems to be a perfect example of this (unused by the game, must be something sourcey for us modders). Unfortunately, Sanny Builder took nearly 2 minutes to process that list of constants before even building the rest of the SCM in compilation, so I decided not to use them for VJ's source, in fear I may have had to delay the next delay of that mod.
Reason for edit: :)


--------------------
Go to the top of the page
 
+Quote Post
Wesser
post Feb 1 2012, 12:10 PM
Post #24


The Assistant

Posts: 84
From: Matera, IT
Joined: 16-June 11



Actually, 05B6-05B7-05B8 does nothing as well as 03A7-03A8 and 03A9. No reference can be found about such opcodes in gta_sa.idb. An overview of a decompiled main.scm might point us to a likely aim they had before the game release.

05B6, 05B7 and 05B8 write a string into a debugging buffer, whose pointer probably differs between those.
03A7, 03A8 write respectively an integer value and a float.
03A9 writes a newline.

Ofcourse, when either a value or a newline is written, the previously updated buffer (with 05B6, 05B7 or 05B8) gets changed.

However, mine is just an assumption, eh. tongue.gif

Here is the skipped data passed when an empty string is written:

SANNY
20 20 20 20 20 20 20 20 00 00 00 00 00 00 00 00
09 2E 00 00 00 00 00 00 1C FB 12 00 D8 A8 41 00

00 00 41 00 09 2E 00 00 00 00 00 00 01 00 00 00
09 2E 00 00 00 00 00 00 1C FB 12 00 D8 A8 41 00

00 00 41 00 09 2E 00 00 00 00 00 00 02 00 00 00
09 2E 00 00 00 00 00 00 1C FB 12 00 D8 A8 41 00

00 00 41 00 09 2E 00 00 00 00 00 00 03 00 00 00
09 2E 00 00 00 00 00 00 1C FB 12 00 D8 A8 41 00


These bytes are replaced by the passed string, plus the null terminator. Don't know what they act for.

This post has been edited by Wesser: Feb 1 2012, 02:43 PM
Go to the top of the page
 
+Quote Post
Deji
post Feb 1 2012, 03:17 PM
Post #25


Coding like a Rockstar!

Group Icon

Posts: 1,468
From: ???
Joined: 28-May 09



I (and a few other people) already knew what they did... ScrDebug restores em all. Even got 05B6 working and posted the output of the pool script (which uses these opcodes heavily): http://gtagmodding.com/forums/index.php?showtopic=529 (last post has pool log link).

What I really wanna know is how 05B6 strings were originally implemented. Were they just coded how we code them now? Just an ID which the compiler reads and replaces from a table. It seems quite likely.


--------------------
Go to the top of the page
 
+Quote Post
Wesser
post Feb 3 2012, 10:45 AM
Post #26


The Assistant

Posts: 84
From: Matera, IT
Joined: 16-June 11



Thanks for the info. I forgot it was already known. tongue.gif
Go to the top of the page
 
+Quote Post
LINK/2012
post Mar 25 2012, 11:50 PM
Post #27


I will kill you

Posts: 126
Joined: 13-May 11



The discursion has a little time hum? I think that is good a topic for doc Rockstar syntax.

Anyway, I'm posting here because...
Rockstar used {} for something, that I couldn't understand well... I guess it is some scope operator shit, just for better human reading and the compiler ignores it...

Any ideia?
Go to the top of the page
 
+Quote Post
Deji
post Mar 26 2012, 06:12 PM
Post #28


Coding like a Rockstar!

Group Icon

Posts: 1,468
From: ???
Joined: 28-May 09



QUOTE (LINK2012 @ Mar 26 2012, 12:50 AM) *
The discursion has a little time hum? I think that is good a topic for doc Rockstar syntax.

Anyway, I'm posting here because...
Rockstar used {} for something, that I couldn't understand well... I guess it is some scope operator shit, just for better human reading and the compiler ignores it...

Any ideia?


http://www.gtaforums.com/index.php?amp;sho...mp;p=1060991122

And since this topic was a question which was answered. I don't think it's really a good topic for documentation of R* syntax. This one may be better. If not, feel free to make one.


--------------------
Go to the top of the page
 
+Quote Post
Wesser
post Apr 26 2012, 08:39 AM
Post #29


The Assistant

Posts: 84
From: Matera, IT
Joined: 16-June 11



I know it's a bit off topic but...

Could someone give me the GTAIII decompiled main.scm? I don't have the game installed.

Also, does someone have LCS or VCS main sources? I tried to get them by myself with no luck. sad.gif
Go to the top of the page
 
+Quote Post
Silent
post Apr 26 2012, 01:41 PM
Post #30


The master of cut retort

Group Icon

Posts: 239
From: Warsaw, PL
Joined: 21-July 10



PMed them.
Go to the top of the page
 
+Quote Post
Wesser
post Apr 28 2012, 09:32 AM
Post #31


The Assistant

Posts: 84
From: Matera, IT
Joined: 16-June 11



Thank you. smile.gif
Go to the top of the page
 
+Quote Post
Reply to this postStart new topic

9 User(s) are reading this topic (9 Guests and 0 Anonymous Users)
0 Members: