; quick response to crashes

.text

Crash::
	rts
	move.l	engine.w,d0
	beq.b	.noke
	kill_sfx
	clr.l	engine.w
.noke:	;move.l	skidfx.w,d0
	;beq.b	.noks
	;kill_sfx
	;clr.l	skidfx.w

.noks:	move.l	#Exdisp+$4000,a0	; output address
	moveq.l	#80,d0			; request rle item #80
	bsr	rldin			; decompress data

	move.l	viewmove.w,d0
	asl.l	#6,d0
	neg.l	d0
	movea.l	d0,a0		; gives 64 when viewmove=-1
	adda.l	#reset_list+(16*(4+programmer)),a0
	moveq.l	#0,d0
	move.w	#$7ff,d0
	and.l	(a0),d0
	move.l	#Exdisp+$4000,d1
	asl.l	#8,d1
	or.l	d1,d0
	move.l	d0,(a0)+
	move.l	#$ff000007,d0
	and.l	(a0),d0
	moveq.l	#32,d1
	swap	d1
	asr.l	#5,d1
	move.b	#240,d1
	asl.l	#3,d1
	or.l	d1,d0
	move.l	d0,(a0)+
	addq.l	#3,a0
	moveq.l	#1,d0
	move.b	d0,(a0)+
	moveq.l	#3,d0
	and.w	(a0),d0
	or.w	#$8060,d0
	move.w	d0,(a0)

	st	dead.w
	rts
