;
; patchsprites.a - a little program to help with the problem
; of multiple pointer sprites appearing at raster line 256 and below
; with some hardware configurations.
;
; created  1989-08-27  TR
;

;
; the problem is with the data that is used for unused sprites.
; that data is at copinit_sprstop at the end of the copinit structure
; (in the beginning of that structure is the copper initialization list
; that sets up the sprite pointers and then jumps to the View copper
; list). this program sets the copinit_sprstop field to zero.
;

ExecBase		equ	4
gb_copinit		equ	$26
copinit_sprstop		equ	$58
_LVOOpenLibrary		equ	-$228
_LVOCloseLibrary	equ	-$19e


	lea	gfxname(pc),a1
	moveq	#0,d0
	move.l	ExecBase,a6
	jsr	_LVOOpenLibrary(a6)
	tst.l	d0
	beq.s	quitti
	move.l	d0,a1

	move.l	gb_copinit(a1),a0
	clr.l	copinit_sprstop(a0)

	jsr	_LVOCloseLibrary(a6)
quitti	moveq	#0,d0
	rts

gfxname	dc.b	'graphics.library',0

	end
