SRL Archive - S.M.A.R.T.

SMARTv7.2


BenLand100

2012-06-18 19:46:50

First, a word of warning, I'm not going to be releasing specific versions of this, I'm just going to recompile/reupload the binaries until the stable (non-dev) release of v7.2. It's testing mode still, but should be fairly stable. This is the official v7.2 to be included with Simba 0.99. It is basically the same as v7.1 but uses sockets under the hood to remove latency issues with function calls over the shared memory (which required significant changes to the pairing logic of v7.1, but again, only under the hood). If you're testing v7.1, try this one out to see if it works better and post any bugs here or on github. See the v7.1 thread for how to use the pairing mechanism/out-of-process functionality introduced in v7.1.

I should also elaborate on the new Debug Graphics protocol (that avoids shitty windows api completely):
Pretend you have a magic 'SetupSmart' procedure that pairs Simba to a SMART instance, you can then do something like the following to draw on it's debug graphics
var
x,y,w,h,bmp: integer;
begin
SetupSmart;
w:= 765;
h:= 503;
bmp := CreateBitmap(w, h);
SetPersistentMemoryBitmap(bmp, SmartDebugArray(), w, h);
FastDrawClear(bmp,$00ff00);
end.
Further, any bitmap drawing (or searching, for that matter, though idk why you'd want to search the debug screen) operations you would normally be able to preform on 'bmp' will be drawn to SMART's debug buffer.


Source: https://github.com/BenLand100/SMART

Binaries: https://github.com/downloads/BenLand100/SMART/SMARTv7.2.zip

Changelog
===6/18/12===
+Sockets for function calls
+Improved pairing stability
+Fixed bug related to debug graphics offset
+Support for debug graphics on all platforms/architectures (See Simba's support for setting the pointer for a bitmap and SmartDebugArray)

YoHoJo

2012-06-18 19:50:31

From: BenLand100
This is basically the same as v7.1 but uses sockets under the hood to remove latency issues with function calls over the shared memory.


What exactly does that mean?

BenLand100

2012-06-18 19:54:07

From: YoHoJo
What exactly does that mean?

So, in v7.1 function calls to SMART, e.g. mouse movements, etc, were done by putting the args in a reserved block of shared memory between the two processes, then setting a flag in the shared memory that the remote process checked periodically and then waiting for the remote process to unset that flag. Problem was, that method wasn't always fast enough for time sensitive things, e.g. mouse movements. Now, the args are passed via the shared memory still, but the flag is sent over a local (semi-blocking) socket so that the calls are near instantaneous and no periodic checking is required. This way is 'better', just significantly more complicated (which is why I went with the shared-memory-only approach in v7.1).

YoHoJo

2012-06-18 19:55:54

So lots of things will be like smoother/faster now, maybe not noticeably to the user, but they are.

Does this also apply for color finding functions too? Or just mouse/keyboard stuff?

BenLand100

2012-06-18 20:14:46

It applies to everything. Also, I only fixed it because mouse movements were reported as 'jerky and laggy' or something to that effect.

YoHoJo

2012-06-18 20:16:03

Hmm, and this has been around since forever, or just since v7?

BenLand100

2012-06-18 20:51:08

Obviously it's only a problem when shared memory across processes is involved, and that's only v7.1

YoHoJo

2012-06-18 20:58:28

Oh duh.

Rezozo

2012-06-18 21:14:09

So in your opinion, is this stable enough for an all night-er?
Il try it soon (Just to give feedback).

Great job BTW!

YoHoJo

2012-06-18 21:23:07

It really depends more on the script, not much on SMART.
Run it, watch it for 10 mins, if it works fine you should be fine.

Yago

2012-06-18 22:23:41

Does the latency thing also have anything to do with typing in SMART to Runescape or just commands sent by SIMBA?

BenLand100

2012-06-18 23:05:20

From: Yago
Does the latency thing also have anything to do with typing in SMART to Runescape or just commands sent by SIMBA?

I'm not sure what you're asking, but I'll take a stab at it.
If you want to know if typing is included in this, then yes. Typing with Simba to RS goes through SMART via a function call at some point. If you use typical Simba commands, everything works as you'd expect. Key up/down commands are also routed through similar function calls. Also, if you were asking if SMART's key sending functions were up-to-date with Simba's new function definitions, then yes to that also. Scripts that use the old functions will be similarly broken for both.

Brandon

2012-06-18 23:16:43

From: BenLand100
I'm not sure what you're asking, but I'll take a stab at it.
If you want to know if typing is included in this, then yes. Typing with Simba to RS goes through SMART via a function call at some point. If you use typical Simba commands, everything works as you'd expect. Key up/down commands are also routed through similar function calls. Also, if you were asking if SMART's key sending functions were up-to-date with Simba's new function definitions, then yes to that also. Scripts that use the old functions will be similarly broken for both.


I think he means typing through smart's canvas/event nazi thing. On windows the old delay thing is still there so maybe he's referring to that?

Like while smart is enabled, typing through it. Like last year when you fixed it with some in client focus request or something

Ashaman88

2012-06-19 01:03:45

Sweet! Has this been updated from the last version you sent me?

BenLand100

2012-06-19 01:20:07

From: ashaman88
Sweet! Has this been updated from the last version you sent me?

Slightly, the debug image is fixed now.

Flight

2012-06-19 12:34:22

Is it just me or is the download link incorrect?

Brandon

2012-06-19 12:35:50

Location:
https://github.com/BenLand100/SMART/downloads

Direct:
https://github.com/downloads/BenLand100/SMART/SMARTv7.2(dev).zip

Rezozo

2012-06-19 12:36:52

Im just wondering, is it just me or when clicking the enable/disable smart button, it acts as if I pressed the tab button…

Is this because of Smart?

Flight

2012-06-19 12:41:26

From: Brandon
Location:
https://github.com/BenLand100/SMART/downloads

Direct:
https://github.com/downloads/BenLand100/SMART/SMARTv7.2(dev).zip


Thank you Brandon.

By the way, how's the soon-to-come SRL updates coming along?

Brandon

2012-06-19 12:51:03

From: Flight
Thank you Brandon.

By the way, how's the soon-to-come SRL updates coming along?


I'm stuck for the moment (on bitmaps) lol: http://villavu.com/forum/showthread.php?p=1050389#post1050389

Otherwise it's pretty good.

@the guy asking about the Tab-thing. That's what smart uses to gain and release focus. It alt tab's into the game so that's why it shows that "You haven't received any messages to which you can reply" thing.

It's not bannable or anything as that'd be stupid for jagex to ban over since some players actually do alt tab to the game. It's actually been like this for literally since the beginning.

BenLand100

2012-06-19 18:39:02

From: Brandon
It's not bannable or anything as that'd be stupid for jagex to ban over since some players actually do alt tab to the game. It's actually been like this for literally since the beginning.

I thought I removed that bit in v7.0? Hmph, maybe not.

Also… about the bitmaps. The debug array was set improperly, try it again with the most recent version. I found this bug around 8-9pm EST last night, it would cause SMART or Simba to randomly crash.

Rezozo

2012-06-19 22:13:36

From: Brandon


@the guy asking about the Tab-thing. That's what smart uses to gain and release focus. It alt tab's into the game so that's why it shows that "You haven't received any messages to which you can reply" thing.

It's not bannable or anything as that'd be stupid for jagex to ban over since some players actually do alt tab to the game. It's actually been like this for literally since the beginning.


Ok thanks :)

Brandon

2012-06-20 00:23:00

From: BenLand100
I thought I removed that bit in v7.0? Hmph, maybe not.

Also… about the bitmaps. The debug array was set improperly, try it again with the most recent version. I found this bug around 8-9pm EST last night, it would cause SMART or Simba to randomly crash.


I'll check again and see if it still dies the alt tab thing. One question though. After closing smart, should SmartRemote32.exe still be running in task manager?

Sometimes I check there and I'd have like 9 of them and end up manually killing them. Usually happens only if I close Simba before closing smart. After closing smart, the process will be there like in Zombie mode or something.


And thanx for the quick fixes. The bitmaps work now. All is good again. :)

BenLand100

2012-06-20 01:20:08

From: Brandon
I'll check again and see if it still dies the alt tab thing. One question though. After closing smart, should SmartRemote32.exe still be running in task manager?

Sometimes I check there and I'd have like 9 of them and end up manually killing them. Usually happens only if I close Simba before closing smart. After closing smart, the process will be there like in Zombie mode or something.


And thanx for the quick fixes. The bitmaps work now. All is good again. :)

The JVM could be refusing to die. Do they show up in the paired client list? Are they using much memory/cpu? I suppose it could be going into zombie mode if simba was closed it while it was unpaired… Shouldn't be an issue for most people, I don't suppose.

Ashaman88

2012-06-20 11:29:37

No issues to report with 6/18 update. Mouse movements working great!

shstiger2009

2012-06-20 22:29:12

I'm an idiot and am getting "invalid number of parameters at line 52" when I replaced my plugins with the new ones. I know it's an easy error and can't figure this out for the life of me.

Brandon

2012-06-20 23:27:16

^ I fixed it for him so don't worry about that ben.

As per the report I said before, the task manager thing happens only if Simba is closed before smart and it's like 6+ of them.

Sometimes they show up paired and sometimes they are just pure zombies but it's not a big deal at all. Sometimes I'd notice a PID/temp file in Simba's folder when this happens which makes the client not load unless I kill the process or remove the file.

As for the guy above me problems, for him Smart kept unloading and upairing whenever a script was terminated.

Example:
Simba Code:
[LEFT]{$DEFINE SMART} //<– See that last bracket, I had to remove it and add it back so that the plugin gets registered.
{$I SRL/SRL.Simba}

begin
SetupSRL;
end.
[/LEFT]


If I dont do that bracket trick for him, it will complain about some null pointer and it will give that popup that usually requires loading in a browser first. The null pointer seems to happen after some JVM timeout according to the console. Might be an invalid value on SRL side of loading. I'll check again cuz a Simba file opened up. Thing is, this never happens to me. Only the guy above me. These are just minor details though and all that I could gather. Other than that, everything is in tip-top shape.


I forwarded two pictures I took on his computer to your SRL-Inbox but here is the one for my comp:

shstiger2009

2012-06-20 23:45:05

From: Brandon
^ I fixed it for him so don't worry about that ben.

As per the report I said before, the task manager thing happens only if Simba is closed before smart and it's like 6+ of them.

Sometimes they show up paired and sometimes they are just pure zombies but it's not a big deal at all. Sometimes I'd notice a PID/temp file in Simba's folder when this happens which makes the client not load unless I kill the process or remove the file.

As for the guy above me problems, for him Smart kept unloading and upairing whenever a script was terminated.

Example:

{$DEFINE SMART} //<-- See that last bracket, I had to remove it and add it back so that the plugin gets registered.
{$I SRL/SRL.Simba}

begin
SetupSRL;
end.

If I dont do that bracket trick for him, it will complain about some null pointer and it will give that popup that usually requires loading in a browser first. The null pointer seems to happen after some JVM timeout according to the console. Might be an invalid value on SRL side of loading. I'll check again cuz a Simba file opened up. Thing is, this never happens to me. Only the guy above me. These are just minor details though and all that I could gather. Other than that, everything is in tip-top shape.


It's not working for a regular script…add me on MSN?

It says "Failed to pair - No client by that ID"

BenLand100

2012-06-22 20:19:27

v7.2 to be included with Simba 0.99
@Brandon open a git issue for any problems you can nail down, I'll get to them as I can, but I'll be on vacation for a bit

XFX

2012-06-23 18:50:47

How do i get SMART 7.2? I only have version 6.9.
EDIT: Oops sorry, Now know that it will be include with Simba 0.99.

Flight

2012-06-23 22:46:37

Ben, is it possible to load up RS via SMART in OpenGL mode? If so, what parameters would need to be changed to do so?

BenLand100

2012-06-24 00:05:30

I do not know the answer to that question. I've been told only software mode works, and I'm inclined to believe that since other methods typically don't have a memory buffer in regular ram to access to copy the color data.

mormonman

2012-06-24 00:12:27

From: Flight
Ben, is it possible to load up RS via SMART in OpenGL mode? If so, what parameters would need to be changed to do so?


Drop the 's' parameter. This avoids the safe-mode loading. Be wary of small things in SRL that might not work in OpenGL mode because of color changes.

Flight

2012-06-24 00:22:17

From: BenLand100
I do not know the answer to that question. I've been told only software mode works, and I'm inclined to believe that since other methods typically don't have a memory buffer in regular ram to access to copy the color data.


From: mormonman
Drop the 's' parameter. This avoids the safe-mode loading. Be wary of small things in SRL that might not work in OpenGL mode because of color changes.


Yes, I've tried loading this newest SMART (7.2) with this:

SmartSpawnClient('./Plugins/','http://world'+IntToStr(World)+'.runescape.com/',',f5',765,503,'','','/usr/lib/jvm/sun-jre-bin-1.6/lib/amd64/server/libjvm.so',-1);

It's probably wrong the way I'm loading it, as Brandon told me the 'f5' is incorrect. Either way, after loading up SMART and attempting to set the graphics mode to OpenGL I have a Runescape error (not SMART) that tells me to visit the home page because of an error. So that's why I assume I'm using the wrong parameters to load SMART in OGL.

And yeah you're right about SRL not working as normal in OGL mode. I think it's to do with what Ben had posted right above me.

I've also found out that the OCR doesn't read any text in OGL mode. :( But this is probably out of my league and I wouldn't know where to begin on making the OCR and "color data" read properly in OGL. I can only hope Ben or Wizzup have suggestions. :p

Edit:
Ya know, I could try talking to Trilez on how he uses an OCR in his bot; he might have some more info on that subject. I know it'd probably be easier just to use TriBot but I'd rather stick with Simba.

mormonman

2012-06-24 03:17:26

He uses OGL interception for the OCR I do believe.

Olly

2012-07-11 09:34:22

From: Flight
Yes, I've tried loading this newest SMART (7.2) with this:

SmartSpawnClient('./Plugins/','http://world'+IntToStr(World)+'.runescape.com/',',f5',765,503,'','','/usr/lib/jvm/sun-jre-bin-1.6/lib/amd64/server/libjvm.so',-1);

It's probably wrong the way I'm loading it, as Brandon told me the 'f5' is incorrect. Either way, after loading up SMART and attempting to set the graphics mode to OpenGL I have a Runescape error (not SMART) that tells me to visit the home page because of an error. So that's why I assume I'm using the wrong parameters to load SMART in OGL.

And yeah you're right about SRL not working as normal in OGL mode. I think it's to do with what Ben had posted right above me.

I've also found out that the OCR doesn't read any text in OGL mode. :( But this is probably out of my league and I wouldn't know where to begin on making the OCR and "color data" read properly in OGL. I can only hope Ben or Wizzup have suggestions. :p

Edit:
Ya know, I could try talking to Trilez on how he uses an OCR in his bot; he might have some more info on that subject. I know it'd probably be easier just to use TriBot but I'd rather stick with Simba.


If your making a plugin you can use OpenGL to do all text reading I hear?

speedster

2012-07-11 21:51:24

Can someone point out on how to properly allow Simba to make use of newer versions of Smart ?

london

2012-07-12 05:02:33

I'm so confused :(

YoHoJo

2012-07-12 05:13:10

From: london
I'm so confused :(


Nothing is even working properly right now, just wait for SRL to update and everything will be fine again.

Wizzup?

2012-07-12 07:56:50

From: Flight
I've also found out that the OCR doesn't read any text in OGL mode. :( But this is probably out of my league and I wouldn't know where to begin on making the OCR and "color data" read properly in OGL. I can only hope Ben or Wizzup have suggestions. :p


Are you sure it's even reading the screen properly?

From: Flight
Edit:
Ya know, I could try talking to Trilez on how he uses an OCR in his bot; he might have some more info on that subject. I know it'd probably be easier just to use TriBot but I'd rather stick with Simba.


No need to jump the gun. ;)

Flight

2012-07-12 08:21:26

From: Wizzup?
Are you sure it's even reading the screen properly?


By "it" you mean Simba? As far as I know, yes. I load up the RS Launcher and specify the client with the normal "Select a client" crosshair. Am I missing a step here or something? Even the DTM editor shows a completely black screen, as expected.

It's weird though, Aftermath made use of the SRL include within his OGL random-solvers; DDTMs, NPC chat box reading, ect… I've always wondered how he got Simba to read color normally in OGL mode. :huh:

Edit:
For what it's worth I'm loading RS the same way he and Silab are, the OGL dll in the Launcher's bin, Simba & the OGL plugin loaded after the client is.

BenLand100

2012-07-12 11:49:40

You might be missing something you don't realize. AFAIK Simba can't read OGL in windows, though it seems to be able to in Linux. Why, exactly, no one is particularly sure.

E: I mean, I could cite Windows as the reason, but that wouldn't technically be fair.

Wizzup?

2012-07-12 14:23:42

From: Flight
By "it" you mean Simba? As far as I know, yes. I load up the RS Launcher and specify the client with the normal "Select a client" crosshair. Am I missing a step here or something? Even the DTM editor shows a completely black screen, as expected.

It's weird though, Aftermath made use of the SRL include within his OGL random-solvers; DDTMs, NPC chat box reading, ect… I've always wondered how he got Simba to read color normally in OGL mode. :huh:

Edit:
For what it's worth I'm loading RS the same way he and Silab are, the OGL dll in the Launcher's bin, Simba & the OGL plugin loaded after the client is.


I think Aftermath worked in Windows, but I'm not really sure. It's likely that if he used WINE, that it would in fact work fine. (I don't think he used SMART)

Karpov

2012-07-18 05:13:05

From: Brandon
I'll check again and see if it still dies the alt tab thing. One question though. After closing smart, should SmartRemote32.exe still be running in task manager?

Sometimes I check there and I'd have like 9 of them and end up manually killing them. Usually happens only if I close Simba before closing smart. After closing smart, the process will be there like in Zombie mode or something.


And thanx for the quick fixes. The bitmaps work now. All is good again. :)



First off, thanks for all your work with SMARTv7.2 and the other stuff.

Like Brandon, I'm also experiencing the zombie smartremote32.exe processes and I noticed that they're not freeing up memory, which is a concern. The above image is a result of using the official SixHourFix procedure and I hadn't closed Simba at all in that time.

BenLand100

2012-07-18 14:10:12

I'll add something to make the kill a little more… forceful.
E: When are you all trying to kill the client? If you kill it while it is paired there's no reason it should ever fail.

Wizzup?

2012-07-18 14:36:29

I love being able to actually see the memory usage of Simba now.

speedster

2012-07-19 09:49:34

Any idea how do I define Smart to load up in 64Bit ?

BenLand100

2012-07-19 16:45:54

You use a 64bit version of Simba, which afaik isn't stable.

Sawyer

2012-07-21 12:48:20

I also see the zombie smartremote32 systems in my task manager… but my SMART never loads :P so…

jared0565

2012-07-29 13:22:20

It's good to see that some programs are starting to work with the new updates now. I used to run 2 simba programs in parallel in 980 with SMART 6.9 before but now it seems it is not allowing me to do so. Can someone please give a light on how to do parallel runs of simba with the latest version, as when I try to run a 2nd simba program it will just pair itself with the already opened SMART window instead of creating a new one. Thanks for any reply.

blinkblink

2012-08-01 14:04:27

Has there been any update on fixing all the "smartremote32.exe" that apparently never get removed even after normally closing simba?

krasniy

2012-08-01 19:18:46

From: blinkblink
Has there been any update on fixing all the "smartremote32.exe" that apparently never get removed even after normally closing simba?


I have this problem when I run simba on my Ivy I7…….but on my older I7 the smarts shut down when simba does…. really baffling.

Le Jingle

2012-08-02 16:46:25

Upon 6hours, across 3 machines, I get;

(progress report from 6hrs)
NextPlayer(True)
SwitchToPlayer(PlayerNo: 0, Active: True);
Welcome to Runescape.
(rs name)
'One minute has passed... Debug: 753'
(rs name)
'One minute has passed... Debug: 789'
(rs name)
'One minute has passed... Debug: 789'
(rs name)
'One minute has passed... Debug: 789'
(rs name)
'One minute has passed... Debug: 789'
(rs name)
'One minute has passed... Debug: 789'
NextPlayer(False)
SwitchToPlayer(PlayerNo: 1, Active: False);
Welcome to Runescape.
(rs name player 2)
'One minute has passed... Debug: 789'
(rs name player 2)
'One minute has passed... Debug: 789'
(rs name player 2)
'One minute has passed... Debug: 348'
(rs name player 2)
'Error Connecting.'
(rs name player 2)
'Runescape has been updated.'
SRL Compiled in 16 msec
** Fatal Error: Pairing Clients; Terminating Script **
Successfully executed.
running fine the first go around, it's just closing the first smart seems to not work. I've also had zombie smarts (which iirc has been brought up before).