Merge branch 'master' of https://github.com/tildearrow/furnace into k053260
This commit is contained in:
commit
2a4e7267aa
21 changed files with 126 additions and 42 deletions
|
|
@ -130,14 +130,15 @@ class DivPlatformOPN: public DivPlatformFMBase {
|
|||
unsigned char freqH, freqL;
|
||||
int portaPauseFreq;
|
||||
signed char konCycles;
|
||||
bool mask;
|
||||
bool mask, hardReset;
|
||||
OPNOpChannel():
|
||||
SharedChannel<int>(0),
|
||||
freqH(0),
|
||||
freqL(0),
|
||||
portaPauseFreq(0),
|
||||
konCycles(0),
|
||||
mask(true) {}
|
||||
mask(true),
|
||||
hardReset(false) {}
|
||||
};
|
||||
|
||||
struct OPNOpChannelStereo: public OPNOpChannel {
|
||||
|
|
|
|||
|
|
@ -397,6 +397,14 @@ int DivPlatformGB::dispatch(DivCommand c) {
|
|||
chan[c.chan].vol=chan[c.chan].envVol;
|
||||
chan[c.chan].outVol=chan[c.chan].envVol;
|
||||
}
|
||||
} else if (chan[c.chan].softEnv && c.chan!=2) {
|
||||
if (!parent->song.brokenOutVol && !chan[c.chan].std.vol.will) {
|
||||
chan[c.chan].outVol=chan[c.chan].vol;
|
||||
chan[c.chan].envVol=chan[c.chan].outVol;
|
||||
}
|
||||
chan[c.chan].envLen=0;
|
||||
chan[c.chan].envDir=1;
|
||||
chan[c.chan].soundLen=64;
|
||||
}
|
||||
if (c.chan==2 && chan[c.chan].softEnv) {
|
||||
chan[c.chan].soundLen=64;
|
||||
|
|
@ -674,8 +682,6 @@ void DivPlatformGB::setFlags(const DivConfig& flags) {
|
|||
CHECK_CUSTOM_CLOCK;
|
||||
rate=chipClock/16;
|
||||
for (int i=0; i<4; i++) {
|
||||
isMuted[i]=false;
|
||||
oscBuf[i]=new DivDispatchOscBuffer;
|
||||
oscBuf[i]->rate=rate;
|
||||
}
|
||||
}
|
||||
|
|
@ -686,6 +692,12 @@ int DivPlatformGB::init(DivEngine* p, int channels, int sugRate, const DivConfig
|
|||
skipRegisterWrites=false;
|
||||
model=GB_MODEL_DMG_B;
|
||||
gb=new GB_gameboy_t;
|
||||
|
||||
for (int i=0; i<4; i++) {
|
||||
isMuted[i]=false;
|
||||
oscBuf[i]=new DivDispatchOscBuffer;
|
||||
}
|
||||
|
||||
setFlags(flags);
|
||||
reset();
|
||||
return 4;
|
||||
|
|
|
|||
|
|
@ -123,7 +123,9 @@ void DivPlatformGenesis::processDAC(int iRate) {
|
|||
chan[5].dacReady=false;
|
||||
}
|
||||
} else {
|
||||
urgentWrite(0x2a,0x80);
|
||||
if (chan[5].dacReady && writes.size()<16) {
|
||||
urgentWrite(0x2a,0x80);
|
||||
}
|
||||
}
|
||||
chan[5].dacPos++;
|
||||
if (!chan[5].dacDirection && (s->isLoopable() && chan[5].dacPos>=(unsigned int)s->loopEnd)) {
|
||||
|
|
|
|||
|
|
@ -396,6 +396,9 @@ int DivPlatformGenesisExt::dispatch(DivCommand c) {
|
|||
}
|
||||
break;
|
||||
}
|
||||
case DIV_CMD_FM_HARD_RESET:
|
||||
opChan[ch].hardReset=c.value;
|
||||
break;
|
||||
case DIV_CMD_GET_VOLMAX:
|
||||
return 127;
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -195,9 +195,6 @@ int DivPlatformSegaPCM::dispatch(DivCommand c) {
|
|||
chan[c.chan].pcm.sample=-1;
|
||||
rWrite(0x86+(c.chan<<3),3);
|
||||
chan[c.chan].macroInit(NULL);
|
||||
if (!parent->song.brokenOutVol && !chan[c.chan].std.vol.will) {
|
||||
chan[c.chan].outVol=chan[c.chan].vol;
|
||||
}
|
||||
break;
|
||||
}
|
||||
if (c.value!=DIV_NOTE_NULL) {
|
||||
|
|
@ -207,6 +204,16 @@ int DivPlatformSegaPCM::dispatch(DivCommand c) {
|
|||
}
|
||||
chan[c.chan].furnacePCM=true;
|
||||
chan[c.chan].macroInit(ins);
|
||||
if (!parent->song.brokenOutVol && !chan[c.chan].std.vol.will) {
|
||||
chan[c.chan].outVol=chan[c.chan].vol;
|
||||
|
||||
if (parent->song.newSegaPCM) {
|
||||
chan[c.chan].chVolL=(chan[c.chan].outVol*chan[c.chan].chPanL)/127;
|
||||
chan[c.chan].chVolR=(chan[c.chan].outVol*chan[c.chan].chPanR)/127;
|
||||
rWrite(2+(c.chan<<3),chan[c.chan].chVolL);
|
||||
rWrite(3+(c.chan<<3),chan[c.chan].chVolR);
|
||||
}
|
||||
}
|
||||
chan[c.chan].active=true;
|
||||
chan[c.chan].keyOn=true;
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -548,19 +548,25 @@ void DivPlatformSwan::poke(std::vector<DivRegWrite>& wlist) {
|
|||
for (DivRegWrite& i: wlist) rWrite(i.addr,i.val);
|
||||
}
|
||||
|
||||
int DivPlatformSwan::init(DivEngine* p, int channels, int sugRate, const DivConfig& flags) {
|
||||
parent=p;
|
||||
dumpWrites=false;
|
||||
skipRegisterWrites=false;
|
||||
void DivPlatformSwan::setFlags(const DivConfig& flags) {
|
||||
chipClock=3072000;
|
||||
CHECK_CUSTOM_CLOCK;
|
||||
rate=chipClock/16; // = 192000kHz, should be enough
|
||||
for (int i=0; i<4; i++) {
|
||||
isMuted[i]=false;
|
||||
oscBuf[i]=new DivDispatchOscBuffer;
|
||||
oscBuf[i]->rate=rate;
|
||||
}
|
||||
}
|
||||
|
||||
int DivPlatformSwan::init(DivEngine* p, int channels, int sugRate, const DivConfig& flags) {
|
||||
parent=p;
|
||||
dumpWrites=false;
|
||||
skipRegisterWrites=false;
|
||||
for (int i=0; i<4; i++) {
|
||||
isMuted[i]=false;
|
||||
oscBuf[i]=new DivDispatchOscBuffer;
|
||||
}
|
||||
ws=new WSwan();
|
||||
setFlags(flags);
|
||||
reset();
|
||||
return 4;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -68,6 +68,7 @@ class DivPlatformSwan: public DivDispatch {
|
|||
void forceIns();
|
||||
void tick(bool sysTick=true);
|
||||
void muteChannel(int ch, bool mute);
|
||||
void setFlags(const DivConfig& flags);
|
||||
void notifyWaveChange(int wave);
|
||||
void notifyInsDeletion(void* ins);
|
||||
int getOutputCount();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue