YM2608-LLE, part 1 - DOES NOT WORK
This commit is contained in:
parent
790502726f
commit
94e9aee874
6 changed files with 98 additions and 36 deletions
|
|
@ -158,7 +158,8 @@ class DivPlatformOPN: public DivPlatformFMBase {
|
|||
unsigned char lastExtChPan;
|
||||
unsigned short ssgVol;
|
||||
unsigned short fmVol;
|
||||
bool extSys, useCombo, fbAllOps;
|
||||
bool extSys, fbAllOps;
|
||||
unsigned char useCombo;
|
||||
|
||||
DivConfig ayFlags;
|
||||
|
||||
|
|
@ -180,10 +181,10 @@ class DivPlatformOPN: public DivPlatformFMBase {
|
|||
ssgVol(128),
|
||||
fmVol(256),
|
||||
extSys(isExtSys),
|
||||
useCombo(false),
|
||||
fbAllOps(false) {}
|
||||
fbAllOps(false),
|
||||
useCombo(0) {}
|
||||
public:
|
||||
void setCombo(bool combo) {
|
||||
void setCombo(unsigned char combo) {
|
||||
useCombo=combo;
|
||||
}
|
||||
virtual int mapVelocity(int ch, float vel) {
|
||||
|
|
|
|||
|
|
@ -298,7 +298,9 @@ double DivPlatformYM2608::NOTE_ADPCMB(int note) {
|
|||
}
|
||||
|
||||
void DivPlatformYM2608::acquire(short** buf, size_t len) {
|
||||
if (useCombo) {
|
||||
if (useCombo==2) {
|
||||
acquire_lle(buf,len);
|
||||
} else if (useCombo==1) {
|
||||
acquire_combo(buf,len);
|
||||
} else {
|
||||
acquire_ymfm(buf,len);
|
||||
|
|
@ -488,6 +490,14 @@ void DivPlatformYM2608::acquire_ymfm(short** buf, size_t len) {
|
|||
}
|
||||
}
|
||||
|
||||
void DivPlatformYM2608::acquire_lle(short** buf, size_t len) {
|
||||
for (size_t h=0; h<len; h++) {
|
||||
FMOPNA_Clock(&fm_lle,0);
|
||||
FMOPNA_Clock(&fm_lle,1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void DivPlatformYM2608::tick(bool sysTick) {
|
||||
// FM
|
||||
for (int i=0; i<6; i++) {
|
||||
|
|
@ -1501,6 +1511,7 @@ void DivPlatformYM2608::reset() {
|
|||
OPN2_Reset(&fm_nuked);
|
||||
OPN2_SetChipType(&fm_nuked,ym3438_mode_opn);
|
||||
fm->reset();
|
||||
memset(&fm_lle,0,sizeof(fmopna_t));
|
||||
for (int i=0; i<16; i++) {
|
||||
chan[i]=DivPlatformOPN::OPNChannelStereo();
|
||||
chan[i].std.setEngine(parent);
|
||||
|
|
|
|||
|
|
@ -22,6 +22,9 @@
|
|||
|
||||
#include "fmshared_OPN.h"
|
||||
#include "sound/ymfm/ymfm_opn.h"
|
||||
extern "C" {
|
||||
#include "../../../extern/YM2608-LLE/fmopna_2608.h"
|
||||
}
|
||||
|
||||
#include "ay.h"
|
||||
|
||||
|
|
@ -50,6 +53,7 @@ class DivPlatformYM2608: public DivPlatformOPN {
|
|||
ym3438_t fm_nuked;
|
||||
ymfm::ym2608* fm;
|
||||
ymfm::ym2608::output_data fmout;
|
||||
fmopna_t fm_lle;
|
||||
|
||||
unsigned char* adpcmBMem;
|
||||
size_t adpcmBMemLen;
|
||||
|
|
@ -76,6 +80,7 @@ class DivPlatformYM2608: public DivPlatformOPN {
|
|||
|
||||
void acquire_combo(short** buf, size_t len);
|
||||
void acquire_ymfm(short** buf, size_t len);
|
||||
void acquire_lle(short** buf, size_t len);
|
||||
|
||||
public:
|
||||
void acquire(short** buf, size_t len);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue