Jump to content


Photo

Threading, Assembly, All Of The "new" Stuff


  • Please log in to reply
37 replies to this topic

#1 X-tra Fear

X-tra Fear

    Behemoth Creator

  • GMC Member
  • 430 posts
  • Version:GM8

Posted 18 February 2009 - 08:17 PM



system.dll


Making Game Maker less useless.


What is system.dll?
Well, imagine Game Maker on steroids. Well, not the best description.
It allows you to thread in Game Maker, and use functions in Game Maker you normally can't.

Can I use this in my game?
Duh, why would I make something and not allow you to use it in your game?
It's open source, but I do require a bit of credit. Nothing big, like leaving my version info on the DLL is fine.

Is this legal?
Of course, why wouldn't it? It doesn't alter the executable at all.

What can this do?
I'm not writing an essay on it... You can compile assembly into memory pointers, that you can allocate and free.
You can disassemble memory too, and it can also thread along with setting Game Maker functions to other ones.

Honestly, I'm sure the code could have been written better and it's not 100% error proof.

The download link is provided below:
Download
GMaker Library Topic (Needed to compile the DLL, only!)

Now compatible with: GM7, GM6.1, GM6.0, GM5.3a


Edited by X-tra Fear, 31 March 2009 - 07:37 PM.

  • 0

#2 Yourself

Yourself

    The Ultimate Pronoun

  • GMC Elder
  • 7352 posts
  • Version:Unknown

Posted 18 February 2009 - 08:28 PM

That's not C++, that's C. :blink:

Also you should mention that the inline assembly is compiler specific to MinGW. VC++ uses a different syntax.
  • 0

#3 X-tra Fear

X-tra Fear

    Behemoth Creator

  • GMC Member
  • 430 posts
  • Version:GM8

Posted 18 February 2009 - 08:33 PM

That's not C++, that's C. :blink:

Also you should mention that the inline assembly is compiler specific to MinGW. VC++ uses a different syntax.


Good idea... I know VC++ uses the intel syntax in ASM but i'm not exactly sure on how it's used in the code...
Oh well, I don't use VC++ and I probably just look like an idiot. xD

Edited by X-tra Fear, 18 February 2009 - 10:14 PM.

  • 0

#4 Yourself

Yourself

    The Ultimate Pronoun

  • GMC Elder
  • 7352 posts
  • Version:Unknown

Posted 18 February 2009 - 08:37 PM

I'm not too familiar with the inline assembly in MinGW. Like I don't know what the %1 is (my best guess is it's referring to variables local to the function scope) nor do I know what the last line is doing. In VC++ the inline assembly is actually part of the source code and not just a string passed to some pseudo-function kind of thing.
  • 0

#5 X-tra Fear

X-tra Fear

    Behemoth Creator

  • GMC Member
  • 430 posts
  • Version:GM8

Posted 18 February 2009 - 08:40 PM

I'm not too familiar with the inline assembly in MinGW. Like I don't know what the %1 is (my best guess is it's referring to variables local to the function scope) nor do I know what the last line is doing. In VC++ the inline assembly is actually part of the source code and not just a string passed to some pseudo-function kind of thing.


Yeah, I see your point now.
I think I'll just wait for someone else to do it in VC++. :blink:
  • 0

#6 Clam

Clam

    GMC Member

  • New Member
  • 55 posts

Posted 19 February 2009 - 05:32 AM

My favourite bit:

Making Game Maker less useless.


I wish I'd known about the %n syntax, I've been reading the asm output of gcc so I can get the stack offsets of local vars ^_^. I'm probably going to eventually release source for something like this, except my code gives execute_string a pointer for "this" so that local variables work. I'll probably make it a general framework for gm internals though.
  • 0

#7 Yourself

Yourself

    The Ultimate Pronoun

  • GMC Elder
  • 7352 posts
  • Version:Unknown

Posted 19 February 2009 - 05:47 AM

Actually what the %n does is allow GCC to more intelligently allocate registers. From what little I do know the "r" stuff at the end of the assembly is creating "dynamically allocated" registers for certain values (meaning whatever registers are free for use during the execution are filled with the values given after each "r"). Inline assembly in VC++ is a lot more straight-forward since you can directly refer to any local variables within the current scope.
  • 0

#8 Clam

Clam

    GMC Member

  • New Member
  • 55 posts

Posted 19 February 2009 - 01:14 PM

Yes, I've just been reading into it a little more. Seems like it's just an extended version of the 'register' keyword. You can use a letter other than 'r' to specify you want it specifically in a particular register, or in any of the general purpose registers, and so on. It also has a concept of input and output. Though I have access to VS, I'd rather not use it, even if that named access to local variables is so very convenient (and simply writing asm{} without having to worry about \n is also a lot nicer. Could it be MS got it right for once? ^_^)
  • 0

#9 score_under

score_under

    Least kawaii

  • GMC Member
  • 1321 posts

Posted 19 February 2009 - 06:16 PM

I've spawned a (short) trend, I see.

I challenge you to call sprite_add() without execute_string()! ^_^

Edited by score_under, 19 February 2009 - 06:16 PM.

  • 0

Anti-Decompiler for GM6.1 to GM8.1.91! :GM8_new: [Main skin by Sindarin]
Discontinued.

decimal2.png
^ Signature image because it's been sorta empty since the old host died

If you need to contact me, I still get notification emails from PMs.


#10 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • GMC Elder
  • 18181 posts
  • Version:GM:Studio

Posted 19 February 2009 - 06:46 PM

I've spawned a (short) trend, I see.

I challenge you to call sprite_add() without execute_string()! ^_^

And I chalange to call ds_list_add(id, anumber) without execute string... Given I supply the ds list id, you supply the number (I really need this for fast data transfer in my dll)
  • 0

gmcbanner.pnggmcbanner_tools.png

ICU Live Tutoring Through Slack or Skype | My Tools Page follow.png

I FRANTICALLY MADE MY 18000 POST TOPIC BEFORE MIKE ANNOUNCED A DELAY...
Now I'm squirming not to hit that reply button


#11 score_under

score_under

    Least kawaii

  • GMC Member
  • 1321 posts

Posted 19 February 2009 - 07:55 PM

And I chalange to call ds_list_add(id, anumber) without execute string...

Consider it done; check your PM inbox.
  • 0

Anti-Decompiler for GM6.1 to GM8.1.91! :GM8_new: [Main skin by Sindarin]
Discontinued.

decimal2.png
^ Signature image because it's been sorta empty since the old host died

If you need to contact me, I still get notification emails from PMs.


#12 X-tra Fear

X-tra Fear

    Behemoth Creator

  • GMC Member
  • 430 posts
  • Version:GM8

Posted 20 February 2009 - 12:23 AM

Well damn, now all I need to do is make a function that can get the pointers to any function Game Maker, and maybe disable the functions from running.

... of course, when I have time.

Edited by X-tra Fear, 20 February 2009 - 12:24 AM.

  • 0

#13 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • GMC Elder
  • 18181 posts
  • Version:GM:Studio

Posted 20 February 2009 - 12:41 AM

Hehehe... Perhapse we will finally get our API to access GM's core features/GML Functions from within our dll and finally get some gd speed out of the darn thing. All we need is a few people to snoop around in the guts and get the pointers and parameters... Quite a task... So many functions.


The ds_list_add_value worked like a charm... 100000 items in 93 ms in the dll vs 500 ms in GML. Me I needed to pass 1024 vaues wich took a hell of a lot of time to grab calling 1024 GetValue(n)... Now I can do it in about 6 ms

Edited by icuurd12b42, 20 February 2009 - 12:50 AM.

  • 0

gmcbanner.pnggmcbanner_tools.png

ICU Live Tutoring Through Slack or Skype | My Tools Page follow.png

I FRANTICALLY MADE MY 18000 POST TOPIC BEFORE MIKE ANNOUNCED A DELAY...
Now I'm squirming not to hit that reply button


#14 garrlker

garrlker

    GMC Member

  • GMC Member
  • 349 posts

Posted 20 February 2009 - 02:10 AM

OFFTOPIC
I didn't like the fact it was only for GM7,so for all the GM6 users heres the converted version for GM6.1.
Unfortunantly it prolbably doesnt work for GM6.0 but if you want me to make a version for it send me a PM.
ON TOPIC
I like the DLL. I prolbably won't use this but I like it.
8/10

Posted Image
  • 0

#15 score_under

score_under

    Least kawaii

  • GMC Member
  • 1321 posts

Posted 20 February 2009 - 08:16 PM

OFFTOPIC
I didn't like the fact it was only for GM7,so for all the GM6 users heres the converted version for GM6.1.
Unfortunantly it prolbably doesnt work for GM6.0 but if you want me to make a version for it send me a PM.

ON TOPIC
I like the DLL. I prolbably won't use this but I like it.
8/10

Really useless download

Garrlker, that was pretty useless.
Completely useless, in fact. Just remove it, it won't help anyone and it's probably beyond your scope to convert the DLL if you can't do so in 2 minutes. It takes longer to open LateralGM than it would take for someone to convert the DLL.

But that's Java's fault, not LateralGM's.
  • 0

Anti-Decompiler for GM6.1 to GM8.1.91! :GM8_new: [Main skin by Sindarin]
Discontinued.

decimal2.png
^ Signature image because it's been sorta empty since the old host died

If you need to contact me, I still get notification emails from PMs.


#16 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • GMC Elder
  • 18181 posts
  • Version:GM:Studio

Posted 20 February 2009 - 08:27 PM

OFFTOPIC
I didn't like the fact it was only for GM7,so for all the GM6 users heres the converted version for GM6.1.
Unfortunantly it prolbably doesnt work for GM6.0 but if you want me to make a version for it send me a PM.

ON TOPIC
I like the DLL. I prolbably won't use this but I like it.
8/10

Really useless download

Garrlker, that was pretty useless.
Completely useless, in fact. Just remove it, it won't help anyone and it's probably beyond your scope to convert the DLL if you can't do so in 2 minutes. It takes longer to open LateralGM than it would take for someone to convert the DLL.

But that's Java's fault, not LateralGM's.

As long as you know the gm6 address that is...
  • 0

gmcbanner.pnggmcbanner_tools.png

ICU Live Tutoring Through Slack or Skype | My Tools Page follow.png

I FRANTICALLY MADE MY 18000 POST TOPIC BEFORE MIKE ANNOUNCED A DELAY...
Now I'm squirming not to hit that reply button


#17 score_under

score_under

    Least kawaii

  • GMC Member
  • 1321 posts

Posted 20 February 2009 - 09:15 PM

As long as you know the gm6 address that is...

I implied that he has neither the knowledge or the skill to do that... yet.
  • 0

Anti-Decompiler for GM6.1 to GM8.1.91! :GM8_new: [Main skin by Sindarin]
Discontinued.

decimal2.png
^ Signature image because it's been sorta empty since the old host died

If you need to contact me, I still get notification emails from PMs.


#18 X-tra Fear

X-tra Fear

    Behemoth Creator

  • GMC Member
  • 430 posts
  • Version:GM8

Posted 20 February 2009 - 11:22 PM

As long as you know the gm6 address that is...

I implied that he has neither the knowledge or the skill to do that... yet.


Who, me?

Anyway, just added a MemoryProtect and MemoryReadString function...
Now, I'll make a GetGMProcAddress so you can get any function from Game Maker and use it in a dll. :P
  • 0

#19 score_under

score_under

    Least kawaii

  • GMC Member
  • 1321 posts

Posted 20 February 2009 - 11:35 PM

Who, me?

No, the guy who LateralGM'd your work and took the credit.

Also, these new functions sound... familiar. XD!

Edited by score_under, 20 February 2009 - 11:36 PM.

  • 0

Anti-Decompiler for GM6.1 to GM8.1.91! :GM8_new: [Main skin by Sindarin]
Discontinued.

decimal2.png
^ Signature image because it's been sorta empty since the old host died

If you need to contact me, I still get notification emails from PMs.


#20 X-tra Fear

X-tra Fear

    Behemoth Creator

  • GMC Member
  • 430 posts
  • Version:GM8

Posted 20 February 2009 - 11:37 PM

Who, me?

No, the guy who LateralGM'd your work and took the credit.

Also, these new functions sound... familiar. XD!


Haha. ;P

Will post epic new version tommorow.
I have some very, very cool things added that may change the way dlls are made. :P
They are very easy to use, too.

Edited by X-tra Fear, 21 February 2009 - 11:15 PM.

  • 0

#21 X-tra Fear

X-tra Fear

    Behemoth Creator

  • GMC Member
  • 430 posts
  • Version:GM8

Posted 22 February 2009 - 03:23 AM

UPDATE, sorry for double post.

Cool stuff I added, check it out.
  • 0

#22 garrlker

garrlker

    GMC Member

  • GMC Member
  • 349 posts

Posted 26 February 2009 - 12:00 AM

Who, me?

No, the guy who LateralGM'd your work and took the credit.

Also, these new functions sound... familiar. XD!

I didn't use lateral GM. It has one object. I'd convert by copying and pasting if I wanted to do that. I open Dev C++ and edited that number in the code of the dll where he says it returns GM's version number and when it isn't GM7 it causes it to show a message box saying"This dll does not work in this version of GM" so I set it to GM6.1's number. How bout you shut up and contribute to the f***ing topic.
  • 0

#23 TheMagicNumber

TheMagicNumber

    GMC Member

  • GMC Member
  • 5247 posts
  • Version:Unknown

Posted 26 February 2009 - 01:13 AM

How bout you shut up and contribute to the f***ing topic.

Well, people may not know, but he played a big role in this. :whistle:
  • 0

#24 X-tra Fear

X-tra Fear

    Behemoth Creator

  • GMC Member
  • 430 posts
  • Version:GM8

Posted 26 February 2009 - 01:48 AM

How bout you shut up and contribute to the f***ing topic.

Well, people may not know, but he played a big role in this. :whistle:


Pretty much, he did the research on the execute_string function. It's not like I asked him though. :blink:
He kind of... gave it to me. :mellow:

I did implement it in my own way though, of course.
  • 0

#25 score_under

score_under

    Least kawaii

  • GMC Member
  • 1321 posts

Posted 26 February 2009 - 07:02 PM

Pretty much, he did the research on the execute_string function. It's not like I asked him though. :)
He kind of... gave it to me. :D

I did implement it in my own way though, of course.

Yeah, I misread your question. But at least it turned out OK.

Garrlker, I really don't care what method you used, you distributed a completely non-working cheap hack of his DLL in this thread. Not only that, but you did no research to get it working in GM6, and you (as is plain to see) just did it for the credit. Well, we can see where that went. And then...

Then, you used self-censored swearing. Really, now.

Why is "f**king" any cleaner than the actual curse-word? Everyone knows what it means, it has the exact same effect, it's just that the mods and admins on most forums seem to take more kindly to it. Couldn't you write the actual word? Is it that you're afraid that the mods will warn you for directly insulting another member if it isn't encrusted with little *stars*?

Either way, censored or uncensored, is still as bad. Writing "*******" is better, but only just - you can't tell what the word was, but the intention (and cowardice/futility, along with how stupid it looks) is still clear.

I should really stop making long posts about silly nuances.
But that'd be no fun, would it?

Edited by score_under, 26 February 2009 - 07:03 PM.

  • 0

Anti-Decompiler for GM6.1 to GM8.1.91! :GM8_new: [Main skin by Sindarin]
Discontinued.

decimal2.png
^ Signature image because it's been sorta empty since the old host died

If you need to contact me, I still get notification emails from PMs.


#26 garrlker

garrlker

    GMC Member

  • GMC Member
  • 349 posts

Posted 27 February 2009 - 02:03 AM

Pretty much, he did the research on the execute_string function. It's not like I asked him though. :lol:
He kind of... gave it to me. :)

I did implement it in my own way though, of course.

Yeah, I misread your question. But at least it turned out OK.

Garrlker, I really don't care what method you used, you distributed a completely non-working cheap hack of his DLL in this thread. Not only that, but you did no research to get it working in GM6, and you (as is plain to see) just did it for the credit. Well, we can see where that went. And then...

Then, you used self-censored swearing. Really, now.

Why is "f**king" any cleaner than the actual curse-word? Everyone knows what it means, it has the exact same effect, it's just that the mods and admins on most forums seem to take more kindly to it. Couldn't you write the actual word? Is it that you're afraid that the mods will warn you for directly insulting another member if it isn't encrusted with little *stars*?

Either way, censored or uncensored, is still as bad. Writing "*******" is better, but only just - you can't tell what the word was, but the intention (and cowardice/futility, along with how stupid it looks) is still clear.

I should really stop making long posts about silly nuances.
But that'd be no fun, would it?


Nah it wouldn't be much fun lol.
I know saying a cus word with ****** has the same effect but like you said mods take more kindly to it.
I didn't copy it for the credit. Not everyone wants to download codeblocks or devC++ to edit this file so to make it works in GM6.1.
All I tried to do is just kinda help out because the GM7 installationg doesn't work for me so I'm stuck with GM6.1 and so are a lot of other people on this forum and I imagine they hate it when they find something for GM7 only so I opened it up in devC++ and changed the value to 601 so it would work in GM6.1 and it works. It never crashed or made a mistake on my system. I don't feel like or intend to keep this argument going on anymore. If you want to say something back then you can but I'm done.
It's sad when someone can't even contribute to a topic because someone else always has to get mad or start a argument over it. :D
  • 0

#27 score_under

score_under

    Least kawaii

  • GMC Member
  • 1321 posts

Posted 28 February 2009 - 11:06 AM

Nah it wouldn't be much fun lol.
I know saying a cus word with ****** has the same effect but like you said mods take more kindly to it.

Exactly. And if the mods don't like you saying the original word, then don't you think it's a little unwise to give a word slightly-censored with exactly the same meaning?
It's like going to the Game Maker Creations section and posting a file manager... "But it doesn't count, the code's obfuscated!"

I didn't copy it for the credit. Not everyone wants to download codeblocks or devC++ to edit this file so to make it works in GM6.1.
All I tried to do is just kinda help out because the GM7 installationg doesn't work for me so I'm stuck with GM6.1 and so are a lot of other people on this forum and I imagine they hate it when they find something for GM7 only so I opened it up in devC++ and changed the value to 601 so it would work in GM6.1 and it works. It never crashed or made a mistake on my system.

Except for that fact that it didn't work. You weren't helping, you were advertising your "I can convert to 6.1" service.
Those people who "didn't want to download dev-cpp to edit the file" couldn't have used your version anyway. It was useless.

It's sad when someone can't even contribute to a topic because someone else always has to get mad or start a argument over it. :lol:

It's sad when someone advertises and disguises it as a contribution.

Edited by score_under, 28 February 2009 - 11:07 AM.

  • 0

Anti-Decompiler for GM6.1 to GM8.1.91! :GM8_new: [Main skin by Sindarin]
Discontinued.

decimal2.png
^ Signature image because it's been sorta empty since the old host died

If you need to contact me, I still get notification emails from PMs.


#28 DefuzionGames

DefuzionGames

    GMC Member

  • GMC Member
  • 1460 posts
  • Version:Unknown

Posted 10 March 2009 - 06:23 PM

can someone explain a few practical uses of this. is it similar to GMThreads?
  • 0

#29 score_under

score_under

    Least kawaii

  • GMC Member
  • 1321 posts

Posted 10 March 2009 - 07:50 PM

Yes. GMThreads was the first one, and this one and my one are 2 very similar DLLs, based on some shared research (so they pretty much do the same).
  • 0

Anti-Decompiler for GM6.1 to GM8.1.91! :GM8_new: [Main skin by Sindarin]
Discontinued.

decimal2.png
^ Signature image because it's been sorta empty since the old host died

If you need to contact me, I still get notification emails from PMs.


#30 newbie013

newbie013

    GMC Member

  • GMC Member
  • 96 posts
  • Version:GM8

Posted 16 March 2009 - 04:03 PM

the download link is broken :(
  • 0

#31 X-tra Fear

X-tra Fear

    Behemoth Creator

  • GMC Member
  • 430 posts
  • Version:GM8

Posted 23 March 2009 - 02:44 PM

the download link is broken <_<


Yeah, working on getting these back up... willhostforfood died, I think.
  • 0

#32 score_under

score_under

    Least kawaii

  • GMC Member
  • 1321 posts

Posted 23 March 2009 - 06:08 PM

Yeah, working on getting these back up... willhostforfood died, I think.

No, they just have a strict cleanup policy - downloads were removed for inactivity... which is exactly why I kept a mirror <_<

Edited by score_under, 23 March 2009 - 06:08 PM.

  • 0

Anti-Decompiler for GM6.1 to GM8.1.91! :GM8_new: [Main skin by Sindarin]
Discontinued.

decimal2.png
^ Signature image because it's been sorta empty since the old host died

If you need to contact me, I still get notification emails from PMs.


#33 X-tra Fear

X-tra Fear

    Behemoth Creator

  • GMC Member
  • 430 posts
  • Version:GM8

Posted 23 March 2009 - 11:14 PM

Can somebody please post a mirror for me?

Got it back, nevermind.
Posting new link...

Edited by X-tra Fear, 24 March 2009 - 01:57 PM.

  • 0

#34 Krisando

Krisando

    GMC Member

  • New Member
  • 1351 posts

Posted 17 June 2009 - 11:40 AM

Living legend
  • 0

Posted Image


#35 IamCalle

IamCalle

    GMC Member

  • GMC Member
  • 444 posts

Posted 29 January 2010 - 12:19 AM

Just digging up this topic to inform that the link is dead, sadly.
  • 0

#36 TheMagicNumber

TheMagicNumber

    GMC Member

  • GMC Member
  • 5247 posts
  • Version:Unknown

Posted 29 January 2010 - 01:50 AM

There are other threading DLLs that have more compatibility then this one, I suggest you use one of those (I think SnakePL's supports GM6 to GM8).
  • 0

#37 Razon

Razon

    GMC Member

  • GMC Member
  • 268 posts
  • Version:GM:Studio

Posted 29 January 2010 - 07:19 AM

http://www.mediafire.com/?olnknnkoiym
  • 0

#38 IamCalle

IamCalle

    GMC Member

  • GMC Member
  • 444 posts

Posted 30 January 2010 - 01:27 AM

Thanks, Razon.
  • 0