View Single Post
Old 31 March 2021, 00:47   #1
Antiriad_UK
OCS forever!
 
Antiriad_UK's Avatar
 
Join Date: Mar 2019
Location: Birmingham, UK
Posts: 418
copcon/CDANG on A1200

I'm having a weird one on a real A1200 with fastmem/030. My system kill routine was setting CDANG bit so that could do some copper blits. Was working fine on WinUAE/A500, WinUAE/A1200, Real A600 but completely hung on real a1200+fast mem with this kind of code:

Code:
	lea	_custom,a6		
	move.w	intenar(a6),FW_SYSINTENA(a5)	;save
	move.w	#$7fff,d0
	move.w	dmaconr(a6),FW_SYSDMACON(a5)	;save
	move.w	adkconr(a6),FW_SYSADKCON(a5)	
	move.w	d0,dmacon(a6)			;disable 
	move.w	d0,adkcon(a6)

	move.w	#$0002,copcon(a6)
If I changed the code to install a custom "blank" CL first and vblank IRQ, then wait a frame and then write copcon it worked ok:

Code:
	lea	_custom,a6		
	move.w	intenar(a6),FW_SYSINTENA(a5)	;save
	move.w	#$7fff,d0
	move.w	d0,intena(a6)		;Disable interrupts
	move.w	d0,intreq(a6)
	bsr	FW_WaitTOF_A6		;T:None

	move.w	dmaconr(a6),FW_SYSDMACON(a5)	;save
	move.w	adkconr(a6),FW_SYSADKCON(a5)	
	move.w	d0,dmacon(a6)			;disable 
	move.w	d0,adkcon(a6)

	;Write base CL/IRQ and then wait a frame to be sure it's active, then safe to turn on CDANG
	;without risk of blitter being triggered (seems to happen on real a1200). When copper dma is turned
	;on the last STROBED list from cop1lch immediately starts running. We need to be sure that is our 
	;new list.
	bsr	FW_SetBaseCopperIrq_A6
	bsr	FW_WaitTOF_A6		;T:None
	move.w	#$0002,copcon(a6)	;Enable copper controlled blits, be sure custom CL installed first
But now I get the same kind of hang on restoring the system. I suspect I need to disable CDANG again before restoring. Is this expected or have I got some unique weirdness going on in my code?
Antiriad_UK is offline  
 
Page generated in 0.05366 seconds with 11 queries