Menu

Looking for help putting FM2006 into windowed mode for Linux Mint 18.04 using WINE software

Hbizzle
2019-11-23
2019-11-26
  • Hbizzle

    Hbizzle - 2019-11-23

    Hi i have just downloaded DxWnd with the express intention of using it for Football Manager 2006, this game has always given me issues when trying to window it.

    I managed t fix a flickering cursor problem i had with the program but having issues with the windowed mode. I cannot move the window around, it is fixed on the screen and when changing windows the screen flickers alot adjusting between the game and the desktop. Also when windowed the display doesnt adjust to the window size.

    Please can you help me with a fix for this.

     

    Last edit: Hbizzle 2019-11-23
  • gho

    gho - 2019-11-23

    The behavior of programs with DxWnd is not necessarily the same on Windows and Linux/Wine.
    I'll try to give you some quick hints, but I'm not sure they would work. I have a Linux Ubuntu portable, it's not probably the same as yours but I'll try later (the pc is at the office, available on working days only!) to see how the game works on a genuine platform.

    First thing, I see you're using DxWnd simplified interface. If you set Options->Expert mode there will be a few more options to help, everything is documented on help pages. One very helpful expert feature is the configuration of logging that allows DxWnd users to capture log files and send them to me.

    Not all games can be resized or moved. In general, D3D8/9 games sometimes don't allow you for that: for instance, resizing implies that the game can detect the event and rebuild all affected resources (like primary buffer and backbuffers) according to the new size. Some games do that, some don't.

     
  • Hbizzle

    Hbizzle - 2019-11-23

    Thanks for the advice, i have had a few shots at it with no avail so far, ill keep at it until hopeful success. To get the log file i selected export and got the attached .dxw file. When pressed log-view i never got a response, same with pressing view-DxWnd logs.

     
    • gho

      gho - 2019-11-23

      That's because you have to "modify" the game configuration: select Expert mode, in the configuration tabls you'll now see a "Logs" tab. Set logging flags as in the picture (it is a setting good for many cases) and after the game run you'll find a dxwnd.log file in the game folder.
      Don't forget to disable logging in normal use: logs can be really verbose and flood your HD in a matter of minutes!

       
  • Hbizzle

    Hbizzle - 2019-11-23

    Awesome, i followed your instruction and got the log file.

     
    • gho

      gho - 2019-11-24

      The log file lacks of many details about ddraw operations, window hendling and so forth, despite the log flags were set correctly. I wonder if the game executable is obfuscated or there's some other weird situation.
      In the meanwhile I had no luck in finding a copy of the game so far, so I can't check by myself.

       
  • Hbizzle

    Hbizzle - 2019-11-24

    Thanks

     

    Last edit: Hbizzle 2019-11-24
    • gho

      gho - 2019-11-24

      Uhm, I'm pretty sure that some of your last post may break some statement of SF policy. Better clean it up before getting banned. But don't worry, I got the message .... ;)

       
  • gho

    gho - 2019-11-25

    I started the hunt on a genuine Windoz platform, as usual, easy things firts and the complicated Wine stuff for later ... but the game showed some curious problems also here on Win7. It seems that DxWnd doesn't have all the necessary power to control the screen resolution unless I set the "Hook / Hot patch" flag, and this surely means that on Linux things won't be any better.
    Well, stay tuned, I have to understand why ...

     
    • Hbizzle

      Hbizzle - 2019-11-25

      I set "Hook / Hot patch" flag and when hitting run there was no response.

       
      • gho

        gho - 2019-11-25

        I'm not sure the Hot Patch flag works on Wine / Linux. It involves a dependency on the calling conventions and other internal stuff coming from MinHook lib, I never tried....

         
  • gho

    gho - 2019-11-25

    This game (or, better, its cracked version) is INCREDIBLE!!!
    After some long & boring debugging session I start to see the overall picture:
    The original game is obfuscated, looking at its import directory all libraries have 1 entry only.
    But the cracked exe is the weirdest thing I ever saw: despite its looking as a normal unobfuscated executable, some of its dependencies are not listed in the import table but are built at runtime with a complex procedure that I would bet was not in the original executable.
    This is why, no matter if I use early hooking, DxWnd can't find references to the USER32 ChangeDisplaySettingsExW system call unless I set the hot patch flag.
    Awfully interesting, but also awfully an hard task!

     
  • Hbizzle

    Hbizzle - 2019-11-25

    Would it be advantageous to have a diferent exe file to boot the game?

     
    • gho

      gho - 2019-11-25

      Mini-images to defeat a SafeDisk protection? I doubt, but it's worth a try.
      Will this stuff (DaemonTools, Alcohol 120%, Virtual CD HIDE) have any chance to run then on Wine / Linux?

       
  • Hbizzle

    Hbizzle - 2019-11-25

    There is a way to get a cd rom booting from the wine app https://ubuntuforums.org/showthread.php?t=619250 but im a little bit spare right now getting it going, daemon tools wont setup, the app was trying to install microsoft NET framework, something about GUI settings.

     
  • gho

    gho - 2019-11-26

    This is a very interesting chunk od assembly within fm.exe:

    CPU Disasm
    Address   Hex dump          Command                                  Comments
    00D91625  /.  68 F29D8D00   PUSH 008D9DF2                            ; /Arg5 = fm.8D9DF2, Entry point
    00D9162A  |.  FF35 C8705A01 PUSH DWORD PTR DS:[15A70C8]              ; |Arg4 = 0
    00D91630  |.  68 A0F03101   PUSH OFFSET 0131F0A0                     ; |Arg3 = fm.131F0A0
    00D91635  |.  68 90251901   PUSH 01192590                            ; |Arg2 = ASCII "CompareStringW"
    00D9163A  |.  68 0C6B0D01   PUSH 010D6B0C                            ; |Arg1 = ASCII "kernel32.dll"
    00D9163F  |.  E8 6E85B4FF   CALL 008D9BB2                            ; \fm.008D9BB2
    00D91644  \.  FF25 A0F03101 JMP DWORD PTR DS:[131F0A0]
    00D9164A  /.  68 BC9D8D00   PUSH 008D9DBC                            ; /Arg5 = fm.8D9DBC, Entry point
    00D9164F  |.  FF35 C4705A01 PUSH DWORD PTR DS:[15A70C4]              ; |Arg4 = 0
    00D91655  |.  68 E4F03101   PUSH OFFSET 0131F0E4                     ; |Arg3 = fm.131F0E4
    00D9165A  |.  68 A0251901   PUSH 011925A0                            ; |Arg2 = ASCII "GetFullPathNameW"
    00D9165F  |.  68 0C6B0D01   PUSH 010D6B0C                            ; |Arg1 = ASCII "kernel32.dll"
    00D91664  |.  E8 4985B4FF   CALL 008D9BB2                            ; \fm.008D9BB2
    00D91669  \.  FF25 E4F03101 JMP DWORD PTR DS:[131F0E4]
    00D9166F  /.  68 F29D8D00   PUSH 008D9DF2                            ; /Arg5 = fm.8D9DF2, Entry point
    00D91674  |.  FF35 C0705A01 PUSH DWORD PTR DS:[15A70C0]              ; |Arg4 = 0
    00D9167A  |.  68 08F13101   PUSH OFFSET 0131F108                     ; |Arg3 = fm.131F108
    00D9167F  |.  68 B4251901   PUSH 011925B4                            ; |Arg2 = ASCII "LCMapStringW"
    00D91684  |.  68 0C6B0D01   PUSH 010D6B0C                            ; |Arg1 = ASCII "kernel32.dll"
    00D91689  |.  E8 2485B4FF   CALL 008D9BB2                            ; \fm.008D9BB2
    00D9168E  \.  FF25 08F13101 JMP DWORD PTR DS:[131F108]
    00D91694  /.  68 4C9D8D00   PUSH 008D9D4C                            ; /Arg5 = fm.8D9D4C, Entry point
    00D91699  |.  FF35 BC705A01 PUSH DWORD PTR DS:[15A70BC]              ; |Arg4 = 0
    00D9169F  |.  68 C8F03101   PUSH OFFSET 0131F0C8                     ; |Arg3 = fm.131F0C8
    00D916A4  |.  68 C06C0D01   PUSH 010D6CC0                            ; |Arg2 = ASCII "GetCPInfo"
    00D916A9  |.  68 0C6B0D01   PUSH 010D6B0C                            ; |Arg1 = ASCII "kernel32.dll"
    00D916AE  |.  E8 FF84B4FF   CALL 008D9BB2                            ; \fm.008D9BB2
    00D916B3  \.  FF25 C8F03101 JMP DWORD PTR DS:[131F0C8]
    00D916B9  /.  68 BC9D8D00   PUSH 008D9DBC                            ; /Arg5 = fm.8D9DBC, Entry point
    00D916BE  |.  FF35 B8705A01 PUSH DWORD PTR DS:[15A70B8]              ; |Arg4 = 0
    00D916C4  |.  68 F8F03101   PUSH OFFSET 0131F0F8                     ; |Arg3 = fm.131F0F8
    00D916C9  |.  68 C4251901   PUSH 011925C4                            ; |Arg2 = ASCII "GetStringTypeW"
    00D916CE  |.  68 0C6B0D01   PUSH 010D6B0C                            ; |Arg1 = ASCII "kernel32.dll"
    00D916D3  |.  E8 DA84B4FF   CALL 008D9BB2                            ; \fm.008D9BB2
    00D916D8  \.  FF25 F8F03101 JMP DWORD PTR DS:[131F0F8]
    00D916DE  /.  68 C99D8D00   PUSH 008D9DC9                            ; /Arg5 = fm.8D9DC9, Entry point
    00D916E3  |.  FF35 B4705A01 PUSH DWORD PTR DS:[15A70B4]              ; |Arg4 = 0
    00D916E9  |.  68 04F13101   PUSH OFFSET 0131F104                     ; |Arg3 = fm.131F104
    00D916EE  |.  68 CC6C0D01   PUSH 010D6CCC                            ; |Arg2 = ASCII "IsValidCodePage"
    00D916F3  |.  68 0C6B0D01   PUSH 010D6B0C                            ; |Arg1 = ASCII "kernel32.dll"
    00D916F8  |.  E8 B584B4FF   CALL 008D9BB2                            ; \fm.008D9BB2
    00D916FD  \.  FF25 04F13101 JMP DWORD PTR DS:[131F104]
    

    Taking proper consideration of the fact that the executable includes a reference to LoadLibraryA but then it has no references to GetProcAddress, it seems that this routine at fm.008D9BB2 is sort of a homemade replacement of GetProcAddress used to browse the loaded module, find the entry in argument and extract its address.
    Crazy.

     
  • Hbizzle

    Hbizzle - 2019-11-26

    I remember when this game was getting cracked back in the day, there was plenty of different cracks out there at that time, this fix came out it seems 01/06 5 months after the release of the game and seems to be the definitive fix of them all. Attached is the readme file that came with the exe.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.