From 157af7c111eefad20901f47cce8d17c314bf37be Mon Sep 17 00:00:00 2001 From: Niels Moseley Date: Wed, 9 May 2018 02:59:11 +0200 Subject: [PATCH] Updated DE0 project to have 0xC00X colour support. --- .../webpack_ise/Apple-One.gise | 16 +++++++++------- .../webpack_ise/apple1_s3e_starterkit_top.ipf | Bin 40639 -> 51243 bytes .../webpack_ise/apple1_s3e_starterkit_top.ucf | 3 +++ .../apple1_s3e_starterkit_top.v | 5 +++-- rtl/boards/terasic_de0/apple1_de0_top.v | 17 ++++++++++------- 5 files changed, 25 insertions(+), 16 deletions(-) diff --git a/boards/spartan3e_starterkit/webpack_ise/Apple-One.gise b/boards/spartan3e_starterkit/webpack_ise/Apple-One.gise index 7d59cbc..df8cf8a 100644 --- a/boards/spartan3e_starterkit/webpack_ise/Apple-One.gise +++ b/boards/spartan3e_starterkit/webpack_ise/Apple-One.gise @@ -103,7 +103,7 @@ - + @@ -121,11 +121,11 @@ - + - + @@ -134,9 +134,11 @@ - + + + @@ -147,7 +149,7 @@ - + @@ -161,7 +163,7 @@ - + @@ -185,7 +187,7 @@ - + diff --git a/boards/spartan3e_starterkit/webpack_ise/apple1_s3e_starterkit_top.ipf b/boards/spartan3e_starterkit/webpack_ise/apple1_s3e_starterkit_top.ipf index a10345c88b021b1c7fdbdeda56630d188dc17961..527cdd5ec84cc5e4a2e431c141b4e44a0bd4fe2c 100644 GIT binary patch delta 912 zcmaJ%{^#SsaQDS;Gqo+u846w zlNGb`IO$F&WHO?2og%&dZ4Oqd&Cq|^07qSY<(zERJ<~v8dYu)>kA{0yuw}JE;fj_l zH(jS!0ye0%=^>r+LEhd3Q#J&T&NdQyRzn>!!~OG;a(1*=!=dbi#q!%K2H%QmKXT9Wj9& z!MV6tf%GxR<&z+#8=lVCV3h``%HOx?r5hV`Uo1k5pz#C(@>BbmQ>J^bw~`j&yACpO zGvsUOSyKbg<83S_dHBYO5JEY zjgbeYau(Rg4fYME6eUWkNR0|HF@undl*BP4&#<3=H~034|GGz?;~obiPtSlcS8w41 z5n+G=gA3_JCW(_sDSm zA?@%uGR*W+BIWVR$3>Zex_o|LclWXPvSlF_b_jSLC$beUPgd<3=7qdo{nKCw;^0aT oU0n}EwKn*?>8xK&rN-jYEY9-cJVs-q<8&f8+}zPM>{6WSFDH*8i~s-t delta 271 zcmZ2IfqDO4rVTEPoO8pj%;08ZVBntY%lKK?$iUD-*T6{E&?v;v)XK!v%Ftl5FH@f; zZ-?J=enV9T1`yVsTv#qQnN7!Yb8OIYmCYG}Cro%5e@b)D0vZFt%991x$xoJDFTlrD z%;lV)TTql*T%4N1HQ9B2>g0lTev|*M=V3IM%(X#=&wwk_*oZ5@&CM?{H1P6F31gGYtCYJ!s1My3fa`RJCxqMvR9i1aV z0_BMX3Qn0NljDwyO}1y%*lf4)h$!cbPy4^AFfcHvOqSm$Jz4Fz_T+DC`6ibf-^jLd I9#EJ80CcZalK=n! diff --git a/boards/spartan3e_starterkit/webpack_ise/apple1_s3e_starterkit_top.ucf b/boards/spartan3e_starterkit/webpack_ise/apple1_s3e_starterkit_top.ucf index 19d18b9..88d5384 100644 --- a/boards/spartan3e_starterkit/webpack_ise/apple1_s3e_starterkit_top.ucf +++ b/boards/spartan3e_starterkit/webpack_ise/apple1_s3e_starterkit_top.ucf @@ -24,6 +24,9 @@ NET "UART_TXD" LOC = "M14" | IOSTANDARD = LVTTL | DRIVE = 8 | SLEW = SLOW ; # RESET BUTTON / SOUTH on the board NET "BUTTON" LOC = "K17" | IOSTANDARD = LVTTL | PULLDOWN; +# INPUT SELECTION SWITCH (PS/2 vs. UART) +NET "SWITCH" LOC = "L13" | IOSTANDARD = LVTTL | PULLUP; + #Created by Constraints Editor (xc3s500e-fg320-4) - 2018/02/11 NET "CLK_50MHZ" TNM_NET = CLK_50MHZ; NET "clk25" TNM_NET = clk25; diff --git a/rtl/boards/spartan3e_starterkit/apple1_s3e_starterkit_top.v b/rtl/boards/spartan3e_starterkit/apple1_s3e_starterkit_top.v index 4bb2551..03ddb16 100644 --- a/rtl/boards/spartan3e_starterkit/apple1_s3e_starterkit_top.v +++ b/rtl/boards/spartan3e_starterkit/apple1_s3e_starterkit_top.v @@ -39,7 +39,8 @@ module apple1_s3e_starterkit_top #( input PS2_KBCLK, input PS2_KBDAT, - input BUTTON, + input BUTTON, // Button for RESET + input SWITCH, // Switch between PS/2 input and UART output VGA_R, output VGA_G, @@ -78,7 +79,7 @@ module apple1_s3e_starterkit_top #( //.uart_cts(UART_CTS), // there is no CTS on the board :( .ps2_clk(PS2_KBCLK), .ps2_din(PS2_KBDAT), - .ps2_select(1'b1), + .ps2_select(SWITCH), .vga_h_sync(VGA_HS), .vga_v_sync(VGA_VS), .vga_red(VGA_R), diff --git a/rtl/boards/terasic_de0/apple1_de0_top.v b/rtl/boards/terasic_de0/apple1_de0_top.v index aa800dc..45fae75 100644 --- a/rtl/boards/terasic_de0/apple1_de0_top.v +++ b/rtl/boards/terasic_de0/apple1_de0_top.v @@ -64,7 +64,7 @@ module apple1_de0_top #( clk25 <= ~clk25; end - wire vga_bit; + wire r_bit, g_bits, b_bits; ////////////////////////////////////////////////////////////////////////// // Core of system @@ -85,16 +85,19 @@ module apple1_de0_top #( .ps2_select(1'b1), .vga_h_sync(VGA_HS), .vga_v_sync(VGA_VS), - .vga_red(vga_bit), - //.vga_grn(vga_bit), - //.vga_blu(vga_bit), + .vga_red(r_bit), + .vga_grn(g_bit), + .vga_blu(b_bit), .pc_monitor(pc_monitor) ); // set the monochrome base colour here.. - assign VGA_R[3:0] = vga_bit ? 4'b1000 : 4'b0000; - assign VGA_G[3:0] = vga_bit ? 4'b1111 : 4'b0000; - assign VGA_B[3:0] = vga_bit ? 4'b1000 : 4'b0000; + assign VGA_R[3] = r_bit; + assign VGA_G[3] = g_bit; + assign VGA_B[3] = b_bit; + assign VGA_R[2:0] = 3'b000; + assign VGA_G[2:0] = 3'b000; + assign VGA_B[2:0] = 3'b000; ////////////////////////////////////////////////////////////////////////// // Display 6502 address on 7-segment displays