Next Generation Emulation banner
1 - 1 of 1 Posts

Linux's worst nightmare..
1,510 Posts
Discussion Starter · #1 ·
Thought this would be a cool thing for people to see. The best way to understand the structure of a program is to look at its dependencies.
Heres a dependency chart for DXBX

It can be very large and confusing so you might wanna
start by ask yourself what happens when the program launches.
In the case of DXBX, There are 3 ways to actually get a game running from the main form

the LaunchXBE procedure calls DXBXMain in an indirect way. LaunchXBE calls
ShellExecute which calls DXBXMain.

// Dxbx uses itself as Xbe Launcher; In this new process, the '/load'-argument
// transfers control to DxbxMain() in our emulation dll, which start emulation:
ShellExecute(0, 'open', PChar(ParamStr(0)), PChar(Parameters), nil, SW_SHOWNORMAL);
Best way I can think of explaining it is DXBX opens up another version of itself
and uses the handle of the original DXBX. The new DXBX starts executing from the DXBXMain procedure. Heres how that looks like:

Hope this gives you a rough idea of how things work behind the scenes.
If ive made any mistakes corrections are appreciated
1 - 1 of 1 Posts