Sonic and Sega Retro Message Board: Cycle accurate emulation: Exodus 2.0 + Open Source Release - Sonic and Sega Retro Message Board

Jump to content

Hey there, Guest!  (Log In · Register) Help
  • 3 Pages +
  • 1
  • 2
  • 3
    Locked
    Locked Forum

Cycle accurate emulation: Exodus 2.0 + Open Source Release

#16 User is offline Nemesis 

Posted 30 April 2015 - 07:40 PM

  • Posts: 450
  • Joined: 11-January 03
  • Gender:Male
  • Location:Sydney, Australia
  • Wiki edits:6
I'm pretty happy with the release of Exodus 2.0 overall, but as expected with only me testing the build prior to release, there were a few bugs in some areas I hadn't tested for awhile. There have been enough issues fixed to justify a patch release, so Exodus 2.0.1 is now available for download! Considering it was 2 years between the first two releases, I think 18 hours between these last two is a bit of an improvement. :)/>

Get it now from the current releases page at http://www.exodusemu...current-release

Enhancements:
EX-291 - Improved default workspace loading to restore the main window size and maximized state before the main window appears, removed the maximized state as the default state, and changed the "Mega Drive Clean" workspace to not be maximized.

Bug fixes:
EX-289 - Fixed an error in the Mega Drive ROM loader which prevented games that used SRAM from loading
EX-290 - Fixed a bug in the way embedded ROM file selection was saved which prevented saved systems with an embedded ROM specified from loading
EX-292 - Fixed a race condition in the ViewManager which intermittently caused two "Image" windows to appear on startup
EX-293 - Fixed several issues with device key mapping which prevented new key assignments being made
This post has been edited by Nemesis: 30 April 2015 - 09:58 PM

#17 User is offline Nemesis 

Posted 30 April 2015 - 07:59 PM

  • Posts: 450
  • Joined: 11-January 03
  • Gender:Male
  • Location:Sydney, Australia
  • Wiki edits:6

View Postflamewing, on 30 April 2015 - 07:53 AM, said:

One thing I have been thinking in this regard for the 68k was implementing it using micro-opcode information from the patent/die shots: write one forced-inline function for each micro-opcode, then code each opcode as a sequence of micro-opcodes, with one forced-inline template function per opcode (with parameters being the opcode parameters, such as addressing mode, etc). Then use these to generate a huge switch table for hih speed emulation. All these functions would probably work better as member functions of a 68k class that stores CPU context information, to allow reuse for the SCD CPU.

That would be the ideal, and microcode-level emulation with the correct internal registers and update steps would be essential in order to accurately emulate the exception stack frame information on the M68010 and higher. I actually took a serious look at beginning work on this for Exodus, but I found there was simply not enough information currently known to make a proper start of it, and it's a long road to gather all the information. I'm hoping we'll get there someday. I'm going to focus on something simpler to start with though, which is breaking down opcodes into discrete states based on their external bus cycles, so that an M68000 core can be written which will present with the correct timing externally, which is really the main goal here. Full microcode-level emulation is only required when the internal processor state beyond the bus access level is exposed externally, such as for exception stacks on the M68010 and higher.

View Postflamewing, on 30 April 2015 - 11:30 AM, said:

A quick review of Exodus:

Good news: it works on Wine after manually adding two native DLLs.

Bad news: seems to hang on a critical section after some time; this message starts popping up:
[codeerr:ntdll:RtlpWaitForCriticalSection section 0x13ba560 "waveform.c: WINMM_Device.lock" wait timed out in thread 0048, blocked by 0016, retrying (60 sec)[/code]
After this, the image freezes, and if I try to close Exodus, it will hang on close. Could be a Wine issue on how it implements critical sections, or it could be a race condition on Exodus; I am thinking it may be a race condition due to the way Wine implements these things.


That'll be in the AudioStream support library, and my money is on a Wine bug. The WinMM API takes a hammering in that library order to achieve the low-latency gapless audio playback Exodus needs, without clicks and pops when emulation lags. It looks like the lock is internal to their WinMM implementation. My side of the code is stable and well tested, and I'd be surprised if there was a race condition. An API usage bug is possible though, which the Win32 API might silently ignore. The API documentation is terrible here, so I wouldn't be surprised if either Wine or Exodus is making a mistake.

View Postflamewing, on 30 April 2015 - 11:30 AM, said:

Frame rate is better than previous version, and CRAM dots seem to go to the right spots (so S3&K water line in AIZ looks correct).

The CRAM dots will be more accurate, but still not 100% correct due to a lack of sub-opcode timing in the M68000 core. The VDP has perfect timing though, the M68000 just needs to use the correct timing on its access.

View Postflamewing, on 30 April 2015 - 11:30 AM, said:

Am I correct in assuming that the SRAM bankswitcher is still not implemented?

Correct. Should be an easy task for anyone who might want to give it a go, otherwise I might get to it sometime soon.

View Postsonicblur, on 30 April 2015 - 07:01 PM, said:

I seem to have issues accessing the site. The main page says "THIS ACCOUNT IS NOW ACTIVE!" with a large green background. The link to the download page is a 404.

Is anyone else running into that? I've tried Chrome, Firefox, and Safari, all have the same result.

Someone else reported having trouble accessing the site too. Not sure what's up with it, seems to only be either very short-lived or only affect a few people. I've never seen problems myself. Try a full refresh of the page (ctrl+F5 in Chrome), otherwise no idea what's going wrong.

View PostLocalH, on 29 April 2015 - 11:24 PM, said:

Any chance of an iOS port? I'd love to screw around with it on my iPad Air, especially with the performance improvements. I doubt it, but I don't guess it would hurt to ask. I am not an HLL programmer, so I wouldn't know where to begin.

I won't be working on ports myself, but other people are free to try. I've worked hard to keep the code as platform independent as possible, and isolate any necessary platform-specific code.
This post has been edited by Nemesis: 30 April 2015 - 07:58 PM

#18 User is offline Covarr 

Posted 30 April 2015 - 10:03 PM

  • Sentient Cash Register
  • Posts: 3252
  • Joined: 05-February 07
  • Gender:Male
  • Location:The desert of nowhere, USA
  • Wiki edits:1
For some reason, it seems to hover around 61-62fps when I have throttling enabled, instead of 60. Is this on purpose?

#19 User is offline MarkeyJester 

Posted 30 April 2015 - 10:20 PM

  • Clouded in obscurity.
  • Posts: 1595
  • Joined: 22-July 08
  • Gender:Male
  • Location:Japan
  • Wiki edits:16
Gave both 2.0.0 and 2.0.1 a go. The improved speed is definately there (albeit minor), interestingly, the audio seems responsible for the majority of the slowdown, specifically DAC/PCM (I assume this is due to the YM2612 being constantly sent data at a frequent rate? Correct me if I'm wrong). At any rate, it's definately improved.

The plane viewer is much cooler than I was expecting, the green boxes than bend and reshape based on the scroll positions is a genius idea! Though it seems to crash when selecting sprites while the sprite table is being changed/altered mid-screen multiple times.

#20 User is offline winterhell 

Posted 01 May 2015 - 12:57 AM

  • Posts: 747
  • Joined: 16-October 10
  • Gender:Male
Things to make the emulator great :

- .smd format support(this would include autodetection which is the actual format since some .bin files are actually renamed .smd and vice versa)

- while maximizing the emulator window changes backbuffer size, it should also change the actual viewport's size, and not it remaining in the bottom left corner with the same number of pixels.

- needs a better UI. The File menu is a good start, you would want to take couple of hints from the likes of Kega Fusion for setting the Input.

- while it did detect I have 6-button controller, I cant seem to be able to use it for playing. I'm with the 'USB Genesis RetroPort ' . Apart from it not being configured, in the configuration it doesnt detect A,B,C and Start. This is likely due to the way the controller works and some APIs have trouble with that as well, or cloning the input for A/X, B/Y, C/Z, Start/Mode.
All this being said, I cant seem to be able to control a game with neither the keyboard or the controller(mapped one of the buttons to Start and it still doesn't work)

- I assume you are rendering to a 640x448 pixel buffer. If you copy that to a texture and then have the option for aspect scaling with no filtering(nearest neighbor) it would make many people happy.

Disclaimer: I understand this emulator is primarily for research and development purposes, not so much for the consumers. That being said, having all of those points would make for a several times better user experience. If they are already possible, then they are either not set as the default setting, and I'm having a hard time finding the way to set any of them. And I've been programming for 15 years now.
I can also tell those would take minor effort or time compared to the whole endeavor that is the whole emulator.

Its up to you if you need/want those features. I can assist with testing and OpenGL rendering.

Cheers.

#21 User is offline Nemesis 

Posted 01 May 2015 - 06:19 AM

  • Posts: 450
  • Joined: 11-January 03
  • Gender:Male
  • Location:Sydney, Australia
  • Wiki edits:6

View PostMarkeyJester, on 30 April 2015 - 10:20 PM, said:

The plane viewer is much cooler than I was expecting, the green boxes than bend and reshape based on the scroll positions is a genius idea! Though it seems to crash when selecting sprites while the sprite table is being changed/altered mid-screen multiple times.

Thanks for reporting the issue, I've fixed it in the mainline, and a few other bugs I noticed with the panel while I was checking it out. The next release will fix the problem.

View PostCovarr, on 30 April 2015 - 10:03 PM, said:

For some reason, it seems to hover around 61-62fps when I have throttling enabled, instead of 60. Is this on purpose?

I'm using a pretty cheap and nasty averaging calculation to get that value. I'm pretty sure it's not all that accurate.

View Postwinterhell, on 01 May 2015 - 12:57 AM, said:

Things to make the emulator great :

- .smd format support(this would include autodetection which is the actual format since some .bin files are actually renamed .smd and vice versa)

That would be nice, I simply haven't bothered spending time on these kind of issues yet. This file:
https://bitbucket.or....cpp?at=default
This is where all the platform-specific nastiness of loading raw Mega Drive ROM files belongs. This class takes a random Mega Drive binary, inspects it, and generates a corresponding module file so that it can be loaded in Exodus. This is where SMD support needs to be handled. SMD format is problematic though, because it's insanely system specific. I'll be adding native support for interleaved files to the platform itself, but SMD is another level entirely. To do this in a generic way, you really need to convert the ROM. The loader can do this for you, but it'll still require a copy of the binary. I'm not going to add native SMD support to the platform itself, it simply doesn't belong there.

Quote

- while maximizing the emulator window changes backbuffer size, it should also change the actual viewport's size, and not it remaining in the bottom left corner with the same number of pixels.

Could you give me some specific steps to reproduce this issue? I've tried every way I can think of, and couldn't find any problems here.

Quote

- I assume you are rendering to a 640x448 pixel buffer. If you copy that to a texture and then have the option for aspect scaling with no filtering(nearest neighbor) it would make many people happy.

Not doing anything like that actually. In 32x32 cell mode on the Mega Drive, pixels aren't square, and on top of that, I support mid-screen changes between 32x32 and 40x32 cell modes. To avoid any loss of precision at the actual rendering step, each line is rendered as a strip of pixels, with an associated cell mode. The Image window itself then renders strips of textured quads with each line mapped to an individual polygon. All that said, nearest neighbour filtering is there. Check under "Settings -> Mega Drive -> VDP -> System Settings", and turn off "Enable Line Smoothing". That'll give you what you're after

Quote

- while it did detect I have 6-button controller, I cant seem to be able to use it for playing. I'm with the 'USB Genesis RetroPort ' . Apart from it not being configured, in the configuration it doesnt detect A,B,C and Start. This is likely due to the way the controller works and some APIs have trouble with that as well, or cloning the input for A/X, B/Y, C/Z, Start/Mode.
All this being said, I cant seem to be able to control a game with neither the keyboard or the controller(mapped one of the buttons to Start and it still doesn't work)

No experience with that particular USB device, but there's certainly no custom support for any particular controllers. I'm just using standard Win32 API calls to the Winmm library to handle the input. If the device doesn't work correctly through that API, it won't work correctly in Exodus, or most other Windows software for that matter. If you couldn't get keyboard input to work though, that'd almost certainly be a window focus issue. Try clicking in the image window itself first. Input keys aren't hooked globally, each window handles them, so the image window needs focus in order to process the input. It'd be a problem if you're trying to interact with debug windows, but all "A" key events are being sent to the game input for example.

Quote

- needs a better UI. The File menu is a good start, you would want to take couple of hints from the likes of Kega Fusion for setting the Input.

Agreed, I know the interface has issues with usability. It's actually a hard problem to solve in some cases though, because remember that Exodus is a generic platform. Almost all menu items come through plugins. Try renaming your "Plugins" folder and open Exodus, then check out the menu and you'll see what I mean. The bigger issue however, is that almost all settings are system-specific. Did you know that in Exodus, you can emulate more than one Mega Drive concurrently? Try it, go to "File -> Load System/Module", and select "MegaDriveTestSystem.xml". Now load in a ROM. You'll see you get to choose which cartridge port to map it to. Now load in another ROM for the other system. Now hit run. Both systems will run in parallel, keeping perfect timing. You could now build a device to emulate the "Zero Tolerance Link Cable" for example, and connect both systems together, and they'll talk to each other just like the real system, keeping perfect timing accuracy. Or, someone could build a system module to emulate Pong. They could even load Pong, two linked Mega Drives, a Master System, and a Game Gear all at once. What then is the input mapping window supposed to look like with these cases in mind? Obviously before you can ask about how to map input, you need to ask what you're mapping input for. Kega Fusion doesn't have to worry about this.

The menu is also problematic for similar reasons. The menu system has a structure, which is designed to allow multiple concurrently loaded systems, and multiple independent plugins, to all define settings and expose menu items, without collisions or ambiguity occurring. That system seems a bit cumbersome from a user's perspective though, when they're used to a hard-coded dedicated emulator, which has a known fixed list of settings and one dialog where everything is defined. I'm hoping to come up with ways to simplify menu navigation, but I've got no ideas on that right now that don't break the generic nature of the platform. Personally, I think a better option is to largely abandon the menu entirely for system-specific options, and instead visualize them in a form that's easier to navigate. I'm thinking of a settings window for example, with a tree view on the left showing the tree of all loaded systems and components within the system that define settings, and a main panel area on the right, where the component that's selected shows a docked settings window in the main panel area, or you can doubleclick or something to open a standalone window. A similar tree view approach could work for debug windows. This would allow you to quickly see everything at once, and open anything with a doubleclick, and the main menu can then be stripped of this stuff, and greatly simplified.

Anyway, this is an area that does need improvement. This platform has quite a different set of problems to deal with than other emulators though, because of the generic nature of the system, and that means the solutions are likely to be different too.

Quote

Disclaimer: I understand this emulator is primarily for research and development purposes, not so much for the consumers. That being said, having all of those points would make for a several times better user experience. If they are already possible, then they are either not set as the default setting, and I'm having a hard time finding the way to set any of them. And I've been programming for 15 years now.
I can also tell those would take minor effort or time compared to the whole endeavor that is the whole emulator.

Usability issues are important, and they need to be addressed. I've been working on this emulator for over 8 years now though, and if I waited for all these issues to be ironed out before releasing it, it would never see the light of day. I've got ideas, but limited time. I'm hoping other people might be willing to contribute some of their own time and talents to improve the areas that are most important to them.

#22 User is offline winterhell 

Posted 01 May 2015 - 08:21 AM

  • Posts: 747
  • Joined: 16-October 10
  • Gender:Male
Cool.

http://imgur.com/bEs...BpsAF,YjKw6Dr#0

The first image is the default window. The second is when I double click on the window title/maximize, and the third is fullscreen. All 3 should be 'touch window from inside', or at least the last one.

Yes apparently the input maybe was something to do with the focus, now it seems to work.
Some programs do recognize the controller's 6 buttons properly, some don't.

The Winmm wrapper I use behaves differently than this, but still no full functionality.

Is there a way to change the default Mega Drive Rom path? When I close the emulator it resets. Saving the workspace didnt change things. What does the "Sega Mega Drive ROM Loader" do?

Thanks.

#23 User is offline Meat Miracle 

Posted 01 May 2015 - 08:46 AM

  • Posts: 1568
  • Joined: 11-January 03
  • Gender:Male
  • Wiki edits:2

View PostNemesis, on 01 May 2015 - 06:19 AM, said:

I'll be adding native support for interleaved files to the platform itself


Can you also add support for byte switched files, such as direct rom dumps (or is it already there)?

#24 User is offline sonicblur 

Posted 01 May 2015 - 07:31 PM

  • Posts: 848
  • Joined: 18-February 08
  • Gender:Male
  • Wiki edits:6

View PostNemesis, on 30 April 2015 - 07:59 PM, said:

View Postsonicblur, on 30 April 2015 - 07:01 PM, said:

I seem to have issues accessing the site. The main page says "THIS ACCOUNT IS NOW ACTIVE!" with a large green background. The link to the download page is a 404.

Is anyone else running into that? I've tried Chrome, Firefox, and Safari, all have the same result.

Someone else reported having trouble accessing the site too. Not sure what's up with it, seems to only be either very short-lived or only affect a few people. I've never seen problems myself. Try a full refresh of the page (ctrl+F5 in Chrome), otherwise no idea what's going wrong.

I figured it out. This is either a problem with your server config, or your web host, if the server isn't yours. It happens when you connect over a network that supports IPv6. If I manually disable IPv6 on my machine, such that the browsers can only connect over IPv4, the site works fine. My home network has been set up with full IPv6 support for the last 6 years or so, but unfortunately the majority of ISP's don't even support it so it's hard for people to test against it.

Best of luck trying to get that fixed. :-)

#25 User is offline Nemesis 

Posted 02 May 2015 - 06:28 PM

  • Posts: 450
  • Joined: 11-January 03
  • Gender:Male
  • Location:Sydney, Australia
  • Wiki edits:6

Quote

The first image is the default window. The second is when I double click on the window title/maximize, and the third is fullscreen. All 3 should be 'touch window from inside', or at least the last one.

Hmmm, no matter what I do, I can't seem to re-create this problem. Can you let me know the exact version of Windows you're running? I'll have to give it a go on the same OS. It might be a quirk in the way window sizes are being reported on that version, there have been a few changes to this stuff in each version after XP.

Quote

Is there a way to change the default Mega Drive Rom path? When I close the emulator it resets. Saving the workspace didnt change things. What does the "Sega Mega Drive ROM Loader" do?

There's no way to save the default ROM path right now. I know it's annoying, and something that needs to be fixed.

The "Sega Mega Drive ROM Loader" makes it possible to actually load a random Mega Drive ROM directly in the system. A ROM file is just a data dump out of context, you can't actually do anything with it without making some kind of assumption about what it's for. Exodus is a generic platform, so it can't make those kind of assumptions, and as such, exodus can't load raw ROM files, it can only load modules, which describe what is being loaded, and how to link it to the rest of the system. The Mega Drive ROM loader is an extension that becomes active when a "Mega Drive" system is loaded, and takes care of the platform-specific knowledge required to take a random binary ROM file, and present it as a module to the system so that it can be loaded in Exodus. This is also where game-specific loading "hacks" are applied, like knowing that SSFII is a 40-Mbit game with bankswitching hardware, or that Virtua Racing has an SVP processor attached (Exodus doesn't actually support these yet, but this is where that support would be added). You can bypass the loader completely, and write your own module file to define whatever you want to (like your own custom cart with special hardware), the ROM loader just makes it more convenient to do what 99% of people will want to do, which is just load an existing ROM file dump the way they do currently in other emulators.

View PostMeat Miracle, on 01 May 2015 - 08:46 AM, said:

View PostNemesis, on 01 May 2015 - 06:19 AM, said:

I'll be adding native support for interleaved files to the platform itself


Can you also add support for byte switched files, such as direct rom dumps (or is it already there)?

Yep, the support will be quite comprehensive in this area. At a minimum, it'll need to be able to do everything natively that would be be required to load any of the interleaved or byteswapped ROM dumps that exist for arcade roms currently. I'll make the support as flexible and comprehensive as possible.

View Postsonicblur, on 01 May 2015 - 07:31 PM, said:

View PostNemesis, on 30 April 2015 - 07:59 PM, said:

View Postsonicblur, on 30 April 2015 - 07:01 PM, said:

I seem to have issues accessing the site. The main page says "THIS ACCOUNT IS NOW ACTIVE!" with a large green background. The link to the download page is a 404.

Is anyone else running into that? I've tried Chrome, Firefox, and Safari, all have the same result.

Someone else reported having trouble accessing the site too. Not sure what's up with it, seems to only be either very short-lived or only affect a few people. I've never seen problems myself. Try a full refresh of the page (ctrl+F5 in Chrome), otherwise no idea what's going wrong.

I figured it out. This is either a problem with your server config, or your web host, if the server isn't yours. It happens when you connect over a network that supports IPv6. If I manually disable IPv6 on my machine, such that the browsers can only connect over IPv4, the site works fine. My home network has been set up with full IPv6 support for the last 6 years or so, but unfortunately the majority of ISP's don't even support it so it's hard for people to test against it.

Best of luck trying to get that fixed. :-)

Thanks for letting me know! I've been told by my webhost that IPv6 should now work. I can't test this myself, but let me know if it seems to be working for you now.
This post has been edited by Nemesis: 02 May 2015 - 06:35 PM

#26 User is offline winterhell 

Posted 03 May 2015 - 01:52 AM

  • Posts: 747
  • Joined: 16-October 10
  • Gender:Male

View PostNemesis, on 02 May 2015 - 06:28 PM, said:

Quote

The first image is the default window. The second is when I double click on the window title/maximize, and the third is fullscreen. All 3 should be 'touch window from inside', or at least the last one.

Hmmm, no matter what I do, I can't seem to re-create this problem. Can you let me know the exact version of Windows you're running? I'll have to give it a go on the same OS. It might be a quirk in the way window sizes are being reported on that version, there have been a few changes to this stuff in each version after XP.


Windows 7 64-bit, Aero interface.
Gonna try it later on an old laptop with with the same settings.

#27 User is offline sonicblur 

Posted 03 May 2015 - 10:03 AM

  • Posts: 848
  • Joined: 18-February 08
  • Gender:Male
  • Wiki edits:6

View PostNemesis, on 02 May 2015 - 06:28 PM, said:

Thanks for letting me know! I've been told by my webhost that IPv6 should now work. I can't test this myself, but let me know if it seems to be working for you now.

Still getting the "Lithium hosting Account is operational" page, even if I run in incognito mode to avoid cache & cookies.

According to google, this only affects 6.17% of people right now. Given those odds, it's likely your host can't test their own problem. :-)

#28 User is offline Nemesis 

Posted 03 May 2015 - 04:10 PM

  • Posts: 450
  • Joined: 11-January 03
  • Gender:Male
  • Location:Sydney, Australia
  • Wiki edits:6

View Postsonicblur, on 03 May 2015 - 10:03 AM, said:

View PostNemesis, on 02 May 2015 - 06:28 PM, said:

Thanks for letting me know! I've been told by my webhost that IPv6 should now work. I can't test this myself, but let me know if it seems to be working for you now.

Still getting the "Lithium hosting Account is operational" page, even if I run in incognito mode to avoid cache & cookies.

According to google, this only affects 6.17% of people right now. Given those odds, it's likely your host can't test their own problem. :-)

Could you test This magic address and tell me if it works? If it doesn't, try http://[2604:4500:00...0000:0001:0000].

#29 User is offline sonicblur 

Posted 03 May 2015 - 04:22 PM

  • Posts: 848
  • Joined: 18-February 08
  • Gender:Male
  • Wiki edits:6

View PostNemesis, on 03 May 2015 - 04:10 PM, said:

Could you test This magic address and tell me if it works? If it doesn't, try http://[2604:4500:00...0000:0001:0000].

Both links work for me. Thanks for looking into this problem!

#30 User is offline Nemesis 

Posted 03 May 2015 - 07:01 PM

  • Posts: 450
  • Joined: 11-January 03
  • Gender:Male
  • Location:Sydney, Australia
  • Wiki edits:6
I've made some DNS changes that should propagate over the next couple of days. They'll either fix IPv6 access to the main site, or totally break everything and make the site unusable for anyone. Time will tell. I'd be lying if I said I understood even half of what I'm doing with DNS config.

Based on my tests with http://ipv6proxy.net, the domain is now working over IPv4 and IPv6.
This post has been edited by Nemesis: 03 May 2015 - 08:01 PM

  • 3 Pages +
  • 1
  • 2
  • 3
    Locked
    Locked Forum

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users