Index: branches/azimutz/Chazi/i386/libsaio/vbe.h =================================================================== --- branches/azimutz/Chazi/i386/libsaio/vbe.h (revision 617) +++ branches/azimutz/Chazi/i386/libsaio/vbe.h (revision 618) @@ -37,6 +37,7 @@ //#include "edid.h" //Azi:autoresolution <-- included in #include "autoresolution.h" +//#include "../modules/AutoResolution/autoresolution.h" //Azi: reminder #define MIN_VESA_VERSION 0x200 Index: branches/azimutz/Chazi/i386/libsaio/aml_generator.c =================================================================== --- branches/azimutz/Chazi/i386/libsaio/aml_generator.c (revision 617) +++ branches/azimutz/Chazi/i386/libsaio/aml_generator.c (revision 618) @@ -22,12 +22,12 @@ case AML_CHUNK_QWORD: case AML_CHUNK_ALIAS: verbose("aml_add_to_parent: Node isn't supports child nodes!"); - return FALSE; + return false; case AML_CHUNK_NAME: if (parent->First) { verbose("aml_add_to_parent: Name node could have only one child node!"); - return FALSE; + return false; } break; @@ -43,10 +43,10 @@ parent->Last = node; - return TRUE; + return true; } - return FALSE; + return false; } struct aml_chunk* aml_create_node(struct aml_chunk* parent) Index: branches/azimutz/Chazi/i386/libsaio/fdisk.h =================================================================== --- branches/azimutz/Chazi/i386/libsaio/fdisk.h (revision 617) +++ branches/azimutz/Chazi/i386/libsaio/fdisk.h (revision 618) @@ -53,7 +53,7 @@ #define FDISK_LINUX 0x83 #define FDISK_UFS 0xa8 /* Apple UFS partition */ #define FDISK_HFS 0xaf /* Apple HFS partition */ -#define FDISK_BOOTER 0xab /* Apple booter partition */ +#define FDISK_BOOTER 0xab /* Apple booter partition - Azi: reminder */ /* * Format of fdisk partion entry (if present). Index: branches/azimutz/Chazi/i386/libsaio/sys.c =================================================================== --- branches/azimutz/Chazi/i386/libsaio/sys.c (revision 617) +++ branches/azimutz/Chazi/i386/libsaio/sys.c (revision 618) @@ -754,14 +754,15 @@ } //========================================================================== - -const char * systemConfigDir() +/* +const char * systemConfigDir() //Azi: boot 132 loadSystemConfig remains. { if (gBootFileType == kNetworkDeviceType) - return ""; + return ""; + return "/Library/Preferences/SystemConfiguration"; } - +*/ //========================================================================== int gBootFileType; @@ -789,29 +790,29 @@ void scanDisks(int biosdev, int *count) { - #define MAX_HDD_COUNT 32 - int bvCount; - int hd = 0; - - // Testing up to MAX_HDD_COUNT hard drives. - while(!testBiosread(0x80 + hd, 0) && hd < MAX_HDD_COUNT) + #define MAX_HDD_COUNT 32 + int bvCount; + int hd = 0; + + // Testing up to MAX_HDD_COUNT hard drives. + while (!testBiosread(0x80 + hd, 0) && hd < MAX_HDD_COUNT) { - bvCount = 0; - scanBootVolumes(0x80 + hd, &bvCount); - hd++; + bvCount = 0; + scanBootVolumes(0x80 + hd, &bvCount); + hd++; } - - // Also scanning CD/DVD drive. + + // Also scanning CD/DVD drive. if (biosDevIsCDROM(gBIOSDev)) { - bvCount = 0; - scanBootVolumes(gBIOSDev, &bvCount); + bvCount = 0; + scanBootVolumes(gBIOSDev, &bvCount); } } //========================================================================== -BVRef selectBootVolume( BVRef chain ) +BVRef selectBootVolume( BVRef chain ) //Azi: return default boot volume. { bool filteredChain = false; bool foundPrimary = false; @@ -913,7 +914,7 @@ // turbo - Save the ORIGINAL boot volume too for loading our mkext if (!gBIOSBootVolume) gBIOSBootVolume = gBootVolume; - setRootVolume(gBootVolume); + setRootVolume(gBootVolume); } /*! Index: branches/azimutz/Chazi/i386/libsaio/disk.c =================================================================== --- branches/azimutz/Chazi/i386/libsaio/disk.c (revision 617) +++ branches/azimutz/Chazi/i386/libsaio/disk.c (revision 618) @@ -1999,7 +1999,7 @@ return 0; } - +//Azi: for device drawing purposes (gui.c) int diskIsCDROM(BVRef bvr) { struct driveInfo di; Index: branches/azimutz/Chazi/i386/libsaio/edid.c =================================================================== --- branches/azimutz/Chazi/i386/libsaio/edid.c (revision 617) +++ branches/azimutz/Chazi/i386/libsaio/edid.c (revision 618) @@ -14,7 +14,7 @@ #include "graphics.h" -//static biosBuf_t bb; +//static biosBuf_t bb; // reminder UInt32 xResolution = 0; UInt32 yResolution = 0; @@ -54,7 +54,6 @@ } } - unsigned char* readEDID() { SInt16 last_reported = -1; Index: branches/azimutz/Chazi/i386/libsaio/stringTable.c =================================================================== --- branches/azimutz/Chazi/i386/libsaio/stringTable.c (revision 617) +++ branches/azimutz/Chazi/i386/libsaio/stringTable.c (revision 618) @@ -608,7 +608,8 @@ int loadSystemConfig(config_file_t *config) { char *dirspec[] = { - //"/Extra/com.apple.Boot.plist", removed in favor of bt(0,0) + //"/Extra/com.apple.Boot.plist", removed in favor of bt(0,0)... BS! + //Azi: review; at this point /Extra/modules/ = bt(0,0)/Extra/modules/. "bt(0,0)/Extra/com.apple.Boot.plist", "/Library/Preferences/SystemConfiguration/com.apple.Boot.plist", "/com.apple.boot.P/Library/Preferences/SystemConfiguration/com.apple.Boot.plist", @@ -672,12 +673,12 @@ // Check specific OS folders. sprintf(dirSpecBplist, "bt(0,0)/Extra/%s/%s", &gMacOSVersion, filename); fd = open(dirSpecBplist, 0); -// if (fd >= 0) goto success_fd; + if (fd >= 0) goto success_fd; -// restore?? can be useful with ramdisks... -// sprintf(dirSpecBplist, "bt(0,0)/Extra/%s", filename); -// fd = open(dirSpecBplist, 0); -// if (fd >= 0) goto success_fd; +// can be useful with ramdisks... + sprintf(dirSpecBplist, "bt(0,0)/Extra/%s", filename); + fd = open(dirSpecBplist, 0); + if (fd >= 0) goto success_fd; //Azi: i really don't like these two! // "/Extra/com.apple.Boot.plist" Index: branches/azimutz/Chazi/i386/boot2/modules.c =================================================================== --- branches/azimutz/Chazi/i386/boot2/modules.c (revision 617) +++ branches/azimutz/Chazi/i386/boot2/modules.c (revision 618) @@ -82,7 +82,9 @@ char* name; long flags; long time; - //Azi: Modules.txt-->Issues + + //Azi: review; at this point /Extra/modules/ = bt(0,0)/Extra/modules/; + // same thing with all other files that load before the prompt. struct dirstuff* moduleDir = opendir("bt(0,0)/Extra/modules/"); while(readdir(moduleDir, (const char**)&name, &flags, &time) >= 0) { Index: branches/azimutz/Chazi/i386/boot2/gui.c =================================================================== --- branches/azimutz/Chazi/i386/boot2/gui.c (revision 617) +++ branches/azimutz/Chazi/i386/boot2/gui.c (revision 618) @@ -23,7 +23,6 @@ #endif int lasttime = 0; // we need this for animating maybe -extern int gDeviceCount; // dup, line 132 static const char *theme_name = kDefaultThemeName; // #define'ed on boot.h /* @@ -129,8 +128,8 @@ int imageCnt = 0; -//extern int gDeviceCount; - dup, line 25 -extern int selectIndex; +extern int gDeviceCount; +//extern int selectIndex; Azi: not in use extern MenuItem *menuItems; @@ -725,6 +724,7 @@ gui.screen.width = screen_params[0]; gui.screen.height = screen_params[1]; PRINT("Found mode %dx%d in VESA Table\n", gui.screen.width, gui.screen.height); + //Azi: check why is this printing... (reloadAutoRes/debug) // load graphics otherwise fail and return if (loadGraphics() == 0) { Index: branches/azimutz/Chazi/i386/boot2/ramdisk.c =================================================================== --- branches/azimutz/Chazi/i386/boot2/ramdisk.c (revision 617) +++ branches/azimutz/Chazi/i386/boot2/ramdisk.c (revision 618) @@ -117,7 +117,7 @@ fh = open(param, 0); if (fh != -1) { - printf("\nreading ramdisk image: %s", param); + printf("\nreading ramdisk image: %s", param); //Azi: check this later... ramDiskSize = file_size(fh); if (ramDiskSize > 0) Index: branches/azimutz/Chazi/i386/boot2/options.c =================================================================== --- branches/azimutz/Chazi/i386/boot2/options.c (revision 617) +++ branches/azimutz/Chazi/i386/boot2/options.c (revision 618) @@ -670,10 +670,12 @@ } //========================================================================== +//Azi: autoresolution int key; int nextRow; BVRef menuBVR; bool showPrompt; +extern void reloadAutoRes(); int getBootOptions(bool firstRun) { @@ -686,7 +688,6 @@ // BVRef menuBVR; // bool showPrompt; bool newShowPrompt, isCDROM; - extern void reloadAutoRes(); //Azi: autoresolution // Initialize default menu selection entry. gBootVolume = menuBVR = selectBootVolume(bvChain); @@ -1037,10 +1038,8 @@ // New behavior: // Switch between text & graphic interfaces // Only Permitted if started in graphics interface - if (useGUI) - { - if (bootArgs->Video.v_display == GRAPHICS_MODE) - { + if (useGUI) { + if (bootArgs->Video.v_display == GRAPHICS_MODE) { setVideoMode(VGA_TEXT_MODE, 0); setCursorPosition(0, 0, 0); @@ -1056,8 +1055,7 @@ nextRow = kMenuTopRow; showPrompt = true; - if (gDeviceCount) - { + if (gDeviceCount) { printf("Use \30\31 keys to select the startup volume."); showMenu(menuItems, gDeviceCount, selectIndex, kMenuTopRow + 2, kMenuMaxItems); nextRow += min(gDeviceCount, kMenuMaxItems) + 3; @@ -1066,14 +1064,7 @@ showPrompt = (gDeviceCount == 0) || (menuBVR->flags & kBVFlagNativeBoot); showBootPrompt(nextRow, showPrompt); //changeCursor( 0, kMenuTopRow, kCursorTypeUnderline, 0 ); - - // need to disable F2 here but can't do useGUI = false... - // not a big deal but since i disabled it when in TEXT MODE, - // were it makes no sense and it just hangs the prompt.. not fatal, though... - // back later... - } - else - { + } else { gui.redraw = true; setVideoMode(GRAPHICS_MODE, 0); updateVRAM();