don't click here

Messin' with Ristar

Discussion in 'Engineering & Reverse Engineering' started by Alien Treasure, Dec 1, 2013.

  1. Alien Treasure

    Alien Treasure

    Bringing you Seven Force since 1993
    20
    0
    0
    Rio Das Ostras, Rio De Janeiro, Brazil
    Exploring Ristar's code, Sonic 1-3K Advance
    OK, I've been lurking around here for a long time since I registered, and now it's time for me to do something (slightly) useful here.

    So recently I started using my GameCube again after it being inactive for many years, and I've began to play Sonic Mega Collection. I already unlocked all games and now I'm mostly making fun/weird stuff happen with the debug mode in the Sonic games and trying to beat Ristar in the Super difficulty and Boss Rush (boy, these modes are HARD).

    As I advanced through Ristar, I began to think of the game's supposed connections to SEGA's blue hedghehog. We all know Ristar was once Volt, which was once Feel which was once an early design/sketch of Sonic, but supposedly the game also runs on Sonic 1's engine. Is that true? Because I doubt it. Really, it sounds so weird to have a late-era title use the same basic code as one from the early era on any console, especially a technically-impressive one such as Ristar (this gets piled with the fact of having wildly different gameplay mechanics too). Not only that, the soundtrack has the same PCM-heavy "feel" of the Sonic 3/S&K OSTs, and some sounds are extracted directly from these games too... Maybe Ristar actually runs on a modified S3&K engine, and not the S1 engine as we supposed? I want proof.

    Also, we should hunt the game's code for a Sonic-style debug/sprite editor mode. It's probably the most fun part of the classic games, and since Ristar is based off them...

    NOTE: I didn't do this stuff myself because I have absolutely no skills at any kind of code whatsoever and I sadly have no time and/or patience to do so. I admire the skills of the people here from Retro, and I surely bet that Ristar will be an easy gem to crack.
     
  2. It sounds like this is a chain reaction of misunderstanding caused by too many successive laymen haphazardly throwing around the term "engine". [I encounter it from time to time working on EDuke32. People say Shadow Warrior and Blood have a more advanced "engine" compared to Duke Nukem 3D. It's not true. Their game code just does fancier things with available engine functionality. But that's a tangent.]

    The technical relationship between Sonic 1 and Ristar has been demonstrably proven but unfortunately the Ristar wiki article on Sega Retro does not give any explanation or references, so I will need someone with more technical knowledge to fact-check me. Basically, the two games share some "components" or "subsystems" of their code.

    The style of music, especially something as ambiguous as "feel", cannot and should not be used to make wild guesses about a game's technical lineage. [I had to resist the urge to post a facepalm image macro in reply to this part.]

    edit: There may be a grain of truth in this question, but only by technicality. S3&K is a direct progression of code that evolved through Sonic 2 and Sonic 1. They are far from distinct, though the code has gotten more advanced with time.

    Protip: You are falling into an unfortunately common newbie pattern: Sharing ideas that seem novel to you at the time in the hopes/expectations that other users will be inspired to action. I will give you that you are a bit more self-aware about it than is usually seen.

    There's no problem with sharing ideas you have, but having been lurking in internet communities for a number of years, I've never seen a new user with only ideas and suggestions inspire any action by other forumgoers--whether you're modding Duke 3D or playing Sonic Mega Collection. Lurk the forums more, read up on the history of the community, and try to do concrete research to see what others have found. The Sonic and Sega Retro wikis are great places to start.

    For a casual question like "Has any research been done to see if Ristar has a Sonic-like debug mode?", the regulars on the Retro IRC channel might be able to give you an answer. Personally, I vaguely recall a Ristar disassembly existing but I can't check because the Mercurial is down. Nonetheless, I've never heard or seen any evidence such a debug mode exists, so far--but I'm sure many of us have wondered.
     
  3. vladikcomper

    vladikcomper

    Tech Member
    205
    134
    43
    Sonic Warped
    I wouldn't say Sonic 1 is not a suitable engine to start out a game like Ristar. Frankly, I don't get your point there. What's particularly bad in using older game's software, especially when the software in the question runs on the exact same console? Were there any changes to Sega Genesis hardware which would make Sonic 1 software outdated and incapable in 1994? There were not. It's the exact same piece of hardware as it was back in 1991 and as long as the original engine is designed well enough and easy expandable, there's no reason not to re-use it.

    Out of all Sonic games, Sonic 1's engine would suit the best to create any different platform game out of it. The engine was quite more 'basic' compared to later games, mainly because of being the first game in the series, suggesting somewhat new gaming formula and various unique concepts, it was more than innovative back in the time. Without a doubt, Sonic Team was setting experiments all the way through the development process, just check out early prototype shots from 1990 - it was the whole different game taking place in a different universe. Thus, their engine was trying to be generic to handle quickly changing concepts and formulas. Which is why Sonic 1 is the most expandable engine. In later games their went with optimizing that engine to that Sonic formula established by the first game in the series. Hence, later engines are overloaded with Sonic-specific features, they implemented rings manager, the whole game logic was tweaked to handle sidekick etc.

    Personally, I can't tell for sure whether Ristar was using Sonic 1's basic engine or not. I can only share my thoughts why it is considered so. Ristar's level layouts use 256x256 chunk system, just like Sonic 1 did. Later Sonic games migrated to 128x128 chunks, since the level became less linear, larger and featured swapping pathes. The other thing is that Ristar uses SMPS 68k, again, just like Sonic 1. Later Sonic games changed it to SMPS Z80 with slightly different music format (pointers and coordinate flags worked differently), while Ristar's sound driver, apart from some improvements, is nearly identical to Sonic 1's.

    That's all I can tell you.
     
  4. flamewing

    flamewing

    Emerald Hunter Tech Member
    1,161
    65
    28
    France
    Sonic Classic Heroes; Sonic 2 Special Stage Editor; Sonic 3&K Heroes (on hold)
    I wouldn't say that Ristar's sound driver is at all similar from S1's -- in many ways, it is closer to the S3&K's, despite being 68k. For example, its coordination flags are closer to S3&K's, and it has meta-coordination flags like the S3&K driver (and unlike the S1 driver). Some parts are similar enough that I used the Ristar driver as a source of bugfixes for the S3&K driver.

    In other ways, it is dissimilar to either: the z80 side has two drivers that are dynamically swapped at several points, one "simple" version that can play a single PCM track, and another version that can play one or two PCM tracks simultaneously (by averaging the PCM values of both tracks and sending the result to the DAC). There is even a sound driver commands to swap between the drivers ($C7 for simple PCM, above $E8 for dual PCM).

    I can't comment about the rest of Ristar, though...
     
  5. Thousand Pancake

    Thousand Pancake

    Being a food you put milk on and then eat in the m Member
    360
    0
    0
    For the record, I've managed to convince people at AtariAge to work on a version of Ballblazer for the Atari VCS/2600 without any skills of my own. :v:
     
  6. Lilly

    Lilly

    Member
    2,429
    238
    43
    United States
    Shang Mu Architect
    It's interesting you inspired a new project, but still pretty rare that somebody with no skill in that area can spark some forum goers to dive into a new idea. Generally, you have to already have some groundwork done yourself before anybody hops on board, and I was honestly expecting some of that here with the topic title.

    I am pretty sure it's well known that Ristar has been poked and stabbed at quite a few times in the past, revealing those similarities between Sonic 1 and itself, but I imagine a lack of interest has kept anybody from making any tools to hack away at it. I'd disassemble it myself if I knew a single thing about ASM, but I'd probably wind up doing that to the original Shantae on the GBC if I did anyway; so many little things I'd love to know, observations and extensive play testing can only tell you so much.

    Although it's very interesting to know S3&K's sound driver is more similar to Ristar's than Sonic 1's, flamewing, that's exciting. At least something new cropped up here in this topic.
     
  7. Machenstein

    Machenstein

    Member
    830
    0
    0
    Speaking of ideas that won't be acted upon, I always wondered what Ristar would be like with a sprint ability similar to Shinobi III or Kirby Superstar. If sprites were done for a sprinting animation, would anyone be interested in coding such an ability into the game?
     
  8. Alien Treasure

    Alien Treasure

    Bringing you Seven Force since 1993
    20
    0
    0
    Rio Das Ostras, Rio De Janeiro, Brazil
    Exploring Ristar's code, Sonic 1-3K Advance
    Woahwoahwoah, sprinting sprites? That's something new for me, as TCRF doesn't list them in their page on the game. Really, I always tought that Ristar's gameplay, while very creative, is kinda sluggish. Sprinting/dashing would probably solve the problem, along with better wall-jump mechanics <.<
     
  9. Machenstein

    Machenstein

    Member
    830
    0
    0
    I didn't mean to imply that there are unused sprinting sprites in the game. I just wonder if someone would code a sprinting ability into the game if someone else made custom sprites of Ristar sprinting.
     
  10. MarkeyJester

    MarkeyJester

    Original, No substitute Resident Jester
    2,202
    432
    63
    Japan
    According to wikipedia, Yuji Naka is credited under "Designer(s)", likewise Sega Retro has "Sonic Team" under "Developer:". Interestingly the credits in-game do not mention anything regarding "Sonic Team", Yuji Naka, Naoto ?shima, Hirokazu Yasuhara, or Manabu Kusunoki. The only real information I could find that explains what they may or may not have done is here:

    I also checked the production history of the Sonic Team individuals and found no information of Ristar anywhere, were there more people part of Sonic Team in 1994-1995?

    Technically speaking, appart from similarities between only two singular systems, the level structure system and sound driver (that of which are not third party developement resources, and belong to SEGA exclusively), we have no evidence that Ristar was "built on" Sonic The Hedgehog. The definition of "Engine" is rather fluid though. Resources get reused from the main company all the time, such as compression formats, or sound drivers.

    The sound driver (SMPS 68k as it seems to be referred to), was written and provided by SEGA themselves, for use by any developer (including third party developers), and was improved upon during the years. Most developers moved over to using the Z80 varients provided, probably for functionality's sakes. Ristar however, has sections during the game that require both drums to be playing, and the character's voice, without interruptions. Hence the need for a double (dual) PCM playback as flamewing noted, which explains why the 68k varient was used.

    As for the level structure system, I have done some research on this, and it seems that the number of 256x256 chunks used goes up to 3F (40), this is in fact FF (100) for the smaller 128x128 chunks. Both systems (with the large one only using 40 chunks) would result in the same size chunks (data wise), BUT, the layout data for 256x256 would 3/4 smaller in size, and thus benefitial for saving data, and yet, both have the same overall drawing space.

    As you can see, there are some technical reasons to use those very specific resources, which distances the idea of Ristar being built off of a Sonic game. I don't know about anyone else, but I personally need to see better evidence before I can believe any of this "built off of" crap.
     
  11. Lilly

    Lilly

    Member
    2,429
    238
    43
    United States
    Shang Mu Architect
    So there's a good chance Ristar is all its own thing, but uses similar drivers/libraries to other SEGA published titles? That's very mind-opening, and it sounds a lot like what goes on in the industry now, with many games using Havoc physics.
     
  12. TmEE

    TmEE

    Master of OPL3-SA2/3 Tech Member
    1,726
    2
    18
    Estonia, Rapla City
    T-04YBSC-A !
    Fun Fact : Astal on Saturn uses a font used in Ristar for some things.
     
  13. Alien Treasure

    Alien Treasure

    Bringing you Seven Force since 1993
    20
    0
    0
    Rio Das Ostras, Rio De Janeiro, Brazil
    Exploring Ristar's code, Sonic 1-3K Advance
    Astal has big aural similarities to Ristar... Maybe it was planned to be a Saturn port/version of the game?

    Also, it's so good to see such discoveries and theories pop up! Ristar is a game that deserves more attention from the Retro community :)/>
     
  14. Overlord

    Overlord

    Now playable in Smash Bros Ultimate Moderator
    19,239
    972
    93
    Long-term happiness
    Didn't drx do a Sonic 1 hack with Ristar levels in? I vaguely remember seeing that somewhere. Might have been a custom savestate.
     
  15. Alien Treasure

    Alien Treasure

    Bringing you Seven Force since 1993
    20
    0
    0
    Rio Das Ostras, Rio De Janeiro, Brazil
    Exploring Ristar's code, Sonic 1-3K Advance
    That's an interesting note, Overlord - we'll have to hunt it down in the Retro archives... Did the music get ported too?
     
  16. Rika Chou

    Rika Chou

    Tech Member
    5,276
    169
    43
    I don't remember if he ever released that, but I remember him posting about it.
     
  17. vladikcomper

    vladikcomper

    Tech Member
    205
    134
    43
    Sonic Warped
    Speaking of the engine. Here's a quote from the man who did massive research in Ristar years ago, figured out many RAM addresses and how they worked with the engine, as well as game formats, including objects. The post quoted is from the exact same thread that Rika Chou linked above.
    For those who are interested, Ristar's memory map and objects format are documented in the first post of that thread.
     
  18. Alien Treasure

    Alien Treasure

    Bringing you Seven Force since 1993
    20
    0
    0
    Rio Das Ostras, Rio De Janeiro, Brazil
    Exploring Ristar's code, Sonic 1-3K Advance
    Thanks, Vladi and Rika! I'm gonna download drx's stuff and PM him about the disassembly... Maybe this will be my first project on here! Wish me luck! :D
     
  19. RetroKoH

    RetroKoH

    Member
    1,662
    22
    18
    Project Sonic 8x16
    Looked at the topic noted above. Boy did I learn a little bit. I never knew what this Star compression format was, and on GitHub there is a decompressor for Star compression. For those who don't know (being anyone new to Ristar hacking), this game uses Nemesis and Star compression

    Anyone could find that out on the drx topic or the GitHub but I thought I'd note that for anyone new to hacking this game who are viewing the latest posts...
     
  20. Sith

    Sith

    The molotov bitch Member
    I have no knowledge of code or disassemblies so I leave those insights to the tech members.
    What did always strike me though is how different the S1 color palettes were compared to later Sonic games on the Genesis/MD and how Ristar is so similar to S1 in styles of colors used.