mirror of
https://github.com/MiSTer-devel/CDi_MiSTer.git
synced 2026-05-31 03:03:53 +00:00
- Added clock divider to get 0.5 MHz from 30 MHz system clock The system timer tick now occurs every 8.1ms like it does on a 210/05 - Added reset delay mechanism to fix the resulting time out when polling for the PAL/NTSC status. This occurs when the m68k is overclocked - Added captured RC5 test data to confirm compatibility with the Thumbstick remote controller in a simulated environment
23 lines
475 B
Systemverilog
23 lines
475 B
Systemverilog
module resetdelay (
|
|
input clk,
|
|
input reset,
|
|
input vsync, // Used to reduce the number of bits to count
|
|
output bit delayedreset
|
|
);
|
|
|
|
bit [2:0] cnt;
|
|
bit vsync_q;
|
|
|
|
always_ff @(posedge clk) begin
|
|
vsync_q <= vsync;
|
|
|
|
if (reset) begin
|
|
cnt <= 0;
|
|
delayedreset <= 1;
|
|
end else if (vsync && !vsync_q) begin
|
|
cnt <= cnt + 1;
|
|
if (cnt == '1) delayedreset <= 0;
|
|
end
|
|
end
|
|
endmodule
|