• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Moto NES FPGA main repository


Commit MetaInfo

Revision9eb885455fcbd74b700adf2889025ace6b508fd2 (tree)
Time2013-07-19 13:15:32
Authorastoria-d <astoria-d@mail...>
Commiterastoria-d

Log Message

sprite x-axis adjustment.

Change Summary

Incremental Difference

--- a/simulation/ppu/render.vhd
+++ b/simulation/ppu/render.vhd
@@ -523,7 +523,7 @@ begin
523523 ---primary oam
524524 oam_ram_ce_n <= clk when oam_bus_ce_n = '0' and r_nw = '0' else
525525 '0' when oam_bus_ce_n = '0' and r_nw = '1' else
526- not io_cnt(0) when ppu_mask(PPUSSP) = '1' and
526+ '0' when ppu_mask(PPUSSP) = '1' and
527527 cur_x > conv_std_logic_vector(64, X_SIZE) and
528528 cur_x <= conv_std_logic_vector(256, X_SIZE) and
529529 p_oam_cnt_wrap_n = '1' else
@@ -838,6 +838,7 @@ end;
838838 s_oam_data <= oam_data;
839839
840840 if (oam_ev_status = EV_STAT_COMP) then
841+ --check y range.
841842 if (cur_y < "000000110" and oam_data <= cur_y + "000000001") or
842843 (cur_y >= "000000110" and oam_data <= cur_y + "000000001" and
843844 oam_data >= cur_y - "000000110") then
@@ -919,7 +920,7 @@ end;
919920 if (spr_attr(conv_integer(s_oam_addr_cpy(4 downto 2)))(SPRVFL) = '0') then
920921 vram_addr <= "0" & ppu_ctrl(PPUSPA) &
921922 spr_tile_tmp(dsize - 1 downto 0) & "0" &
922- (next_y(2 downto 0) - spr_y_tmp(2 downto 0) - "001");
923+ (next_y(2 downto 0) - spr_y_tmp(2 downto 0));
923924 else
924925 --flip sprite vertically.
925926 vram_addr <= "0" & ppu_ctrl(PPUSPA) &
@@ -940,7 +941,7 @@ end;
940941 vram_addr <= "0" & ppu_ctrl(PPUSPA) &
941942 spr_tile_tmp(dsize - 1 downto 0) & "0" &
942943 (next_y(2 downto 0) - spr_y_tmp(2 downto 0))
943- + "00000000000111";
944+ + "00000000001000";
944945 else
945946 --flip sprite vertically.
946947 vram_addr <= "0" & ppu_ctrl(PPUSPA) &
--- a/simulation/ppu/testbench_ppu.vhd
+++ b/simulation/ppu/testbench_ppu.vhd
@@ -180,7 +180,13 @@ begin
180180 for i in 0 to 32 * 5 loop
181181 cpu_addr <= "111";
182182 --cpu_d <= conv_std_logic_vector(i + 32, 8);
183+ if (i mod 2 = 0) then
183184 cpu_d <= conv_std_logic_vector(37, 8);
185+ else
186+ --cpu_d <= conv_std_logic_vector(16#0d#, 8);
187+ --cpu_d <= conv_std_logic_vector(36, 8);
188+ cpu_d <= conv_std_logic_vector(38, 8);
189+ end if;
184190 wait for cpu_clk_time;
185191 end loop;
186192
@@ -273,7 +279,7 @@ begin
273279 cpu_d <= conv_std_logic_vector(16#11#, 8);
274280 wait for cpu_clk_time;
275281 --x
276- cpu_d <= conv_std_logic_vector(50, 8);
282+ cpu_d <= conv_std_logic_vector(0, 8);
277283 wait for cpu_clk_time;
278284
279285 --item #4
@@ -356,28 +362,28 @@ begin
356362
357363 ce_n <= '1';
358364
359- wait for 3 ms;
360- wait until (cpu_clk'event and cpu_clk = '1');
361-
362- --disable show bg.
363- ce_n <= '0';
364- r_nw <= '0';
365- cpu_addr <= "001";
366- cpu_d <= "00000000";
367- wait for cpu_clk_time;
368- ce_n <= '1';
369-
370- wait for 3 ms;
371- wait until (cpu_clk'event and cpu_clk = '1');
372-
373- --enable show bg.
374- ce_n <= '0';
375- r_nw <= '0';
376- cpu_addr <= "001";
377- cpu_d <= "00011000";
378- wait for cpu_clk_time;
379- ce_n <= '1';
380-
365+-- wait for 3 ms;
366+-- wait until (cpu_clk'event and cpu_clk = '1');
367+--
368+-- --disable show bg.
369+-- ce_n <= '0';
370+-- r_nw <= '0';
371+-- cpu_addr <= "001";
372+-- cpu_d <= "00000000";
373+-- wait for cpu_clk_time;
374+-- ce_n <= '1';
375+--
376+-- wait for 3 ms;
377+-- wait until (cpu_clk'event and cpu_clk = '1');
378+--
379+-- --enable show bg.
380+-- ce_n <= '0';
381+-- r_nw <= '0';
382+-- cpu_addr <= "001";
383+-- cpu_d <= "00011000";
384+-- wait for cpu_clk_time;
385+-- ce_n <= '1';
386+--
381387 --wait for vblank
382388 wait until (vblank_n'event and vblank_n = '0');
383389 wait until (cpu_clk'event and cpu_clk = '1');