[Coco] Help with some HiRes CoCo 3 MMU settings

Glen Hewlett glen.hewlett at sympatico.ca
Wed Dec 7 19:45:27 EST 2016


Hi Robert,

Thanks for the example code, It works fine for the FIRQ as it is, and I can hopefully use this to get my IRQ version working.  I noticed that in your Interrupt section the first thing you do is a “lda $FF93” is there a reason for reading the FIRQENR every time the interrupt is called?

Just trying to learn…

Thanks again.  Your code will help.
Glen
 
> On Dec 7, 2016, at 6:17 PM, Robert Gault <robert.gault at att.net> wrote:
> 
> Glen Hewlett wrote:
>> Hi Robert,
>> 
>> I think William Astle, has figured out some of my problems are CoCo 1 & 2 Interrupts that are still enabled and running in the background.  I guess you guys would have figured out that if I sent the entire code, but my program is actually quite big at this time.  Although just for learning and testing I’ve now shrunk it down to a quick little setup and test code.  Whenever I finish my program I will share it on the list, I just don’t want to go into any details of the actual program right now.
>> 
>> You said I don’t want the fast rate enabled for the Timer Clock source.  Why not?  Is that only used for sound and too many interrupts for a general program to use?  Or am I way off?  Another question from Sock Masters site I read:
>> FF91 (65425) Initialization Register 1 - INIT1
> 
> Glen,
> 
> You can use the fast clock timer if you know what you are doing and realize that the value is not that in the service manual 70nsec but rather 279nsec.
> 
> With MESS/MAME as your test base, you could easily set a break points in your service routines to see what is happening.
> 
> Robert
> 
> PS Below is an example of using the Fast Timer.
> 
> * This is intended to determine the rate of the GIME fast timer
> 
> 	org	$7000
> start	ldy	#0
> 	sty	count
> 	lda	$FEF4
> 	ldx	$FEF5
> 	sta	OldFIRQ
> 	stx	OldFIRQ+1
> 	orcc	#$50
> 	lda	#$7E	JMP
> 	leax	FIRQ,pcr
> 	sta	$FEF4
> 	stx	$FEF5
> 	lda	#$34
> 	sta	$ff01
> 	sta	$ff03
> 	lda	#%01011100
> 	sta	$FF90
> 	lda	#%00100000
> 	sta	$FF91	fast timer
> 	sta	$FF93	FIRQ engage
> 	ldd	#$FFF	this should be 1.144E-3 seconds
> 	std	$FF94
> 	andcc	#$AF
> a@	bra	a@
> 
> OldFIRQ	rmb	3
> count	fdb	0
> 
> FIRQ	lda	$FF93
> 	ldy	count
> 	leay	1,y
> 	sty	count
> 	cmpy	#52447	should be 60 seconds
> 	beq	exit
> 	rti
> 	
> exit	orcc	#$50	the time lost here is too small to matter
> 	lda	OldFIRQ
> 	ldx	OldFIRQ+1
> 	sta	$FEF4
> 	stx	$FEF5
> 	clra
> 	sta	$FF91
> 	sta	$FF93
> 	sta	$FF95
> 	sta	$FF94
> 	lda	#%01001100
> 	sta	$FF90
> 	lda	#$35
> 	sta	$FF03
> 	andcc	#$af
> 	puls	a,x,pc
> 	end	start
> 
> -- 
> Coco mailing list
> Coco at maltedmedia.com
> https://pairlist5.pair.net/mailman/listinfo/coco



More information about the Coco mailing list