Author Topic: Sega PC Reloaded by Korama - Sonic CD (1996) Tutorial Inside  (Read 3819 times)

 
Quote from: Korama
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




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 brown townog 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...


https://youtu.be/GXnI5Ex6sr0


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.

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.



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.

I Fixed it sonic  CD and here's what you do for Sonic CD.

Install this before anything else.

Install Sonic CD through the Sega PC Reloaded.

Download bass.dll from this website.

Drop the bass.dll from the zip file into your sonic CD installation folder. (DO NOT PUT IT IN YOUR MUSIC FOLDER! This is a common error.)

Go to the AVI folder in the Title folder and place the OPN.AVI file there, overwrite the existing file. (Note: The OPN.AVI was rendered with a certain codec to work with sonic CD, not any avi video will work, keep this in mind if you wish to create your own AVI file!)

Create a music folder and create a play list following the trackorder.txt I have included.

Set that as your music folder through Sega PC Reloaded.

Sonic CD Should run fine now.
« Last Edit: February 03, 2017, 04:24:22 PM by Master Matthew˛ »

you need xvid for that sonic cd error m8

you need xvid for that sonic cd error m8
Alright, ill try that when I can.

Or you could get the enhanced steam version for 5 bucks.

Or you could get the enhanced steam version for 5 bucks.
I have that, but thats no fun to mod, all the distracting achievements and whatnot.
Besides sonic 3 and Knuckles



? You spun on the enhanced version?
The physics just arent right on the steam version