From: Michael Gernoth Date: Tue, 29 Apr 2008 13:20:18 +0000 (+0200) Subject: fix vga colours X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/fpga-games/commitdiff_plain/0840cca68ecfa59ea10e60db9c02dbbd081215e7 fix vga colours --- diff --git a/galaxian/galaxian.ucf b/galaxian/galaxian.ucf index 6fb6807..3a8e011 100644 --- a/galaxian/galaxian.ucf +++ b/galaxian/galaxian.ucf @@ -51,21 +51,14 @@ NET "O_SOUND_OUT_L" LOC = "AA22" | IOSTANDARD = LVTTL | SLEW = SLOW | DRIVE = 8; NET "O_SOUND_OUT_R" LOC = "V19" | IOSTANDARD = LVTTL | SLEW = SLOW | DRIVE = 8; #------------------------------------------- #--------- VIDEO I/F ----------------------- -NET "O_VGA_R<0>" LOC = "V18" | IOSTANDARD = LVTTL | DRIVE = 8 | SLEW = FAST ; -NET "O_VGA_R<1>" LOC = "F24" | IOSTANDARD = LVTTL | DRIVE = 8 | SLEW = FAST ; -NET "O_VGA_R<2>" LOC = "F25" | IOSTANDARD = LVTTL | DRIVE = 8 | SLEW = FAST ; -NET "O_VGA_R<3>" LOC = "K20" | IOSTANDARD = LVTTL | DRIVE = 8 | SLEW = FAST ; -NET "O_VGA_R<4>" LOC = "L20" | IOSTANDARD = LVTTL | DRIVE = 8 | SLEW = FAST ; -NET "O_VGA_G<0>" LOC = "T17" | IOSTANDARD = LVTTL | DRIVE = 8 | SLEW = FAST ; -NET "O_VGA_G<1>" LOC = "J22" | IOSTANDARD = LVTTL | DRIVE = 8 | SLEW = FAST ; -NET "O_VGA_G<2>" LOC = "J23" | IOSTANDARD = LVTTL | DRIVE = 8 | SLEW = FAST ; -NET "O_VGA_G<3>" LOC = "M18" | IOSTANDARD = LVTTL | DRIVE = 8 | SLEW = FAST ; -NET "O_VGA_G<4>" LOC = "M19" | IOSTANDARD = LVTTL | DRIVE = 8 | SLEW = FAST ; -NET "O_VGA_B<0>" LOC = "Y25" | IOSTANDARD = LVTTL | DRIVE = 8 | SLEW = FAST ; -NET "O_VGA_B<1>" LOC = "G24" | IOSTANDARD = LVTTL | DRIVE = 8 | SLEW = FAST ; -NET "O_VGA_B<2>" LOC = "G23" | IOSTANDARD = LVTTL | DRIVE = 8 | SLEW = FAST ; -NET "O_VGA_B<3>" LOC = "K21" | IOSTANDARD = LVTTL | DRIVE = 8 | SLEW = FAST ; -NET "O_VGA_B<4>" LOC = "L22" | IOSTANDARD = LVTTL | DRIVE = 8 | SLEW = FAST ; +NET "O_VGA_R<2>" LOC = "K20" | IOSTANDARD = LVTTL | DRIVE = 8 | SLEW = FAST ; +NET "O_VGA_R<1>" LOC = "F25" | IOSTANDARD = LVTTL | DRIVE = 8 | SLEW = FAST ; +NET "O_VGA_R<0>" LOC = "F24" | IOSTANDARD = LVTTL | DRIVE = 8 | SLEW = FAST ; +NET "O_VGA_G<2>" LOC = "M18" | IOSTANDARD = LVTTL | DRIVE = 8 | SLEW = FAST ; +NET "O_VGA_G<1>" LOC = "J23" | IOSTANDARD = LVTTL | DRIVE = 8 | SLEW = FAST ; +NET "O_VGA_G<0>" LOC = "J22" | IOSTANDARD = LVTTL | DRIVE = 8 | SLEW = FAST ; +NET "O_VGA_B<1>" LOC = "G23" | IOSTANDARD = LVTTL | DRIVE = 8 | SLEW = FAST ; +NET "O_VGA_B<0>" LOC = "G24" | IOSTANDARD = LVTTL | DRIVE = 8 | SLEW = FAST ; NET "O_VGA_H_SYNCn" LOC = "K26" | IOSTANDARD = LVTTL | DRIVE = 8 | SLEW = FAST ; NET "O_VGA_V_SYNCn" LOC = "K25" | IOSTANDARD = LVTTL | DRIVE = 8 | SLEW = FAST ; diff --git a/galaxian/src/mc_top.v b/galaxian/src/mc_top.v index a8d2ca8..c382b64 100644 --- a/galaxian/src/mc_top.v +++ b/galaxian/src/mc_top.v @@ -95,9 +95,9 @@ output O_SOUND_OUT_L; output O_SOUND_OUT_R; // VGA (VIDEO) IF -output [4:0]O_VGA_R; -output [4:0]O_VGA_G; -output [4:0]O_VGA_B; +output [2:0]O_VGA_R; +output [2:0]O_VGA_G; +output [1:0]O_VGA_B; output O_VGA_H_SYNCn; output O_VGA_V_SYNCn; @@ -643,11 +643,11 @@ mc_vga_if VGA( `else -assign O_VGA_R[4:0] = W_R; +assign O_VGA_R[2:0] = W_R; -assign O_VGA_G[4:0] = W_G; +assign O_VGA_G[2:0] = W_G; -assign O_VGA_B[4:0] = W_B; +assign O_VGA_B[1: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 ; diff --git a/galaxian/src/mc_vga_if.v b/galaxian/src/mc_vga_if.v index 707e8a1..4883686 100644 --- a/galaxian/src/mc_vga_if.v +++ b/galaxian/src/mc_vga_if.v @@ -45,9 +45,9 @@ input I_H_SYNC; // HSYNC input (16KHz) input I_V_SYNC; // VSYNC input (60Hz) // output signals -output [4:0]O_R; // R out -output [4:0]O_G; // G out -output [4:0]O_B; // B out +output [2:0]O_R; // R out +output [2:0]O_G; // G out +output [1:0]O_B; // B out output O_H_SYNCn; // HSYNC output output O_V_SYNCn; // VSYNC output @@ -174,9 +174,9 @@ end // output //--------------------------------------------------------------------------- -assign O_R = {2'b00,rgb_out[7:5]}; -assign O_G = {2'b00,rgb_out[4:2]}; -assign O_B = {3'b000,rgb_out[1:0]}; +assign O_R = rgb_out[7:5]; +assign O_G = rgb_out[4:2]; +assign O_B = rgb_out[1:0]; // converted H V SYNC assign O_H_SYNCn = ~O_Hsync;