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

magic rom: refactor

This commit is contained in:
UzixLS
2022-01-31 21:32:14 +03:00
parent a371e5ec4c
commit d6a31c0502
10 changed files with 208 additions and 427 deletions

View File

@ -87,8 +87,7 @@ always @(posedge clk28 or negedge rst_n) begin
soundrive_en <= 1'b1;
end
else if (config_cs && bus.wr) case (bus.a_reg[15:8])
8'h00: magic_reboot <= bus.d_reg[0];
8'h01: magic_beeper <= bus.d_reg[0];
8'h01: {magic_reboot, magic_beeper} <= bus.d_reg[1:0];
8'h02: machine <= machine_t'(bus.d_reg[2:0]);
8'h03: turbo <= turbo_t'(bus.d_reg[2:0]);
8'h04: panning <= panning_t'(bus.d_reg[1:0]);
@ -106,7 +105,7 @@ always @(posedge clk28 or negedge rst_n) begin
if (!rst_n)
config_rd <= 0;
else
config_rd <= config_cs && bus.rd && bus.a_reg[15:8] == 8'hFF;
config_rd <= config_cs && bus.rd && bus.a_reg[15:8] == 8'h00;
end