PDA

View Full Version : Olly/ d3d8 question?


Labyrnth
April 18th, 2008, 01:23
Ok i know there is a few threads about this, old one and i didnt want to grave dig.

1. Breaking in full screen apps.
a. Set olly always on top is a good option and works sometimes.
b. Dual monitors. Basically a myth to me i have done it with dual vga and you freeze up still.
c. Window mode tools and options in shorcut. This works sometimes as well when you can get the app in a window your all good to go.
--------------------------------------------------------------------------
Now for the problem i have.

1. Game will not window, by option in cfg file or using windowing tools & modified shortcut. "Dont know what/how to do what one person said in a older post that worked for d3d9 by altering the bool that controls window/fullscreen."

Question:
Conditional Break "shift F4" How can you look at the log or know it is breaking without pausing the application or even trace it? The plugin i have for trace says to set a break and hit F9 after the break is reached. By this time the app will be in a fullscreen freeze. A trace would be nice im guessing?

*Im trying to see how an outter loop is doing its work and need to do breaks or log it some how, It controls 2 different occurrence within this large loop.

*Sort of a solution for my problem.
Well this will work, nice little discovery on my own.
I just did something that worked nicely. So i will share it with others.
If you use trace it will work for you. I managed to trace the loop.

Silkut
April 18th, 2008, 05:52
Hi there,

I can't help you concerning your conditional break question but for reference purpose,
I recently pointed out TheColonial solution² for Silver's DXcrackme¹ (aka patching the windowed flag) in my thread introducing D3D reverse³.

[¹] Silver's DirectX crackme - http://www.woodmann.cjb.net/forum/showthread.php?t=9600
[²] TheColonial's solution - http://crackmes.de/users/silver/silvers_dx_crackme_1/solutions/thecolonial
[³] d3d reverse - http://www.woodmann.cjb.net/forum/showthread.php?t=10033

Quote:
b. Dual monitors. Basically a myth to me i have done it with dual vga and you freeze up still.

How have you done it ? Using the second video port on the same graphic card ? Because I read somewhere it was very handful to use a cheap PCI video card plus your AGP/PCIe video card..

Regards.

dELTA
April 18th, 2008, 06:05
Also, the "Conditional Branch Logger" Olly plugin may be of use for your tracing/logging needs:

http://www.woodmann.com/collaborative/tools/Conditional_Branch_Logger

Admiral
April 18th, 2008, 07:53
I've been meaning to write about this on my blog for some time. A generic solution exists by means of hooking Direct3DCreate (along with a few other functions) and altering the D3DPRESENT_PARAMETERS structure to force the program to run in windowed mode. Admittedly, this involves some work, but producing a reusable loader or a proxy DLL shouldn't be too hard and would pay dividends.

Silver
April 18th, 2008, 12:02
I might be able to help you with this, but I have to confess I'm not exactly sure what problem you're running into. This isn't an Olly-v-DX problem, it's a generic DX-fullscreen problem. As Silkut points out there are quite a few posts and docs that explain how to deal with this.

Admiral, good idea. You'd need to write a half-decent caps handler, but once you'd done it you'll have saved everyone some hassle doing it on a per-target basis. If you want I'd be interested to give input to this project if you decide to do it.

stormphaze
June 6th, 2008, 07:37
Quote:
I've been meaning to write about this on my blog for some time. A generic solution exists by means of hooking Direct3DCreate (along with a few other functions) and altering the D3DPRESENT_PARAMETERS structure to force the program to run in windowed mode. Admittedly, this involves some work, but producing a reusable loader or a proxy DLL shouldn't be too hard and would pay dividends.


This approach doesnt work with all games, ive not worked on it for some years but i created an app that did exactly what you described, it worked fine for about 4 out of 10 games, the others would crash at certain points in the game, I think i found out it was something to do with the dx resource handling and what happends when the window loses focus. If the game doesnt handle and clean up its own resources then the game will obviously crash.

Admiral
June 9th, 2008, 12:47
This is why the 'few other functions' need hooking. There may be more, but I know that failing to install a similar hook for IDirect3DDevice9::Reset and IDirect3DDevice9::CreateSwapChain will cause problems when subsequent device creation/restoration occurs. My attempt at getting this working is still in its infancy, but I'll be sure to let everybody know if or when it is reasonably functional.

stormphaze
June 9th, 2008, 13:14
In the end I got a lot of information by reversing existing programs that already do this job, the 2 frontrunners being 3dAnalyze and DxWnd which is a nice project within itself. Unfortunately I never had time to implement it before i got work after uni so it got dropped. Never hurts to have a working model you can check a few things with

Silver
June 11th, 2008, 13:10
Quote:
[Originally Posted by stormphaze;74995]I think i found out it was something to do with the dx resource handling and what happends when the window loses focus. If the game doesnt handle and clean up its own resources then the game will obviously crash.


It's called "lost devices". Pain in the ass for DX coders, and for DX reversers. You can stick resources in the managed pool but there's performance implications...