Permalink
Browse files

Fix timing for auto region patching

  • Loading branch information...
mrehkopf committed Dec 8, 2018
1 parent 87403fb commit 5d5e918fb069d867d0fd5cdcc29e160b1f037108
Showing with 30 additions and 30 deletions.
  1. +6 −6 verilog/sd2snes/main.v
  2. +6 −6 verilog/sd2snes_cx4/main.v
  3. +6 −6 verilog/sd2snes_gsu/main.v
  4. +6 −6 verilog/sd2snes_obc1/main.v
  5. +6 −6 verilog/sd2snes_sa1/main.v
@@ -717,15 +717,15 @@ end
always @(posedge CLK2) begin
if(SNES_cycle_end) r213f_forceread <= 1'b1;
else if(SNES_PARD_start & r213f_enable) begin
// r213f_delay <= 3'b000;
// r213f_state <= 2'b10;
// end else if(r213f_state == 2'b10) begin
// r213f_delay <= r213f_delay - 1;
// if(r213f_delay == 3'b000) begin
r213f_delay <= 3'b001;
r213f_state <= 2'b10;
end else if(r213f_state == 2'b10) begin
r213f_delay <= r213f_delay - 1;
if(r213f_delay == 3'b000) begin
r213f_forceread <= 1'b0;
r213f_state <= 2'b01;
r213fr <= {SNES_DATA[7:5], mcu_region, SNES_DATA[3:0]};
// end
end
end
end

@@ -646,15 +646,15 @@ end
always @(posedge CLK2) begin
if(SNES_cycle_end) r213f_forceread <= 1'b1;
else if(SNES_PARD_start & r213f_enable) begin
// r213f_delay <= 3'b000;
// r213f_state <= 2'b10;
// end else if(r213f_state == 2'b10) begin
// r213f_delay <= r213f_delay - 1;
// if(r213f_delay == 3'b000) begin
r213f_delay <= 3'b001;
r213f_state <= 2'b10;
end else if(r213f_state == 2'b10) begin
r213f_delay <= r213f_delay - 1;
if(r213f_delay == 3'b000) begin
r213f_forceread <= 1'b0;
r213f_state <= 2'b01;
r213fr <= {SNES_DATA[7:5], mcu_region, SNES_DATA[3:0]};
// end
end
end
end

@@ -786,15 +786,15 @@ end
always @(posedge CLK2) begin
if(SNES_cycle_end) r213f_forceread <= 1'b1;
else if(SNES_PARD_start & r213f_enable) begin
// r213f_delay <= 3'b000;
// r213f_state <= 2'b10;
// end else if(r213f_state == 2'b10) begin
// r213f_delay <= r213f_delay - 1;
// if(r213f_delay == 3'b000) begin
r213f_delay <= 3'b001;
r213f_state <= 2'b10;
end else if(r213f_state == 2'b10) begin
r213f_delay <= r213f_delay - 1;
if(r213f_delay == 3'b000) begin
r213f_forceread <= 1'b0;
r213f_state <= 2'b01;
r213fr <= {SNES_DATA[7:5], mcu_region, SNES_DATA[3:0]};
// end
end
end
end

@@ -590,15 +590,15 @@ end
always @(posedge CLK2) begin
if(SNES_cycle_end) r213f_forceread <= 1'b1;
else if(SNES_PARD_start & r213f_enable) begin
// r213f_delay <= 3'b000;
// r213f_state <= 2'b10;
// end else if(r213f_state == 2'b10) begin
// r213f_delay <= r213f_delay - 1;
// if(r213f_delay == 3'b000) begin
r213f_delay <= 3'b001;
r213f_state <= 2'b10;
end else if(r213f_state == 2'b10) begin
r213f_delay <= r213f_delay - 1;
if(r213f_delay == 3'b000) begin
r213f_forceread <= 1'b0;
r213f_state <= 2'b01;
r213fr <= {SNES_DATA[7:5], mcu_region, SNES_DATA[3:0]};
// end
end
end
end

@@ -784,15 +784,15 @@ end
always @(posedge CLK2) begin
if(SNES_cycle_end) r213f_forceread <= 1'b1;
else if(SNES_PARD_start & r213f_enable) begin
// r213f_delay <= 3'b000;
// r213f_state <= 2'b10;
// end else if(r213f_state == 2'b10) begin
// r213f_delay <= r213f_delay - 1;
// if(r213f_delay == 3'b000) begin
r213f_delay <= 3'b001;
r213f_state <= 2'b10;
end else if(r213f_state == 2'b10) begin
r213f_delay <= r213f_delay - 1;
if(r213f_delay == 3'b000) begin
r213f_forceread <= 1'b0;
r213f_state <= 2'b01;
r213fr <= {SNES_DATA[7:5], mcu_region, SNES_DATA[3:0]};
// end
end
end
end

0 comments on commit 5d5e918

Please sign in to comment.