don't click here

Exodus 2.1 release

Discussion in 'General Sega Discussion' started by Nemesis, Aug 31, 2018.

  1. Nemesis

    Nemesis

    Tech Member
    Due to general life circumstances, it's been hard for me to devote much time to my hobbies for a number of years. I'm glad to say, things have changed a lot over the last 6-12 months, and I'm finding myself having more and more time free to tackle big projects again. As a result, I've decided I let my emulator Exodus languish long enough, and I'm restarting active development on the project. I've just made the first release in over 3 years, which fixes a bunch of bugs, improves performance, and adds a few cool new features. If you're interested, take a look on the website. I should be making steady progress on this from now on, so expect more releases and more updates going forward.
     
  2. biggestsonicfan

    biggestsonicfan

    Model2wannaB Tech Member
    1,608
    410
    63
    ALWAYS Sonic the Fighters
    Been wanting to contact you for a very long time regarding this, but also were you more importantly aware we have that rare sega EXE you were looking for that gets flagged as a virus sometimes?

    Also, does this release address the homebrew cart that uses undocumented things? The name of the game escapes my grasp at the moment.
     
  3. Nemesis

    Nemesis

    Tech Member
    The sega.exe process to drive the Cross Products C-Trac CD emulator? Yeah, that's because it contains a virus. Or at least, one version of it does. There were five versions included in the archive of files that were released. One or two of them were infected from memory. These were straight backups from an old dev machine, and it appears that machine was infected with a virus at one point. There are clean versions in the archive.

    Just cracked open the binary, this is the virus: https://www.f-secure.com/v-descs/tai-pan.shtml. If the executable contains the string "Whisper presenterar Tai-Pan" near the end, it's infected. It affects the version under "ARCHIVE\STRIKE\FHTS\EMU" in the released files.

    Nope, it doesn't address game-specific issue like that. The most basic things in that space like bankswitching hardware aren't covered yet, although there is a degree of EEPROM backup memory support. My main focus next will be on getting the 68K->VDP interactions cycle accurate. With that in place, compatibility will go up massively. I'll mostly leave game-specific custom hardware to the end.
     
  4. Nemesis

    Nemesis

    Tech Member
    Here's the full list of infected files from that released archive:
    ARCHIVE\PUB\CROSFADE\CROSMAKE.EXE
    ARCHIVE\PUB\CROSFADE\CROSFADE.EXE
    ARCHIVE\PUB\LENSSRC\LENS.EXE
    ARCHIVE\PUB\GE\V0.EXE
    ARCHIVE\STRIKE\FHTS\EMU\SEGA.EXE

    Annoying but mostly harmless DOS-based virus from the 90's. That kind of thing was common back then. Moral of the story, never trust random ancient disk backups. There's no real worry about the sega.exe process, as there's a clean version of it. The other files could be cleaned with minimal effort, it's really just fixing the entry point and removing the added code block from the end of the file.
     
  5. Overlord

    Overlord

    Now playable in Smash Bros Ultimate Moderator
    19,218
    965
    93
    Long-term happiness
    Downloaded, thanks for your continuing efforts! I've always seen this as the bsnes of MD emus, that there's never really been another equivalent of.
     
  6. biggestsonicfan

    biggestsonicfan

    Model2wannaB Tech Member
    1,608
    410
    63
    ALWAYS Sonic the Fighters
    Yes. I saw on some Assembler post many years ago you and one other person were desperately looking for a version of it at some point. Never knew if you were informed.

    This is rather disappointing to hear. I re-looked it up and the homebrew demos are called Overdrive and Overdrive 2, which apparently used undocumented routines used in the Megadrive, which brings up my internal debate of "cycle accuracy" vs "emulation accuracy" and where the support, considering it is hardware-level accurate, lies.

    I bring this up as a sort of plea not for homebrew support, but for research support to be honest. The Model2b emulator which runs Sonic the Fighters has seemingly unsupported routines because it's emulation state was deemed "100% Playable" vs debug features accessing previously unknown routines within the game itself, which in my opinion, breaks cycle accuracy. This is my own personal stance though and ultimately the progress on Exodus will ensure accuracy and compatibility to the high standards I've always trusted you with over the years.
     
  7. Nemesis

    Nemesis

    Tech Member
    What you need to understand about Exodus right now is that it's incomplete. If it was 100% finished, it would behave identically to the original hardware under all circumstances. A lot of the work I put into YM2612 and VDP research have opened up support for emulating quirks, features, and levels of accuracy in timing and behaviour not previously possible. Those things go directly towards getting demos like Overdrive working, in fact more than a few things they did in Overdrive are directly based on things I first figured out (IE, 128Kb extended VRAM mode). That said, the 68000 processor itself, the heart of the Mega Drive, isn't accurately emulated in terms of timing in Exodus right now, and that's the biggest problem. I can have cycle-accurate VDP port access for example, but if the device talking to it isn't fully cycle accurate, then the timing is ultimately all off. Demos like Overdrive are really cool, and they do push emulation forward, but in my opinion the problem that a lot of other emulators have suffered from is that they chase the public visible signs of inaccuracy, such as a particular game not running right in a certain point, while ignoring the bigger underlying issues. Basically it's reactionary development, patching and patching to fix the visible signs of a problem, sometimes by implementing game-specific hacks to work around it, rather than addressing the things they know aren't accurate or are only approximated. Usually it isn't even possible to fix some of these problems because of design decisions that were made at the very beginning that place an ultimate limit on how accurate the emulation is able to be. The other trap is chasing the feature trail of endless things that can be added, like lightgun support, mouse support, SSF2 mappers, SVP emulation, and the list goes on and on. I'm trying to get the fundamental parts right first, then worry about all the other stuff later later. These emulators are really about emulating the games, not about emulating the platform. This is why homebrew development is often so painful on emulators, because when you actually try and write brand new code and run it on one of these emulators, all bets are off. Some emulators are worse at this than others, but ultimately if they haven't been designed to be able to achieve perfect timing accuracy, it will be possible to write code that works on the hardware but breaks on the emulator, or vice versa. That's what I'm trying to fix with Exodus. It's much slower to do this though, and it often requires detailed hardware research to figure out the correct behaviour and timing first. It also means features that seem obvious and basic in other emulators (IE, Game Genie codes, or loading SMD files) often aren't on my radar. There are already plenty of emulators out there that can play Mega Drive games pretty darn well, and support those features. I'm aiming for something quite different with Exodus. This is really and truly about preserving the platform for all time, not just the games, and to be the ultimate development, reverse engineering, and debugging tool. Being able to actually play games in Exodus comes second, and probably always will. As things move forward though, you'll increasingly see the general "load a game and play" experience improve. It'll just happen more gradually with Exodus than it has in other emulators. Hopefully when it happens though, there'll be no need to write another Mega Drive emulator again.
     
  8. winterhell

    winterhell

    Member
    1,165
    7
    18
    I think Sonic Spinball's options music sounds way better here than the rest of the emulators. And indeed runs much better than last time.
     
  9. Ritz

    Ritz

    Subhedgehog Member
    4,083
    107
    43
    This project wasn't relevant to me at the time of its last release, but looking at it now, I'm starting to appreciate the sheer insanity of developing a multithreaded cycle-accurate emulator. This level of dedication is such a goddamn rarity and I'm glad you're still on board with it. Is there an emulator for any other system out there that supports active disassembly?
     
  10. Nemesis

    Nemesis

    Tech Member
    Thanks, it's an interesting challenge. I've barely scratched the surface of what I want to do with this thing yet. I'd like to branch out into other consoles and arcade hardware in the future. I'll probably keep chipping away at this thing for the next 20+ years.

    I doubt it. I coined the term, it didn't really have a name before. I thought of this disassembly technique back when I was active in this very community actually. I hacked a version of Gens to spit out valid code addresses every hundred cycles or so to a text file, and fed it into IDA Pro to do the first complete disassembly of Sonic 2. It took about a month of fixup work afterwards exploring missing code paths, and fixing all the relative addresses and offsets to complete the work, so that you could actually move things around and recompile it properly. I shared that Gens build and other people continued on with the approach for various other Sonic games, and that's the origin of all the clean Sonic disassemblies that exist today. Prior to that everyone was just patching bits of the compiled binary. I built the active disassembly tools in Exodus to automate what I had to do manually back then, and having been through that process myself and done it the hard way, it helped me understand what the tool would need to do in order to be useful. I had to design the M68000 core in particular though with this feature in mind. You can generally modify an emulator to get a straight PC log out (if you have the source that is), but being able to understand what's a program vs a data reference, understanding what's being used as an offset to generate a relative address, and predict jump and offset tables or offsets inside repeating data structures, that kind of stuff requires a lot of information to be tracked and preserved by the CPU core that generally wouldn't be. It probably isn't possible to retrofit most CPU cores to support active disassembly, you kinda need to built it with that feature in mind, and accept in the process that it's going to run slower than it would otherwise.
     
  11. Sappharad

    Sappharad

    Oldbie
    1,413
    70
    28
    Not to the extent of Exodus, but BizHawk supports Code data logging for multiple consoles with varying amounts of data logged based on the platform:
    http://tasvideos.org/Bizhawk/CodeDataLogger.html

    For Genesis it's simple stuff like what processor accessed the information and whether it was executed or read, but for something like PC Engine they log whether an address was used as a stack pointer, function pointer, etc.
     
  12. Nemesis

    Nemesis

    Tech Member
    That's pretty cool, wasn't aware of those those features in BizHawk (or BizHawk in general if I'm honest). I see it has trouble with checksum routines poisoning the log (avoiding that requires a lot of tracking), but it's able to at least identify accessed data, which is a significant step above simple PC logging. I hope tools like this become more widespread, as they're absolutely invaluable if you're doing reverse engineering.
     
  13. biggestsonicfan

    biggestsonicfan

    Model2wannaB Tech Member
    1,608
    410
    63
    ALWAYS Sonic the Fighters
    Due to our large communication gap, I simply assumed it was found by the Overdrive devs. I'm glad to hear it was the other way around. I was just simply unaware of the order of events and wasn't suggesting a game-specific fix.

    As MAME proves itself to decay to time and I'm loving how detailed the interface and options Exodus has, I would very much be interested if you ever looked into the Model1/2 hardware. Model3 is in active development I think so it may be a long time before we see major headway in that department. I have a nice assortment of physical hardware and technical docs if you're ever interested. I plan on development of my own emulator someday for Model2 games specifically.
     
  14. Xiao Hayes

    Xiao Hayes

    Classic Eggman art Member
    While I wasn't aware of how emulators are made, now that I read this all I'd say that the way you're developing Exodus is the way I'd make an emulator if I knew how. I mean, I get this can be a lot harder, but it's what makes sense, to replicate the whole machine and not just make the game think it's running in said machine. Plus all the technical details you're giving sound way more interesting than playing the games themselves, maybe because we already did that, or, more probably, because I'm learning a lot.
     
  15. ICEknight

    ICEknight

    Researcher Researcher
    Even though I don't think it's decaying in the least since more and more machines keep getting added every month (some of them incredibly rare or not even thought to be emulatable until recently), it has to be said that it's an open project which only decays when people stop contributing, so... please contribute? ;P
     
  16. biggestsonicfan

    biggestsonicfan

    Model2wannaB Tech Member
    1,608
    410
    63
    ALWAYS Sonic the Fighters
    I suppose this thread is as good as any to discuss this a bit:

    My problem with MAME is just how dated it appears at its core. Spaghetti code segments from attempts to emulate parts of the Model 2 hardware are difficult for me to follow, and that side of the contributing scene has been cold and off-putting throughout the decade I've attempted to contact them. However, the passing of time has seemed to retire two main contributors, and I don't really feel like having to reverse engineer the minds of the coders to understand how they were going about emulating the game when the games involved would benefit from a more modern API being written entirely from scratch. That being said, it does need support, but I don't think I'm the guy to add it for how I envision Model 2 emulation, but that's a story for another thread.
     
  17. ICEknight

    ICEknight

    Researcher Researcher
    Oh, fair enough.

    EDIT: Nemesis, please check the PM @ Mame World.