mirror of
https://github.com/mist-devel/mist-board.git
synced 2026-02-06 08:04:41 +00:00
[C64] CIA: fix flag_n input
This commit is contained in:
@@ -1,8 +1,7 @@
|
||||
// MOS6526
|
||||
// by Rayne
|
||||
// Timers & Interrupts are rewritten by slingshot
|
||||
// Passes all CIA Timer tests
|
||||
// TODO: check if Flag and Serial port interrupts are still working
|
||||
// Passes all Lorenz CIA Timer tests
|
||||
|
||||
module mos6526 (
|
||||
input wire mode, // 0 - 6526 "old", 1 - 8521 "new"
|
||||
@@ -153,9 +152,14 @@ end
|
||||
|
||||
// FLAG Input
|
||||
always @(posedge clk) begin
|
||||
if (!res_n || int_reset) icr[4] <= 1'b0;
|
||||
else if (!flag_n && flag_n_prev) icr[4] <= 1'b1;
|
||||
if (phi2_p) flag_n_prev <= flag_n;
|
||||
if (!res_n) icr[4] <= 1'b0;
|
||||
else begin
|
||||
if (!flag_n && flag_n_prev) icr[4] <= 1'b1;
|
||||
if (phi2_p) begin
|
||||
flag_n_prev <= flag_n;
|
||||
if (int_reset) icr[4] <= 1'b0;
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
// Port Control Output
|
||||
|
||||
Reference in New Issue
Block a user