DMA instruction from RAM

Ask anything your want about Megadrive/Genesis programming.

Moderator: BigEvilCorporation

Post Reply
Ketsuban
Interested
Posts: 25
Joined: Wed Jan 17, 2007 11:37 am
Location: United Kingdom of Great Boredom

DMA instruction from RAM

Post by Ketsuban » Wed Mar 17, 2010 2:01 am

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?

Charles MacDonald
Very interested
Posts: 292
Joined: Sat Apr 21, 2007 1:14 am

Re: DMA instruction from RAM

Post by Charles MacDonald » Wed Mar 17, 2010 3:14 am

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.

Shiru
Very interested
Posts: 786
Joined: Sat Apr 07, 2007 3:11 am
Location: Russia, Moscow
Contact:

Post by Shiru » Wed Mar 17, 2010 9:30 am

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.

TmEE co.(TM)
Very interested
Posts: 2440
Joined: Tue Dec 05, 2006 1:37 pm
Location: Estonia, Rapla City
Contact:

Post by TmEE co.(TM) » Thu Mar 18, 2010 8:00 am

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...
Mida sa loed ? Nagunii aru ei saa ;)
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen

Post Reply