Hacker News new | ask | show | jobs
by RetroSpark 2343 days ago
I used a debugger - it looks like the function in the DMA registers is actually just 32 bits:

  $4317 mvn src,dest
  $431a rts
Each of `src` and `dest` is either $7e or $7f, so this code performs a RAM-to-RAM memcpy.
1 comments

Okay, a) that's very clever, but b) mvn is really quite slow. DMA would be faster (presuming the data is on two separate buses, you can't perform RAM -> RAM DMAs.) Barring that, a manually unrolled loop in a slow memory area would definitely beat out an mvn in a fast memory area.

I guess it's easy to judge this 25 years later with all we know now. That was a very cool idea to have implemented back then! Putting the mvn there would definitely be a boost compared to having the mvn be in a slow ROM area (6 master clock cycles per byte transferred.)