This is an improved version of SYS_CopyMemoryExt that copies memory across arbitrary memory banks. The previous version used to copy from the current bank to another bank. This one copies from the bank specified by bits 4 and 5 of [vAC+1] to the bank specified by bits 6 and 7 of [vAC+1], regardless of the currently selected bank. Note that, because of the way the RAM and IO expansion works, the high addresses (0x8000-0xffff) are mapped the selected bank, and the low addresses (0x0000-0x7fff) remain always mapped to bank 0.
In order to make this work, I had to find an unused byte. I did this by reducing the burst size to 5 bytes instead of 6 bytes, reducing the peak copy bandwidth by 17%. This should not matter in practice.
This is an improved version of SYS_CopyMemoryExt that copies memory across arbitrary memory banks. The previous version used to copy from the current bank to another bank. This one copies from the bank specified by bits 4 and 5 of [vAC+1] to the bank specified by bits 6 and 7 of [vAC+1], regardless of the currently selected bank. Note that, because of the way the RAM and IO expansion works, the high addresses (0x8000-0xffff) are mapped the selected bank, and the low addresses (0x0000-0x7fff) remain always mapped to bank 0.
In order to make this work, I had to find an unused byte. I did this by reducing the burst size to 5 bytes instead of 6 bytes, reducing the peak copy bandwidth by 17%. This should not matter in practice.