WAITROM

.Page
;++
;
;		WaitRom
;
; WaitRom switches off both motors and then waits until the 68000 diagnostics
; sets location 000 (68K = 000C00) first to #069 and then to #096.  The 6504
; will then do a cold start of the system
;
;--
;
; REGISTERS
;  IN
;	A =	Any value
;	X =	Any value
;	Y =	Any value
;  OUT
;	Returns via a cold start
;
;++

WaitRom	.Equ *				; Entry point for WaitRom
	Jsr	PrkClr0			; Park heads, turn motors off & clear GoByte

; Loop until 69/96 sequence occurrs

WaitRom1	Lda	000			; Wait for #069
	Cmp	#069
	Bne	WaitRom1

WaitRom2	Cmp	000			; Wait for #096
	Beq	WaitRom2

	Sec
	Adc	000			; Will be 0 if = 96
	Bne	Wait
	Rom1
	Jmp	DnWhWt			; Reset the world w/o memory wait