1. DeadSkullzJr

    OP DeadSkullzJr Developer
    Developer

    Joined:
    Sep 28, 2017
    Messages:
    1,068
    Country:
    United States
    Hello everyone, today I decided to bring you something a bit interesting and or different. I wasn't too sure where to really post this, however considering the title of this topic involves a game released for the Nintendo DS, I figured this was the best section to post the content.

    For a couple or so months now I have been messing around with Sonic Classic Collection for the Nintendo DS. To fill in those unaware of what this game is, Sonic Classic Collection was a game that contained four titles from the SEGA Genesis based series of the Sonic the Hedgehog (six counting the two lock-on titles), all of which were emulated to run on the Nintendo DS.

    The games are as follows (in order):
    - Sonic the Hedgehog
    - Sonic the Hedgehog 2
    - Sonic the Hedgehog 3
    - Sonic & Knuckles
    - Knuckles the Echidna in Sonic the Hedgehog 2 (Knuckles in Sonic the Hedgehog 2)
    - Sonic the Hedgehog 3 & Knuckles (Knuckles in Sonic the Hedgehog 3)

    Now that you are aware, let's move forward. Sonic Classic Collection is actually just a coated version of jEnesisDS (homebrew emulator) running a bunch of SEGA Genesis ROMs. Unfortunately not much of anything ever happened for Sonic Classic Collection in the ROM hacking scene and what not. However one thing that did happen back on 2010, the user KazoWAR uploaded a video YouTube of the games ripped right from Sonic Classic Collection as seen here:


    The games were sent to Sonic Retro to look into for documentation purposes, however that was as far as it ever went, and sadly that's how it was left for all these years, that was until recently. As I stated earlier I have been messing with Sonic Classic Collection for quite a while, and I am happy to say that I have successfully dumped the games out of Sonic Classic Collection. During the process, I got halfway through until I hit a stump and needed some help, I did however end up figuring out what I was stumped on, but I would like to give thanks to KazoWAR for supplying the solution to the issue I initially contacted them about regardless of me figuring it out myself eventually.

    Here is my video of the dumps I did:


    I created patches out of these dumps, you'll need the original versions of the games in order for these dumps to work.


    Original Games Needed:

    Sonic the Hedgehog (World) (Rev 1):
    Code:
    File: Sonic the Hedgehog (World) (Rev 1).md
    File: Sonic the Hedgehog (Japan, Korea).md
    CRC-32: afe05eee
    MD4: 19d722f330bad4e4cc0b337289501ba3
    MD5: 09dadb5071eb35050067a32462e39c5f
    SHA-1: 69e102855d4389c3fd1a8f3dc7d193f8eee5fe5b
    
    Sonic the Hedgehog 2 (World) (Rev 1):
    Code:
    File: Sonic the Hedgehog 2 (World) (Rev 1).md
    File: Sonic the Hedgehog 2 (World) (Rev A).md
    CRC-32: 7b905383
    MD4: 465e3a6be0997c1d74d8e1e5da78d35b
    MD5: 9feeb724052c39982d432a7851c98d3e
    SHA-1: 8bca5dcef1af3e00098666fd892dc1c2a76333f9
    
    Sonic the Hedgehog 3 (USA):
    Code:
    File: Sonic the Hedgehog 3 (USA).md
    CRC-32: 9bc192ce
    MD4: eb8ca69af69cc77b2674bcefa4f1cef8
    MD5: d724ea4dd417fe330c9dcfd955c596b2
    SHA-1: 75e9c4705259d84112b3e697a6c00a0813d47d71
    
    Sonic & Knuckles (World):
    Code:
    File: Sonic & Knuckles (World).md
    CRC-32: 0658f691
    MD4: c593d37a67748636cae21fa127a6575f
    MD5: 4ea493ea4e9f6c9ebfccbdb15110367e
    SHA-1: 88d6499d874dcb5721ff58d76fe1b9af811192e3
    

    If you attempted to load the Sonic Classic Collection dumps right after patching the original versions of the games, you will notice that none of them will work on any emulator except jEnesisDS. The reason for this is because jEnesisDS incorrectly emulates $Axxx and $Fxxx as if they were $6xxx instructions. The $Axxx opcodes were used to implement system calls on the Motorola 68000 based computers, while the $Fxxx opcodes were used for floating-point co-processors. Considering the nature of these instructions, it's evident that these aren't usable on the SEGA Genesis because the console doesn't run an operating system nor has any floating-point co-processors. The $6xxx opcode is a conditional branch commonly used throughout many SEGA Genesis titles. The developers of Sonic Classic Collection changed all the $6xxx opcodes to the $Axxx and $Fxxx opcodes for each game, rendering ROM images that only work on jEnesisDS but nothing else. I went ahead and fixed these issues and created patches for said fixes, allowing you to run all of these games on any emulator you wish:


    Apply to Patched Games:

    Sonic the Hedgehog (World) (Rev 1) (Sonic Classic Collection):
    Code:
    File: Sonic the Hedgehog (World) (Rev 1) (Sonic Classic Collection).md
    CRC-32: 27e22795
    MD4: b87e2c71f1858a6af7b5e1aabf2ce161
    MD5: dfe1e6246f1ab76bf7a1bf7cc39a8e9a
    SHA-1: 802fe9a31a5973a46efbff3c29bfb634dc3f2f61
    
    Sonic the Hedgehog 2 (World) (Rev 1) (Sonic Classic Collection):
    Code:
    File: Sonic the Hedgehog 2 (World) (Rev 1) (Sonic Classic Collection).md
    CRC-32: 582e0bf7
    MD4: e610e4d1d9f92e2acc4e604950eefbc3
    MD5: 30506b6577a8022a065abeeff6accfa4
    SHA-1: fdc2caf8e450481b090fdcae025a90d817c13144
    
    Sonic the Hedgehog 3 (USA) (Sonic Classic Collection):
    Code:
    File: Sonic the Hedgehog 3 (USA) (Sonic Classic Collection).md
    CRC-32: fc0429dd
    MD4: 4b4d85e70bb717f04601a328ad076db1
    MD5: 3af1c74639a2586e103caf3a1dcb1f36
    SHA-1: 7ceb83de0871962fa3cd8fdc0ba8b5dec9a32ca9
    

    Sonic & Knuckles (World) (Sonic Classic Collection):

    Code:
    File: Sonic & Knuckles (World) (Sonic Classic Collection).md
    CRC-32: c7249cdf
    MD4: bca9f90b398b8456509c8569d18ccbaa
    MD5: 655b8fcdc0ee2112a347854dd339bfce
    SHA-1: c432cd2f4725374483b021cd8a8769a077a98bb2
    

    BONUS:
    Due to how dynamic the data for the lock-on versions of the games are in Sonic Classic Collection, I had to assemble the titles together respectively and manually, however the structure is authentic to the real deal dumps of the lock-on titles (meaning nothing was trimmed, these result in full dumps when patched). Here are patches for the lock-on titles respectively (patches located in the "Lock-On Patches" folder). As a bonus, I combined Sonic the Hedgehog and Sonic & Knuckles together so you can play the full version of Blue Sphere.

    Apply to:

    Sonic & Knuckles (World) (Sonic Classic Collection) (Opcode Fix):
    Code:
    File: Sonic & Knuckles (World) (Sonic Classic Collection) (Opcode Fix).md
    CRC-32: e87df1bd
    MD4: e6fcd9b89a115637d80012cc64c834c1
    MD5: aa75aec6809e369f86b95237b5f5640b
    SHA-1: 853705ad1a8ac51d61b27621d611177b6f5278b7
    

    Download:
    https://mega.nz/file/gYpRkSgS#3Ag75OJytZSQeoGP-aM4j8H2ompWYnQnnpZov5mNY4o
     
    Last edited by DeadSkullzJr, May 20, 2020
    Dartz150 and E1ite007 like this.
  2. MorningBlunt

    MorningBlunt Advanced Member
    Newcomer

    Joined:
    Jun 11, 2017
    Messages:
    58
    This is actually really cool. If anything, it's interesting to see how they put the games on there.
     
  3. FAST6191

    FAST6191 Techromancer
    Reporter

    Joined:
    Nov 21, 2005
    Messages:
    30,978
    Country:
    United Kingdom
    Do you have a more expanded version of the opcode problems? I feel tricked coming here expecting to learn about some interesting quirk and go not a lot.
    Fixes are appreciated though.
     
    E1ite007 likes this.
  4. DeadSkullzJr

    OP DeadSkullzJr Developer
    Developer

    Joined:
    Sep 28, 2017
    Messages:
    1,068
    Country:
    United States
    The reason for this is because jEnesisDS incorrectly emulates $Axxx and $Fxxx as if they were $6xxx instructions. The $Axxx opcodes were used to implement system calls on the Motorola 68000 based computers, while the $Fxxx opcodes were used for floating-point co-processors. Considering the nature of these instructions, it's evident that these aren't usable on the SEGA Genesis because the console doesn't run an operating system nor has any floating-point co-processors. The $6xxx opcode is a conditional branch commonly used throughout many SEGA Genesis titles. The developers of Sonic Classic Collection changed all the $6xxx opcodes to the $Axxx and $Fxxx opcodes for each game, rendering ROM images that only work on jEnesisDS but nothing else.
     
    maorninja likes this.
  5. FAST6191

    FAST6191 Techromancer
    Reporter

    Joined:
    Nov 21, 2005
    Messages:
    30,978
    Country:
    United Kingdom
    Curious. I wonder then if it was some weird optimisation or the last vestiges of Sega's we don't like emulation so we use odd formats policy.
     
  6. DeadSkullzJr

    OP DeadSkullzJr Developer
    Developer

    Joined:
    Sep 28, 2017
    Messages:
    1,068
    Country:
    United States
    It was more so an attempt to stop people from ripping the games so easily to use them elsewhere, at the end of the day we all know what Sonic Classic Collection is. It's just a heavily modified version of jEnesisDS running ROMs, I don't think they wanted people running around with copies of the games present in Sonic Classic Collection lol. I know what you are thinking though, "but these games were already available to download?", the thing is back then people did whatever they could to rip/dump games from ports like this, Sonic Classic Collection just ended up being one of the more complicated ports compared to some of the rest out there because of the structure and form the game took all by itself.

    I looked into the code for all the games already, these opcode changes didn't make a lick of difference in performance, if anything it just served as a gimmick to throw people off and to knock compatibility with emulators that actually run the opcodes properly off guard. I already tested this by running both the modified and opcode fixed versions respectively on jEnesisDS, no differences at all. The only noticeable differences between these games and the original versions is nothing but slight graphical changes, all of which was done to fit on the Nintendo DS display, other slight changes were made to "phase" out multiplayer based options, I can easily fix that though (I already have, just haven't decided on whether I plan to release the fixes or not).
     
  7. banjotooie

    banjotooie Member
    Newcomer

    Joined:
    May 26, 2009
    Messages:
    13
    Country:
    Can other Genises roms be injected in to the rom?
     
  8. DeadSkullzJr

    OP DeadSkullzJr Developer
    Developer

    Joined:
    Sep 28, 2017
    Messages:
    1,068
    Country:
    United States
    Not without reverse engineering the whole thing. This was geared around the Sonic games, so you'd need some heavy duty edits.
     
    banjotooie likes this.
Draft saved Draft deleted
Loading...

Hide similar threads Similar threads with keywords - Collection, Classic, Opcode