Path: utzoo!mnetor!uunet!husc6!uwvax!puff!avery From: avery@puff.cs.wisc.edu (Aaron Avery) Newsgroups: comp.sys.amiga.tech Subject: Re: Multiple ViewPorts Message-ID: <1627@puff.cs.wisc.edu> Date: 29 Apr 88 12:03:35 GMT References: <8804251835.AA01654@jade.berkeley.edu> Reply-To: avery@puff.WISC.EDU (Aaron Avery) Organization: U of Wisconsin CS Dept Lines: 24 In article <8804251835.AA01654@jade.berkeley.edu> BBOURBIN@UMDD.BITNET (Brett S Bourbin) writes: >I am trying to write a program which uses multiple viewports so that I can >have a double buffered upper screen, which is 352 X 130 lines (overscanned) >and a bottom section which is 288 by 108 lines (narrow screen). I am setting >the DxOffset and DyOffsets to -16 and -16 for the top and 16 and 110 for the >bottom section. The routine I wrote is not working. Matter of fact, it will >not even execute my second ViewPort initialization code. Could any please >send me a code fragment which sets up two viewports to use different color >palettes and different size screens? If you examine those DyOffsets carefully, you'll find that 130 (from the height of the upper screen) plus -16 (it's DyOffset) is more than 110 (from the DyOffset for the bottom screen). That is -- 130 + (-16) = 114, and 114 > 110. I think you're trying to open overlapping ViewPorts, which the system will not let you do. One additional note: you must allow at least one scan line between the two ViewPorts, so that the copper can stuff the new bitplane pointers, color registers, and screen dimention info into the appropriate registers. I hope that's your only problem, as you SHOULD be able to do what you're trying to do quite easily, especially since you seem to be able to open the top screen already! -- Aaron Avery (avery@puff.cs.wisc.edu) ({seismo,caip,allegra,harvard,rutgers,ihnp4}!uwvax!puff!avery)