Add Seta 2 Bankswitch support
This commit is contained in:
parent
5ebee2bb2b
commit
e6b84280aa
|
@ -931,6 +931,10 @@ void DivPlatformX1_010::setFlags(const DivConfig& flags) {
|
|||
chipClock=50000000.0/3.0;
|
||||
break;
|
||||
// Other clock is used
|
||||
case 2: // NTSC clock * 4
|
||||
// (see https://github.com/mamedev/mame/blob/master/src/mame/taito/champbwl.cpp#L620)
|
||||
chipClock=COLOR_NTSC*4.0;
|
||||
break;
|
||||
default:
|
||||
chipClock=16000000;
|
||||
break;
|
||||
|
@ -938,6 +942,7 @@ void DivPlatformX1_010::setFlags(const DivConfig& flags) {
|
|||
CHECK_CUSTOM_CLOCK;
|
||||
rate=chipClock/512;
|
||||
stereo=flags.getBool("stereo",false);
|
||||
isBanked=flags.getBool("isBanked",false);
|
||||
for (int i=0; i<16; i++) {
|
||||
oscBuf[i]->rate=rate;
|
||||
}
|
||||
|
@ -970,7 +975,7 @@ bool DivPlatformX1_010::isSampleLoaded(int index, int sample) {
|
|||
}
|
||||
|
||||
void DivPlatformX1_010::renderSamples(int sysID) {
|
||||
memset(sampleMem,0,getSampleMemCapacity());
|
||||
memset(sampleMem,0,16777216);
|
||||
memset(sampleOffX1,0,256*sizeof(unsigned int));
|
||||
memset(sampleLoaded,0,256*sizeof(bool));
|
||||
|
||||
|
@ -1023,7 +1028,7 @@ int DivPlatformX1_010::init(DivEngine* p, int channels, int sugRate, const DivCo
|
|||
oscBuf[i]=new DivDispatchOscBuffer;
|
||||
}
|
||||
setFlags(flags);
|
||||
sampleMem=new unsigned char[getSampleMemCapacity()];
|
||||
sampleMem=new unsigned char[16777216];
|
||||
sampleMemLen=0;
|
||||
x1_010.reset();
|
||||
reset();
|
||||
|
|
|
@ -845,6 +845,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo
|
|||
case DIV_SYSTEM_X1_010: {
|
||||
int clockSel=flags.getInt("clockSel",0);
|
||||
bool stereo=flags.getBool("stereo",false);
|
||||
bool isBanked=flags.getBool("isBanked",false);
|
||||
|
||||
ImGui::Text("Clock rate:");
|
||||
if (ImGui::RadioButton("16MHz (Seta 1)",clockSel==0)) {
|
||||
|
@ -855,15 +856,24 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo
|
|||
clockSel=1;
|
||||
altered=true;
|
||||
}
|
||||
if (ImGui::RadioButton("14.32MHz (NTSC)",clockSel==2)) {
|
||||
clockSel=2;
|
||||
altered=true;
|
||||
}
|
||||
|
||||
if (ImGui::Checkbox("Stereo",&stereo)) {
|
||||
altered=true;
|
||||
}
|
||||
|
||||
if (ImGui::Checkbox("Bankswitched (Seta 2)",&isBanked)) {
|
||||
altered=true;
|
||||
}
|
||||
|
||||
if (altered) {
|
||||
e->lockSave([&]() {
|
||||
flags.set("clockSel",clockSel);
|
||||
flags.set("stereo",stereo);
|
||||
flags.set("isBanked",isBanked);
|
||||
});
|
||||
}
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue