mirror of
https://github.com/tildearrow/furnace.git
synced 2025-01-03 06:01:29 +00:00
Merge branch 'master' of https://github.com/tildearrow/furnace into x1_010
This commit is contained in:
commit
da73c365e4
6 changed files with 12 additions and 12 deletions
|
@ -25,7 +25,7 @@
|
|||
#define rWrite(a,v) if (!skipRegisterWrites) {pendingWrites[a]=v;}
|
||||
#define immWrite(a,v) if (!skipRegisterWrites) {writes.emplace(a,v); if (dumpWrites) {addWrite(a,v);} }
|
||||
|
||||
#define CHIP_FREQBASE 9440540
|
||||
#define CHIP_FREQBASE chipFreqBase
|
||||
|
||||
// N = invalid
|
||||
#define N 255
|
||||
|
@ -456,9 +456,11 @@ int DivPlatformOPL::dispatch(DivCommand c) {
|
|||
chan[c.chan].outVol=chan[c.chan].vol;
|
||||
}
|
||||
if (chan[c.chan].insChanged) {
|
||||
int ops=(slots[3][c.chan]!=255 && ins->fm.ops==4)?4:2;
|
||||
int ops=(slots[3][c.chan]!=255 && ins->fm.ops==4 && oplType==3)?4:2;
|
||||
for (int i=0; i<ops; i++) {
|
||||
unsigned short baseAddr=slotMap[slots[i][c.chan]];
|
||||
unsigned char slot=slots[i][c.chan];
|
||||
if (slot==255) continue;
|
||||
unsigned short baseAddr=slotMap[slot];
|
||||
DivInstrumentFM::Operator& op=chan[c.chan].state.op[(ops==4)?orderedOpsL[i]:i];
|
||||
|
||||
if (isMuted[c.chan]) {
|
||||
|
@ -812,12 +814,14 @@ void DivPlatformOPL::setOPLType(int type, bool drums) {
|
|||
slotsDrums=slotsOPL2Drums;
|
||||
slots=drums?slotsDrums:slotsNonDrums;
|
||||
chanMap=chanMapOPL2;
|
||||
chipFreqBase=9440540*0.25;
|
||||
break;
|
||||
case 3:
|
||||
slotsNonDrums=slotsOPL3;
|
||||
slotsDrums=slotsOPL3Drums;
|
||||
slots=drums?slotsDrums:slotsNonDrums;
|
||||
chanMap=chanMapOPL3;
|
||||
chipFreqBase=9440540;
|
||||
break;
|
||||
}
|
||||
oplType=type;
|
||||
|
|
|
@ -68,6 +68,7 @@ class DivPlatformOPL: public DivDispatch {
|
|||
const unsigned char** slotsDrums;
|
||||
const unsigned char** slots;
|
||||
const unsigned short* chanMap;
|
||||
double chipFreqBase;
|
||||
int delay, oplType;
|
||||
unsigned char lastBusy;
|
||||
|
||||
|
|
|
@ -85,7 +85,6 @@ void WSwan::SoundUpdate(uint32_t v30mz_timestamp)
|
|||
else if(ch == 2 && (control & 0x40) && sweep_value) // Sweep
|
||||
{
|
||||
uint32_t tmp_pt = 2048 - period[ch];
|
||||
uint32_t meow_timestamp = v30mz_timestamp - run_time;
|
||||
uint32_t tmp_run_time = run_time;
|
||||
|
||||
while(tmp_run_time)
|
||||
|
@ -107,7 +106,6 @@ void WSwan::SoundUpdate(uint32_t v30mz_timestamp)
|
|||
}
|
||||
}
|
||||
|
||||
meow_timestamp += sub_run_time;
|
||||
if(tmp_pt > 4)
|
||||
{
|
||||
period_counter[ch] -= sub_run_time;
|
||||
|
@ -116,7 +114,6 @@ void WSwan::SoundUpdate(uint32_t v30mz_timestamp)
|
|||
sample_pos[ch] = (sample_pos[ch] + 1) & 0x1F;
|
||||
|
||||
MK_SAMPLE_CACHE;
|
||||
SYNCSAMPLE(meow_timestamp + period_counter[ch]);
|
||||
period_counter[ch] += tmp_pt;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -76,7 +76,6 @@ private:
|
|||
uint32_t last_ts;
|
||||
|
||||
uint8_t wsRAM[64];
|
||||
int16_t sBuf[2];
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -152,7 +152,7 @@ void DivPlatformSwan::tick() {
|
|||
unsigned char sndCtrl=(pcm?0x20:0)|(sweep?0x40:0)|((noise>0)?0x80:0);
|
||||
for (int i=0; i<4; i++) {
|
||||
chan[i].std.next();
|
||||
if (chan[i].std.willVol) {
|
||||
if (chan[i].std.hadVol) {
|
||||
int env=chan[i].std.vol;
|
||||
if(parent->getIns(chan[i].ins)->type==DIV_INS_AMIGA) {
|
||||
env=MIN(env/4,15);
|
||||
|
@ -320,7 +320,7 @@ int DivPlatformSwan::dispatch(DivCommand c) {
|
|||
case DIV_CMD_VOLUME:
|
||||
if (chan[c.chan].vol!=c.value) {
|
||||
chan[c.chan].vol=c.value;
|
||||
if (!chan[c.chan].std.willVol) {
|
||||
if (!chan[c.chan].std.hadVol) {
|
||||
calcAndWriteOutVol(c.chan,15);
|
||||
}
|
||||
}
|
||||
|
@ -392,9 +392,7 @@ int DivPlatformSwan::dispatch(DivCommand c) {
|
|||
break;
|
||||
case DIV_CMD_PANNING: {
|
||||
chan[c.chan].pan=c.value;
|
||||
if (!chan[c.chan].std.willVol) {
|
||||
calcAndWriteOutVol(c.chan,15);
|
||||
}
|
||||
calcAndWriteOutVol(c.chan,chan[c.chan].std.willVol?chan[c.chan].std.vol:15);
|
||||
break;
|
||||
}
|
||||
case DIV_CMD_LEGATO:
|
||||
|
|
|
@ -4969,6 +4969,7 @@ bool FurnaceGUI::loop() {
|
|||
break;
|
||||
}
|
||||
case DIV_SYSTEM_GB:
|
||||
case DIV_SYSTEM_SWAN:
|
||||
case DIV_SYSTEM_YM2610:
|
||||
case DIV_SYSTEM_YM2610_EXT:
|
||||
case DIV_SYSTEM_YM2610_FULL:
|
||||
|
|
Loading…
Reference in a new issue