1 //===============================================================================
2 // FPGA MOONCRESTA COLOR-PALETTE
6 // Copyright(c) 2004 Katsumi Degawa , All rights reserved
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.
14 // 2004- 9-18 added Xilinx Device. K.Degawa
15 //================================================================================
16 `include "src/mc_conf.v"
46 //--- Parts 6M --------------------------------------------------------
47 wire [6:0]W_6M_DI = {I_COL[2:0],I_VID[1:0],~(I_VID[0]|I_VID[1]),I_C_BLnX};
50 wire W_6M_CLR = W_6M_DI[0]|W_6M_DO[0];
51 assign O_C_BLX = ~(W_6M_DI[0]|W_6M_DO[0]);
52 assign O_STARS_OFFn = W_6M_DO[1];
54 always@(posedge I_CLK_6M or negedge W_6M_CLR)
61 //--- COL ROM --------------------------------------------------------
62 wire [4:0]W_COL_ROM_A = W_6M_DO[6:2];
63 wire [7:0]W_COL_ROM_DO;
64 wire W_COL_ROM_OEn = W_6M_DO[1];
76 `ifdef DEVICE_SPARTAN2E
86 //.ADDR({4'b0000,W_COL_ROM_A[4:0]}),
95 //--- VID OUT --------------------------------------------------------
96 assign O_R[0] = W_COL_ROM_DO[2];
97 assign O_R[1] = W_COL_ROM_DO[1];
98 assign O_R[2] = W_COL_ROM_DO[0];
100 assign O_G[0] = W_COL_ROM_DO[5];
101 assign O_G[1] = W_COL_ROM_DO[4];
102 assign O_G[2] = W_COL_ROM_DO[3];
104 assign O_B[0] = W_COL_ROM_DO[7];
105 assign O_B[1] = W_COL_ROM_DO[6];