Skip to content

Commit

Permalink
ym3438: fix ch index output, add sync signal (fm_sel23)
Browse files Browse the repository at this point in the history
  • Loading branch information
nukeykt committed Aug 14, 2023
1 parent b739c94 commit cac7f92
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions md_board.v
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ module md_board
output [9:0] MOL_2612, MOR_2612, // ym2612 dac emulation, signed
output [15:0] PSG,
output [2:0] DAC_ch_index,
output fm_sel23,

// input
input [6:0] PA_i,
Expand Down Expand Up @@ -425,6 +426,8 @@ module md_board
.DAC_ch_index(DAC_ch_index)
);

assign fm_sel23 = TEST0_o;

wire [2:0] IPL;
reg BR;
wire BERR;
Expand Down
2 changes: 1 addition & 1 deletion ym3438_regs.v
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,7 @@ module ym3438_reg_ctrl

// EXTRA start

wire [2:0] dac_index_i = fsm_dac_out_sel ? reg_cnt[2:0] : (reg_cnt[2:0] + 3'h1);
wire [2:0] dac_index_i = reg_cnt[1:0] + (reg_cnt[2] ? 3'h3 : 3'h0) + { 2'h0, ~fsm_dac_out_sel };

ym_slatch #(.DATA_WIDTH(3)) dac_index_lock
(
Expand Down

0 comments on commit cac7f92

Please sign in to comment.