[comp.sys.amiga] Blitter, AmigaDOS and Multitasking

la@doc.ic.ac.uk (Liaket Ali) (10/15/90)

Help!
I am writing a level editor for a game which I am developing on the AMIGA 500.
The editor requires the use of the blitter quite extensively. Therefore in 
order to use the blitter in the Multitasking operating system, I have used
the ROM routines: OwnBlitter(),WaitBlit() and DisownBlit(). 

However this seems to make the drive lock up. For instance if I insert a disk
while my program is running (to save/load data) then the drive chugs a bit
and then stops with the light staying on! Then when I quit my program , the
system tells me that there is no disk in the drive! (even if I reinsert the
same disk or a different disk).

I would appreciate any help. My system is an AMIGA 500 KS1.3, with 1MB Ram +
Clock and External drive. The editor is written in assembly language and
the graphics use a 5 bitplane 320*256 display.

Thanks in advance.

LIAKET ALI     aka     la@doc.ic.ac.uk

IMS103@psuvm.psu.edu (Ian Matthew Smith) (10/17/90)

If I remember right, the blitter is used in read/write operation on the
Amiga 3.5 floppies.  Disk buffers have to be in CHIP mem so I assume
some of the DOS routines need to use some blitter functions when you have
owned teh blitter.

Ian Smith <ims103@psuvm.bintet>

pochron@cat27.cs.wisc.edu (David Pochron) (10/20/90)

Your problem appears quite simple - you are "owning" the blitter during
disk read/writes, and the trackdisk.device needs the blitter to decode the
data on the disk!

You should never hog the blitter for the entire run of a
program - do all your blitter calls into one part of the code, and surround
them by Own/Disown() blitter calls.  My Ultima shader/scroller routine owns
the blitter, draws all the screen graphics with the blitter, then disowns
it.   This is the only proper way to program the blitter without being "rude"
to the system.

One other thing: make sure that you ALWAYS wait for the blitter activity to
be done, even if you are using "blitter nasty" mode - since most asynchronous
CPU cards continue to run even with "blitter nasty" turned on!
(I know -- I found out the hard way!)

--
-------------------------------------------------------------------------------
David M. Pochron	    |  from Rescue Rangers, _A Fly in the Ointment_
pochron@garfield.cs.wisc.edu|  Gadget to Dale:  "Keep the hands off the body!"
-------------------------------------------------------------------------------