It is currently Wed Dec 13, 2017 9:49 am

All times are UTC - 7 hours



Forum rules


Related:



Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: DMA vs mvn/mvp
PostPosted: Sun Jan 10, 2016 10:48 am 
Offline
User avatar

Joined: Sun Jul 01, 2012 6:44 am
Posts: 337
Location: Lion's den :3
So from what I've read, DMA takes 8 cycles per byte. The mvn/mvp instructions, on the other hand, each take only 7 cycles per byte, assuming the WDC document on the 65816 is correct.

Is this true? Should I refrain from using DMA (at least for memory regions available on the A-bus) altogether, especially when doing large (non-fixed-source) transfers e.g. from ROM to WRAM?

_________________
Some of my projects:
Furry RPG!
Unofficial SNES PowerPak firmware
(See my GitHub profile for more)


Top
 Profile  
 
 Post subject: Re: DMA vs mvn/mvp
PostPosted: Sun Jan 10, 2016 11:52 am 
Offline

Joined: Thu Feb 07, 2013 1:15 am
Posts: 96
Location: Sweden
That would be 8 master cycles per byte for DMA (ie. 1 cpu cycle at 2.68MHz), while mvn/mvp takes 7 cpu cycles per byte.


Top
 Profile  
 
 Post subject: Re: DMA vs mvn/mvp
PostPosted: Sun Jan 10, 2016 12:24 pm 
Offline
User avatar

Joined: Sun Jul 01, 2012 6:44 am
Posts: 337
Location: Lion's den :3
Optiroc wrote:
That would be 8 master cycles per byte for DMA (ie. 1 cpu cycle at 2.68MHz), while mvn/mvp takes 7 cpu cycles per byte.

Thanks for NOT READING my post at all. :roll:

_________________
Some of my projects:
Furry RPG!
Unofficial SNES PowerPak firmware
(See my GitHub profile for more)


Top
 Profile  
 
 Post subject: Re: DMA vs mvn/mvp
PostPosted: Sun Jan 10, 2016 12:34 pm 
Offline
Site Admin
User avatar

Joined: Mon Sep 20, 2004 6:04 am
Posts: 3487
Location: Indianapolis
You misunderstood, he's saying 1 CPU cycle is 8 master cycles, which means the mvn/mvp would be 7 CPU cycles x 8 master cycles.. 56 cycles compared to 8 for the DMA.


Top
 Profile  
 
 Post subject: Re: DMA vs mvn/mvp
PostPosted: Sun Jan 10, 2016 12:50 pm 
Offline
User avatar

Joined: Sun Jul 01, 2012 6:44 am
Posts: 337
Location: Lion's den :3
Memblers wrote:
You misunderstood, he's saying 1 CPU cycle is 8 master cycles, which means the mvn/mvp would be 7 CPU cycles x 8 master cycles.. 56 cycles compared to 8 for the DMA.

Aha. Well, okay. Sorry, Optiroc. :lol:

Then again, where can I read more about CPU/master cycles? Up until now, to the best of my knowledge. they were the same ... :| :?:

_________________
Some of my projects:
Furry RPG!
Unofficial SNES PowerPak firmware
(See my GitHub profile for more)


Top
 Profile  
 
 Post subject: Re: DMA vs mvn/mvp
PostPosted: Sun Jan 10, 2016 12:55 pm 
Offline

Joined: Thu Feb 07, 2013 1:15 am
Posts: 96
Location: Sweden
Ramsis wrote:
Optiroc wrote:
That would be 8 master cycles per byte for DMA (ie. 1 cpu cycle at 2.68MHz), while mvn/mvp takes 7 cpu cycles per byte.

Thanks for NOT READING my post at all. :roll:

Sorry for clearing things up! :twisted:

Detailed info on timing: http://wiki.superfamicom.org/snes/show/Timing


Top
 Profile  
 
 Post subject: Re: DMA vs mvn/mvp
PostPosted: Sun Jan 10, 2016 1:03 pm 
Offline
Site Admin
User avatar

Joined: Mon Sep 20, 2004 6:04 am
Posts: 3487
Location: Indianapolis
Here are a couple of the docs that I'm aware of:
http://wiki.superfamicom.org/snes/show/Timing
http://folk.uio.no/sigurdkn/snes/timing.txt

When it talks about a "memory access cycle" or similar, that's the same as a CPU cycle. The 6502/65816 pretty much does a memory access, whether a read or a write, on every instruction cycle. Even if it's a dummy access and the results aren't used.


Top
 Profile  
 
 Post subject: Re: DMA vs mvn/mvp
PostPosted: Sun Jan 10, 2016 2:24 pm 
Offline

Joined: Mon Mar 27, 2006 5:23 pm
Posts: 1339
Yeah, unfortunately mvn/mvp are maddeningly slow.

It's really only useful for performing WRAM->WRAM transfers for things like LZSS decompression.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC - 7 hours


Who is online

Users browsing this forum: Bing [Bot] and 10 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group