Skip to content

Commit

Permalink
force render before reading CTRL register to update flags
Browse files Browse the repository at this point in the history
  • Loading branch information
mooinglemur committed Jul 17, 2023
1 parent 03bfd38 commit 6c0a5d2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/audio.c
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ audio_step(int cpu_clocks)
vera_samp_pos_hd = (vera_samp_pos_hd + max_cpu_clks * VERA_SAMP_CLKS_PER_CPU_CLK) & SAMP_POS_MASK_FRAC;
ym_samp_pos_hd = (ym_samp_pos_hd + max_cpu_clks * YM_SAMP_CLKS_PER_CPU_CLK) & SAMP_POS_MASK_FRAC;
cpu_clocks -= max_cpu_clks;
audio_render();
if (cpu_clocks > 0) audio_render();
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/video.c
Original file line number Diff line number Diff line change
Expand Up @@ -1845,7 +1845,7 @@ uint8_t video_read(uint8_t reg, bool debugOn) {
case 0x19:
case 0x1A: return reg_layer[1][reg - 0x14];

case 0x1B: return pcm_read_ctrl();
case 0x1B: audio_render(); return pcm_read_ctrl();
case 0x1C: return pcm_read_rate();
case 0x1D: return 0;

Expand Down

0 comments on commit 6c0a5d2

Please sign in to comment.