don't click here

Why the Sonic CD PC Patch isn't compatible with the Dino version?

Discussion in 'Engineering & Reverse Engineering' started by Alien Treasure, Dec 17, 2012.

  1. Alien Treasure

    Alien Treasure

    Bringing you Seven Force since 1993
    Rio Das Ostras, Rio De Janeiro, Brazil
    Exploring Ristar's code, Sonic 1-3K Advance
    I got a Sonic CD Dino disc from an old friend of mine a long time ago. At the time, I could easily play it, since I had a Windows 98 notebook wich could run it with no patching/setting fuss involved, but, after some time, my note stopped working, and the only other PC my family had in our home ran Windows XP (yeah, it wasn't such a big time ago). I had absolutely no knowledge of Retro at this point in time, so I could do nothing.

    When I discovered Retro, I began messing around the wiki and eventually found Sonic CD's page. I read about the patch, and instantly looked around for my CD, but, when I get it, I see it's the Dino version, the alternative/colored one, to be exact. This was some time ago, and now, I use a PC that runs Windows 7, and the disc is still somewhere in my house, but I still can't play it, just because it's the Dino version. I know of the Taxman-made next-gen poremake (port+remake, get it?), but that disc is something from my childhood I love dearly, and I want to understand why the patch doesn't work with it, at least.
  2. MainMemory


    Kate the Wolf Tech Member
    The patch doesn't work because it's coded to specific offsets in the soniccd.exe file, which was recompiled between the versions. In theory someone could figure out what the patch changes and find the same code in the Dino version to make a fix for that.
  3. Korama


    Tech Member
    Hello there!
    I made that Sonic CD PC patch, in what seems like ages ago.

    When I decided to investigate why Sonic CD didn't work anymore on Windows XP, I used the version that I had, of course. And it happened to be the retail DirectX version, that I bought when my PC at the time could barely run it. I think I wasn't even aware at first that there was an older OEM DINO version of the game.
    Furthermore, the DirectX version uses 32 bit executables (exe and dll files) whereas the DINO version uses older 16 bit executables (the kind used back in Windows 3.x). Yet my tools were geared towards the standard 32 bit. I programmed a little DLL for the game that provided the proper data decompression function. If I had wanted to support the DINO version, I would have needed at least a compiler that could output 16 bit code, and perhaps I even would have needed to adjust my source code a bit. It would have been doable, but too much of a hassle in my opinion.
    I also wasn't sure for how long Microsoft would continue to support 16 bit programs anyway, with 64 bit Windows on the horizon. Surprisingly, they still do in Windows 8! But only in the 32 bit versions of their operating systems.
    Or to phrase it more clearly: Windows Vista/7/8 x86 (32 bit) can run 32 bit and 16 bit programs (the latter perhaps not without a good deal of compatibility problems). Windows Vista/7/8 x64 (64 bit) can run 64 bit and 32 bit programs, but NOT 16 bit ones.

    Chances are that you're using a 64 bit Windows at this point, to make good use of today's CPUs and cheap RAM (4GB an more). If that's the case, then the OEM DINO version of Sonic CD PC wouldn't run on your system anyway, patched or not.

    If you absolutely want to run that version of the game, you could try setting up Windows 9x in a virtual machine.

    Nope, it's not that simple.
    First, I'm no friend of fixed offset patching. I tend to use pattern matching if possible. Second, it's because of 16 bit, see above.