From 3fc34adfa51bd78e346143103b498bf962ea1b46 Mon Sep 17 00:00:00 2001 From: Michael Gernoth Date: Tue, 29 Apr 2008 14:12:27 +0200 Subject: [PATCH] buttons --- galaxian/galaxian.ucf | 14 +++++++++----- galaxian/src/mc_top.v | 31 ++++++++++++++----------------- 2 files changed, 23 insertions(+), 22 deletions(-) diff --git a/galaxian/galaxian.ucf b/galaxian/galaxian.ucf index bacf1e1..6fb6807 100644 --- a/galaxian/galaxian.ucf +++ b/galaxian/galaxian.ucf @@ -4,11 +4,15 @@ NET "I_CLK_125M" LOC = "F13" | IOSTANDARD = LVCMOS33; #------------------------------------------- #---------- SW I/F ------------------------- -NET "I_PSW<0>" LOC = "K19" | IOSTANDARD = LVTTL | PULLUP; -NET "I_PSW<1>" LOC = "F22" | IOSTANDARD = LVTTL | PULLUP; -NET "I_PSW<2>" LOC = "G22" | IOSTANDARD = LVTTL | PULLUP; -NET "I_PSW<3>" LOC = "K18" | IOSTANDARD = LVTTL | PULLUP; -NET "I_PSW<4>" LOC = "F23" | IOSTANDARD = LVTTL | PULLUP; +NET "I_PSW<0>" LOC = "K19" | IOSTANDARD = LVTTL | PULLUP; #up +NET "I_PSW<1>" LOC = "K18" | IOSTANDARD = LVTTL | PULLUP; #down +NET "I_PSW<2>" LOC = "G22" | IOSTANDARD = LVTTL | PULLUP; #left +NET "I_PSW<3>" LOC = "F22" | IOSTANDARD = LVTTL | PULLUP; #right +NET "I_PSW<4>" LOC = "F23" | IOSTANDARD = LVTTL | PULLUP; #btn +NET "I_PSW<5>" LOC = "J10" | IOSTANDARD = LVTTL | PULLDOWN; #s8 - s1 +NET "I_PSW<6>" LOC = "J13" | IOSTANDARD = LVTTL | PULLDOWN; #s7 - c1 +NET "I_PSW<7>" LOC = "J15" | IOSTANDARD = LVTTL | PULLDOWN; #s6 - s2 +NET "I_PSW<8>" LOC = "J17" | IOSTANDARD = LVTTL | PULLDOWN; #s5 - c2 #------------------------------------------- #--------- EEPROM I/F ---------------------- #NET "I_ROM_DB<0>" LOC = "P70"; diff --git a/galaxian/src/mc_top.v b/galaxian/src/mc_top.v index 3e9526d..a8d2ca8 100644 --- a/galaxian/src/mc_top.v +++ b/galaxian/src/mc_top.v @@ -88,7 +88,7 @@ output psTXD,psCLK,psSEL; //output O_ROM_WEn; // INPORT SW IF -input [4:0]I_PSW; +input [8:0]I_PSW; // SOUND OUT output O_SOUND_OUT_L; @@ -101,7 +101,7 @@ output [4:0]O_VGA_B; output O_VGA_H_SYNCn; output O_VGA_V_SYNCn; -wire W_RESETn = |I_PSW[3:0]; +wire W_RESETn = |(~I_PSW[8:5]); //------ CLOCK GEN --------------------------- wire I_CLK_18432M; wire W_CLK_12M,WB_CLK_12M; @@ -367,18 +367,18 @@ wire S2 = (D1|J1) & ps_PSW[7]; wire C1 = (L1|R1|U1|~D1) & ps_PSW[4]; `else -wire L1 = I_PSW[2]; -wire R1 = I_PSW[3]; -wire U1 = I_PSW[0]; -wire D1 = I_PSW[1]; -wire J1 = I_PSW[4]; +wire L1 = ! I_PSW[2]; +wire R1 = ! I_PSW[3]; +wire U1 = ! I_PSW[0]; +wire D1 = ! I_PSW[1]; +wire J1 = ! I_PSW[4]; -wire S1 = U1|J1; -wire S2 = D1|J1; +wire S1 = ! I_PSW[5]; +wire S2 = ! I_PSW[7]; -wire C1 = L1|R1|U1|~D1; +wire C1 = ! I_PSW[6]; `endif -wire C2 = L1|R1|~U1|D1; +wire C2 = ! I_PSW[8]; wire L2 = L1; wire R2 = R1; @@ -643,14 +643,11 @@ mc_vga_if VGA( `else -assign O_VGA_R[2:0] = W_R; -assign O_VGA_R[4:3] = 1'b0; +assign O_VGA_R[4:0] = W_R; -assign O_VGA_G[2:0] = W_G; -assign O_VGA_G[4:3] = 1'b0; +assign O_VGA_G[4:0] = W_G; -assign O_VGA_B[1:0] = W_B; -assign O_VGA_B[4:2] = 1'b0; +assign O_VGA_B[4:0] = W_B; //assign O_VGA_H_SYNCn = W_H_SYNC | W_V_SYNC ; // AKIDUKI LCD USED assign O_VGA_H_SYNCn = ~W_H_SYNC ; -- 2.39.5