Sonic and Sega Retro Message Board: Korama - Viewing Profile - Sonic and Sega Retro Message Board

Jump to content

Hey there, Guest!  (Log In · Register) Help

Group:
Tech Member: Tech Members
Active Posts:
253 (0.06 per day)
Most Active In:
Engineering & Reverse Engineering (123 posts)
Joined:
18-May 04
Profile Views:
2812
Last Active:
User is offline Private
Currently:
Offline

My Information

Age:
Age Unknown
Birthday:
Birthday Unknown
Gender:
Not Telling Not Telling

Previous Fields

National Flag:
eu

Latest Visitors

Topics I've Started

  1. Sega PC Reloaded

    02 April 2015 - 04:56 PM

    What is it?

    I wrote a program that is an installer, launcher, and patcher for a few Sega PC
    games that were originally released for Windows 95/98. The games had issues or
    broke entirely on newer versions of Windows. Now they work again, with a few
    minor improvements even.
    So far, these games are supported:
    • Ecco the Dolphin PC
    • Sonic CD 1996
    • Sonic & Knuckles Collection
    • Sonic 3D Blast


    Posted Image

    Some boring technical details:
    Those games use DirectDraw and 8 bit / 256 color palettized video modes. Both are
    obsolete nowadays, and while the compatibility layer of Windows still supports/emulates
    them, it doesn't always work for whatever reason (e.g. buggy game code).
    So I wrote custom implementations of the necessary DirectDraw interfaces (IDirectDraw,
    IDirectDrawSurface, etc.), and a few other Windows API functions, that either
    wrap or replicate what the games expect.
    That code is packaged in a "ddraw.dll" file that looks like the real one from Microsoft.
    However, some of the games load ddraw.dll dynamically, after executing some "bad" code
    (e.g. checking if a 256 color mode is active). That's why a launcher is necessary, it
    ensures that my ddraw.dll gets loaded and run right at the start of the game, so that
    it can perform the necessary patches in memory. I could also patch the files on disk,
    of course, but I've decided against that. It is just too messy and gets complicated if
    I need to undo or update patches. Keeping the original files unmodified on disk and
    doing all the patching in RAM is the best solution.



    What exactly does it change?

    Many little things that I can't be bothered to write down. Some important ones:
    • Flexible window handling (free resizing, preset sizes, try Alt+0..9), quick fullscreen toggling... (all games except Ecco).
    • Music playback from file instead of CD, bass.dll and streaming plugin
      support for all kinds of formats. Custom loop points supported for ogg and flac.
    • All registry and ini file operations of the games get redirected to a single ini
      file that also holds the patcher configuration. The file is <exename>.ini, so
      if you'd like to have several configurations for a single game, just make a
      copy (or hardlink) of the exe and call it <exename>.whatever.exe (e.g. "sonic3k.2.exe").
    • Mapping joystick / gamepad POV hat / dpad to analog axes in all games.
    • Skipping annoying intro logos and videos.
    • Palette blending; mainly for Ecco, still experimental in SCD and particularly S3K.
    • Freely configurable keyboard and gamepad bindings (not fully implemented yet).
    • Midiout.dll of S&K Collection caused an access violation on termination,
      keeping sonic3k.exe in memory...
    • Diagonal key input for Sonic CD. Only worked for gamepad.
    • Savegame dialogs and several graphics modes were totally broken in Ecco.
    • and more...





    Why?

    Yes, I know you can emulate most of those games, and Taxman's rebuilt Sonic CD is great.
    I started this project last year, specifically for Ecco PC, because unlike the Sonic games,
    that game did never receive any official re-release. Yet it is pretty much
    the best version of Ecco 1 available. If you're interested in that game, you can find a
    great bundle here.

    After that was done, I generalized the code a bit and applied it to the old
    Sonic games I had lying around. It took some restructuring/refactoring, but it
    worked rather well.
    Also, it's not like I'm new to this. I've made Sonic CD and Ecco PC "XP ready"
    a decade ago already (does anyone remember SonicCDfix? I reused some code from that.).
    But the patches back then were rather simple and superficial compared to this.


    Where?

    Download here.

    A little extra for Sonic CD 1996.
    - higher quality sound effects and Xvid-encoded intro movie. The original uses Indeo, which is no longer included in Windows. All other videos use Cinepak, which is still there.

    Posted Image

    To do...

    There are a few minor issues I still need to resolve.
    Palette blending tends to get stuck in SCD and S3K; you can turn if off and on via Alt+B. Should probably also be gamma-corrected.
    Key/gamepad binding needs to be finished... you can already assign various stuff to buttons in SCD,
    but only by editing the ini file directly. If you go to the "[JoystickControls]" section and add "JoyButton11=menu503" and "JoyButton12=menu201", for example,
    then button 11 will toggle debug mode and button 12 will toggle fullscreen (as 503 and 201 are the menu command IDs for those actions).
    Some upscaling algorithms and dedithering would be nice to have, but that's a pipe dream for now.

    Comments, suggestions, and bug reports are welcome.
  2. CPKREDIR - loading and combining mods for Sonic Generations

    09 May 2012 - 10:18 AM

    If you're reading the Sonic Generations Hacking topic, then you've probably already heard of CPKREDIR.
    If not, then it's about time.

    After having written a pretty lengthy documentation for the thing (included in the download), I'm going to be brief here.
    CPKREDIR intercepts CPK file read operations by Sonic Generations and redirects them to external files. This makes it possible to have the game load modified data files without the need for unpacking and repacking those large CPK archives every time. Internally, CPKREDIR actually creates virtual CPKs on the fly, or rather their most important data structures (header and table of contents). Those virtual CPKs are presented to the game and when it tries to read from them, the requested data is fetched from the original CPKs or from external user files.

    Download the latest version 0.41 here.
    It comes with some files that let you play Dario FF's "Classic Sonic Adventures", after downloading his fixed files. Dario, I hope you don't mind.

    Some screenshots of the console logging window with CPKREDIR running a combination of Melpontro's Wave Ocean and Megamaniscrazy's Shadow mod:
    Posted Image Posted Image

    Feel free to ask any questions about it here, or let me know of bugs you encounter.
  3. Sonic CD for PC in Windows XP

    20 September 2004 - 01:49 PM

    That other thread "Sonic CD's patch for Win XP" here and Quick Man's silly reply to it convinced me to take another look at the game.

    I updated my SonicCDfix program and included two new patches: one for toggling the menu and the other one for toggling full screen mode!

    Works fine for me, I hope it will for others as well. If you have already patched Sonic CD with a previous version of SonicCDfix, just run the new version over it again and be sure to let it overwrite the LZXX.DLL file.

    I guess I'll have to thank Quick Man for motivating me to tackle that last big flaw of Sonic CD PC. :(

    bobxp, on Sep 20 2004, 11:01 AM, said:

    Ehh, why not get the MegaCD version? :P

    Maybe not everybody can find it or wants to pirate it?
    Anyway, if you already have the PC version, why leave it rotting in its case now that it's possible to play it again? :P

Friends