Skip to content

Commit

Permalink
Segasys1: fix "wobbling" sprites in wboy
Browse files Browse the repository at this point in the history
  • Loading branch information
gyurco committed Jul 22, 2021
1 parent ead26d0 commit 983ede0
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Arcade_MiST/Sega System 1 Hardware/rtl/SEGASYS1_SPRITE.v
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ always @ ( posedge VCLKx8 ) if (VCLKx4_EN) begin
// get yofs/xpos/bank
2: begin
yofs <= hitsprvps[hitr];
xpos <= sprdt[8:1]+14;
xpos <= ((sprdt[8:0]+1)>>1) + 8'd14;
bank <= { sprdt[13], sprdt[14], sprdt[15] };
spr_ofs <= 2;
phaseHD <= 3;
Expand Down Expand Up @@ -175,7 +175,7 @@ always @ ( posedge VCLKx8 ) if (VCLKx4_EN) begin
we <= 1'b0;
rdat <= sprchdt;
nowflip <= srcadrs[15];
srcadrs <= hflip ? (srcadrs-1) : (srcadrs+1);
srcadrs <= hflip ? (srcadrs-1'd1) : (srcadrs+1'd1);
if ((hflip && !srcadrs[0]) || (!hflip && srcadrs[0])) waitcnt <= 6; // assume 16 bit words are cached
phaseHD <= 7;
end else
Expand All @@ -202,7 +202,7 @@ always @ ( posedge VCLKx8 ) if (VCLKx4_EN) begin
sprcoll_ad <= sprcoll_adr;
end
end
xpos <= xpos+1;
xpos <= xpos+1'd1;
phaseHD <= 9;
end
9: begin
Expand All @@ -227,7 +227,7 @@ always @ ( posedge VCLKx8 ) if (VCLKx4_EN) begin
sprcoll_ad <= sprcoll_adr;
end
end
xpos <= xpos+1;
xpos <= xpos+1'd1;
//waitcnt <= 5;
phaseHD <= 6;
end
Expand All @@ -237,7 +237,7 @@ always @ ( posedge VCLKx8 ) if (VCLKx4_EN) begin
sprcoll <= 1'b0;
we <= 1'b0;
phaseHD <= ( hitr == (hits-1) ) ? 15 : 1;
hitr <= hitr+1;
hitr <= hitr+1'd1;
end

default: begin
Expand Down

0 comments on commit 983ede0

Please sign in to comment.