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?
DMA Reload
Moderator: Moderators
Forum rules
- For making cartridges of your Super NES games, see Reproduction.
Re: DMA Reload
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).
Re: DMA Reload
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.
Re: DMA Reload
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.
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.
Re: DMA Reload
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.