Path: utzoo!utgpu!water!watmath!clyde!att!rutgers!gatech!bloom-beacon!think!ames!oliveb!amiga!jimm From: jimm@amiga.UUCP (Jim Mackraz) Newsgroups: comp.sys.amiga Subject: Re: Intuition Bug. Message-ID: <2784@amiga.UUCP> Date: 23 Aug 88 19:14:30 GMT References: <8808200650.AA14865@jade.berkeley.edu> <65150@sun.uucp> Reply-To: jimm@cloyd.UUCP (Jim Mackraz) Organization: Commodore-Amiga Inc, Los Gatos CA Lines: 78 In article <65150@sun.uucp> cmcmanis@sun.UUCP (Chuck McManis) writes: )In article <8808200650.AA14865@jade.berkeley.edu> (Jonathan Crone) writes: )>Hi all, could someone Email me the exact situation that )>causes that problem that Intuition has with interlaced and )>non interlaced screens??? )>I'm trying to isolate a bug in something and I'm not sure what )>it is or whether its a problem in Intuition.... ) )It isn't Intuition :-). Actually, the only bug that I know of has to do )with ReMakeDisplay() when operating on interlace screens that aren't the )front most screen. To see this in action open two interlace and one non )interlace screen and then use the screen to {front|back} gadgets in the )corners to rearrange them. Eventually you will see a screen that has )obviously got a broken copper list. Do you call ReMakeDisplay() in your )code? ) )--Chuck McManis Well, it is Intuition, Remake/RethinkDisplay(). What happens in RethinkDisplay() is that only those copper lists that need changing are to be rebuilt. When dragging a screen, this is at most two screens: the one getting taller and the one getting shorter (the two on either side of the "seam" being dragged"). Now what happens is this: RemakeDisplay() creates a single new copper list for an interlaced viewport if that viewport is hidden and the whole display is non-interlaced. When you pop that screen to the front, RethinkDisplay() is called. The Viewport height hasn't changed, but everyone's copper lists are remade when the screen switches into interlaced mode. The problem happens when in the intervening time, some other interlaced screen appears, the display goes into interlaced mode, and our interlaced viewport's non-interlaced copper list still hasn't been rebuilt. Now when it pops to the front, it passes the height change check, it passes the interlace-change check, so it isn't remade. The bug is that VP_HIDE changing hasn't caused a further incentive to rebuild the copper list for our interlaced screens viewport. Then some magic happens when you use copper lists created for the wrong purpose. Note that a key point is that the mode of the View a viewport is hanging off of at the time of MakeVPort() determines how the copper lists will be built, in particular, two (for interlace) or one. So although the bug is in RethinkDisplay(), the problem arises when you call RemakeDisplay(). So don't do that if you can help it. A hack: try jamming a zero into the DHeight field of each screens viewport which is showing VP_HIDE in its modes, after you RemakeDisplay(). That way, when visible, RethinkDisplay() will rebuild its coppuppies. This hack is by no means guaranteed to work in V1.4, but I'll try. For that matter, it isn't guaranteed to work in V1.2/V1.3. It's just a thought. Better yet is not to call RemakeDisplay() if you don't have to, and you usually don't. RemakeDisplay() is only used to construct new copper lists for every viewport. You rarely need to do that. The standard sequence when you want to screw over your screen's viewport is: MakeScreen( screen ); /* construct new coppups for my vp */ RethinkDisplay(); /* mrgcop and loadview */ Do this, over the hack, if at all possible. jimm -- Jim Mackraz, I and I Computing amiga!jimm BIX:jmackraz Opinions are my own. Comments regarding the Amiga operating system, and all others, are not to be taken as Commodore official policy.