#178216 - Bregalad - Wed Aug 27, 2014 10:41 pm
Hello,
I have a problem. I want to try to know if HBlank DMA is active by reading the DMA status register (in this case, DMA3CNT or 0x40000DE) and see bit 15, and I initiate a memory transfer only if this is not the case. However this doesn't seem to work.
Actually it seems that just the read instruction screws things up, even if I only read and write nothing. This is really strange. The documentation says we can read the status register, but it does not mention what the read returns, nor if there is any side-effect.
VBA emulates it correctly (i.e. the weird behaviour is the same as real hardware) so at least this behaviour is known.
I tried both 16-bit and 32-bit reads, without success (16-bit reads sounds a better idea to avoid reading the illegal 0x40000DC).
I have a problem. I want to try to know if HBlank DMA is active by reading the DMA status register (in this case, DMA3CNT or 0x40000DE) and see bit 15, and I initiate a memory transfer only if this is not the case. However this doesn't seem to work.
Actually it seems that just the read instruction screws things up, even if I only read and write nothing. This is really strange. The documentation says we can read the status register, but it does not mention what the read returns, nor if there is any side-effect.
VBA emulates it correctly (i.e. the weird behaviour is the same as real hardware) so at least this behaviour is known.
I tried both 16-bit and 32-bit reads, without success (16-bit reads sounds a better idea to avoid reading the illegal 0x40000DC).