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