Merge branch 'tildearrow:master' into master
This commit is contained in:
commit
67de26fb68
24 changed files with 235 additions and 13 deletions
|
|
@ -452,6 +452,9 @@ static int opChanOffsH[4]={
|
|||
};
|
||||
|
||||
void DivPlatformGenesisExt::tick(bool sysTick) {
|
||||
int hardResetElapsed=0;
|
||||
bool mustHardReset=false;
|
||||
|
||||
if (extMode) {
|
||||
bool writeSomething=false;
|
||||
unsigned char writeMask=2;
|
||||
|
|
@ -462,6 +465,12 @@ void DivPlatformGenesisExt::tick(bool sysTick) {
|
|||
writeMask&=~(1<<(4+i));
|
||||
opChan[i].keyOff=false;
|
||||
}
|
||||
if (opChan[i].hardReset && opChan[i].keyOn) {
|
||||
mustHardReset=true;
|
||||
unsigned short baseAddr=chanOffs[extChanOffs]|opOffs[i];
|
||||
immWrite(baseAddr+ADDR_SL_RR,0x0f);
|
||||
hardResetElapsed++;
|
||||
}
|
||||
}
|
||||
if (writeSomething) {
|
||||
if (chan[csmChan].active) { // CSM
|
||||
|
|
@ -630,6 +639,22 @@ void DivPlatformGenesisExt::tick(bool sysTick) {
|
|||
(writeMask&0x80)?'4':'-'
|
||||
);*/
|
||||
immWrite(0x28,writeMask);
|
||||
|
||||
// hard reset handling
|
||||
if (mustHardReset) {
|
||||
for (unsigned int i=hardResetElapsed; i<hardResetCycles; i++) {
|
||||
immWrite(0xf0,i&0xff);
|
||||
}
|
||||
for (int i=0; i<4; i++) {
|
||||
if (opChan[i].keyOn && opChan[i].hardReset) {
|
||||
// restore SL/RR
|
||||
unsigned short baseAddr=chanOffs[extChanOffs]|opOffs[i];
|
||||
DivInstrumentFM::Operator& op=chan[extChanOffs].state.op[i];
|
||||
immWrite(baseAddr+ADDR_SL_RR,(op.rr&15)|(op.sl<<4));
|
||||
}
|
||||
}
|
||||
immWrite(0x28,writeMask);
|
||||
}
|
||||
}
|
||||
|
||||
if (extMode) {
|
||||
|
|
|
|||
|
|
@ -113,7 +113,33 @@ void FurnaceGUI::drawNewSong() {
|
|||
nextDescName=i.name;
|
||||
accepted=true;
|
||||
}
|
||||
if (ImGui::IsItemHovered()) {
|
||||
if (ImGui::BeginTooltip()) {
|
||||
std::map<DivSystem,int> chipCounts;
|
||||
std::vector<DivSystem> chips;
|
||||
for (FurnaceGUISysDefChip chip: i.orig) {
|
||||
if (chipCounts.find(chip.sys)==chipCounts.end()) {
|
||||
chipCounts[chip.sys]=1;
|
||||
chips.push_back(chip.sys);
|
||||
} else {
|
||||
chipCounts[chip.sys]+=1;
|
||||
}
|
||||
}
|
||||
for (size_t chipIndex=0; chipIndex<chips.size(); chipIndex++) {
|
||||
DivSystem chip=chips[chipIndex];
|
||||
const DivSysDef* sysDef=e->getSystemDef(chip);
|
||||
ImGui::Text("%s (x%d): ",sysDef->name,chipCounts[chip]);
|
||||
ImGui::TextWrapped("%s",sysDef->description);
|
||||
if (chipIndex+1<chips.size()) {
|
||||
ImGui::Separator();
|
||||
}
|
||||
}
|
||||
|
||||
ImGui::EndTooltip();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ImGui::EndTable();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue