rename keyboard_cs, remove pc_monitor

This commit is contained in:
nino-porcino 2021-12-30 19:04:17 +01:00
parent ed9403d04d
commit df84408d1f
2 changed files with 8 additions and 20 deletions

View File

@ -34,7 +34,6 @@ module apple1(
// I/O interface to keyboard // I/O interface to keyboard
input ps2_clk, // PS/2 keyboard serial clock input input ps2_clk, // PS/2 keyboard serial clock input
input ps2_din, // PS/2 keyboard serial data input input ps2_din, // PS/2 keyboard serial data input
input ps2_select, // Input to select the PS/2 keyboard instead of the UART
// Outputs to VGA display // Outputs to VGA display
output vga_h_sync, // hozizontal VGA sync pulse output vga_h_sync, // hozizontal VGA sync pulse
@ -42,10 +41,7 @@ module apple1(
output vga_red, // red VGA signal output vga_red, // red VGA signal
output vga_grn, // green VGA signal output vga_grn, // green VGA signal
output vga_blu, // blue VGA signal output vga_blu, // blue VGA signal
input vga_cls, // clear screen button input vga_cls // clear screen button
// Debugging ports
output [15:0] pc_monitor // spy for program counter / debugging
); );
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// Registers and Wires // Registers and Wires
@ -89,21 +85,15 @@ module apple1(
.we (we), .we (we),
.irq_n (1'b1), .irq_n (1'b1),
.nmi_n (1'b1), .nmi_n (1'b1),
.ready (cpu_clken), .ready (cpu_clken)
.pc_monitor (pc_monitor)
); );
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// Address Decoding // Address Decoding
wire ram_cs = (ab[15:13] == 3'b000); // 0x0000 -> 0x1FFF wire ram_cs = (ab[15:13] == 3'b000); // 0x0000 -> 0x1FFF
wire keyboard_cs = (ab[15:1] == 15'b110100000001000); // 0xD010 -> 0xD011
// font mode, background and foreground colour wire display_cs = (ab[15:1] == 15'b110100000001001); // 0xD012 -> 0xD013
wire vga_mode_cs = (ab[15:2] == 14'b11000000000000); // 0xC000 -> 0xC003
wire keyboard_cs = (ab[15:1] == 15'b110100000001000); // 0xD010 -> 0xD011
wire display_cs = (ab[15:1] == 15'b110100000001001); // 0xD012 -> 0xD013
wire ps2kb_cs = ps2_select & keyboard_cs;
wire basic_cs = (ab[15:12] == 4'b1110); // 0xE000 -> 0xEFFF wire basic_cs = (ab[15:12] == 4'b1110); // 0xE000 -> 0xEFFF
wire rom_cs = (ab[15:8] == 8'b11111111); // 0xFF00 -> 0xFFFF wire rom_cs = (ab[15:8] == 8'b11111111); // 0xFF00 -> 0xFFFF
@ -148,7 +138,7 @@ module apple1(
.rst(rst), .rst(rst),
.key_clk(ps2_clk), .key_clk(ps2_clk),
.key_din(ps2_din), .key_din(ps2_din),
.cs(ps2kb_cs), .cs(keyboard_cs),
.address(ab[0]), .address(ab[0]),
.dout(ps2_dout) .dout(ps2_dout)
); );
@ -181,6 +171,6 @@ module apple1(
rom_cs ? rom_dout : rom_cs ? rom_dout :
basic_cs ? basic_dout : basic_cs ? basic_dout :
display_cs ? display_dout : display_cs ? display_dout :
ps2kb_cs ? ps2_dout : keyboard_cs ? ps2_dout :
8'hFF; 8'hFF;
endmodule endmodule

View File

@ -120,7 +120,6 @@ apple1 apple1
.ps2_clk(ps2_kbd_clk), .ps2_clk(ps2_kbd_clk),
.ps2_din(ps2_kbd_data), .ps2_din(ps2_kbd_data),
.ps2_select(1'b1),
.vga_h_sync(hs), .vga_h_sync(hs),
.vga_v_sync(vs), .vga_v_sync(vs),
@ -128,8 +127,7 @@ apple1 apple1
.vga_grn(g), .vga_grn(g),
.vga_blu(b), .vga_blu(b),
.vga_cls(), // clear screen button (not connected yet) .vga_cls() // clear screen button (not connected yet)
.pc_monitor() // debug program counter (not used)
); );
mist_video mist_video