DxWnd rel. 2.02.82 unfinished Manual
DxWnd rel. 2.02.82 unfinished Manual
What is DxWnd?
What is DxWnd?
DxWnd is a Win32 hooker that
DxWnd is a Win32 hooker that intercepts and alter the behaviour of
intercepts and alter the behaviour of
window me
window messages an
ssages and !"s
d !"s b# means
b# means of
of event in
event interception
terception and code
and code
in$ection directed to the configured tasks in order to get a
in$ection directed to the configured tasks in order to get a
proper behaviour of fullscreen programs% but in
proper behaviour of fullscreen programs% but in a windowed
a windowed
environment...
environment... too complicated& Well% actuall# DxWnd
.. too complicated& Well% actuall# DxWnd is a
is a tool
tool
that does
that does its best
its best to let
to let #ou run
#ou run fullscreen
fullscreen applications
applications in a
in a
window.
window.
"s that all& Well% no% not
"s that all& Well% no% not reall#... 'aking advanta
reall#... 'aking advantage of the
ge of the
hooked logic in$ected in the application% DxWnd does some more
hooked logic in$ected in the application% DxWnd does some more
little tricks% that fall in two general cathegories( making #our
little tricks% that fall in two general cathegories( making #our
program more compatible to different environments and altering its
program more compatible to different environments and altering its
time flow. )o% that makes some old
time flow. )o% that makes some old programs able to run on modern
programs able to run on modern
platforms *well% at least sometimes...+ and to
platforms *well% at least sometimes...+ and to increase or
increase or
decrease the game speed at #our will. ,ave
decrease the game speed at #our will. ,ave #ou alwa#s been a
#ou alwa#s been a
complete nerd with -!)& ,ere comes #our revenge( bullet time
complete nerd with -!)& ,ere comes #our revenge( bullet time
wherever #ou need it
Why DxWnd?
Why DxWnd?
'his is not a
'his is not a sill# /uestion. ctuall#% #ou ma# think to two
sill# /uestion. ctuall#% #ou ma# think to two
different /uestions(
different /uestions(
+
+ Wh# sh
Wh# should "
ould " use Dx
use DxWnd&
Wnd&
2+
2+ Wh# someone s
Wh# someone should spend hi
hould spend his time to deve
s time to develop it&
lop it&
Why should I use DxWnd?
Why should I use DxWnd?
1ets start with the first one. nce upon
1ets start with the first one. nce upon a time *in the
a time *in the "' clock%
"' clock%
that means a few #ears ago+
that means a few #ears ago+ people used to have clums# !4s that
people used to have clums# !4s that in
in
a slow and single5threaded environment tried to do their best to
a slow and single5threaded environment tried to do their best to
impress their owner with strength
impress their owner with strength demonstratio
demonstrations% usuall# tr#ing
ns% usuall# tr#ing
to move colored pixels on the screen in
to move colored pixels on the screen in the fastest possible wa#.
the fastest possible wa#.
'hat custom was named videogaming% and implied using all trick#
'hat custom was named videogaming% and implied using all trick#
wa#s to improve the s#stem performances. ne common wa# to do
wa#s to improve the s#stem performances. ne common wa# to do
that% was to high$ack all hardware resources and dedicate them for
that% was to high$ack all hardware resources and dedicate them for
this single purpose% of course disabling an# attempt to run
this single purpose% of course disabling an# attempt to run
parallel tasks in other portions of the screen( the classic
parallel tasks in other portions of the screen( the classic
example being an# videogame developed for
example being an# videogame developed for Win67 and further.
Win67 and further.
ow% #ou gu#s ma# ask
ow% #ou gu#s ma# ask #ourselves wh# should all this time be
#ourselves wh# should all this time be
passed awa# and !4 increased their power b# a
passed awa# and !4 increased their power b# a 00x times more% to
00x times more% to
keep pla#ing the ver# same game in
keep pla#ing the ver# same game in the ver# same environment.
the ver# same environment.
)omeone is calling #ou on a
)omeone is calling #ou on a chat& new email message is
chat& new email message is arrived&
arrived&
9ou want to browse the net
9ou want to browse the net meanwhile& )omethin
meanwhile& )omething is happening on
g is happening on
#our favourite social network or
#our favourite social network or MM!:!;& -orget about it 9oure
MM!:!;& -orget about it 9oure
currentl# dealing with a task that wants 00< of
currentl# dealing with a task that wants 00< of #our attention%
#our attention%
even if it uses < of #our !4 power. )o% wh# not attempting to
even if it uses < of #our !4 power. )o% wh# not attempting to
push this old and invasive application within a window of its
push this old and invasive application within a window of its
own &
own &
'hats what DxWnd is mainl# for( let fullscreen applications run
'hats what DxWnd is mainl# for( let fullscreen applications run
pretending the#re still in a
pretending the#re still in a fullscreen context% but actuall#
fullscreen context% but actuall#
within their own separate window. nd% taking advantage of the
within their own separate window. nd% taking advantage of the
code hooking needed to do so% in
code hooking needed to do so% in some case it ma# even
some case it ma# even happen that
happen that
things are further improved% but well see this later.
things are further improved% but well see this later.
second undoubtful fact is the technological evolution that has
second undoubtful fact is the technological evolution that has
turned games from different windows operating s#stems *through
turned games from different windows operating s#stems *through
Windows 67 to current Windows 8+% 4!= architectures *>% 32% >?
Windows 67 to current Windows 8+% 4!= architectures *>% 32% >?
bits+ and from old and trick# directdraw support to recent 3D
bits+ and from old and trick# directdraw support to recent 3D
libraries like direct3d 8@6@0@% and pen;1. 'his
libraries like direct3d 8@6@0@% and pen;1. 'his evolution has
evolution has
left some victims behind( a lot of
left some victims behind( a lot of wonderful games are no longer
wonderful games are no longer
supported in the current environment% even
supported in the current environment% even despite the efforts
despite the efforts
Microsoft is making to support legac#. "n some cases% DxWnd is
Microsoft is making to support legac#. "n some cases% DxWnd is
crucial to recover these old glories of the past.
crucial to recover these old glories of the past.
Why someone should spend his time to develop it?
Why someone should spend his time to develop it?
ow the second /uestion( wh# someone should ever bother to develop
ow the second /uestion( wh# someone should ever bother to develop
a thing like this& 'his is
a thing like this& 'his is different stor#. " started looking for
different stor#. " started looking for
a window5iAer for a specific purpose( not having a dual
a window5iAer for a specific purpose( not having a dual monitor !4
monitor !4
at home% " was
Why DxWnd?
Why DxWnd?
'his is not a
'his is not a sill# /uestion. ctuall#% #ou ma# think to two
sill# /uestion. ctuall#% #ou ma# think to two
different /uestions(
different /uestions(
+
+ Wh# sh
Wh# should "
ould " use Dx
use DxWnd&
Wnd&
2+
2+ Wh# someone s
Wh# someone should spend hi
hould spend his time to deve
s time to develop it&
lop it&
Why should I use DxWnd?
Why should I use DxWnd?
1ets start with the first one. nce upon
1ets start with the first one. nce upon a time *in the
a time *in the "' clock%
"' clock%
that means a few #ears ago+
that means a few #ears ago+ people used to have clums# !4s that
people used to have clums# !4s that in
in
a slow and single5threaded environment tried to do their best to
a slow and single5threaded environment tried to do their best to
impress their owner with strength
impress their owner with strength demonstratio
demonstrations% usuall# tr#ing
ns% usuall# tr#ing
to move colored pixels on the screen in
to move colored pixels on the screen in the fastest possible wa#.
the fastest possible wa#.
'hat custom was named videogaming% and implied using all trick#
'hat custom was named videogaming% and implied using all trick#
wa#s to improve the s#stem performances. ne common wa# to do
wa#s to improve the s#stem performances. ne common wa# to do
that% was to high$ack all hardware resources and dedicate them for
that% was to high$ack all hardware resources and dedicate them for
this single purpose% of course disabling an# attempt to run
this single purpose% of course disabling an# attempt to run
parallel tasks in other portions of the screen( the classic
parallel tasks in other portions of the screen( the classic
example being an# videogame developed for
example being an# videogame developed for Win67 and further.
Win67 and further.
ow% #ou gu#s ma# ask
ow% #ou gu#s ma# ask #ourselves wh# should all this time be
#ourselves wh# should all this time be
passed awa# and !4 increased their power b# a
passed awa# and !4 increased their power b# a 00x times more% to
00x times more% to
keep pla#ing the ver# same game in
keep pla#ing the ver# same game in the ver# same environment.
the ver# same environment.
)omeone is calling #ou on a
)omeone is calling #ou on a chat& new email message is
chat& new email message is arrived&
arrived&
9ou want to browse the net
9ou want to browse the net meanwhile& )omethin
meanwhile& )omething is happening on
g is happening on
#our favourite social network or
#our favourite social network or MM!:!;& -orget about it 9oure
MM!:!;& -orget about it 9oure
currentl# dealing with a task that wants 00< of
currentl# dealing with a task that wants 00< of #our attention%
#our attention%
even if it uses < of #our !4 power. )o% wh# not attempting to
even if it uses < of #our !4 power. )o% wh# not attempting to
push this old and invasive application within a window of its
push this old and invasive application within a window of its
own &
own &
'hats what DxWnd is mainl# for( let fullscreen applications run
'hats what DxWnd is mainl# for( let fullscreen applications run
pretending the#re still in a
pretending the#re still in a fullscreen context% but actuall#
fullscreen context% but actuall#
within their own separate window. nd% taking advantage of the
within their own separate window. nd% taking advantage of the
code hooking needed to do so% in
code hooking needed to do so% in some case it ma# even
some case it ma# even happen that
happen that
things are further improved% but well see this later.
things are further improved% but well see this later.
second undoubtful fact is the technological evolution that has
second undoubtful fact is the technological evolution that has
turned games from different windows operating s#stems *through
turned games from different windows operating s#stems *through
Windows 67 to current Windows 8+% 4!= architectures *>% 32% >?
Windows 67 to current Windows 8+% 4!= architectures *>% 32% >?
bits+ and from old and trick# directdraw support to recent 3D
bits+ and from old and trick# directdraw support to recent 3D
libraries like direct3d 8@6@0@% and pen;1. 'his
libraries like direct3d 8@6@0@% and pen;1. 'his evolution has
evolution has
left some victims behind( a lot of
left some victims behind( a lot of wonderful games are no longer
wonderful games are no longer
supported in the current environment% even
supported in the current environment% even despite the efforts
despite the efforts
Microsoft is making to support legac#. "n some cases% DxWnd is
Microsoft is making to support legac#. "n some cases% DxWnd is
crucial to recover these old glories of the past.
crucial to recover these old glories of the past.
Why someone should spend his time to develop it?
Why someone should spend his time to develop it?
ow the second /uestion( wh# someone should ever bother to develop
ow the second /uestion( wh# someone should ever bother to develop
a thing like this& 'his is
a thing like this& 'his is different stor#. " started looking for
different stor#. " started looking for
a window5iAer for a specific purpose( not having a dual
a window5iAer for a specific purpose( not having a dual monitor !4
monitor !4
at home% " was
1ooking in the net resources% " got
1ooking in the net resources% " got references to an asian
references to an asian
*$apanese&+ DxWnd pro$ect that seemed discontinued% but left
*$apanese&+ DxWnd pro$ect that seemed discontinued% but left an
an
old cop# of the 4BB
old cop# of the 4BB sources *unfortunat
sources *unfortunatel#% not the most recent
el#% not the most recent
release+ to be
release+ to be downloaded. fter that% there were several attempts
downloaded. fter that% there were several attempts
to translate and improve the program% but none shared the sources
to translate and improve the program% but none shared the sources
again. When " opened the pro$ect tr#ing to
again. When " opened the pro$ect tr#ing to understand the basic
understand the basic
principle% " found that it was incredibl# simple and #et
principle% " found that it was incredibl# simple and #et
sophisticated% acting " think in a ver# close wa#
sophisticated% acting " think in a ver# close wa# as virus or
as virus or
anti5virus programs do.
anti5virus programs do.
)o " $ust thought it
)o " $ust thought it was such a pit# that
was such a pit# that this incredible piece of
this incredible piece of
artwork of 4BB programming could be left discontinued% and then "
artwork of 4BB programming could be left discontinued% and then "
decided to Cadopt the pro$ect and continue it% even if
decided to Cadopt the pro$ect and continue it% even if in the
in the
meanwhile " bought a second monitor for m#
meanwhile " bought a second monitor for m# domestic !4. nd for
domestic !4. nd for
the same reason% " published the source code on
the same reason% " published the source code on sourceforge% a
sourceforge% a
proper location for an# open source piece of coding% and
proper location for an# open source piece of coding% and "
"
encourage an#one to $oin the pro$ect and extend it further on.
encourage an#one to $oin the pro$ect and extend it further on. nd
nd
let me thank again the m#sterious coder whose onl# trail
let me thank again the m#sterious coder whose onl# trail left to
left to
make a reference is )-EF( whoever #ou are% )-EF *if this was #our
make a reference is )-EF( whoever #ou are% )-EF *if this was #our
nick+% thank #ou.
nick+% thank #ou.
-rom the time " published the first
-rom the time " published the first DxWnd releases% then% a lot of
DxWnd releases% then% a lot of
improvements
improvements have
have been ma
been made%
de% most of
most of them i
them involving
nvolving sophisticated
sophisticated
techni/ues that " learnt from
techni/ues that " learnt from several great teachers% coming from
several great teachers% coming from
)ource-orge% 4ode!ro$
)ource-orge% 4ode!ro$ect and an#where else in the
ect and an#where else in the net. 'hank #ou
net. 'hank #ou
all% open source supporters
How does DxWnd work?
Well% actuall# there are several different wa#s #ou ma# write a
fullscreen application% and thats wh# there are corresponding
different wa#s to handle it hence some anno#ing configuration to
do before.
!lease% bear in mind that DxWnd is still an experimental program%
and then its configuration is still a little clums#. 'his aspect
will be improved and simplified at proper time% later on.
n#wa#% these are the basic principles of the DxWnd behaviour(
. DxWnd DG) ' alterate in an# wa# the behaviour of #our
software *either s#stem or applications+ when not active.
When turned off% ever#thing behaves as if DxWnd never run on
#our machine% or never existed at all.
2. DxWnd DG) alterate the behaviour of #our application
software when running( it hooks custom code that changes the
applications behaviour% hopefull# in a positive wa#% but #ou
never know. "ts possible that because of hacks to the
directdraw or other s#stem code there might be anno#ing
effects such as froAen screen% unresponsive ke#board and so
on. Ee patient and ma#be #oull find a good game setting to
pla# without side effects.
3. 'his is trick#( unless #ou need code in$ection support *this
will be explained later+ when running% DxWnd affects 11
games in the shown list% no matter whether the cursor is
highlighting a particular one% or if #ou started #our game
outside the DxWnd interface. 'hats wh# #ou need not activate
the game from the DxWnd menu% but #ou could keep managing it
as usual *clicking on desktop icons% shortcuts or
whatsoever+. )o% remember this( whenever DxWnd is running% it
impacts on 9 game it is configured on its game list% no
matter if #ou didnt strt it from DxWnd interface.
?. gain% DxWnd is currentl# coded to make G )";1G game
working at a time% even if it could be possible to start and
intercept more than one in parallel. "n some cases% the games
work together% but unpredictable things happen for instance
when #ou tr# to control more than one game at a time. Ma#be
one da# it will make it possible to pla# more games in
parallel% but so far that feature is unsupported% so DxWnd is
operating on one game *the fist started up+ while the others
will not be effected and should start normall# in their
original fullscreen mode.
DxWnd stores 11 its settings on a couple of configuration files
*dxwnd.ini for almost ever#thing% and dxwnd.reg for altered
registr# ke#s configuration+ in the ver# same folder where
dxwnd.exe and the hooker dxwnd.dll are located. o info is written
in the registr# or an#where else in the s#stem. o installation
procedure is re/uired% $ust cop# the files where #ou like better%
create #our own shortcut entries wherever #ou like and% whenever
#oure satisfied with some DxWnd setting% $ust back5up the
configuration b# simpl# cop#ing the dxwnd.ini file somewhere else.
lso% keep in mind that 11 changes are written on disk $ust when
DxWnd exits safel#% so whenever it crashes #our configuration
changes are certain to be lost.
-rom release 2.02.22% then% its also possible to export and
import single pieces of configuration to separate files% so that
people are encouraged to share working game configurations b#
sharing these files onl#.
The command line arguments
DxWnd accepts a few command line arguments% that can all be
combined together to alter his behaviour(
@'
)tarts
DxWnd
iconiAed
in
the
)#stem
'ra# *see DxWnd in the )#stem 'ra#+
@"
)tarts
DxWnd
initiall#
in
the
"D1G
state% so that it doesnt effect the
programs until #ou manuall# issue a
,ook H )tart command
@4(IfilenameJ
=ses the IfilenameJ configuration file
instead of the default config.ini file.
"n an# case% the configuration file
must be located in the same DxWnd
execution folder.
@langKI
xx>"f #ou need a localiAed version of
DxWnd% this argument causes DxWnd to
load all resources text from the
external dlls% :esourcesLI
xx>.dll
@debug
Gnables
debug
features.
ot
The Application GUI
DxWnd comes with a nice and simple ;raphic =ser "nterface( when
started% it shows a form prett# muck like the one in the following
picture(
"n the main window there is the list of hooked programs( DxWnd can
currentl# handle up to 27>. 'r#ing to add more than that will give
an error message. eep in mind that DxWnd bundles contain a export
subfolder where all supported games have their own default
configuration read# to be imported% but because of the program
absolute path value% these entries will actuall# work onl# after
updating the path with the proper local value.
s shown in the picture% each configuration line includes an icon
which color tells the general status of the program% as follows(
blank icon( the configuration refers to a not
existent programs path% so that the entr#
wont work unless the path is corrected.
gre# icon( the hook is not enabled( this
program can be activated b# the DxWnd menu%
but wont be windowed.
green icon( the hook is enabled and the
program will be windowed when run either from
the DxWnd interface or however else.
red icon( the program re/uires code
in$ection% then it will need to be activated
from the DxWnd interface onl#.
9ou can activate command either via the top menu% or b# right
clicking on a row in the application list. 'hese are the
DxWnd is also able to operate iconiAed in the )#stem 'ra#% from where it shows
its state *either "D1G% :GD9 or :=";+ and run a few useful commands.
DxWnd detects the video settings when is started% and compares it to the current
value after killing a task or terminating itself( in case it finds differences%
it prompts #ou asking whether #ou want the previous screen setting to be
restored. 'his is /uite useful to handle all the games that terminates without
restoring the previous setting% as it ma# happen when the# die abnormall#.
-ile N )ave
)aves the current configuration to disk.
-ile N )ort program list
rranges the program list in ascending alphabetical
order *sort+.
-ile N "mport ...
"mports one program configuration from an
external .dxw exported file
-ile N 4lear all logs
'urns all tracing options off for all games in the
list and deletes an# dxwnd.log file.
-ile N ,ook N )tart @ )top ,ook )top is a hand# wa# to prevent DxWnd to do
its $ob% prett# much the same to stop the program%
but leaving it running *in the "D1G state+. ,ook
)tart restores the default behaviour *the :GD9
state% or :="; when operating on a task+.
-ile N !rocess N !ause
'ries to pause the program b# lowering each thread
priorit# to the minimum.
-ile N !rocess N :esume
:estore threads priorities.
-ile N !rocess N ill
ills the last process activated b# the DxWnd
interface. Oer# useful to get rid of games gone
craA# because of DxWnd that refuse to terminate
themselves.
-ile N Desktop color
depth N 8 @ > @ 2? @ 32
E!!
n recent platforms% low color depths are no longer
supported for the desktop% though still working.
'his menu let #ou ask the s#stem to set the current
color depth to 8% >% 2? or 32 bits per pixel. f
course% it is possible that some color @ resolution
compinations are not supported.
-ile N Move to 'ra#
Move DxWnd in the )#stem 'ra#% where a dedicated
icon will show its state and allow a few commands%
including the possibilit# to show the application
window again.
ote that once DxWnd goes in the )#stem 'ra#% it
alwa#s sta#s there also when it is made visible
again.
-ile N ePit
Gxits DxWnd. Eeware that if a game was activated
while DxWnd was active% it will ver# likel# crash
after the DxWnd termination% so a check is made and
#oud be prompted to confirm the operation.
Gdit N :un
)tarts the currentl# selected application
Gdit N Modif#
pens the configuration panel to set@change the
selected program settings
Gdit N Delete
Deletes the selected application entr# *asking a
9es@o confirmation+
Gdit N dd
"nserts a new application entr# in the list. 'he
configuration panel is opened to let #ou define the
initial settings.
Gdit N Gxplore
pens Microsoft Gxplorer to the folder where the
application is located. 'his is a shortcut to
something usuall# useful.
Gdit N 1og N Oiew
pens the dxwnd.log logfile of the selected
application% if existing. Eeware that in order to
do so% #ou should Cassociate the log file
extension to #our preferred text editor before.
Gdit N 1og N Delete
Deletes the logfile of the selected application% if
existing.
,elp N bout
)hows the program version and references the
development team and pro$ect supporters( currentl#
)-EF whoever he@she might be% ;, *that is m#self+%
ll# for having developed both ll#DE; and the
disassembl# librar# "m using and /rit for so man#
hints% informations and pieces of code.
Oiew N )tatus
'his command shows a status window with
informations about DxWnd and the hooked program.
Oiew N 'ime )lider
)hows a time slider window that can be used to
know and d#namicall# alter the time flow speed
When right5clicking on the programs list% instead% the following
menu will be shown(
:un
ctivates *run+ the selected task. )ame as double5
clicking on the list entr#.
Modif#
)hows and let #ou change the programs
configuration.
entr#.
dd
!rompts for all data needed to dfine a new task in
the list.
Gxplore
pen a window explore session pointing to the
programs configurated install path.
1og N Oiew
)ame as Gdit N 1og N Oiew
1og N Delete
)ame as Gdit N 1og N Delete
Gxport ...
Gxports the highlighted program configuration to a
file
ill
ills the corresponding program. Differentl# from
the -ile 5J !rocess 5J ill command% this command
would not kill the currentl# active program% but
the selected one% no matter whether it was managed
b# dxWnd or not. 'his is the reason wh# sometimes
the first ill command ma# fail and this one is in
general more reliable% at the cost of selecting the
proper entr#.
DxWnd in the System Tray
nce #ou move DxWnd in the s#stem tra# and until the program is
terminated% an icon will be visible in the s#stem tra#. :ight5
clicking on the icon% #ou get a subset of the DxWnd commands% plus
the )how command that shows the DxWnd window again. 'he )how
command is the menu default% so #ou can activate it also b#
double5clicking on the DxWnd tra# icon.
:GD9 state( DxWnd is read# to hook a program
"D1G state( DxWnd is running% but will not affect an# program
The coniguration panel
'hrough the dd or Modif# command% this tabbed panel will be
shown(
Gach panel defines the configuration for an# given programs
characteristics.
the !ain ta"#
ame( 'he user defined program name% to allow #ou to label #our application with an evocative naming% possibl# including /ualifiers% versioning etc.
"f unset% DxWnd will insert here the task filename. !ath( 'he pathname of the task to be activated @ hooked.
1aunch( "n some cases% the program to be hooked cant be run b# launching itself directl#% but needs arguments or other envoronment elements provided b# some frontend father program. 'o simplif# the program activation% the frontend pathname can be written here( when set% the run command does not run the path in the field above% but this one. Module( "n some occasional cases% some dlls ma# get unnoticed to the DxWnd
hooking logic. "n these fortunatel# rare cases% #ou have a chance to make the program working b# referencing here one or more modile names to be added at the DxWnd search algor#thm.
,ook enabled "f this flag is not set% DxWnd ignores the task 5 see gra# icon Do not notif# on task
switch
"nhibits the task switch notification message that ma# hurt some games not designed to handle it properl#
o banner Well% DxWnd celebrates itself a little b# showing a ver# short splash screen at the beginning. "f #oure not happ# with this% checking this flag will disable the show.
:un in window 4hecked b# default% tells DxWnd to tr# to run the program in windowiAed mode% that is the essential reason wh# DxWnd exists. Eut if not checked DxWnd still performs all other functions not related to the screen siAe% such as time stretching% compatibilit# options and so forth. ,ook all D11s 'he original DxWnd behaviour was limited to search Q hook calls made b#
the main program directl#. 4hecking this flag cause DxWnd to recurse in all non5s#stem D11s address space to hook calls there. "ts necessar# in all cases where the graphic engine is not directl# coded in the program% but its implemented in a separated engine D11.
,ook pen;1 Gnables pen;1 !" hooking
:emap 4lient :ect Gnabled b# default% makes DxWnd remap the window client coordinates so that the program receives the same values as if the program was running in fullscreen mode.
,ot patch *obfuscated "'+ 'he original DxWnd used "' patching to redirect !" calls to the altered routines. 'his method has its advantages% but fails when not all !" are reached because the# are located in unconnected dlls% referenced b# ordinal number or referenced b# programs with obfuscated "'. "' obfuscation is a sophisticated but common enough techni/ue to make hackers life harder( for instance% the game executable of Doom """ has an obfuscated "'.
4hecking this flag cause DxWnd to use an alternate patching techni/ue% that is the Rhot patchingR that creates a detour assembl# code right at
the beginning of the !" implementation. nce done GOG:9 )";1G 411 gets intercepted no matter from where the call is made% but it isnt alwa#s possible to appl# this techni/ue.
1uckil#% in the vast ma$orit# of cases% the# both work.
=se D11 in$ection 'he basic hook thecni/ue intercepts the first window creation event. t that time% the program ma# have done unwanted actions alread#% such as changing video mode or detecting bad conditions or crashing. 4hecking this flag cause the DxWnd logic to be Rin$ectedR right at the beginning of the task execution% making DxWnd able to intercepts all events. 'he drawback is that this onl# works when the task is activated from the DxWnd interface S see red icon.
nother drawback is that the in$ection process resembles prett# much of an activation from a debugger% increasing the chances for game
protections to intercept this situation and stop the program.
,ook child Window!roc E# default% DxWnd intercepts the Window!roc routine of the main window% and this is enough for its purposes. "n some cases% though% this is not enough and this flag tells DxWnd to intercept and redirect the
Window!roc routines of all child windows as well.
ptimiAe 4!= *DirectP 5F+ ptimiAes the 4!= load% but onl# for ddraw operations *DirectP to DirectPF+
eep aspect ratio When the window is resiAed% the aspect ratio set b# the window initial siAe is preserved *b# default the ?(3 aspect ratio such as 800x>00+. Window initial position Q
siAe
-our values for the initial P% 9 coordinates of the upperleft window corner and the window width and height. ll values are referred to the window client area rather than the outside border. 'he values are used depending on the !osition selection
!osition selection of ? possible cases(
• P% 9 coordinates( the window is placed at the chosen
coordinates
• Desktop center( the window is centered on the screen% and onl#
the width and height fields are used.
• Desktop work area( the window occupies the whole screen but the
bottom taskbar.
• Desktop( the window occupies the whole screen% as if it was
the $ideo ta"#
-ix Window -rame )t#le "nitialiAes the game window with a title bar and resiAeable borders. !revent Win MaximiAe )ome modern games dont actuall# go in fullscreen mode% but $ust make
the window occup# the whole screen. 'he option intercepts Windows messages and user32 calls to avoid changing the window position and siAe to make it a full5screen window.
1ock win coordinates "ntercepts messages and calls that the program makes to himself to chenge its own window coordinates. "n this wa#% though% the game window becomes fixed in position and siAe.
1ock win st#le "ntercepts messages and calls that the program makes to himself to chenge its own windowst#le.
:ecover screen mode )ets the screen mode to registr# default settings. "n general% DxWnd intercepts an# attempt to change displa# settings and prevents
unwanted operations% but still some programs have displa# settings instructions before DxWnd could possibl# intercept them *e.g. before the window is created and the windows hook is invoked+% so that chaanging the displa# settings right after is the onl# possible solution. 'r# this when other options dont work.
:efresh on win resiAe n# decentl# written windows application should take care of refreshing the screen primar# surface when resiAed% and most
fullscreen games do it. )ome dont *the# were not suppoed to ever be resiAed% actuall#+. 'his flag is to force a refresh *useful for C=prising+.
-ix !arent Window '#picall#% a game is started with an invisible program window% and then created a separate and child window for handling the graphic. )ome games dont use the child window% but the# rather use the parent one. "n this case% the parent window becomes visible% then needs to be properl# resiAed. "ts experimental% for now% but seems to be able to manage successfull# several tough games( )olaris% )leepWalker% )id Meiers )im ;olf% the Worms serie....
Modal )t#le When R-ix Window -rame )t#leR is set% a borderless and titleless modal st#le is chosen instead of the default one.
-orce win resiAe Gxperimental *and not working ver# well so far+( should force the processing of window resiAing messages so that the window can be resiAed b# dragging borders.
,ide multi5monitor config Makes the program ignore that there are multiple monitors in #our s#stem configuration% giving informations about the primar# monitor onl#.
Wallpaper mode Gxperimental S forces the program T5order to the lowest level so that it runs below an# other task% like an active wallpaper.
window border. "t activates a small trick that cause the program to render to a child modal surface within the main window borders. Dont move DUD rendering
window
)uppress child process creation
)uppressing the birth of child processes is necessar# whenever the task is running child processes as video pla#ers% splash screens or similar things. "n this case% hooking more than one process ma# be difficult and not worth the result.
,ide desktop background )tarts the windowiAed program together with four black borderless windows that surround it entirel# giving a better feeling of concentration. 'he whole idea was borrowed from RMr. ,ideR( https(@@sourceforge.net@pro$ects@mrh#de@
)imulate 8E!! desktop )ome games pretends #ou switch the video mode to 8E!! before #ou activate them% making it useless the 8E!! emulated mode. 'his flag $ust let the program believe that the desktop setting is in 8E!! mode alread#.
)imulate >E!! desktop )ame as above% but declaring a >E!! setting. 'hese two flags should not be set together.
-orces >E!! desktop "n some cases% the game reall# needs a >E!! desktop% but does not contain the code for activate this color depth% and on modern platforms% though supported% it is ver# difficult *WinF+ when not impossible *Win8+ to do it manuall#. 'his flag switched the desktop to >E!! before the game would complain.
)imulate EW monitor ctivate a tweak in the palette handling that causes all colors to be replaced with the corresponding gra#scale color. "t works onl# on 8E!! palettiAed games or emulating >E!! on a 32E!! desktop.
)et >E!! :;E7>7 encoding E# default% DxWnd emulates >E!! color with :;E777 encoding. 'he
option forces :;E7>7. 'hi option% of course% impacts the video onl# in emulation mode and for >E!! color depth.
1ock )#s 4olors
Disable setting gamma ramp Disables !" tr#ing to alterate the default gamma ramp making the screen lighter or darker. )ince there !" affect the whole screen% this flag is mainl# useful to avoid the background desktop to be affected.
)creen resolution ffects the resolutions detected b# the application. 'here is a choice of the following values(
• )O; modes( the classic ?(3 screen resolutions starting from
320x200 up to 280x800
• ,DM" modes( the t#pical >(6 resolutions from >?0x3>0 up to
680x080
• Monitor native modes( whatever returned from the video card
otice that 320x200 resolution is t#picall# no longer supported% but it is not a problem to emulate it in window and this resolution is necessar# to run some older games.
1imit resolution Disables an# resolution higher than the selected value. E# default% the choice is RunlimitedR% that means no resolution is disabled.
the Input ta"#
4ursor ,andling
,ide cursor -orces hiding the hardware cursor. )how 4ursor -orces showing the hardware cursor.
4orrect mouse position 4ompensate for P%9 mouse coordinates when the window is moved or resiAed. "t should be t#picall# set for most games.
Window frame compensation "n some cases% mouse P%9 coordinates appear displaced of the same amout as the window border *top and left+. 4hecking this flag causes DxWnd to subtract this value and recover the error.
-orce cursor clipping )et hardware cursor clipping within the windows region. "t greatel# improves the game pla#abilit# in some cases *namel#% the Dungeon eeper series+
eep cursor within window void moving the cursor outside the window area. Doing so was used as C4ursor -- directive in some games.
eep cursor fixed "nhibits the )et4ursor!os*+ !"( in some cases% it affects the programs behaviour *e.g. Cecrodrome+.
"ntercept ;D" cursor clipping
Disables ;D" clipping% avoiding unpleasant effects such as the mouse that is not free to move within the whole window.
Message processing Most programs get P%9 mouse coordinates from the mouse messages or from the specific !". ne trick# wa# to get the same info% though% is to listen from the windows message /ueue using !eekMessag @ ;etMessage% and retrieve the P%9 coordinates from 9 received message in the pt field. 4hecking this box make DxWnd to fix the P%9 coordinates on this uncommon situation as well *see C=prising+.
-ix WML4,"''G)'
)low down mouse polling )ome old programs have this bad habit to continuousl# loop through the mouse status polling with no dela#% using 00< of 4!= time. 'his flag introduces a minimal and unnoticeable dela# between mouse polls% saving most of 4!= time.
:elease mouse outside window
ormall#% when the mouse is placed outside the window and the window keeps receiving mouse messages% the mouse cursor is placed on the
corresponding window border and the program performs video scrolling or so forth. 'he re are some cases in which #ou dont want this to happen% for instance when #ou want to use two programs alternativel#% such as a game and a ke#board simulator.
4hecking this flag causes DxWnd to detect the mouse outside window condition% and in this case it places the cursor right in the middle of the screen% where it is supposed to make no harm.
e#board ,andling
Gnables hot ke#s DxWnd can set some special ke#s *lt5-n+ to trigger special actions% storing the ke# association in the DxWnd.ini file.
'his flag enables the hot ke#s definitions. "f unchecked% all hot ke#s are disabled for this program.
"ntercept lt5-? ke# "ntercepts the lt5-? ke# in the message processing loop to immediatel# terminate the program% avoiding an# programmed exit procedure *out5tro% savegame warnings% ads...+. f course% "- the game is doing the message processing loop
Message ,andling
-ilter offending messages "n theor#% a fullscreen message should not expect several messages that are impossible to receive% such as border siAing% taskbar events and so forth. )ome programs are not properl# coded to react to such
RimpossibleR messages and ma# show falfuncions. 'his flag causes potentiall# harmful and meaningless messages to be suppressed. !eek all messages in /ueue
Direct"nput
Direct"nput ,ooking Gnables hooking on Direct"nput methods
"nitial coord. "nitial coordinates for the Direct"nput mouse coordinates
P% 9 range :ange of P% 9 values *min Q max+ that is permitted for the mouse coordinates when detected b# Direct"nput methods.
the Timing ta"#
-rame per )econd
-rame per )econd 5 1imit "ntroduces a configurable dela# between screen refresh operations% so that the -!) is limited accordingl#
-rame per second S )kip "ntroduces no dela# in the screen operations% but skips several screen updates so that the actual -!) value is limited without the program noticing it
-rame per second S dela# *msec+
'he dela# expressed in milliseconds to be used either for 1imit or )kip operations
)how -!) on title When checked% the -!) counter is appended to the window title
)how -!) overla# When checked% the -!) counter is drawn as an overla# of the program client area% in a corner of the screen and periodicall# and randoml# moved to other cornes to avoid accidentall# overlap an important screen region.
'ime stretching
'ime )tretching S initial( "f this option is checked% DxWnd tries to emulate an accelerated *x n+ or decelerated *(n+ time flow. 'he value set in the listbox is the initial value% that can be altered b# means of the time control slider in the time panel. When checked% DxWnd stretches time in timing !" such as ;et)#stem'ime*+% the /uer# performance !"s and the )leep !"s% that are the most used wa#s to control a program timing. )how time stretch When checked% the time stretch ratio is drawn as an overla# of the
program client area% in a corner of the screen and periodicall# and randoml# moved to other cornes whenever it is updated.
-ine time ad$ust When checked% the time stretch ratio coarse becomes finer% from a .7 *70<+ratio to a . *0<+ ratio for each tick. 'his allows a better and finer control of timing% despite the more limited range *about 0.7x up to 2.0x+
"ntercept :'D)4 opcode 'he platform performance counter should be determined b# calling the Vuer#!erformance4ounter*+ !". Eut there is a more direct wa#% that is calling the assembler :D')4 famil# instructions. When checked% DxWnd looks for :D')4 and :D')4! intructions b# disassembling the program text segment and replaces them with stretcheable time counters. )tretch timers When checked% the window timers are stretched% namel# the user32.dll
timers set b# )et'imer and the multimiedia timers in winmm.dll set b# time)etGvent*+
the %og ta"#
Gnable 'race 'his works as a global flag that enables@disables all subse/uent traces.
"f unchecked% no output is written.
"f checked% error messages% plus the specific messages related to other flags *see below+ are written in the dxwnd.log file in the programs execution director#.
DxWnd hacks Gnables the operation logging of all significant events that DxWnd performs to bring the fullscreen program in windowed mode.
DirectDraw trace Gnables the operation logging of DirectDraw operations Direct3D trace Gnables the operation logging of Direct3D operations
DirectP full trace Gnables extended logging of all DirectP operations% no matter whether the# are related to fullscreen @ windowed mode or not.
Win Gvents Gnables logging of all Window messages intercepted in the
applications /ueues% together with events that are generated or processed internall# b# the !eek@;etMessage !"s.
4ursor @ Mouse Gnables extended logging of all cursor or mouse related operations. EGW:G some old games dont mind the possibilit# of concurrent use and perform mouse@cursor operations in close loops% so that this t#pe of log can /uickl# grow /uite big in siAe. "n this case% consider the possibilit# to slow down the program b# using the C)low Down flag.
"mport 'able Gnables extended logging of the "mport 'able as seen b# the DxWnd program.
'his can be /uite useful to anal#se and troubleshoot uncommon executables *e.g. when cop# protections are applied+.
Debug Writes some more detailed information for diagnostic purposes. :egistr# op. Gnables the operation logging of registr# operations
The Direct& ta"#
DirectP Oersion ,ook )ets the basic intervention strateg#( depending on the game
technolog#% a different hooking techni/ue should be adopted. utomatic tries to find it b# itself% but it doesnt alwa#s succeed pen;1 handling re/uire a dedicated setting *see libs tab+
Gmulation Defines the basic surface emulation strateg#( either R 'oneR *the program controls the desktop color depth+% R (rimary )uerR *same as none% but blit operations are made against a memor# surface and then transferred to the real primar# surface S this handles the otherwise known pich5bug problem+ or R(rimary SuraceR *the virtual primar# has a different color depth of the real primar#% and DxWnd takes care of the color transformation internall#( slower but no screen mode
changes+.
'he R Automatic modeR uses a ver# simple strateg# for Direct3D games( it tries the R(rimary SuraceR mode first and% if that doesnt
succeed% switches to R%ocked suraceR. "t is the best strateg# " came across% but it doesnt alwa#s work
uto primar# surface refresh
)ome badl# programmed games *namel# the R4ossaksR series+ dont follow the specification to blit changes on screen% the# $ust get the primar# surface memor# address and keep writing there. 'he option forces a periodic blitting of the primar# surface on screen even if the game doesnt re/uest it. 9ou want a second example& "t has not been eas# to find% but R4rush DeluxeR suffers the same problem.
O"DG N )9)'GM )urface on fail
When this option is set and a 4reate)urface fails because of video memor# shortage% DxWnd backs this up b# creating the surface on
memor#. ddl# enough% some games expect to notice this b# themselves and work correctl# onl# when the option is ' set.
)uppress DP common errors )ome games running in windowed mode generate sporadic errors that wouldnt prevent the game to work% but terminate the application. 'his option makes directx methods return condition in such common cases. Make Eackbuf attachable lters the siAe specification of the created backbuffer so that it
copes with the actual primar# surface% so that it ma# be attachable to a TE=--G: surface. "t makes CDave Mirra -reest#le EMP pla#able.
Elit from Eackbuffer )ome games *the )ims% the onl# one so far....+ read graphic data from the primar# surface. When the game runs windowed% the approximation introduced in a scaled window brings cumulative error that appear as a progressive RsmearingR effect. "n this case% it might be better to read the data from the backbuffer surface that is not scaled% even if in such a wa# #ou get other troubles when scrolling *see it b#
#ourself...+. 'he onl# reasonable alternative( write game code in a better wa#% in m# opinion
4ompensate -lip emulation
)uppress clipping DxWnd sets clipping on the primar# surface. "f the game does it as wa#% there might be interferences. s a matter of fact% setting this flag is the onl# wa# to make R!ax "mperia Gminent DomainR working correctl#.
-ull :G4' blit 4auses ever# blit operation to primar# surface to be applied to the full surface *=11 rect coordinates+. "t could be hand# to recover wrong surface handling% but this situation should be classifies more properl# as a DxWnd E=;
!alette update dont blit void executing a plit operation in case of palette update. 'his could be used to fix conflicts between ;D" and ddraw palette updates
)et G: compatible mode Vuite useful in Windows Oista to Win8 platforms% forces the program to declare its compatibilit# with G: desktop mode% avoiding then the switch from G: to standard desktop mode.
-orces ,G1 -orces ,ardware Gmulation 1a#er WinF color fix
Dont fix the !ixel -ormat Do not tr# to fix the surface pixel format E# default set no
1!,4,G1
-ix ddraw ref counter Decrement the reference counter of some ob$ects to keep in proper account all service ob$ects created internall# b# DxWnd
:eturn 0 ref counter :eturns alwa#s a 0 reference counter when a surface @ directdraw session is released
the %i"s ta"#
;D"
o ;D" handling Disables video5related ;D" @ user32 !" hooking
)caled ;D" calls )cales ;D" !" coordinates to fit the window stretching Gmulated Device 4ontext ,andle an emulated ;D" D4
Map D4 to !rimar# )urface =se the ddraw primar# surface D4 for ;D" operations
)cale font parameters 'ries to scale font parameters to fit the window stretching
;lide *3D-P+
,ook ;lide libs Gnables ;lide !" hooking
pen;1
,ook pen;1 Gnables pen;1 !" hooking
-orce ,ook Gxperimental S probabl# unnecessar#
4ustom pen;1 librar# E# default% DxWnd detects pen;1 !"s within the standard pen;132.dll librar#. 'he field allow to set a different filename for an# custom pen;1 implementation that ma# refer to a different librar# name.
the *omapti"ility ta"#
-ake Oersion 4auses the program to detect the chosen Windows release. otice( this is not the same thing as the compatibilit# setting of the Windows properties panel% that also ad$ust the s#stems behaviour to emulate the chosen platform.
'weaks
)uppress d3d6 extensions D3d6.dll comes in different versions depending on the platform( on older windows releases it exports the Direct3D4reate !"% while in more recent versions there are man# further exported calls. 'he flag suppresses the additional entries.
'extures not power of 2 fix 4lean TE=--G: X0.0 fix 4lean TE=--G: X.0 fix E#pass font unsupported api )et single core process affinit#
)uppress d3d6 extensions
)uppress "MG 'he flag tries to suppress "MG windows% though that is not full# working #et
,andle exceptions )etting this flag causes DxWnd to set its own exception handler that tries *and often succeds+ to fix sevral common exceptions such as the divide b# Aero exception of old games that were tr#ing to calculate the 4!= speed.
1imit available resources Makes the /uer# for available resources *either :M% hard disk free space and so on+ to return a limited value( some old games cant handle a ver# big integer number and see it as a negative value% refusing to start.
:egistr#
Gmulate registr# "ntercepts registr# read operations so that missing entries are replaced b# the values in DxWnd.reg file
verride registr# "ntercepts registr# read operations so that missing and exixting entries are replaced b# the values in DxWnd.reg file
"@ 'weaks
-ix buffered "@ after Win8 )et 4D:M Drive '#pe
,ide empt# 4D:M drives
3D Gffects
Disable 'extures :emap all textures with a white texture *D3D onl#+.
3D wireframe s a fanc# and eas# action that DxWnd ma# implement on D3D and pen;1 programs *not ddraw ones+% checking this flag will show the graphic in wireframe mode.
DxWnd Status
'he DxWnd status shows the following information% refreshing them
periodicall# each one second(
DxWnd version( in the picture% the current one( 2.0.F8
,ook status( either "D1G% :GD9 or :="; *see tra# icons+
when running(
:unning( the task name *see the configuration panel+
)creen K *width x height+ colordepth% as seen b# the task
-ull)creen K 9es@o depending whether the task has set the cooperative level to
GP41=)"OG or not
DP Oersion K version of the DirectDraw @ Direcr3D interface currentl# in use
*namel#% the one used to create the primar# surface+.
1ogging K the logging flag *either or --+
4ursor K the P%9 cursor coordinates as intercepted and fixed b# DxWnd
-!) K frame per second value calulated b# DxWnd
Time Slider
'he 'ime )lider shows the current time stretching value%
refreshing it periodicall# each one second. "t also allow the user
to alter the time stretching factor b# grabbing the slider *click
on the slider with the left button and keep it pressed+ and moving
it to left or to right(
'he time stretching factors shown below the slider are related to
the coarse *default+ time resolution. "f the fine time ad$ustment
flag is set% the leftmost slider position corresponds approx. 'o
x2 and the rightmost to approx. (2
DxWnd (alette
'he DxWnd !alette shows the 27> colors in the current emulated
palette% refreshing them periodicall# each one second(
dxwnd+ini coniguration ile
'he dxwnd.ini configuration file holds the DxWnd almost complete
configuration *some registr# tricks need the dxwnd.reg file with
registr# tweaks...+% but needs no manual editing since almost all
the information in there comes form the DxWnd ;=".
'here are a few exceptions that need to be known so that $ust in
case #ou can manuall# edit them.
,window-
section(
langK
<specification>)ets the DxWnd ;=" language. 4urrentl# supported
languages are onl#
G S english *default language+
4 S chinese
"' S italian
When #ou set a langK
<XX>specification DxWnd looks for
and loads the resources in the :esourcesL
<XX>.dll file%
so an#one could build and use his own language pack.
langKdefault disables resource loading and the program
uses the default and built5in english pack.
langKautomatic makes DxWnd search for the current ="
language and tr# to map it to the available language
packs. "f no corresponding pack is available% it
switches to the default *english+ behaviour.
'his setting is alwa#s overridden b# a @langK
<XX>argument line specification.
posxK
<x0>pos#K
<y0>siAxK
<sizX>siA#K
<sizY>'he DxWnd window position and siAe. Whenever #ou move @
stretch the ;="% the new coordinates are stored here.
,
keymapping-
section(
timetoggle=0xnn altf4=0xnn timeslow=0xnn timefast=0xnn ...)ets the DxWnd hot ke#s mapping *see next paragraph+.
'he available values represent the hex ke# code and
range from 0xF0 *lt5-+ to 0xF4 *lt5-2+.
'hese are the available hot ke#s(
timetoggle:
toggle time stretching on Q off
altf4:
terminate the program% such as t#ping lt5-?
timeslow:
decrease time speed
timefast:
increase time speed
cliptoggle
( toggle cursor clipping on Q off
refresh
( do a screen refresh
logtoggle
( toggle logging on Q off
fpstoggle