Page 1 of 5

BlastEm - Yet another Genesis emulator

Posted: Wed Sep 11, 2013 7:29 am
by Mask of Destiny
It's not as complete or polished as I would like, but as a birthday present to myself I'm releasing the first version of the Genesis emulator I've been working on. The long-term goal is to provide highly-accurate emulation on modest systems that cannot run emulators that take a more direct modeling approach like Exodus or BSNES. There's still a lot of work to be done on the accuracy front (though the direct color DMA technique works fine) and there's a lot of optimizations I want to do once I support architectures that have slower implementations.

Currently you need an x86-64 machine running Linux. x86-32 and ARM are planned for some time in the future. A basic Mac OS X build will probably materialize once I manage to get Snow Leopard installed on a VM or hackintosh again.

More info and download link are here.

I'd like to give a big thank you to Nemesis. His YM2612 notes were invaluable in producing this emulator. Some of his VDP notes were rather useful too, though I ended up duplicating some of that work by accident as I had missed/forgotten his post. I'd also like to thank Charles MacDonald for his VDP documentation. While it could use an update, I still find it to be an excellent resource. There are probably others I should thank as well that I have forgotten and I apologize in advance.

Posted: Wed Sep 11, 2013 8:41 am
by Stef
That sounds really interesting, can be a nice alternative to Exodus for low end system :) Do you eventually plan to provide a win64 binary ? ^^
I know, i can compile it but that would be helpful for many people :)

Posted: Wed Sep 11, 2013 10:42 am
by frederic
Congratulations! Now we have a second Megadrive emulator for Linux that is still maintained (the other one being DGen, but maybe there are others that I don't know of). It's still limited to x86-64, but at least it is not limited to Windows.

It seems to be very fast, I tried to run 6 instances of it (with QuackShot) simultaneously on a Core i3 and they all seemed to run at full speed.

PS: I think there is a minor bug when the program is run with options and tries to save the SRAM: "blastem -f rom.bin" will save a "-f.sram" file, which is not what you want, I guess.

Posted: Wed Sep 11, 2013 3:18 pm
by Mask of Destiny
Stef wrote:Do you eventually plan to provide a win64 binary ? ^^
I know, i can compile it but that would be helpful for many people :)
The main obstacle for a Windows binary is that it uses a few POSIX calls and therefore will not compile under Windows (except maybe under Cygwin). It's not a huge amount of work to port, but it's not a priority at the moment. If enough people ask I might make it a higher priority.
frederic wrote:PS: I think there is a minor bug when the program is run with options and tries to save the SRAM: "blastem -f rom.bin" will save a "-f.sram" file, which is not what you want, I guess.
Argument handling is a bit hacky still. I made a minor improvement to it last night, but for the most part the rom file name needs to be before any options at the moment since there are still some things that assume the romfile is the first argument.

Posted: Wed Sep 11, 2013 3:30 pm
by Stef
I have cygwing installed, if i manage to compile it i can send you the binary :)

Posted: Wed Sep 11, 2013 7:09 pm
by Mask of Destiny
Feel free to post it somewhere if you like, but I'd rather wait until I have time for a proper port to post a Windows build myself. It's really just two things that are needed: allocating executable memory and a mechanism for finding the default config file in the program's directory.

Posted: Wed Sep 11, 2013 8:19 pm
by Eke
I don't have a linux machine so all I can say is I love that emulator name :)

It's very nice to see another MD emulator, especially with the source available. I don't know much about x86 but the cpu core interpreters seem quite interesting and originally designed. The "slot-locked" running VDP is also something quite "refreshing" to look at

Posted: Wed Sep 11, 2013 8:22 pm
by Stef
Ok no worries, i though it was somehow ready to compile for win64 without any modifications as soon cygwin was used to compile.

Posted: Wed Sep 11, 2013 10:51 pm
by Nemesis
Awesome, I'd love to give your emulator a try! Unfortunately, I don't have Linux installed, nor do I ever use it personally. Add me to the list of people who'd love to see a Windows build! :)

Posted: Wed Sep 11, 2013 11:05 pm
by Nemesis
Just been browsing the source, and you've certainly done a good job at keeping it concise! I counted less than 20,000 lines of code. The codebase for Exodus currently weighs in at over 100,000 lines of actual code (140,000 including comments and blank lines)! I can't believe you got a YM2612 core in less than 800 lines of code, mine is over 4000!

There's definitely a place for lean and fast when it comes to emulation. I hope you continue with this project.

Posted: Thu Sep 12, 2013 12:14 am
by TmEE co.(TM)
My FM core is 560 lines (including comments and blanks) but does not have LFO, CSM or SSG-EG yet (but all else is implemented).

When you have win32 build out I'll be happy to try it !

Posted: Thu Sep 12, 2013 1:28 am
by Mask of Destiny
Mine is similarly missing CSM and SSG-EG at the moment. The LFO is half-implemented (the AM portion is missing). There are also a number of instruments that sound fairly awful in some games that I don't think are related to the missing features so things may bulk up as I tackle the relevant bugs.

The kind words are appreciated though.

Posted: Thu Sep 12, 2013 9:52 am
by doragasu
Great news! I will give it a try.

Are you planning to add debugging support using gdb/gdbserver? It would be really appreciated.

Posted: Thu Sep 12, 2013 2:51 pm
by Mask of Destiny
Yes! GDB remote debugging is a feature I was hoping to have for the first release, but I wasn't able to finish it on time. Hopefully will be in the next version.

Posted: Fri Sep 13, 2013 9:23 am
by doragasu
Mask of Destiny wrote:Yes! GDB remote debugging is a feature I was hoping to have for the first release, but I wasn't able to finish it on time. Hopefully will be in the next version.
That's great news!!!

Really looking forward for the next version!!!