Subject: Re: Phantom with NetBSD
To: Junya Takeuchi <mail@jtake.net>
From: Leo Weppelman <leo@wau.mis.ah.nl>
List: port-atari
Date: 02/17/2001 22:35:39
> JT > Will I be able to use Phantom with NetBSD?
> 
> Yes. Next piece of asm code need to be aded into NetBSD boot code:
> 
> --------------------------------------------------------------
> * this code enables the Phantom card
> * works only in supervisor mode !
> 
> hw_f30_comp_div = $ffff8007
> hw_KB_cont = $fffffc00
> 
> lea hw_KB_cont.w,a0 ; Switches card ON
> move.b #3,(a0) ; via RST signal
> move.b #214,(a0) ; on keyboard ACIA
> 
> bclr #2,hw_f30_comp_div.w ; Blitter clock = BUS clock/2
> --------------------------------------------------------------

Just to try things out, you could try to add to locore.s:
	lea    #0xfffc00,%a0	| Switches card ON
	movb   #3,(%a0)		| via RST signal
	movb   #214,(%a0)	| on keyboard ACIA
	bclr.w #2,0xff8007	| Blitter clock = BUS clock/2

Just before the lines:
	/*
         * let the C function initialize everything and enable the MMU
         */
	jsr     _C_LABEL(start_c)

I just translated the assembler statements. Note that the Falcon I/O area
is at 0xff8000 and not 0xffff8000 since the MMU is disabled.

If this works, next item is how to properly detect the card.

Leo.