Page 1 of 3 123 LastLast
Results 1 to 10 of 21

Thread: Attempt of runnig gamex wrapper on spearhed

  1. #1
    Developer RyBack's Avatar
    Join Date
    Apr 2014
    Location
    In Front of the screen
    Posts
    1,603

    Default Attempt of runnig gamex wrapper on spearhed

    Hi


    I tried to edit the source of the good-old wrapper , well here is the error list :

    Code:
    Current search path:
    E:\MOHAA-SpearHead\mainta\zz_MODS_ALL.pk3 (79 files)
    E:\MOHAA-SpearHead\mainta\pak4.pk3 (59 files)
    E:\MOHAA-SpearHead\mainta\pak3.pk3 (311 files)
    E:\MOHAA-SpearHead\mainta\pak2.pk3 (767 files)
    E:\MOHAA-SpearHead\mainta\pak1.pk3 (6969 files)
    E:\MOHAA-SpearHead/mainta
    E:\MOHAA-SpearHead\main\zzzzzzzzzzzzzzz_Reborn_pak8.pk3 (6 files)
    E:\MOHAA-SpearHead\main\pak6.pk3 (104 files)
    E:\MOHAA-SpearHead\main\Pak5.pk3 (259 files)
    E:\MOHAA-SpearHead\main\Pak4.pk3 (593 files)
    E:\MOHAA-SpearHead\main\Pak3.pk3 (669 files)
    E:\MOHAA-SpearHead\main\Pak2.pk3 (4722 files)
    E:\MOHAA-SpearHead\main\Pak1.pk3 (772 files)
    E:\MOHAA-SpearHead\main\Pak0.pk3 (11175 files)
    E:\MOHAA-SpearHead/main
    
    handle 1: qconsole.log
    ----------------------
    26485 files in pk3 files
    execing default.cfg
    execing buildver.cfg
    execing menu.cfg
    execing newconfig.cfg
    execing localize.cfg
    Config: unnamedsoldier.cfg
    execing configs/unnamedsoldier.cfg
    ^~^~^ Can't find localized.cfg
    couldn't exec localized.cfg
    execing autoexec.cfg
    ^~^~^ Can't find custom.cfg
    couldn't exec custom.cfg
    ...detecting CPU, found Intel Pentium III
    
    ------- Input Initialization -------
    Initializing DirectInput...
    Couldn't set DI coop level
    Falling back to Win32 mouse support...
    ------- Input Initialization Complete ------- 14
    You are now setup for medium mode.
    Winsock Initialized
    Opening IP socket: localhost:12203
    Hostname: Mohab-PC
    IP: 192.168.56.1
    IP: 192.168.1.3
    --- Common Initialization Complete --- 514 ms
    Working directory: E:\MOHAA-SpearHead
    Loading Localization File global/localization.txt
    execing ffa
    g_gametype will be changed upon restarting.
    sv_maxclients will be changed upon restarting.
    ------ Server Initialization ------
    Server: dm/MP_Holland_DM
    LoadLibrary (mainta/gamex86.dll)
    ==== hooked GGA ==== 
    ********************
    ERROR: game is version 12, not 15
    ********************
    ----- Server Shutdown -----
    ==== hooked Shutdown ==== 
    ==== ShutdownGame ====
    but i managed to edit the line 383 of gamex86.c

    so i removed the comment , edit the version , it worked , well , some sort of


    now it loads the function G_initgame , till this line :


    globals_backup.Init( startTime, randomSeed ,123);


    then the server shutsdown:

    Code:
    Current search path:
    E:\MOHAA-SpearHead\mainta\zz_MODS_ALL.pk3 (79 files)
    E:\MOHAA-SpearHead\mainta\pak4.pk3 (59 files)
    E:\MOHAA-SpearHead\mainta\pak3.pk3 (311 files)
    E:\MOHAA-SpearHead\mainta\pak2.pk3 (767 files)
    E:\MOHAA-SpearHead\mainta\pak1.pk3 (6969 files)
    E:\MOHAA-SpearHead/mainta
    E:\MOHAA-SpearHead\main\zzzzzzzzzzzzzzz_Reborn_pak8.pk3 (6 files)
    E:\MOHAA-SpearHead\main\pak6.pk3 (104 files)
    E:\MOHAA-SpearHead\main\Pak5.pk3 (259 files)
    E:\MOHAA-SpearHead\main\Pak4.pk3 (593 files)
    E:\MOHAA-SpearHead\main\Pak3.pk3 (669 files)
    E:\MOHAA-SpearHead\main\Pak2.pk3 (4722 files)
    E:\MOHAA-SpearHead\main\Pak1.pk3 (772 files)
    E:\MOHAA-SpearHead\main\Pak0.pk3 (11175 files)
    E:\MOHAA-SpearHead/main
    
    handle 1: qconsole.log
    ----------------------
    26485 files in pk3 files
    execing default.cfg
    execing buildver.cfg
    execing menu.cfg
    execing newconfig.cfg
    execing localize.cfg
    Config: unnamedsoldier.cfg
    execing configs/unnamedsoldier.cfg
    ^~^~^ Can't find localized.cfg
    couldn't exec localized.cfg
    execing autoexec.cfg
    ^~^~^ Can't find custom.cfg
    couldn't exec custom.cfg
    ...detecting CPU, found Intel Pentium III
    
    ------- Input Initialization -------
    Initializing DirectInput...
    Couldn't set DI coop level
    Falling back to Win32 mouse support...
    ------- Input Initialization Complete ------- 14
    You are now setup for medium mode.
    Winsock Initialized
    Opening IP socket: localhost:12203
    Hostname: Mohab-PC
    IP: 192.168.56.1
    IP: 192.168.1.3
    --- Common Initialization Complete --- 518 ms
    Working directory: E:\MOHAA-SpearHead
    Loading Localization File global/localization.txt
    execing ffa
    g_gametype will be changed upon restarting.
    sv_maxclients will be changed upon restarting.
    ------ Server Initialization ------
    Server: dm/MP_Holland_DM
    LoadLibrary (mainta/gamex86.dll)
    ==== hooked GGA ==== 
    ==== hooked InitGame ==== 
    ==== hooked InitGame 2 ==== 
    ==== InitGame ====
    ----- Server Shutdown -----
    ==== hooked Shutdown ==== 
    ==== ShutdownGame ====

    Now i don't know a lot about reversing , so any ideas

  2. #2
    Developer RyBack's Avatar
    Join Date
    Apr 2014
    Location
    In Front of the screen
    Posts
    1,603

    Default

    source http://www.mediafire.com/download/51...d/fgameded.zip

    Binaries located in Debug Folder


    Little Question:
    Where do I learn reversing

  3. #3

    Default

    The Spearhead uses a different engine you cant use that one is only for AA

    You find some tutorials on the internet how to do reverse engineering.

  4. #4
    Administrator James's Avatar
    Join Date
    May 2010
    Location
    on the intraweb
    Posts
    3,180

    Default

    I can't remember, but is the SH gamex86.dll file actually called "gamex86.dll" I thought it was something else?. Basically LoadLibrary isn't able to load the default dll file.
    Take a screenshot of the Spearhead main folder for me I want to see the files in there and then I'll be able to help you out.

    EDIT
    globals_backup.Init( startTime, randomSeed ,123);

    void G_InitGame( int startTime, int randomSeed )
    {
    gi.Printf("==== hooked InitGame ==== \n");


    #ifndef _WIN32
    initsighandlers(); // init our custom signal handlers (linux only)
    #endif

    globals_backup.Init( startTime, randomSeed );


    gi.Printf( "Medal of Honor: Spearhead Reborn v1.12 \n");
    }


    Not sure why you have 3 variables passing through Init() when there should only be 2.

  5. #5

    Default

    LoadLibrary is able to load the game dll because it is successfully able to call the original InitGame, but it sounds like something goes wrong in G_InitGame.
    I found this SH wrapper on my computer, maybe you can try and see if it works https://drive.google.com/file/d/0B1z...ew?usp=sharing (I think this is James one and working)

  6. #6
    Administrator James's Avatar
    Join Date
    May 2010
    Location
    on the intraweb
    Posts
    3,180

    Default

    Not sure if this will work, but I made some changes to the source that Ley0k posted.
    This compiles properly, and works in newer versions of Visual Studio.

    Also, rename the spearhead gamex86.dll to "gamex86mohsh.dll" and then place the compiled on in the same folder as the renamed one.

    I haven't tested to see if this works, but give it a go and let me know how it works out.

    www.x-null.net/James/fgameded_SH.zip

    EDIT:
    BTW, RyBack, the mediafire link never loads for me.

  7. #7
    Developer RyBack's Avatar
    Join Date
    Apr 2014
    Location
    In Front of the screen
    Posts
    1,603

    Default

    Thanks

    I'll give it ago.

    About 3 variables , u know idk too much about reversing , I thought somehow that the original "init" function has actually 3 variables , so trying random variables may work (LOL).


    MF is runnig in a good way ,i'll attach it right here.
    Attached Files Attached Files
    Last edited by RyBack; May 4th, 2015 at 02:21 PM.

  8. #8
    Administrator James's Avatar
    Join Date
    May 2010
    Location
    on the intraweb
    Posts
    3,180

    Default

    Updated wrappers and uploaded on server for public. These are just BASE wrappers, but they seem to load fine for AA and SH (tested by RyBack)

    http://www.x-null.net/forums/showthr.../1768-Download

    Enjoy!

  9. #9
    Developer RyBack's Avatar
    Join Date
    Apr 2014
    Location
    In Front of the screen
    Posts
    1,603

    Default

    may 2013 : gamex wrapper published
    may 2015 : SH wrapper published

    BT , We Are Coming !

  10. #10
    Developer RyBack's Avatar
    Join Date
    Apr 2014
    Location
    In Front of the screen
    Posts
    1,603

    Default

    Update : Works On BT too !!!!!!!!!

    notes :
    Sh tested on V1.15
    BT tested on v2.30 (shows 0.0 in version cvar, but i think it's 2.30)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •