From 6da2127cec2fd2250d158f8eb9a98a9a14602e51 Mon Sep 17 00:00:00 2001 From: nino-porcino Date: Sat, 8 Jan 2022 14:23:29 +0100 Subject: [PATCH] connect interrupt pin --- rtl/apple1.v | 5 ++++- rtl/apple1_mist.sv | 11 +++++++---- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/rtl/apple1.v b/rtl/apple1.v index 65d06a3..d96560d 100644 --- a/rtl/apple1.v +++ b/rtl/apple1.v @@ -39,6 +39,9 @@ module apple1( // I/O interface to keyboard input ps2_clk, // PS/2 keyboard serial clock input input ps2_din, // PS/2 keyboard serial data input + + // interrupt signa + input INT_n, // Outputs to VGA display output vga_h_sync, // hozizontal VGA sync pulse @@ -76,7 +79,7 @@ module apple1( .dbi (cpu_din), .dbo (cpu_dout), .we (we), - .irq_n (1'b1), + .irq_n (INT_n), .nmi_n (1'b1), .ready (cpu_clken) ); diff --git a/rtl/apple1_mist.sv b/rtl/apple1_mist.sv index be6786b..905bf49 100644 --- a/rtl/apple1_mist.sv +++ b/rtl/apple1_mist.sv @@ -6,8 +6,7 @@ // TODO use a CPU that allows illegal instructions // TODO ram refresh lost CPU cycles -// TODO power on-off key ? (init ram) -// TODO implement power off/on with F9 +// TODO power on-off key ? init ram with values // TODO ram powerup initial values // TODO reorganize file structure // TODO ACI: wav tools @@ -332,9 +331,13 @@ apple1 apple1 .ram_dout (bus_dout), .ram_rd (cpu_rd), .ram_wr (cpu_wr), - + + // ps2 keyboard .ps2_clk(ps2_kbd_clk), .ps2_din(ps2_kbd_data), + + // interrupt signal + .INT_n(VDP_INT_n), .vga_h_sync(hs), .vga_v_sync(vs), @@ -595,7 +598,7 @@ vram vram ); wire [7:0] vdp_dout; -wire VDP_INT_n; // TODO not connected yet +wire VDP_INT_n; // divide by two the vdp_clock (which is doubled for the scandoubler) reg vdp_ena;