English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Asm / Hardware

 
 
Thread Tools
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  
Old 31 March 2021, 09:36   #2
ross
Defendit numerus
 
ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 53
Posts: 4,468
Full exe that hung the machine please
ross is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
A1200 RF module removal pics + A1200 chips overview eXeler0 Hardware pics 2 08 March 2017 00:09
Sale - 2 auctions: A1200 mobo + flickerfixer & A1200 tower case w/ kit blakespot MarketPlace 0 27 August 2015 18:50
For Sale - A1200/A1000/IndiAGA MkII/A1200 Trapdoor Ram & Other Goodies! fitzsteve MarketPlace 1 11 December 2012 10:32
Trading A1200 030 acc and A1200 indivision for Amiga stuff 8bitbubsy MarketPlace 17 14 December 2009 21:50
Trade Mac g3 300/400 or A1200 for an A1200 accellerator BiL0 MarketPlace 0 07 June 2006 17:41

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 11:46.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.07163 seconds with 13 queries