mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-27 15:03:01 +00:00
Merge pull request #1022 from tildearrow/x1_010_bank
Add Seta 2 Bankswitch support
This commit is contained in:
commit
ff3cebfffd
4 changed files with 13 additions and 8 deletions
|
@ -947,6 +947,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;
|
||||
}
|
||||
|
@ -979,7 +980,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));
|
||||
|
||||
|
@ -1018,10 +1019,6 @@ void DivPlatformX1_010::renderSamples(int sysID) {
|
|||
sampleMemLen=memPos+256;
|
||||
}
|
||||
|
||||
void DivPlatformX1_010::setBanked(bool banked) {
|
||||
isBanked=banked;
|
||||
}
|
||||
|
||||
int DivPlatformX1_010::init(DivEngine* p, int channels, int sugRate, const DivConfig& flags) {
|
||||
parent=p;
|
||||
dumpWrites=false;
|
||||
|
@ -1032,7 +1029,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();
|
||||
|
|
|
@ -153,7 +153,6 @@ class DivPlatformX1_010: public DivDispatch, public vgsound_emu_mem_intf {
|
|||
bool isSampleLoaded(int index, int sample);
|
||||
void renderSamples(int chipID);
|
||||
const char** getRegisterSheet();
|
||||
void setBanked(bool banked);
|
||||
int init(DivEngine* parent, int channels, int sugRate, const DivConfig& flags);
|
||||
void quit();
|
||||
DivPlatformX1_010():
|
||||
|
|
|
@ -2101,7 +2101,10 @@ void FurnaceGUI::initSystemPresets() {
|
|||
);
|
||||
ENTRY(
|
||||
"Seta 2", {
|
||||
CH(DIV_SYSTEM_X1_010, 1.0f, 0, "clockSel=1")
|
||||
CH(DIV_SYSTEM_X1_010, 1.0f, 0,
|
||||
"clockSel=1\n"
|
||||
"isBanked=true\n"
|
||||
)
|
||||
}
|
||||
);
|
||||
ENTRY(
|
||||
|
|
|
@ -1016,6 +1016,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:");
|
||||
ImGui::Indent();
|
||||
|
@ -1037,10 +1038,15 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo
|
|||
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 a new issue