diff --git a/rtl/apple1.v b/rtl/apple1.v index 475fa64..01f2af8 100644 --- a/rtl/apple1.v +++ b/rtl/apple1.v @@ -116,8 +116,9 @@ module apple1( addr[7:0] == 7 ? T65_PC[23:16] : 8'hAA; // PC regs[63:56] // byte returned from display out - wire [7:0] display_dout = { ~PB7, 7'b0 }; - + wire [6:0] dsp_dout; + wire [7:0] display_dout = { ~PB7, dsp_dout }; + ////////////////////////////////////////////////////////////////////////// // Peripherals @@ -153,7 +154,8 @@ module apple1( .address(addr[0]), .w_en(we & display_cs), - .din(cpu_dout), + .din(cpu_dout), + .dout(dsp_dout), .clr_screen(cls_key), .ready(PB7) ); diff --git a/rtl/display.v b/rtl/display.v index 4b9df69..6b33a23 100644 --- a/rtl/display.v +++ b/rtl/display.v @@ -19,7 +19,8 @@ module display ( // cpu interface input address, // address bus input w_en, // active high write enable strobe - input [7:0] din // 8-bit data bus (input) + input [7:0] din, // 8-bit data bus (input) + output reg [6:0] dout // input data is also seen as output ); ////////////////////////////////////////////////////////////////////////// @@ -254,7 +255,8 @@ module display ( if (address == 1'b0) begin if (cpu_clken & w_en & ready) begin // incoming character - ready <= 0; + ready <= 0; + dout[6:0] <= din[6:0]; if(din[6:0]=='h0D) begin // handle carriage return