Subject: Re: debugging
To: None <newsham@uhunix.uhcc.Hawaii.Edu>
From: Eduardo E. Horvath <>
List: amiga-dev
Date: 03/18/1994 07:04:13
On Thu, 17 Mar 1994 newsham@uhunix.uhcc.Hawaii.Edu wrote:

> Ok..  debugging the kernel at early stages of booting up.  I'm
> having problems with this.  Exactly how early can I use the
> printf instruction?  These go to the console I assume (or do
> they go to the serial line?).

They *should* go to the console.  However, I have discovered that on my 
system, the custom chips display is never properly initialized (still 
looking into this) so you may never see any output.

> I looked at rollcolor().  This looks like it should be callable
> as soon as the base register is set up in amiga_init.c.  The
> format is just rollcolor(0x0r0g0b); right?

Right, except it's rollcolor(0x0rgb); remember you're poking the hardware 

> I put some rollcolor statements in my kernel and it didn't hit
> any of them (at least I got no color changes).  There was at least
> one that was after the base register was set up and before my
> modded code was hit so it should have reached at least that far.
> (Although I did a rebuild without make'ing clean..  compiles
> being as slow as they are on my box).

If you want to change the color before the pointer is set in 
amiga_init.c, you can directly poke the color register like this:

*((short)0xdff180) = 0x0ff0;

This will work up to the point the MMU is enabled.  Thereafter you must 
use rollcolor.

Eduardo Horvath
	"Trust me, I am cognizant of what I am doing." - Hammeroid