DMA during Hblank? 
Author Message

Joined: 2014-10-29 21:13
Posts: 20
 DMA during Hblank?
On the SNES, if you disable sprites, if you turn force blank on and off during Hblank, will the BG layers still display? And if that works, can you DMA to VRAM while it's in Hblank?


2018-06-05 19:03
User avatar

Joined: 2014-09-27 09:23
Posts: 2193
Location: Germany
 Re: DMA during Hblank?
Aaendi wrote:
On the SNES, if you disable sprites, if you turn force blank on and off during Hblank, will the BG layers still display? And if that works, can you DMA to VRAM while it's in Vblank? {"HBlank"?}

To quote anomie: "The PPU seems to access memory 2-3 tiles ahead of the pixel output. At least, when we disable Force Blank mid-scanline, there is garbage for about 16-24 pixels."
So it depends on exactly how close to the end of HBlank you disable FBlank. Too close and you get corrupted graphics.

(H)DMA is purely a function of the 5A22 (main CPU). For the PPU it doesn't matter if accesses come from the DMA state machine, or 'manually' from program code.

_________________
My setup:
Super Famicom ("2/1/3" SNS-CPU-GPM-02) → Multi Out to SCART cable → EuroSCART to Mini cable → Framemeister (with Firebrandx' profiles) → AVerMedia Live Gamer Extreme capture unit → RECentral 4 viewing/recording software


2018-06-05 21:59

Joined: 2014-10-29 21:13
Posts: 20
 Re: DMA during Hblank?
creaothceann wrote:
Aaendi wrote:
On the SNES, if you disable sprites, if you turn force blank on and off during Hblank, will the BG layers still display? And if that works, can you DMA to VRAM while it's in Vblank? {"HBlank"?}

To quote anomie: "The PPU seems to access memory 2-3 tiles ahead of the pixel output. At least, when we disable Force Blank mid-scanline, there is garbage for about 16-24 pixels."
So it depends on exactly how close to the end of HBlank you disable FBlank. Too close and you get corrupted graphics.

(H)DMA is purely a function of the 5A22 (main CPU). For the PPU it doesn't matter if accesses come from the DMA state machine, or 'manually' from program code.


So it sounds like it would work, if you leave some extra room on the sides of the screen. I think this would be useful if you're doing a Super FX game with a slightly higher framerate.

I wonder what happens to sprites when you try doing that?


2018-06-06 02:45
User avatar

Joined: 2014-09-27 09:23
Posts: 2193
Location: Germany
 Re: DMA during Hblank?
Aaendi wrote:
I wonder what happens to sprites when you try doing that?

They would have the right position, size etc. but the tiles might be blank or corrupted.

_________________
My setup:
Super Famicom ("2/1/3" SNS-CPU-GPM-02) → Multi Out to SCART cable → EuroSCART to Mini cable → Framemeister (with Firebrandx' profiles) → AVerMedia Live Gamer Extreme capture unit → RECentral 4 viewing/recording software


2018-06-06 07:37