+ Ответить в теме
Страница 1 из 3 123 ПоследняяПоследняя
Показано с 1 по 15 из 42.

Тема: Compiling HL-SDK dlls for DC using WinCE Devkit

  1. #1
    Moi
    Moi вне форума
    Dreamer
    Регистрация
    06.10.2010
    Сообщений
    54

    По умолчанию Compiling HL-SDK dlls for DC using WinCE Devkit

    Using custom game DLLs for Half-Life DC?
    =====================================
    Well after inspecting the file structure of HLDC there are no external DLLs to find which means that HL's dlls are statically compiled inside the HalfLifeDC.exe. HOWEVER there are still some possibilities to use third party DLLs with HLDC:

    open
    BARNEY\pak0.pak\liblist.gam

    Код:
    gamedll "dlls\hl.dll"
    makes it clear that it should still possible to load external dlls.
    The question is if it's enough to just add a folder "dlls" inside the Barney folder(Barney\dlls\yourhl.dll)
    or the path must be specified absolutely (CDROM:\Barney\dlls\yourhl.dll)
    ================================================== =========


    Well since the WinCE devkit is easy to find on the web nowadays. I've been trying to compile PC HL SDK source files for DC's WinCe. I had to change the makefile(Single-Player Source\dlls\hl.dsp) for that. I used Sintendo's Makefile as an example to make HLSDK source compile using DC's compiler.


    STATUS: I'm down from >100 complier errors to 2 errors.

    Код:
    --------------------Configuration: DCDCSnes9x - Win32 (WCE SH4) Release--------------------
    Compiling...
    Command line warning D4025 : overriding '/Qsh4' with '/Qsh4r7'
    pm_shared.c
    Linking...
       Creating library WCESH4Rel/SintendoDC.lib and object WCESH4Rel/SintendoDC.exp
    corelibc.lib(pegwmain.obj) : error LNK2001: unresolved external symbol _WinMain
    WCESH4Rel/SintendoDC.exe : fatal error LNK1120: 1 unresolved externals
    Error executing link.exe.
    
    SintendoDC.exe - 2 error(s), 1 warning(s)
    I had to
    -replace calloc() function calls to malloc().
    -change stricmp() to strcmp()
    -in util.cpp put function replacements for time.h, which is not available in wince


    probably some more stuff I don't remember.

    EDIT: Managed to compile hl.dll!
    Последний раз редактировалось Moi; 07.10.2010 в 21:02.

  2. #2
    Dreamer Аватар для Divagante
    Регистрация
    05.11.2008
    Сообщений
    337

    По умолчанию

    stupid question... what can we change by changing HL dlls?

  3. #3
    Moi
    Moi вне форума
    Dreamer
    Регистрация
    06.10.2010
    Сообщений
    54

    По умолчанию

    what can we change by changing HL dlls?
    You can change pretty much everything game logic related. No more changing QC files of the MDLs.
    You can make perfect ports from the PC's single player mods such as HLRally.


    I finally managed to compile a dll. It does not work with the PC version which SHOULD mean that it's compiled correctly for Dreamcast's SH4 CPU while having WinCE libs included.
    Now I need to clean up the code and remove some dirty hacks I used in order to make it compile.
    EDIT: DONE

    The DLL changes the health the player is starting with to 10 health points. And made the game automatically "exec ga.cfg" instead of "exec game.cfg" which should result in an error message.HL does not recognize the new dll
    That's how I did it:

    -compiled hl.dll with minor code changes
    -put it to the "valve\dlls" and "barney\dlls" folders
    -burned a new session to the cdr
    -regular Half Life and BlueShift run with flickering textures from time to time(might be caused by multi session cdr as the game data might take longer to load)

    Possible causes:
    1)Multisession disc - Half Life does not see the dll in the newest session (unlikely, because it worked for maps)
    2)DLL might need to be inside a PAK file in order to work (not tested, might be possible)
    3)DLL might be compiled incorrectly, so after failing to load mine the game loads its own DLL instead(possible, but it should crash as the PC version does)
    4)HL might not be programmed to load external DLLs

    possible solutions:
    1)creating a new cdr every time I need to test the dll
    2)testing
    3)reworking the code
    4)try to hack HalfLifeDC.exe: EITHER replace the dll inside of it with the new version OR adding assembler commands to load external DLLs
    Последний раз редактировалось Moi; 07.10.2010 в 21:41.

  4. #4
    Dreamer Аватар для Divagante
    Регистрация
    05.11.2008
    Сообщений
    337

    По умолчанию

    well, does this mean we can add addons like bots and respawns in a map? this would be a hell of a change in dcmodding!

  5. #5
    Moi
    Moi вне форума
    Dreamer
    Регистрация
    06.10.2010
    Сообщений
    54

    По умолчанию

    Цитата Сообщение от Divagante Посмотреть сообщение
    well, does this mean we can add addons like bots and respawns in a map? this would be a hell of a change in dcmodding!
    Yes everything that is possible on pc would be possible on dc(only limitations would be HLDC's engine and dc's hardware).

  6. #6
    CSDC Developer
    Регистрация
    29.08.2007
    Сообщений
    167

    По умолчанию

    Hey Moi !
    You could upload the dll, i want test it too.
    Which programs you used to compile the wince dll?

  7. #7
    Dreamer Аватар для Anthony817
    Регистрация
    19.08.2009
    Адрес
    Fort Worth, Texas
    Сообщений
    353

    По умолчанию

    Цитата Сообщение от Moi Посмотреть сообщение
    Yes everything that is possible on pc would be possible on dc(only limitations would be HLDC's engine and dc's hardware).
    You are fucking kidding me! Wow! I would love to see some awesome Half Life mods like Heart of Evil: Napalm Editon and Afraid of Monsters!

    This is amazing news for the DC modding scene!

  8. #8
    Dreamer Аватар для Divagante
    Регистрация
    05.11.2008
    Сообщений
    337

    По умолчанию

    Цитата Сообщение от Moi Посмотреть сообщение
    Yes everything that is possible on pc would be possible on dc(only limitations would be HLDC's engine and dc's hardware).
    well, bots for day of defeat for example are addons, maybe we can port them for example? (for now im just thinking bot multiplayer, i think its the next big step we can do)

  9. #9
    CSDC Developer Аватар для OVERRiDE
    Регистрация
    29.02.2008
    Сообщений
    88

    По умолчанию

    Are you using a DevKit to compile for WinCE?
    If you have compiled a .dll for target platform wince/sh4 that is farther than we were able to get in the past.
    We stopped progress when the Paranoia programmer said we needed the source code to DC-HL to make it work.

    That was always a question on the back of my mind; if the programmer can actually compile the dll, can we get it to work with HLDC?

    If you can upload the compiled .dll, we can take a look at it...

    As far as the .pak structure, it really shouldn't matter; files can be loaded from disc directly or from inside a pak file:
    - cdrom\barney\dlls\hl.dll
    - cdrom\barney\pak0.pak\dlls\hl.dll

  10. #10
    Moi
    Moi вне форума
    Dreamer
    Регистрация
    06.10.2010
    Сообщений
    54

    По умолчанию

    Are you using a DevKit to compile for WinCE?
    Official WinCE devikit by SEGA.

    We stopped progress when the Paranoia programmer said we needed the source code to DC-HL to make it work.
    Did he mean the engine code(EXE) or the game code(dlls). I didn't know that Paranoia used a custom HL engine.

    That was always a question on the back of my mind; if the programmer can actually compile the dll, can we get it to work with HLDC?
    Well HLDC's libraries are compiled statically inside the exe which should make the game run faster but is wasteful to the RAM since the libraries are loaded independetly of the fact if they are needed or not.
    The PC version uses libraries which are stored in DLL files so they can be loaded only whenever they are needed. This method saves RAM but is said to be slower since the game needs to allocate and free memory all the time.
    We can only hope that the developers still left the possibility to load DLLs...

    If you can upload the compiled .dll, we can take a look at it...
    zSHARE - Single-Player Source.rar

  11. #11
    CSDC Developer
    Регистрация
    29.08.2007
    Сообщений
    167

    По умолчанию

    I tried the dll with theyhunger with dumy file as Moi said
    The loading times are realy faster than before but HLDC don´t recognized the dll.
    Maybe a console command or another config.file ?

  12. #12
    Game Expert Аватар для tingfung
    Регистрация
    05.05.2008
    Адрес
    Melbourne, Australia
    Сообщений
    68

    По умолчанию

    Цитата Сообщение от Moi Посмотреть сообщение
    Yes everything that is possible on pc would be possible on dc(only limitations would be HLDC's engine and dc's hardware).
    Looking forward to see where this will go. Keep us updated Moi.

  13. #13
    Dreamer Аватар для Anthony817
    Регистрация
    19.08.2009
    Адрес
    Fort Worth, Texas
    Сообщений
    353

    По умолчанию

    Yes please keep us updated, I check these forums almost every day and would love to get my hands on any bit of new info regarding modding HLDC.

  14. #14
    CSDC Developer
    Регистрация
    29.08.2007
    Сообщений
    167

    По умолчанию

    Just one more question Moi !
    If you get the dlls works it will possible online playing too ?
    The client.dll control the online potion of the game, rigth?

    Give a look on this source code "spirit of half life" maybe you can compile...
    Spirit of Half Life mod for Half-Life - Mod DB
    It upgrade a lot features of hl the engine,
    Like: Mp3, reflections, mirrors better lighting, weather like moving clouds, rain, snow, fog and more

    Paranoia source code:
    http://www.moddb.com/mods/paranoia/d...ranoia-toolkit
    It has the most part of spirit of halflife features plus bump-mapping and enchange a lot the human_grunt A.I and add new monsters on game!

    Bots source code:
    http://www.fileplanet.com/32297/0/section/Bot
    http://www.fileplanet.com/44682/4000...-4-Source-Code
    Последний раз редактировалось Dreammatrix; 21.11.2010 в 21:52.

  15. #15
    Dreamer Аватар для Anthony817
    Регистрация
    19.08.2009
    Адрес
    Fort Worth, Texas
    Сообщений
    353

    По умолчанию

    Wow, that is impressive! If the Spirit of Half Life could be used on HLDC, this would be a better game engine for FPS games graphicaly than anything else!

+ Ответить в теме

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Ваши права в разделе

  • Вы не можете создавать новые темы
  • Вы не можете отвечать в темах
  • Вы не можете прикреплять вложения
  • Вы не можете редактировать свои сообщения