Skip to content

Commit

Permalink
cps1: fix color DMA (wr_page advances too soon) (#657)
Browse files Browse the repository at this point in the history
  • Loading branch information
gyurco committed Aug 6, 2024
1 parent fd0ff69 commit e3a1680
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cores/cps1/hdl/jtcps1_dma.v
Original file line number Diff line number Diff line change
Expand Up @@ -483,11 +483,13 @@ always @(posedge clk) begin
end
if( |cur_task[PAL5:PAL0] ) begin
pal_cnt <= pal_cnt + 9'd1;
if( &pal_cnt ) begin
if( &pal_wr_cnt ) begin
tasks[PAL5:PAL0] <= tasks[PAL5:PAL0] & ~cur_task[PAL5:PAL0];
adv <= 1;
// Update palette page
pal_wr_page <= pal_wr_page+3'd1;
end
if( &pal_cnt ) begin
pal_rd_page<=pal_rd_page+3'd1;
end
end
Expand Down

0 comments on commit e3a1680

Please sign in to comment.