15 January 2011, 20:02 | #1 |
TDI
Join Date: Feb 2007
Location: Blitter Town
Posts: 124
|
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! |
15 January 2011, 21:16 | #2 |
gone
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 |
15 January 2011, 21:33 | #3 |
TDI
Join Date: Feb 2007
Location: Blitter Town
Posts: 124
|
Oh, cracking, I'd just come back to post that I'd discovered the AttnFlags after much googling!
Thanks PMC (and Stingray!) |
04 February 2011, 22:43 | #4 |
TDI
Join Date: Feb 2007
Location: Blitter Town
Posts: 124
|
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. |
05 February 2011, 01:58 | #5 |
Powered by Motorola
Join Date: Feb 2002
Location: Redondo Beach, CA
Age: 52
Posts: 1,065
|
|
05 February 2011, 15:46 | #6 |
TDI
Join Date: Feb 2007
Location: Blitter Town
Posts: 124
|
Ah. Brilliant, thank you!
|
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 |
|
|