SRL Archive - Unofficial Development

Direct-X Plugin (Beta)


Brandon

2013-12-21 19:03:26

I did say I would release a beta plugin for SMART for Direct-X hooks..

Well, today (2015-05-23) is the day I release the very first beta test – Speed test.

This beta is specifically for testing speed while the plugin gathers data AND renders on the screen. Although, in reality you won't be rendering ALL ID's on screen while botting (you usually only render ID's when gather info to write the script.. not while running it), I need to test the speed while the ID's are all on screen so that I know how to handle rendering on different computers and what to tweak/redo/fix/patch..

Here goes:

[ATTACH=CONFIG]26015[/ATTACH]


Place it in the Simba plugin folder. Run:


{$DEFINE SMART}
{$I SRL-6/SRL.Simba}

begin
SetupSRL;
end.

Enter Direct-X mode and you should see a bunch of ID's on screen. Log in and you should see model ID's on screen.. Ex:





What I need (test on a dummy account if you can):

Does it draw for you? Can you see IDs?
FPS while all of this is on screen. Is it laggy? Is it responsive? Is it fast? What is the average FPS you're getting? Are your computer's specs good?
Is the font right? Is it blurry?
Is it crashing? Do you get a Java log with the crash report?
Is there missing textures or models?
Is there two EXACTLY the same models different IDs?

Justin

2013-12-21 19:16:46

Nice work Brandon, I'll give this a test for sure

Olly

2013-12-21 20:24:00

Works perfect for me, and direct-x runs a hell of a lot better than openGL. :D

(srl6 code for anyone)

{$DEFINE SMART}
{$i srl-6/srl.simba}

var
bmp: integer;

begin
smartPlugins := ['d3d9.dll'];
setupSRL();

bmp := bitmapFromClient(0, 0, getClientBounds().x2 -1, getClientBounds().y2 -1);
debugBitmap(bmp);
freeBitmap(bmp);
end.

bg5

2013-12-27 18:43:43

Awesome. And it's not restricted to RS!

I have a question, I wanted to take a screenshot from a game and show it in debug window.

First I do:

DXISetup(gamePID);

And now there is a function DXIImagePointer() which returns Pointer. But how to convert this PointerToImage to Simba type bmp ?

Brandon

2013-12-27 19:02:57

From: bg5
Awesome. And it's not restricted to RS!

I have a question, I wanted to take a screenshot from a game and show it in debug window.

First I do:

DXISetup(gamePID);

And now there is a function DXIImagePointer() which returns Pointer. But how to convert this PointerToImage to Simba type bmp ?



Procedure TGraphics.Create(Width, Height: Integer; Ptr: Uint32); overload
Begin
Self.__Bmp.Init(Client.GetMBitmaps);
Self.__Bmp.SetPersistentMemory(Ptr, Width, Height);
Self.__Init := True;
Self.__Width := Width;
Self.__Height := Height;
Self.__Bmp.SetTransparentColor(0);
Insert(@Self, __Bmp__Pointers);
AddOnTerminate('__TGraphicsFreeAll');
End;

The above is from GitHub. Bmp is a TMufasabitmap and to get an int from it, then it's Bmp.GetIndex.

Can't type much. I'm replying from my phone. You just need to do init, set persistent memory, get index then free when done.

Clarity

2013-12-27 21:17:45

Wow…this solves several OpenGL related issues for me such as the random zoom in glitch, thank you very much.

bg5

2014-01-02 19:51:10

From: Brandon

Procedure TGraphics.Create(Width, Height: Integer; Ptr: Uint32); overload
Begin
Self.__Bmp.Init(Client.GetMBitmaps);
Self.__Bmp.SetPersistentMemory(Ptr, Width, Height);
Self.__Init := True;
Self.__Width := Width;
Self.__Height := Height;
Self.__Bmp.SetTransparentColor(0);
Insert(@Self, __Bmp__Pointers);
AddOnTerminate('__TGraphicsFreeAll');
End;

The above is from GitHub. Bmp is a TMufasabitmap and to get an int from it, then it's Bmp.GetIndex.

Can't type much. I'm replying from my phone. You just need to do init, set persistent memory, get index then free when done.


Thanks, I tried it but then I found with whatever PID I use DXISetup() , pointers are the same. I guess it's because game doesn't use your d3d9.dll at all!

How to force game to load this file instead of windows/system32 one? In your OpenGL tutorial you wrote about placing .dll in the game folder, but if we move it out of Simba/plugins folder would DXI.dll be still able to communicate with it?
I'm also not sure where to put it, because I'm targeting Unity Web Player :/

Brandon

2014-01-02 23:56:03

From: bg5
Thanks, I tried it but then I found with whatever PID I use DXISetup() , pointers are the same. I guess it's because game doesn't use your d3d9.dll at all!

How to force game to load this file instead of windows/system32 one? In your OpenGL tutorial you wrote about placing .dll in the game folder, but if we move it out of Simba/plugins folder would DXI.dll be still able to communicate with it?
I'm also not sure where to put it, because I'm targeting Unity Web Player :/


DXI.dll can communicate with the d3d9.dll no matter where it is. It uses a shared-memory-map. The memory map id never changes.

It would help if I knew what game it was. Yes it is the same as the OpenGL plugin. You just place it in the application's folder.

Like GLXSetup, DXISetup also should return a boolean telling you whether it was loaded successfully. If it returns false, the other application did not "successfully" load the plugin.

Many many things can cause this, such as placing it in the wrong folder, wrong process id (PID), static linkage, etc..

bg5

2014-01-03 06:57:40

DXI.dll can communicate with the d3d9.dll no matter where it is. It uses a shared-memory-map. The memory map id never changes.


Didn't know that. I will read more about it :)

From: Brandon


It would help if I knew what game it was. Yes it is the same as the OpenGL plugin. You just place it in the application's folder.

Like GLXSetup, DXISetup also should return a boolean telling you whether it was loaded successfully. If it returns false, the other application did not "successfully" load the plugin.

Many many things can cause this, such as placing it in the wrong folder, wrong process id (PID), static linkage, etc..



I've placed it in firefox folder, same place where plugin-container.exe is. Now I'm sure it's loaded because I can't delete it when game is running (my way of checking:P).

Now pointers seems to change when I setup game's (actually plugin-container) PID, but image is empty (black). Maybe something is wrong with my code?

program new;
{$loadlib DXI}
var Pr:TSysProcArr;
var bmp : integer;
var TMB :TMufasaBitmap;
var P :Pointer;
begin


while true do
if iskeydown(VK_F1) then
begin
bmp := CreateBitmap(1,1);
TMB := GetMufasaBitmap(bmp);

// writeln(GetProcesses());
writeln(DXISetup(10880));
writeln(DXIImagePointer());
writeln(DXIDebugPointer());
P := DXIImagePointer();
TMB.SetPersistentMemory(LongInt(P),1024,768);
bmp := TMB.GetIndex;
// DisplayDebugImgWindow(1025,769);
// DrawBitmapDebugImg(bmp);
writeln(CreateBitmapString(bmp));
wait(1000);
TMB.ResetPersistentMemory;
TMB.Free;


end;

end.


The game is: http://www.kongregate.com/games/tfender/contract-wars

Brandon

2014-01-03 08:11:55

From: bg5
Didn't know that. I will read more about it :)
The game is: http://www.kongregate.com/games/tfender/contract-wars


Updated OP. It should now WORK with the browser properly for any and all games!

See the pictures on the OP :)

The script I used to test it was:


{$loadlib DXI}

Function PtrToBmp(Width, Height: Integer; Ptr: Pointer): Integer;
var
Bmp: TMufasaBitmap;
Begin
Bmp.Init(Client.GetMBitmaps);
Bmp.SetPersistentMemory(Uint32(Ptr), Width, Height);
Bmp.SetTransparentColor(0);
Result := Bmp.GetIndex();
End;

Procedure DebugBitmap(Bmp: Integer);
var
W, H: Integer;
Begin
GetBitmapSize(Bmp, W, H);
DisplayDebugImgWindow(W, H);
DrawBitmapDebugImg(Bmp);
End;

var
Bmp: Integer;
W, H: Integer;
begin
GetClientDimensions(W, H); //this line requires that you drag the crosshairs on the window.
if (DXISetup(1388)) then //change the this value to whatever the message box shows LAST!
begin
writeln('DXI setup succeeded');
Bmp := PtrToBmp(W, H, DXIImagePointer());
DebugBitmap(Bmp);
FreeBitmap(Bmp);
end else
writeln('Failed to setup DXI.');
end.

And all I did was place the d3d9.dll plugin in the Chrome/Firefox installation folder. I also have an injector written if you don't want to place it in the folder. Does the same thing but it's more difficult to inject into chrome and firefox child tabs! So yeah, placing it in the folder is the easiest option atm until I get around to writing some more code..


It is a test plugin so feedback is appreciated.

bg5

2014-01-03 08:46:31

From: Brandon
Updated OP. It should now WORK with the browser properly for any and all games!

See the pictures on the OP :)

And all I did was place the d3d9.dll plugin in the Chrome/Firefox installation folder. I also have an injector written if you don't want to place it in the folder. Does the same thing but it's more difficult to inject into chrome and firefox child tabs! So yeah, placing it in the folder is the easiest option atm until I get around to writing some more code..


It is a test plugin so feedback is appreciated.


Awesome Brandon, works like a charm! Finally this game has an option to make screenshot in fullscreen mode :P

Are you planning to add more features like in OGL plugin?

@Edit

Well, it worked in menu at least :P But when I join a room, after map is loaded, Unity crash, everytime.


webplayer_win.dll caused an Integer Divide by Zero (0xc0000094)
in module webplayer_win.dll at 001b:0588ba22.

Brandon

2014-01-03 09:14:02

From: bg5
Awesome Brandon, works like a charm! Finally this game has an option to make screenshot in fullscreen mode :P

Are you planning to add more features like in OGL plugin?


:D Glad it works :D That's is always good news! There really hasn't been very many testers for this plugin.. So I am glad.

I really have no problem adding features in the DXI plugin. It took me what? A couple hours to make this plugin and 5 mins to add browser/smart support? Hooks won't be so hard, same as OpenGL. Testing is what takes time because there usually isn't very many testers or there is usually something that happens on someone else's system that doesn't happen on the developer's. So far I haven't seen any Direct-X bugs at all, unlike the OpenGL ones (and the code is the same :l).

However, the GLX plugin hasn't really seen much usage so I am hesitant to put effort into creating a hook plugin. At the time of creating this plugin, I only had in mind colour only..

Direct-X api is actually just as easy for me as OpenGL api (DX may be even easier and better for hooks). Usage or probably the amount of requests would change my mind. If more people want that then sure I'll add it but as of this exact moment, I'm undecided.

As for the regular features that all graphics plugins must have, yes this plugin already has drawing on the client, it just isn't in use/enabled yet.

Ashaman88

2014-01-03 10:40:31

idk what I've done! So put the plugins in my plugin folder - ran the following (& included srl6)

smartPlugins := ['d3d9.dll'];
SetupSRL;

smart loads up but the screen is constantly flashing between

and the login screen (yes I'm in directx mode).

What have I done!

bg5

2014-01-03 10:46:43

From: Brandon
Testing is what takes time because there usually isn't very many testers or there is usually something that happens on someone else's system that doesn't happen on the developer's.


I can test it for you, as I'm interested in it.

So far I haven't seen any Direct-X bugs at all, unlike the OpenGL ones (and the code is the same :l).


See my edit in post above:P I'm curious if it happens to you too.

As for the regular features that all graphics plugins must have, yes this plugin already has drawing on the client, it just isn't in use/enabled yet.


Just drawing would be awesome. I could make custom aiming mark :P I've done it before with my ETL, but it can't work in fullscreen mode.

Brandon

2014-01-03 11:46:58

From: bg5
I can test it for you, as I'm interested in it.
See my edit in post above:P I'm curious if it happens to you too.
Just drawing would be awesome. I could make custom aiming mark :P I've done it before with my ETL, but it can't work in fullscreen mode.


I haven't tried entering a room. It says: caused an Integer Divide by Zero in web_unity module. I'm curious at to whether this happens only with this plugin?

@Asha, your plugin isn't even loaded. Notice the Smart buttons say "Disable Capture". If the plugin was loaded, Smart would say "Disable Direct-X" on a button. You are loading it wrong somehow. I'm not familiar with SRL-6's api.

bg5

2014-01-03 20:27:55

From: Brandon
I haven't tried entering a room. It says: caused an Integer Divide by Zero in web_unity module. I'm curious at to whether this happens only with this plugin?


Yes, it always and only happens when your d3d9.dll is in browser folder.

Olly

2014-01-03 21:59:01

From: Ashaman88
idk what I've done! So put the plugins in my plugin folder - ran the following (& included srl6)


This works fine for me.

{$DEFINE SMART}
{$i srl-6/srl.simba}

var
bmp: integer;

begin
smartPlugins := ['d3d9.dll'];
setupSRL();

bmp := bitmapFromClient(0, 0, getClientBounds().x2 -1, getClientBounds().y2 -1);
debugBitmap(bmp);
freeBitmap(bmp);
end.

Sjoe

2014-01-06 02:23:44

From: Ashaman88
idk what I've done! So put the plugins in my plugin folder - ran the following (& included srl6)

smartPlugins := ['d3d9.dll'];
SetupSRL;

smart loads up but the screen is constantly flashing between

and the login screen (yes I'm in directx mode).

What have I done!


did u managed to resolve this? I got the same problem.

edit: runescape is fine when I disable smart, but enabled it's causing me epileptic seizures (i don't have epilepsia, don't worry :) )

(called it the same way as Olly)

edit: @Brandon; cheeky mention, in case you missed it.

Olly

2014-01-13 23:45:11

I'm not sure why the plugin isn't loading for you guys.. Couldn't work better for me. :s

riwu

2014-01-18 02:51:02

@Brandon
There's this annoying pop up when starting Smart with the DX plugin. It doesn't serve much purpose…

Olly

2014-01-20 18:23:57

@Sjoe

Can you try this…?

{$loadlib libsmartremote}

var
params: TStringArray;

begin
params := explode(',', between('<iframe id="game" src="', '"', getPage('http://www.runescape.com/game.ws?j=1')));

if (not fileExists(PluginPath+'d3d9.dll')) then
begin
writeln('NO PLUGIN!@!@@!@');
terminateScript();
end;

smartSpawnClient('java.exe', stringReplace(PluginPath, '\', '/', [rfReplaceAll]), params[0], ',' + params[1], 800, 600, '', '', '', 'd3d9.dll');
end.

And see if the plugin successfully loads? (you will see a disable direct-x button).

Ashaman88

2014-01-20 18:31:05

you don't want me to try it? I see how it is.




I'll try it too when I get home tonight

Olly

2014-01-20 18:36:10

From: Ashaman88
you don't want me to try it? I see how it is.




I'll try it too when I get home tonight


O YEA! it didn't work for you either!

Sjoe

2014-01-20 18:47:36

still flashing for me :(

Brandon

2014-01-20 19:37:32

From: Sjoe
still flashing for me :(


What is actually printed in your Smart console? If you don't have it showing, add: "smartShowConsole := true;" right before calling "setupSRL".

Then try loading it, copy paste everything into here.. I need to see everything..


As for the popup riwu, it was added so that someone could see that it actually loaded.. It will of course be removed.

Brandon

2014-01-20 19:44:59

From: Sjoe
doesn't seem to print anything on smart?

and what it's doing on debug is waiting for RS to load.
used this to test, if there's somethign wrong with it.



What is this.. This isn't Smart's console :S That's Simba's debug box.. Smart's console HAS to print something. It doesn't print "Nothing" at all. Even when Smart crashes, it prints something.

Olly

2014-01-20 19:45:14

From: Sjoe
doesn't seem to print anything on smart?

and what it's doing on debug is waiting for RS to load.



In the console that appears!

Olly

2014-01-20 19:47:13

From: Sjoe
I don't see a console lol




You sure!?¬!

Sjoe

2014-01-20 19:47:53

From: Olly


You sure!?¬!

ah , thought there was something else that has to pop up.


Brandon

2014-01-20 20:33:33

From: Sjoe
ah , thought there was something else that has to pop up.


Actually NOT sure why your Smart says "d3d9.dll not loaded" and yet it at the same time says: "d3d9.dll has no INIT method".. and it has an Init method:


LIBRARY "d3d9.dll" BASE=0x0000000069640000
DESCRIPTION "D3D9 Definition File"
EXPORTS
D3DPERF_BeginEvent = DXHook_D3DPERF_BeginEvent @1
D3DPERF_EndEvent = DXHook_D3DPERF_EndEvent @2
D3DPERF_GetStatus = DXHook_D3DPERF_GetStatus @3
D3DPERF_QueryRepeatFrame = DXHook_D3DPERF_QueryRepeatFrame @4
D3DPERF_SetMarker = DXHook_D3DPERF_SetMarker @5
D3DPERF_SetOptions = DXHook_D3DPERF_SetOptions @6
D3DPERF_SetRegion = DXHook_D3DPERF_SetRegion @7
DebugSetLevel = DXHook_DebugSetLevel @8
DebugSetMute = DXHook_DebugSetMute @9
Direct3DCreate9 = DXHook_Direct3DCreate9 @10
Direct3DCreate9Ex = DXHook_Direct3DCreate9Ex @11
Direct3DShaderValidatorCreate9 = DXHook_Direct3DShaderValidatorCreate9 @12
PSGPError = DXHook_PSGPError @13
PSGPSampleTexture = DXHook_PSGPSampleTexture @14

SMARTPluginInit @15



bool SmartDebugEnabled = false;
bool SmartDirectXEnabled = true;

void SMARTButtonPressed(int ID, bool State)
{
switch(ID)
{
case 100:
if (State)
{
SmartGlobal->setCapture(false);
SmartDirectXEnabled = true;
}
else
{
SmartGlobal->setCapture(true);
SmartDirectXEnabled = false;
}
break;

case 101:
SmartDebugEnabled = State ? false : true;
break;

}
}

extern "C" void SMARTPluginInit(SMARTInfo* ptr, bool* ReplaceButtons, int* ButtonCount, char*** ButtonText, int** ButtonIDs, _SMARTButtonPressed* ButtonCallback)
{
SmartGlobal = ptr;
if (ptr)
{
*ReplaceButtons = true;
char** ButtonTexts = new char*[2];
ButtonTexts[0] = const_cast<char*>("Disable Direct-X_Enable Direct-X");
ButtonTexts[1] = const_cast<char*>("Enable Debug_Disable Debug");

int* IDs = new int[2];
IDs[0] = 100;
IDs[1] = 101;

*ButtonCount = 2;
*ButtonText = ButtonTexts;
*ButtonIDs = IDs;
*ButtonCallback = &SMARTButtonPressed;
}
}


Exact same code as in the OpenGL plugin.. It is practically impossible for the plugin NOT to be loading at all.. It exports everything Smart requires with the correct calling convention. In fact, if this plugin fails, so should OpenGL and that means SRL-6 is broken.. But yet that works :S I know I haven't made a mistake in the code; I just copy pasted my Smart headers from the OpenGL project into the DirectX project.

Another thing is that if the game fails to find an export, it will do: MessageBox(nullptr, e.what(), "ERROR!", 0); which will show which export failed to load.. I don't think you are getting any popups?


The only thing I can think of is something may be wrong on your end?

Brandon

2014-01-20 20:51:46

From: Brandon
Actually NOT sure why your Smart says "d3d9.dll not loaded" and yet it at the same time says: "d3d9.dll has no INIT method".. and it has an Init method:


LIBRARY "d3d9.dll" BASE=0x0000000069640000
DESCRIPTION "D3D9 Definition File"
EXPORTS
D3DPERF_BeginEvent = DXHook_D3DPERF_BeginEvent @1
D3DPERF_EndEvent = DXHook_D3DPERF_EndEvent @2
D3DPERF_GetStatus = DXHook_D3DPERF_GetStatus @3
D3DPERF_QueryRepeatFrame = DXHook_D3DPERF_QueryRepeatFrame @4
D3DPERF_SetMarker = DXHook_D3DPERF_SetMarker @5
D3DPERF_SetOptions = DXHook_D3DPERF_SetOptions @6
D3DPERF_SetRegion = DXHook_D3DPERF_SetRegion @7
DebugSetLevel = DXHook_DebugSetLevel @8
DebugSetMute = DXHook_DebugSetMute @9
Direct3DCreate9 = DXHook_Direct3DCreate9 @10
Direct3DCreate9Ex = DXHook_Direct3DCreate9Ex @11
Direct3DShaderValidatorCreate9 = DXHook_Direct3DShaderValidatorCreate9 @12
PSGPError = DXHook_PSGPError @13
PSGPSampleTexture = DXHook_PSGPSampleTexture @14

SMARTPluginInit @15



bool SmartDebugEnabled = false;
bool SmartDirectXEnabled = true;

void SMARTButtonPressed(int ID, bool State)
{
switch(ID)
{
case 100:
if (State)
{
SmartGlobal->setCapture(false);
SmartDirectXEnabled = true;
}
else
{
SmartGlobal->setCapture(true);
SmartDirectXEnabled = false;
}
break;

case 101:
SmartDebugEnabled = State ? false : true;
break;

}
}

extern "C" void SMARTPluginInit(SMARTInfo* ptr, bool* ReplaceButtons, int* ButtonCount, char*** ButtonText, int** ButtonIDs, _SMARTButtonPressed* ButtonCallback)
{
SmartGlobal = ptr;
if (ptr)
{
*ReplaceButtons = true;
char** ButtonTexts = new char*[2];
ButtonTexts[0] = const_cast<char*>("Disable Direct-X_Enable Direct-X");
ButtonTexts[1] = const_cast<char*>("Enable Debug_Disable Debug");

int* IDs = new int[2];
IDs[0] = 100;
IDs[1] = 101;

*ButtonCount = 2;
*ButtonText = ButtonTexts;
*ButtonIDs = IDs;
*ButtonCallback = &SMARTButtonPressed;
}
}


Exact same code as in the OpenGL plugin.. It is practically impossible for the plugin NOT to be loading at all.. It exports everything Smart requires with the correct calling convention. In fact, if this plugin fails, so should OpenGL and that means SRL-6 is broken.. But yet that works :S I know I haven't made a mistake in the code; I just copy pasted my Smart headers from the OpenGL project into the DirectX project.

Another thing is that if the game fails to find an export, it will do: MessageBox(nullptr, e.what(), "ERROR!", 0); which will show which export failed to load.. I don't think you are getting any popups?


The only thing I can think of is something may be wrong on your end?





Try this:

{$loadlib libsmartremote}

var
params: TStringArray;

begin
params := explode(',', between('<iframe id="game" src="', '"', getPage('http://www.runescape.com/game.ws?j=1')));

if (not fileExists(PluginsPath+'d3d9.dll')) then
begin
writeln('NO PLUGIN!@!@@!@');
terminateScript();
end;

smartSpawnClient('C:/Program Files (x86)/Java/jre7/bin/java.exe', stringReplace(PluginPath, '\', '/', [rfReplaceAll]), params[0], ',' + params[1], 800, 600, '', '', '', 'd3d9.dll');
end.

Sjoe

2014-01-20 20:51:51

From: Brandon

The only thing I can think of is something may be wrong on your end?


I'm running srl6 on a vm if this matters?


edit: tried the code, no avail.

Brandon

2014-01-20 20:55:59

From: Sjoe
I'm running srl6 on a vm if this matters? edit: tried the code, no avail.


Weird.. Nothing working? How odd. I ran it in a VM (Hyper-V) worked just fine. Ran it on my comp, it worked just fine as well..

If it failed, no matter what you should see a popup at least once. Try it on your actual comp? Can you get into DirectX normally without the plugin on your VM? Through the browser or through Smart?

Sjoe

2014-01-20 20:58:37

From: Brandon
Weird.. Nothing working? How odd. I ran it in a VM (Hyper-V) worked just fine. Ran it on my comp, it worked just fine as well..

If it failed, no matter what you should see a popup at least once. Try it on your actual comp? Can you get into DirectX normally without the plugin on your VM? Through the browser or through Smart?


Yeah I can get on DirectX without a problem on the vm, i'll edit this post. gonna try on comp.

But I think @Ashaman88; also ran it on his comp(he had the same flickering issue)

edit: same problem on my comp hmm, what could I be doing wrong?

Brandon

2014-01-20 21:13:05

From: Sjoe
Yeah I can get on DirectX without a problem on the vm, i'll edit this post. gonna try on comp.

But I think @Ashaman88; also ran it on his comp(he had the same flickering issue)



Don't worry about the flickering.. It only flickers because you told Smart you'd be loading a plugin and Smart thinks you're lying since it isn't seeing any plugins.. Thus it begins to flicker because it isn't capturing any colours and you'll need to disable capturing to stop the flickering. It was designed this way on purpose and it comes in handy to let users know when it is working properly.

That is what the plugin does.. Well it's the job of the plugin to enable capture..


Try something else, place the d3d9.dll into C:/Program Files (x86)/Java/jre7/bin then run Smart regularly with no plugins.. Leave "DXI.dll" in C:/Simba/Plugins.. Switch Smart to DirectX mode. This should FORCE load the plugin from the jre7/bin automatically because it has no other choice but to load the first d3d9.dll found..


Your script should look like this (you should see a popup when Smart loads.. give it a roughly 25 seconds for good measure (in case your comp is slow?).. sometimes the popup is behind smart or on the task bar where "3" is written because it shows 3 smart tabs.. your smart screen should turn black after getting to the login screen! and it will only show colours when you close the popup.. This is a sign that the plugin was indeed loaded and working):

Ashaman88

2014-01-20 21:20:14

I'll try it out when I get home as well

Sjoe

2014-01-20 21:21:09

From: Brandon
Don't worry about the flickering.. It only flickers because you told Smart you'd be loading a plugin and Smart thinks you're lying since it isn't seeing any plugins.. Thus it begins to flicker because it isn't capturing any colours and you'll need to disable capturing to stop the flickering. It was designed this way on purpose and it comes in handy to let users know when it is working properly.

That is what the plugin does.. Well it's the job of the plugin to enable capture..


Try something else, place the d3d9.dll into C:/Program Files (x86)/Java/jre7/bin then run Smart regularly with no plugins.. Leave "DXI.dll" in C:/Simba/Plugins.. Switch Smart to DirectX mode. This should FORCE load the plugin from the jre7/bin automatically because it has no other choice but to load the first d3d9.dll found..


Your script should look like this (you should see a popup when Smart loads.. give it a roughly 25 seconds.. sometimes the popup is behind smart or on the task bar where "3" is written because it shows 3 smart tabs.. your smart screen should turn black after getting to the login screen! and it will only show colours when you close the popup.. This is a sign that the plugin was indeed loaded and working):


ok, doesn't get black for me (just flickers).

incase u need to check.

Brandon

2014-01-20 21:22:46

From: Sjoe
ok, doesn't get black for me (just flickers).

incase u need to check.


It is flickering because you are still telling it to "look for d3d9.dll".. Copy the exact script in my post above (from the image above)..

Notice the "smartPlugins := []". You are doing it wrong because that screenshot you have here says "Native button 0:101 not found". That means you are still asking Smart to load the plugin instead of forcefully loading it via jre7/bin as described above.

Sjoe

2014-01-20 21:24:41

From: Brandon
It is flickering because you are still telling it to "look for d3d9.dll".. Copy the exact script in my post above (from the image above)..

Notice the "smartPlugins := []". You are doing it wrong because that screenshot you have here says "Native button 0:101 not found". That means you are still asking Smart to load the plugin instead of forcefully loading it via jre7/bin as described above.


I used this script to test

program new;
{$DEFINE SMART}
{$I srl-6/srl.simba}
{$loadlib DXI}

begin
smartplugins := [];
SetupSRL;

if (dxisetup(__smartcurrentpid)) then
writeln('ok');
end.
and I did put the plugin in java bin (and removed it from c:\simba\plugins)

edit:

Brandon

2014-01-20 21:27:01

From: Sjoe
I used this script to test

program new;
{$DEFINE SMART}
{$I srl-6/srl.simba}
{$loadlib DXI}

begin
smartplugins := [];
SetupSRL;

if (dxisetup(__smartcurrentpid)) then
writeln('ok');
end.
and I did put the plugin in java bin (and removed it from c:\simba\plugins)


Hmm.. well that's just weird now. Your smart says "I am looking for a plugin's native button and not finding any" even though you're saying that you are not giving it any.. Something is wrong here.. Are you sure you are running "that script" and no other because your smart is saying otherwise and I really cannot figure out where you are going wrong? If you want I can teamviewer you and see why your Smart says that.. Up to you. But if you really are doing everything right, Smart shouldn't be lying like that. @Sjoe;

Sjoe

2014-01-20 21:28:41

From: Brandon
Hmm.. well that's just weird now. Your smart says "I am looking for a plugin's native button and not finding any" even though you're saying that you are not giving it any.. Something is wrong here.. Are you sure you are running "that script" and no other because your smart is saying otherwise and I really cannot figure out where you are going wrong?


Yeah it's the only script i'm running

Brandon

2014-01-20 22:55:57

Solved it.. I finally solved it.. Had to make a custom library loader.

Before I start my long post, please note that you will not and should not try anything mentioned in this particular post as it is intended for me and it is only being posted so I don't forget how to solve it when I finish school tomorrow..

Here's the thing. Apparently, if you are trying to use Direct-X and your drivers did NOT install d3dx9_43.dll which ships with Microsoft 9.0c User-End Runtime (NOT developer!!), the plugin will try to load d3dx9_43.dll which is NOT on your system..

This means that no matter what, the plugin will not give an error for this because it simply isn't aware that your system is missing files required to run Direct-X (Especially since I compile with gcc and not MSVC which auto-includes these).. The only way is for me to actually make the plugin try to load this file first.. If it finds it, you're fine, if it doesn't, it will complain. Not sure if I want to do this.. It is however only 1-3 lines of code (just an if statement).

Anyway, I had to make a loader which was doing:


#include "Platforms.hpp"
#include <iostream>

int main()
{
if (xLoadLibrary("C:/Simba/Plugins/d3d9.dll"))
{
std::cout<<"d3d9.dll loaded just fine!!";
}

return 0;
}

This is what actually printed the error. It printed "d3dx9_43.dll is missing from your computer……..". I was surprised Smart did NOT print this or give any other details other than "failed to load.".. Not only that but Smart actually loads plugins this exact way! Probably the Java side that try-catches it.. Not sure.

Anyway, for this reason, I will be bundling the plugin WITH d3dx9_43.dll for users who are missing files on their computer (which shouldn't be happening but just in case because I had enough of a hard time solving it today)..

Note: If it works for you, you don't need it.. otherwise you'll either need to fix your drivers OR if your drivers are fine, then you need to install direct-x 9.0c End-User runtime.. Otherwise you'll need it. It's much easier than installing anything..

Anyway, good night for now.. I'll see if I can upload the file tomorrow or something (or statically link to d3d9x if a static-lib exists). This is why we have beta testing and need more.. =)


Note: This post is just for knowledge so I don't forget st00f and so that next time I check here again I'll remember what I have to do.. Please do not install or try anything mentioned in this particular post! It is for me..

Brandon

2014-01-24 06:39:45

From: Brandon
..



https://github.com/Brandon-T/DXI/releases/tag/v0.1

All bugs fixed so far.. Only thing left I guess is to Draw Smart's mouse and do the speed improvements for drawing..

Ashaman88

2014-01-24 18:34:11

From: Brandon
https://github.com/Brandon-T/DXI/releases/tag/v0.1

All bugs fixed so far.. Only thing left I guess is to Draw Smart's mouse and do the speed improvements for drawing..


flashing with latest plugin

http://puu.sh/6wTix.png

I'll follow the steps above this post next

Edit: updated drivers and still flashing

Edit2: Downloaded that direct-x 9.0c End-User runtime dealio

works now!

Godless

2014-01-25 08:07:36

Can't seem to get it to work with anything… The actual Plugin is working and is loading RS in Direct X, but scripts will not do anything. What have I overlooked?

Unfortunately I cannot use OpenGL at all. The lag is ridiculous when I am using SMART, so this is my only option. :(

Brandon

2014-01-25 09:34:28

    From: Desirousphere
    Can't seem to get it to work with anything… The actual Plugin is working and is loading RS in Direct X, but scripts will not do anything. What have I overlooked?

    Unfortunately I cannot use OpenGL at all. The lag is ridiculous when I am using SMART, so this is my only option. :(


    Fix you graphics settings. If you got it working an loading then the only problem left is for you to fix your graphic settings in RS.

    Godless

    2014-01-25 09:57:55

    From: Brandon


      Fix you graphics settings. If you got it working an loading then the only problem left is for you to fix your graphic settings in RS.


      It isn't my graphics. For some reason it'll log in on OpenGL but not Direct X.

      Olly

      2014-01-25 10:26:08

      Maybe something is different with the login screens from ogl/direct-x. il look into it.

      Sjoe

      2014-01-25 10:37:19

      From: Olly
      Maybe something is different with the login screens from ogl/direct-x. il look into it.


      For me it logged the character in to ingame. But got stuck there :(

      So wasn't detecting isLoggedIn ingame.

      Ashaman88

      2014-01-25 11:12:07

      I have a 10hr proggy going using the directx plugin.. so you guys are cray

      Sjoe

      2014-01-25 11:35:09

      From: Ashaman88
      I have a 10hr proggy going using the directx plugin.. so you guys are cray


      hmm, strange. U didn't have to modify anything?

      Ashaman88

      2014-01-25 12:03:18

      From: Sjoe
      hmm, strange. U didn't have to modify anything?


      Just change the smartplugins thing before setupsrl

      Sjoe

      2014-01-25 12:06:10

      From: Ashaman88
      Just change the smartplugins thing before setupsrl


      very odd. y it no work for me :(

      Wu-Tang Clan

      2014-01-25 14:26:59

      From: Ashaman88
      flashing with latest plugin

      http://puu.sh/6wTix.png

      I'll follow the steps above this post next

      Edit: updated drivers and still flashing

      Edit2: Downloaded that direct-x 9.0c End-User runtime dealio

      works now!


      Can you tell me how to download that stuff from edit2?
      I'm getting flashing screen
      EDIT: NVM I found it by Copy/Pasting the direct-x 9.0c End-User into google.

      Brandon

      2014-01-25 15:58:02

      Ok everyone who cannot get it working, try this: [ATTACH=CONFIG]22785[/ATTACH]


      First run /bin/TestD3D9.

      If it says you're good, you're good. Otherwise it will give you an error, you're going to need to tell me that error that it gives you.

      Wu-Tang Clan

      2014-01-25 17:51:51

      From: Brandon
      Ok everyone who cannot get it working, try this: [ATTACH=CONFIG]22785[/ATTACH]


      First run /bin/TestD3D9.

      If it says you're good, you're good. Otherwise it will give you an error, you're going to need to tell me that error that it gives you.


      http://puu.sh/6y37I.png
      I downloaded directx 9.0c and stuff…

      Brandon

      2014-01-25 18:16:16

      From: Wu-Tang Clan
      http://puu.sh/6y37I.png
      I downloaded directx 9.0c and stuff…


      [ATTACH=CONFIG]22788[/ATTACH]

      Copy that to your Simba/Plugins folder OR the /bin folder where the TestD3D9 is located. Try the Simba plugins folder first. I took that from my SysWOW64 folder. Hopefully that one works for you as I'm on Windows 8.1.

      If either one of those work then you're a god send. If it doesn't work, copy it to C:/Windows/SysWOW64 and then run the TestD3D9.. If it works, then I'll have to be shipping the plugin with this.. It seems you are having trouble installing DirectX End User Runtime 9.0c..

      It seems Skyrim and other games are having the same problem :S

      Same problem as SJoe or whoever it was that I teamviewered.. These problems should NOT be happening at all!

      Wu-Tang Clan

      2014-01-25 18:29:23

      From: Brandon
      [ATTACH=CONFIG]22788[/ATTACH]

      Copy that to your Simba/Plugins folder OR the /bin folder where the TestD3D9 is located. Try the Simba plugins folder first. I took that from my SysWOW64 folder. Hopefully that one works for you as I'm on Windows 8.1.

      If either one of those work then you're a god send. If it doesn't work, copy it to C:/Windows/SysWOW64 and then run the TestD3D9.. If it works, then I'll have to be shipping the plugin with this.. It seems you are having trouble installing DirectX End User Runtime 9.0c..

      It seems Skyrim and other games are having the same problem :S

      Same problem as SJoe or whoever it was that I teamviewered.. These problems should NOT be happening at all!

      http://puu.sh/6y5Pc.png
      I'll test the directx smart now… I'll post in sec
      So I still get the flicker, but it seems like SMART still loads OGL and won't go to DirectX in graphics settings… I press directX and it sticks to OGL without me saying to revert.
      http://puu.sh/6y6aT.jpg

      Brandon

      2014-01-25 18:34:17

      From: Wu-Tang Clan
      http://puu.sh/6y5Pc.png
      I'll test the directx smart now… I'll post in sec
      So I still get the flicker, but it seems like SMART still loads OGL and won't go to DirectX in graphics settings… I press directX and it sticks to OGL without me saying to revert.



      You are able to get into DirectX normally? On the regular Runescape? Not with Smart or any plugins? Have you tried the SysWOW64?

      Wu-Tang Clan

      2014-01-25 18:39:12

      From: Brandon
      You are able to get into DirectX normally? On the regular Runescape? Not with Smart or any plugins? Have you tried the SysWOW64?


      Just did syswow one
      http://puu.sh/6y6t1.png
      Thats for browser
      http://puu.sh/6y6ww.png
      Thats for SMART
      but now it still is flickering???

      Brandon

      2014-01-25 18:44:08

      From: Wu-Tang Clan
      Just did syswow one
      http://puu.sh/6y6t1.png
      Thats for browser
      http://puu.sh/6y6ww.png
      Thats for SMART
      but now it still is flickering???



      Hmm PM me teamviewer details?


      EDIT:

      Just teamviewered him. It was working the whole time. Not sure what he was doing wrong (maybe loading Smart wrong?).. I didn't have to fix anything :S

      Wu-Tang Clan

      2014-01-25 19:43:07

      From: Brandon
      Hmm PM me teamviewer details?


      EDIT:

      Just teamviewered him. It was working the whole time. Not sure what he was doing wrong (maybe loading Smart wrong?).. I didn't have to fix anything :S


      I just ran a script and it won't left click anything? It can right click but not left click?

      Brandon

      2014-01-25 19:48:15

      From: Wu-Tang Clan
      I just ran a script and it won't left click anything? It can right click but not left click?


      The Direct-X plugin is only to provide colours and cannot affect clicking or other functions in any way. All functions such as clicking and interacting with the game is done via Simba and Smart.

      Try this and see:


      {$DEFINE SMART}
      {$I SRL-6/SRL.Simba}

      begin
      SmartPlugins := ['OpenGL32.dll', 'D3d9.dll'];
      SetupSRL;

      //Login your character after Smart loads..
      MoveMouse(250, 250);
      ClickMouse(250, 250, MOUSE_LEFT);
      end.

      Wu-Tang Clan

      2014-01-25 19:51:30

      From: Brandon
      The Direct-X plugin is only to provide colours and cannot affect clicking or other functions in any way. All functions such as clicking and interacting with the game is done via Simba and Smart.

      Try this and see:


      {$DEFINE SMART}
      {$I SRL-6/SRL.Simba}

      begin
      SmartPlugins := ['OpenGL32.dll', 'D3d9.dll'];
      SetupSRL;

      //Login your character after Smart loads..
      MoveMouse(250, 250);
      ClickMouse(250, 250, MOUSE_LEFT);
      end.


      Wierd, it doesn't show my red pointer/cursor anymore… I thought the clicks weren't registering because what it was clicking doesn't display a yellow marker upon click.

      Brandon

      2014-01-25 20:13:31

      From: Wu-Tang Clan
      Wierd, it doesn't show my red pointer/cursor anymore… I thought the clicks weren't registering because what it was clicking doesn't display a yellow marker upon click.


      https://github.com/Brandon-T/DXI/releases

      The last line says it's missing Smart's mouse drawing. That is the only thing keeping me from releasing this plugin as a Non-beta plugin.. That and figuring out a way to make it easier to get working.. I'm thinking of just adding the d3d9x_43.dll together with the plugin so that you guys won't have to install or download anything if your computers are missing it for some reason. Either that or I might start drawing textures with a vertex buffer and a shader but I'm lazy.. Plugin currently uses a SpriteBatch.

      Other than that, this plugin does everything the OpenGL one does. Including drawing on Smart.

      Wu-Tang Clan

      2014-01-25 20:54:52

      From: Brandon
      https://github.com/Brandon-T/DXI/releases

      The last line says it's missing Smart's mouse drawing. That is the only thing keeping me from releasing this plugin as a Non-beta plugin.. That and figuring out a way to make it easier to get working.. I'm thinking of just adding the d3d9x_43.dll together with the plugin so that you guys won't have to install or download anything if your computers are missing it for some reason. Either that or I might start drawing textures with a vertex buffer and a shader but I'm lazy.. Plugin currently uses a SpriteBatch.

      Other than that, this plugin does everything the OpenGL one does. Including drawing on Smart.


      So does not having a painted cursor increase my ban candidacy? Or is it irrelevant.

      Ashaman88

      2014-01-25 21:54:08

      Using your plugin brandon:


      sdf

      2014-01-25 22:16:58

      Also using your plugin.


      Ian

      2014-01-25 22:21:55

      From: Wu-Tang Clan
      So does not having a painted cursor increase my ban candidacy? Or is it irrelevant.


      If I'm correct the painted cursor is the same thing as when SMART is painted on for a proggy. So Jagex can't see it unless they're remotely viewing your computer. And if they were doing that you're banned regardless of whether SMART has a cursor. :)

      riwu

      2014-01-25 22:31:10

      @Brandon
      Would it require a lot of time to implement GetTextures() and GetModels() for the DirectX plugin?
      I remember you mentioning that the API is basically the same as OpenGL so it shouldn't take much effort to implement that? All i need is the equivalent of the few primary GLXCore methods.

      OpenGL can't be used to make any script that involves long distance travel/teleport/world hop due to the memory leak…
      Also will the IDs be the same in DirectX as in OpenGL?

      Brandon

      2014-01-25 23:53:38

      From: Wu-Tang Clan
      So does not having a painted cursor increase my ban candidacy? Or is it irrelevant.

      Nope. It does not increase detectability. Smart's mouse is actually drawn over the game's canvas. Another thing about using these plugins is that I can freely insert or remove draw commands from the game and it cannot be detected because Jagex would have to reverse my reversal of OpenGL and debug their own game on the fly. Considering that OpenGL can make well over 10k calls in a single frame and Direct-X can do about the same, this would immediately drop you to 1-fps. Another thing is that they would NOT be able to tell my draw calls apart from their own. Can easily insert a vertex into their buffer and it'd be impossible for them to tell without choking the graphics card. C, C++, and ASM have no reflection.

      Anyway, I'm getting too detailed. I'm pretty sure I wrote a tutorial on all of that somewhere..

      From: Ashaman88
      Using your plugin brandon:



      Very nice!

      From: sdf
      Also using your plugin.


      Looking good but is the chat not being detected a bug? Or part of your script? Or are colours different?


      From: riwu
      @Brandon
      Would it require a lot of time to implement GetTextures() and GetModels() for the DirectX plugin?
      I remember you mentioning that the API is basically the same as OpenGL so it shouldn't take much effort to implement that? All i need is the equivalent of the few primary GLXCore methods.

      OpenGL can't be used to make any script that involves long distance travel/teleport/world hop due to the memory leak…
      Also will the IDs be the same in DirectX as in OpenGL?


      While it is true that the API's are basically the same (both are C code) and does not take much time to implement (especially now that I have a plugin working and a fairly ok debugger), I'm not sure there is much benefit to me putting in time to implement these as the OpenGL non-colour plugin was NOT accepted or used by any part of SRL. The include lays there pretty much dead. I am aware that it apparently has a leak but I spent hours with Kasi and a ton of pros trying to find what just isn't there in the plugin but in the game itself along with its many glitches. However, I will think about adding it to Direct-X (maybe after I finish the Linux Native OpenGL-Colour plugin so that some of us won't have to use Wine.. Need Simba for Linux from Dgby714 or whoever has it). I'm hoping this plugin replaces the OpenGL one for Windows or at least gets used.

      I cannot say whether or not the IDs will be the same without actually implementing it. That'd be silly of me to say because Colours and textures may or may not be the same. To the human eye it could be the same but to a program it may not. I do believe it'd be the same though because colours seem to be the same, however, I cannot guarantee that.


      Anyway,

      I just added what I call a retard fix to the dll. No I'm not calling you guys retards. I'm calling my fix retarded because it actually embeds D3DX9_43 into the plugin. Calling it like:


      if DXIAutoFix(PluginPath) then
      writeln('Everything is fine!');

      will automatically "detect" if you are missing said file. If you are, it will extract said file from itself into your Simba's plugin folder. That should automatically fix whatever loading/flickering errors you guys seem to be having without any effort at all.. If that does NOT work then next time I will make it extract to your SysWOW64. Anyway, I'm confident it works. Just gotta find someone who has the problem.. *patiently waits*

      https://github.com/Brandon-T/DXI/releases/tag/v0.2

      sdf

      2014-01-26 00:33:27

      From: Brandon

      Looking good but is the chat not being detected a bug? Or part of your script? Or are colours different?


      It's just part of my script. Plays an alarm if new chat is detected. Colours on all utilities/menus are the same, the only noticable variance I've found is in the way water and fishing spots are rendered.

      Godless

      2014-01-26 04:42:33

      Hmmm… The Direct X itself is working - no flickering, button is there, etc. I just can't get it work in conjunction with ANY script. I try it with AIO Div and I get a Debug Image at log-in, and that is it. I try it with the Super Heater and it skips the GUI (where I have to enter account details, etc.) and goes straight to the log-in page, but has no details to log-in.

      Could I just be using the code wrong?


      EDIT -
      Tried this:
      Ok everyone who cannot get it working, try this: d3d9.zip


      Direct X is definitely fine.

      Brandon

      2014-01-26 10:35:47

      From: sdf
      It's just part of my script. Plays an alarm if new chat is detected. Colours on all utilities/menus are the same, the only noticable variance I've found is in the way water and fishing spots are rendered.


      Nice. That means only the shaders are different. Rightfully so since one is HLSL and the other is GLSL.. Thank you for that info.

      From: Desirousphere
      Hmmm… The Direct X itself is working - no flickering, button is there, etc. I just can't get it work in conjunction with ANY script..

      Could I just be using the code wrong?

      Direct X is definitely fine.


      If your Direct-X is working fine, and nothing else is, it is probably something on your part? Does it work for you in OpenGL mode? Without this information, there isn't really anyway I can help.

      If it works in OpenGL and not Direct-X, the only thing I can think of is that colours are different. According to others, the colours are the same though.. :l

      Ashaman88

      2014-01-26 11:09:18

      There has been a few times when restarting a script w/o smart open that it will give me the waiting 5 minutes message.. I should have just waited for it to take the screeny but after restarting smart a few times it starts to work again

      Godless

      2014-01-26 21:36:39

      Got it working.

      tealc

      2014-01-26 23:41:48

      From: Brandon

      *patiently waits*

      Any ideas about this error?
      http://puu.sh/6zF7O

      Runescape loads DirectX by default, but sometimes it's a little bit glitchy. My graphics card is pretty old, but it has the latest driver. My DirectX version is 9.0c. Windows DirectX diagnostic tool(DXDIAG.EXE) looks normal and it passes all of the direct3d tests.

      Brandon

      2014-01-27 00:00:25

      From: tealc
      Any ideas about this error?
      http://puu.sh/6zF7O

      Runescape loads DirectX by default, but sometimes it's a little bit glitchy. My graphics card is pretty old, but it has the latest driver. My DirectX version is 9.0c. Windows DirectX diagnostic tool(DXDIAG.EXE) looks normal and it passes all of the direct3d tests.



      You can get into DirectX in RS? Try: http://villavu.com/forum/showthread.php?t=107256&p=1282171#post1282171

      If it doesn't work, I'll look into it tomorrow. Gotta sleep. Uhh according to your error though, it is saying it cannot find Direct3DCreate9Ex in your d3d9.dll which is located in SysWOW64 or System32.. I made the plugin "throw" an exception whenever it cannot find a specific function that is almost always called by RS (perhaps not in your case). Perhaps your computer may not need that function and might resort to older functions.

      I'll remove the exception throwing if the above doesn't work for you. In the mean time, see if you can send me a copy of your d3d9.dll from sysWOW64 or system32.. It seems very weird that you could possibly be missing that specific function.

      tealc

      2014-01-27 00:26:45

      From: Brandon
      You can get into DirectX in RS?

      Yes, but sometimes it does this… http://puu.sh/6zFcd

      No need to remove the exception throwing, I just wanted to see if it would work at all. As I said directx mode in browser can be a little glitchy, that probably explains why my game sometimes looks like that. It gets worse on higher graphics settings.
      http://puu.sh/6zIEf
      http://puu.sh/6zIZQ
      http://puu.sh/6zJ2e
      http://puu.sh/6zJ77
      http://puu.sh/6zJaV

      edit:dll http://puu.sh/6zJGr.dll

      Godless

      2014-01-27 04:37:54

      From: Brandon
      If your Direct-X is working fine, and nothing else is, it is probably something on your part? Does it work for you in OpenGL mode? Without this information, there isn't really anyway I can help.

      If it works in OpenGL and not Direct-X, the only thing I can think of is that colours are different. According to others, the colours are the same though.. :l


      I can run scripts successfully in OpenGL, but it lags so bad that I don't even achieve 50% efficiency. It often lags so bad that I am logged out of RuneScape. Direct X resolves any issues with lag, but I can't seem to get the plug-in to run with any script…

      Ashaman88

      2014-01-27 09:20:43

      Thanks again Brandon, I can finally fix up my apeatoll script b/c the zoom thing was killing me !

      RlagkRud

      2014-01-27 16:56:38

      Just installed it and it seems to be working!
      Thanks a lot! DirectX > OpenGL for sure in terms of smoothness.
      That zoom in bug was also very annoying.

      Brandon

      2014-01-27 18:01:50

      You're welcomed. Glad to see something working :D

      For the others, OpenGL shouldn't be so slow.. I also just updated it a day or two ago. It has linux support for the most part and I fixed a couple bugs in exports for compatibility and to get rid of microsoft's crap. For now, I'm mostly focusing on getting Direct-X ready and what not.


      From: tealc
      Yes, but sometimes it does this… http://puu.sh/6zFcd

      No need to remove the exception throwing, I just wanted to see if it would work at all. As I said directx mode in browser can be a little glitchy, that probably explains why my game sometimes looks like that. It gets worse on higher graphics settings.
      http://puu.sh/6zIEf
      http://puu.sh/6zIZQ
      http://puu.sh/6zJ2e
      http://puu.sh/6zJ77
      http://puu.sh/6zJaV

      edit:dll http://puu.sh/6zJGr.dll




      Did you happen to blur those images? Or is that another language that I have never seen (Is your RS running a different language, why is everything out of place)? Just wondering because that is pretty screwed up.. Especially as those images depicted are running in your browser! Extremely messed up?

      Anyway, I'll need some time to investigate why your .dll is different from all of ours.. Kinda looks like the same situation with the OpenGL version that BMWxi had.. On the left is mine, on the right is yours:

      I have never ever seen a d3d9.dll NOT export CreateDevice9Ex. That means no matter what, you're unable to load the plugin since that export is missing and that also means that I would have to remove that check and instead check do a double check such as: CreateDevice0 || !CreateDevice9Ex.

      Is that Windows XP? Supporting multiple hardware is usually difficult but I managed to do it with OpenGL, pretty sure I could do it with D3D9 but it'd take me a day or two to figure out the difference in your exports and mine as I don't have access to a computer with a d3d9 like yours. I'll figure it out after my homework.. There only seems to be one function difference.


      @The other guy who's name did not stick in my head.. Deser something? Uhh see if you can contact me or allow me to teamviewer you and see what is up with you. You say you have it working but scripts won't work for you. That is odd since everyone else who has it working has scripts working. I can check it out if you like. Other than that, I'd be guessing at what is wrong.

      tealc

      2014-01-27 19:28:45

      That's the English game on Windows xp. Don't put too much effort into it for me, I'm fine playing in safe mode.
      From: Brandon
      Kinda looks like the same situation with the OpenGL version that BMWxi had..

      I remember that, it wouldn't work for me either. I believe my graphics card doesn't support that function either. http://puu.sh/6AIM8

      samerdl

      2014-01-27 19:51:03

      Brandon,

      Do you play CS portable?

      Nice plugin, well done!

      Wu-Tang Clan

      2014-01-28 11:56:13

      From: Brandon
      Nope. It does not increase detectability. Smart's mouse is actually drawn over the game's canvas. Another thing about using these plugins is that I can freely insert or remove draw commands from the game and it cannot be detected because Jagex would have to reverse my reversal of OpenGL and debug their own game on the fly. Considering that OpenGL can make well over 10k calls in a single frame and Direct-X can do about the same, this would immediately drop you to 1-fps. Another thing is that they would NOT be able to tell my draw calls apart from their own. Can easily insert a vertex into their buffer and it'd be impossible for them to tell without choking the graphics card. C, C++, and ASM have no reflection.

      Anyway, I'm getting too detailed. I'm pretty sure I wrote a tutorial on all of that somewhere..



      Very nice!



      Looking good but is the chat not being detected a bug? Or part of your script? Or are colours different?




      While it is true that the API's are basically the same (both are C code) and does not take much time to implement (especially now that I have a plugin working and a fairly ok debugger), I'm not sure there is much benefit to me putting in time to implement these as the OpenGL non-colour plugin was NOT accepted or used by any part of SRL. The include lays there pretty much dead. I am aware that it apparently has a leak but I spent hours with Kasi and a ton of pros trying to find what just isn't there in the plugin but in the game itself along with its many glitches. However, I will think about adding it to Direct-X (maybe after I finish the Linux Native OpenGL-Colour plugin so that some of us won't have to use Wine.. Need Simba for Linux from Dgby714 or whoever has it). I'm hoping this plugin replaces the OpenGL one for Windows or at least gets used.

      I cannot say whether or not the IDs will be the same without actually implementing it. That'd be silly of me to say because Colours and textures may or may not be the same. To the human eye it could be the same but to a program it may not. I do believe it'd be the same though because colours seem to be the same, however, I cannot guarantee that.


      Anyway,

      I just added what I call a retard fix to the dll. No I'm not calling you guys retards. I'm calling my fix retarded because it actually embeds D3DX9_43 into the plugin. Calling it like:


      if DXIAutoFix(PluginPath) then
      writeln('Everything is fine!');

      will automatically "detect" if you are missing said file. If you are, it will extract said file from itself into your Simba's plugin folder. That should automatically fix whatever loading/flickering errors you guys seem to be having without any effort at all.. If that does NOT work then next time I will make it extract to your SysWOW64. Anyway, I'm confident it works. Just gotta find someone who has the problem.. *patiently waits*

      https://github.com/Brandon-T/DXI/releases/tag/v0.2


      Hey brandon, my dxi works perfectly, but my brothers is not. I did exactly what you did but his file is failing to load/initiate. It says dxd9.dll is not working properly. I think your new release is the exact same as the previous one because there is no autoupdateme function like github says there is. Its the same as dxiv1

      Brandon

      2014-01-28 11:59:33

      From: Wu-Tang Clan
      Hey brandon, my dxi works perfectly, but my brothers is not. I did exactly what you did but his file is failing to load/initiate. It says dxd9.dll is not working properly. I think your new release is the exact same as the previous one because there is no autoupdateme function like github says there is. Its the same as dxiv1



      It isn't the same: https://github.com/Brandon-T/DXI/blob/master/DXI/main.cpp#L21 https://github.com/Brandon-T/DXI/blob/master/DXI/Utilities.cpp#L50

      Wu-Tang Clan

      2014-01-28 12:53:01

      From: Brandon
      It isn't the same: https://github.com/Brandon-T/DXI/blob/master/DXI/main.cpp#L21 https://github.com/Brandon-T/DXI/blob/master/DXI/Utilities.cpp#L50


      So dxiautofix and stuff is inside of dxi.dll? then how do I get to use it if it isn't initiating d3d9.dll in smart?

      Brandon

      2014-01-28 16:51:53

      From: Wu-Tang Clan
      So dxiautofix and stuff is inside of dxi.dll? then how do I get to use it if it isn't initiating d3d9.dll in smart?


      Because it isn't for SMART. It is for Simba.


      {$loadlib DXI.dll}

      begin
      if (DXIAutoFix(PluginPath)) then
      writeln('Fixed!');
      end.

      I think you're mixing up Smart and Simba plugins.

      This is how ALL simba plugins work. You must load them. It is not a SMART plugin. Smart plugins aren't for the user to touch. There are currently two plugin systems:

      Smart plugins and Simba plugins. Smart's plugin system is actually really new. Smart plugins are those that the game requires or plugins that extend Smart's functionality and ability to communicate with Simba.. Then there are Simba plugins which are those that are for scripting or communication. Plugins usually ship in pairs; one simba and one smart plugin. The simba one usually is used to communicate with the Smart one or do some sort of Setup in the background.

      Examples: GXL + OpenGL32; DXI + D3D9; LibEGL + LibGLESv2; etc.. etc..

      In other words, DXI isn't even needed at all. It is only ever needed if using the d3d9 in the browser or another client or if you need to fix your d3d9. Otherwise you don't need to load it.

      Ashaman88

      2014-01-28 19:17:51

      Question @Brandon; , would it be possible to have simba/ogl/directx plugins autodetect which graphics mode the current smart window is using, then use that graphics mode plugin automatically? Or is that crazy talk

      Brandon

      2014-01-28 19:31:39

      From: Ashaman88
      Question @Brandon; , would it be possible to have simba/ogl/directx plugins autodetect which graphics mode the current smart window is using, then use that graphics mode plugin automatically? Or is that crazy talk



      Well of course. Here's the thing.. If OpenGL colours and Direct-X colours are the same, all you do is load both plugins. Whichever mode your Smart is in, that's the plugin that will be used.. Only problem would be users in Safemode. I personally just load both plugins not caring about which one I'm using..

      Ashaman88

      2014-01-28 19:44:23

      From: Brandon
      Well of course. Here's the thing.. If OpenGL colours and Direct-X colours are the same, all you do is load both plugins. Whichever mode your Smart is in, that's the plugin that will be used.. Only problem would be users in Safemode. I personally just load both plugins not caring about which one I'm using..


      That would be awesome to add. However safemode isn't srl6 supported so that wouldn't matter so much (just give the standard 5 minutes no smart error)

      And I can confirm no difference:

      |=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=|
      | AshamanGGZZLRC v8.06 |
      |=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=|
      | Running For: 3 Hours, 29 Minutes and 36 Seconds |
      | Ore's Burned: 2,131 Ores/H: 610 |
      | Exp Earned: 136,400 Exp/Hour: 39,045 |
      |___________________________________________________________|
      |___________________________________________________________|

      Clarity

      2014-01-29 08:48:04

      Mouse drawing would be truly awesome, when script testing it's been frustrating sometimes not knowing whether the mouse is doing something totally off. But thanks for this plugin in general, a total life saver for barrows!

      Ashaman88

      2014-01-29 09:17:30

      From: Brandon
      Well of course. Here's the thing.. If OpenGL colours and Direct-X colours are the same, all you do is load both plugins. Whichever mode your Smart is in, that's the plugin that will be used.. Only problem would be users in Safemode. I personally just load both plugins not caring about which one I'm using..


      Also Brandon when I load both of the plugins, smartimage.draw whatever doesn't work anymore (but when i load only the directx plugin it does)

      Wu-Tang Clan

      2014-01-29 20:25:59

      Just a disclaimer: As soon as I put the D3D9_43.dll into my brothers sysWOW64 (system 32 for you 32 bit people) the plugin worked. It is in your best interest to put that file there. Good luck guys.

      Reflector

      2014-01-29 20:48:47

      The plugin loads fine for me but it just sits there with simba saying 'Waiting up to 5 minutes for RuneScape to load …'
      [ATTACH=CONFIG]22826[/ATTACH]

      Brandon

      2014-01-31 09:19:17

      From: Clarity
      Mouse drawing would be truly awesome, when script testing it's been frustrating sometimes not knowing whether the mouse is doing something totally off. But thanks for this plugin in general, a total life saver for barrows!


      Yes. I'm working on the mouse drawing stuff. I'll try to get it done today. Got no school.

      From: Ashaman88
      Also Brandon when I load both of the plugins, smartimage.draw whatever doesn't work anymore (but when i load only the directx plugin it does)



      That's both OpenGL and DirectX. However, I did end up finding a bug when BOTH plugins are loaded. Switching modes multiple times while both are loaded stops the OpenGL drawing but DirectX still draws fine when both are loaded.. Guess the pointer gets invalidated in OpenGL. Easy to fix. Might also change the name of the Enable Debug buttons so that you can tell which is which.. OR I can bug Benland to modify the plugin system to give plugins the ability to check if buttons already exist or the ability to remove and add buttons at run-time.. Maybe I'll do it and push it :l I think changing the names would be easiest for now though..

      Either way works..
      EDIT: Fixed Drawing and button names.


      From: Wu-Tang Clan
      Just a disclaimer: As soon as I put the D3D9_43.dll into my brothers sysWOW64 (system 32 for you 32 bit people) the plugin worked. It is in your best interest to put that file there. Good luck guys.


      Will fix. Another work around is to just do DXIAutoFix('C:/Windows/SysWOW64');. Should not have made a difference. I'll make the d3d9.dll load the other .dll explicitly. This way you'll never ever have to mess with your computer's internals. That is the only guaranteed fix. Was just testing the waters in hopes that I'd never have to do that :( Either that or I'll mess with the debug drawing again and draw using vertex/index buffers instead of sprites..

      EDIT: Fixed.

      From: Reflector
      The plugin loads fine for me but it just sits there with simba saying 'Waiting up to 5 minutes for RuneScape to load …'


      Check your graphic settings. Here's what I noticed. Even if my graphic settings are correct in OpenGL mode, it does NOT carry over to Direct-X. They are two different modes and you'll have to setup your Direct-X graphic settings to match your OpenGL settings or whatever settings worked for you before this plugin existed.

      I don't have a clue why the game is like that but it makes sense I guess.. In other words, if I have the mouse theme disabled in OpenGL, I can have it enabled in DirectX. Pretty cool to me.

      footballjds

      2014-01-31 09:28:30

      From: Ashaman88
      Thanks again Brandon, I can finally fix up my apeatoll script b/c the zoom thing was killing me !


      what zoom thing?

      Clarity

      2014-01-31 10:01:57

      From: footballjds
      what zoom thing?

      In OpenGL the game randomly zooms in when you load new areas, and you can't click on anything, which means you're basically stuck for about 6-7 seconds until it reverts back to normal. It's surprising Jagex hasn't fixed this tbh for so long.

      e.g. for the barrows script every time you enter a tomb or leave a tomb or enter the tunnels/leave the tunnels or teleport somewhere there's a 6-7 second wait, which adds up to a huge amount of wasted time.

      footballjds

      2014-01-31 10:02:48

      From: Clarity
      In OpenGL the game randomly zooms in when you load new areas, and you can't click on anything, which means you're basically stuck for about 6-7 seconds until it reverts back to normal. It's surprising Jagex hasn't fixed this tbh for so long.


      never encountered this

      Ashaman88

      2014-01-31 10:24:04

      From: footballjds
      never encountered this


      Go do a lap around the ape atoll agility course, it's pretty ridiculous


      And awesome job Brandon keep it up man

      The Mayor

      2014-01-31 15:51:30

      This is nice Brandon! the plugin woks great. It looks like all the colors are the same too, so no need to rewrite anything ;) No more minimap disappearing and zoom glitches! Is it possible to have another mouse cursor (apart from the red dot)

      The Mayor

      2014-02-03 05:56:08

      The new version or d3d9 I downloaded doesn't seem to draw on SMART, but the old version I had a few days ago did (unless I've somehow mixed them up or something?).

      Brandon

      2014-02-03 08:15:19

      From: The Mayor
      The new version or d3d9 I downloaded doesn't seem to draw on SMART, but the old version I had a few days ago did (unless I've somehow mixed them up or something?).


      Are you sure? Did it not draw the mouse or anything? If so, I'll check it out again. Maybe I uploaded the wrong dll. Anyway, make sure debug is on. Should look like what's on the main post.

      Clarity

      2014-02-03 08:35:02

      With the mouse addition this is perfect, thank you so much man.
      Edit: @Brandon can confirm the not drawing issue w/ the new dll. DirectX debug is on with no drawing occurring. Used the old plugin minutes ago with no issues.

      Brandon

      2014-02-03 09:03:26

      From: Clarity
      With the mouse addition this is perfect, thank you so much man.
      Edit: @Brandon can confirm the not drawing issue w/ the new dll. DirectX debug is on with no drawing occurring. Used the old plugin minutes ago with no issues.


      So it draws the mouse but not any debug stuff? If that is the case, I need to remove a line of code.

      Clarity

      2014-02-03 09:05:34

      From: Brandon
      So it draws the mouse but not any debug stuff? If that is the case, I need to remove a line of code.

      yeah.


      Brandon

      2014-02-03 09:16:38

      From: Clarity
      yeah.


      Very nice! Perfect description. Was hoping it won't be bad. Just gotta move a silly line of code and I'll upload it.. When I get home though. Stuck in this shitty Linux Fedora class doing nothing..

      Clarity

      2014-02-03 09:18:56

      Yeah I'm not sure if this is just me, but running my scripts in DirectX is like 10x smoother with much higher FPS. Not sure if this is just the FPS I see vs the FPS SMART sees, but it just looks a ton cleaner. And no more zooming in glitch which means…dungeoneering is coming…

      Reflector

      2014-02-04 04:46:45

      Still doesn't work for me… Just sits there waiting for rs to load… I tried each setting no luck :(
      All I have to add to my script is this line of code right??

      smartPlugins := ['d3d9.dll'];

      The Mayor

      2014-02-04 05:21:01

      From: Reflector
      Still doesn't work for me… Just sits there waiting for rs to load… I tried each setting no luck :(
      All I have to add to my script is this line of code right??

      smartPlugins := ['d3d9.dll'];


      And you actually have to change your graphics settings on rs before you load smart.

      Reflector

      2014-02-04 10:31:19

      Tried it… Still not working :( Could it be Java?? When I loaded the game in browser, it said I had an outdated version of Java so is it because of that?

      EDIT: Tried re-installing Java and Simba, and the plugin.. Still not working

      footballjds

      2014-02-04 14:30:58

      this works great and resolves the minimap issues…

      I kind of need debug working though.

      Thanks brandon

      rj

      2014-02-04 16:14:00

      From: Reflector
      Tried it… Still not working :( Could it be Java?? When I loaded the game in browser, it said I had an outdated version of Java so is it because of that?

      EDIT: Tried re-installing Java and Simba, and the plugin.. Still not working


      Well, nobody can help you if you just say 'it's not working'

      Brandon

      2014-02-04 20:47:37

      From: Reflector
      Tried it… Still not working :( Could it be Java?? When I loaded the game in browser, it said I had an outdated version of Java so is it because of that?

      EDIT: Tried re-installing Java and Simba, and the plugin.. Still not working


      There are currently problems even getting runescape to load.. I personally cannot get SMART into safemode in order to switch graphics modes.. I ended up having to get into safemode on my browser and then switch to directx there.. Then I switched to Smart..

      I also got that stupid Java problem as well.. I reinstalled Java like 5 times.. The first 4 times I used java that I downloaded myself.. it failed. I used the one on the RS page when you get that silly notification.. it worked :S

      Anyway, I think it was just my Java.. then again, if you even attempt to get into OpenGL mode atm, WITHOUT the plugin, it will freeze and if you try it in Smart, it will print "jaggl Exception in glDeleteTextures".. Not actually sure how the hell Jagex managed to mess up their own OpenGL wrapper.

      Just in case some of you were wondering, no it's not my OpenGL plugin which works fine btw.. Why? Because my plugin does NOT use any textures..

      So for the guy I'm currently replying to, either wait a while until Jagex fixes the client OR get into safemode in your browser and switch modes from there. As to why SMART won't go into safemode for me, I have NO idea at all..


      From: Clarity
      Yeah I'm not sure if this is just me, but running my scripts in DirectX is like 10x smoother with much higher FPS. Not sure if this is just the FPS I see vs the FPS SMART sees, but it just looks a ton cleaner. And no more zooming in glitch which means…dungeoneering is coming…


      From: footballjds
      this works great and resolves the minimap issues…

      I kind of need debug working though.

      Thanks brandon



      I just installed Java on my friend's laptop to test this plugin.. It is a very slight hardware difference between my laptop and you guys computers.. So my only alternative was to either test on my school computer or a friend's..

      Anyway, the difference is pretty retarded.. Basically on my computer, I can let textures auto-delete whenever the game resets the canvas.. However for you guys (including the laptop I tested it on), I must manually delete the texture every frame which means I must also create the texture every frame..

      THUS I will NOT be drafting this as a release (on my github that is) because it is a test plugin. I need to make sure it works for all of you before anything more.

      Secondly, I need to know if it is slow or laggy when drawing. Why? Because I'm now having to create a texture every frame (just like in OpenGL) and delete it every frame.. For you guys that is. Not sure why myself and Olly who also tested it don't have to do this :S

      Anyway, as a temporary fix until I get some "real time" to work on a better fix, use this instead: [ATTACH=CONFIG]22868[/ATTACH]
      It really shouldn't lag as my friend's comp is pretty shit and it doesn't seem to lag at all.


      And no, it's not a "bad" fix at all. It's just "temporary" as I don't have enough time to investigate it atm.. Probably will do on the weekend. The above should definitely work though.

      For those of you who like to see the different in source:

      http://www.diffchecker.com/kjz42ma7

      Yes that's right.. a one line difference.. Sorry it took so long to do..

      Clarity

      2014-02-04 20:55:19

      Interesting. I wonder if there's some random driver I could download that would fix it. Thanks for the detailed explanation.

      Brandon

      2014-02-04 21:00:01

      From: Clarity
      Interesting. I wonder if there's some random driver I could download that would fix it. Thanks for the detailed explanation.


      Most likely not. Seeing as it happened to more than one person with the exception of Olly and myself, I'd say it's just different function calls..

      For example, the previous plugin would delete the texture in Proxy::Reset();

      But for you guys, it seems that function may not be called.. Well it seems to be called once at the start of loading which is why it drew nothing because it was deleted already.

      For us, it wasn't deleted until Smart was closed. That's the difference. Don't bother or worry about drivers or anything. It's just the way the game makes calls and the order it is made in..

      Of course, I'll need to debug it to confirm the above (reset not being called by the game itself) but I'll do that on the weekend.. Too much homework and crap to do atm..

      Anyway, if you can, let me know if it draws fine for you now. Both mouse & debug.

      Clarity

      2014-02-04 21:07:32

      From: Brandon
      Anyway, if you can, let me know if it draws fine for you now. Both mouse & debug.

      Both are working fine now, thanks so much!


      Alhtough there are instances where the debug disappears into some kind of blackness (like the everything being drawn turns black/semi transparent and then fades in and out). Not sure if that's just me or not.

      Edit: got a pic of the weird semi-transparency:

      Brandon

      2014-02-04 21:22:11

      From: Clarity
      Both are working fine now, thanks so much!


      Alhtough there are instances where the debug disappears into some kind of blackness (like the everything being drawn turns black/semi transparent and then fades in and out). Not sure if that's just me or not.

      Edit: got a pic of the weird semi-transparency.


      Cool. Not a problem. Just another one liner again.. Gotta remove:
      SetRenderState(D3DRS_ALPHABLENDENABLE, TRUE);
      or set it to FALSE.

      I'll do it later. Don't wanna recompile it atm lol. But yeah. No lag or anything though right? Hopefully.
      Glad to see it finally working good for you guys though. Thank you for your responses. Really helps and helped a lot! Nice and quick too.

      Reflector

      2014-02-05 05:08:43

      @Officer Barbrady That's all I get from the debug haha… It says plugin 'd3d9.dll' loaded successfully and my SMART client has the DirectX buttons and all then it says 'Waiting for Runescape to load …' and the '1 minute has passed …' and it just continues till 5 minutes and then quits

      @Brandon All right I'll try that… Thanks! :)

      footballjds

      2014-02-05 13:32:27

      Brandon,

      I noticed SRL respawned a smart client but it said it never loaded. (it did though) I'm wondering whose bug this is.

      (using your temp/latest directX plugin)

      Kevin

      2014-02-05 13:56:23

      Just commenting to let you know that I was successfully using the DirectX plugin perfectly fine (after a restart of course, and the one line of plugin change in any script wanting it). Was using the v0.3 - not the latest uncompiled code.

      Unrelated to Quality of Life of the current public plugin, is the Import Address Table for functions, objects, or both?

      Godless

      2014-02-06 00:54:52

      From: Reflector
      Still doesn't work for me… Just sits there waiting for rs to load… I tried each setting no luck :(
      All I have to add to my script is this line of code right??

      smartPlugins := ['d3d9.dll'];


      So where in my script do I actually have to place this? Doesn't seem to like it anywhere I put it.

      Kevin

      2014-02-06 01:35:39

      From: Desirousphere
      So where in my script do I actually have to place this? Doesn't seem to like it anywhere I put it.


      Throw it as the first line after the last begin.

      Turpinator

      2014-02-06 02:03:03

      From: Reflector
      That's all I get from the debug haha… It says plugin 'd3d9.dll' loaded successfully and my SMART client has the DirectX buttons and all then it says 'Waiting for Runescape to load …' and the '1 minute has passed …' and it just continues till 5 minutes and then quits


      sounds like your runescape isnt set to DirectX mode…

      Godless

      2014-02-06 04:25:34

      From: Kevin
      Throw it as the first line after the last begin.


      Thank you.

      Reflector

      2014-02-06 05:53:22

      From: Turpinator
      sounds like your runescape isnt set to DirectX mode…

      But it is… I changed my settings to DirectX using the browser… Entered safe mode and switched to DirectX and then started my script…

      slushpuppy

      2014-02-06 10:02:40

      any chance you can get this to work on wine ;P?

      Brandon

      2014-02-10 05:44:30

      No Kevin. The IAT table if for functions only. It holds no variables. The VTable can hold variables and functions and the variable can be an object or a pointer to one.

      I'll try wine in a sec and see if it works on that.

      The Mayor

      2014-02-10 23:57:11

      From: Brandon
      Cool. Not a problem. Just another one liner again.. Gotta remove:
      SetRenderState(D3DRS_ALPHABLENDENABLE, TRUE);
      or set it to FALSE.

      I'll do it later. Don't wanna recompile it atm lol. But yeah. No lag or anything though right? Hopefully.
      Glad to see it finally working good for you guys though. Thank you for your responses. Really helps and helped a lot! Nice and quick too.


      Did you end up recompiling this?

      Kevin

      2014-02-11 00:50:06

      From: Brandon
      No Kevin. The IAT table if for functions only. It holds no variables. The VTable can hold variables and functions and the variable can be an object or a pointer to one.

      I'll try wine in a sec and see if it works on that.


      Ah, ok. Would you be willing to give a lesson on the basics of IAT and VTables? I tried looking at some of your previous threads, and I see references to them before, however I don't see any in depth explanation of them. Granted I only looked at the first page of posts on the OpenGL thread… None the less, I'm not entirely sure what they are besides some set of information relating to objects and/or functions. Are they [basically] what a pdb is to a typical dll? Or are they far more, granting us the direct access to the functions, as if they were a dll and pdb combined?

      Brandon

      2014-02-11 02:08:23

      From: The Mayor
      Did you end up recompiling this?


      No I haven't gotten around to recompiling it yet.. Just trying to finish all my school work and stuff.. I'm pretty swamped atm + doing a ton of Objective-C and teaching.. :l


      From: Kevin
      Ah, ok. Would you be willing to give a lesson on the basics of IAT and VTables? I tried looking at some of your previous threads, and I see references to them before, however I don't see any in depth explanation of them. Granted I only looked at the first page of posts on the OpenGL thread… None the less, I'm not entirely sure what they are besides some set of information relating to objects and/or functions. Are they [basically] what a pdb is to a typical dll? Or are they far more, granting us the direct access to the functions, as if they were a dll and pdb combined?



      I don't mind writing a tutorial.. I wrote you a short snippet in the last 5 mins + a little more to describe it.. I don't have time atm to format the below into nice bullet and keyword highlighting and stuff so bare with me..


      #include <iostream>
      #include <windows.h>

      class Child
      {
      public:
      virtual void PrintOne() {std::cout<<"PrintOne Called!\n";}
      virtual void PrintTwo() {std::cout<<"PrintTwo Called!\n";}
      virtual ~Child() {}
      };

      DWORD* GetVTableAddress(void* pObject)
      {
      return *reinterpret_cast<DWORD**>(pObject);
      }

      void HookFunction(DWORD* VTable, void* HookFunc, void* OldFunc, int Index)
      {
      //Enable writing to the VTable
      DWORD OldProtect = 0;
      VirtualProtect(&VTable[Index], sizeof(DWORD), PAGE_READWRITE, &OldProtect);

      //Save Old Function
      *reinterpret_cast<DWORD*>(OldFunc) = VTable[Index];

      //Overwrite Address with New Function
      VTable[Index] = reinterpret_cast<DWORD>(HookFunc);

      //Restore Old Protection
      VirtualProtect(VTable, sizeof(DWORD), OldProtect, &OldProtect);
      }

      void Hooked_PrintOne(void* this_ptr)
      {
      std::cout<<"Hooked PrintOne Called!\n";
      }

      void Hooked_PrintTwo(void* this_ptr)
      {
      std::cout<<"Hooked PrintTwo Called!\n";
      }

      int main()
      {
      void (*OldFunc)(void* this_ptr) = NULL; //A function pointer to backup the old class function.
      void (*OldFunc2)(void* this_ptr) = NULL; //same thing..

      Child* child = new Child();
      DWORD* VTable = GetVTableAddress(child);


      std::cout<<"Calling child->Print.. (not hooked yet)\n\n";

      child->PrintOne();
      child->PrintTwo();

      HookFunction(VTable, reinterpret_cast<void*>(&Hooked_PrintOne), &OldFunc, 0); //Hook function VTable[0]
      HookFunction(VTable, reinterpret_cast<void*>(&Hooked_PrintTwo), &OldFunc2, 1); //Hook function VTable[1]

      std::cout<<"----------------------------------------\n\n";
      std::cout<<"Calling child->Print.. (hooked)\n\n";

      child->PrintOne();
      child->PrintTwo();

      std::cout<<"----------------------------------------\n\n";
      std::cout<<"Calling Original child->Print.. (hooked)\n\n";

      OldFunc(NULL);
      OldFunc2(NULL);

      delete child;
      }


      In the above, we created a class called Child. Child has two virtual functions. Without the virtual table, child cannot be overriden or inherited from.

      Next we created a function to get the VPointer. The VPointer is a pointer to the VTable. The VPointer is always the first 4 bytes of a class unless specified otherwise (in that case it will be the last 4 bytes.. very very rare to see this!).

      4 bytes = sizeof(DWORD) or sizeof(std::uint32_t).

      After that comes any member functions (functions belonging to the class). These are all 4 bytes in length as well. Our GetVTableAddress function gets the VPointer by first casting the Object/class to a DWORD** pointer. This pointer is then dereferenced to get the VTable (a DWORD* aka array of function addresses).


      Next we see the HookFunction. How does it work? Well, lets explain the parameters:

      The first parameter it takes is of course the pointer to the VTable which we just got from GetVTableAddress.

      Next it wants a pointer to a "hook function".. The custom function we created to override the one inside the class.

      After that, it takes a pointer to a function that is the SAME SIGNATURE as the one in the class itself. This pointer will be used to backup the original function so we can either call it or restore it later.

      Finally, it takes the index in the VTable of the function we want to hook. Array in C++ start at index 0. Thus it only makes sense that the first function is actually index 0 and the next function is index 1 and so on. Note that they are still 4 bytes apart because we are speaking in terms of DWORDs.


      Now for how the HookFunction works. What it does is first it backs up the original protection that the memory has on it. Memory in windows has specific "permissions" or properties that protect it from accidental writing. Because of this, if you try to write to an address not allocated explicitly, you get access violations. However, if you make that memory writable, you may write to it freely without any problems at all.

      So any how, we change permissions on the VTable[Index] memory to Read/Write and we store the old protection in our variable. That will be used to restore the original protection when finished (also avoids detectability to an extent).

      The next line backs up the Class's function address in OldFunc pointer.
      Finally, we overwrite the address in the VTable with the address of our HookFunction. Thus when someone calls the class function, it actually calls our hook function instead.
      Lastly, we restore the original protection that the class initially had before we went messing with it.


      Ah now comes the Hooked functions..

      As we should know by now, classes are just a structure holding a group of functions but what makes a class function different from a regular function?


      void Regular_Function(const char* some_string)
      {
      }

      void Class_Function(void* this, const char* some_string)
      {
      }

      void RegularFunc()
      {
      }

      void ClassFunc(void* this)
      {
      }

      The above is the difference between a class function and a regular function. A class function is always passed a pointer to the current instance. That pointer is known as the "this" keyword/pointer in many languages. It is used to access variables of that class's instance.

      For this reason, our Hooked functions MUST have the "this" pointer as its first parameter! All other parameters may come after!
      The rest is pretty self explanatory..


      Advantages? Imagine you have something like d3d9.dll which has 50+ functions.. Do you really want to write a wrapper for all 50 functions even if you are only going to hook one?! (Yes I did that for d3d9.dll.. I know)

      The answer is NO. You do NOT typically want to do that. You want to write a VTable Hook function and hook as many functions as you need. Nothing more, nothing less. Less work for you overall and its cleaner and easier to read..

      Thus a hook can be a couple lines long.. For example, it can take less than 50 lines of code to hook d3d9's EndScene and get colours.


      Disadvantages? Requires a loader whereas a wrapper does not since it emulates the original .dll.

      That is about it for VTables.. Not sure if I can really teach you IAT because that requires explaining THUNK's and a whole bunch of disassembling and PE info (Portable Executable knowledge)..


      I'll think about writing a proper tutorial later or something.. I really got a lot to do and writing the above killed quite a lot of my free time and its 2:07AM.. I gotta leave for school at 5:30AM (no sleep lmao)

      Ashaman88

      2014-02-12 23:47:50

      Hey Brandon… Not sure if it's your plugin or SPS or what… but when I do the following:

      1) Make an SPS map (from DirectX or OGL mode) of an "upstairs" area, which has a lot of black on the MM
      2) Load both plugins smartPlugins := ['d3d9.dll','OpenGL32.dll'];
      3) Set GLX graphics mode
      4) Run sps.GetPlayerPOS repeating forever

      It always returns -1, -1 (ie not found).

      However if I run those same events with the same map, but have rs in OGL mode, it works perfect.

      I don't have that issue with ground level maps though so it makes me think it's something to do with the black.

      Again my SPS map works in OGL mode but not in GLX, even if I make the map while in GLX mode (however map made in GLX mode WILL work in OGL mode - so it's probs not different colors).

      Any ideas/Did that make sense?

      Frement

      2014-02-13 01:00:32

      The chunk might be different size in dx mode? Just a thought.

      Ashaman88

      2014-02-13 07:47:31

      From: Frement
      The chunk might be different size in dx mode? Just a thought.


      I confused what do you mean by chunk? Maps made on ground level work fine with both modes

      Frement

      2014-02-13 17:37:48

      From: Ashaman88
      I confused what do you mean by chunk? Maps made on ground level work fine with both modes


      Here are 4 chunks:

      Brandon

      2014-02-13 17:55:54

      From: Ashaman88
      Hey Brandon… Not sure if it's your plugin or SPS or what… but when I do the following:

      1) Make an SPS map (from DirectX or OGL mode) of an "upstairs" area, which has a lot of black on the MM
      2) Load both plugins smartPlugins := ['d3d9.dll','OpenGL32.dll'];
      3) Set GLX graphics mode
      4) Run sps.GetPlayerPOS repeating forever

      It always returns -1, -1 (ie not found).

      However if I run those same events with the same map, but have rs in OGL mode, it works perfect.

      I don't have that issue with ground level maps though so it makes me think it's something to do with the black.

      Again my SPS map works in OGL mode but not in GLX, even if I make the map while in GLX mode (however map made in GLX mode WILL work in OGL mode - so it's probs not different colors).

      Any ideas/Did that make sense?


      Uhh I'll have to check it out later.. I got access to nothing for the next 15hours.. On a stupid flight to NYC..

      If I had to guess, I'd say the first thing you should do is make sure you are getting colours fine. Try making a bitmapfromclient of the minimap area.

      Ashaman88

      2014-02-15 14:49:08

      From: Brandon
      Uhh I'll have to check it out later.. I got access to nothing for the next 15hours.. On a stupid flight to NYC..

      If I had to guess, I'd say the first thing you should do is make sure you are getting colours fine. Try making a bitmapfromclient of the minimap area.


      like so?


      Kevin

      2014-02-19 11:45:28

      From: Brandon
      …


      Many thanks for this! Although, it does bring up other questions: like why did you hook everything in your DirectX wrapper? As for the VTable Wrapper disadvantage, is the only disadvantage in that sense the extra work, or does it add extra processing in the startup that is noticeably significant, or something entirely else?

      And please, don't feel any need to stress out or lose sleep over stuff like this… I can be patient, and I'm sure everyone else can be as well, no need to run off 3 hours of sleep instead.

      Brandon

      2014-02-19 17:39:05

      From: Kevin
      Many thanks for this! Although, it does bring up other questions: like why did you hook everything in your DirectX wrapper? As for the VTable Wrapper disadvantage, is the only disadvantage in that sense the extra work, or does it add extra processing in the startup that is noticeably significant, or something entirely else?

      And please, don't feel any need to stress out or lose sleep over stuff like this… I can be patient, and I'm sure everyone else can be as well, no need to run off 3 hours of sleep instead.



      The wrapper requires everything to be hooked. Hence the word "wrapper". It must export every function that the original .dll exports. Otherwise there can be segmentation faults or simply easy detection.

      The VTable is actually "LESS" work than writing a wrapper. The wrapper has way more code. There isn't any performance difference. The reason for the wrapper is to allow Smart to load it. Otherwise it'd have to be injected or loaded as a different name other than d3d9.dll.



      As for Ashaman's bug. Is that really the actual minimap? With that one small brown square in the middle? If the colours are indeed correct, the only thing I can think of would be tolerances on the black area. That might not be completely black (0x00000000)

      blackalley22

      2014-04-15 17:40:42

      Ok so I want to learn how run a script with directx how do I go about using the plugin where do I save it how do i make a script use it?

      Brandon

      2014-04-15 17:42:45

      From: blackalley22
      Ok so I want to learn how run a script with directx how do I go about using the plugin where do I save it how do i make a script use it?



      You save the plugin in C:/Simba/Plugins and in the script you do:

      smartPlugins := ['d3d9.dll']

      blackalley22

      2014-04-15 17:59:06

      From: Brandon
      You save the plugin in C:/Simba/Plugins and in the script you do:

      smartPlugins := ['d3d9.dll']


      I have saved the plugin in my plugin folder but how do I save it into a script?

      Brandon

      2014-04-15 19:20:18

      From: blackalley22
      I have saved the plugin in my plugin folder but how do I save it into a script?


      You don't "Save" plugins into your script. Your script uses them. Smart uses them.

      In your script you do:

      smartPlugins := ['d3d9.dll']


      That will make smart use it.

      blackalley22

      2014-04-15 19:55:30

      From: Brandon
      You don't "Save" plugins into your script. Your script uses them. Smart uses them.

      In your script you do:

      smartPlugins := ['d3d9.dll']



      That will make smart use it.

      I'm using Ashaman88's aatole script and when it opens smart it says this ——– Using plugins "d3d9.dll,OpenGL32.dll" but its still spawning the opengl clinpe et if I use directx with the opengl client the script wont work.

      Brandon

      2014-04-15 20:21:56

      From: blackalley22
      I'm using Ashaman88's aatole script and when it opens smart it says this ——– Using plugins "d3d9.dll,OpenGL32.dll" but its still spawning the opengl clinpe et if I use directx with the opengl client the script wont work.



      I was under the impression that DirectX and OpenGL share the same colours. It should work. You just need to go to settings on the client and switch to DirectX. The only way I see this not working is if colours are different or if you have the plugins in the wrong place.

      blackalley22

      2014-04-15 21:11:58

      From: Brandon
      I was under the impression that DirectX and OpenGL share the same colours. It should work. You just need to go to settings on the client and switch to DirectX. The only way I see this not working is if colours are different or if you have the plugins in the wrong place.


      So all I have to do is save the folder into my plugins folder under simba and it should work?

      Gunner

      2014-04-18 17:41:37

      Ok, so even dumbass, inept Me got this to work, and in my own script nonetheless. It has greatly reduced CPU usage on 2 of my 4 open clients, (all 4 are using it), my question is, why not I can has all 4 reduced?

      The bots that are still at 25% usage have a noticeably lower fps than the 2 that are reduced. 12Fps vs. 40Fps via Alt+~ in the RS window. (See screenshot)

      I absolutely LOVE the fact that it has even reduced CPU by this much, however I can't figure out why it wouldn't do it on all open clients. I haven't tried raising or lowering the task manager priorities for the processes, but I can't imagine that would be the reason because I've never touched those for SMART.

      I would love to get the total CPU usage down to around 40% so I can stop cooking my CPU at 98%. Even with a water cooler I'm still running at 55C constantly. But lets be real, I'll just run more bots until I'm at 98% again, but hey, it was a nice thought.

      So, do you guys have any advice for me? Or is this a mystery to all?

      [ATTACH=CONFIG]23209[/ATTACH]

      Brandon

      2014-04-19 11:08:18

      From: Gunner

      So, do you guys have any advice for me? Or is this a mystery to all?



      I just did some benchmarks on the simplest d3d9 program:


      void D3DX::onUpdate(IDirect3D9* D3D9Ptr, IDirect3DDevice9* D3D9Device)
      {
      int Width = 0, Height = 0;
      HDC DC = nullptr;
      RECT rect;
      GetClientRect(this->Handle(), &rect);
      Buffer.resize((rect.right - rect.left) * (rect.bottom - rect.top) * 4);


      D3D9Device->Clear(0, nullptr, D3DCLEAR_TARGET, D3DCOLOR_XRGB(0, 40, 100), 1.0f, 0);
      D3D9Device->BeginScene();

      dxReadPixels(D3D9Device, &Buffer[0], DC, Width, Height, D3DFMT_UNKNOWN);
      //Save("C:/Users/Brandon/Desktop/Foo.bmp", &Buffer[0], Width, Height);

      D3D9Device->EndScene();
      D3D9Device->Present(nullptr, nullptr, nullptr, nullptr);
      }

      Commenting out dxReadPixels drops CPU usage to 1.7%. Reading pixels from the back-buffer jumps CPU usage to 8-10%.


      RS without reading the back-buffer has an average CPU usage of: 9-13% over 1 hour run-time.
      RS with the plugin without reading the back-buffer has an average CPU usage of 9-13% over 1 hour run-time.

      The above makes sense since the plugin is just a wrapper.

      However, when I enable reading, the worst CPU usage I got so far was 15% over a 1 hour span. Sometimes it spiked to 22% for a second or two but dropped back down after. This was for the official RS client in Varrock bank. I'm not sure what made it jump.

      All of this was tested in Varrock bank with the official client. I found similar values using SMART.

      http://i.imgur.com/r3dbNhv.png

      I did not try running multiple clients of any kind as that would have skewed the results. I don't have any ideas why it would go up when running multiple clients but if I had to guess, I'd say it's because each client gets less CPU/GPU time as the amount of clients increase.

      Gunner

      2014-04-19 17:19:15

      From: Brandon
      I did not try running multiple clients of any kind as that would have skewed the results. I don't have any ideas why it would go up when running multiple clients but if I had to guess, I'd say it's because each client gets less CPU/GPU time as the amount of clients increase.


      Those are about the same values I get when running a single SMART client as well. I just can't understand why 2 clients would always use >20% and 2 clients would always use <10%. They are running the same script, at the same location. My results are the same today, and I zeroed in on one of the >20% clients and it never dropped below that.

      I thought maybe the clients were, as you suggested, spiking to 20% and then settling back to 10%, and the 4 clients we're simply trading spikes to appear like the same 2 were always on top. But after a few minutes of watching, the >20%'s are always that high, and the <10%'s are always that low.

      The only thing I can imagine, is the first 2 clients I open run at >10% no matter what. After that, the GPU starts dumping graphical processes to the CPU to make up for the extra load. The next time I launch my clients I'll watch and see exactly in which order they start hogging CPU and report back.

      BTW Specs are:
      CPU - AMD FX-4100 3.6Ghz
      GPU - ATI Radeon HD 4670 1GB
      Mobo - Gigabyte GA-970A-D3
      RAM - 16GB DDR3

      terrmiits

      2014-04-24 05:53:15

      where is the folder i have to place in this plugin to work?

      Rogue Sniper

      2014-06-28 15:31:11

      Hey Brandon tryed to get it working for me but no luck. I'm running Windows 8.1 on a Laptop.
      TestD3D9 comes back with "Your Direct-X is fine!"

      In Client/Browser I can get Dirext-X to run fine. In SMART it just flickers.

      Is there any way you'd make a Tutorial on where to put things and settings?

      KeepBotting

      2014-06-28 19:47:45

      From: Rogue Sniper
      Hey Brandon tryed to get it working for me but no luck. I'm running Windows 8.1 on a Laptop.
      TestD3D9 comes back with "Your Direct-X is fine!"

      In Client/Browser I can get Dirext-X to run fine. In SMART it just flickers.

      Is there any way you'd make a Tutorial on where to put things and settings?

      Make sure you place the plugin in C;/Simba/Plugins

      And make sure you're actually running RS on Direct-X mode

      If you've got no Direct-X mode option, it's the the plugin, it's your graphics card.

      The Mayor

      2014-06-28 20:40:25

      From: Rogue Sniper
      Hey Brandon tryed to get it working for me but no luck. I'm running Windows 8.1 on a Laptop.
      TestD3D9 comes back with "Your Direct-X is fine!"

      In Client/Browser I can get Dirext-X to run fine. In SMART it just flickers.

      Is there any way you'd make a Tutorial on where to put things and settings?


      From: KeepBotting
      Make sure you place the plugin in C;/Simba/Plugins

      And make sure you're actually running RS on Direct-X mode

      If you've got no Direct-X mode option, it's the the plugin, it's your graphics card.


      and you need to make sure you tell smart to use the plugin too:


      smartPlugins := ['openGL32.dll', 'd3d9.dll'];

      Rogue Sniper

      2014-06-29 14:03:28

      Thanks for the Help — RS wasn't in direct-x mode for some reason – thought that i set it up.
      i also didnt have the plugin in the simba/plugins folder

      works great now

      toxjq

      2014-07-25 17:41:00

      so how do i install the plugin?

      Zeta Matt

      2014-07-29 17:23:55

      Thanks for the plugin. It's working better than when I was using the normal smart with OpenGl; I wonder why the normal SMART can't have this as standard…

      Can you try this…?

      Simba Code:
      {$loadlib libsmartremote}

      var
      params: TStringArray;

      begin
      params := explode(',', between('<iframe id="game" src="', '"', getPage('http://www.runescape.com/game.ws?j=1')));

      if (not fileExists(PluginPath+'d3d9.dll')) then
      begin
      writeln('NO PLUGIN!@!@@!@');
      terminateScript();
      end;

      smartSpawnClient('java.exe', stringReplace(PluginPath, '\', '/', [rfReplaceAll]), params[0], ',' + params[1], 800, 600, '', '', '', 'd3d9.dll');
      end.

      And see if the plugin successfully loads? (you will see a disable direct-x button).


      This also helped me a lot in figuring out why d3d9.dll wasn't being loaded for me :) Thanks Olly

      Zeta Matt

      2014-07-29 17:25:22

      Only problem I've had until now is that SMART becomes the active window whenever the script triggers a clicking procedure… Could annoy a lot in click-intensive scripts. Any ideas on why this happens?

      KeepBotting

      2014-07-29 17:30:52

      From: Zeta Matt
      Only problem I've had until now is that SMART becomes the active window whenever the script triggers a clicking procedure… Could annoy a lot in click-intensive scripts. Any ideas on why this happens?

      iirc it's something to do with how your OS interprets SMART's mouse events, only way to stop it is make another window active, and wait till SMART's taskbar icon starts flashing yellow. it shouldn't try and make itself active after that

      Zeta Matt

      2014-07-29 18:10:01

      From: KeepBotting
      iirc it's something to do with how your OS interprets SMART's mouse events, only way to stop it is make another window active, and wait till SMART's taskbar icon starts flashing yellow. it shouldn't try and make itself active after that


      Oh, haven't thought about that. It had become flashing yellow indeed, but I clicked it every time >.> Thanks

      Spaceblow

      2014-08-08 05:43:37

      Brandon, thank you very much for this great plugin. When I used OpenGL the minimap always glitched out when I started up the client, now this problem is fixed because I'm using your plugin. :)

      alar82

      2014-08-12 23:40:06

      Got some questions. Finally managed to compile vtable.cpp but it comes out as exe. Shoudnt it be a dll? for injection. It does display "Hooked!".
      So what do I compile first? What to inject? Does SharedMemory work on those new hooks=?

      Brandon

      2014-08-13 02:20:50

      From: alar82
      Got some questions. Finally managed to compile vtable.cpp but it comes out as exe. Shoudnt it be a dll? for injection. It does display "Hooked!".
      So what do I compile first? What to inject? Does SharedMemory work on those new hooks=?



      VTable.cpp is just an example of HOW VTable hooking & detouring works. It is there as a sort of "documentation". I linked to it in some thread that explained the difference between VTable hooking, detouring & wrapping.


      In that example/doc, it hooks the Kernel32 function "Sleep" and replaces it with a custom function, "hSleep".


      For example, it could hook "Kernel32.Sleep" and replace it with "User32.MessageBoxA" via Detour patching. Everytime you call sleep, it'd show a messagebox. The file doesn't hook Direct-X itself.



      https://github.com/Brandon-T/DXI/blob/master/Other%20Hook%20Styles/VTable%20D3D9%20Hook.cpp

      ^^ That's what you need to compile (VTable hooks) into a .dll.

      I know it looks like a tiny bit of code but that little amount of code is equivalent to the entire Direct-X plugin that SRL scripts use. I've already explained somewhere on the forums the difference between the current .dll and the vtable hooks.


      Once you compile that, you can use: https://github.com/Brandon-T/DXI/blob/master/Other%20Hook%20Styles/Injector/main.cpp

      to inject it into an application.

      Is there a reason you want to do this though? You can already inject the current d3d9.dll as well..

      alar82

      2014-08-13 04:41:23

      I wanna somehow get texture ids (somewhere is mentioned that vtabel is only way), but really dont know what the hell I am doing. Yeah I see d3d9 has folder hooks.
      Can I use d3d9 to draw something to offical client surfcace?

      I would use opengl but it seems to be heavily bugged on amd cards. Even color-only version slows down from 40 to 1fps after few teleports.

      NKN

      2014-08-13 10:48:11

      Heyo got a question for y'all.

      Using Brandon's script over here:

      {$loadlib DXI}

      Function PtrToBmp(Width, Height: Integer; Ptr: Pointer): Integer;
      var
      Bmp: TMufasaBitmap;
      Begin
      Bmp.Init(Client.GetMBitmaps);
      Bmp.SetPersistentMemory(Uint32(Ptr), Width, Height);
      Bmp.SetTransparentColor(0);
      Result := Bmp.GetIndex();
      End;

      Procedure DebugBitmap(Bmp: Integer);
      var
      W, H: Integer;
      Begin
      GetBitmapSize(Bmp, W, H);
      DisplayDebugImgWindow(W, H);
      DrawBitmapDebugImg(Bmp);
      End;

      var
      Bmp: Integer;
      W, H: Integer;
      begin
      GetClientDimensions(W, H); //this line requires that you drag the crosshairs on the window.
      if (DXISetup(1388)) then //change the this value to whatever the message box shows LAST!
      begin
      writeln('DXI setup succeeded');
      Bmp := PtrToBmp(W, H, DXIImagePointer());
      DebugBitmap(Bmp);
      FreeBitmap(Bmp);
      end else
      writeln('Failed to setup DXI.');
      end.

      The process ID that goes in DXISetup is that just the PID you can find in taskmanager?

      Put 2420 from Dreamseekers PID in there, selected the window, and no go.
      What do?

      Brandon

      2014-08-13 12:54:37

      From: alar82
      I wanna somehow get texture ids (somewhere is mentioned that vtabel is only way), but really dont know what the hell I am doing. Yeah I see d3d9 has folder hooks.
      Can I use d3d9 to draw something to offical client surfcace?

      I would use opengl but it seems to be heavily bugged on amd cards. Even color-only version slows down from 40 to 1fps after few teleports.




      Well that's not true at all.. Yes you can draw to the surface of the official client. Yes you can hook textures but you don't need VTable hooks at all. VTable hooks are useful IFF you want to hook a SINGLE function without having to wrap each and every one. It's usually done for quick hooks.

      For example, the current plugin that Smart LOADS hooks every function or else it cannot be loaded. However, a VTable hook can hook 1, 2, 3, 4, 5++.. amount of functions and still work. It doesn't have to hook all and that's an advantage IMO.


      To hook textures, you can easily just hook: HRESULT Direct3DDevice9::SetTexture(DWORD Stage, IDirect3DBaseTexture9* pTexture)

      Just save pTexture to a buffer. Nice and easy. It should be noted that you could hook other functions such as the render functions and monitor what's happening (shaders, models, textures, etc..).



      From: NKN
      …



      The SRL Direct-X plugins will NEVER work for that. I removed it before (in v0.1; current version is v0.4) because Simba is already able to capture Direct-X windows WITHOUT the plugin (or so I was told). IIRC Cynic also added support for that to Simba. But even without the support, it was able to capture the windows already (again, I was told this). Thus the plugin was only needed for SMART..


      For external programs, I use: https://github.com/Brandon-T/DXI/releases/tag/v0.4 VisualStudio.Build.Source.zip.

      This allows you to do BOTH SMART, Official Client, & Browsers/External Apps. Why? Because someone emailed me asking for the ability to build the plugin with Visual Studio.

      That zip file contains both the source & the plugins themselves (in the Release folder). The plugin is significantly faster (for me at least) and smaller (for everyone) than the SRL one (afaict.. even though there is more code). Turns out Visual Studio is better at this than g++-4.8.1 on Windows.

      Also the script I use now is.. It just allows you to clear the screen and shows how to "draw" on other windows.


      {$loadlib DXI}

      Function PtrToBmp(Width, Height: Integer; Ptr: Pointer): Integer;
      var
      Bmp: TMufasaBitmap;
      Begin
      Bmp.Init(Client.GetMBitmaps);
      Bmp.SetPersistentMemory(Uint32(Ptr), Width, Height);
      Bmp.SetTransparentColor(0);
      Result := Bmp.GetIndex();
      End;

      Procedure DrawBox(Bmp: Integer; Box: TBox; Fill: Boolean = False; Colour: TColor = $FF);
      var
      TPA: Array Of TPoint;
      TM: TMufasaBitmap;
      Begin
      TM := GetMufasaBitmap(Bmp);
      If (Fill) then
      TM.Rectangle(Box, Colour)
      Else
      Begin
      TPA := EdgeFromBox(Box);
      TM.DrawTPA(TPA, Colour);
      End;
      End;

      Procedure ClearBox(Bmp: Integer; Box: TBox);
      Begin
      DrawBox(Bmp, Box, True, $0);
      End;

      Procedure DebugBitmap(Bmp: Integer);
      var
      W, H: Integer;
      Begin
      GetBitmapSize(Bmp, W, H);
      DisplayDebugImgWindow(W, H);
      DrawBitmapDebugImg(Bmp);
      End;

      var
      Bmp: Integer;
      W, H: Integer;
      begin
      GetClientDimensions(W, H); //this line requires that you drag the crosshairs on the window.
      if (DXISetup(9244)) then //change the this value to the PID..
      begin
      writeln('DXI setup succeeded');
      Bmp := PtrToBmp(W, H, DXIImagePointer());
      DebugBitmap(Bmp);
      FreeBitmap(Bmp);

      Bmp := PtrToBmp(W, H, DXIDebugPointer());
      ClearBox(Bmp, IntToBox(0, 0, W - 1, H - 1));
      DrawBox(Bmp, IntToBox(0, 0, 100, 100));
      FreeBitmap(Bmp);

      end else
      writeln('Failed to setup DXI.');
      end.


      I had also requested that Dbgy & Olly added the ability to grab a window's handle. I think it goes something like: client.getIOManager.getTarget.getHandle;

      Not sure. But that would allow us to do something like: DXISetp(client.getIOManager.getTarget.getHandle); without having to worry about the stupid PID every single time.

      NKN

      2014-08-13 19:58:00

      From: Brandon
      Well that's not true at all.. Yes you can draw to the surface of the official client. Yes you can hook textures but you don't need VTable hooks at all. VTable hooks are useful IFF you want to hook a SINGLE function without having to wrap each and every one. It's usually done for quick hooks.

      For example, the current plugin that Smart LOADS hooks every function or else it cannot be loaded. However, a VTable hook can hook 1, 2, 3, 4, 5++.. amount of functions and still work. It doesn't have to hook all and that's an advantage IMO.


      To hook textures, you can easily just hook: HRESULT Direct3DDevice9::SetTexture(DWORD Stage, IDirect3DBaseTexture9* pTexture)

      Just save pTexture to a buffer. Nice and easy. It should be noted that you could hook other functions such as the render functions and monitor what's happening (shaders, models, textures, etc..).






      The SRL Direct-X plugins will NEVER work for that. I removed it before (in v0.1; current version is v0.4) because Simba is already able to capture Direct-X windows WITHOUT the plugin (or so I was told). IIRC Cynic also added support for that to Simba. But even without the support, it was able to capture the windows already (again, I was told this). Thus the plugin was only needed for SMART..


      For external programs, I use: https://github.com/Brandon-T/DXI/releases/tag/v0.4 VisualStudio.Build.Source.zip.

      This allows you to do BOTH SMART, Official Client, & Browsers/External Apps. Why? Because someone emailed me asking for the ability to build the plugin with Visual Studio.

      That zip file contains both the source & the plugins themselves (in the Release folder). The plugin is significantly faster (for me at least) and smaller (for everyone) than the SRL one (afaict.. even though there is more code). Turns out Visual Studio is better at this than g++-4.8.1 on Windows.

      Also the script I use now is.. It just allows you to clear the screen and shows how to "draw" on other windows.


      {$loadlib DXI}

      Function PtrToBmp(Width, Height: Integer; Ptr: Pointer): Integer;
      var
      Bmp: TMufasaBitmap;
      Begin
      Bmp.Init(Client.GetMBitmaps);
      Bmp.SetPersistentMemory(Uint32(Ptr), Width, Height);
      Bmp.SetTransparentColor(0);
      Result := Bmp.GetIndex();
      End;

      Procedure DrawBox(Bmp: Integer; Box: TBox; Fill: Boolean = False; Colour: TColor = $FF);
      var
      TPA: Array Of TPoint;
      TM: TMufasaBitmap;
      Begin
      TM := GetMufasaBitmap(Bmp);
      If (Fill) then
      TM.Rectangle(Box, Colour)
      Else
      Begin
      TPA := EdgeFromBox(Box);
      TM.DrawTPA(TPA, Colour);
      End;
      End;

      Procedure ClearBox(Bmp: Integer; Box: TBox);
      Begin
      DrawBox(Bmp, Box, True, $0);
      End;

      Procedure DebugBitmap(Bmp: Integer);
      var
      W, H: Integer;
      Begin
      GetBitmapSize(Bmp, W, H);
      DisplayDebugImgWindow(W, H);
      DrawBitmapDebugImg(Bmp);
      End;

      var
      Bmp: Integer;
      W, H: Integer;
      begin
      GetClientDimensions(W, H); //this line requires that you drag the crosshairs on the window.
      if (DXISetup(9244)) then //change the this value to the PID..
      begin
      writeln('DXI setup succeeded');
      Bmp := PtrToBmp(W, H, DXIImagePointer());
      DebugBitmap(Bmp);
      FreeBitmap(Bmp);

      Bmp := PtrToBmp(W, H, DXIDebugPointer());
      ClearBox(Bmp, IntToBox(0, 0, W - 1, H - 1));
      DrawBox(Bmp, IntToBox(0, 0, 100, 100));
      FreeBitmap(Bmp);

      end else
      writeln('Failed to setup DXI.');
      end.


      I had also requested that Dbgy & Olly added the ability to grab a window's handle. I think it goes something like: client.getIOManager.getTarget.getHandle;

      Not sure. But that would allow us to do something like: DXISetp(client.getIOManager.getTarget.getHandle); without having to worry about the stupid PID every single time.


      Yeah I tried snagging the Simba from http://nala.villavu.com/downloads/directx-tests/ but it won't open on my PC.

      64 bit or 32 bit.


      I'll check out your plugin though, unless there's another Simba with directX. :')

      Brandon

      2014-08-13 23:24:50

      From: NKN
      Yeah I tried snagging the Simba from http://nala.villavu.com/downloads/directx-tests/ but it won't open on my PC.

      64 bit or 32 bit.


      I'll check out your plugin though, unless there's another Simba with directX. :')



      I'm not going to ask how you found that or where you got it :S I'll just blame Olly.. but it also doesn't run on my PC as well and so I'll blame Olly again.. lol

      Olly

      2014-08-13 23:40:02

      From: Brandon
      I'm not going to ask how you found that or where you got it :S I'll just blame Olly.. but it also doesn't run on my PC as well and so I'll blame Olly again.. lol


      wat y!

      Brandon

      2014-08-13 23:50:24

      From: Olly
      wat y!


      Because whenever I have a Simba problem and I'm don't want to bother Dgby, I just bother you or blame you. It makes more sense that way. It just does. It's nature's law of life.

      If I need something fixed, I ask you. If I need something added, I ask you and if you say no, I ask dgby and if he says no, I cry every time.. and then make a plugin. Because I ask you first, I will blame you first and then I blame him and then whoever else is on the Simba commit lists. lol. /logic.

      NKN

      2014-08-14 00:01:32

      From: Brandon
      I'm not going to ask how you found that or where you got it :S I'll just blame Olly.. but it also doesn't run on my PC as well and so I'll blame Olly again.. lol


      Yeah seems like a good idea.

      Olly, fix directX pls u borked it.

      Nexusop

      2014-09-29 18:19:51

      Brandon, could you do a simple explanation how to export the hooked DX functions to Lape? There doesn't seem to be any documentation for C++ plugins. Thanks.

      mrisperfect

      2015-01-01 14:15:59

      I got the direct x plugin to work, but now i am unsure of what I need to put in my scripts to make it use directx instead of Opengl, help please?

      P.S it works fine, i just don't know what i have to change to make it use the directx instead of opengl

      Brandon

      2015-01-01 14:53:36

      From: mrisperfect
      I got the direct x plugin to work, but now i am unsure of what I need to put in my scripts to make it use directx instead of Opengl, help please?

      P.S it works fine, i just don't know what i have to change to make it use the directx instead of opengl


      SRL-6 should automatically use either one. I think..

      If not then you need to do:


      smartPlugins := ['d3d9.dll'];
      setupSRL;


      Then switch the client to Direct-X mode in graphic settings.

      mrisperfect

      2015-01-01 15:01:51

      From: Brandon
      SRL-6 should automatically use either one. I think..

      If not then you need to do:


      smartPlugins := ['d3d9.dll'];
      setupSRL;


      Then switch the client to Direct-X mode in graphic settings.


      I find that it logs into runescape ok, but once it's fully logged in, it doesn't do anything such as it won't bot or click anything.


      P.S Does the simba script have to support directx for me to bot? or i can use any script?

      The Mayor

      2015-01-01 15:43:29

      From: mrisperfect
      I find that it logs into runescape ok, but once it's fully logged in, it doesn't do anything such as it won't bot or click anything.


      P.S Does the simba script have to support directx for me to bot? or i can use any script?


      This thread is a little obsolete now because both the openGL and this directX plugin are packaged with srl6, and by default both plugins will be loaded when you spawn a SMART client. You just have to make sure your in game graphics are set to DirectX and it should work.

      mrisperfect

      2015-01-01 15:57:31

      From: The Mayor
      This thread is a little obsolete now because both the openGL and this directX plugin are packaged with srl6, and by default both plugins will be loaded when you spawn a SMART client. You just have to make sure your in game graphics are set to DirectX and it should work.


      I have it set in directx, and it still don't work unless i use a script that support directx. Is there anyway to use the scripts that are for opengl?

      cosmasjdz

      2015-01-01 16:26:35

      From: mrisperfect
      I have it set in directx, and it still don't work unless i use a script that support directx. Is there anyway to use the scripts that are for opengl?


      Yes, change most colors since they differ alot in some ocasions

      Brandon

      2015-05-24 00:06:12

      You can all test now: https://villavu.com/forum/showthread.php?t=107256&p=1276881#post1276881

      Report anything missing or unusual.

      Don't worry about ID's as they're just there for testing the debugging and not actually generated properly (they are a CRC32 of ALL the pixels in the texture atm or a simple hash of the primitive count in models).

      Clarity

      2015-05-24 00:17:40

      You have allowed me to continue what I had previously given up on. Thank you, Brandon.

      @Brandon, so far, SMART has crashed when attempting to enter Direct X mode. Will try again and edit this post with updates.

      Edit: on 2nd attempt, when switching to DX mode while not logged in, it worked!

      So far working perfectly, always at 50fps at 800x600. Going to try larger client sizes now. Using a Macbook Pro.

      Edit 2: Averaging 40fps at 1920x1200, which is incredible compared to OGL. Thank you!


      Brandon

      2015-05-24 00:32:09

      From: Clarity
      You have allowed me to continue what I had previously given up on. Thank you, Brandon.

      @Brandon, so far, SMART has crashed when attempting to enter Direct X mode. Will try again and edit this post with updates.

      Edit: on 2nd attempt, when switching to DX mode while not logged in, it worked!

      So far working perfectly, always at 50fps at 800x600. Going to try larger client sizes now. Using a Macbook Pro.



      Excellent. I'll investigate the crash. If you have a log of it, that would be good. If not, it's okay. There's only two possible functions it could have happened in (EndScene or DrawIndexedPrimitive).

      Glad the FPS is high though. I didn't test other sizes but it should be roughly the same.

      Clarity

      2015-05-24 00:42:26

      From: Brandon
      Excellent. I'll investigate the crash. If you have a log of it, that would be good. If not, it's okay. There's only two possible functions it could have happened in (EndScene or DrawIndexedPrimitive).

      Glad the FPS is high though. I didn't test other sizes but it should be roughly the same.

      Could this be the log you are looking for? It contains "j jagdx.IDirect3DDevice.EndScene(J)I+0".

      [spoiler='Crash Log']
      #
      # A fatal error has been detected by the Java Runtime Environment:
      #
      # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x15ed6e22, pid=8100, tid=2496
      #
      # JRE version: Java(TM) SE Runtime Environment (8.0_31-b13) (build 1.8.0_31-b13)
      # Java VM: Java HotSpot(TM) Client VM (25.31-b07 mixed mode windows-x86 )
      # Problematic frame:
      # C [d3d9.dll+0x6e22]
      #
      # Failed to write core dump. Minidumps are not enabled by default on client versions of Windows
      #
      # If you would like to submit a bug report, please visit:
      # http://bugreport.java.com/bugreport/crash.jsp
      # The crash happened outside the Java Virtual Machine in native code.
      # See problematic frame for where to report the bug.
      #

      ————— T H R E A D —————

      Current thread (0x16580c00): JavaThread "Thread-4" daemon [_thread_in_native, id=2496, stack(0x1a4b0000,0x1a500000)]

      siginfo: ExceptionCode=0xc0000005, reading address 0x1fda8008

      Registers:
      EAX=0x0001366b, EBX=0x1fda8010, ECX=0x0145ee48, EDX=0x1a4ff14c
      ESP=0x1a4ff194, EBP=0x1a4ff1dc, ESI=0x1fcddbb0, EDI=0x1a324a20
      EIP=0x15ed6e22, EFLAGS=0x00210212

      Top of Stack: (sp=0x1a4ff194)
      0x1a4ff194: 1fda8000 00057000 ffff0000 15f90351
      0x1a4ff1a4: 0001366b 01179ff0 000014d5 16580c00
      0x1a4ff1b4: 1a4ff1dc 1fbb32a0 1fbb3178 1a27a2c8
      0x1a4ff1c4: 00000008 16580c00 1e14f928 1e14f928
      0x1a4ff1d4: 1e14f928 16580c00 1a4ff1e8 664a3413
      0x1a4ff1e4: 1a324a20 1a4ff220 02afbe43 16580d38
      0x1a4ff1f4: 1a4ff228 1e8825d0 00000000 1a4ff200
      0x1a4ff204: 1e14f928 1a4ff234 1e150138 00000000

      Instructions: (pc=0x15ed6e22)
      0x15ed6e02: 8b 45 e4 8b 4f 0c 83 c3 0c 8b 40 24 c7 44 24 0c
      0x15ed6e12: 51 03 f9 15 c7 44 24 08 00 00 ff ff 89 44 24 10
      0x15ed6e22: d9 43 f8 d9 5c 24 04 d9 43 f4 d9 1c 24 e8 bc ba
      0x15ed6e32: 01 00 83 ec 14 39 de 75 c7 8b 45 e4 8b 58 28 83


      Register to memory mapping:

      EAX=0x0001366b is an unknown value
      EBX=0x1fda8010 is an unknown value
      ECX=0x0145ee48 is an unknown value
      EDX=0x1a4ff14c is pointing into the stack for thread: 0x16580c00
      ESP=0x1a4ff194 is pointing into the stack for thread: 0x16580c00
      EBP=0x1a4ff1dc is pointing into the stack for thread: 0x16580c00
      ESI=0x1fcddbb0 is an unknown value
      EDI=0x1a324a20 is an unknown value


      Stack: [0x1a4b0000,0x1a500000], sp=0x1a4ff194, free space=316k
      Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
      C [d3d9.dll+0x6e22]
      C [jagdx.dll+0x3413]
      j jagdx.IDirect3DDevice.EndScene(J)I+0
      j ank.c(II)V+46
      J 1293 C1 db.d(B)V (31 bytes) @ 0x02f28004 [0x02f27fd0+0x34]
      J 640 C1 client.ap(I)V (1366 bytes) @ 0x02cc8e6c [0x02cc7e30+0x103c]
      J 639 C1 rk.w(I)V (293 bytes) @ 0x02cc6708 [0x02cc6460+0x2a8]
      J 663% C1 rk.z(B)V (431 bytes) @ 0x02cdbea8 [0x02cdb9a0+0x508]
      j rk.run()V+3
      j java.lang.Thread.run()V+11
      v ~StubRoutines::call_stub
      V [jvm.dll+0x1473e5]
      V [jvm.dll+0x20d57e]
      V [jvm.dll+0x14747e]
      V [jvm.dll+0x147606]
      V [jvm.dll+0x147677]
      V [jvm.dll+0xf09df]
      V [jvm.dll+0x169acc]
      V [jvm.dll+0x16a35a]
      V [jvm.dll+0x1af0a6]
      C [msvcr100.dll+0x5c556]
      C [msvcr100.dll+0x5c600]
      C [KERNEL32.DLL+0x17c04]
      C [ntdll.dll+0x5ad1f]
      C [ntdll.dll+0x5acea]
      C 0x00000000

      Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
      j jagdx.IDirect3DDevice.EndScene(J)I+0
      j ank.c(II)V+46
      J 1293 C1 db.d(B)V (31 bytes) @ 0x02f28004 [0x02f27fd0+0x34]
      J 640 C1 client.ap(I)V (1366 bytes) @ 0x02cc8e6c [0x02cc7e30+0x103c]
      J 639 C1 rk.w(I)V (293 bytes) @ 0x02cc6708 [0x02cc6460+0x2a8]
      J 663% C1 rk.z(B)V (431 bytes) @ 0x02cdbea8 [0x02cdb9a0+0x508]
      j rk.run()V+3
      j java.lang.Thread.run()V+11
      v ~StubRoutines::call_stub

      ————— P R O C E S S —————

      Java Threads: ( => current thread )
      0x16871c00 JavaThread "Smart_Image_Transfer" daemon [_thread_blocked, id=6396, stack(0x19dc0000,0x19e10000)]
      0x16872800 JavaThread "pool-1-thread-2" [_thread_blocked, id=7296, stack(0x19480000,0x194d0000)]
      0x16876000 JavaThread "Thread-43" daemon [_thread_blocked, id=5432, stack(0x1be00000,0x1be50000)]
      0x16872000 JavaThread "Thread-42" daemon [_thread_in_native, id=7148, stack(0x1bd70000,0x1bdc0000)]
      0x16870800 JavaThread "Thread-14" daemon [_thread_in_native, id=1448, stack(0x192a0000,0x192f0000)]
      0x16873000 JavaThread "Thread-13" daemon [_thread_blocked, id=308, stack(0x19170000,0x191c0000)]
      0x16870400 JavaThread "Thread-12" daemon [_thread_blocked, id=3640, stack(0x190e0000,0x19130000)]
      0x16873c00 JavaThread "Java Sound Event Dispatcher" daemon [_thread_blocked, id=5296, stack(0x18d80000,0x18dd0000)]
      0x167dfc00 JavaThread "pool-1-thread-1" [_thread_blocked, id=1740, stack(0x1b750000,0x1b7a0000)]
      0x167df400 JavaThread "Thread-8" daemon [_thread_blocked, id=6356, stack(0x1b630000,0x1b680000)]
      0x167e1400 JavaThread "Thread-7" daemon [_thread_blocked, id=2948, stack(0x1b5a0000,0x1b5f0000)]
      0x168dd800 JavaThread "Thread-6" daemon [_thread_blocked, id=5568, stack(0x1b410000,0x1b460000)]
      0x16724c00 JavaThread "D3D Screen Updater" daemon [_thread_blocked, id=7968, stack(0x1b000000,0x1b050000)]
      0x16666000 JavaThread "AWT-EventQueue-0" [_thread_blocked, id=3012, stack(0x1a5d0000,0x1a620000)]
      0x1a7ff400 JavaThread "AWT-Shutdown" [_thread_blocked, id=5720, stack(0x1a540000,0x1a590000)]
      =>0x16580c00 JavaThread "Thread-4" daemon [_thread_in_native, id=2496, stack(0x1a4b0000,0x1a500000)]
      0x1a9f0c00 JavaThread "Thread-3" daemon [_thread_blocked, id=7772, stack(0x1a220000,0x1a270000)]
      0x1a9d0400 JavaThread "Thread-2" daemon [_thread_blocked, id=880, stack(0x1a190000,0x1a1e0000)]
      0x1687c400 JavaThread "Thread-1" daemon [_thread_blocked, id=3700, stack(0x174b0000,0x17500000)]
      0x1524f400 JavaThread "AWT-Windows" daemon [_thread_in_native, id=5924, stack(0x17540000,0x17590000)]
      0x1524d800 JavaThread "Java2D Disposer" daemon [_thread_blocked, id=6568, stack(0x17420000,0x17470000)]
      0x150ad400 JavaThread "Service Thread" daemon [_thread_blocked, id=6708, stack(0x15530000,0x15580000)]
      0x15085c00 JavaThread "C1 CompilerThread0" daemon [_thread_blocked, id=6952, stack(0x154a0000,0x154f0000)]
      0x15084c00 JavaThread "Attach Listener" daemon [_thread_blocked, id=5104, stack(0x15410000,0x15460000)]
      0x15082c00 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=5896, stack(0x15380000,0x153d0000)]
      0x15064800 JavaThread "Finalizer" daemon [_thread_blocked, id=5112, stack(0x152f0000,0x15340000)]
      0x02aee800 JavaThread "Reference Handler" daemon [_thread_blocked, id=2532, stack(0x15260000,0x152b0000)]
      0x0117c000 JavaThread "main" [_thread_in_native, id=2616, stack(0x00fa0000,0x00ff0000)]

      Other Threads:
      0x02aea400 VMThread [stack: 0x04b80000,0x04bd0000] [id=2600]
      0x150b1000 WatcherThread [stack: 0x155c0000,0x15610000] [id=5224]

      VM state:not at safepoint (normal execution)

      VM Mutex/Monitor currently owned by a thread: None

      Heap:
      def new generation total 78656K, used 27986K [0x04c00000, 0x0a150000, 0x0a150000)
      eden space 69952K, 40% used [0x04c00000, 0x06754b90, 0x09050000)
      from space 8704K, 0% used [0x09050000, 0x09050000, 0x098d0000)
      to space 8704K, 0% used [0x098d0000, 0x098d0000, 0x0a150000)
      tenured generation total 174784K, used 168162K [0x0a150000, 0x14c00000, 0x14c00000)
      the space 174784K, 96% used [0x0a150000, 0x145888c0, 0x14588a00, 0x14c00000)
      Metaspace used 19163K, capacity 19309K, committed 19456K, reserved 19840K

      Card table byte_map: [0x04af0000,0x04b80000] byte_map_base: 0x04aca000

      Polling page: 0x00ee0000

      CodeCache: size=32768Kb used=11097Kb max_used=11184Kb free=21670Kb
      bounds [0x02af0000, 0x035e0000, 0x04af0000]
      total_blobs=2752 nmethods=2386 adapters=296
      compilation: enabled

      Compilation events (10 events):
      Event: 174.514 Thread 0x15085c00 2734 ade::be (169 bytes)
      Event: 174.515 Thread 0x15085c00 nmethod 2734 0x035dd908 code [0x035dda40, 0x035ddc8c]
      Event: 174.540 Thread 0x15085c00 2735 java.util.Arrays::binarySearch0 (95 bytes)
      Event: 174.540 Thread 0x15085c00 nmethod 2735 0x02c0e148 code [0x02c0e260, 0x02c0e3c8]
      Event: 174.542 Thread 0x15085c00 2736 sun.java2d.loops.GraphicsPrimitive::getUniqueID (5 bytes)
      Event: 174.542 Thread 0x15085c00 nmethod 2736 0x02c0df88 code [0x02c0e080, 0x02c0e100]
      Event: 174.545 Thread 0x15085c00 2737 s sun.java2d.loops.GraphicsPrimitiveMgr::locatePrim (96 bytes)
      Event: 174.546 Thread 0x15085c00 nmethod 2737 0x02bdd588 code [0x02bdd6c0, 0x02bddb6c]
      Event: 174.546 Thread 0x15085c00 2738 sun.java2d.loops.GraphicsPrimitiveMgr$2::compare (39 bytes)
      Event: 174.546 Thread 0x15085c00 nmethod 2738 0x02bdca48 code [0x02bdcb50, 0x02bdcc50]

      GC Heap History (10 events):
      Event: 173.173 GC heap before
      {Heap before GC invocations=52 (full 16):
      def new generation total 78656K, used 69952K [0x04c00000, 0x0a150000, 0x0a150000)
      eden space 69952K, 100% used [0x04c00000, 0x09050000, 0x09050000)
      from space 8704K, 0% used [0x098d0000, 0x098d0000, 0x0a150000)
      to space 8704K, 0% used [0x09050000, 0x09050000, 0x098d0000)
      tenured generation total 174784K, used 146089K [0x0a150000, 0x14c00000, 0x14c00000)
      the space 174784K, 83% used [0x0a150000, 0x12ffa598, 0x12ffa600, 0x14c00000)
      Metaspace used 19069K, capacity 19213K, committed 19328K, reserved 19840K
      Event: 173.263 GC heap after
      Heap after GC invocations=53 (full 17):
      def new generation total 78656K, used 0K [0x04c00000, 0x0a150000, 0x0a150000)
      eden space 69952K, 0% used [0x04c00000, 0x04c00000, 0x09050000)
      from space 8704K, 0% used [0x098d0000, 0x098d0000, 0x0a150000)
      to space 8704K, 0% used [0x09050000, 0x09050000, 0x098d0000)
      tenured generation total 174784K, used 124578K [0x0a150000, 0x14c00000, 0x14c00000)
      the space 174784K, 71% used [0x0a150000, 0x11af8980, 0x11af8a00, 0x14c00000)
      Metaspace used 19069K, capacity 19213K, committed 19328K, reserved 19840K
      }
      Event: 173.477 GC heap before
      {Heap before GC invocations=53 (full 17):
      def new generation total 78656K, used 69952K [0x04c00000, 0x0a150000, 0x0a150000)
      eden space 69952K, 100% used [0x04c00000, 0x09050000, 0x09050000)
      from space 8704K, 0% used [0x098d0000, 0x098d0000, 0x0a150000)
      to space 8704K, 0% used [0x09050000, 0x09050000, 0x098d0000)
      tenured generation total 174784K, used 124578K [0x0a150000, 0x14c00000, 0x14c00000)
      the space 174784K, 71% used [0x0a150000, 0x11af8980, 0x11af8a00, 0x14c00000)
      Metaspace used 19069K, capacity 19213K, committed 19328K, reserved 19840K
      Event: 173.492 GC heap after
      Heap after GC invocations=54 (full 17):
      def new generation total 78656K, used 8703K [0x04c00000, 0x0a150000, 0x0a150000)
      eden space 69952K, 0% used [0x04c00000, 0x04c00000, 0x09050000)
      from space 8704K, 99% used [0x09050000, 0x098cfff8, 0x098d0000)
      to space 8704K, 0% used [0x098d0000, 0x098d0000, 0x0a150000)
      tenured generation total 174784K, used 140524K [0x0a150000, 0x14c00000, 0x14c00000)
      the space 174784K, 80% used [0x0a150000, 0x12a8b058, 0x12a8b200, 0x14c00000)
      Metaspace used 19069K, capacity 19213K, committed 19328K, reserved 19840K
      }
      Event: 173.877 GC heap before
      {Heap before GC invocations=54 (full 17):
      def new generation total 78656K, used 78655K [0x04c00000, 0x0a150000, 0x0a150000)
      eden space 69952K, 100% used [0x04c00000, 0x09050000, 0x09050000)
      from space 8704K, 99% used [0x09050000, 0x098cfff8, 0x098d0000)
      to space 8704K, 0% used [0x098d0000, 0x098d0000, 0x0a150000)
      tenured generation total 174784K, used 140524K [0x0a150000, 0x14c00000, 0x14c00000)
      the space 174784K, 80% used [0x0a150000, 0x12a8b070, 0x12a8b200, 0x14c00000)
      Metaspace used 19086K, capacity 19245K, committed 19328K, reserved 19840K
      Event: 173.896 GC heap after
      Heap after GC invocations=55 (full 17):
      def new generation total 78656K, used 8703K [0x04c00000, 0x0a150000, 0x0a150000)
      eden space 69952K, 0% used [0x04c00000, 0x04c00000, 0x09050000)
      from space 8704K, 99% used [0x098d0000, 0x0a14fff8, 0x0a150000)
      to space 8704K, 0% used [0x09050000, 0x09050000, 0x098d0000)
      tenured generation total 174784K, used 158619K [0x0a150000, 0x14c00000, 0x14c00000)
      the space 174784K, 90% used [0x0a150000, 0x13c36e48, 0x13c37000, 0x14c00000)
      Metaspace used 19086K, capacity 19245K, committed 19328K, reserved 19840K
      }
      Event: 173.897 GC heap before
      {Heap before GC invocations=55 (full 17):
      def new generation total 78656K, used 8706K [0x04c00000, 0x0a150000, 0x0a150000)
      eden space 69952K, 0% used [0x04c00000, 0x04c00830, 0x09050000)
      from space 8704K, 99% used [0x098d0000, 0x0a14fff8, 0x0a150000)
      to space 8704K, 0% used [0x09050000, 0x09050000, 0x098d0000)
      tenured generation total 174784K, used 158619K [0x0a150000, 0x14c00000, 0x14c00000)
      the space 174784K, 90% used [0x0a150000, 0x13c36e48, 0x13c37000, 0x14c00000)
      Metaspace used 19086K, capacity 19245K, committed 19328K, reserved 19840K
      Event: 173.905 GC heap after
      Heap after GC invocations=56 (full 17):
      def new generation total 78656K, used 0K [0x04c00000, 0x0a150000, 0x0a150000)
      eden space 69952K, 0% used [0x04c00000, 0x04c00000, 0x09050000)
      from space 8704K, 0% used [0x09050000, 0x09050000, 0x098d0000)
      to space 8704K, 0% used [0x098d0000, 0x098d0000, 0x0a150000)
      tenured generation total 174784K, used 167323K [0x0a150000, 0x14c00000, 0x14c00000)
      the space 174784K, 95% used [0x0a150000, 0x144b6e40, 0x144b7000, 0x14c00000)
      Metaspace used 19086K, capacity 19245K, committed 19328K, reserved 19840K
      }
      Event: 174.395 GC heap before
      {Heap before GC invocations=56 (full 17):
      def new generation total 78656K, used 69755K [0x04c00000, 0x0a150000, 0x0a150000)
      eden space 69952K, 99% used [0x04c00000, 0x0901ed58, 0x09050000)
      from space 8704K, 0% used [0x09050000, 0x09050000, 0x098d0000)
      to space 8704K, 0% used [0x098d0000, 0x098d0000, 0x0a150000)
      tenured generation total 174784K, used 167323K [0x0a150000, 0x14c00000, 0x14c00000)
      the space 174784K, 95% used [0x0a150000, 0x144b6e40, 0x144b7000, 0x14c00000)
      Metaspace used 19163K, capacity 19309K, committed 19456K, reserved 19840K
      Event: 174.507 GC heap after
      Heap after GC invocations=57 (full 18):
      def new generation total 78656K, used 23281K [0x04c00000, 0x0a150000, 0x0a150000)
      eden space 69952K, 33% used [0x04c00000, 0x062bc580, 0x09050000)
      from space 8704K, 0% used [0x09050000, 0x09050000, 0x098d0000)
      to space 8704K, 0% used [0x098d0000, 0x098d0000, 0x0a150000)
      tenured generation total 174784K, used 168162K [0x0a150000, 0x14c00000, 0x14c00000)
      the space 174784K, 96% used [0x0a150000, 0x145888c0, 0x14588a00, 0x14c00000)
      Metaspace used 19163K, capacity 19309K, committed 19456K, reserved 19840K
      }

      Deoptimization events (0 events):
      No events

      Internal exceptions (10 events):
      Event: 173.114 Thread 0x16580c00 Exception <a 'java/security/PrivilegedActionException'> (0x071061a0) thrown at [C:\re\workspace\8-2-build-windows-i586-cygwin\jdk8u31\2394\hotspot\src\share\vm\prims\jvm.cpp, line 1312]
      Event: 173.114 Thread 0x16580c00 Exception <a 'java/security/PrivilegedActionException'> (0x07106850) thrown at [C:\re\workspace\8-2-build-windows-i586-cygwin\jdk8u31\2394\hotspot\src\share\vm\prims\jvm.cpp, line 1312]
      Event: 173.558 Thread 0x16580c00 Implicit null exception at 0x02c00bd6 to 0x02c0125b
      Event: 173.579 Thread 0x16580c00 Implicit null exception at 0x0353f04b to 0x0354032c
      Event: 173.644 Thread 0x16580c00 Exception <a 'java/security/PrivilegedActionException'> (0x07378810) thrown at [C:\re\workspace\8-2-build-windows-i586-cygwin\jdk8u31\2394\hotspot\src\share\vm\prims\jvm.cpp, line 1312]
      Event: 173.645 Thread 0x16580c00 Exception <a 'java/security/PrivilegedActionException'> (0x07378ec0) thrown at [C:\re\workspace\8-2-build-windows-i586-cygwin\jdk8u31\2394\hotspot\src\share\vm\prims\jvm.cpp, line 1312]
      Event: 173.726 Thread 0x16580c00 Exception <a 'java/security/PrivilegedActionException'> (0x07b84588) thrown at [C:\re\workspace\8-2-build-windows-i586-cygwin\jdk8u31\2394\hotspot\src\share\vm\prims\jvm.cpp, line 1312]
      Event: 173.727 Thread 0x16580c00 Exception <a 'java/security/PrivilegedActionException'> (0x07b84e20) thrown at [C:\re\workspace\8-2-build-windows-i586-cygwin\jdk8u31\2394\hotspot\src\share\vm\prims\jvm.cpp, line 1312]
      Event: 174.326 Thread 0x16580c00 Exception <a 'java/security/PrivilegedActionException'> (0x08672c58) thrown at [C:\re\workspace\8-2-build-windows-i586-cygwin\jdk8u31\2394\hotspot\src\share\vm\prims\jvm.cpp, line 1312]
      Event: 174.326 Thread 0x16580c00 Exception <a 'java/security/PrivilegedActionException'> (0x08673310) thrown at [C:\re\workspace\8-2-build-windows-i586-cygwin\jdk8u31\2394\hotspot\src\share\vm\prims\jvm.cpp, line 1312]

      Events (10 events):
      Event: 174.515 Thread 0x15085c00 flushing nmethod 0x02c1ee08
      Event: 174.515 Thread 0x15085c00 flushing nmethod 0x02c1f148
      Event: 174.515 Thread 0x15085c00 flushing nmethod 0x02c1f448
      Event: 174.515 Thread 0x15085c00 flushing nmethod 0x02c1f888
      Event: 174.515 Thread 0x15085c00 flushing nmethod 0x02c1fc88
      Event: 174.515 Thread 0x15085c00 flushing nmethod 0x02c20088
      Event: 174.539 Executing VM operation: BulkRevokeBias
      Event: 174.539 Executing VM operation: BulkRevokeBias done
      Event: 174.539 Executing VM operation: BulkRevokeBias
      Event: 174.539 Executing VM operation: BulkRevokeBias done


      Dynamic libraries:
      0x01060000 - 0x01090000 C:\Program Files (x86)\Java\jre1.8.0_25\bin\java.exe
      0x77cc0000 - 0x77e2e000 C:\WINDOWS\SYSTEM32\ntdll.dll
      0x772e0000 - 0x77420000 C:\WINDOWS\SYSTEM32\KERNEL32.DLL
      0x77aa0000 - 0x77b77000 C:\WINDOWS\SYSTEM32\KERNELBASE.dll
      0x74770000 - 0x74810000 C:\WINDOWS\system32\apphelp.dll
      0x601d0000 - 0x60436000 C:\WINDOWS\AppPatch\AcGenral.DLL
      0x76c10000 - 0x76cd3000 C:\WINDOWS\SYSTEM32\msvcrt.dll
      0x77b80000 - 0x77bc1000 C:\WINDOWS\SYSTEM32\sechost.dll
      0x754c0000 - 0x754de000 C:\WINDOWS\SYSTEM32\SspiCli.dll
      0x76f70000 - 0x76fb5000 C:\WINDOWS\SYSTEM32\SHLWAPI.dll
      0x72140000 - 0x7222d000 C:\WINDOWS\SYSTEM32\UxTheme.dll
      0x77940000 - 0x77a93000 C:\WINDOWS\SYSTEM32\USER32.dll
      0x76d80000 - 0x76e8e000 C:\WINDOWS\SYSTEM32\GDI32.dll
      0x71ce0000 - 0x71d03000 C:\WINDOWS\SYSTEM32\WINMM.dll
      0x72280000 - 0x72293000 C:\WINDOWS\SYSTEM32\samcli.dll
      0x771b0000 - 0x772d8000 C:\WINDOWS\SYSTEM32\ole32.dll
      0x76ce0000 - 0x76d75000 C:\WINDOWS\SYSTEM32\OLEAUT32.dll
      0x6cd50000 - 0x6cd67000 C:\WINDOWS\SYSTEM32\MSACM32.dll
      0x75440000 - 0x75448000 C:\WINDOWS\SYSTEM32\VERSION.dll
      0x757e0000 - 0x76a8c000 C:\WINDOWS\SYSTEM32\SHELL32.dll
      0x74860000 - 0x7487b000 C:\WINDOWS\SYSTEM32\USERENV.dll
      0x72120000 - 0x7213a000 C:\WINDOWS\SYSTEM32\dwmapi.dll
      0x6f500000 - 0x6f64a000 C:\WINDOWS\SYSTEM32\urlmon.dll
      0x778c0000 - 0x7793c000 C:\WINDOWS\SYSTEM32\ADVAPI32.dll
      0x753d0000 - 0x75435000 C:\WINDOWS\SYSTEM32\WINSPOOL.DRV
      0x71440000 - 0x71456000 C:\WINDOWS\SYSTEM32\MPR.dll
      0x775e0000 - 0x7769a000 C:\WINDOWS\SYSTEM32\RPCRT4.dll
      0x754b0000 - 0x754ba000 C:\WINDOWS\SYSTEM32\CRYPTBASE.dll
      0x76a90000 - 0x76c0d000 C:\WINDOWS\SYSTEM32\combase.dll
      0x71cb0000 - 0x71cd3000 C:\WINDOWS\SYSTEM32\WINMMBASE.dll
      0x74810000 - 0x7481f000 C:\WINDOWS\SYSTEM32\profapi.dll
      0x74880000 - 0x74ab2000 C:\WINDOWS\SYSTEM32\iertutil.dll
      0x74ca0000 - 0x74e73000 C:\WINDOWS\SYSTEM32\WININET.dll
      0x75450000 - 0x754a4000 C:\WINDOWS\SYSTEM32\bcryptPrimitives.dll
      0x76f20000 - 0x76f5c000 C:\WINDOWS\SYSTEM32\cfgmgr32.dll
      0x753a0000 - 0x753c1000 C:\WINDOWS\SYSTEM32\DEVOBJ.dll
      0x735a0000 - 0x7362b000 C:\WINDOWS\SYSTEM32\SHCORE.DLL
      0x77180000 - 0x771a7000 C:\WINDOWS\system32\IMM32.DLL
      0x75600000 - 0x75712000 C:\WINDOWS\SYSTEM32\MSCTF.dll
      0x70940000 - 0x70b46000 C:\WINDOWS\WinSxS\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.9600.17784_none_a9f497a901334c74\COMCTL32.dll
      0x6a310000 - 0x6a3cf000 C:\Program Files (x86)\Java\jre1.8.0_25\bin\msvcr100.dll
      0x5dd90000 - 0x5e134000 C:\Program Files (x86)\Java\jre1.8.0_25\bin\client\jvm.dll
      0x74f30000 - 0x74f38000 C:\WINDOWS\SYSTEM32\WSOCK32.dll
      0x75720000 - 0x75726000 C:\WINDOWS\SYSTEM32\PSAPI.DLL
      0x75540000 - 0x75590000 C:\WINDOWS\SYSTEM32\WS2_32.dll
      0x77420000 - 0x77427000 C:\WINDOWS\SYSTEM32\NSI.dll
      0x6cd70000 - 0x6cd7c000 C:\Program Files (x86)\Java\jre1.8.0_25\bin\verify.dll
      0x69840000 - 0x69861000 C:\Program Files (x86)\Java\jre1.8.0_25\bin\java.dll
      0x69e50000 - 0x69e63000 C:\Program Files (x86)\Java\jre1.8.0_25\bin\zip.dll
      0x6e600000 - 0x6e691000 C:\Simba\Plugins\libsmartjni32.dll
      0x69820000 - 0x69835000 C:\Program Files (x86)\Java\jre1.8.0_25\bin\net.dll
      0x73160000 - 0x731ab000 C:\WINDOWS\system32\mswsock.dll
      0x6c550000 - 0x6c55f000 C:\Program Files (x86)\Java\jre1.8.0_25\bin\nio.dll
      0x68540000 - 0x6861d000 C:\Simba\Plugins\OpenGL32.dll
      0x70b70000 - 0x70b95000 C:\WINDOWS\SYSTEM32\GLU32.DLL
      0x70260000 - 0x7033e000 C:\WINDOWS\system32\opengl32.dll
      0x6c200000 - 0x6c2ec000 C:\WINDOWS\SYSTEM32\DDRAW.dll
      0x72110000 - 0x72117000 C:\WINDOWS\SYSTEM32\DCIMAN32.dll
      0x15ed0000 - 0x15fa8000 C:\Simba\Plugins\d3d9.dll
      0x5ff30000 - 0x6012f000 C:\WINDOWS\SYSTEM32\d3dx9_43.dll
      0x6d9b0000 - 0x6db83000 C:\WINDOWS\system32\d3d9.dll
      0x74ac0000 - 0x74b3e000 C:\WINDOWS\SYSTEM32\DNSAPI.dll
      0x73130000 - 0x73151000 C:\Program Files (x86)\Bonjour\mdnsNSP.dll
      0x74c80000 - 0x74ca0000 C:\WINDOWS\SYSTEM32\Iphlpapi.DLL
      0x74850000 - 0x74858000 C:\WINDOWS\SYSTEM32\WINNSI.DLL
      0x73120000 - 0x73128000 C:\Windows\System32\rasadhlp.dll
      0x72ac0000 - 0x72b06000 C:\WINDOWS\System32\fwpuclnt.dll
      0x61160000 - 0x612a6000 C:\Program Files (x86)\Java\jre1.8.0_25\bin\awt.dll
      0x74490000 - 0x744a9000 C:\WINDOWS\SYSTEM32\CRYPTSP.dll
      0x74460000 - 0x74490000 C:\WINDOWS\system32\rsaenh.dll
      0x74440000 - 0x7445e000 C:\WINDOWS\SYSTEM32\bcrypt.dll
      0x73700000 - 0x73713000 C:\WINDOWS\SYSTEM32\dhcpcsvc6.DLL
      0x736e0000 - 0x736f4000 C:\WINDOWS\SYSTEM32\dhcpcsvc.DLL
      0x73e40000 - 0x73e49000 C:\WINDOWS\SYSTEM32\kernel.appcore.dll
      0x664c0000 - 0x67231000 C:\WINDOWS\SYSTEM32\nvd3dum.dll
      0x17590000 - 0x176ca000 C:\WINDOWS\system32\nvspcap.dll
      0x73cb0000 - 0x73cf0000 C:\WINDOWS\system32\powrprof.dll
      0x6d480000 - 0x6d5ba000 C:\Program Files (x86)\NVIDIA Corporation\3D Vision\nvSCPAPI.dll
      0x76fc0000 - 0x77171000 C:\WINDOWS\SYSTEM32\SETUPAPI.dll
      0x69800000 - 0x69820000 C:\Program Files (x86)\Java\jre1.8.0_25\bin\sunec.dll
      0x72bd0000 - 0x72be1000 C:\WINDOWS\system32\napinsp.dll
      0x72bb0000 - 0x72bc6000 C:\WINDOWS\system32\pnrpnsp.dll
      0x72c60000 - 0x72c74000 C:\WINDOWS\system32\NLAapi.dll
      0x72b10000 - 0x72b1a000 C:\WINDOWS\System32\winrnr.dll
      0x72ab0000 - 0x72ac0000 C:\WINDOWS\system32\wshbth.dll
      0x697e0000 - 0x697f2000 C:\Program Files (x86)\Java\jre1.8.0_25\bin\unpack.dll
      0x697a0000 - 0x697d9000 C:\Program Files (x86)\Java\jre1.8.0_25\bin\fontmanager.dll
      0x69770000 - 0x697a0000 C:\Program Files (x86)\Java\jre1.8.0_25\bin\t2k.dll
      0x69620000 - 0x69645000 C:\Program Files (x86)\Java\jre1.8.0_25\bin\jpeg.dll
      0x6b880000 - 0x6b88a000 C:\Program Files (x86)\Java\jre1.8.0_25\bin\jsound.dll
      0x6b560000 - 0x6b569000 C:\Program Files (x86)\Java\jre1.8.0_25\bin\jsoundds.dll
      0x6ceb0000 - 0x6cf31000 C:\WINDOWS\SYSTEM32\DSOUND.dll
      0x6cf70000 - 0x6cfc3000 C:\WINDOWS\SYSTEM32\MMDevAPI.DLL
      0x70800000 - 0x70836000 C:\WINDOWS\SYSTEM32\wdmaud.drv
      0x6f930000 - 0x6f937000 C:\WINDOWS\SYSTEM32\ksuser.dll
      0x6f920000 - 0x6f92a000 C:\WINDOWS\SYSTEM32\AVRT.dll
      0x6cd80000 - 0x6cde0000 C:\WINDOWS\SYSTEM32\AUDIOSES.DLL
      0x71ff0000 - 0x71ff9000 C:\WINDOWS\SYSTEM32\msacm32.drv
      0x70f80000 - 0x70f88000 C:\WINDOWS\SYSTEM32\midimap.dll
      0x76e90000 - 0x76f1d000 C:\WINDOWS\SYSTEM32\clbcatq.dll
      0x68f20000 - 0x68f46000 C:\Users\Ned\jagexcache\runescape\LIVE\jaclib.dll
      0x6a300000 - 0x6a306000 C:\Program Files (x86)\Java\jre1.8.0_25\bin\jawt.dll
      0x72090000 - 0x7209d000 C:\WINDOWS\system32\wbem\wbemprox.dll
      0x720a0000 - 0x72106000 C:\WINDOWS\SYSTEM32\wbemcomn.dll
      0x71ad0000 - 0x71ae1000 C:\WINDOWS\system32\wbem\wbemsvc.dll
      0x71a00000 - 0x71ac4000 C:\WINDOWS\system32\wbem\fastprox.dll
      0x69760000 - 0x6976c000 C:\WINDOWS\system32\winbrand.dll
      0x77430000 - 0x7746d000 C:\WINDOWS\SYSTEM32\WINTRUST.dll
      0x77730000 - 0x778b8000 C:\WINDOWS\SYSTEM32\CRYPT32.dll
      0x75590000 - 0x7559e000 C:\WINDOWS\SYSTEM32\MSASN1.dll
      0x68f50000 - 0x69239000 C:\WINDOWS\system32\nvapi.dll
      0x69600000 - 0x6961a000 C:\Users\Ned\jagexcache\runescape\LIVE\jaggl.dll
      0x54a90000 - 0x56258000 C:\WINDOWS\SYSTEM32\nvoglv32.DLL
      0x73100000 - 0x7310f000 C:\WINDOWS\SYSTEM32\WTSAPI32.dll
      0x75370000 - 0x75398000 C:\WINDOWS\SYSTEM32\ntmarta.dll
      0x730b0000 - 0x730f5000 C:\WINDOWS\SYSTEM32\WINSTA.dll
      0x68eb0000 - 0x68eba000 C:\Program Files (x86)\Java\jre1.8.0_25\bin\management.dll
      0x664a0000 - 0x664b6000 C:\Users\Ned\jagexcache\runescape\LIVE\jagdx.dll
      0x701d0000 - 0x701e6000 C:\WINDOWS\SYSTEM32\usp10.dll
      0x6b730000 - 0x6b871000 C:\WINDOWS\SYSTEM32\dbghelp.dll

      VM Arguments:
      jvm_args: -Xbootclasspath/p:C:/Simba/Plugins//smart.jar
      java_command: smart.Main C:/Simba/Plugins//libsmartjni32.dll http://world9.runescape.com/ ,f7649838988217813349 800 600 C:/Simba/Plugins/ OpenGL32.dll,d3d9.dll
      java_class_path (initial): .;C:\Program Files (x86)\Java\jre1.8.0_31\lib\ext\QTJava.zip
      Launcher Type: SUN_STANDARD

      Environment Variables:
      CLASSPATH=.;C:\Program Files (x86)\Java\jre1.8.0_31\lib\ext\QTJava.zip
      PATH=C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\ProgramData\Oracle\Java\javapath;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Common Files\Avid;C:\Program Files\Common Files\Avid;C:\Program Files (x86)\QuickTime\QTSystem\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files (x86)\Skype\Phone\;C:\Program Files (x86)\Heroku\bin;C:\Program Files (x86)\git\cmd
      USERNAME=Ned
      OS=Windows_NT
      PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 58 Stepping 9, GenuineIntel



      ————— S Y S T E M —————

      OS: Windows 8.1 , 64 bit Build 9600

      CPU:total 8 (4 cores per cpu, 2 threads per core) family 6 model 58 stepping 9, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3, sse4.1, sse4.2, popcnt, avx, aes, clmul, erms, ht, tsc, tscinvbit, tscinv

      Memory: 4k page, physical 16681672k(13258348k free), swap 19172040k(14948508k free)

      vm_info: Java HotSpot(TM) Client VM (25.31-b07) for windows-x86 JRE (1.8.0_31-b13), built on Dec 17 2014 20:46:12 by "java_re" with MS VC++ 10.0 (VS2010)

      time: Sun May 24 00:24:54 2015
      elapsed time: 178 seconds (0d 0h 2m 58s)

      [/spoiler]

      Brandon

      2015-05-24 00:45:53

      From: Clarity
      Could this be the log you are looking for?

      [spoiler='Crash Log']
      #
      # A fatal error has been detected by the Java Runtime Environment:
      #
      # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x15ed6e22, pid=8100, tid=2496
      #
      # JRE version: Java(TM) SE Runtime Environment (8.0_31-b13) (build 1.8.0_31-b13)
      # Java VM: Java HotSpot(TM) Client VM (25.31-b07 mixed mode windows-x86 )
      # Problematic frame:
      # C [d3d9.dll+0x6e22]
      #
      # Failed to write core dump. Minidumps are not enabled by default on client versions of Windows
      #
      # If you would like to submit a bug report, please visit:
      # http://bugreport.java.com/bugreport/crash.jsp
      # The crash happened outside the Java Virtual Machine in native code.
      # See problematic frame for where to report the bug.
      #

      ————— T H R E A D —————

      Current thread (0x16580c00): JavaThread "Thread-4" daemon [_thread_in_native, id=2496, stack(0x1a4b0000,0x1a500000)]

      siginfo: ExceptionCode=0xc0000005, reading address 0x1fda8008

      Registers:
      EAX=0x0001366b, EBX=0x1fda8010, ECX=0x0145ee48, EDX=0x1a4ff14c
      ESP=0x1a4ff194, EBP=0x1a4ff1dc, ESI=0x1fcddbb0, EDI=0x1a324a20
      EIP=0x15ed6e22, EFLAGS=0x00210212

      Top of Stack: (sp=0x1a4ff194)
      0x1a4ff194: 1fda8000 00057000 ffff0000 15f90351
      0x1a4ff1a4: 0001366b 01179ff0 000014d5 16580c00
      0x1a4ff1b4: 1a4ff1dc 1fbb32a0 1fbb3178 1a27a2c8
      0x1a4ff1c4: 00000008 16580c00 1e14f928 1e14f928
      0x1a4ff1d4: 1e14f928 16580c00 1a4ff1e8 664a3413
      0x1a4ff1e4: 1a324a20 1a4ff220 02afbe43 16580d38
      0x1a4ff1f4: 1a4ff228 1e8825d0 00000000 1a4ff200
      0x1a4ff204: 1e14f928 1a4ff234 1e150138 00000000

      Instructions: (pc=0x15ed6e22)
      0x15ed6e02: 8b 45 e4 8b 4f 0c 83 c3 0c 8b 40 24 c7 44 24 0c
      0x15ed6e12: 51 03 f9 15 c7 44 24 08 00 00 ff ff 89 44 24 10
      0x15ed6e22: d9 43 f8 d9 5c 24 04 d9 43 f4 d9 1c 24 e8 bc ba
      0x15ed6e32: 01 00 83 ec 14 39 de 75 c7 8b 45 e4 8b 58 28 83


      Register to memory mapping:

      EAX=0x0001366b is an unknown value
      EBX=0x1fda8010 is an unknown value
      ECX=0x0145ee48 is an unknown value
      EDX=0x1a4ff14c is pointing into the stack for thread: 0x16580c00
      ESP=0x1a4ff194 is pointing into the stack for thread: 0x16580c00
      EBP=0x1a4ff1dc is pointing into the stack for thread: 0x16580c00
      ESI=0x1fcddbb0 is an unknown value
      EDI=0x1a324a20 is an unknown value


      Stack: [0x1a4b0000,0x1a500000], sp=0x1a4ff194, free space=316k
      Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
      C [d3d9.dll+0x6e22]
      C [jagdx.dll+0x3413]
      j jagdx.IDirect3DDevice.EndScene(J)I+0
      j ank.c(II)V+46
      J 1293 C1 db.d(B)V (31 bytes) @ 0x02f28004 [0x02f27fd0+0x34]
      J 640 C1 client.ap(I)V (1366 bytes) @ 0x02cc8e6c [0x02cc7e30+0x103c]
      J 639 C1 rk.w(I)V (293 bytes) @ 0x02cc6708 [0x02cc6460+0x2a8]
      J 663% C1 rk.z(B)V (431 bytes) @ 0x02cdbea8 [0x02cdb9a0+0x508]
      j rk.run()V+3
      j java.lang.Thread.run()V+11
      v ~StubRoutines::call_stub
      V [jvm.dll+0x1473e5]
      V [jvm.dll+0x20d57e]
      V [jvm.dll+0x14747e]
      V [jvm.dll+0x147606]
      V [jvm.dll+0x147677]
      V [jvm.dll+0xf09df]
      V [jvm.dll+0x169acc]
      V [jvm.dll+0x16a35a]
      V [jvm.dll+0x1af0a6]
      C [msvcr100.dll+0x5c556]
      C [msvcr100.dll+0x5c600]
      C [KERNEL32.DLL+0x17c04]
      C [ntdll.dll+0x5ad1f]
      C [ntdll.dll+0x5acea]
      C 0x00000000

      Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
      j jagdx.IDirect3DDevice.EndScene(J)I+0
      j ank.c(II)V+46
      J 1293 C1 db.d(B)V (31 bytes) @ 0x02f28004 [0x02f27fd0+0x34]
      J 640 C1 client.ap(I)V (1366 bytes) @ 0x02cc8e6c [0x02cc7e30+0x103c]
      J 639 C1 rk.w(I)V (293 bytes) @ 0x02cc6708 [0x02cc6460+0x2a8]
      J 663% C1 rk.z(B)V (431 bytes) @ 0x02cdbea8 [0x02cdb9a0+0x508]
      j rk.run()V+3
      j java.lang.Thread.run()V+11
      v ~StubRoutines::call_stub

      ————— P R O C E S S —————

      Java Threads: ( => current thread )
      0x16871c00 JavaThread "Smart_Image_Transfer" daemon [_thread_blocked, id=6396, stack(0x19dc0000,0x19e10000)]
      0x16872800 JavaThread "pool-1-thread-2" [_thread_blocked, id=7296, stack(0x19480000,0x194d0000)]
      0x16876000 JavaThread "Thread-43" daemon [_thread_blocked, id=5432, stack(0x1be00000,0x1be50000)]
      0x16872000 JavaThread "Thread-42" daemon [_thread_in_native, id=7148, stack(0x1bd70000,0x1bdc0000)]
      0x16870800 JavaThread "Thread-14" daemon [_thread_in_native, id=1448, stack(0x192a0000,0x192f0000)]
      0x16873000 JavaThread "Thread-13" daemon [_thread_blocked, id=308, stack(0x19170000,0x191c0000)]
      0x16870400 JavaThread "Thread-12" daemon [_thread_blocked, id=3640, stack(0x190e0000,0x19130000)]
      0x16873c00 JavaThread "Java Sound Event Dispatcher" daemon [_thread_blocked, id=5296, stack(0x18d80000,0x18dd0000)]
      0x167dfc00 JavaThread "pool-1-thread-1" [_thread_blocked, id=1740, stack(0x1b750000,0x1b7a0000)]
      0x167df400 JavaThread "Thread-8" daemon [_thread_blocked, id=6356, stack(0x1b630000,0x1b680000)]
      0x167e1400 JavaThread "Thread-7" daemon [_thread_blocked, id=2948, stack(0x1b5a0000,0x1b5f0000)]
      0x168dd800 JavaThread "Thread-6" daemon [_thread_blocked, id=5568, stack(0x1b410000,0x1b460000)]
      0x16724c00 JavaThread "D3D Screen Updater" daemon [_thread_blocked, id=7968, stack(0x1b000000,0x1b050000)]
      0x16666000 JavaThread "AWT-EventQueue-0" [_thread_blocked, id=3012, stack(0x1a5d0000,0x1a620000)]
      0x1a7ff400 JavaThread "AWT-Shutdown" [_thread_blocked, id=5720, stack(0x1a540000,0x1a590000)]
      =>0x16580c00 JavaThread "Thread-4" daemon [_thread_in_native, id=2496, stack(0x1a4b0000,0x1a500000)]
      0x1a9f0c00 JavaThread "Thread-3" daemon [_thread_blocked, id=7772, stack(0x1a220000,0x1a270000)]
      0x1a9d0400 JavaThread "Thread-2" daemon [_thread_blocked, id=880, stack(0x1a190000,0x1a1e0000)]
      0x1687c400 JavaThread "Thread-1" daemon [_thread_blocked, id=3700, stack(0x174b0000,0x17500000)]
      0x1524f400 JavaThread "AWT-Windows" daemon [_thread_in_native, id=5924, stack(0x17540000,0x17590000)]
      0x1524d800 JavaThread "Java2D Disposer" daemon [_thread_blocked, id=6568, stack(0x17420000,0x17470000)]
      0x150ad400 JavaThread "Service Thread" daemon [_thread_blocked, id=6708, stack(0x15530000,0x15580000)]
      0x15085c00 JavaThread "C1 CompilerThread0" daemon [_thread_blocked, id=6952, stack(0x154a0000,0x154f0000)]
      0x15084c00 JavaThread "Attach Listener" daemon [_thread_blocked, id=5104, stack(0x15410000,0x15460000)]
      0x15082c00 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=5896, stack(0x15380000,0x153d0000)]
      0x15064800 JavaThread "Finalizer" daemon [_thread_blocked, id=5112, stack(0x152f0000,0x15340000)]
      0x02aee800 JavaThread "Reference Handler" daemon [_thread_blocked, id=2532, stack(0x15260000,0x152b0000)]
      0x0117c000 JavaThread "main" [_thread_in_native, id=2616, stack(0x00fa0000,0x00ff0000)]

      Other Threads:
      0x02aea400 VMThread [stack: 0x04b80000,0x04bd0000] [id=2600]
      0x150b1000 WatcherThread [stack: 0x155c0000,0x15610000] [id=5224]

      VM state:not at safepoint (normal execution)

      VM Mutex/Monitor currently owned by a thread: None

      Heap:
      def new generation total 78656K, used 27986K [0x04c00000, 0x0a150000, 0x0a150000)
      eden space 69952K, 40% used [0x04c00000, 0x06754b90, 0x09050000)
      from space 8704K, 0% used [0x09050000, 0x09050000, 0x098d0000)
      to space 8704K, 0% used [0x098d0000, 0x098d0000, 0x0a150000)
      tenured generation total 174784K, used 168162K [0x0a150000, 0x14c00000, 0x14c00000)
      the space 174784K, 96% used [0x0a150000, 0x145888c0, 0x14588a00, 0x14c00000)
      Metaspace used 19163K, capacity 19309K, committed 19456K, reserved 19840K

      Card table byte_map: [0x04af0000,0x04b80000] byte_map_base: 0x04aca000

      Polling page: 0x00ee0000

      CodeCache: size=32768Kb used=11097Kb max_used=11184Kb free=21670Kb
      bounds [0x02af0000, 0x035e0000, 0x04af0000]
      total_blobs=2752 nmethods=2386 adapters=296
      compilation: enabled

      Compilation events (10 events):
      Event: 174.514 Thread 0x15085c00 2734 ade::be (169 bytes)
      Event: 174.515 Thread 0x15085c00 nmethod 2734 0x035dd908 code [0x035dda40, 0x035ddc8c]
      Event: 174.540 Thread 0x15085c00 2735 java.util.Arrays::binarySearch0 (95 bytes)
      Event: 174.540 Thread 0x15085c00 nmethod 2735 0x02c0e148 code [0x02c0e260, 0x02c0e3c8]
      Event: 174.542 Thread 0x15085c00 2736 sun.java2d.loops.GraphicsPrimitive::getUniqueID (5 bytes)
      Event: 174.542 Thread 0x15085c00 nmethod 2736 0x02c0df88 code [0x02c0e080, 0x02c0e100]
      Event: 174.545 Thread 0x15085c00 2737 s sun.java2d.loops.GraphicsPrimitiveMgr::locatePrim (96 bytes)
      Event: 174.546 Thread 0x15085c00 nmethod 2737 0x02bdd588 code [0x02bdd6c0, 0x02bddb6c]
      Event: 174.546 Thread 0x15085c00 2738 sun.java2d.loops.GraphicsPrimitiveMgr$2::compare (39 bytes)
      Event: 174.546 Thread 0x15085c00 nmethod 2738 0x02bdca48 code [0x02bdcb50, 0x02bdcc50]

      GC Heap History (10 events):
      Event: 173.173 GC heap before
      {Heap before GC invocations=52 (full 16):
      def new generation total 78656K, used 69952K [0x04c00000, 0x0a150000, 0x0a150000)
      eden space 69952K, 100% used [0x04c00000, 0x09050000, 0x09050000)
      from space 8704K, 0% used [0x098d0000, 0x098d0000, 0x0a150000)
      to space 8704K, 0% used [0x09050000, 0x09050000, 0x098d0000)
      tenured generation total 174784K, used 146089K [0x0a150000, 0x14c00000, 0x14c00000)
      the space 174784K, 83% used [0x0a150000, 0x12ffa598, 0x12ffa600, 0x14c00000)
      Metaspace used 19069K, capacity 19213K, committed 19328K, reserved 19840K
      Event: 173.263 GC heap after
      Heap after GC invocations=53 (full 17):
      def new generation total 78656K, used 0K [0x04c00000, 0x0a150000, 0x0a150000)
      eden space 69952K, 0% used [0x04c00000, 0x04c00000, 0x09050000)
      from space 8704K, 0% used [0x098d0000, 0x098d0000, 0x0a150000)
      to space 8704K, 0% used [0x09050000, 0x09050000, 0x098d0000)
      tenured generation total 174784K, used 124578K [0x0a150000, 0x14c00000, 0x14c00000)
      the space 174784K, 71% used [0x0a150000, 0x11af8980, 0x11af8a00, 0x14c00000)
      Metaspace used 19069K, capacity 19213K, committed 19328K, reserved 19840K
      }
      Event: 173.477 GC heap before
      {Heap before GC invocations=53 (full 17):
      def new generation total 78656K, used 69952K [0x04c00000, 0x0a150000, 0x0a150000)
      eden space 69952K, 100% used [0x04c00000, 0x09050000, 0x09050000)
      from space 8704K, 0% used [0x098d0000, 0x098d0000, 0x0a150000)
      to space 8704K, 0% used [0x09050000, 0x09050000, 0x098d0000)
      tenured generation total 174784K, used 124578K [0x0a150000, 0x14c00000, 0x14c00000)
      the space 174784K, 71% used [0x0a150000, 0x11af8980, 0x11af8a00, 0x14c00000)
      Metaspace used 19069K, capacity 19213K, committed 19328K, reserved 19840K
      Event: 173.492 GC heap after
      Heap after GC invocations=54 (full 17):
      def new generation total 78656K, used 8703K [0x04c00000, 0x0a150000, 0x0a150000)
      eden space 69952K, 0% used [0x04c00000, 0x04c00000, 0x09050000)
      from space 8704K, 99% used [0x09050000, 0x098cfff8, 0x098d0000)
      to space 8704K, 0% used [0x098d0000, 0x098d0000, 0x0a150000)
      tenured generation total 174784K, used 140524K [0x0a150000, 0x14c00000, 0x14c00000)
      the space 174784K, 80% used [0x0a150000, 0x12a8b058, 0x12a8b200, 0x14c00000)
      Metaspace used 19069K, capacity 19213K, committed 19328K, reserved 19840K
      }
      Event: 173.877 GC heap before
      {Heap before GC invocations=54 (full 17):
      def new generation total 78656K, used 78655K [0x04c00000, 0x0a150000, 0x0a150000)
      eden space 69952K, 100% used [0x04c00000, 0x09050000, 0x09050000)
      from space 8704K, 99% used [0x09050000, 0x098cfff8, 0x098d0000)
      to space 8704K, 0% used [0x098d0000, 0x098d0000, 0x0a150000)
      tenured generation total 174784K, used 140524K [0x0a150000, 0x14c00000, 0x14c00000)
      the space 174784K, 80% used [0x0a150000, 0x12a8b070, 0x12a8b200, 0x14c00000)
      Metaspace used 19086K, capacity 19245K, committed 19328K, reserved 19840K
      Event: 173.896 GC heap after
      Heap after GC invocations=55 (full 17):
      def new generation total 78656K, used 8703K [0x04c00000, 0x0a150000, 0x0a150000)
      eden space 69952K, 0% used [0x04c00000, 0x04c00000, 0x09050000)
      from space 8704K, 99% used [0x098d0000, 0x0a14fff8, 0x0a150000)
      to space 8704K, 0% used [0x09050000, 0x09050000, 0x098d0000)
      tenured generation total 174784K, used 158619K [0x0a150000, 0x14c00000, 0x14c00000)
      the space 174784K, 90% used [0x0a150000, 0x13c36e48, 0x13c37000, 0x14c00000)
      Metaspace used 19086K, capacity 19245K, committed 19328K, reserved 19840K
      }
      Event: 173.897 GC heap before
      {Heap before GC invocations=55 (full 17):
      def new generation total 78656K, used 8706K [0x04c00000, 0x0a150000, 0x0a150000)
      eden space 69952K, 0% used [0x04c00000, 0x04c00830, 0x09050000)
      from space 8704K, 99% used [0x098d0000, 0x0a14fff8, 0x0a150000)
      to space 8704K, 0% used [0x09050000, 0x09050000, 0x098d0000)
      tenured generation total 174784K, used 158619K [0x0a150000, 0x14c00000, 0x14c00000)
      the space 174784K, 90% used [0x0a150000, 0x13c36e48, 0x13c37000, 0x14c00000)
      Metaspace used 19086K, capacity 19245K, committed 19328K, reserved 19840K
      Event: 173.905 GC heap after
      Heap after GC invocations=56 (full 17):
      def new generation total 78656K, used 0K [0x04c00000, 0x0a150000, 0x0a150000)
      eden space 69952K, 0% used [0x04c00000, 0x04c00000, 0x09050000)
      from space 8704K, 0% used [0x09050000, 0x09050000, 0x098d0000)
      to space 8704K, 0% used [0x098d0000, 0x098d0000, 0x0a150000)
      tenured generation total 174784K, used 167323K [0x0a150000, 0x14c00000, 0x14c00000)
      the space 174784K, 95% used [0x0a150000, 0x144b6e40, 0x144b7000, 0x14c00000)
      Metaspace used 19086K, capacity 19245K, committed 19328K, reserved 19840K
      }
      Event: 174.395 GC heap before
      {Heap before GC invocations=56 (full 17):
      def new generation total 78656K, used 69755K [0x04c00000, 0x0a150000, 0x0a150000)
      eden space 69952K, 99% used [0x04c00000, 0x0901ed58, 0x09050000)
      from space 8704K, 0% used [0x09050000, 0x09050000, 0x098d0000)
      to space 8704K, 0% used [0x098d0000, 0x098d0000, 0x0a150000)
      tenured generation total 174784K, used 167323K [0x0a150000, 0x14c00000, 0x14c00000)
      the space 174784K, 95% used [0x0a150000, 0x144b6e40, 0x144b7000, 0x14c00000)
      Metaspace used 19163K, capacity 19309K, committed 19456K, reserved 19840K
      Event: 174.507 GC heap after
      Heap after GC invocations=57 (full 18):
      def new generation total 78656K, used 23281K [0x04c00000, 0x0a150000, 0x0a150000)
      eden space 69952K, 33% used [0x04c00000, 0x062bc580, 0x09050000)
      from space 8704K, 0% used [0x09050000, 0x09050000, 0x098d0000)
      to space 8704K, 0% used [0x098d0000, 0x098d0000, 0x0a150000)
      tenured generation total 174784K, used 168162K [0x0a150000, 0x14c00000, 0x14c00000)
      the space 174784K, 96% used [0x0a150000, 0x145888c0, 0x14588a00, 0x14c00000)
      Metaspace used 19163K, capacity 19309K, committed 19456K, reserved 19840K
      }

      Deoptimization events (0 events):
      No events

      Internal exceptions (10 events):
      Event: 173.114 Thread 0x16580c00 Exception <a 'java/security/PrivilegedActionException'> (0x071061a0) thrown at [C:\re\workspace\8-2-build-windows-i586-cygwin\jdk8u31\2394\hotspot\src\share\vm\prims\jvm.cpp, line 1312]
      Event: 173.114 Thread 0x16580c00 Exception <a 'java/security/PrivilegedActionException'> (0x07106850) thrown at [C:\re\workspace\8-2-build-windows-i586-cygwin\jdk8u31\2394\hotspot\src\share\vm\prims\jvm.cpp, line 1312]
      Event: 173.558 Thread 0x16580c00 Implicit null exception at 0x02c00bd6 to 0x02c0125b
      Event: 173.579 Thread 0x16580c00 Implicit null exception at 0x0353f04b to 0x0354032c
      Event: 173.644 Thread 0x16580c00 Exception <a 'java/security/PrivilegedActionException'> (0x07378810) thrown at [C:\re\workspace\8-2-build-windows-i586-cygwin\jdk8u31\2394\hotspot\src\share\vm\prims\jvm.cpp, line 1312]
      Event: 173.645 Thread 0x16580c00 Exception <a 'java/security/PrivilegedActionException'> (0x07378ec0) thrown at [C:\re\workspace\8-2-build-windows-i586-cygwin\jdk8u31\2394\hotspot\src\share\vm\prims\jvm.cpp, line 1312]
      Event: 173.726 Thread 0x16580c00 Exception <a 'java/security/PrivilegedActionException'> (0x07b84588) thrown at [C:\re\workspace\8-2-build-windows-i586-cygwin\jdk8u31\2394\hotspot\src\share\vm\prims\jvm.cpp, line 1312]
      Event: 173.727 Thread 0x16580c00 Exception <a 'java/security/PrivilegedActionException'> (0x07b84e20) thrown at [C:\re\workspace\8-2-build-windows-i586-cygwin\jdk8u31\2394\hotspot\src\share\vm\prims\jvm.cpp, line 1312]
      Event: 174.326 Thread 0x16580c00 Exception <a 'java/security/PrivilegedActionException'> (0x08672c58) thrown at [C:\re\workspace\8-2-build-windows-i586-cygwin\jdk8u31\2394\hotspot\src\share\vm\prims\jvm.cpp, line 1312]
      Event: 174.326 Thread 0x16580c00 Exception <a 'java/security/PrivilegedActionException'> (0x08673310) thrown at [C:\re\workspace\8-2-build-windows-i586-cygwin\jdk8u31\2394\hotspot\src\share\vm\prims\jvm.cpp, line 1312]

      Events (10 events):
      Event: 174.515 Thread 0x15085c00 flushing nmethod 0x02c1ee08
      Event: 174.515 Thread 0x15085c00 flushing nmethod 0x02c1f148
      Event: 174.515 Thread 0x15085c00 flushing nmethod 0x02c1f448
      Event: 174.515 Thread 0x15085c00 flushing nmethod 0x02c1f888
      Event: 174.515 Thread 0x15085c00 flushing nmethod 0x02c1fc88
      Event: 174.515 Thread 0x15085c00 flushing nmethod 0x02c20088
      Event: 174.539 Executing VM operation: BulkRevokeBias
      Event: 174.539 Executing VM operation: BulkRevokeBias done
      Event: 174.539 Executing VM operation: BulkRevokeBias
      Event: 174.539 Executing VM operation: BulkRevokeBias done


      Dynamic libraries:
      0x01060000 - 0x01090000 C:\Program Files (x86)\Java\jre1.8.0_25\bin\java.exe
      0x77cc0000 - 0x77e2e000 C:\WINDOWS\SYSTEM32\ntdll.dll
      0x772e0000 - 0x77420000 C:\WINDOWS\SYSTEM32\KERNEL32.DLL
      0x77aa0000 - 0x77b77000 C:\WINDOWS\SYSTEM32\KERNELBASE.dll
      0x74770000 - 0x74810000 C:\WINDOWS\system32\apphelp.dll
      0x601d0000 - 0x60436000 C:\WINDOWS\AppPatch\AcGenral.DLL
      0x76c10000 - 0x76cd3000 C:\WINDOWS\SYSTEM32\msvcrt.dll
      0x77b80000 - 0x77bc1000 C:\WINDOWS\SYSTEM32\sechost.dll
      0x754c0000 - 0x754de000 C:\WINDOWS\SYSTEM32\SspiCli.dll
      0x76f70000 - 0x76fb5000 C:\WINDOWS\SYSTEM32\SHLWAPI.dll
      0x72140000 - 0x7222d000 C:\WINDOWS\SYSTEM32\UxTheme.dll
      0x77940000 - 0x77a93000 C:\WINDOWS\SYSTEM32\USER32.dll
      0x76d80000 - 0x76e8e000 C:\WINDOWS\SYSTEM32\GDI32.dll
      0x71ce0000 - 0x71d03000 C:\WINDOWS\SYSTEM32\WINMM.dll
      0x72280000 - 0x72293000 C:\WINDOWS\SYSTEM32\samcli.dll
      0x771b0000 - 0x772d8000 C:\WINDOWS\SYSTEM32\ole32.dll
      0x76ce0000 - 0x76d75000 C:\WINDOWS\SYSTEM32\OLEAUT32.dll
      0x6cd50000 - 0x6cd67000 C:\WINDOWS\SYSTEM32\MSACM32.dll
      0x75440000 - 0x75448000 C:\WINDOWS\SYSTEM32\VERSION.dll
      0x757e0000 - 0x76a8c000 C:\WINDOWS\SYSTEM32\SHELL32.dll
      0x74860000 - 0x7487b000 C:\WINDOWS\SYSTEM32\USERENV.dll
      0x72120000 - 0x7213a000 C:\WINDOWS\SYSTEM32\dwmapi.dll
      0x6f500000 - 0x6f64a000 C:\WINDOWS\SYSTEM32\urlmon.dll
      0x778c0000 - 0x7793c000 C:\WINDOWS\SYSTEM32\ADVAPI32.dll
      0x753d0000 - 0x75435000 C:\WINDOWS\SYSTEM32\WINSPOOL.DRV
      0x71440000 - 0x71456000 C:\WINDOWS\SYSTEM32\MPR.dll
      0x775e0000 - 0x7769a000 C:\WINDOWS\SYSTEM32\RPCRT4.dll
      0x754b0000 - 0x754ba000 C:\WINDOWS\SYSTEM32\CRYPTBASE.dll
      0x76a90000 - 0x76c0d000 C:\WINDOWS\SYSTEM32\combase.dll
      0x71cb0000 - 0x71cd3000 C:\WINDOWS\SYSTEM32\WINMMBASE.dll
      0x74810000 - 0x7481f000 C:\WINDOWS\SYSTEM32\profapi.dll
      0x74880000 - 0x74ab2000 C:\WINDOWS\SYSTEM32\iertutil.dll
      0x74ca0000 - 0x74e73000 C:\WINDOWS\SYSTEM32\WININET.dll
      0x75450000 - 0x754a4000 C:\WINDOWS\SYSTEM32\bcryptPrimitives.dll
      0x76f20000 - 0x76f5c000 C:\WINDOWS\SYSTEM32\cfgmgr32.dll
      0x753a0000 - 0x753c1000 C:\WINDOWS\SYSTEM32\DEVOBJ.dll
      0x735a0000 - 0x7362b000 C:\WINDOWS\SYSTEM32\SHCORE.DLL
      0x77180000 - 0x771a7000 C:\WINDOWS\system32\IMM32.DLL
      0x75600000 - 0x75712000 C:\WINDOWS\SYSTEM32\MSCTF.dll
      0x70940000 - 0x70b46000 C:\WINDOWS\WinSxS\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.9600.17784_none_a9f497a901334c74\COMCTL32.dll
      0x6a310000 - 0x6a3cf000 C:\Program Files (x86)\Java\jre1.8.0_25\bin\msvcr100.dll
      0x5dd90000 - 0x5e134000 C:\Program Files (x86)\Java\jre1.8.0_25\bin\client\jvm.dll
      0x74f30000 - 0x74f38000 C:\WINDOWS\SYSTEM32\WSOCK32.dll
      0x75720000 - 0x75726000 C:\WINDOWS\SYSTEM32\PSAPI.DLL
      0x75540000 - 0x75590000 C:\WINDOWS\SYSTEM32\WS2_32.dll
      0x77420000 - 0x77427000 C:\WINDOWS\SYSTEM32\NSI.dll
      0x6cd70000 - 0x6cd7c000 C:\Program Files (x86)\Java\jre1.8.0_25\bin\verify.dll
      0x69840000 - 0x69861000 C:\Program Files (x86)\Java\jre1.8.0_25\bin\java.dll
      0x69e50000 - 0x69e63000 C:\Program Files (x86)\Java\jre1.8.0_25\bin\zip.dll
      0x6e600000 - 0x6e691000 C:\Simba\Plugins\libsmartjni32.dll
      0x69820000 - 0x69835000 C:\Program Files (x86)\Java\jre1.8.0_25\bin\net.dll
      0x73160000 - 0x731ab000 C:\WINDOWS\system32\mswsock.dll
      0x6c550000 - 0x6c55f000 C:\Program Files (x86)\Java\jre1.8.0_25\bin\nio.dll
      0x68540000 - 0x6861d000 C:\Simba\Plugins\OpenGL32.dll
      0x70b70000 - 0x70b95000 C:\WINDOWS\SYSTEM32\GLU32.DLL
      0x70260000 - 0x7033e000 C:\WINDOWS\system32\opengl32.dll
      0x6c200000 - 0x6c2ec000 C:\WINDOWS\SYSTEM32\DDRAW.dll
      0x72110000 - 0x72117000 C:\WINDOWS\SYSTEM32\DCIMAN32.dll
      0x15ed0000 - 0x15fa8000 C:\Simba\Plugins\d3d9.dll
      0x5ff30000 - 0x6012f000 C:\WINDOWS\SYSTEM32\d3dx9_43.dll
      0x6d9b0000 - 0x6db83000 C:\WINDOWS\system32\d3d9.dll
      0x74ac0000 - 0x74b3e000 C:\WINDOWS\SYSTEM32\DNSAPI.dll
      0x73130000 - 0x73151000 C:\Program Files (x86)\Bonjour\mdnsNSP.dll
      0x74c80000 - 0x74ca0000 C:\WINDOWS\SYSTEM32\Iphlpapi.DLL
      0x74850000 - 0x74858000 C:\WINDOWS\SYSTEM32\WINNSI.DLL
      0x73120000 - 0x73128000 C:\Windows\System32\rasadhlp.dll
      0x72ac0000 - 0x72b06000 C:\WINDOWS\System32\fwpuclnt.dll
      0x61160000 - 0x612a6000 C:\Program Files (x86)\Java\jre1.8.0_25\bin\awt.dll
      0x74490000 - 0x744a9000 C:\WINDOWS\SYSTEM32\CRYPTSP.dll
      0x74460000 - 0x74490000 C:\WINDOWS\system32\rsaenh.dll
      0x74440000 - 0x7445e000 C:\WINDOWS\SYSTEM32\bcrypt.dll
      0x73700000 - 0x73713000 C:\WINDOWS\SYSTEM32\dhcpcsvc6.DLL
      0x736e0000 - 0x736f4000 C:\WINDOWS\SYSTEM32\dhcpcsvc.DLL
      0x73e40000 - 0x73e49000 C:\WINDOWS\SYSTEM32\kernel.appcore.dll
      0x664c0000 - 0x67231000 C:\WINDOWS\SYSTEM32\nvd3dum.dll
      0x17590000 - 0x176ca000 C:\WINDOWS\system32\nvspcap.dll
      0x73cb0000 - 0x73cf0000 C:\WINDOWS\system32\powrprof.dll
      0x6d480000 - 0x6d5ba000 C:\Program Files (x86)\NVIDIA Corporation\3D Vision\nvSCPAPI.dll
      0x76fc0000 - 0x77171000 C:\WINDOWS\SYSTEM32\SETUPAPI.dll
      0x69800000 - 0x69820000 C:\Program Files (x86)\Java\jre1.8.0_25\bin\sunec.dll
      0x72bd0000 - 0x72be1000 C:\WINDOWS\system32\napinsp.dll
      0x72bb0000 - 0x72bc6000 C:\WINDOWS\system32\pnrpnsp.dll
      0x72c60000 - 0x72c74000 C:\WINDOWS\system32\NLAapi.dll
      0x72b10000 - 0x72b1a000 C:\WINDOWS\System32\winrnr.dll
      0x72ab0000 - 0x72ac0000 C:\WINDOWS\system32\wshbth.dll
      0x697e0000 - 0x697f2000 C:\Program Files (x86)\Java\jre1.8.0_25\bin\unpack.dll
      0x697a0000 - 0x697d9000 C:\Program Files (x86)\Java\jre1.8.0_25\bin\fontmanager.dll
      0x69770000 - 0x697a0000 C:\Program Files (x86)\Java\jre1.8.0_25\bin\t2k.dll
      0x69620000 - 0x69645000 C:\Program Files (x86)\Java\jre1.8.0_25\bin\jpeg.dll
      0x6b880000 - 0x6b88a000 C:\Program Files (x86)\Java\jre1.8.0_25\bin\jsound.dll
      0x6b560000 - 0x6b569000 C:\Program Files (x86)\Java\jre1.8.0_25\bin\jsoundds.dll
      0x6ceb0000 - 0x6cf31000 C:\WINDOWS\SYSTEM32\DSOUND.dll
      0x6cf70000 - 0x6cfc3000 C:\WINDOWS\SYSTEM32\MMDevAPI.DLL
      0x70800000 - 0x70836000 C:\WINDOWS\SYSTEM32\wdmaud.drv
      0x6f930000 - 0x6f937000 C:\WINDOWS\SYSTEM32\ksuser.dll
      0x6f920000 - 0x6f92a000 C:\WINDOWS\SYSTEM32\AVRT.dll
      0x6cd80000 - 0x6cde0000 C:\WINDOWS\SYSTEM32\AUDIOSES.DLL
      0x71ff0000 - 0x71ff9000 C:\WINDOWS\SYSTEM32\msacm32.drv
      0x70f80000 - 0x70f88000 C:\WINDOWS\SYSTEM32\midimap.dll
      0x76e90000 - 0x76f1d000 C:\WINDOWS\SYSTEM32\clbcatq.dll
      0x68f20000 - 0x68f46000 C:\Users\Ned\jagexcache\runescape\LIVE\jaclib.dll
      0x6a300000 - 0x6a306000 C:\Program Files (x86)\Java\jre1.8.0_25\bin\jawt.dll
      0x72090000 - 0x7209d000 C:\WINDOWS\system32\wbem\wbemprox.dll
      0x720a0000 - 0x72106000 C:\WINDOWS\SYSTEM32\wbemcomn.dll
      0x71ad0000 - 0x71ae1000 C:\WINDOWS\system32\wbem\wbemsvc.dll
      0x71a00000 - 0x71ac4000 C:\WINDOWS\system32\wbem\fastprox.dll
      0x69760000 - 0x6976c000 C:\WINDOWS\system32\winbrand.dll
      0x77430000 - 0x7746d000 C:\WINDOWS\SYSTEM32\WINTRUST.dll
      0x77730000 - 0x778b8000 C:\WINDOWS\SYSTEM32\CRYPT32.dll
      0x75590000 - 0x7559e000 C:\WINDOWS\SYSTEM32\MSASN1.dll
      0x68f50000 - 0x69239000 C:\WINDOWS\system32\nvapi.dll
      0x69600000 - 0x6961a000 C:\Users\Ned\jagexcache\runescape\LIVE\jaggl.dll
      0x54a90000 - 0x56258000 C:\WINDOWS\SYSTEM32\nvoglv32.DLL
      0x73100000 - 0x7310f000 C:\WINDOWS\SYSTEM32\WTSAPI32.dll
      0x75370000 - 0x75398000 C:\WINDOWS\SYSTEM32\ntmarta.dll
      0x730b0000 - 0x730f5000 C:\WINDOWS\SYSTEM32\WINSTA.dll
      0x68eb0000 - 0x68eba000 C:\Program Files (x86)\Java\jre1.8.0_25\bin\management.dll
      0x664a0000 - 0x664b6000 C:\Users\Ned\jagexcache\runescape\LIVE\jagdx.dll
      0x701d0000 - 0x701e6000 C:\WINDOWS\SYSTEM32\usp10.dll
      0x6b730000 - 0x6b871000 C:\WINDOWS\SYSTEM32\dbghelp.dll

      VM Arguments:
      jvm_args: -Xbootclasspath/p:C:/Simba/Plugins//smart.jar
      java_command: smart.Main C:/Simba/Plugins//libsmartjni32.dll http://world9.runescape.com/ ,f7649838988217813349 800 600 C:/Simba/Plugins/ OpenGL32.dll,d3d9.dll
      java_class_path (initial): .;C:\Program Files (x86)\Java\jre1.8.0_31\lib\ext\QTJava.zip
      Launcher Type: SUN_STANDARD

      Environment Variables:
      CLASSPATH=.;C:\Program Files (x86)\Java\jre1.8.0_31\lib\ext\QTJava.zip
      PATH=C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\ProgramData\Oracle\Java\javapath;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Common Files\Avid;C:\Program Files\Common Files\Avid;C:\Program Files (x86)\QuickTime\QTSystem\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files (x86)\Skype\Phone\;C:\Program Files (x86)\Heroku\bin;C:\Program Files (x86)\git\cmd
      USERNAME=Ned
      OS=Windows_NT
      PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 58 Stepping 9, GenuineIntel



      ————— S Y S T E M —————

      OS: Windows 8.1 , 64 bit Build 9600

      CPU:total 8 (4 cores per cpu, 2 threads per core) family 6 model 58 stepping 9, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3, sse4.1, sse4.2, popcnt, avx, aes, clmul, erms, ht, tsc, tscinvbit, tscinv

      Memory: 4k page, physical 16681672k(13258348k free), swap 19172040k(14948508k free)

      vm_info: Java HotSpot(TM) Client VM (25.31-b07) for windows-x86 JRE (1.8.0_31-b13), built on Dec 17 2014 20:46:12 by "java_re" with MS VC++ 10.0 (VS2010)

      time: Sun May 24 00:24:54 2015
      elapsed time: 178 seconds (0d 0h 2m 58s)

      [/spoiler]



      Yup. That's perfect. It's an Endscene crash:

      [Spoiler=EndScene-Code]

      HRESULT IDirect3DDevice9ProxyHook::EndScene()
      {
      if (font)
      {
      for (IDirect3DTexture9Proxy *tex : textures)
      {
      for (D3DXVECTOR3 &pt : tex->points)
      {
      font->Draw(pt.x, pt.y, D3DCOLOR_XRGB(0, 0xFF, 0), "%", tex->ID);
      }

      tex->points.clear(); //crash here.. tex may be NULL.
      }

      for (IDirect3DVertexBuffer9Proxy *mod : models)
      {
      for (D3DXVECTOR3 &pt : mod->points)
      {
      font->Draw(pt.x, pt.y, D3DCOLOR_XRGB(0xFF, 0, 0), "%", mod->ID);
      }

      mod->points.clear(); //crash here.. mod may be NULL.
      }
      }

      textures.clear();
      models.clear();
      return IDirect3DDevice9Proxy::EndScene();
      }
      [/Spoiler]

      Most likely it's my for-loops lol. I didn't check for NULL before calling "clear" (such a noob mistake :(). I might even be able to speed it up more now that I know some textures are removed from the list (less to process) and do better rendering for larger screens (I'll try to turn that 40 into a 50 on larger resolutions). For now, I have a couple other things I want to complete as well.

      Ross

      2015-05-24 00:49:14

      Looks awesome Brandon. One thing that bothered me about OGL was that the repetitive (and seemingly useless) IDs such as 65539 in your test images clutter the screen. Can you add support for filtering them?

      Brandon

      2015-05-24 00:54:30

      From: Ross
      Looks awesome Brandon. One thing that bothered me about OGL was that the repetitive (and seemingly useless) IDs such as 65539 in your test images clutter the screen. Can you add support for filtering them?



      Yeah you will be able to filter and/or remove them if you wish. You can also turn off rendering of certain models so those models aren't drawn on screen. Ex: Making a rock or character invisible but still being able to interact with it ;] but this functionality was just me playing around with things. I can guarantee the filtering of ID's but I may not allow you to remove models.

      But again, I want to focus on speed first as this is a speed beta test and rendering test. Once I know all is good for the majority of testers, I will move onto ID's and such.

      For now, I need ALL ID's to be on screen so we can know the limits of the plugin under stress that the current OpenGL one could not handle.

      The Mayor

      2015-05-24 01:02:08

      Are we downloading the d3d9.dll from the OP? I get this when trying to spawn smart:


      Brandon

      2015-05-24 01:03:31

      From: The Mayor
      Are we downloading the d3d9.dll from the OP? I get this when trying to spawn smart



      Yeah and that's fine. It prints that because I haven't enable the button for SMART yet. (IE: The "Enable Direct-X" button). It should still load it and should display everything.

      The Mayor

      2015-05-24 01:08:33

      From: Brandon
      Yeah and that's fine. It prints that because I haven't enable the button for SMART yet. (IE: The "Enable Direct-X" button). It should still load it and should display everything.


      I mean the 2nd line, it actually fails to load the plugin. I just put the dll in the plugins folder, and ran


      program test;
      {$DEFINE SMART}
      {$i srl-6/srl.simba}

      begin
      setupSRL();
      end.

      Brandon

      2015-05-24 01:13:22

      From: The Mayor
      I mean the 2nd line, it actually fails to load the plugin. I just put the dll in the plugins folder, and ran


      program test;
      {$DEFINE SMART}
      {$i srl-6/srl.simba}

      begin
      setupSRL();
      end.



      https://www.microsoft.com/en-us/download/details.aspx?id=35

      You don't have d3dx which the plugin uses for drawing the ID's on screen. I didn't have time to remove the dependency.

      Ian

      2015-05-24 01:24:20

      I get this when it loads: https://i.imgur.com/FeJIfNP.png but everything displays fine, so maybe not something to worry about.
      Possibly not what you're wondering about, but for some reason SRL didn't detect that I was in the login screen.

      Other than that everything appears to work fine. Great work, as usual :)

      The Mayor

      2015-05-24 01:36:44

      From: Brandon
      https://www.microsoft.com/en-us/download/details.aspx?id=35

      You don't have d3dx which the plugin uses for drawing the ID's on screen. I didn't have time to remove the dependency.


      Thanks, working now! Seems just as smooth as the dx plugin even with the drawing.


      From: BMWxi
      I get this when it loads: https://i.imgur.com/FeJIfNP.png but everything displays fine, so maybe not something to worry about.
      Possibly not what you're wondering about, but for some reason SRL didn't detect that I was in the login screen.

      Other than that everything appears to work fine. Great work, as usual :)


      What would be cool is if it was compatable with srl so I could run a script for 24h with the drawing and see if there is any fps issues after a few hours.

      Brandon

      2015-05-24 01:54:06

      From: BMWxi
      I get this when it loads: https://i.imgur.com/FeJIfNP.png but everything displays fine, so maybe not something to worry about.
      Possibly not what you're wondering about, but for some reason SRL didn't detect that I was in the login screen.

      Other than that everything appears to work fine. Great work, as usual :)


      Ignore that. I added that so that I can detect older and newer graphics. Old versions of Direct-X may not have some functions but as long as it loads, it will not affect you in any way. New versions may have more or less functions as well.

      You should probably see the exact same error code when using the SRL Direct-X colour plugin as it's the same error logging/loading scheme (unless I forgot to enable it).

      A lot of people don't have that function so for SRL-6 I had disabled it (no side-effects): https://github.com/Brandon-T/DXI/blob/master/d3d9/Hooks/Exports.cpp#L29

      SRL did not detect anything because SMART's interface is not enabled. Don't worry about all of this for now. What is the FPS like? Did it crash? Any logs?


      From: The Mayor
      Thanks, working now! Seems just as smooth as the dx plugin even with the drawing.
      What would be cool is if it was compatable with srl so I could run a script for 24h with the drawing and see if there is any fps issues after a few hours.



      Good FPS? Did it crash? Any logs? You'll get to test lengthier times with scripts once the communication is enabled.

      The Mayor

      2015-05-24 02:00:12

      From: Brandon
      Ignore that. I added that so that I can detect older graphics. Old versions of Direct-X may not have some functions but as long as it loads, it will not affect you in any way.

      You should probably see the exact same error code when using the SRL Direct-X colour plugin as it's the same error logging/loading scheme (unless I forgot to enable it).

      SRL did not detect anything because SMART's interface is not enabled. What is the FPS like?





      Good FPS? You'll get to test lengthier times with scripts once the communication is enabled.


      Yea fps is great. It is actually less laggy drawing all the IDs when running around than OpenGL is without drawing anything (even the colour only openGL plugin).

      Looking forward to the enabled communication :D

      Ian

      2015-05-24 02:03:54

      From: Brandon
      Ignore that. I added that so that I can detect older and newer graphics. Old versions of Direct-X may not have some functions but as long as it loads, it will not affect you in any way. New versions may have more or less functions as well.

      You should probably see the exact same error code when using the SRL Direct-X colour plugin as it's the same error logging/loading scheme (unless I forgot to enable it).

      A lot of people don't have that function so for SRL-6 I had disabled it (no side-effects): https://github.com/Brandon-T/DXI/blob/master/d3d9/Hooks/Exports.cpp#L29

      SRL did not detect anything because SMART's interface is not enabled. Don't worry about all of this for now. What is the FPS like?


      FPS is great. No noticeable change from the normal plugin.

      Thomas

      2015-05-24 02:54:26

      From: Brandon
      Yeah you will be able to filter and/or remove them if you wish. You can also turn off rendering of certain models so those models aren't drawn on screen. Ex: Making a rock or character invisible but still being able to interact with it ;] but this functionality was just me playing around with things. I can guarantee the filtering of ID's but I may not allow you to remove models.

      But again, I want to focus on speed first as this is a speed beta test and rendering test. Once I know all is good for the majority of testers, I will move onto ID's and such.

      For now, I need ALL ID's to be on screen so we can know the limits of the plugin under stress that the current OpenGL one could not handle.


      So in the end we might even be able to not render any of the models, but still interact with them? That could lead to some serious power and resources savings.

      How long would it take you to update this whenever directx12 gets released?

      Great work as usual, will try the plug-in later!

      Brandon

      2015-05-24 09:47:34

      From: lovebotter
      So in the end we might even be able to not render any of the models, but still interact with them? That could lead to some serious power and resources savings.

      How long would it take you to update this whenever directx12 gets released?

      Great work as usual, will try the plug-in later!



      Yes you can disable the rendering of models but still interact with them for resource saving if I do add that.


      You're asking me an impossible question. "How long"? Remember this is done in my free-time only. Sometimes it seems like I take forever to make a release when in reality the total amount of code is about an hour of work. The current plugin on the OP has about 2 hours of work put in and most of that work is just wrappers (not hooks). Hooks are about 10 - 20 minutes of work. Once all the bases are hooked, hooks can take a couple seconds to a couple minutes. Calculations and math aren't part of the time taken. Those were already done and I usually have a bunch of files I just include into the project that were written prior to starting.

      Ex.. (ALL of the hooks code is in this one file – not the wrappers):

      [Spoiler=Code]

      #include "IDirect3DDevice9ProxyHook.hxx"

      #include "Memory.hxx"
      #include "Graphics.hxx"
      #include "Math.hxx"
      #include "Export.hxx"


      //Todo: move back to Math.cxx
      D3DXVECTOR3 GetVertex(const std::uint8_t *vertices, std::int16_t index, std::uint16_t stride)
      {
      D3DXVECTOR3 res = {0};
      memcpy(&res.x, &vertices[index * stride], sizeof(float));
      memcpy(&res.y, &vertices[index * stride + sizeof(float)], sizeof(float));
      memcpy(&res.z, &vertices[index * stride + sizeof(float) * 2], sizeof(float));
      return res;
      }

      //Todo: move back to Math.cxx
      void GetVertices(std::vector<D3DXVECTOR3> &verts, IDirect3DVertexBuffer9 *VertexBuffer, IDirect3DIndexBuffer9 *IndexBuffer, std::uint32_t BaseVertexIndex, std::uint32_t StartIndex, std::uint32_t PrimCount, std::uint32_t Stride)
      {
      const std::uint8_t *vertices = NULL;
      const std::uint16_t *indices = NULL;
      UINT EndIndex = StartIndex + (PrimCount * 3);

      vertices = reinterpret_cast<const std::uint8_t*>(reinterpret_cast<IDirect3DVertexBuffer9Proxy*>(VertexBuffer)->InternalBuffer());
      indices = reinterpret_cast<const std::uint16_t*>(reinterpret_cast<IDirect3DIndexBuffer9Proxy*>(IndexBuffer)->InternalBuffer()) + PrimCount * 3 * sizeof(std::uint16_t);
      verts.resize(EndIndex - StartIndex);

      for (UINT I = StartIndex, J = 0; I < EndIndex; ++I, ++J)
      {
      verts[J] = GetVertex(vertices, indices[I] + BaseVertexIndex, Stride);
      }
      }

      //Todo: Move back to Math.cxx
      D3DXVECTOR3 IDirect3DDevice9ProxyHook::WorldToScreen(IDirect3DDevice9* pDevice, D3DXVECTOR3 in)
      {
      D3DXVECTOR3 out;
      IDirect3DDevice9Proxy::GetVertexShaderConstantF(0, reinterpret_cast<float*>(&wvp), 4);
      D3DXMatrixTranspose(&wvp, &wvp);
      D3DXVec3TransformCoord(&out, &in, &wvp);
      return D3DXVECTOR3((out.x + 1.0f) * vp.Width * 0.5f + vp.X, (1.0f - out.y) * vp.Height * 0.5f + vp.Y, out.z);
      }

      //Todo: Move back to Math.cxx
      D3DXVECTOR3 IDirect3DDevice9ProxyHook::WorldToScreen2(IDirect3DDevice9* pDevice, D3DXVECTOR3 in)
      {
      D3DXVECTOR3 out;
      D3DXVec3Project(&out, &in, &vp, &proj, &view, &world);
      return out;
      }


      //Hooks
      IDirect3DDevice9ProxyHook::IDirect3DDevice9ProxyHook(IDirect3DDevice9* pOriginal) : IDirect3DDevice9Proxy(pOriginal)
      {

      }

      IDirect3DDevice9ProxyHook::~IDirect3DDevice9ProxyHook()
      {

      }

      ULONG IDirect3DDevice9ProxyHook::AddRef()
      {
      ++references;
      return IDirect3DDevice9ProxyHook::AddRef();
      }

      ULONG IDirect3DDevice9ProxyHook::Release()
      {
      if (--references == 0)
      {
      font.reset(nullptr);
      pTexture = nullptr;
      pIndexBuffer = nullptr;
      pVertexBuffer = nullptr;
      }

      return IDirect3DDevice9ProxyHook::Release();
      }



      //Override rendering
      HRESULT IDirect3DDevice9ProxyHook::DrawPrimitive(D3DPRIMITIVETYPE PrimitiveType, UINT StartVertex, UINT PrimitiveCount)
      {
      if (pTexture)
      {
      D3DXVECTOR3 vertex = WorldToScreen(pOriginal);

      pTexture->points.push_back(out);

      if (std::find(textures.begin(), textures.end(), pTexture) == textures.end())
      {
      textures.push_back(pTexture); //animated texture.
      }
      }
      return IDirect3DDevice9Proxy::DrawPrimitive(PrimitiveType, StartVertex, PrimitiveCount);
      }

      HRESULT IDirect3DDevice9ProxyHook::DrawIndexedPrimitive(D3DPRIMITIVETYPE PrimitiveType, INT BaseVertexIndex, UINT MinVertexIndex, UINT NumVertices, UINT startIndex, UINT primCount)
      {
      if (pTexture && pIndexBuffer && pVertexBuffer && (primCount == 2 || NumVertices == 4))
      {
      if (PrimitiveType == D3DPT_TRIANGLELIST)
      {
      DWORD fvf = 0;
      IDirect3DDevice9Proxy::GetFVF(&fvf);

      std::vector<D3DXVECTOR3> verts;

      //Might be way more efficient to get the top left coord + the size / 2 for mid point.
      GetVertices(verts, pVertexBuffer, pIndexBuffer, BaseVertexIndex, startIndex, primCount, GVMath::CalculateStride(fvf));

      if (font && verts.size())
      {
      D3DXVECTOR3 in = {(verts[0].x + verts[4].x) / 2.0f, (verts[0].y + verts[4].y) / 2.0f, 0};
      D3DXVECTOR3 out = WorldToScreen2(this->Original(), in);

      pTexture->points.push_back(out);

      if (std::find(textures.begin(), textures.end(), pTexture) == textures.end())
      {
      textures.push_back(pTexture); //regular texture.
      }
      }
      }
      }
      else if (pVertexBuffer)
      {
      unsigned int ID = GenId(PrimitiveType, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount);
      D3DXVECTOR3 out = WorldToScreen(this->Original());

      pVertexBuffer->ID = ID;
      pVertexBuffer->points.push_back(out);

      if (std::find(models.begin(), models.end(), pVertexBuffer) == models.end())
      {
      models.push_back(pVertexBuffer); //model.
      }
      }
      return IDirect3DDevice9Proxy::DrawIndexedPrimitive(PrimitiveType, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount);
      }

      HRESULT IDirect3DDevice9ProxyHook::BeginScene()
      {
      HRESULT res = IDirect3DDevice9Proxy::BeginScene();

      if (!font)
      {
      font.reset(new Font(this->Original(), "Arial", 8));
      }

      //Cache all matrices for speed once per frame or perhaps move this to once per load.
      IDirect3DDevice9Proxy::GetViewport(&vp);
      IDirect3DDevice9Proxy::GetTransform(D3DTS_VIEW, &view);
      IDirect3DDevice9Proxy::GetTransform(D3DTS_PROJECTION, &proj);
      IDirect3DDevice9Proxy::GetTransform(D3DTS_WORLD, &world);

      return res;
      }

      HRESULT IDirect3DDevice9ProxyHook::EndScene()
      {
      if (font)
      {
      for (IDirect3DTexture9Proxy *tex : textures) //todo: check if tex is null.
      {
      for (D3DXVECTOR3 &pt : tex->points)
      {
      font->Draw(pt.x, pt.y, D3DCOLOR_XRGB(0, 0xFF, 0), "%", tex->ID);
      }

      tex->points.clear();
      }

      for (IDirect3DVertexBuffer9Proxy *mod : models) //todo: check if mod is null.
      {
      for (D3DXVECTOR3 &pt : mod->points)
      {
      font->Draw(pt.x, pt.y, D3DCOLOR_XRGB(0xFF, 0, 0), "%", mod->ID);
      }

      mod->points.clear();
      }
      }

      textures.clear();
      models.clear();
      return IDirect3DDevice9Proxy::EndScene();
      }

      HRESULT IDirect3DDevice9ProxyHook::Reset(D3DPRESENT_PARAMETERS* pPresentationParameters)
      {
      if (font)
      font->OnLostDevice();

      HRESULT res = IDirect3DDevice9Proxy::Reset(pPresentationParameters);

      if (font)
      font->OnResetDevice();

      return res;
      }


      //Override creations
      HRESULT IDirect3DDevice9ProxyHook::CreateAdditionalSwapChain(D3DPRESENT_PARAMETERS* pPresentationParameters, IDirect3DSwapChain9** pSwapChain)
      {
      HRESULT res = IDirect3DDevice9Proxy::CreateAdditionalSwapChain(pPresentationParameters, pSwapChain);
      if (res == D3D_OK)
      {
      *pSwapChain = new IDirect3DSwapChain9Proxy(*pSwapChain);
      }
      return res;
      }


      HRESULT IDirect3DDevice9ProxyHook::CreateTexture(UINT Width, UINT Height, UINT Levels, DWORD Usage, D3DFORMAT Format, D3DPOOL Pool, IDirect3DTexture9** ppTexture, HANDLE* pSharedHandle)
      {
      HRESULT res = IDirect3DDevice9Proxy::CreateTexture(Width, Height, Levels, Usage, Format, Pool, ppTexture, pSharedHandle);
      if (res == D3D_OK)
      {
      *ppTexture = new IDirect3DTexture9Proxy(*ppTexture, Width, Height, Format);
      }
      return res;
      }

      HRESULT IDirect3DDevice9ProxyHook::CreateVertexBuffer(UINT Length, DWORD Usage, DWORD FVF, D3DPOOL Pool, IDirect3DVertexBuffer9** ppVertexBuffer, HANDLE* pSharedHandle)
      {
      HRESULT res = IDirect3DDevice9Proxy::CreateVertexBuffer(Length, Usage, FVF, Pool, ppVertexBuffer, pSharedHandle);
      if (res == D3D_OK)
      {
      *ppVertexBuffer = new IDirect3DVertexBuffer9Proxy(*ppVertexBuffer, Length);
      }
      return res;
      }

      HRESULT IDirect3DDevice9ProxyHook::CreateIndexBuffer(UINT Length, DWORD Usage, D3DFORMAT Format, D3DPOOL Pool, IDirect3DIndexBuffer9** ppIndexBuffer, HANDLE* pSharedHandle)
      {
      HRESULT res = IDirect3DDevice9Proxy::CreateIndexBuffer(Length, Usage, Format, Pool, ppIndexBuffer, pSharedHandle);
      if (res == D3D_OK)
      {
      *ppIndexBuffer = new IDirect3DIndexBuffer9Proxy(*ppIndexBuffer, Length);
      }
      return res;
      }


      //Override setters
      HRESULT IDirect3DDevice9ProxyHook::SetTexture(DWORD Stage, IDirect3DBaseTexture9* pTexture)
      {
      this->pTexture = nullptr;
      if (pTexture && pTexture->GetType() == D3DRTYPE_TEXTURE)
      {
      this->pTexture = static_cast<IDirect3DTexture9Proxy*>(pTexture);
      return IDirect3DDevice9Proxy::SetTexture(Stage, static_cast<IDirect3DTexture9Proxy*>(pTexture)->Original());
      }
      return IDirect3DDevice9Proxy::SetTexture(Stage, pTexture);
      }

      HRESULT IDirect3DDevice9ProxyHook::SetStreamSource(UINT StreamNumber, IDirect3DVertexBuffer9* pStreamData, UINT OffsetInBytes, UINT Stride)
      {
      this->pVertexBuffer = nullptr;
      if (pStreamData && pStreamData->GetType() == D3DRTYPE_VERTEXBUFFER)
      {
      this->pVertexBuffer = static_cast<IDirect3DVertexBuffer9Proxy*>(pStreamData);
      return IDirect3DDevice9Proxy::SetStreamSource(StreamNumber, static_cast<IDirect3DVertexBuffer9Proxy*>(pStreamData)->Original(), OffsetInBytes, Stride);
      }
      return IDirect3DDevice9Proxy::SetStreamSource(StreamNumber, pStreamData, OffsetInBytes, Stride);
      }

      HRESULT IDirect3DDevice9ProxyHook::SetIndices(IDirect3DIndexBuffer9* pIndexData)
      {
      this->pIndexBuffer = nullptr;
      if (pIndexData && pIndexData->GetType() == D3DRTYPE_INDEXBUFFER)
      {
      this->pIndexBuffer = static_cast<IDirect3DIndexBuffer9Proxy*>(pIndexData);
      return IDirect3DDevice9Proxy::SetIndices(static_cast<IDirect3DIndexBuffer9Proxy*>(pIndexData)->Original());
      }
      return IDirect3DDevice9Proxy::SetIndices(pIndexData);
      }


      //Override consumers
      HRESULT IDirect3DDevice9ProxyHook::GetSwapChain(UINT iSwapChain, IDirect3DSwapChain9** pSwapChain)
      {
      HRESULT res = IDirect3DDevice9Proxy::GetSwapChain(iSwapChain, pSwapChain);
      if (res == D3D_OK)
      {
      *pSwapChain = new IDirect3DSwapChain9Proxy(*pSwapChain);
      }
      return res;
      }

      HRESULT IDirect3DDevice9ProxyHook::ProcessVertices(UINT SrcStartIndex, UINT DestIndex, UINT VertexCount, IDirect3DVertexBuffer9* pDestBuffer, IDirect3DVertexDeclaration9* pVertexDecl, DWORD Flags)
      {
      return IDirect3DDevice9Proxy::ProcessVertices(SrcStartIndex, DestIndex, VertexCount, static_cast<IDirect3DVertexBuffer9Proxy*>(pDestBuffer)->Original(), pVertexDecl, Flags);
      }
      [/Spoiler]


      Testing takes a while, wrappers take a couple minutes each. Overall, an update to Direct-X 12 is a different ball game but would take around the same amount of time. If I had one weekend free, I would be able to release a plugin with a ton of features.

      Thomas

      2015-05-24 10:14:16

      @Brandon
      I didn't mean for a time on it, was just wondering if you have anticipated on directx 12, and if you expect it to require allot of work to fix the plug-in :)

      Brandon

      2015-05-24 10:52:23

      From: lovebotter
      @brandon[/brandon]
      I didn't mean for a time on it, was just wondering if you have anticipated on directx 12, and if you expect it to require allot of work to fix the plug-in :)


      Yeah I've been keeping up with Direct-X 12 (game programming). So long as the COMM interface doesn't change much from Direct-X 11 (and it most likely won't), then it won't take long to write a port.

      And I don't expect it to require a lot of work for a port at all. It's all just COMM and it's usually very simple. I've only been keeping up with what's on villavu in regards to the NXT client which will supposedly use Direct-X 12. It's C++ and ASM so it's my playground. I don't usually visit the RS website unless someone posts something interesting on here that caught my eye.


      All other code such as communication with Simba and the SMART interface would be the same (copy paste). Direct-X 11 is a lot easier than 9 as they provide a lot of built in things (especially for math, drawing, efficiency) and I expect 12 to be a lot easier than 11. Once you know one, you pretty much know all.

      Thomas

      2015-05-31 07:47:05

      From: Brandon
      You'll get to test lengthier times with scripts once the communication is enabled.


      Have you perhaps had some free time to enable communication?
      I'm so impatient, I know…

      Also will we be able to read renderend text? Or just models/textures?

      Brandon

      2015-05-31 09:52:20

      From: lovebotter
      Have you perhaps had some free time to enable communication?
      I'm so impatient, I know…

      Also will we be able to read renderend text? Or just models/textures?



      I enabled communication last night. I have to test it first then I will do a release with a description of everything that needs to be tested by you guys. It seems like I may only be able to do a release every Sunday or Saturday until maybe next week or so.

      For the comment about "text" recognition. I know how it works and I have the logic for it written but it will be one of the very last features to be enabled. I say this because I got screwed royally in OpenGL with the text recognition (although I have a fix for it now), I'd like to do it correctly in Direct-X the first time around. In OpenGL, it was done in the dumbest way now that I look back on it.

      Direct-X uses the same kind of fonts for text: "textured fonts" aka "bitmap fonts" and the algorithm is the same as the new OpenGL algorithm but I want to make sure it is 10000% right and fast. You can see information about the new way of doing it on the OpenGL thread.


      I've also been working on getting rid of the D3DX dependency and writing my own algorithms which is just as fast for matrix multiplication, projection/unprojection, etc.. D3DX dependency requires the user to install the Direct-X end-user runtime. (See The Mayor's installation problem above).

      For now, I will enable communication for the back-buffer so that Simba/SMART can read colours, models and textures.

      Thomas

      2015-05-31 11:39:04

      Great! Take your time, I'm sure it'll be flawless soon enough. (Still hoping the same for ogl).
      Too bad I need perfect text recognition for my next script. And ogl just keeps becoming a lagfest.

      Do you think if I do write that script, but use OGL, it'll be somewhat similar in directx?
      Perhaps it'll still be better to just wait for your release instead of porting over an OGL script and having a sloppy script..

      *edit*

      I'm getting crashes rather often on my laptop. (SMART Client closes)
      Windows 10 Pro 64-bit
      Intel Core 2 Duo P7350 @ 2.00
      nVidia GT130M 1GB.

      Using 800x600 resolution, unsure what kind of crash report I can find.
      Simba doesn't report anything.

      It crashes ingame whenever it tries to load some new stuff, it kind of lags for me once I get logged in, then whenever I do something somewhat requiring CPU/GPU it crashes.

      Just tried my desktop, also crashes the SMART client. It does load them though, and displays the debug in lobby, but once I try to login into a game server it crashes.

      *edit*
      Doesn't crash once I stop the script, atleast on desktop.
      Rightclick options menu has some weird debug on it, like a ton of duplicate debugs stacked it seems.

      alar82

      2015-06-05 18:00:50

      Omg performance GAINZ 45-50 fps on my old computer and no performance degradation on teleport. I have amd fx-8320 cpu and r290=)
      Its sad that dont play(bot) rs anymore, I hate this p2w ****.
      [ATTACH=CONFIG]26082[/ATTACH]

      Ross

      2015-06-18 23:47:23

      Hi @Brandon, any update on this?

      willmcb18

      2015-06-19 12:58:55

      interesting idea