galaxians
[fpga-games] / galaxian / src / mc_vedio_mix.v
1 //===============================================================================
2 // FPGA MOONCRESTA VIDO-MIX
3 //
4 // Version : 1.00
5 //
6 // Copyright(c) 2004 Katsumi Degawa , All rights reserved
7 //
8 // Important !
9 //
10 // This program is freeware for non-commercial use.
11 // An author does no guarantee about this program.
12 // You can use this under your own risk.
13 //
14 //================================================================================
15
16
17 module mc_vedio_mix(
18
19 I_VID_R,
20 I_VID_G,
21 I_VID_B,
22 I_STR_R,
23 I_STR_G,
24 I_STR_B,
25
26 I_C_BLnXX,
27 I_C_BLX,
28 I_MISSILEn,
29 I_SHELLn,
30
31 O_R,
32 O_G,
33 O_B
34
35 );
36
37 input [2:0]I_VID_R;
38 input [2:0]I_VID_G;
39 input [1:0]I_VID_B;
40 input [2:0]I_STR_R;
41 input [2:0]I_STR_G;
42 input [1:0]I_STR_B;
43
44 input I_C_BLnXX;
45 input I_C_BLX;
46 input I_MISSILEn;
47 input I_SHELLn;
48
49 output [2:0]O_R;
50 output [2:0]O_G;
51 output [1:0]O_B;
52
53 // MISSILE => Yellow ;
54 // SHELL => White ;
55 wire W_MS_D = ~(I_MISSILEn & I_SHELLn);
56 wire W_MS_R = ~I_C_BLX & W_MS_D;
57 wire W_MS_G = ~I_C_BLX & W_MS_D;
58 wire W_MS_B = ~I_C_BLX & W_MS_D & ~I_SHELLn ;
59
60 assign O_R = I_C_BLnXX ? I_VID_R | I_STR_R | {1'b0,W_MS_R,W_MS_R}: 3'b000 ;
61 assign O_G = I_C_BLnXX ? I_VID_G | I_STR_G | {1'b0,W_MS_G,W_MS_G}: 3'b000 ;
62 assign O_B = I_C_BLnXX ? I_VID_B | I_STR_B | { W_MS_B,W_MS_B}: 2'b00 ;
63
64 endmodule
Impressum, Datenschutz