I guessed on the flex and so forth when I noticed some files with the same name but a different extension, never heard of libphysfs, however I found it, makes sense why I have not heard of it since I use a different type of thing for the same purpose in my projects.
And it makes sense why I have never seen that ATI issue, never used that instruction (not entirely sure what it is for, mip-level restriction? I generally handle my own mipmaps). SDL, however, I have had worlds of problems with. Tend to avoid it now if at all possible. If I can get this code-base to compile though, I will test making my own window and just passing SDL the handle to see if that fixes the mouse issue.
As for another profile on the working exe here:
Code: Select all
Module Name 64-bit Total % Timer samples
processr.sys 54.96 22359
warzone2100-clamp_maxlevel.exe 8.19 3331
ntkrnlpa.exe 7.98 3246
3 modules, Total: 28936 samples, 71.13% of total session samples
And yes, apparently processr.sys is just the Idle loop, and I have two cores so it tends to remain about 50%. I am not used to it showing up in my profiles since most things I profile are heavy multi-threaded executables. Always learning something...
Either way, wz2100 itself:
And of the app itself, I need to build with the symbols... (this was taken 30 seconds after the game was launched so it is in the main rendering loop, for thirty seconds):
Code: Select all
CS:EIP Symbol + Offset Thread ID Total % Timer samples
0x5124cf NO SYMBOL 0.17 101
0x5124f5 NO SYMBOL 0.16 96
0x42d2d2 NO SYMBOL 0.13 79
0x5124e2 NO SYMBOL 0.12 73
0x5124d5 NO SYMBOL 0.12 75
0x42a283 NO SYMBOL 0.10 58
0x5124f0 NO SYMBOL 0.09 53
0x5124dd NO SYMBOL 0.09 54
0x58fc70 SDLNet_TCP_Open 0.05 28
9 functions, 16 instructions, Total: 617 samples, 19.91% of samples in the module, 1.03% of total session samples
Most of the time this one is spent inside the kernal though:
Code: Select all
CS:EIP Symbol + Offset Thread ID Total % Timer samples
0x805b19f6 NtFreeVirtualMemory 1.07 645
0x8050080c ZwYieldExecution 0.58 350
0x8053fcf8 KeReleaseInStackQueuedSpinLockFromDpcLevel 0.45 270
0x80544c00 KiDispatchInterrupt 0.29 177
0x80518a28 MmTrimAllSystemPagableMemory 0.27 165
0x80545d0c InterlockedDecrement 0.23 138
0x8051625c MmIsNonPagedSystemAddressValid 0.19 113
0x80616e64 LsaDeregisterLogonProcess 0.18 109
0x8053fcc0 KeAcquireInStackQueuedSpinLockAtDpcLevel 0.17 100
9 functions, 828 instructions, Total: 2067 samples, 54.83% of samples in the module, 3.44% of total session samples
Most of the app time is spent in ATI's OpenGL handling, specifically this one function
Code: Select all
CS:EIP Symbol + Offset Thread ID Total % Timer samples
0x690d6250 atiPPHSN 4.49 2704
1 function, 1326 instructions, Total: 2704 samples, 82.84% of samples in the module, 4.49% of total session samples
Although the app is plenty fast enough as it is (makes sense considering the age), it is only taking up 14.46% of the cpu time over both my cores (double that to about 29% for a single core). On slower computers (more along the lines of when this game was released), it would still fare well, but it is spending most of its time in the OpenGL API, which would hurt it on those older systems.
Considering it is more then fast enough for modern systems, I do not think any real time should be spent on making it faster, just fixing bugs and adding features (and fixing bugs those features will invariably introduce of course). Although you can probably guess what bug I am wanting fixed.

I doubt I will have any more time to work on it for a few days though.
EDIT (new post right before I posted): I think I have everything I need now, already have flex and bison windows builds (what parameters do you use to build your files?), and never heard of quesoglc, will take a look when I get some more time.
I am using Visual Studio 2k3. I own a license to 2k5 standard, however dealing with the 2k5 CRT is not fun the few times I have used it, so I am sticking with 2k3 until I am forced to otherwise. I made my own project by down-grading the 2k5 project so that is all fine, and changed the varidic macro's to something more useful for that compiler. Only build errors/warnings I have right now is that missing header and couple of missing files.
And use the popt method of command-line parsing is by far the best, although I usually use boost::program_options, same command-lin syntax, just a different way of working with it, few more options, less dependencies, and so forth.