Virtual Boy: noise length macro

This commit is contained in:
tildearrow 2022-10-13 03:30:05 -05:00
parent ef5d6cb554
commit 0f0c8b5567
2 changed files with 12 additions and 1 deletions

View File

@ -148,6 +148,13 @@ void DivPlatformVB::tick(bool sysTick) {
}
chan[i].freqChanged=true;
}
if (i==5 && chan[i].std.duty.had) {
if ((chan[i].std.duty.val&7)!=((chan[i].envHigh>>4)&7)) {
chan[i].envHigh&=~0x70;
chan[i].envHigh|=(chan[i].std.duty.val&7)<<4;
writeEnv(i,true);
}
}
if (chan[i].std.wave.had) {
if (chan[i].wave!=chan[i].std.wave.val || chan[i].ws.activeChanged()) {
chan[i].wave=chan[i].std.wave.val;

View File

@ -4702,9 +4702,13 @@ void FurnaceGUI::drawInsEdit() {
}
if (ins->type==DIV_INS_TIA || ins->type==DIV_INS_AMIGA || ins->type==DIV_INS_SCC ||
ins->type==DIV_INS_PET || ins->type==DIV_INS_VIC || ins->type==DIV_INS_SEGAPCM ||
ins->type==DIV_INS_FM || ins->type==DIV_INS_VBOY) {
ins->type==DIV_INS_FM) {
dutyMax=0;
}
if (ins->type==DIV_INS_VBOY) {
dutyLabel="Noise Length";
dutyMax=7;
}
if (ins->type==DIV_INS_PCE || ins->type==DIV_INS_NAMCO) {
dutyLabel="Noise";
dutyMax=(ins->type==DIV_INS_PCE && !ins->amiga.useSample)?1:0;