don't click here

Sonic 1 with Redbook Audio

Discussion in 'Engineering & Reverse Engineering' started by theocas, Dec 4, 2011.

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

    theocas

    Tech Member
    346
    0
    16
    I doubt this'll become standard in hacks anytime soon until people figure this out themselves. Our source code is a giant mess, and due to some other things we've got planned, we most probably (99.999999999%) won't be releasing it, mainly for the reasons you outlined.
     
  2. Chilly Willy

    Chilly Willy

    Tech Member
    751
    9
    18
    Doom 32X
    You have the ram backwards. Word ram is 256KB and can be accessed by both the main and sub CPUs. It can be one block of 256KB that is accessed by either the main CPU or the sub CPU, where the switch tells which CPU has exclusive access to the one block. Or it can be two blocks of 128KB where one 128KB block is accessed by the main CPU and the other 128KB block is accessed by the sub CPU, where the switch tells which CPU gets which block.

    Program ram is 512KB and is meant for exclusive access by the sub CPU. The BIOS takes the first 24KB of the ram, with the rest being available for programs. The main CPU can access the program ram, but it has to halt the sub CPU first much like you halt the Z80 before accessing the Z80 ram. The main CPU sees the program ram as four banks of 128KB - the sub CPU see the program ram as a single 512KB block.

    Note that it's WORD RAM, not work ram. Work ram refers to the 64KB of ram accessed by the main CPU in the MD itself, not any ram in the CD. Word ram must be in 256KB mode (called 2M mode) to do rotation and scaling, and it (obviously) needs to be switched to the sub CPU side as well so the ASIC can access the word ram for drawing.
     
  3. Blastfrog

    Blastfrog

    See ya starside. Member
    I really think you guys should release the source regardless, so that others can clean up the code if they wanted to, and/or have it be used as an educational reference for people looking into coding for the Sega CD.

    What's wrong with it? How is it a bad thing if many (and probably not that many would attempt it anyway) hacks started having access to the Sega CD hardware? I just don't see the logic in this point at all. Sonic 32x's source code was released, and not many people bothered with it.
     
  4. LazloPsylus

    LazloPsylus

    Buried under SSRG Somewhere Tech Member
    154
    0
    0
    Academy City
    SSRG, world domination, a billion and one research projects...
    There's a multitude of reasons why the 32x source isn't used, a few of which include a lack of need for what the 32x can bring to a hack and how few people understand how to work with the source, because working with the 32x brings about a slew of new rules for which you have to play by to keep your code working properly, and even after all that, I don't recall if it even works on real hardware. For the S1M1 source, it is incredibly easy to break if you don't know what you're doing. It took weeks of research and experimentation before getting the code to work on a Genesis ROM to begin with, and that was before we even implemented it into Sonic 1. The code is incredibly sensitive, introduces a ton of new rules to work with, and does manage to work properly on real hardware, not even mentioning the fact that we tooled it specifically to how we work, which may or may not break if you start screwing with too much. The Sega CD is incredibly picky on how the code works, and if something is only slightly off in the initialization or in the Sub CPU code, things grind to a halt, and unlike most other configurations with the peripheral hardware, there is no easy way to debug it. KMod has no support for Mode 1, and Regen has no CD support, so there are no real debuggers for diagnosing what's breaking on the Sub CPU code, and there's almost no one around that works with the Sega CD, much less Mode 1. When things break for the source, there's only a few people that can possibly help, and we don't want to wade through a mountain of messages concerning people who don't know what not to touch and end up breaking Mode 1 support.

    tl;dr There's way too many things that can go wrong with this source code and almost no one who knows the code well enough to know how to debug it and follow all the needed rules, because almost no one has taken the time to learn how to work with the Sega CD.Working with the Sega CD is a bitch and a half. People don't like reading through a mound of tech documents to understand how to interact with the Sega CD. We aren't releasing the source code because it's a mess that we know how to use and no one else. You may get lucky further down the road and we change our minds and spend the time needed to make the code usable to other people, but for now, no.

    Meanwhile, to respond to your discontent about possibly avoiding a source release because almost everyone would spam it, we happen to agree with Elektro-Omega. We don't want to see something this sophisticated and advantageous in a simplistic hack that just shoves in someone's favorite soundtrack to a bunch of lightly-modified (or even non-modified) acts. Call us elitist pricks all the hell you want, but we want to see this used in a quality hack that can greatly benefit from the additional custom CD-DA soundtrack, and not in absolutely everybody's cheesy hack. Mode 1 is an amazing technical achievement that took many hours of research and a lot of our patience. To see something with such potential wasted in a hack that abuses it as nothing more than another gimmick that does little to add to the actual hack gives a very disheartening impression that we've wasted our time for people who don't know how to truly take advantage of the possibilities that this code can present. I mean, look at Sonic Boom, or the S Factor, or Megamix. None of them share their source code with the public, because everyone would just waste the code by tacking it into every hack and making all of that work just seem like another bunch of common gimmicks. All of them stand by the idea that if you want a feature bad enough, you need to take the time to make the code on your own and make the idea yours. This is one of those same ideas. We don't want this to become "Just Another Common Gimmick", like having a spindash in Sonic 1. You don't like it? Do the work, do what we did, and release the source code.

    And with that, I'm going to duck and cover for the inevitable shit-flinging over the fact that we won't release the code because we're "elitist pricks"...
     
  5. Blastfrog

    Blastfrog

    See ya starside. Member
    Elitist prick. :P

    But no, seriously, those were some pretty legit points, it changed my mind about both issues. Still, I'm curious, did you guys discover any new quirks about the Sega CD hardware while working on this?
     
  6. Aerosol

    Aerosol

    Not here. Moderator
    11,042
    417
    63
    Not where I want to be.
    Sonic (?): Coming summer of 2055...?
    I don't see why you should care if people make shitty hacks. No-one will pay attention to a shitty hack, even if it has OOH REDBOOK AUDIO. I've had this argument before with other people though, and I don't care to again. Like you said, it just devolves into shit-flinging and name-calling.

    I'll just wait patiently for this to be done with Sonic 2 or 3&K cause I still can't stand Sonic 1, even with Redbook audio.
     
  7. LazloPsylus

    LazloPsylus

    Buried under SSRG Somewhere Tech Member
    154
    0
    0
    Academy City
    SSRG, world domination, a billion and one research projects...
    We really didn't discover any new quirks about the Sega CD hardware. Most of the quirks have already been found by the homebrew devs who have been coding Mode 2 Sega CD programs, if not already spotted from sifting through all of the technical documentation. Aside from how we had to implement drive access and initialization (because the code is stored on the cart and not a CD), any quirks we ran into were pretty much known before we did this.
     
  8. Maxd

    Maxd

    Member
    661
    0
    0
    Alabama
    Mixin'
    Oh, but you already can.
     
  9. Aerosol

    Aerosol

    Not here. Moderator
    11,042
    417
    63
    Not where I want to be.
    Sonic (?): Coming summer of 2055...?
    That isn't supported on a Sega CD :colbert:

    EDIT: Also, I don't get any audio, but Chilly's little demo works just fine using the same instructions and audio cd. Any ideas?
    EDIT2: I just tried again and now Kega just crashes. Eh.
     
  10. Andlabs

    Andlabs

    「いっきまーす」 Wiki Sysop
    2,175
    1
    0
    Writing my own MD/Genesis sound driver :D
    Since it sounds like you want to expand this into something bigger, perhaps just make a template with redbook audio similar to what Sonic 1 32X is and release that? The worst that would happen is people making their own soundtrack playlists and sharing those, and what harm is that?
     
  11. Chilly Willy

    Chilly Willy

    Tech Member
    751
    9
    18
    Doom 32X
    Sonic1mode1 has a few bugs, still. I noticed things like - they set the wrong registers on startup for requesting the bus and reseting the Sub-CPU, they set a few pages of the Program RAM as write protected when they shouldn't, and they don't seem to check both locations the Sub-CPU BIOS could be located at.
     
  12. LazloPsylus

    LazloPsylus

    Buried under SSRG Somewhere Tech Member
    154
    0
    0
    Academy City
    SSRG, world domination, a billion and one research projects...

    Alright, 1) How do you know we're doing things wrong when there's no emulator that can run this that has a debugger unless you've reverse engineered our code, and 2) Thanks for using our init code in your player (read: not.). theocas and I know that you had access to the original init code because he came to you asking for help and showed you a lot of the code. Low and behold, when you released that player a few days later and open sourced it, we peeked at the code to find that we were looking at our init code. Quite frankly, we don't find bug reports nice at all when they're found by RE'ing our code. There's a sort of dickishness associated with cracking our code open and analyzing it, much in the same strain as if someone were to go and RE a hack like Sonic Boom or the S Factor (I'd mention Megamix, but there was that leaked source mess from a few years ago, so...). You just don't do it. Actions like that make us strongly reconsider releasing anything around here.

    You can't really know about the registers we set or how we're doing the init without seeing our code, and unless you went and RE'd our most recent version to do that, none of that code has been shared with you. For all you know, we've completely changed our init routine from the original one that you lifted from the chat with theocas and used in your own player that you open sourced. Once upon a time, I thought there was an unspoken rule of sorts about not RE'ing each other's code and/or using code from other peoples' work without asking the person that made the code originally first. All in all, we're questioning releasing anything here anymore if people go and openly take our code without permission. The worst part is who it came from. We may have expected something like this come from a Member or lower, but a Techie? That's very low. We're not Techies (and probably will never be at this rate), and you leech from us? That is not a message of trust and respect that we expected from a member of a group of such high stature on this forum.


    Also to note, we weren't planning on mentioning this on the forums and creating a shitstorm, but you've pushed our buttons just a bit too much to ignore anymore. We we're open to discussing this on civil terms, but our hopes are not very high for a clean resolution of this bullshit. We're on IRC, we're out here sometimes, and we're on Skype. You want to discuss this? By all means, come. Our expectations are very low for resolving this crap.

    Now, for an announcement that we didn't want to make, but will: Team Evanesco will be making one more release very soon, and then that's it. Show will be over. This little incident quite rightly made us very angry, and we've made a personal decision to not do any more releases of some of the cool shit we've been working on. There's tons of stuff that can be done with Mode 1, and we were actually tempted to openly show off the code when we had the code fully debugged and cleaned up so that anyone could use it who could understand it. Now, we're not so sure people are mature enough to use such code to do amazing things.

    tl;dr This is why Retro can't have nice things.
     
  13. theocas

    theocas

    Tech Member
    346
    0
    16
  14. Chilly Willy

    Chilly Willy

    Tech Member
    751
    9
    18
    Doom 32X
    You're making yourself look ignorant. I was the one who helped theocas work out how mode 1 works. You've probably got some of MY code in yours! :eng101:

    I disassembled your startup code when I read there were problems with s1m1 to see how it differed. I figured I'd let you know what you were doing wrong so you could fix it. Sorry for trying to be helpful. YOU are the kind of person that makes hackers disappear, not me. I make the scene possible by helping everyone who asks, and making all my code and tools open. You're welcome. :rolleyes:

    You're talking about yourself, of course, not even realizing it. :specialed:
     
  15. Aerosol

    Aerosol

    Not here. Moderator
    11,042
    417
    63
    Not where I want to be.
    Sonic (?): Coming summer of 2055...?
    While I appreciate you letting the source out, I'm lamenting the circumstances by which this happened. Hopefully you guys can work your differences out behind the scenes or something, cause I feel a shitstorm a-brewin' that doesn't need to be brewed. We can all get along, right?
     
  16. Blastfrog

    Blastfrog

    See ya starside. Member
    I take back what I said about agreeing with Iron Sonic after seeing his most recent post in this thread.
     
  17. LazloPsylus

    LazloPsylus

    Buried under SSRG Somewhere Tech Member
    154
    0
    0
    Academy City
    SSRG, world domination, a billion and one research projects...
    I know you helped him out by giving him information. He, nor I, asked for a single bit of code from you. And I have read those logs, so I'm not an ignorant fool that knows nothing about that conversation.

    As for your ideological stance, I just find it funny that you hold us as the people that are making hackers disappear. Especially when, in the original scheme, we were going to clean up and improve the source so that people could do far more than just play audio with it, as well as include a wiki full of documentation that would complement it along with give documentation for a ton of other data. Now that you've decided to go and shit on our plans, we've just given the community a highly watered down version that does only what S1M1 does. You're telling me that hackers rather want a limited code base that does little instead of a product that could have done loads more. Yeah, we're really trying to make hackers disappear by working to make a product that everyone can use and do far more with...

    Anyway, this is the last response theocas and I will make concerning S1M1. All of you got your source. We have nothing more to say on this matter that won't start a shitstorm. Look at us as good or bad, we don't care. Call us dickweeds, cunts, assholes, the cause of disappearing hackers, or whatever else any of you come up with. We're done.
     
Thread Status:
Not open for further replies.