Skip to content

Commit

Permalink
Fix up background layer
Browse files Browse the repository at this point in the history
  • Loading branch information
FavoritoHJS committed Aug 28, 2024
1 parent bf6300b commit 6911a52
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 10 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

![Still of a city-like scene](img.png)

(Video outdated)
![Said city-like scene scrolling by](out.webp)


Binary file removed out.mp4
Binary file not shown.
Binary file added out.webp
Binary file not shown.
21 changes: 14 additions & 7 deletions src/project.v
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,10 @@ module tt_um_favoritohjs_scroller (
count1 <= 3'd7;
count1b <= 3'd7;
lfsr2 <= 10'h10f;
lfsr2b <= 10'h3ff;
lfsr2b <= 10'h10f;
count2 <= 2'd3;
count2b <= 2'd3;
count2low <= 1'b1;
//cutoff2 <= 5'd0;
dither <= 1'b0;
rd <= 3'b000;
Expand Down Expand Up @@ -167,13 +168,19 @@ module tt_um_favoritohjs_scroller (
if (vcount == 482) begin
count1b <= count1b + 1;
if (count1b == 0) begin
lfsr1b[0] <= lfsr1b[8] ^ lfsr1b[4];
lfsr1b[8:1] <= lfsr1b[7:0];
lfsr1b[0] <= lfsr1b[9] ^ lfsr1b[6];
lfsr1b[1] <= lfsr1b[8] ^ lfsr1b[5];
lfsr1b[2] <= lfsr1b[7] ^ lfsr1b[4];
lfsr1b[3] <= lfsr1b[6] ^ lfsr1b[3];
lfsr1b[9:4] <= lfsr1b[5:0];
end
{count2b, count2low}<= {count2b, count2low} + 1;
if (count2b == 0 & count2low == 0) begin
lfsr2b[0] <= lfsr2b[8] ^ lfsr2b[4];
lfsr2b[8:1] <= lfsr2b[7:0];
{count2b, count2low}<= {count2b, count2low} + 3'd1;
if (count2b == 0 & count2low == 1) begin
lfsr2b[0] <= lfsr2b[9] ^ lfsr2b[6];
lfsr2b[1] <= lfsr2b[8] ^ lfsr2b[5];
lfsr2b[2] <= lfsr2b[7] ^ lfsr2b[4];
lfsr2b[3] <= lfsr2b[6] ^ lfsr2b[3];
lfsr2b[9:4] <= lfsr2b[5:0];
end
end
lfsr1 <= lfsr1b;
Expand Down
1 change: 1 addition & 0 deletions test/command.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
img2webp -o out.webp -d 17 display0.png display1.png display2.png display3.png display4.png display5.png display6.png display7.png display8.png display9.png display10.png display11.png display12.png display13.png display14.png display15.png display16.png display17.png display18.png display19.png display20.png display21.png display22.png display23.png display24.png display25.png display26.png display27.png display28.png display29.png display30.png display31.png display32.png display33.png display34.png display35.png display36.png display37.png display38.png display39.png display40.png display41.png display42.png display43.png display44.png display45.png display46.png display47.png display48.png display49.png display50.png display51.png display52.png display53.png display54.png display55.png display56.png display57.png display58.png display59.png display60.png display61.png display62.png display63.png
2 changes: 1 addition & 1 deletion test/tb.v
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
module tb ();

// Dump the signals to a VCD file. You can view it with gtkwave.

initial begin
$dumpfile("tb.vcd");
$dumpvars(0, tb);
Expand Down
3 changes: 2 additions & 1 deletion test/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ async def test_project(dut):
dut.rst_n.value = 1

dut._log.info("Test project behavior")
for framenum in range(1):
for framenum in range(1:
dut._log.info(f"Rendering frame {framenum}.")
frame = []
for i in range(525):
row = []
Expand Down

0 comments on commit 6911a52

Please sign in to comment.