Skip to content

Commit

Permalink
Rorliga sprites pavag
Browse files Browse the repository at this point in the history
  • Loading branch information
richardwiden committed Apr 25, 2012
1 parent f0024a8 commit a5e8ad1
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 25 deletions.
2 changes: 1 addition & 1 deletion SpriteGpu.vhd
Expand Up @@ -186,7 +186,7 @@ begin
end if;
detected :=false;

if put_box = '1' then
if put_box = '0' then
if x_pos(0) = 0 then
x_pos(0) <= 800;
if next_box ='1' then
Expand Down
47 changes: 23 additions & 24 deletions frameCounter.vhd
Expand Up @@ -44,30 +44,29 @@ process(clk)
begin
if rising_edge(clk) then
if(rst='1') then
score<="000111011100110101100101000000000"; --1 000 000 000
frame<='0';
counter_speed<="000000000000000000000000000000000";
counter_frame<="000000000000000000000000000000000";
speed<="000000010011000100101101000000000";
end if;
if(rst='0') then
counter_speed<=counter_speed + 1;
counter_frame<=counter_frame + 1;
if (counter_speed=score) then
counter_speed<="000000000000000000000000000000000";
speed<=speed - "000000000001111010000100100000000";
if(speed="000000000000000000000000000000000")then
speed<="000000010011000100101101000000000";
end if;
end if;

if(counter_frame=speed) then--40 000 000
counter_frame<="000000000000000000000000000000000";
frame<='1';
else
frame<='0';
end if;
end if;
score <= "000111011100110101100101000000000"; --1 000 000 000
frame <= '0';
counter_speed <= "000000000000000000000000000000000";
counter_frame <= "000000000000000000000000000000000";
speed <= "000000010011000100101101000000000";
else
counter_speed<=counter_speed + 1;
counter_frame<=counter_frame + 1;
if counter_speed = score then
counter_speed <= "000000000000000000000000000000000";
speed <= speed - "000000000001111010000100100000000";
if speed = "000000000000000000000000000000000" then
speed <= "000000010011000100101101000000000";
end if;
end if;

if(counter_frame=speed) then--40 000 000
counter_frame<="000000000000000000000000000000000";
frame<='1';
else
frame<='0';
end if;
end if;
end if;
end process;
end Behavioral;

0 comments on commit a5e8ad1

Please sign in to comment.