home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / sys / amiga / programm / 15974 < prev    next >
Encoding:
Internet Message Format  |  1992-11-17  |  3.0 KB

  1. Path: sparky!uunet!cbmvax!peter
  2. From: peter@cbmvax.commodore.com (Peter Cherna)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Re: New hardware reference guide?
  5. Message-ID: <37106@cbmvax.commodore.com>
  6. Date: 17 Nov 92 16:58:58 GMT
  7. References: <36847@cbmvax.commodore.com> <BxM1ED.J61@visix.com> <37025@cbmvax.commodore.com> <1992Nov16.194518.14603@lmpsbbs.comm.mot.com>
  8. Reply-To: peter@cbmvax.commodore.com (Peter Cherna)
  9. Organization: Commodore-Amiga, Inc.  West Chester, PA.
  10. Lines: 52
  11. Keywords: n
  12.  
  13. In article <1992Nov16.194518.14603@lmpsbbs.comm.mot.com> rittle@supra.comm.mot.com (Loren James Rittle) writes:
  14. >Can anyone explain in what way certain games (see ``The Problem''
  15. >below) are breaking under AGA?
  16. >
  17. >From Chris' comment, I have a sneaking suspicion that it has to do with
  18. >games assuming that they know what the BytesPerRow will be for a given
  19. >screen size.
  20. >
  21. >What changed ECS -> AGA and OS 2.0 -> OS 3.0 to cause this problem?
  22.  
  23. The higher fetch modes require higher alignment restrictions on bitplanes.
  24. Under ECS, BytesPerRow must be a multiple of 16 bits (2 bytes).  Under AGA,
  25. this number must be a multiple of a higher number (eg. 32 or 64 bits).
  26. There was no way to patch InitBitMap() or AllocRaster(), since they're used
  27. by different programs in all kinds of different ways that effectively
  28. preclude this.  The new AllocBitMap() call hides all ugly details.
  29.  
  30. Intuition uses AllocBitMap(), even for old callers.  If you open an
  31. Intuition screen which is (say) 330 pixels wide, if you do your own
  32. rendering and assume BytesPerRow to be 336 (next highest multiple
  33. of 16), you're going to get this diagonal streaking.  If you actually
  34. read BytesPerRow, you'd find 352 or 384 or somesuch (MAY CHANGE
  35. AGAIN IN THE FUTURE -- that's why you now want to use AllocBitMap()).
  36.  
  37. When the system can, it drops the bandwidth to accomodate insufficiently
  38. aligned bitplanes.  When it can't, skewed output is the result.
  39.  
  40. Also, 3.0 supports "interleaved bitmaps", which blit a bit faster and
  41. look a lot better.  In this case, BytesPerRow * 8 doesn't even come
  42. close to being the bitmap width.  That's another assumption that can't
  43. continue to be valid.  BytesPerRow is defined as: the number of bytes I
  44. have to add to the current address in order to get to the same pixel
  45. of the next line.  For interleaved bitmaps, this number will be larger
  46. than you'd expect otherwise.
  47.  
  48. We do a fair amount of compatibility work (basically, an AGA system
  49. looks very much like an ECS system when first booted, until SetPatch
  50. calls a special graphics.library entry point that says "go wild".)
  51. This allows boot-disks of old games to continue to work.  AGA games
  52. would call this "go wild" function themselves.  Also, BootMenu allows
  53. you to override this, which allows ECS-only games to run off say the
  54. hard disk.
  55.  
  56. >Loren J. Rittle (rittle@comm.mot.com)
  57.  
  58.      Peter
  59. --
  60. Peter Cherna, User Interface Development Group, Commodore-Amiga, Inc.
  61. {uunet|rutgers}!cbmvax!peter    peter@cbmvax.commodore.com
  62. My opinions do not necessarily represent the opinions of my employer.
  63. "I believe it's bad luck to be superstitious."
  64.  
  65.