Open vampirefrog opened 5 months ago
My idea for this was to modify the "SndEmu_Start" call to take a pointer to a custom "sound chip lookup" function. The VGMPlayer would then need another function to set that custom callback.
Meanwhile you can probably just overwrite InitDevices()
locally.
Well okay but both solutions would be hacks because yours would depend on libemu.
I was thinking of a VGM parser that just gives callbacks, and maybe some kind of superclass that auto detects VGM/S98/GYM etc. but also gives you callbacks or virtual functions, and preferrably is in C and is used by the vgm player that emulates and by VGM tools that don't emulate.
Here's my interpreter if it helps any.
from a cursory glance, it seems possible to subclass the
VGMPlayer
class and overwriteInitDevices()
to not callSndEmu_Start()
and instead fill in the device definition callbacks manually.Is this the case? And if so, is it possible to make another method, either on the
VGMPlayer
class or on the player base class, that is used to wrap the SndEmu_Start call, maybe call itStartChipCore
or something similar, so then all the player classes can just be inherited and I could just overwrite that new method with a method that makes my ownDEV_INFO
for a fake chip core. Let's assume that all this custom chip core does is dump all the commands sent to the chip with a simpleprintf()
.Do you think this is a good idea, or should I just overwrite
InitDevices()
and it's not really a library issue?