Open superctr opened 3 years ago
I'll probably go with just porting the C++ versions over as they are. (except for making it more C++98 compatible maybe) As long as there is a C interface, I think this is fine.
I think I prefer plain C to C++ just in order to avoid a dependency on libstdc++ and templates causing the binary size to balloon. But if you're able to avoid that, then I think it would be fine.
Plain C would be my preferrence. (I recently ran into trouble with C++ libs and MSVC.) But I think just to get started, C++ would be fine as well.
I would like to share the work I'm doing with this cores: https://github.com/LeonardoDemartino/mame_fm_bsd_cores I have extracted the main parts of the cores and removed any dependencies whatsoever with the rest of the MAME classes and structures (it was a pain to do this). YM2612, YM2151 and YM2610 are working fine.
Feel free to use it and/or improve it.
By now Aaron made the cores more selfcontained: https://github.com/aaronsgiles/ymfm
Aaron Giles' rewrite of the old MAME FM cores was recently merged in the last MAME release.
It is supposedly more accurate than the previous cores, and also has a more liberal license (BSD-3-clause instead of GPL).
I think it would be good to include it in libvgm, although it would probably need a lot of work to remove the "C++-isms" to port it to C.