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

allow nmi call when divmmc's mapram in use

This commit is contained in:
Eugene Lozovoy
2024-01-04 11:54:04 +03:00
parent 948f4190f3
commit 34a98edc64
3 changed files with 10 additions and 9 deletions

View File

@ -24,7 +24,7 @@ module divmmc(
output reg [3:0] page,
output map,
output automap,
output reg mapram,
output ram,
output ramwr_mask,
output cpuwait
@ -65,10 +65,10 @@ always @(posedge clk28 or negedge rst_n) begin
end
// #3Dxx entrypoint is critical for timings, so we're arming 'map' signal as soon as possible
assign automap = automap0 || (bus.m1 && bus.memreq && !mask_hooks && en_hooks && en && !rammap && bus.a[15:8] == 8'h3D);
wire automap = automap0 || (bus.m1 && bus.memreq && !mask_hooks && en_hooks && en && !rammap && bus.a[15:8] == 8'h3D);
reg conmem, mapram;
reg conmem;
wire port_e3_cs = en && bus.ioreq && bus.a[7:0] == 8'hE3;
wire port_e7_cs = en && bus.ioreq && bus.a[7:0] == 8'hE7;
wire port_eb_cs = en && bus.ioreq && bus.a[7:0] == 8'hEB;

View File

@ -13,7 +13,7 @@ module magic(
input magic_button,
input pause_button,
input div_automap,
input div_paged,
output reg magic_mode,
output magic_map,
@ -107,7 +107,7 @@ always @(posedge clk28 or negedge rst_n) begin
end
reg config_rd;
wire [7:0] config_data = {4'b0000, div_automap, 1'b1, pause_button, magic_button};
wire [7:0] config_data = {4'b0000, div_paged, 1'b1, pause_button, magic_button};
always @(posedge clk28 or negedge rst_n) begin
if (!rst_n)
config_rd <= 0;

View File

@ -220,7 +220,8 @@ cpu cpu0(
/* MAGIC */
wire div_automap;
wire div_map;
wire div_mapram;
wire [7:0] magic_dout;
wire magic_dout_active;
wire magic_mode, magic_map;
@ -242,7 +243,7 @@ magic magic0(
.magic_button(ps2_key_magic),
.pause_button(ps2_key_pause),
.div_automap(div_automap),
.div_paged(div_map && !div_mapram),
.magic_mode(magic_mode),
.magic_map(magic_map),
@ -372,7 +373,7 @@ mixer mixer0(
/* DIVMMC */
wire div_map, div_ram, div_ramwr_mask, div_dout_active;
wire div_ram, div_ramwr_mask, div_dout_active;
wire [7:0] div_dout;
wire [3:0] div_page;
wire sd_mosi0;
@ -401,7 +402,7 @@ divmmc divmmc0(
.page(div_page),
.map(div_map),
.automap(div_automap),
.mapram(div_mapram),
.ram(div_ram),
.ramwr_mask(div_ramwr_mask)
);