core vdp, some cleanup

This commit is contained in:
kub 2024-06-28 00:20:31 +02:00
parent 6fd16ed6f5
commit c1812e1a85
2 changed files with 8 additions and 4 deletions

View file

@ -2125,7 +2125,6 @@ void PicoDrawSync(int to, int off, int on)
{
int width2 = (est->Pico->video.reg[12]&1) ? 160 : 128;
// technically, VDP starts active display output at slot 12
if (unlikely(on|off) && (off >= width2 ||
// hack for timing inaccuracy, if on/off near borders
(off && off <= 24) || (on < width2 && on >= width2-24)))
@ -2178,7 +2177,7 @@ void PicoDrawBgcDMA(u16 *base, u32 source, u32 mask, int dlen, int sl)
BgcDMAoffs = 0;
// handle slot offset in 1st line
if (sl-12 > 0) // active display output only starts at slot 12
if (sl-12 > 0)
BgcDMAoffs = 2*(sl-12);
else if (sl < 0) { // DMA starts before active display
BgcDMAsrc += 2*-sl;