Skip to content

Commit

Permalink
flstory: fix sprite vertical positions (#889)
Browse files Browse the repository at this point in the history
  • Loading branch information
gyurco committed Dec 10, 2024
1 parent 492a32a commit eb11312
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions cores/flstory/hdl/jtflstory_obj.v
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ module jtflstory_obj(
input gvflip,
input ghflip,

input [8:0] vrender,
input [8:0] vdump,
input [8:0] hdump,
// RAM shared with CPU
output [ 7:0] ram_addr,
Expand Down Expand Up @@ -91,7 +91,7 @@ end
always @(posedge clk) begin
lhbl_l <= lhbl;
draw <= 0;
blank <= vrender >= 9'h1f2 || vrender <= 9'h10e || !vrender[8];
blank <= vdump >= 9'h1f2 || vdump <= 9'h10e || !vdump[8];
cen <= ~cen;
if(!scan_done && cen) begin
if( order ) begin
Expand Down Expand Up @@ -148,7 +148,7 @@ always @(posedge clk) begin
end
if(scan_done) {info,vsbl,order}<=0;
if( (!lhbl && lhbl_l) || blank ) begin
vlatch <= (vrender[7:0]-8'h10)^{8{gvflip}};
vlatch <= (vdump[7:0] + (gvflip ? -8'h10 : 8'h10))^{8{gvflip}};
cnt <= 0;
obj_sub <= 0;
scan_done <= 0;
Expand Down
6 changes: 3 additions & 3 deletions cores/flstory/hdl/jtflstory_video.v
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ module jtflstory_video(
);

wire [31:0] scr_sorted;
wire [ 8:0] vdump, vrender, hdump, scry;
wire [ 8:0] vdump, hdump, scry;
wire [ 7:0] scr_pxl, obj_pxl;
wire [11:0] scr_code;
wire [ 5:0] scr_pal;
Expand Down Expand Up @@ -96,7 +96,7 @@ jtframe_vtimer #(
.clk ( clk ),
.pxl_cen ( pxl_cen ),
.vdump ( vdump ),
.vrender ( vrender ),
.vrender ( ),
.vrender1 ( ),
.H ( hdump ),
.Hinit ( ),
Expand Down Expand Up @@ -162,7 +162,7 @@ jtflstory_obj u_obj(
.gvflip ( gvflip ),
.ghflip ( ghflip ),

.vrender ( vrender ),
.vdump ( vdump ),
.hdump ( hdump ),
// RAM shared with CPU
.ram_addr ( oram_addr ),
Expand Down

0 comments on commit eb11312

Please sign in to comment.