본문내용
s="01100") then
data<="110";
else
data<="111";
end if;
--11
elsif(y_count>=99 and y_count<109 and x_count>=10 and x_count<20) then
if(p1_pos="01011") then
data<="101";
elsif(p2_pos="01011") then
data<="110";
else
data<="111";
end if;
--up mal
--3
elsif(y_count>=69 and y_count<79 and x_count>=130 and x_count<140) then
if(p1_pos="00011") then
data<="101";
elsif(p2_pos="00011") then
data<="110";
else
data<="111";
end if;
elsif(y_count>=69 and y_count<79 and x_count>=110 and x_count<120) then
if(p1_pos="00100") then
data<="101";
elsif(p2_pos="00100") then
data<="110";
else
data<="111";
end if;
elsif(y_count>=69 and y_count<79 and x_count>=90 and x_count<100) then
if(p1_pos="00101") then
data<="101";
elsif(p2_pos="00101") then
data<="110";
else
data<="111";
end if;
elsif(y_count>=69 and y_count<79 and x_count>=70 and x_count<80) then
if(p1_pos="00110") then
data<="101";
elsif(p2_pos="00110") then
data<="110";
else
data<="111";
end if;
elsif(y_count>=69 and y_count<79 and x_count>=50 and x_count<60) then
if(p1_pos="00111") then
data<="101";
elsif(p2_pos="00111") then
data<="110";
else
data<="111";
end if;
elsif(y_count>=69 and y_count<79 and x_count>=30 and x_count<40) then
if(p1_pos="01000") then
data<="101";
elsif(p2_pos="01000") then
data<="110";
else
data<="111";
end if;
elsif(y_count>=69 and y_count<79 and x_count>=10 and x_count<20) then
if(p1_pos="01001") then
data<="101";
elsif(p2_pos="01001") then
data<="110";
else
data<="111";
end if;
--side mal pan
elsif(y_count>=84 and y_count<94 and x_count>=10 and x_count<20) then
if(p1_pos="00010") then
data<="101";
elsif(p2_pos="00010") then
data<="110";
else
data<="111";
end if;
elsif(y_count>=84 and y_count<94 and x_count>=130 and x_count<140) then
if(p1_pos="01010") then
data<="101";
elsif(p2_pos="01010") then
data<="110";
else
data<="111";
end if;
--hwa sal pyuo
elsif(y_count>=84 and y_count<94 and x_count>=150 and x_count<153) then
data<="000";
elsif(y_count>=85 and y_count<87 and x_count>=148 and x_count<150) then
data<="000";
elsif(y_count>=87 and y_count<89 and x_count>=146 and x_count<148) then
data<="000";
elsif(y_count>=85 and y_count<87 and x_count>=153 and x_count<155) then
data<="000";
elsif(y_count>=87 and y_count<89 and x_count>=155 and x_count<157) then
data<="000";
--chogi mal
elsif(y_count>=109 and y_count<114 and x_count>=150 and x_count<155) then
if(p1_pos="00000" or p1_pos>="10001") then
data<="101";
else
data<="011";
end if;
elsif(y_count>=109 and y_count<114 and x_count>=155 and x_count<160) then
if(p2_pos="00000" or p2_pos>="10001") then
data<="110";
else
data<="011";
end if;
else
data<="011";
end if;
wr<='1';
else
wr<='0';
end if;
end process;
process(H_count,V_count)-- Video RAM addres decoder
begin
if(H_count>=700) then
y_count<=conv_std_logic_vector(conv_integer(V_count)-1/4,7);
else
y_count<=conv_std_logic_vector(conv_integer(V_count)/4,7);
end if;
x_count<=conv_std_logic_vector(conv_integer(H_count)-640,8);
end process;
addr<=y_count & x_count;
end beh;
data<="110";
else
data<="111";
end if;
--11
elsif(y_count>=99 and y_count<109 and x_count>=10 and x_count<20) then
if(p1_pos="01011") then
data<="101";
elsif(p2_pos="01011") then
data<="110";
else
data<="111";
end if;
--up mal
--3
elsif(y_count>=69 and y_count<79 and x_count>=130 and x_count<140) then
if(p1_pos="00011") then
data<="101";
elsif(p2_pos="00011") then
data<="110";
else
data<="111";
end if;
elsif(y_count>=69 and y_count<79 and x_count>=110 and x_count<120) then
if(p1_pos="00100") then
data<="101";
elsif(p2_pos="00100") then
data<="110";
else
data<="111";
end if;
elsif(y_count>=69 and y_count<79 and x_count>=90 and x_count<100) then
if(p1_pos="00101") then
data<="101";
elsif(p2_pos="00101") then
data<="110";
else
data<="111";
end if;
elsif(y_count>=69 and y_count<79 and x_count>=70 and x_count<80) then
if(p1_pos="00110") then
data<="101";
elsif(p2_pos="00110") then
data<="110";
else
data<="111";
end if;
elsif(y_count>=69 and y_count<79 and x_count>=50 and x_count<60) then
if(p1_pos="00111") then
data<="101";
elsif(p2_pos="00111") then
data<="110";
else
data<="111";
end if;
elsif(y_count>=69 and y_count<79 and x_count>=30 and x_count<40) then
if(p1_pos="01000") then
data<="101";
elsif(p2_pos="01000") then
data<="110";
else
data<="111";
end if;
elsif(y_count>=69 and y_count<79 and x_count>=10 and x_count<20) then
if(p1_pos="01001") then
data<="101";
elsif(p2_pos="01001") then
data<="110";
else
data<="111";
end if;
--side mal pan
elsif(y_count>=84 and y_count<94 and x_count>=10 and x_count<20) then
if(p1_pos="00010") then
data<="101";
elsif(p2_pos="00010") then
data<="110";
else
data<="111";
end if;
elsif(y_count>=84 and y_count<94 and x_count>=130 and x_count<140) then
if(p1_pos="01010") then
data<="101";
elsif(p2_pos="01010") then
data<="110";
else
data<="111";
end if;
--hwa sal pyuo
elsif(y_count>=84 and y_count<94 and x_count>=150 and x_count<153) then
data<="000";
elsif(y_count>=85 and y_count<87 and x_count>=148 and x_count<150) then
data<="000";
elsif(y_count>=87 and y_count<89 and x_count>=146 and x_count<148) then
data<="000";
elsif(y_count>=85 and y_count<87 and x_count>=153 and x_count<155) then
data<="000";
elsif(y_count>=87 and y_count<89 and x_count>=155 and x_count<157) then
data<="000";
--chogi mal
elsif(y_count>=109 and y_count<114 and x_count>=150 and x_count<155) then
if(p1_pos="00000" or p1_pos>="10001") then
data<="101";
else
data<="011";
end if;
elsif(y_count>=109 and y_count<114 and x_count>=155 and x_count<160) then
if(p2_pos="00000" or p2_pos>="10001") then
data<="110";
else
data<="011";
end if;
else
data<="011";
end if;
wr<='1';
else
wr<='0';
end if;
end process;
process(H_count,V_count)-- Video RAM addres decoder
begin
if(H_count>=700) then
y_count<=conv_std_logic_vector(conv_integer(V_count)-1/4,7);
else
y_count<=conv_std_logic_vector(conv_integer(V_count)/4,7);
end if;
x_count<=conv_std_logic_vector(conv_integer(H_count)-640,8);
end process;
addr<=y_count & x_count;
end beh;
소개글