Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!ucbvax!mtxinu!taniwha!paul From: paul@taniwha.UUCP (Paul Campbell) Newsgroups: comp.sys.mac.programmer Subject: Re: GWorld calls Message-ID: <861@taniwha.UUCP> Date: 4 Jun 91 17:22:11 GMT References: <1991Jun3.135057.4734@noose.ecn.purdue.edu> Reply-To: paul@taniwha.UUCP (Paul Campbell) Distribution: usa Organization: Taniwha Systems Design, Oakland Lines: 45 In article <1991Jun3.135057.4734@noose.ecn.purdue.edu> biehl@dynamo.ecn.purdue.edu (Larry L Biehl) writes: >I have been trying to use the GWorld calls in 32-bit quickdraw for offscreen >bitmap/pixmaps to access memory on a RastorOps accelerator card. The >address for this memory is greater than a 24 bit address. The information >that I have is that I need to use 'SwapMMUMode' to transfer between 24 bit >and 32 bit address mode to access memory in one of the slots. Attempting >to do this crashes my machine. I have tried it on a IIx and a IIfx. The machine >locks up when SwapMMUMode is called; it appears that the system >stack overflows. Number one thing to do is to make sure that your PC prior to making the SwapMMUMode trap doesn't have any bits set in it's high byte, if it does then execute something like: lea L1, a0 _StripAddress jmp (a0) L1: move.l #1, d0 _SwapMMUMode move.l d0, -(sp) .... mung with pixmap .... move.l (sp)+, d0 _SwapMMUMode Don't try and use the debugger to single step through SwapMMUMode you will crash even if you are doing everything correctly (taking traps, even trace traps, while in the middle of MMU manipulation is a non-no in most OSs/processors). Also make sure that ALL the code you will execute in 32-bit mode is 32-bit clean, don't indirect through handles unless you use StripAddress on them, don't use toolbox calls that might do the same, if you do the above code in a subroutine make sure that it's return address also has the upper byte clear etc etc Paul -- Paul Campbell UUCP: ..!mtxinu!taniwha!paul AppleLink: CAMPBELL.P My son is now 2 months old, in that time he has doubled his weight, if he does this every 2 months for the next year he will weigh over 300lbs.