1
0
mirror of https://github.com/UzixLS/zx-sizif-xxs.git synced 2025-07-19 07:11:28 +03:00

turbosound.sv: add en_ts

This commit is contained in:
UzixLS
2021-06-19 11:30:32 +03:00
parent df3381a03c
commit 23cf63b02c
2 changed files with 6 additions and 2 deletions

View File

@ -313,6 +313,7 @@ turbosound turbosound0(
.clk28(clk28),
.ck35(ck35),
.en(1'b1),
.en_ts(1'b1),
.bus(bus),
.d_out(turbosound_dout),

View File

@ -4,6 +4,7 @@ module turbosound(
input clk28,
input ck35,
input en,
input en_ts,
cpu_bus bus,
output [7:0] d_out,
@ -36,7 +37,9 @@ always @(posedge clk28 or negedge rst_n) begin
else begin
ay_bc1 <= en && port_fffd;
ay_bdir <= en && port_bffd && bus.wr;
if (bus.ioreq && port_fffd && bus.wr && bus.d_reg[7:3] == 5'b11111)
if (!en_ts)
ay_sel <= 0;
else if (bus.ioreq && port_fffd && bus.wr && bus.d_reg[7:3] == 5'b11111)
ay_sel <= bus.d_reg[0];
end
end
@ -76,7 +79,7 @@ YM2149 ym2149_0(
YM2149 ym2149_1(
.CLK(clk28),
.ENA(ay_ck[1]),
.RESET_H(~rst_n),
.RESET_H(~rst_n || !en_ts),
.I_SEL_L(1'b1),
.I_DA(bus.d_reg),
.O_DA(ay_dout1),