English Amiga Board


Go Back   English Amiga Board > Coders > Coders. General > Coders. Tutorials

 
 
Thread Tools
Old 15 January 2011, 20:02   #1
korruptor
TDI
korruptor's Avatar
 
Join Date: Feb 2007
Location: DUNDEE
Posts: 122
68k & 060 friendly code...

Hiya,

I've just got an 060 into my 1200, so I've hit the point where my dodgy old 500 code doesn't display properly. I'm pretty sure this is because of my interrupt setup being wrong for the higher processor.

Am I right in thinking that I need to get the VBR if I'm on a higher processor?

If so, how do I detect the CPU in asm to make the decision?

I'd like to dev on the 1200 (so run it and test it) but actually target the A500 for the stuff I'm making.

Thanks!
korruptor is offline  
Old 15 January 2011, 21:16   #2
pmc
gone
pmc's Avatar
 
Join Date: Apr 2007
Location: completely gone
Posts: 1,596
Hey korruptor

Yeah, you need to get the VBR.

This code will do it, just bsr to it in your startup before you need to set up your interrupt:

Code:
execbase	equ	$4
supervisor	equ	-30
attnflags	equ	296


.get_vbr:	move.l	execbase.w,a6
	btst	#0,attnflags+1(a6)
	bne.s	.need_vbr
	lea	sys_vbr_addr(pc),a0
	move.l	#0,(a0)
	rts

.need_vbr	lea	.get_vbr_code(pc),a5
	jsr	supervisor(a6)
	lea	sys_vbr_addr(pc),a0
	move.l	d0,(a0)
	rts

.get_vbr_code:	movec	vbr,d0
	rte

sys_vbr_addr:	dc.l	0
Don't thank me for the above, thank StingRay.
pmc is offline  
Old 15 January 2011, 21:33   #3
korruptor
TDI
korruptor's Avatar
 
Join Date: Feb 2007
Location: DUNDEE
Posts: 122
Oh, cracking, I'd just come back to post that I'd discovered the AttnFlags after much googling!

Thanks PMC (and Stingray!)
korruptor is offline  
Old 04 February 2011, 22:43   #4
korruptor
TDI
korruptor's Avatar
 
Join Date: Feb 2007
Location: DUNDEE
Posts: 122
My next question; can anyone remember the key you hold down to turn the Blizzard expansion cards off during boot?

I know there's one for the 030 and I vaguely remember it being a function key but I can't make that trick work with the 060...

So far my code is spectacularly crashing, which is better than the grey screen I had before.

Edit: Fixed the crash. Yay!

Last edited by korruptor; 04 February 2011 at 23:08.
korruptor is offline  
Old 05 February 2011, 01:58   #5
adolescent
Powered by Motorola

 
Join Date: Feb 2002
Location: Redondo Beach, CA
Age: 48
Posts: 1,064
Quote:
Originally Posted by korruptor View Post
My next question; can anyone remember the key you hold down to turn the Blizzard expansion cards off during boot?
Hold down the "2" button (not the one of the number pad) during boot.
adolescent is offline  
Old 05 February 2011, 15:46   #6
korruptor
TDI
korruptor's Avatar
 
Join Date: Feb 2007
Location: DUNDEE
Posts: 122
Ah. Brilliant, thank you!
korruptor 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
C/C++ WB friendly fullscreen game startup code NovaCoder Coders. Tutorials 1 20 August 2019 13:45
LUCAS & FRANCES Boards, PAL Code & PCB Masks Kai Hardware mods 173 29 October 2017 18:35
Mixed 68k / PPC code on VBCC. Cowcat Coders. General 10 01 August 2013 16:01
Assembler System Friendly code redblade Coders. General 3 29 July 2008 12:15
060 Friendly Demo? Methanoid request.Demos 2 30 November 2004 16:07

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 15:49.


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