Menu

SimCity 2000 crash on save/load

2022-02-05
2022-02-15
1 2 3 > >> (Page 1 of 3)
  • BEEN_Nath_58

    BEEN_Nath_58 - 2022-02-05

    The game crashes while trying to save or load a game. I stumbled across the following:

    The technical details if anyone is interested is that I added a tiny bit of assembly to disable the OFN_EXPLORER and OFN_ENABLEHOOK flags from the OPENFILENAME structure before the GetOpenFileNameA/GetSaveFileNameA calls.

    Can you add it to DxWnd?

     
    • gho

      gho - 2022-02-05

      Probably that would be easy since both calls are wrapped already.
      But I see another problem: DxWnd can control Win32 games only and SimCity 2000 is a 1993 DOS game. Avan if some site claims it offers a Windows version, it is only the DOS game with the DOSBox emulator.
      Did you find a different, genuine Win32 release? Only in that case the operation may work.
      Where did you get the phrase quoted in your post? I may want to read the whole story ...

       

      Last edit: gho 2022-02-05
      • huh

        huh - 2022-02-05

        Depending on what you can read here https://en.wikipedia.org/wiki/SimCity_2000
        I think this is "Simcity 2000 Special Edition (CD Collection)". If I watched good, you can find this version in the web archive.

         
        • BEEN_Nath_58

          BEEN_Nath_58 - 2022-02-05

          Ah yes, the Special edition. archive org has it.

           
  • gho

    gho - 2022-02-05

    Ok, this version of DxWnd has a special tweak named "patch:FixFileDialog" that does what you asked.
    But sadly I couldn't get SimCity 2000 SE to work together with DxWnd. It works alone, at least if you avoid the file dialogs, but when run through DxWnd it behaves very strangely. Maybe you'll have a better luck.

     

    Last edit: gho 2022-02-05
  • BEEN_Nath_58

    BEEN_Nath_58 - 2022-02-06

    Some games break in DxWnd. This is one of them, it doesn't work here, I can only see the dialogues.

    Lets dig into the game now...

    Side note: I have a lot of .dxw profiles left on my PC, some of which didn't make to the export package, some didn't need a separate thread because I fixed the problems. Considering the busy schedule and the fact that things are lost easily on my PC, I could upload them to a GitHub repository, so that they are always available. I wanted to ask which license to use, GNU GPLv3?

     

    Last edit: BEEN_Nath_58 2022-02-06
  • huh

    huh - 2022-02-06

    I confirm that the patch works, unfortunately the game is not suitable for running via DxWnd, probably due to its own window mode.
    I achieved the best results with running DxWnd, when I did not run the game from DxWnd, but from the Windows environment. However, I constantly had gray areas that disappeared and appeared so the game was unplayable.

     
  • gho

    gho - 2022-02-06

    The game is too beautiful and the result so close to perfection that we can't skip it.
    So far, I got good results with this export and using this way:
    1) install the game from the CD iso (beware: webarchive also has a .cue/.bin image, but that doesn't work with any of my emulators, I had to doenload another image in .iso format)
    2) import the configuration
    3) unmount the CD (the intro movie can't be played and could interfere)
    4) run the game from outside DxWnd. For some reason the DxWnd launch is troublesome for this game. Probably it is the same thing that Huh experienced.

    The game configuration uses zorder=top and "Invalidate full rect" to try to eliminate the gray areas, but I'm not sure it works. For sure, there's much more to investigate.

     

    Last edit: gho 2022-02-06
    • BEEN_Nath_58

      BEEN_Nath_58 - 2022-02-06

      With disabling "Run in Windows" and running from executable, the game scales correctly to fullscreen. Also if I have the CD, the video plays in a corner and plays briefly and then the game scales to fullscreen and plays. Main issues starts in gameplay. With Run in Windows disabled, I can't use the selection panel you see on the left, it's all grey.

      Can't there be an option to disable all DxWnd operations, except (a list of options from a long drop down menu)?

       

      Last edit: BEEN_Nath_58 2022-02-06
  • huh

    huh - 2022-02-06

    @gho
    Yes, there are no gray areas, unfortunately, game does not redraw correctly when scrolling the entire map. It doesn't matter if I scroll with the arrows on the keyboard or across the scroll bar.

    @BEEN_Nath_58
    Well I thought Debug-Disable SetWindowsHook and "Disable WindowProc hooks" flags might be enough, but in this case they are insufficient.

     

    Last edit: huh 2022-02-06
    • huh

      huh - 2022-02-06

      Update:
      Guys, I'll tell you a funny thing. It started working for me when I turned off "Hook enabled". It does not matter whether in the context menu by right-clicking or directly in the settings.
      The game loads or saves the save file. No gray areas or redraw errors.

       
      • BEEN_Nath_58

        BEEN_Nath_58 - 2022-02-06

        Ah I think I couldn't catch on this one. I am trying but failing till.

         

        Last edit: BEEN_Nath_58 2022-02-06
      • BEEN_Nath_58

        BEEN_Nath_58 - 2022-02-06

        Failed till now. Give the profile :)

         

        Last edit: BEEN_Nath_58 2022-02-06
        • huh

          huh - 2022-02-06

          I don't know if it depends on the profile. I just have disable Hook enabled and I'm running the game directly from Windows, not from DxWnd. DxWnd running. You are good at it?

           

          Last edit: huh 2022-02-06
          • BEEN_Nath_58

            BEEN_Nath_58 - 2022-02-06

            I am asking because doing this still crashes game in load/save

             
            • huh

              huh - 2022-02-06

              Here is my profile. I note I have a cue/bin version, so I don't know if that's the difference. FIll the path, but do not enable Hook enable. Let DxWnd run and run the game from Windows. Maybe you need to run DxWnd as an administrator?

               
              • BEEN_Nath_58

                BEEN_Nath_58 - 2022-02-06

                I tried it, and the game still crashes on the load/save place.

                Edit: This fixed the game on Windows 7, you used Windows 7 right?

                 

                Last edit: BEEN_Nath_58 2022-02-06
                • huh

                  huh - 2022-02-06

                  Here is my exe file. Maybe it's different on Win7. Without DxWnd, the game will crash while loading savefile. Yes, yes Win7.

                   
                  • BEEN_Nath_58

                    BEEN_Nath_58 - 2022-02-06

                    You seem to have an older file, from 1995, while mine is from 1996. Yours don't play the video. Maybe the game was released in different versions. The load/save crashes here too, but it again works on Windows 7. Probably a bug with hooking.

                    Note: Apparently I am using "SimCity 2000 Network Edition" instead of huh's "SimCity 2000 Special Edition", but that shouldn't be an issue, considering they worked on Windows 7!

                     

                    Last edit: BEEN_Nath_58 2022-02-06
  • gho

    gho - 2022-02-06

    Hi, guys. Before I waste some precious time, just one question:
    is it worth trying to patch the game executable to hardcode the correct flags without need of DxWnd? The first post seemed to suggest that someone already did this operation, so unless that patched exe has been lost (it seems unlikely, but still possible) trying to replicate that patch would be useless.
    Because, since the game seems to work far better without DxWnd rather then with it, I wonder why we should insist in trying to patch the game through DxWnd wrappers.

     
    • huh

      huh - 2022-02-06

      Yes, the patch is here https://github.com/alekasm/SC2000X
      This is really an exceptional case where such an old game does not need DxWnd. This exe also seems to work with the Special Edition. We probably shouldn't chase the wind.

       
  • gho

    gho - 2022-02-06

    Ok, I grabbed the source code, compiled it, built the SC2000X.patcher.exe file and applied it to my SIMCITY.EXE file, the output is the attached SC2000X.exe executable.
    You can either use my patched exe or apply the patcher. In the second case, tun SC2000X.patcher from command prompt (possibly with admin privileges, you never know ...), it will ask you the game folder pathname, then answer No to the question if you want to install the game and Yes to the question if you want to patch the game. In the end, the patched game will be SC2000X.exe.

     
    • BEEN_Nath_58

      BEEN_Nath_58 - 2022-02-06

      Okay either way the 2 files worked . Hopefully, you could fix this problem some day, since a stitch in time saves nine. I do have more problems to report, from Windows 7 and Vista, but other games.

      BTW, what do you say to this

      Side note: I have a lot of .dxw profiles left on my PC, some of which didn't make to the export package, some didn't need a separate thread because I fixed the problems. Considering the busy schedule and the fact that things are lost easily on my PC, I could upload them to a GitHub repository, so that they are always available. I wanted to ask which license to use, GNU GPLv3?

       

      Last edit: BEEN_Nath_58 2022-02-06
      • gho

        gho - 2022-02-06

        I'm not an expert on licensing, but GNU GPLv3 should be fine, at least it would be coherent with the same licensing adopted in DxWnd (see the help disclaimer or the file "lgpl-3.0.txt" included in the DxWnd package).
        Maybe you should add a readme.txt file stating clearly that you are not responsible in any way about the correctness of your exports and of possible damages, you never know ...

         
        • BEEN_Nath_58

          BEEN_Nath_58 - 2022-02-06

          Maybe you should add a readme.txt file stating clearly that you are not responsible in any way about the correctness of your exports and of possible damages, you never know ...

          Will do, definitely. Thanks

           
1 2 3 > >> (Page 1 of 3)

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.