YM2612: YMF276-LLE, part 1
This commit is contained in:
parent
c6a0d0e93e
commit
0c727ff6b7
4 changed files with 25 additions and 12 deletions
|
|
@ -289,8 +289,14 @@ void DivPlatformGenesis::acquire_ymfm(short** buf, size_t len) {
|
|||
}
|
||||
}
|
||||
|
||||
void DivPlatformGenesis::acquire_nuked276(short** buf, size_t len) {
|
||||
// TODO
|
||||
}
|
||||
|
||||
void DivPlatformGenesis::acquire(short** buf, size_t len) {
|
||||
if (useYMFM) {
|
||||
if (useYMFM==2) {
|
||||
acquire_nuked276(buf,len);
|
||||
} else if (useYMFM==1) {
|
||||
acquire_ymfm(buf,len);
|
||||
} else {
|
||||
acquire_nuked(buf,len);
|
||||
|
|
@ -1309,7 +1315,9 @@ float DivPlatformGenesis::getPostAmp() {
|
|||
void DivPlatformGenesis::reset() {
|
||||
writes.clear();
|
||||
memset(regPool,0,512);
|
||||
if (useYMFM) {
|
||||
if (useYMFM==2) {
|
||||
memset(&fm_276,0,sizeof(fmopn2_t));
|
||||
} else if (useYMFM==1) {
|
||||
fm_ymfm->reset();
|
||||
}
|
||||
OPN2_Reset(&fm);
|
||||
|
|
@ -1396,7 +1404,7 @@ int DivPlatformGenesis::getPortaFloor(int ch) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
void DivPlatformGenesis::setYMFM(bool use) {
|
||||
void DivPlatformGenesis::setYMFM(unsigned char use) {
|
||||
useYMFM=use;
|
||||
}
|
||||
|
||||
|
|
@ -1441,7 +1449,7 @@ void DivPlatformGenesis::setFlags(const DivConfig& flags) {
|
|||
break;
|
||||
}
|
||||
CHECK_CUSTOM_CLOCK;
|
||||
if (useYMFM) {
|
||||
if (useYMFM==1) {
|
||||
if (fm_ymfm!=NULL) delete fm_ymfm;
|
||||
if (chipType==1) {
|
||||
fm_ymfm=new ymfm::ym2612(iface);
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
#include "fmshared_OPN.h"
|
||||
#include "sound/ymfm/ymfm_opn.h"
|
||||
|
||||
#include "../../../extern/YMF276-LLE/fmopn2.h"
|
||||
|
||||
class DivYM2612Interface: public ymfm::ymfm_interface {
|
||||
int setA, setB;
|
||||
|
|
@ -77,6 +77,7 @@ class DivPlatformGenesis: public DivPlatformOPN {
|
|||
DivDispatchOscBuffer* oscBuf[10];
|
||||
bool isMuted[10];
|
||||
ym3438_t fm;
|
||||
fmopn2_t fm_276;
|
||||
|
||||
ymfm::ym2612* fm_ymfm;
|
||||
ymfm::ym2612::output_data out_ymfm;
|
||||
|
|
@ -84,7 +85,8 @@ class DivPlatformGenesis: public DivPlatformOPN {
|
|||
|
||||
int softPCMTimer;
|
||||
|
||||
bool extMode, softPCM, noExtMacros, useYMFM, canWriteDAC;
|
||||
bool extMode, softPCM, noExtMacros, canWriteDAC;
|
||||
unsigned char useYMFM;
|
||||
unsigned char chipType;
|
||||
short dacWrite;
|
||||
|
||||
|
|
@ -96,6 +98,7 @@ class DivPlatformGenesis: public DivPlatformOPN {
|
|||
inline void processDAC(int iRate);
|
||||
inline void commitState(int ch, DivInstrument* ins);
|
||||
void acquire_nuked(short** buf, size_t len);
|
||||
void acquire_nuked276(short** buf, size_t len);
|
||||
void acquire_ymfm(short** buf, size_t len);
|
||||
|
||||
friend void putDispatchChip(void*,int);
|
||||
|
|
@ -116,7 +119,7 @@ class DivPlatformGenesis: public DivPlatformOPN {
|
|||
void tick(bool sysTick=true);
|
||||
void muteChannel(int ch, bool mute);
|
||||
int getOutputCount();
|
||||
void setYMFM(bool use);
|
||||
void setYMFM(unsigned char use);
|
||||
bool keyOffAffectsArp(int ch);
|
||||
bool keyOffAffectsPorta(int ch);
|
||||
float getPostAmp();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue