mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-15 17:25:06 +00:00
PCE: add noise macro (finally!)
This commit is contained in:
parent
8758277199
commit
59d813db7c
3 changed files with 18 additions and 1 deletions
|
@ -710,6 +710,13 @@ DivDataErrors DivInstrument::readInsData(SafeReader& reader, short version) {
|
|||
fm.tomTopFreq=reader.readS();
|
||||
}
|
||||
|
||||
// clear noise macro if PCE instrument and version<63
|
||||
if (version<63 && type==DIV_INS_PCE) {
|
||||
std.dutyMacroLen=0;
|
||||
std.dutyMacroLoop=-1;
|
||||
std.dutyMacroRel=-1;
|
||||
}
|
||||
|
||||
return DIV_DATA_SUCCESS;
|
||||
}
|
||||
|
||||
|
|
|
@ -162,6 +162,13 @@ void DivPlatformPCE::tick() {
|
|||
chWrite(i,0x04,0x80|chan[i].outVol);
|
||||
}
|
||||
}
|
||||
if (chan[i].std.hadDuty && i>=4) {
|
||||
chan[i].noise=chan[i].std.duty;
|
||||
chan[i].freqChanged=true;
|
||||
int noiseSeek=chan[i].note;
|
||||
if (noiseSeek<0) noiseSeek=0;
|
||||
chWrite(i,0x07,chan[i].noise?(0x80|(parent->song.properNoiseLayout?(noiseSeek&31):noiseFreq[noiseSeek%12])):0);
|
||||
}
|
||||
if (chan[i].std.hadArp) {
|
||||
if (!chan[i].inPorta) {
|
||||
if (chan[i].std.arpMode) {
|
||||
|
|
|
@ -1352,9 +1352,12 @@ void FurnaceGUI::drawInsEdit() {
|
|||
if (ins->type==DIV_INS_AY8930) {
|
||||
dutyMax=255;
|
||||
}
|
||||
if (ins->type==DIV_INS_TIA || ins->type==DIV_INS_PCE || ins->type==DIV_INS_AMIGA) {
|
||||
if (ins->type==DIV_INS_TIA || ins->type==DIV_INS_AMIGA) {
|
||||
dutyMax=0;
|
||||
}
|
||||
if (ins->type==DIV_INS_PCE) {
|
||||
dutyMax=1;
|
||||
}
|
||||
if (ins->type==DIV_INS_OPLL || ins->type==DIV_INS_OPL) {
|
||||
dutyMax=0;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue