DMA Reload

Discussion of hardware and software development for Super NES and Super Famicom. See the SNESdev wiki for more information.

Moderator: Moderators

Forum rules
  • For making cartridges of your Super NES games, see Reproduction.
Post Reply
Oziphantom
Posts: 1565
Joined: Tue Feb 07, 2017 2:03 am

DMA Reload

Post by Oziphantom »

Is there a trick to getting DMA set up so you just "fire it" each time.

The OAM pointer latches and restores it self on VBlank. But the DMA's don't? You have to set up the length and Start address each time you want to fire one?
User avatar
koitsu
Posts: 4201
Joined: Sun Sep 19, 2004 9:28 pm
Location: A world gone mad

Re: DMA Reload

Post by koitsu »

For general-purpose DMA, that's correct -- you should set $43x2-43x7 every time, followed by $420b (to induce the transfer). And this is assuming you've set $43x0-43x1 sometime prior (in other words, AFAIK, you should only have to set $43x1-43x1 once).
calima
Posts: 1745
Joined: Tue Oct 06, 2015 10:16 am

Re: DMA Reload

Post by calima »

Unrelated, but I think they are only lost upon actual DMAing. There was that interview were a commercial SNES title used the ten bytes to get fastrom execution for a loop, on an otherwise slowrom cart.
Myself086
Posts: 158
Joined: Sat Nov 10, 2018 2:49 pm

Re: DMA Reload

Post by Myself086 »

The DMA's data only changes when used for either DMA or HDMA.

According to the notes I have on my private SNES emulator, the start address changes based on the last transferred address+1 and counter is reset to 0. There are some DMA where I could get away with only writing 8-bit to the byte counter instead of 16-bit. So you only need to change $43x2-43x3 and $43x5-43x6.

For HDMA, I only change $43x2-43x3. I use 5 triple buffered HDMA in my current project.
93143
Posts: 1717
Joined: Fri Jul 04, 2014 9:31 pm

Re: DMA Reload

Post by 93143 »

Myself086 wrote: Sun Mar 15, 2020 6:47 pmAccording to the notes I have on my private SNES emulator, the start address changes based on the last transferred address+1 and counter is reset to 0.
In other words, exactly as if the input registers are the registers actually used by the DMA controller to keep track of what it's doing, and not a façade or buffer like the CGRAM and OAM addresses.
Post Reply