Subject: I think I figgered out why it's stopping.
To: Allen Briggs <briggs@puma.macbsd.com>
From: Chris Mason <cmason@nando.net>
List: port-mac68k
Date: 07/31/1996 23:28:10
I'm still waiting for the latest booter, so I can get the logging facility.
While waiting I've been poking around in the latest booter source, and...

I !think! I have found where I believe my boot is stopping when I don't
have the video card installed.  I think you're (whoever wrote this monster)
trying to get the location of the main graphics device by locating the base
of the bitmap of the global grafPort.

I'm not a "real" mac programmer, but I think I know what's going on here.
In the snippet below, screen24 gets the base address of the bitmap (is this
actually in the vram or whatever?) of the grafPort.  Then you & it with
0xf0000000 to figure out if its a 24bit address.

This is in copyunix() at the end of ufs_test.c:

screen24 = (unsigned long )thePort->portBits.baseAddr;
video_logical = screen24;  /* want mapped video address ; Booter ver 1 */
        /* We may get a 32 bit address here, check MF. */
if (screen24 & 0xf0000000) {
        /* 32 bit address. */
        screen32 = screen24;
} else {
        /* 24 bit address. */
   ParamText("\pYour machine does not appear to be 32-bit addressing mode.",
              "\pPlease set 32-bit addressing in the Memory Control Panel.",
              "\pYou may need to install Mode32 in order to do so.",
               "\pAttempting to boot anyway...");
        NoteAlert (128, NULL);

        scr_slot = (screen24 & 0xf00000) >>20;
        scr_addr = (screen24 & 0xfffff);
        screen32 = 0xf0000000 | (scr_slot << 24) | scr_addr;
}

I really have no idea what the last three lines are supposed to do.  All I
know is that portBits.baseAddr is the location of the bitmap of the current
grafPort.  I'm not so sure that, if I didn't have a video card, this would
actually exist.  Could QD be faking it, that is pointing to a bogus
grafPort.bitmap, since there's no video hardware?

How can we detect if this is the case and trap for it??

Again, I'm really familiar with QD, but could this be the problem??

Thanks alot for your help.

-c

 _____________________________________________________________________
|Christopher Mason - cmason@nyx.net  cmason@nando.net  cmason@cmu.edu |
|"You can always count on a murderer for a fancy prose style."-Nabokov|
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~