mirror of
https://github.com/UzixLS/zx-sizif-xxs.git
synced 2025-07-19 07:11:28 +03:00
add option to disable sd indication on border
This commit is contained in:
@ -29,7 +29,8 @@ module magic(
|
|||||||
output reg ulaplus_en,
|
output reg ulaplus_en,
|
||||||
output reg ay_en,
|
output reg ay_en,
|
||||||
output reg covox_en,
|
output reg covox_en,
|
||||||
output reg soundrive_en
|
output reg soundrive_en,
|
||||||
|
output reg sd_indication_en
|
||||||
);
|
);
|
||||||
|
|
||||||
localparam magic_on_start = 1'b1;
|
localparam magic_on_start = 1'b1;
|
||||||
@ -92,6 +93,7 @@ always @(posedge clk28 or negedge rst_n) begin
|
|||||||
ay_en <= 1'b1;
|
ay_en <= 1'b1;
|
||||||
covox_en <= 1'b1;
|
covox_en <= 1'b1;
|
||||||
soundrive_en <= 1'b1;
|
soundrive_en <= 1'b1;
|
||||||
|
sd_indication_en <= 1'b1;
|
||||||
end
|
end
|
||||||
else if (config_cs && bus.wr) case (bus.a[15:8])
|
else if (config_cs && bus.wr) case (bus.a[15:8])
|
||||||
8'h01: {magic_reboot, magic_beeper} <= bus.d[1:0];
|
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'h09: {zc_en, divmmc_en} <= bus.d[1:0];
|
||||||
8'h0A: ulaplus_en <= bus.d[0];
|
8'h0A: ulaplus_en <= bus.d[0];
|
||||||
8'h0B: {soundrive_en, covox_en} <= bus.d[1:0];
|
8'h0B: {soundrive_en, covox_en} <= bus.d[1:0];
|
||||||
|
8'h0C: sd_indication_en <= bus.d[0];
|
||||||
endcase
|
endcase
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -62,6 +62,7 @@ wire clkcpu_stall;
|
|||||||
wire [2:0] ram_page128;
|
wire [2:0] ram_page128;
|
||||||
wire init_done;
|
wire init_done;
|
||||||
wire video_read_req, video_read_req_next;
|
wire video_read_req, video_read_req_next;
|
||||||
|
wire sd_indication;
|
||||||
|
|
||||||
|
|
||||||
/* CPU BUS */
|
/* CPU BUS */
|
||||||
@ -116,7 +117,7 @@ video video0(
|
|||||||
|
|
||||||
.machine(machine),
|
.machine(machine),
|
||||||
.turbo(turbo),
|
.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),
|
.r(r),
|
||||||
.g(g),
|
.g(g),
|
||||||
@ -227,7 +228,8 @@ wire magic_dout_active;
|
|||||||
wire magic_mode, magic_map;
|
wire magic_mode, magic_map;
|
||||||
wire joy_sinclair, up_en, ay_en, covox_en, soundrive_en;
|
wire joy_sinclair, up_en, ay_en, covox_en, soundrive_en;
|
||||||
panning_t panning;
|
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(
|
magic magic0(
|
||||||
.rst_n(n_rstcpu),
|
.rst_n(n_rstcpu),
|
||||||
@ -259,7 +261,8 @@ magic magic0(
|
|||||||
.ulaplus_en(up_en),
|
.ulaplus_en(up_en),
|
||||||
.ay_en(ay_en),
|
.ay_en(ay_en),
|
||||||
.covox_en(covox_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),
|
.beeper(beeper ^ magic_beeper),
|
||||||
.tape_out(tape_out),
|
.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_a0(ay_a0),
|
||||||
.ay_b0(ay_b0),
|
.ay_b0(ay_b0),
|
||||||
.ay_c0(ay_c0),
|
.ay_c0(ay_c0),
|
||||||
@ -406,7 +409,7 @@ divmmc divmmc0(
|
|||||||
.ram(div_ram),
|
.ram(div_ram),
|
||||||
.ramwr_mask(div_ramwr_mask)
|
.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 */
|
/* ULAPLUS */
|
||||||
|
@ -31,6 +31,7 @@ ay DB 1
|
|||||||
sd DB 2
|
sd DB 2
|
||||||
ulaplus DB 1
|
ulaplus DB 1
|
||||||
dac DB 3
|
dac DB 3
|
||||||
|
sdind DB 1
|
||||||
ENDS
|
ENDS
|
||||||
|
|
||||||
CFG_DEFAULT CFG_T
|
CFG_DEFAULT CFG_T
|
||||||
|
@ -37,10 +37,17 @@ menudefault: MENU_DEF 20
|
|||||||
MENUENTRY_T str_sd menu_sd_value_cb menu_sd_cb
|
MENUENTRY_T str_sd menu_sd_value_cb menu_sd_cb
|
||||||
MENUENTRY_T str_ulaplus menu_ulaplus_value_cb menu_ulaplus_cb
|
MENUENTRY_T str_ulaplus menu_ulaplus_value_cb menu_ulaplus_cb
|
||||||
MENUENTRY_T str_dac menu_dac_value_cb menu_dac_cb
|
MENUENTRY_T str_dac menu_dac_value_cb menu_dac_cb
|
||||||
|
MENUENTRY_T str_menuadv 0 menu_menuadv_cb
|
||||||
MENUENTRY_T str_exit menu_exit_value_cb menu_exit_cb
|
MENUENTRY_T str_exit menu_exit_value_cb menu_exit_cb
|
||||||
MENUENTRY_T 0
|
MENUENTRY_T 0
|
||||||
.end:
|
.end:
|
||||||
|
|
||||||
|
menuadv: MENU_DEF 22
|
||||||
|
MENUENTRY_T str_sd_indication menu_sdind_value_cb menu_sdind_cb
|
||||||
|
MENUENTRY_T str_back 0 menu_back_cb
|
||||||
|
MENUENTRY_T 0
|
||||||
|
.end:
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
menu_machine_value_cb:
|
menu_machine_value_cb:
|
||||||
@ -116,6 +123,13 @@ menu_exit_value_cb:
|
|||||||
DW str_exit_no_reboot.end-2
|
DW str_exit_no_reboot.end-2
|
||||||
DW str_exit_reboot.end-2
|
DW str_exit_reboot.end-2
|
||||||
|
|
||||||
|
menu_sdind_value_cb:
|
||||||
|
ld ix, .values_table
|
||||||
|
ld a, (cfg.sdind)
|
||||||
|
jp menu_value_get
|
||||||
|
.values_table:
|
||||||
|
DW str_off_short.end-2
|
||||||
|
DW str_on_short.end-2
|
||||||
menu_value_get:
|
menu_value_get:
|
||||||
sla a
|
sla a
|
||||||
ld c, a
|
ld c, a
|
||||||
@ -203,6 +217,25 @@ menu_exit_cb:
|
|||||||
ld (var_exit_flag), a
|
ld (var_exit_flag), a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
menu_menuadv_cb:
|
||||||
|
ld hl, menuadv
|
||||||
|
call menu_init
|
||||||
|
ret
|
||||||
|
|
||||||
|
menu_sdind_cb:
|
||||||
|
ld a, (cfg.sdind)
|
||||||
|
ld c, 1
|
||||||
|
call menu_handle_press
|
||||||
|
ld (cfg.sdind), a
|
||||||
|
ld bc, #0cff
|
||||||
|
out (c), a
|
||||||
|
ret
|
||||||
|
|
||||||
|
menu_back_cb:
|
||||||
|
call restore_screen
|
||||||
|
ld hl, (var_menumain)
|
||||||
|
jp menu_init
|
||||||
|
|
||||||
|
|
||||||
; IN - A - variable to change
|
; IN - A - variable to change
|
||||||
; IN - C - max value
|
; IN - C - max value
|
||||||
|
@ -11,6 +11,8 @@ str_exit_reboot: DEFSTR "& reboot "
|
|||||||
str_exit_no_reboot: DEFSTR " "
|
str_exit_no_reboot: DEFSTR " "
|
||||||
str_on: DEFSTR " ON"
|
str_on: DEFSTR " ON"
|
||||||
str_off: DEFSTR " OFF"
|
str_off: DEFSTR " OFF"
|
||||||
|
str_on_short: DEFSTR " ON"
|
||||||
|
str_off_short: DEFSTR "OFF"
|
||||||
str_machine: DEFSTR "Machine"
|
str_machine: DEFSTR "Machine"
|
||||||
str_machine_48: DEFSTR " 48"
|
str_machine_48: DEFSTR " 48"
|
||||||
str_machine_128: DEFSTR " 128"
|
str_machine_128: DEFSTR " 128"
|
||||||
@ -37,3 +39,6 @@ str_dac: DEFSTR "DAC"
|
|||||||
str_dac_covox: DEFSTR " Covox"
|
str_dac_covox: DEFSTR " Covox"
|
||||||
str_dac_sd: DEFSTR " SD"
|
str_dac_sd: DEFSTR " SD"
|
||||||
str_dac_covoxsd: DEFSTR "Covox+SD"
|
str_dac_covoxsd: DEFSTR "Covox+SD"
|
||||||
|
str_menuadv: DEFSTR "Advanced..."
|
||||||
|
str_sd_indication: DEFSTR "SD indication"
|
||||||
|
str_back: DEFSTR "Go back..."
|
||||||
|
Reference in New Issue
Block a user