From a371e5ec4c49252afb5fadac147426e7a51d4b73 Mon Sep 17 00:00:00 2001 From: UzixLS Date: Sun, 30 Jan 2022 16:02:57 +0300 Subject: [PATCH] magic: add ay_en --- fpga/rtl/magic.sv | 3 +++ fpga/rtl/top.sv | 5 +++-- rom_src/config.asm | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/fpga/rtl/magic.sv b/fpga/rtl/magic.sv index f5e39c7..7e87262 100755 --- a/fpga/rtl/magic.sv +++ b/fpga/rtl/magic.sv @@ -27,6 +27,7 @@ module magic( output reg joy_sinclair, output divmmc_t divmmc_en, output reg ulaplus_en, + output reg ay_en, output reg covox_en, output reg soundrive_en ); @@ -81,6 +82,7 @@ always @(posedge clk28 or negedge rst_n) begin joy_sinclair <= 0; divmmc_en <= DIVMMC_NOOS; ulaplus_en <= 1'b1; + ay_en <= 1'b1; covox_en <= 1'b1; soundrive_en <= 1'b1; end @@ -91,6 +93,7 @@ always @(posedge clk28 or negedge rst_n) begin 8'h03: turbo <= turbo_t'(bus.d_reg[2:0]); 8'h04: panning <= panning_t'(bus.d_reg[1:0]); 8'h07: joy_sinclair <= bus.d_reg[0]; + 8'h08: ay_en <= bus.d_reg[0]; 8'h09: divmmc_en <= divmmc_t'(bus.d_reg[1:0]); 8'h0a: ulaplus_en <= bus.d_reg[0]; 8'h0b: {soundrive_en, covox_en} <= bus.d_reg[1:0]; diff --git a/fpga/rtl/top.sv b/fpga/rtl/top.sv index bf0ff56..eec4756 100755 --- a/fpga/rtl/top.sv +++ b/fpga/rtl/top.sv @@ -232,7 +232,7 @@ wire div_automap; wire [7:0] magic_dout; wire magic_dout_active; wire magic_mode, magic_map; -wire joy_sinclair, up_en, covox_en, soundrive_en; +wire joy_sinclair, up_en, ay_en, covox_en, soundrive_en; panning_t panning; divmmc_t divmmc_en; magic magic0( @@ -263,6 +263,7 @@ magic magic0( .panning(panning), .divmmc_en(divmmc_en), .ulaplus_en(up_en), + .ay_en(ay_en), .covox_en(covox_en), .soundrive_en(soundrive_en) ); @@ -316,7 +317,7 @@ turbosound turbosound0( .rst_n(n_rstcpu), .clk28(clk28), .ck35(ck35), - .en(1'b1), + .en(ay_en), .en_ts(1'b1), .bus(bus), diff --git a/rom_src/config.asm b/rom_src/config.asm index fa96241..612b94a 100644 --- a/rom_src/config.asm +++ b/rom_src/config.asm @@ -29,7 +29,7 @@ panning DB 1 custom_rom DB 0 rom48 DB 0 joystick DB 0 -_reserv2 DB 0 +ay DB 1 divmmc DB 2 ulaplus DB 1 dac DB 3