Skip to content

Commit

Permalink
- Fixed blank screen problems by reverting prior start on V-Blank
Browse files Browse the repository at this point in the history
change.
  • Loading branch information
github-user-name committed Jul 3, 2020
1 parent bf23b26 commit 3e4995c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions verilog/sd2snes_sgb/sgb_cpu.v
Original file line number Diff line number Diff line change
Expand Up @@ -2020,7 +2020,7 @@ always @(posedge CLK) begin
ppu_hblank_start_r <= 0;
ppu_vblank_start_r <= 0;

if (REG_LCDC_r[`LCDC_DS_EN]) ppu_state_r <= ST_PPU_VBL;
if (REG_LCDC_r[`LCDC_DS_EN]) ppu_state_r <= ST_PPU_FRM_NEW;
end
ST_PPU_FRM_NEW : begin
// next frame
Expand Down Expand Up @@ -2226,10 +2226,10 @@ always @(posedge CLK) begin
if (REG_STAT_r[`STAT_INT_V_EN]) ppu_lcd_stat_pulse_r <= 1;
REG_STAT_r[`STAT_MODE] <= `MODE_V;

ppu_vblank_start_r <= 0;

ppu_first_frame_r <= 0;
ppu_vblank_start_r <= 0;
end

ppu_first_frame_r <= 0;

if (ppu_dot_end) begin
if (ppu_disp_end) ppu_state_r <= ST_PPU_FRM_NEW;
Expand Down

0 comments on commit 3e4995c

Please sign in to comment.