don't click here

The Sonic Genesis ports

Discussion in 'General Sonic Discussion' started by LOst, Oct 3, 2004.

Thread Status:
Not open for further replies.
  1. LOst

    LOst

    Tech Member
    4,891
    6
    18
    In 1997 Sonic Jam hitted Sega Saturn. It was all the Sonic games from the Genesis and some people believed they were emulated and other ported.

    For people like me, Hivebrain, and JoseTheBest who has a really deep knowlege of the Sonic engine knows that it was specially designed to work on the Genesis only. Some people still believe the code was written in C or C++ so it could easily be ported to other systems.

    So what's the truth? How could 4 Sonic games be ported into a new system just like that?
    Well, it's because in 1996-1997 no emulators existed. No one had developed a way to emulate the games. Sonic Team used some kind of a convertor to convert the Motorola 68000 code into HITACHI SuperH-2 RISC Processor code (for Sonic Jam) and into Intel i386 processor code (for Sonic & Knuckles Collection PC).
    The rest such as data managing and the way to display the art was developed for each system to emulate the VRAM and display planes as easily as possible.

    Just look and compare some code from S&K Collection PC and the original Sonic & Knuckles shall we:

    The Penguins in Ice Cap Zone (Object AD) Original 68000 instructions (Genesis):
    Code (Text):
    1. pngn05_init:
    2.     move.l  #pngn05_pt, 12(a0);- Pattern table
    3.     bset    #2, 4(a0)  ;- On playfield
    4.     move.b  #$20, 7(a0)  ;- 32 px width/2
    5.     move.b  #$20, 6(a0)  ;- 32 px height/2
    6.     move.l  (a7)+, 52(a0)   ;- Snow link from stack
    7.     move.l  #pngn05_pg00, (a0);- Next action
    8.     ...
    The Penguins in Ice Cap Zone (Object AD) converted i386 instructions (PC):
    Code (Text):
    1. pngn05_init  proc near
    2.  
    3.     mov  eax, offset pngn05_pt
    4.     mov  edi, A0_ptr
    5.     mov  [edi+12], eax  ;- Pattern table
    6.    
    7.     mov  edi, A0_ptr
    8.     mov  eax, [edi+4]
    9.     bts  eax, 2
    10.  
    11.     mov  edi, A0_ptr
    12.     mov  [edi+4], eax  ;- On playfield
    13.  
    14.     setb    al
    15.     and  al, al
    16.  
    17.     mov  al, 20h
    18.     mov  edi, A0_ptr
    19.     mov  [edi+7], al    ;- 32 px width/2
    20.  
    21.     mov  al, 20h
    22.     mov  edi, A0_ptr
    23.     mov  [edi+6], al    ;- 32 px height/2
    24.  
    25.     pop  eax
    26.     mov  edi, A0_ptr
    27.     mov  [edi+34h], eax  ;- Snow link from stack
    28.  
    29.     mov  eax, offset pngn05_pg00
    30.     mov  edi, A0_ptr
    31.     mov  [edi], eax     ;- Next action
    32.     ...
    As you can see, the converted code uses a variable called A0_ptr to emulate the A0 register pointer on Motorola 68000.
    The same goes for all other Address registers and Data registers. So there was nothing more than a cheap code conversation to make the Sonic games appear on the other systems.
    So the true Sonic (even Sonic 1 with Spindash) will forever be specific Genesis Motorola 68000 assembler. Without this system it won't be Sonic.

    /LOst
     
  2. Lostgame

    Lostgame

    turntablist, dinosaur goddess Oldbie
    4,119
    53
    28
    Toronto, ON
    The O.I.C.
    Whoa. So what about mega collection? That's an emu, right? And, um... Smash Pack Vol. 1 for DC?
     
  3. LOst

    LOst

    Tech Member
    4,891
    6
    18
    Just emulators. Nothing different in the ROMs. No new source code. Just hacked ROMs like we can do ourselves.
     
  4. Lostgame

    Lostgame

    turntablist, dinosaur goddess Oldbie
    4,119
    53
    28
    Toronto, ON
    The O.I.C.
    Haha... we're just as good as Sega...
     
  5. LOst

    LOst

    Tech Member
    4,891
    6
    18
    Sega could have been better if they hadn't lost the code. Now they have to do ROM hacking like we do to get stuff like spikes to work in Sonic 1 Mega Collection.
     
  6. Wetflame

    Wetflame

    :D Misfit
    1,718
    0
    0
    I don't think Sega have lost the code. Companies like that will ALWAYS keep several versions of the source code to big games like that.

    There's probably just some licensing issues with reusing it, or internal problems.
     
  7. If Sega was using hacked Roms like we do then why didn't they include Sonic CD and Knuckles Chaotix? We can emulate those games perferctly using only one emulator (Gens) or next to perfect yet they had problems trying to emulate them. You'd think the company that made the games would be better at emulating them instead of their own fans.
     
  8. LOst

    LOst

    Tech Member
    4,891
    6
    18
    If they could use Gens. But they can't without giving out the source with it.

    They uses the old Kgen. No Sega CD emulation existed then
     
  9. Drakmyth

    Drakmyth

    Inspector Drakmyth Master at your service. Oldbie
    420
    0
    0
    In the void beneath the ancient maze...
    Sonic Eclipse 2, Return of the Hidden Palace, Unnamed Sonic 2 Hack
    I think the point that Muffin was trying to make is that if a fan (or group of fans) can emulate the Sega CD, you would think that the company that MADE the system would be able to do the same.
     
  10. LOst

    LOst

    Tech Member
    4,891
    6
    18
    For some reason they didn't.

    I don't like discussions about what they can do when there is no proof they can at all.
     
  11.  
  12. Drakmyth

    Drakmyth

    Inspector Drakmyth Master at your service. Oldbie
    420
    0
    0
    In the void beneath the ancient maze...
    Sonic Eclipse 2, Return of the Hidden Palace, Unnamed Sonic 2 Hack
    I agree but I just found that kinda weird that a fan could do what a company couldn't (in theory).
     
  13. LOst

    LOst

    Tech Member
    4,891
    6
    18
    They are not just fans :P

    They are crazy motherfu*kers who make emulators for fun
     
  14. Qjimbo

    Qjimbo

    Your friendly neighbourhood lemming. Oldbie
    Also remember SEGA didn't make the 68k, motorola did. So SEGA didn't have to have the knowledge to make an emulator.
    They've lost the code? Or did "someone" steal it ;) ;)

    Intresting stuff there LOst, mind blowing to think they made such a complicated game in assembly.
     
  15. Wetflame

    Wetflame

    :D Misfit
    1,718
    0
    0
    So Yuji was a great programmer after all =P
     
  16. Hivebrain

    Hivebrain

    Administrator
    2,973
    87
    28
    53.4N, 1.5W
    HiveView
    I ran Sonic Jam's Sonic 1 through a SH-2 disassembler, and the code is basically the same as in 68k.
     
  17. Lostgame

    Lostgame

    turntablist, dinosaur goddess Oldbie
    4,119
    53
    28
    Toronto, ON
    The O.I.C.
    Hmm. Cool.
     
  18. BtCE

    BtCE

    Member
    So who wants to rip the games from Sonic Jam for us? =P

    /begging
     
  19. Quickman

    Quickman

    be attitude for gains Tech Member
    5,593
    8
    18
    :x
    omg porjcet
    You can't rip it, it's specific for the SH-2.
     
  20. LocalH

    LocalH

    roxoring your soxors Tech Member
    3,302
    26
    28
    wouldn't you like to know
    Guitar Hero II Deluxe
    Yeah, it's just that it's now known that the code was pretty much directly converted between the two assembly formats, especially as far as game logic goes. It was done with the actual original source code, I would imagine, and thus if they truly did lose their old sources, would explain one additional reason they went the emulator route with SMC, and are likely to do the same with SMC+.
     
Thread Status:
Not open for further replies.