Merge branch 'master' of https://github.com/tildearrow/furnace into x1_010
This commit is contained in:
commit
7a2c86e9d7
|
@ -84,7 +84,7 @@ void DivPlatformAmiga::acquire(short* bufL, short* bufR, size_t start, size_t le
|
|||
} else {
|
||||
chan[i].sample=-1;
|
||||
}
|
||||
if (chan[i].freq<124) {
|
||||
/*if (chan[i].freq<124) {
|
||||
if (++chan[i].busClock>=512) {
|
||||
unsigned int rAmount=(124-chan[i].freq)*2;
|
||||
if (chan[i].audPos>=rAmount) {
|
||||
|
@ -92,7 +92,7 @@ void DivPlatformAmiga::acquire(short* bufL, short* bufR, size_t start, size_t le
|
|||
}
|
||||
chan[i].busClock=0;
|
||||
}
|
||||
}
|
||||
}*/
|
||||
chan[i].audSub+=MAX(114,chan[i].freq);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -495,8 +495,8 @@ int DivPlatformArcade::dispatch(DivCommand c) {
|
|||
chan[c.chan].ins=c.value;
|
||||
break;
|
||||
case DIV_CMD_PANNING: {
|
||||
chan[c.chan].chVolL=((c.value>>4)==1);
|
||||
chan[c.chan].chVolR=((c.value&15)==1);
|
||||
chan[c.chan].chVolL=((c.value>>4)>0);
|
||||
chan[c.chan].chVolR=((c.value&15)>0);
|
||||
if (isMuted[c.chan]) {
|
||||
rWrite(chanOffs[c.chan]+ADDR_LR_FB_ALG,(chan[c.chan].state.alg&7)|(chan[c.chan].state.fb<<3));
|
||||
} else {
|
||||
|
|
|
@ -491,6 +491,12 @@ void DivPlatformAY8910::setFlags(unsigned int flags) {
|
|||
case 8:
|
||||
chipClock=COLOR_PAL*3.0/16.0;
|
||||
break;
|
||||
case 9:
|
||||
chipClock=COLOR_PAL/4.0;
|
||||
break;
|
||||
case 10:
|
||||
chipClock=2097152;
|
||||
break;
|
||||
default:
|
||||
chipClock=COLOR_NTSC/2.0;
|
||||
break;
|
||||
|
|
|
@ -552,6 +552,12 @@ void DivPlatformAY8930::setFlags(unsigned int flags) {
|
|||
case 8:
|
||||
chipClock=COLOR_PAL*3.0/16.0;
|
||||
break;
|
||||
case 9:
|
||||
chipClock=COLOR_PAL/4.0;
|
||||
break;
|
||||
case 10:
|
||||
chipClock=2097152;
|
||||
break;
|
||||
default:
|
||||
chipClock=COLOR_NTSC/2.0;
|
||||
break;
|
||||
|
|
|
@ -340,6 +340,7 @@ int DivPlatformGB::dispatch(DivCommand c) {
|
|||
case DIV_CMD_PANNING: {
|
||||
lastPan&=~(0x11<<c.chan);
|
||||
if (c.value==0) c.value=0x11;
|
||||
c.value=((c.value&15)>0)|(((c.value>>4)>0)<<4);
|
||||
lastPan|=c.value<<c.chan;
|
||||
rWrite(0x25,procMute());
|
||||
break;
|
||||
|
|
|
@ -590,16 +590,10 @@ int DivPlatformGenesis::dispatch(DivCommand c) {
|
|||
chan[c.chan].ins=c.value;
|
||||
break;
|
||||
case DIV_CMD_PANNING: {
|
||||
switch (c.value) {
|
||||
case 0x01:
|
||||
chan[c.chan].pan=1;
|
||||
break;
|
||||
case 0x10:
|
||||
chan[c.chan].pan=2;
|
||||
break;
|
||||
default:
|
||||
chan[c.chan].pan=3;
|
||||
break;
|
||||
if (c.value==0) {
|
||||
chan[c.chan].pan=3;
|
||||
} else {
|
||||
chan[c.chan].pan=((c.value&15)>0)|(((c.value>>4)>0)<<1);
|
||||
}
|
||||
rWrite(chanOffs[c.chan]+ADDR_LRAF,(isMuted[c.chan]?0:(chan[c.chan].pan<<6))|(chan[c.chan].state.fms&7)|((chan[c.chan].state.ams&3)<<4));
|
||||
break;
|
||||
|
|
|
@ -106,16 +106,10 @@ int DivPlatformGenesisExt::dispatch(DivCommand c) {
|
|||
opChan[ch].ins=c.value;
|
||||
break;
|
||||
case DIV_CMD_PANNING: {
|
||||
switch (c.value) {
|
||||
case 0x01:
|
||||
opChan[ch].pan=1;
|
||||
break;
|
||||
case 0x10:
|
||||
opChan[ch].pan=2;
|
||||
break;
|
||||
default:
|
||||
opChan[ch].pan=3;
|
||||
break;
|
||||
if (c.value==0) {
|
||||
opChan[ch].pan=3;
|
||||
} else {
|
||||
opChan[ch].pan=((c.value&15)>0)|(((c.value>>4)>0)<<1);
|
||||
}
|
||||
// TODO: ???
|
||||
rWrite(chanOffs[2]+0xb4,(opChan[ch].pan<<6)|(chan[2].state.fms&7)|((chan[2].state.ams&3)<<4));
|
||||
|
@ -378,4 +372,4 @@ void DivPlatformGenesisExt::quit() {
|
|||
}
|
||||
|
||||
DivPlatformGenesisExt::~DivPlatformGenesisExt() {
|
||||
}
|
||||
}
|
||||
|
|
|
@ -30,7 +30,6 @@
|
|||
// N = invalid
|
||||
#define N 255
|
||||
|
||||
/*
|
||||
const unsigned char slotsOPL2[4][20]={
|
||||
{0, 1, 2, 6, 7, 8, 12, 13, 14}, // OP1
|
||||
{3, 4, 5, 9, 10, 11, 15, 16, 17}, // OP2
|
||||
|
@ -45,6 +44,10 @@ const unsigned char slotsOPL2Drums[4][20]={
|
|||
{N, N, N, N, N, N, N, N, N, N, N}
|
||||
};
|
||||
|
||||
const unsigned char chanMapOPL2[20]={
|
||||
0, 1, 2, 3, 4, 5, 6, 7, 8, N, N, N, N, N, N, N, N, N, N, N
|
||||
};
|
||||
|
||||
const unsigned char slotsOPL3[4][20]={
|
||||
{0, 6, 1, 7, 2, 8, 18, 24, 19, 25, 20, 26, 30, 31, 32, 12, 13, 14}, // OP1
|
||||
{3, 9, 4, 10, 5, 11, 21, 27, 22, 28, 23, 29, 33, 34, 35, 15, 16, 17}, // OP2
|
||||
|
@ -58,7 +61,10 @@ const unsigned char slotsOPL3Drums[4][20]={
|
|||
{6, N, 7, N, 8, N, 24, N, 25, N, 26, N, N, N, N, N, N, N, N, N}, // OP3
|
||||
{9, N, 10, N, 11, N, 27, N, 28, N, 29, N, N, N, N, N, N, N, N, N} // OP4
|
||||
};
|
||||
*/
|
||||
|
||||
const unsigned char chanMapOPL3[20]={
|
||||
0, 3, 1, 4, 2, 5, 9, 12, 10, 13, 11, 14, 15, 16, 17, 6, 7, 8, N, N
|
||||
};
|
||||
|
||||
#undef N
|
||||
|
||||
|
@ -773,6 +779,22 @@ void DivPlatformOPL::setYMFM(bool use) {
|
|||
useYMFM=use;
|
||||
}
|
||||
|
||||
void DivPlatformOPL::setOPLType(int type) {
|
||||
switch (type) {
|
||||
case 1: case 2:
|
||||
slotsNonDrums=(const unsigned char**)slotsOPL2;
|
||||
slotsDrums=(const unsigned char**)slotsOPL2Drums;
|
||||
chanMap=chanMapOPL2;
|
||||
break;
|
||||
case 3:
|
||||
slotsNonDrums=(const unsigned char**)slotsOPL3;
|
||||
slotsDrums=(const unsigned char**)slotsOPL3Drums;
|
||||
chanMap=chanMapOPL3;
|
||||
break;
|
||||
}
|
||||
oplType=type;
|
||||
}
|
||||
|
||||
void DivPlatformOPL::setFlags(unsigned int flags) {
|
||||
/*
|
||||
if (flags==3) {
|
||||
|
|
|
@ -64,7 +64,11 @@ class DivPlatformOPL: public DivDispatch {
|
|||
};
|
||||
std::queue<QueuedWrite> writes;
|
||||
opl3_chip fm;
|
||||
int delay;
|
||||
const unsigned char** slotsNonDrums;
|
||||
const unsigned char** slotsDrums;
|
||||
const unsigned char** slots;
|
||||
const unsigned char* chanMap;
|
||||
int delay, oplType;
|
||||
unsigned char lastBusy;
|
||||
|
||||
unsigned char regPool[512];
|
||||
|
@ -103,6 +107,7 @@ class DivPlatformOPL: public DivDispatch {
|
|||
void muteChannel(int ch, bool mute);
|
||||
bool isStereo();
|
||||
void setYMFM(bool use);
|
||||
void setOPLType(int type);
|
||||
bool keyOffAffectsArp(int ch);
|
||||
bool keyOffAffectsPorta(int ch);
|
||||
void toggleRegisterDump(bool enable);
|
||||
|
|
|
@ -892,16 +892,10 @@ int DivPlatformYM2610::dispatch(DivCommand c) {
|
|||
chan[c.chan].ins=c.value;
|
||||
break;
|
||||
case DIV_CMD_PANNING: {
|
||||
switch (c.value) {
|
||||
case 0x01:
|
||||
chan[c.chan].pan=1;
|
||||
break;
|
||||
case 0x10:
|
||||
chan[c.chan].pan=2;
|
||||
break;
|
||||
default:
|
||||
chan[c.chan].pan=3;
|
||||
break;
|
||||
if (c.value==0) {
|
||||
chan[c.chan].pan=3;
|
||||
} else {
|
||||
chan[c.chan].pan=((c.value&15)>0)|(((c.value>>4)>0)<<1);
|
||||
}
|
||||
if (c.chan>12) {
|
||||
immWrite(0x11,isMuted[c.chan]?0:(chan[c.chan].pan<<6));
|
||||
|
|
|
@ -955,16 +955,10 @@ int DivPlatformYM2610B::dispatch(DivCommand c) {
|
|||
chan[c.chan].ins=c.value;
|
||||
break;
|
||||
case DIV_CMD_PANNING: {
|
||||
switch (c.value) {
|
||||
case 0x01:
|
||||
chan[c.chan].pan=1;
|
||||
break;
|
||||
case 0x10:
|
||||
chan[c.chan].pan=2;
|
||||
break;
|
||||
default:
|
||||
chan[c.chan].pan=3;
|
||||
break;
|
||||
if (c.value==0) {
|
||||
chan[c.chan].pan=3;
|
||||
} else {
|
||||
chan[c.chan].pan=((c.value&15)>0)|(((c.value>>4)>0)<<1);
|
||||
}
|
||||
if (c.chan>14) {
|
||||
immWrite(0x11,isMuted[c.chan]?0:(chan[c.chan].pan<<6));
|
||||
|
|
|
@ -97,16 +97,10 @@ int DivPlatformYM2610BExt::dispatch(DivCommand c) {
|
|||
opChan[ch].ins=c.value;
|
||||
break;
|
||||
case DIV_CMD_PANNING: {
|
||||
switch (c.value) {
|
||||
case 0x01:
|
||||
opChan[ch].pan=1;
|
||||
break;
|
||||
case 0x10:
|
||||
opChan[ch].pan=2;
|
||||
break;
|
||||
default:
|
||||
opChan[ch].pan=3;
|
||||
break;
|
||||
if (c.value==0) {
|
||||
opChan[ch].pan=3;
|
||||
} else {
|
||||
opChan[ch].pan=((c.value&15)>0)|(((c.value>>4)>0)<<1);
|
||||
}
|
||||
DivInstrument* ins=parent->getIns(opChan[ch].ins);
|
||||
// TODO: ???
|
||||
|
@ -334,4 +328,4 @@ void DivPlatformYM2610BExt::quit() {
|
|||
}
|
||||
|
||||
DivPlatformYM2610BExt::~DivPlatformYM2610BExt() {
|
||||
}
|
||||
}
|
||||
|
|
|
@ -97,16 +97,10 @@ int DivPlatformYM2610Ext::dispatch(DivCommand c) {
|
|||
opChan[ch].ins=c.value;
|
||||
break;
|
||||
case DIV_CMD_PANNING: {
|
||||
switch (c.value) {
|
||||
case 0x01:
|
||||
opChan[ch].pan=1;
|
||||
break;
|
||||
case 0x10:
|
||||
opChan[ch].pan=2;
|
||||
break;
|
||||
default:
|
||||
opChan[ch].pan=3;
|
||||
break;
|
||||
if (c.value==0) {
|
||||
opChan[ch].pan=3;
|
||||
} else {
|
||||
opChan[ch].pan=((c.value&15)>0)|(((c.value>>4)>0)<<1);
|
||||
}
|
||||
DivInstrument* ins=parent->getIns(opChan[ch].ins);
|
||||
// TODO: ???
|
||||
|
@ -334,4 +328,4 @@ void DivPlatformYM2610Ext::quit() {
|
|||
}
|
||||
|
||||
DivPlatformYM2610Ext::~DivPlatformYM2610Ext() {
|
||||
}
|
||||
}
|
||||
|
|
|
@ -195,6 +195,8 @@ struct DivSong {
|
|||
// - 6: 0.89MHz (Sunsoft 5B)
|
||||
// - 7: 1.67MHz
|
||||
// - 8: 0.83MHz (Sunsoft 5B on PAL)
|
||||
// - 9: 1.10MHz (Gamate/VIC-20 PAL)
|
||||
// - 10: 2.097152MHz (Game Boy)
|
||||
// - bit 4-5: chip type (ignored on AY8930)
|
||||
// - 0: AY-3-8910 or similar
|
||||
// - 1: YM2149
|
||||
|
|
|
@ -4835,6 +4835,14 @@ bool FurnaceGUI::loop() {
|
|||
e->setSysFlags(i,(flags&(~15))|8,restart);
|
||||
updateWindowTitle();
|
||||
}
|
||||
if (ImGui::RadioButton("1.10MHz (Gamate/VIC-20 PAL)",(flags&15)==9)) {
|
||||
e->setSysFlags(i,(flags&(~15))|9,restart);
|
||||
updateWindowTitle();
|
||||
}
|
||||
if (ImGui::RadioButton("2^21Hz (Game Boy)",(flags&15)==10)) {
|
||||
e->setSysFlags(i,(flags&(~15))|10,restart);
|
||||
updateWindowTitle();
|
||||
}
|
||||
if (e->song.system[i]==DIV_SYSTEM_AY8910) {
|
||||
ImGui::Text("Chip type:");
|
||||
if (ImGui::RadioButton("AY-3-8910",(flags&0x30)==0)) {
|
||||
|
|
Loading…
Reference in New Issue