put display din as dout as in the real PIA
This commit is contained in:
parent
ac99eaff41
commit
c80b372ef2
|
@ -116,8 +116,9 @@ module apple1(
|
||||||
addr[7:0] == 7 ? T65_PC[23:16] : 8'hAA; // PC regs[63:56]
|
addr[7:0] == 7 ? T65_PC[23:16] : 8'hAA; // PC regs[63:56]
|
||||||
|
|
||||||
// byte returned from display out
|
// 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
|
// Peripherals
|
||||||
|
|
||||||
|
@ -153,7 +154,8 @@ module apple1(
|
||||||
|
|
||||||
.address(addr[0]),
|
.address(addr[0]),
|
||||||
.w_en(we & display_cs),
|
.w_en(we & display_cs),
|
||||||
.din(cpu_dout),
|
.din(cpu_dout),
|
||||||
|
.dout(dsp_dout),
|
||||||
.clr_screen(cls_key),
|
.clr_screen(cls_key),
|
||||||
.ready(PB7)
|
.ready(PB7)
|
||||||
);
|
);
|
||||||
|
|
|
@ -19,7 +19,8 @@ module display (
|
||||||
// cpu interface
|
// cpu interface
|
||||||
input address, // address bus
|
input address, // address bus
|
||||||
input w_en, // active high write enable strobe
|
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 (address == 1'b0) begin
|
||||||
if (cpu_clken & w_en & ready) begin
|
if (cpu_clken & w_en & ready) begin
|
||||||
// incoming character
|
// incoming character
|
||||||
ready <= 0;
|
ready <= 0;
|
||||||
|
dout[6:0] <= din[6:0];
|
||||||
|
|
||||||
if(din[6:0]=='h0D) begin
|
if(din[6:0]=='h0D) begin
|
||||||
// handle carriage return
|
// handle carriage return
|
||||||
|
|
Loading…
Reference in New Issue