MSM6258: the final bits
This commit is contained in:
parent
05c2fb357f
commit
05ffc98ed1
|
@ -91,17 +91,13 @@ void DivPlatformMSM6258::acquire(short* bufL, short* bufR, size_t start, size_t
|
||||||
|
|
||||||
if (isMuted[0]) {
|
if (isMuted[0]) {
|
||||||
bufL[h]=0;
|
bufL[h]=0;
|
||||||
|
bufR[h]=0;
|
||||||
|
oscBuf[0]->data[oscBuf[0]->needle++]=0;
|
||||||
} else {
|
} else {
|
||||||
bufL[h]=msmOut;
|
bufL[h]=(msmPan&2)?msmOut:0;
|
||||||
|
bufR[h]=(msmPan&1)?msmOut:0;
|
||||||
|
oscBuf[0]->data[oscBuf[0]->needle++]=msmPan?msmOut:0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*if (++updateOsc>=22) {
|
|
||||||
updateOsc=0;
|
|
||||||
// TODO: per-channel osc
|
|
||||||
for (int i=0; i<1; i++) {
|
|
||||||
oscBuf[i]->data[oscBuf[i]->needle++]=msm->m_voice[i].m_muted?0:(msm->m_voice[i].m_out<<6);
|
|
||||||
}
|
|
||||||
}*/
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -211,6 +207,15 @@ int DivPlatformMSM6258::dispatch(DivCommand c) {
|
||||||
clockSel=c.value&1;
|
clockSel=c.value&1;
|
||||||
rWrite(8,clockSel);
|
rWrite(8,clockSel);
|
||||||
break;
|
break;
|
||||||
|
case DIV_CMD_PANNING: {
|
||||||
|
if (c.value==0 && c.value2==0) {
|
||||||
|
chan[c.chan].pan=3;
|
||||||
|
} else {
|
||||||
|
chan[c.chan].pan=(c.value2>0)|((c.value>0)<<1);
|
||||||
|
}
|
||||||
|
rWrite(2,chan[c.chan].pan);
|
||||||
|
break;
|
||||||
|
}
|
||||||
case DIV_CMD_LEGATO: {
|
case DIV_CMD_LEGATO: {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -242,6 +247,7 @@ void DivPlatformMSM6258::forceIns() {
|
||||||
}
|
}
|
||||||
rWrite(12,rateSel);
|
rWrite(12,rateSel);
|
||||||
rWrite(8,clockSel);
|
rWrite(8,clockSel);
|
||||||
|
rWrite(2,chan[0].pan);
|
||||||
}
|
}
|
||||||
|
|
||||||
void* DivPlatformMSM6258::getChanState(int ch) {
|
void* DivPlatformMSM6258::getChanState(int ch) {
|
||||||
|
@ -277,7 +283,7 @@ void DivPlatformMSM6258::reset() {
|
||||||
msmClock=0;
|
msmClock=0;
|
||||||
msmClockCount=0;
|
msmClockCount=0;
|
||||||
msmPan=3;
|
msmPan=3;
|
||||||
rateSel=0;
|
rateSel=2;
|
||||||
clockSel=0;
|
clockSel=0;
|
||||||
if (dumpWrites) {
|
if (dumpWrites) {
|
||||||
addWrite(0xffffffff,0);
|
addWrite(0xffffffff,0);
|
||||||
|
@ -298,6 +304,10 @@ void DivPlatformMSM6258::reset() {
|
||||||
delay=0;
|
delay=0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool DivPlatformMSM6258::isStereo() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
bool DivPlatformMSM6258::keyOffAffectsArp(int ch) {
|
bool DivPlatformMSM6258::keyOffAffectsArp(int ch) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -368,7 +378,6 @@ void DivPlatformMSM6258::setFlags(unsigned int flags) {
|
||||||
}
|
}
|
||||||
rate=chipClock/128;
|
rate=chipClock/128;
|
||||||
for (int i=0; i<1; i++) {
|
for (int i=0; i<1; i++) {
|
||||||
isMuted[i]=false;
|
|
||||||
oscBuf[i]->rate=rate;
|
oscBuf[i]->rate=rate;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -111,6 +111,7 @@ class DivPlatformMSM6258: public DivDispatch {
|
||||||
void forceIns();
|
void forceIns();
|
||||||
void tick(bool sysTick=true);
|
void tick(bool sysTick=true);
|
||||||
void muteChannel(int ch, bool mute);
|
void muteChannel(int ch, bool mute);
|
||||||
|
bool isStereo();
|
||||||
bool keyOffAffectsArp(int ch);
|
bool keyOffAffectsArp(int ch);
|
||||||
void notifyInsChange(int ins);
|
void notifyInsChange(int ins);
|
||||||
void notifyInsDeletion(void* ins);
|
void notifyInsDeletion(void* ins);
|
||||||
|
|
|
@ -385,7 +385,6 @@ void DivPlatformMSM6295::setFlags(unsigned int flags) {
|
||||||
}
|
}
|
||||||
rate=chipClock/3;
|
rate=chipClock/3;
|
||||||
for (int i=0; i<4; i++) {
|
for (int i=0; i<4; i++) {
|
||||||
isMuted[i]=false;
|
|
||||||
oscBuf[i]->rate=rate/22;
|
oscBuf[i]->rate=rate/22;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue