Cycle accurate emulation: Exodus 2.0 + Open Source Release

Discussion in 'Discussion and Q&A Archive' started by Nemesis, May 8, 2015.

  1. Nemesis

    Nemesis Newcomer Member

    Joined:
    May 2, 2015
    Messages:
    7
    Hello everyone, hard to believe I didn't have an account here. Has it really been that long? I remember the first SSRG. It's good to see a few familiar names around here. Anyway, enough nostalgia.

     

    You may or may not have heard about Exodus. Exodus is a generic and extensible emulation platform I have been developing for almost 9 years now, which aims to support cycle-level accuracy in emulation, combined with powerful debugging and development tools. Unlike other emulators which are statically compiled to support a particular set of systems, Exodus is open an extensible, with every emulation core supplied through plugins. The platform itself constructs systems from an XML definition of the connections between individual components in the system. This design allows the emulator itself to focus on managing the timing and interaction between the components, and allows the emulation cores to be totally modular and reusable in other systems that share the same components. A lot more information about this is available on the website.

     

    On the 30th of April 2013 I released Exodus 1.0, with support for the Sega Mega Drive. The plugin SDK wasn't ready for use at that stage though, so I held off on the open source release until I could get it up to scratch. Since then I've had delays and setbacks in getting the next release out the door, but the long process is now complete. I'm pleased to announce that Exodus 2.0 has now been released both as binaries, and an open source repository, on the 30th of April 2015. In fact, I've followed up with Exodus 2.0.1 to fix a couple of bugs, and a .2 release will probably be coming soon. I've also published some very preliminary and incomplete developer documentation for the API, more work to do on that over the next couple of months. The code is licensed under MS-RL, and the repository is hosted on Bitbucket. Refer to the website for more information on how to build Exodus from the source, and how to contribute ideas or code changes to the project.

     

    In terms of Mega Drive emulation, the main differences in Exodus 2.0 are as follows:

    -Major speed improvements (average 90% on dual-core systems, 30%-40% on quad-core systems)

    -Around 40% reduction in memory usage

    -Completely redesigned user interface, with a very powerful docking system for window management.

    -Gamepad/joystick support

    -Lots of bugs fixed and new debugging features

     

    [​IMG]

    The release is available on the official website at http://www.exodusemulator.com, so head over there for download links and more information about this project. I hope this emulator of use to some people here, and I hope other people will be interested in contributing to this project, and helping me to expand it into other platforms.
     
  2. ProjectFM

    ProjectFM Optimistic and self-dependent Member

    Joined:
    Oct 4, 2014
    Messages:
    912
    Location:
    Orono, Maine
    This looks like a great program but I can't get it working despite having the Visual C++ Runtime installed. Will this only work for 64 bit operating system because the computer I'm using only uses a 32 bit operating system despite it being able to support 64 bit. Also, this topic should go in the utilities section in the submissions part of the forum.
     
  3. Irixion

    Irixion Well-Known Member Member

    Joined:
    Aug 11, 2007
    Messages:
    670
    Location:
    Ontario, Canada
    First of all, why the fuck are you running a 32 bit operating system in 2015? Especially if your hardware supports it? If you're on 32-bit, you don't have access to 64-bit anything. So get with the times and at least upgrade your OS, jesus, Windows XP is great and all but it's old :|

    Glad to see that this is still being continued Nemesis! I remember waiting for it to be released, eager to try it...only to have it barely reach 50 fps because I had an underpowered machine. In any case, this is something I will certainly be using if I ever have time to get back into rom modification. How much optimization do you think is left to be had? Fantastic to see pure emulation at its finest :)
     
    Last edited by a moderator: May 9, 2015
  4. ProjectFM

    ProjectFM Optimistic and self-dependent Member

    Joined:
    Oct 4, 2014
    Messages:
    912
    Location:
    Orono, Maine
    IT'S NOT MY FAULT I USE A 32-BIT OPERATING SYSTEM. I had this guy install Windows on my laptop after my hard drive broke and I had to replace it. He installed it so I wouldn't have to pay full price for a new operating system and I couldn't do much with Ubuntu. After trying multiple Windows versions, the only one he got to work was Windows 7 32-bit even though the laptop came with Windows 7 64-bit. It really sucks that this happened but it still gets the job done. I'd prefer this over Ubuntu any day, especially since I started hacking Sonic games.

    If you really think I shouldn't have a 32-bit operating system, do you think I should download a pirated upgrade? I prefer keeping what I have over stealing. (If you think I'm stealing by playing Sonic hacks, I own a Genesis with Sonic 1, 2, and Knuckles plus Sonic 1, 2, and CD on the app store.)
     
  5. Pacca

    Pacca Having an online identity crisis since 2019 Member

    Joined:
    Jul 5, 2014
    Messages:
    1,175
    Location:
    Limbo
    This looks great, but it lags the shit out of my system. I understand that a frame perfect multisystem emulation platform is not exactly easy to do, but it slows down to the point of near unplayability. Also, could you make it so the emulator can have a system module loaded by default, and run roms by command line? It's hard to use as a testing emulator when I have to set the module and load the rom separately every time I play (SonLVL sets the rom to run when booting the emulator for ease of playtesting).
     
    Last edited by a moderator: May 9, 2015
  6. Nemesis

    Nemesis Newcomer Member

    Joined:
    May 2, 2015
    Messages:
    7
    A number of people have asked about 32-bit builds. I haven't made an official 32-bit release, because literally any CPU that doesn't have 64-bit support simply isn't worth attempting to use in order to run Exodus. If you've got a decent processor and you're stuck with a 32-bit OS though, you can roll a 32-bit build for yourself. If you follow the build instructions on the website, you'll be able to generate a build you can use.

     

    In terms of performance, I'll refer to this table of systems I've done performance testing on, based on EHZ:



    -----------------------------------------------------------------
                         |Exodus 1.0|Exodus 1.0|Exodus 2.0|Exodus 2.0
                         |   FPS    |  Memory  |   FPS    |  Memory  
    -----------------------------------------------------------------
    Core 2 E7400         |
    (2.8GHz dual core)   |   28FPS  |   869MB  |   50FPS  |  510MB
    Oct 2008             |
    -----------------------------------------------------------------
    Core i7 920          |
    (2.67 GHz quad core) |   61FPS  |   894MB  |   85FPS  |  538MB
    Nov 2008             |
    -----------------------------------------------------------------
    Core i7 3840QM       |
    (2.8 GHz quad core)  |   78FPS  |   906MB  |  100FPS  |  567MB
    Sep 2012             |
    -----------------------------------------------------------------

    So based on my tests, an i7 920, a processor from 7 years ago, runs well above full framerate. Even a Core 2 E7400, a dual-core that pre-dates the i7 line entirely, and might I add one I literally pulled out of the garbage a year ago, almost pulls full framerate. An i7 920 CPU goes for about $20-$30 on ebay. Here's a complete system for $250. I get it, not everyone has $250, or even $20, on hand to buy a better system. I can't do anything about that, but the performance requirements here are not unreasonable. If your system can't run it full speed, you've got a crappy system, end of story. The performance of Exodus right now is as good as I care to make it. It might even get slower from here, as I improve the accuracy of the CPU cores and enhance the bus system. The emulator is open source now though, so anyone is welcome to have a crack at speed improvements.

     


    A system module does load by default in the official release. You can check the initial system setting under "Settings -> Platform Settings". There's no way to load ROM files from the command line currently, but a few other people have asked about command line options now. It's not as easy as it would be for other emulators due to the modular nature of the emulator, but I'll think about the best way to implement the feature. Won't be very much work to do, just need to decide on the best approach from a design perspective.
     
  7. AURORA☆FIELDS

    AURORA☆FIELDS so uh yes Exiled

    Joined:
    Oct 7, 2011
    Messages:
    759
    I have a laptop (Acer Extensa EX2508) with following CPU, and Exodus runs on it ~20-30 FPS at best. Even if I close everything else but the emulator (Yes, using task manager), it still wont run the emulator at any reasonable framerate. Not only that, but I tried with my PC today, which has following CPU, actually runs the emulator between 45-60 FPS, but ROMs either from start or after few seconds will make VDP show white screen, which never goes away. I simply do not know what could be done to fix such a problem. the PC runs Win7.
     
  8. Nemesis

    Nemesis Newcomer Member

    Joined:
    May 2, 2015
    Messages:
    7
    That's a Celeron, it isn't even in the same league as an i7, or even an i5. In fact, your Celeron processor is basically a stripped down version of i3. It's an even more budget version of a budget processor. You've got no hyperthreading, a puny 2MB L2 cache, a burst mode not even worth talking about, and a much dumber, simplified architecture in general. On top of that, you've got a 1.8GHz clock speed. You'll notice the processors I referenced had at a minimum a 2.67GHz clock speed. We had desktop single core processors with a 1.8GHz clock speed 13 years ago. We had quad-core processors with a faster clock speed (and much better architecture) than that 8 years ago. Your processor is ultra-budget and seriously underpowered. I'm surprised it runs as well as it does.

    That said, being a laptop, ensure you always have power connected. That's a note for you and everyone else. Laptops go into energy saving modes when on battery, and often hidden non-configurable modes might I add. My Dell Precision M6700 with an i7 3840QM CPU pulls 100FPS with AC connected, but on battery, even when throttling is disabled and CPU-Z confirms my CPU is running at full clock speed, I lose around 30% in performance. The problem is, the laptop is putting other system components into energy saving modes, and that's slowing down the system anyway. If you did your tests on battery, you might find you get better performance with the charger connected. Or you might not, depends on the system.

    EDIT: Went to find a relevant page on wikipedia showing the relationship between the Celeron and other Core-based CPU's. I expected to find it on this page, and you'll see other Celeron processors listed there, right at the bottom of the table. I was amazed to find the Celeron processor you have isn't even listed there though, because it's not even a Core-based architecture. The N2940 is actually the lower end of the standard power Silvermont-based Celeron processors, a line I didn't even know existed. Silvermont is an Atom microarchitecture, miles below even the i3 in every possible way. The Atom microarchitecture is used mainly in bottom-end netbooks. It gets worse though, because In fact, Silvermont isn't even a mainstream Atom processor microarchitecture, it's actually from the System On a Chip Atom line, which was only ever created to support phones and tablets, and is even lower end than the normal Atom line. That processor is in the very bottom end of a sub-budget line, which is in tern based on a budget line. I literally don't think a worse x86-based quad-core processor has ever been manufactured.

    First of all, that's a dual-core non-hyperthreaded CPU. The fact it runs as well as it does is incredible, the raw clock speed of the processor is obviously high enough for it to manage to push a lot of the work through serially rather than in parallel, despite the inferiour architecture to an i7. So yes, your processor is again underpowered, in the sense that it's a dual-core non-hyperthreaded CPU. We had dual-core processors with hyperthreading 10 years ago. Exodus targets quad-core minimum. You've got 4-5 threads competing for significant processor time during active emulation of the Mega Drive, so with a dual-core system and no hyperthreading, literally over half the threads will be stalled waiting for CPU time. If you could run that processor at around 5GHz, you'd be getting into the ballpark of the performance you could expect to see with a quad-core.

    As for your white screen problem, that does worry me. Do you hear sound continue to play in the background? Does the FPS counter update? What happens when you try and switch to fullscreen mode (click in the image window and press alt+enter)? Try doing a savestate by pressing F5, then bring up the savestate selection window by pressing F6 or F7 on the keyboard. Do you see an image in the savestate window for the savestate you just created, or is the image white there too?
     
    Last edited by a moderator: May 11, 2015
  9. Nemesis

    Nemesis Newcomer Member

    Joined:
    May 2, 2015
    Messages:
    7
    I realize looking back my post might come across aggressive or offensive towards you, and I apologize if it does. I wanted to be clear about the reasons why your computers are under-performing though, and point out where they fit in next to other hardware that's available. I know not everyone can afford to just replace their computer hardware at any time with the hardware of their choice. If you do get a chance to upgrade at some point though, I'd suggest a computer with a quad-core Intel Core i7 CPU, or at least a quad-core i5. As I referenced before, you can get complete machines like this for $250 easily, and cheaper if you look hard enough. People literally throw out or give away hardware capable of running Exodus at full speed nowadays.
     
  10. AURORA☆FIELDS

    AURORA☆FIELDS so uh yes Exiled

    Joined:
    Oct 7, 2011
    Messages:
    759
    I knew when I bought the laptop that the processor wont be exactly the highest end one (and not even nearly), but that its enough for the general usages I have. I've tried to play many games too, and while they run on decent FPS, its not even close to anything I'd expect to play using a gaming PC. I don't know whether its the processor or the graphics card being Intel HD Graphics, but the processor doesn't exactly seem to be as... Useless as you describe it to be. Either way, from my experiences I had the impression the processor was fairly decent one and this is why I let you know about it.

    In fact rarely I have it disconnected when in use, simply because there is usually a charger available and I know it will underperform a lot when not connected

    The processor of my PC is old, something like 5-7 years old at the moment, and I am planning to replace it. At the moment I must save money for driving license and a car however, so I really don't know when I will be able to gather enough money for a processor and mother board. But I do plan to get a 6 or 8 core i7 eventually, since the work I do requires to me to have a fairly good processor, and as a result of not having one, the work is slow as fuck. Unfortunately now I am stuck with this one however.

    The sound updates and so does the FPS counter (hence I could give you the FPS range it runs on). Switching to fullscreen mode does not fix the white screen bug at all, all it does is simply be white in a fullscreen :p

    Trying to load the savestates does not fix the white screen bug, but here is a screenshot of the savestates.


    Also if it is of any use, here is a CPU-Z dump of information about this PC.

    I dont think you were aggressive, but rather informative. I honestly could not think how someone could be offended by such (unless they are 12 years old). But as I stated currently I can not afford a computer upgrade which I really wish I could given how old parts of the computer are (and trust me, this machine was useless when I got it, every part was at least 5 years old and it could not run almost any game at reasonable FPS. So far I got new RAM, new graphics cards and new HDD). Also I don't think around here you can get any decent machine at $250 (~220€), I have looked around places where they sell things (online, such as shops like Ebay) and I can find either old stuff or way more expensive than that. Its the disbenefit of living in a small country that its really hard to find anything good being sold anywhere near me. Buying as new doesn't help either, because computers start from ~400€ and those ones are practically as good as this with its old parts.
     
    Last edited by a moderator: May 11, 2015
  11. Nemesis

    Nemesis Newcomer Member

    Joined:
    May 2, 2015
    Messages:
    7
    Useless isn't the word I would use here. It's all about the right tool for the right job. The chip itself is actually very useful, it's just designed to be useful for a particular set of tasks. That processor is designed specifically around the needs of mobile devices. It aims to give low heat generation, long battery life, and good performance for several concurrent processes with low to medium performance demands, all on a small sized package at a good price point. It's actually a great chip for phones, tablets, and low-end netbooks, because this perfectly matches the kind of requirements people have on those platforms in today's market. People who buy these devices are usually going to be running just a few programs concurrently with very modest performance requirements, like browsing the internet, doing word processing, watching some videos, or running a simple app or game with limited requirements, and they care a huge amount about battery life, so power usage is critical. Stick a top-end an i7 in that role, and it'll literally use 10x as much power, and hence more heat and reduced battery life, with a much greater cost, and little noticeable performance improvement for real use, because the performance requirements weren't high to start with. If that chip was a car, it'd be a 1.3 litre 4-cylinder hatchback: Cheap to buy, cheap to run, easy to park, and handles well in stop-start city traffic with a 50KM/h speed limit. Using an i7 here would be like using a Ferrari in city traffic: expensive, big, difficult to work with.

     

    Exodus however isn't city traffic, it's Formula 1 racing. Unfortunately, the 4-cylinder hatchback isn't going to do too well in that environment. Exodus makes very heavy use of numerous threads concurrently, with significant interaction between them. Both single-core clock speed, and intra-core communication speed are critical for performance, and these are exactly the things that get chopped first if power consumption, heat, price, or size are a factor. For this, you don't want a processor that was built for economy, you want 100% pure speed, even if it dims the lights when you turn it on, and the heat coming off it melts the paint off the wall. That's the difference here. The i7 is more like a top-end Lamborghini, which is what Exodus needs. Your processor is highly efficient, where Exodus wants maximum performance.

     

    Anyway, I understand there's nothing you can do about getting a faster computer right now. It's good to hear how the performance was on your computer though, It gives me a better idea of what the variation in performance is like between platforms. I was surprised that your dual-core beat out the quad-core by almost 50%, it just goes to show that the number of cores isn't necessarily the most important measure of performance, even for threaded programs.

     


    Thanks, I'll see if I can figure out what's causing the problem. The fact that the savestates are generating an image correctly tells me that everything is working correctly in terms of emulation, it's literally the image window that's failing. I notice you're running the latest driver for your graphics card, so I can't suggest an update, bit it is possible that there's a driver issue which is responsible. I'll go over my OpenGL code carefully though and see if I can spot what might be going wrong. I don't have any ATI hardware on-hand to test with though. Anyone else here tried running this who has an ATI graphics card?
     
    Last edited by a moderator: May 11, 2015
  12. Nemesis

    Nemesis Newcomer Member

    Joined:
    May 2, 2015
    Messages:
    7
    Ok, after hunting through all the relevant code, I'm no closer to finding what could be causing the draw problems on your machine. I'd appreciate it if you could do a few things on your machine to capture some extra information about what's going wrong. That should allow be to identify what the problem is even if I can't reproduce it. I'll need you to capture an OpenGL debug trace log. In order to do that, do the following:

    1. Download and install glintercept from here: https://github.com/dtrebilco/glintercept/releases/download/1.3.2/GLInterceptx64_1_3_2.exe

    2. Navigate to "C:program FilesGLInterceptx64_1_3_2", and copy the "OpenGL32.dll" and "gliConfig_FullDebug.ini" files to the directory containing Exodus.exe

    3. Rename "gliConfig_FullDebug.ini" to "gliConfig.ini"

    4. Launch Exodus, load a ROM, and run until the image turns white, then leave it running for a second more, and close Exodus.

    5. Send me the "gliInterceptLog.txt" file that should have been generated in the directory

    I'd really appreciate it if you could do this for me. One other person had a similar problem with the Exodus 1.0 release, and I was never able to determine what caused the problem for him. If I can find a clear indication of what's actually going wrong, it should be easy to fix, and this log should point me to the issue.
     
  13. JoenickROS

    JoenickROS ROS (bug fixing in progress) Member

    Joined:
    Feb 5, 2012
    Messages:
    929
    Quick question, when I run Exodus, the PSG is way too loud, and makes it so I can barely hear the FM channels, is anyone else experiencing this? DalekSam said its because this is what it would sound like on real hardware.
     
    Last edited by a moderator: May 11, 2015
  14. MarkeyJester

    MarkeyJester ♡ ! Member

    Joined:
    Jun 27, 2009
    Messages:
    2,867
    The Gens series of emulators are notorious for incorrect PSG and PWM volume levels. If you've been using the Gens series, then you've gotten used to an incorrect volume level.

    Other emulators such as Kega and Regen, do tend to be rather good with volume though.
     
  15. JoenickROS

    JoenickROS ROS (bug fixing in progress) Member

    Joined:
    Feb 5, 2012
    Messages:
    929
    I use Regen, its like the PSG is at the highest volume 24/7 on here, and I know for a fact all my songs PSG are not at full volume. Also the psg isn't overpowering in SMPSplay as well which I hear is pretty accurate. Also I still have some stock songs, and I don't remember the PSG sounding that loud on those when I last played on hardware.
     
    Last edited by a moderator: May 11, 2015
  16. AURORA☆FIELDS

    AURORA☆FIELDS so uh yes Exiled

    Joined:
    Oct 7, 2011
    Messages:
    759
    This is what Green Hill Zone looks like in my hack. Do note it works on hardware 100%:

    [​IMG]

    For the record no other graphic ever loads, music seems to work though as well as other things

    EDIT: I rebooted Exodus and now it seems to co-operate. No idea what happened there, then

    On other note: I can not remap the keys for Exodus, the application wont allow me to input anything to the remapping window
     
    Last edited by a moderator: Sep 12, 2015