REQUEST: Port Half-Life SDK Extension DLLs CLEANLY to Windows CE
Sega Dreamcast Development and Researchtest
hl.dll only two errors left
Client.dll util.cpp works, the _M_PI_ external object error from before was because I didn't have pm_shared.c, pm_debug.c, and pm_math.c. The syntax error is a compiler issue, it doesn't like that function for some reason. I say we comment it out and add a TODO in the file or SDK README, because I ran into that error before with this, it's an issue with combining C and C++ and the compiler doesn't like that function

Client.dll util.cpp works, the _M_PI_ external object error from before was because I didn't have pm_shared.c, pm_debug.c, and pm_math.c. The syntax error is a compiler issue, it doesn't like that function for some reason. I say we comment it out and add a TODO in the file or SDK README, because I ran into that error before with this, it's an issue with combining C and C++ and the compiler doesn't like that function
example:
extern "C" int your_func(void param);
test
It takes care of the errors in hl.dll
_PM_Move/_PM_Init/_PM_FindTextureType are because hl.dll also needs pm_math.c/pm_shared.c/pm_debug.c. So I added them
When I comment VectorScale() out, it compiles, but pm_shared gives a couple more unresolved externals
If you have the Windows CE Dreamcast SDK I can send you the source trees if that's easier
_PM_Move/_PM_Init/_PM_FindTextureType are because hl.dll also needs pm_math.c/pm_shared.c/pm_debug.c. So I added them
When I comment VectorScale() out, it compiles, but pm_shared gives a couple more unresolved externals
If you have the Windows CE Dreamcast SDK I can send you the source trees if that's easier
i'm linux user 
my compiler GCC

my compiler GCC

Should the last errors in client.dll be finished before worrying about the linker errors? Not including pm_math/VectorScale()
send me source code
client.dll --> hldc_dlls\new\cl_dll\
hl.dll --> hldc_dlls\new\dlls
http://hldc.dreampipe.net/sdk/hldc_dlls-dev-0.8.zip
I'm going to separate the old and new source branches in the hldc-sdk after this is finished, but for doing this I just kept everything in one folder
pm_etc.c is in \new\pm_shared folder
hl.dll --> hldc_dlls\new\dlls
http://hldc.dreampipe.net/sdk/hldc_dlls-dev-0.8.zip
I'm going to separate the old and new source branches in the hldc-sdk after this is finished, but for doing this I just kept everything in one folder
pm_etc.c is in \new\pm_shared folder
Another noteworthy thing is the CEAPISpy would compile except for 7 undeclared identifiers that according to MSDN are supposed to be defined in commdlg.h and winuser.h and were included in the standard WCE library since WCE 1.0. But they're left out in both headers in the WCE Dreamcast SDK
So then it'd just be a matter of modifying it to call the Initialize() function in client.dll unless I don't understand DLL injection and it's not that simple
So then it'd just be a matter of modifying it to call the Initialize() function in client.dll unless I don't understand DLL injection and it's not that simple
Why don't we make this a GitHub project? It will be a lot easier than going back and forth like this.
I'll start putting it up there now. Might take me a few minutes to get the new folder structures and make sure the project files still work
GitHub is all done
https://github.com/FaucetDC/hldc-sdk
I thought the DLL Injector needed a cool name, En4CEr (Enforcer) suits it well
@Trident6 @megavolt85 (and anyone else) you guys just have to send me your usernames and I'll add you to the contributors
OldSourceCode\dlls\hl\hl.dll gave me new weird compiler errors it didn't give me before after I made the folder structures for everything. I'll take a look at that tomorrow, it's 3am now
Edit: Fixed, updated with working oldsourcecode\dlls
Edit 2: 12/19: I thought this is useful info regarding using the HL2 beta to help re-implement things that might be missing later down the line
http://half-life.wikia.com/wiki/Half-Life_2_Beta
Edit 3:
Added 4 missing files to the sourcecode\cl_dll\client\client.dsw
sourcecode\cl_dll\hl\hl_baseentity.cpp
sourcecode\cl_dll\hl\hl_events.cpp
sourcecode\cl_dll\hl\hl_objects.cpp
sourcecode\cl_dll\hl\hl_weapons.cpp
All compiled fine without modification, but you have to copy the "sourcecode\common" folder to the directory underneath WCE Dreamcast SDK include directory (C:\WCEDreamcast\common)
Pushed to git
https://github.com/FaucetDC/hldc-sdk
I thought the DLL Injector needed a cool name, En4CEr (Enforcer) suits it well
@Trident6 @megavolt85 (and anyone else) you guys just have to send me your usernames and I'll add you to the contributors
OldSourceCode\dlls\hl\hl.dll gave me new weird compiler errors it didn't give me before after I made the folder structures for everything. I'll take a look at that tomorrow, it's 3am now
Edit: Fixed, updated with working oldsourcecode\dlls
Edit 2: 12/19: I thought this is useful info regarding using the HL2 beta to help re-implement things that might be missing later down the line
Edit 3:
Added 4 missing files to the sourcecode\cl_dll\client\client.dsw
sourcecode\cl_dll\hl\hl_baseentity.cpp
sourcecode\cl_dll\hl\hl_events.cpp
sourcecode\cl_dll\hl\hl_objects.cpp
sourcecode\cl_dll\hl\hl_weapons.cpp
All compiled fine without modification, but you have to copy the "sourcecode\common" folder to the directory underneath WCE Dreamcast SDK include directory (C:\WCEDreamcast\common)
Pushed to git
Didn't want to triple post, but there's a slight problem
Tried commenting out some stuff just to get the newer branch of client.dll compiled, and got over 6000 linker errors for the VGUI stuff, the problem is VGUI.lib is closed source and can't be ported to WCE. It MIGHT be in the HL2 2003 leak, I only looked briefly for it
Excerpt about VGUI in an Xash3D article
http://pandoralive.info/?p=5043
This might not even be an issue, there's 0 references to VGUI in the HLDC binary disassemble (going to look at the ASM in greater detail soon to trace into the references of client.dll). So it's very likely the code for the VGUI wasn't used at all in the Dreamcast port, so again this probably isn't an issue
One good thing about this though, is the reverse engineer of Counter-Strike 1.6 client.dll doesn't use VGUI either
I'll remove everything pertaining to VGUI tomorrow
Though if removing the VGUI stuff breaks the code and actually can't be compiled, then the Counter-Strike 1.6 client library can be used in combination with the 'OldSourceCode' that is already ported as the base for the Dreamcast SDK. Which would be a non-issue as long as there's no Xash3D specific stuff. Source SDK base i'm pretty sure is CS:S anyhow
Tried commenting out some stuff just to get the newer branch of client.dll compiled, and got over 6000 linker errors for the VGUI stuff, the problem is VGUI.lib is closed source and can't be ported to WCE. It MIGHT be in the HL2 2003 leak, I only looked briefly for it
Excerpt about VGUI in an Xash3D article
This might not even be an issue, there's 0 references to VGUI in the HLDC binary disassemble (going to look at the ASM in greater detail soon to trace into the references of client.dll). So it's very likely the code for the VGUI wasn't used at all in the Dreamcast port, so again this probably isn't an issue
One good thing about this though, is the reverse engineer of Counter-Strike 1.6 client.dll doesn't use VGUI either
Though if removing the VGUI stuff breaks the code and actually can't be compiled, then the Counter-Strike 1.6 client library can be used in combination with the 'OldSourceCode' that is already ported as the base for the Dreamcast SDK. Which would be a non-issue as long as there's no Xash3D specific stuff. Source SDK base i'm pretty sure is CS:S anyhow
looking forward for a new compiled gdi or cdi of this new source code
Updated En4CEr in the SDK to mostly compile. All the sources will compile, but there's only 2 linker errors. One redefinition, which I want to leave it unmodified so I'll leave it alone and let someone who knows what they're doing fix it, and one unresolved external symbol
Once it compiles though, it has to be slimmed down to run silently (No GUI, performs needed task in the background and closes), and adapt it to inject client.dll
https://github.com/FaucetDC/hldc-sdk
Once it compiles though, it has to be slimmed down to run silently (No GUI, performs needed task in the background and closes), and adapt it to inject client.dll
https://github.com/FaucetDC/hldc-sdk
Original thread: https://assemblergames.com/threads/request-port-half-life-sdk-extension-dlls-cleanly-to-windows-ce.64408/