BlastEm - Yet another Genesis emulator

Talk about development tools here

Moderator: BigEvilCorporation

Mask of Destiny
Very interested
Posts: 624
Joined: Thu Nov 30, 2006 6:30 am

BlastEm - Yet another Genesis emulator

Post by Mask of Destiny » Wed Sep 11, 2013 7:29 am

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.

Stef
Very interested
Posts: 3131
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Post by Stef » Wed Sep 11, 2013 8:41 am

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 :)

frederic
Interested
Posts: 23
Joined: Tue May 28, 2013 7:32 pm
Location: France

Post by frederic » Wed Sep 11, 2013 10:42 am

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.

Mask of Destiny
Very interested
Posts: 624
Joined: Thu Nov 30, 2006 6:30 am

Post by Mask of Destiny » Wed Sep 11, 2013 3:18 pm

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.

Stef
Very interested
Posts: 3131
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Post by Stef » Wed Sep 11, 2013 3:30 pm

I have cygwing installed, if i manage to compile it i can send you the binary :)

Mask of Destiny
Very interested
Posts: 624
Joined: Thu Nov 30, 2006 6:30 am

Post by Mask of Destiny » Wed Sep 11, 2013 7:09 pm

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.

Eke
Very interested
Posts: 885
Joined: Wed Feb 28, 2007 2:57 pm
Contact:

Post by Eke » Wed Sep 11, 2013 8:19 pm

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

Stef
Very interested
Posts: 3131
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Post by Stef » Wed Sep 11, 2013 8:22 pm

Ok no worries, i though it was somehow ready to compile for win64 without any modifications as soon cygwin was used to compile.

Nemesis
Very interested
Posts: 791
Joined: Wed Nov 07, 2007 1:09 am
Location: Sydney, Australia

Post by Nemesis » Wed Sep 11, 2013 10:51 pm

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! :)

Nemesis
Very interested
Posts: 791
Joined: Wed Nov 07, 2007 1:09 am
Location: Sydney, Australia

Post by Nemesis » Wed Sep 11, 2013 11:05 pm

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.

TmEE co.(TM)
Very interested
Posts: 2443
Joined: Tue Dec 05, 2006 1:37 pm
Location: Estonia, Rapla City
Contact:

Post by TmEE co.(TM) » Thu Sep 12, 2013 12:14 am

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 !
Mida sa loed ? Nagunii aru ei saa ;)
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen

Mask of Destiny
Very interested
Posts: 624
Joined: Thu Nov 30, 2006 6:30 am

Post by Mask of Destiny » Thu Sep 12, 2013 1:28 am

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.

doragasu
Very interested
Posts: 125
Joined: Tue Oct 09, 2012 8:15 am

Post by doragasu » Thu Sep 12, 2013 9:52 am

Great news! I will give it a try.

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

Mask of Destiny
Very interested
Posts: 624
Joined: Thu Nov 30, 2006 6:30 am

Post by Mask of Destiny » Thu Sep 12, 2013 2:51 pm

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.

doragasu
Very interested
Posts: 125
Joined: Tue Oct 09, 2012 8:15 am

Post by doragasu » Fri Sep 13, 2013 9:23 am

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!!!

Post Reply