|
Post by bjonte on Aug 17, 2020 15:19:05 GMT
While working on a game I noticed a very important issue with the SuperCPU that needed a workaround.
I had the VIC configured in bank 1 and I configured the SuperCPU to mirror bank 1 to C128 RAM. Then I used a relocated stack to write a sprite to RAM bank 1 under the MMU registers at $ff00. This works when not having a SuperCPU attached but the SuperCPU is tricked by the stack relocation and doesn’t mirror the copied sprite data to the C128 RAM so it acts as if nothing was copied.
One workaround is of course to not do stack relocation writes to bank 1. Another one is to mirror both banks when doing the copy (didn’t try this).
|
|
|
Post by oziphantom on Sept 19, 2020 4:43:59 GMT
if you Super CPU is mapping its Bank 1 to C128 RAM, and you write to it, then as far as the 128 is concerned you are writing to 100XX not 000XX right. You probably need to configure the SuperCPU to point to Bank 0, make sure shared memory is off in the MMU and then write to ZP with relocation so the MMU gets 0:00XX and hence remaps it.
|
|
|
Post by oziphantom on Sept 19, 2020 4:45:10 GMT
also 65816 will force DP to be in 'it' bank 0. So if you do a DP write on the 65816 it won't be to Bank 1 of its RAM and hence it won't be to the C128's RAM, right?
|
|
|
Post by bjonte on Sept 19, 2020 17:38:06 GMT
More investigations is needed. My guess is that the memory ends up in the SuperCPU’s bank 1 copy but is never mirrored to the C128 RAM. However, I don’t own a SuperCPU-128 so I can’t test my theory.
|
|