Which is the priority?
Moderator: Moderators
Which is the priority?
If we have sprite dma, irq and nmi. Which is the priority. I suppouse if nmi is enabled comes before irq, but i don't know about sprite dma.
ANes
Re: Which is the priority?
Where did you read that OAM DMA has an interrupt? OAM DMA affects the RDY input of the integrated 6502 core, the effect of which is hard for me to describe in simple words, but in short it suspends the whole core
Re: Which is the priority?
I didn't say that i read that it was an interrupt. I know it's not an interrupt but if it stall the cpu it mas have a priority
ANes
Re: Which is the priority?
When the CPU is halted for DMA, the DMA units will finish before the CPU can run again and service any interrupts.
I'm not familiar with the exact behavior regarding interrupt detection, so someone who knows more should correct me if I'm wrong, but I assume the CPU will still latch NMI edges that occur while halted, but won't be checking the IRQ input.
I'm not familiar with the exact behavior regarding interrupt detection, so someone who knows more should correct me if I'm wrong, but I assume the CPU will still latch NMI edges that occur while halted, but won't be checking the IRQ input.
Re: Which is the priority?
Talking about sprite dma, the wiki says:
This:The CPU is suspended during the transfer, which will take 513 or 514 cycles after the $4014 write tick. (1 wait state cycle while waiting for writes to complete, +1 if on an odd CPU cycle, then 256 alternating read/write cycles.)
What does it mean?+1 if on an odd CPU cycle
ANes
Re: Which is the priority?
The CPU alternates between get cycles, on which the DMA units can read, and put cycles, on which the DMA units can write. OAM DMA takes one halt cycle, then an optional alignment cycle, and then 256 get/put pairs. That alignment cycle only occurs if the current cycle is a put, because it cannot do reads on a put cycle.
All of this is covered in extreme detail here: https://www.nesdev.org/wiki/DMA
All of this is covered in extreme detail here: https://www.nesdev.org/wiki/DMA