[comp.sys.amiga.tech] Vertical Blank Interrupt

bryce@eris (Bryce Nesbitt) (03/22/88)

In article <2488@umd5.umd.edu> spier@umd5.umd.edu (Lori Spier) writes:
>
>I am writing an assembly language game and I want to use the vertical
>blank interrupt to do some of my minor bitplane memory updates....
>
>My question is does anyone know how much time there is (in cycles) that 
>can be used durring the vertical blank?

No need. Just set the color registers to some value to find out.  Ie:

	move.l	#$00f,$dff001	;At start of int routine
	....
	move.l	#$0f0,$dff180	;At end of int routine

Now you will have a color stripe on the screen that represents the size
of your interrupt routine.  A visual indicator.

The actual time available will depend on the hardware.  If the system
has chip only, resolution will affect the time. If the machine has
true-fast memory, the CPU can do whatever it wants, regardless of video.


>I open up the gameport.
>device to get the input.  How can I just send a signal to the device so that
>each time through my game loop it will check if the mouse moved or if one of
>the buttons were pressed?  See, I don't want there to be many Messages waiting
>to be read when I can just check in my loop if there was some input.

You must always assume that there may be many messages, even if there don't
seem to be when you write it.   BTW: At the moment gameport is just a vblank
handler. 

|\_/|  . ACK!, NAK!, EOT!, SOH!
{O_o} .     Bryce Nesbitt
 (")        BIX: mleeds (temporarily)
  U	    USENET: bryce@eris.berkeley.EDU -or- ucbvax!eris!bryce