home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / sys / amiga / programm / 11475 < prev    next >
Encoding:
Internet Message Format  |  1992-07-22  |  2.6 KB

  1. Path: sparky!uunet!gossip.pyramid.com!decwrl!sun-barr!ames!tulane!agwbbs!dvtown!dvaz
  2. From: dvaz@dvtown.UUCP (David Vazquez)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Re: Custom-Bitmapped screen!!!!
  5. Distribution: world
  6. Message-ID: <dvaz.02wb@dvtown.UUCP>
  7. References:  <1992Jul21.135317.10888@usage.csd.unsw.OZ.AU>
  8. Date: 21 Jul 92 14:51:19 CST
  9. Organization: Not an Organization
  10. Lines: 51
  11.  
  12. In article <1992Jul21.135317.10888@usage.csd.unsw.OZ.AU> jeice@newt.phys.unsw.oz.au (Jose Ma.Goikoetxea) writes:
  13. >
  14. >Lately I have been playing with Intuition and I am currently trying to write
  15. >a program using the Intuition under v1.3. Currently my problem is that I want
  16. >to use my own CustomBitmap as the screen but I have been unsuccesful in doing
  17. >so. What I have done up to now is draw a screen in Low Res and then convert it
  18. >into a RAW format using a program called iffmaster. After loading this into the
  19. >assembler, Oh by the way I have set the screenmode to 2 and screen type to $40
  20. >but after compiling and then trying to run the program it keeps crashing.
  21. >Thru reading some books such as ROM Kernels I have discovered that I have to set up
  22. > a bitmap structure using InitBitmap but before doing that I have to
  23. >AllocRaster.
  24. >Now what I dont understand is how do I use this routine if I have 2 Bitplanes
  25. >therefore I must call AllocRaster twice and it returns the pointer to the
  26. >memory location for each bitplane but then what do I do???????
  27. >
  28.  
  29. How are you loading it into your assembler (with INCBIN)?  If so you must
  30. so this:
  31.  
  32.     INCLUDE graphics/gfx.i
  33.  
  34. ; open graphics.library and any others that you'll need.
  35.     :
  36.     lea    bitMap,a0
  37.     move.l    #2,d0            ;  Depth
  38.     move.l    #320,d1         ;  Width
  39.     move.l    #200,d2         ;  Height
  40.     move.l    _GfxBase,a6
  41.     jsr    _LVOInitBitMap(a6)
  42.  
  43.     lea    bitMap,a0
  44.     move.l    #planes,bm_Planes(a0)         ;  first bitplane.
  45.     move.l    #planes+8000,bm_Planes+4(a0)  ;  second bitplane.
  46.     :
  47. ;  Set up NewScreen structure with a pointer to bitMap in the CustomBitMap
  48. ; field and flags set accordingly then OpenScreen(), etc.
  49.     :
  50. bitMap    ds.b    bm_SIZEOF        ;  You can also use AllocMem to
  51.                     ; allocate this structure.
  52.     :
  53.     SECTION graphic_data,DATA_C
  54.     ;  Anything that follows will be placed in chip (graphics) memory.
  55. planes    INCBIN    RawPictureFileName    ;  Data representing 2bp screen.
  56.  
  57. --
  58. ============================================================================
  59.      //  Look Ma,    O         David Vazquez             \\
  60.     //               -|-     INTERNET: dvaz%dvtown@cs.tulane.edu    \\
  61.   \X/       No hands.   / \     USENET: ...!rex!dvtown!dvaz           \X/
  62. ============================================================================
  63.