1
0
mirror of https://github.com/UzixLS/zx-sizif-xxs.git synced 2025-07-18 23:01:40 +03:00

add option to disable sd indication on border

This commit is contained in:
Eugene Lozovoy
2024-01-07 17:47:20 +03:00
parent e7552c5743
commit 76b4d4d838
5 changed files with 51 additions and 6 deletions

View File

@ -29,7 +29,8 @@ module magic(
output reg ulaplus_en,
output reg ay_en,
output reg covox_en,
output reg soundrive_en
output reg soundrive_en,
output reg sd_indication_en
);
localparam magic_on_start = 1'b1;
@ -92,6 +93,7 @@ always @(posedge clk28 or negedge rst_n) begin
ay_en <= 1'b1;
covox_en <= 1'b1;
soundrive_en <= 1'b1;
sd_indication_en <= 1'b1;
end
else if (config_cs && bus.wr) case (bus.a[15:8])
8'h01: {magic_reboot, magic_beeper} <= bus.d[1:0];
@ -103,6 +105,7 @@ always @(posedge clk28 or negedge rst_n) begin
8'h09: {zc_en, divmmc_en} <= bus.d[1:0];
8'h0A: ulaplus_en <= bus.d[0];
8'h0B: {soundrive_en, covox_en} <= bus.d[1:0];
8'h0C: sd_indication_en <= bus.d[0];
endcase
end

View File

@ -62,6 +62,7 @@ wire clkcpu_stall;
wire [2:0] ram_page128;
wire init_done;
wire video_read_req, video_read_req_next;
wire sd_indication;
/* CPU BUS */
@ -116,7 +117,7 @@ video video0(
.machine(machine),
.turbo(turbo),
.border({border[2] ^ ~sd_cs, border[1] ^ magic_beeper, border[0]}),
.border({border[2] ^ sd_indication, border[1] ^ magic_beeper, border[0]}),
.r(r),
.g(g),
@ -227,7 +228,8 @@ wire magic_dout_active;
wire magic_mode, magic_map;
wire joy_sinclair, up_en, ay_en, covox_en, soundrive_en;
panning_t panning;
wire divmmc_en, zc_en;
wire divmmc_en, zc_en, sd_indication_en;
assign sd_indication = sd_indication_en & ~sd_cs;
magic magic0(
.rst_n(n_rstcpu),
@ -259,7 +261,8 @@ magic magic0(
.ulaplus_en(up_en),
.ay_en(ay_en),
.covox_en(covox_en),
.soundrive_en(soundrive_en)
.soundrive_en(soundrive_en),
.sd_indication_en(sd_indication_en)
);
@ -352,7 +355,7 @@ mixer mixer0(
.beeper(beeper ^ magic_beeper),
.tape_out(tape_out),
.tape_in(sd_miso_tape_in),
.tape_in((divmmc_en || zc_en)? sd_indication : sd_miso_tape_in),
.ay_a0(ay_a0),
.ay_b0(ay_b0),
.ay_c0(ay_c0),
@ -406,7 +409,7 @@ divmmc divmmc0(
.ram(div_ram),
.ramwr_mask(div_ramwr_mask)
);
assign sd_mosi_tape_out = (!divmmc_en && !zc_en)? tape_out : sd_mosi0;
assign sd_mosi_tape_out = (divmmc_en || zc_en)? sd_mosi0 : tape_out;
/* ULAPLUS */