Skip to content

Commit

Permalink
opl3: fix 4-op mode (#153)
Browse files Browse the repository at this point in the history
  • Loading branch information
gtaylormb authored May 21, 2024
1 parent 6bc4fab commit 36c9370
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions rtl/soc/sound/opl3/channels.sv
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,20 @@ module channels
signals.add_d = chd && !connection_sel[self.channel_num+3];
end
end
else if (self.channel_num < 6) begin
if (self.bank_num == 0) begin
signals.add_a = !is_new || (cha && !connection_sel[self.channel_num-3]);
signals.add_b = !is_new || (chb && !connection_sel[self.channel_num-3]);
signals.add_c = !is_new || (chc && !connection_sel[self.channel_num-3]);
signals.add_d = !is_new || (chd && !connection_sel[self.channel_num-3]);
end
else begin
signals.add_a = cha && !connection_sel[self.channel_num];
signals.add_b = chb && !connection_sel[self.channel_num];
signals.add_c = chc && !connection_sel[self.channel_num];
signals.add_d = chd && !connection_sel[self.channel_num];
end
end
else begin
signals.add_a = (self.bank_num == 0 && !is_new) || cha;
signals.add_b = (self.bank_num == 0 && !is_new) || chb;
Expand Down

0 comments on commit 36c9370

Please sign in to comment.