Page 1 of 1

DMA instruction from RAM

Posted: Wed Mar 17, 2010 2:01 am
by Ketsuban
The Sonic games (and as I understand it many other games too) follow the advice given in sega2.doc to put the final command word into RAM when initiating a DMA transfer.

However, I recall reading somewhere a discussion about a particular game which uses DMA transfers just fine, but doesn't use RAM at all. I wanted to find this discussion to make a note of it for my own code, but I couldn't find it at all.

Does anyone know what I'm talking about?

Re: DMA instruction from RAM

Posted: Wed Mar 17, 2010 3:14 am
by Charles MacDonald
Ketsuban wrote:However, I recall reading somewhere a discussion about a particular game which uses DMA transfers just fine, but doesn't use RAM at all. I wanted to find this discussion to make a note of it for my own code, but I couldn't find it at all.

Does anyone know what I'm talking about?
I'd like to know too. I've tried to reproduce the DMA lockup you'd otherwise get on a number of Genesis and Genesis-derived systems, but could never do it.

I wonder if the bug is specific to developer hardware (say when using DRAM carts or whatnot) or to very early versions of the chip. Perhaps it is a problem that can happen in theory, so Sega provided a workaround, but in reality the conditions that enable it rarely occur.

Posted: Wed Mar 17, 2010 9:30 am
by Shiru
In all the C I've seen source DMA is performed with usual code, without any RAM tricks. I did the same in the Uwol, it works on the real hardware (at least two units).

I recall I've read somewhere that the hang with DMA related to memory aligment (of calling code?).

Edit: found where I've read that, it was translator's note in russian version of sega2.doc, which was translated by HardWareMan.

Posted: Thu Mar 18, 2010 8:00 am
by TmEE co.(TM)
I once got the bug happen, and it happened always, with no exceptions... and my only workaround was to have Z80 run and access ROM. I have never otherwise hit that crashing bug...