Then all ShieldCursor to hide the cursor if it was over that rectangle. Otherwise a moving cursor can destroy all your drawing efforts and you may end up drawing on parts of the cursor. Note that calling SwapMMuMode does no harm in any case, since it is ignored in machines that are in the 32 bit addressing mode and screens that are accessible in 24 bit addressing mode without SwapMMuMode remain accessible in 32 bit addressing mode. Now use the GetPixBaseAddr call to get the base address and then get the rowBytes and pixel depth that you are working with. Always check for the pixel depth and don't keep the rowBytes or baseAddr values for any longer than you absolutely need to, since they can change from under you at any moment.
Screens now have a tendency to change size and bit depth when the user wants it.
Be ready for it or you will crash. Draw into your pixel map using the informaton you have. Remember to be careful to clip all your drawing so that only memory specified to exist within that pixel map is touched. While drawing, remember that you may need to call StripAddress on all your pointers and handles, because if you were running in 24 bit mode, the top bits of each handle and pointer may be used for flags and so the full 32 bit address is not correct without StripAddress. After you are done drawing, call SwapMMuMode to swap back from 32 bit mode, if you went to 32 bit mode.