Closed jpcima closed 5 years ago
Okay, I have fixed a bug of CMake script and I have fixed C++98 compatibility of given code, so, it must be fine now. Anyway, what about rhythm ROM? Does MAME pre-icludes them, or need to pass them externally?
So, I'll gonna to put this chipset into OPN2-BE, and then backport CMake-related changes from libADLMIDI.
Just now I have checked out, PSG won't work on MAME, but works fine on NP2 (the implementation on a side branch where I am able to play PSG, but, shitty nosense on the side of my usage implementation, but it's able to produce sound)
Anyway, what about rhythm ROM? Does MAME pre-icludes them, or need to pass them externally?
In MAME's original 2608intf.cpp
the ROM is externally provided.
I just made the bare-bones replacement needed for operation, and I/O callbacks are dummied, so rhythm functionality is expected not to work. (it's maybe the reason for PSG not working as well?)
ROM_LOAD16_WORD( "ym2608_adpcm_rom.bin", 0x0000, 0x2000, CRC(23c9e0d8) SHA1(50b6c3e288eaa12ad275d4f323267bb72b0445df) )
About of rhythm rom: Let's make from that rom the .h file and load as memory block? @Papiezak have referred an OPNA emulator that contains ROM as C headers.
About of PSG: I may guess, some code files are missing and PSG is implemented on another side of MAME...
About of rhythm rom: Let's make from that rom the .h file and load as memory block?
I think pmdwin does it in this way. It's no problem to do the same. More importantly, I should study how MAME makes the interaction work in the 2608intf source.
About of PSG: I may guess, some code files are missing and PSG is implemented on another side of MAME...
From MAME code 2068intf:
class ym2608_device : public ay8910_device,
public device_rom_interface
Probably I should add this emulation: https://fr.wikipedia.org/wiki/AY-3-8910
In mame-2608
I committed some progress on the PSG part that is yet to complete.
Arranged some parts which tie to much with the MAME core, so not to need pulling in dozens of sources.
https://github.com/Wohlstand/libOPNMIDI/compare/mame-2608...jpcima:mame-2608
The PSG connects to ym2608's device by callback interface.
This annoying part is left : PSG has to resample its output. This device generates at its own sample rate that is 1/8 clock rate, for around 1 MHz.
In MAME it has an internal mixer which accepts multi-channel at different rates.
For completion it's needed that I pull in more of MAME code. Resampling is located at src/emu/sound.cpp
and relevant code is sound_stream::generate_resampled_data
.
This adds OPNA from MAME fm.cpp which supports build of different chips with common base. It's separate from fm2612, but it's notable it has also a support of YM2612 and several others.
libOPNMIDI
comments