|
Post by spiff on Aug 2, 2008 17:16:50 GMT -5
Does anyone have experience with the DMA engine on the DTV, specifically register $D31D, which appears from the register description to allow either Source, Destination, or both to "continue" from the last DMA call. I was hoping to use this for transferring more than 64k with the DMA.
I have DMA of a single block working (by "block", I mean a single call to the DMA engine). But attempting to use the continue-function for both source and destination, it appears nothing shows up at the destination.
What registers do I need to configure again before starting the DMA for a second time. Right now, after having done the first DMA, I set only the DMA length and the continue-bits (I also tried writing $FE to this register, because I though that the documentation could be wrong regarding that the DestinationContinue is bit 3 and not bit 2). Then I write $0D to $D31F, and it loops for some time before bit 0 is cleared, so it appears to be doing DMA.
Of course, at this point I have only tested in VICEplus, and probably with an old version (it says 1.22 rev 472 in the about-box), so one possible explanation is that it is not implemented on VICEplus.
Any suggestions are most welcome.
|
|
|
Post by 1570 on Aug 3, 2008 5:32:34 GMT -5
I think DMA continue has been implemented in x64dtv from the start. The DTV programming guide in the wiki is correct. Only setting up length and continue bits should be okay. Just start (a somewhat recent) x64dtv with the -dtvdmalog parameter and have a look at debug output.
|
|
|
Post by gmoon on Aug 3, 2008 15:11:48 GMT -5
|
|
|
Post by spiff on Aug 3, 2008 16:39:54 GMT -5
Thanks to the both of you. I figured out why it was not working correctly, which was of course a bug in my code. What happened was i typed in the wrong address of the length register, so the continue did not know how much data was being processed. Anyways, it seems to work now, and after a little more twiddling, fixing a few off-by-one errors, it appears I have finally managed to get Last Ninja 2 working as intended, decrunching levels from high memory. I used DMA to move the loaded data up to high mem, to avoid the holes at $110F0-$1112F and $1D800-$1DBFF. I will do a small test on my DTV, and hopefully everything checks out, so I can upload it to the repository. By the way, thanks to the VicePlus team as well. Without them I would probably not have been able to get this working. ;D
|
|
|
Post by spiff on Aug 3, 2008 19:13:30 GMT -5
It works! ;D
This deserves a new thread.
|
|