Skip to content

[PCM] smarter DMA protection #20

@superctr

Description

@superctr

Read vcounter after each buffer run, and during the idle loop.
If there is less than n samples before vblank, set z_min_buffer to the lowest possible value to ensure we don't enter a new buffer run before or at the vblank.

Based on my calculations, we should stop buffering at 28~35 before vblank. The vblank will last for 32~42 samples (NTSC) or 75~100 (PAL V28) or 61~82 (PAL V30).

The vcounter should not be read during vblank as it requires a 68k bus request (and hence, it will cause the Z80 to be halted by the VDP if DMA is in progress)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions