//output O_ROM_WEn;\r
\r
// INPORT SW IF\r
-input [4:0]I_PSW;\r
+input [8:0]I_PSW;\r
\r
// SOUND OUT \r
output O_SOUND_OUT_L;\r
output O_SOUND_OUT_R;\r
\r
// VGA (VIDEO) IF\r
-output [4:0]O_VGA_R;\r
-output [4:0]O_VGA_G;\r
-output [4:0]O_VGA_B;\r
+output [2:0]O_VGA_R;\r
+output [2:0]O_VGA_G;\r
+output [1:0]O_VGA_B;\r
output O_VGA_H_SYNCn;\r
output O_VGA_V_SYNCn;\r
\r
-wire W_RESETn = |I_PSW[3:0];\r
+wire W_RESETn = |(~I_PSW[8:5]);\r
//------ CLOCK GEN ---------------------------\r
wire I_CLK_18432M;\r
wire W_CLK_12M,WB_CLK_12M;\r
\r
dcm clockgen(\r
.CLKIN_IN(I_CLK_125M),\r
-.RST_IN(W_RESETn),\r
+.RST_IN(! W_RESETn),\r
.CLKFX_OUT(I_CLK_18432M)\r
);\r
\r
\r
wire C1 = (L1|R1|U1|~D1) & ps_PSW[4];\r
`else\r
-wire L1 = I_PSW[2];\r
-wire R1 = I_PSW[3];\r
-wire U1 = I_PSW[0];\r
-wire D1 = I_PSW[1];\r
-wire J1 = I_PSW[4];\r
+wire L1 = ! I_PSW[2];\r
+wire R1 = ! I_PSW[3];\r
+wire U1 = ! I_PSW[0];\r
+wire D1 = ! I_PSW[1];\r
+wire J1 = ! I_PSW[4];\r
\r
-wire S1 = U1|J1;\r
-wire S2 = D1|J1;\r
+wire S1 = ! I_PSW[5];\r
+wire S2 = ! I_PSW[7];\r
\r
-wire C1 = L1|R1|U1|~D1;\r
+wire C1 = ! I_PSW[6];\r
`endif\r
-wire C2 = L1|R1|~U1|D1;\r
+wire C2 = ! I_PSW[8];\r
\r
wire L2 = L1;\r
wire R2 = R1;\r
`else\r
\r
assign O_VGA_R[2:0] = W_R;\r
-assign O_VGA_R[4:3] = 1'b0;\r
\r
assign O_VGA_G[2:0] = W_G;\r
-assign O_VGA_G[4:3] = 1'b0;\r
\r
assign O_VGA_B[1:0] = W_B;\r
-assign O_VGA_B[4:2] = 1'b0;\r
\r
//assign O_VGA_H_SYNCn = W_H_SYNC | W_V_SYNC ; // AKIDUKI LCD USED\r
assign O_VGA_H_SYNCn = ~W_H_SYNC ;\r