Index: branches/azimutz/trunkAutoResolution/i386/libsaio/xml.c =================================================================== --- branches/azimutz/trunkAutoResolution/i386/libsaio/xml.c (revision 1038) +++ branches/azimutz/trunkAutoResolution/i386/libsaio/xml.c (revision 1039) @@ -355,7 +355,7 @@ else { printf("ParseStringID error (0x%x)\n", *val); - getc(); //Azi: getchar(); + getchar(); return -1; } } @@ -380,7 +380,7 @@ else { printf("ParseStringIDREF error (0x%x)\n", *val); - getc(); //Azi: getchar(); + getchar(); return -1; } } @@ -423,7 +423,7 @@ else { printf("ParseIntegerID error (0x%x)\n", *val); - getc(); //Azi: getchar(); + getchar(); return -1; } } @@ -448,7 +448,7 @@ else { printf("ParseStringIDREF error (0x%x)\n", *val); - getc(); //Azi: getchar(); + getchar(); return -1; } } @@ -669,7 +669,7 @@ if(buffer[0] == '<') { printf("Warning integer is non existant\n"); - getc(); //Azi: getchar(); + getchar(); tmpTag = NewTag(); tmpTag->type = kTagTypeInteger; tmpTag->string = 0; @@ -710,7 +710,7 @@ else { printf("ParseTagInteger hex error (0x%x) in buffer %s\n", *val, buffer); - getc(); //Azi: getchar(); + getchar(); return -1; } } @@ -731,7 +731,7 @@ if (*val < '0' || *val > '9') { printf("ParseTagInteger decimal error (0x%x) in buffer %s\n", *val, buffer); - getc(); //Azi: getchar(); + getchar(); return -1; } @@ -771,7 +771,7 @@ //printf("ParseTagData unimplimented\n"); //printf("Data: %s\n", buffer); - // getc(); //Azi: getchar(); + // getchar(); // TODO: base64 decode @@ -803,7 +803,7 @@ if (tmpTag == 0) return -1; printf("ParseTagDate unimplimented\n"); - getc(); //Azi: getchar(); + getchar(); tmpTag->type = kTagTypeDate; tmpTag->string = 0; Index: branches/azimutz/trunkAutoResolution/i386/libsaio/console.c =================================================================== --- branches/azimutz/trunkAutoResolution/i386/libsaio/console.c (revision 1038) +++ branches/azimutz/trunkAutoResolution/i386/libsaio/console.c (revision 1039) @@ -158,13 +158,13 @@ // Read and echo a character from console. This doesn't echo backspace // since that screws up higher level handling -int getchar() //Azi: study!!! +int getchar() { register int c = getc(); - if ( c == '\r' ) c = '\n'; //Azi: CR/LF ?? +// if ( c == '\r' ) c = '\n'; - if ( c >= ' ' && c < 0x7f) putchar(c); //Azi: check gui.h - kReturnKey, etc... +// if ( c >= ' ' && c < 0x7f) putchar(c); return (c); } @@ -263,6 +263,6 @@ void pause() { printf("Press a key to continue...\n"); - getc(); //getchar(); //Azi: getc works here because the function is up above. - // replace get/getchar by pause() ?? + getchar(); //getc(); //Azi: getc works here because the function is up above; changed for now. + // replace getchar() by pause() ?? } Index: branches/azimutz/trunkAutoResolution/i386/libsaio/acpi_patcher.c =================================================================== --- branches/azimutz/trunkAutoResolution/i386/libsaio/acpi_patcher.c (revision 1038) +++ branches/azimutz/trunkAutoResolution/i386/libsaio/acpi_patcher.c (revision 1039) @@ -1058,7 +1058,7 @@ } #if DEBUG_ACPI printf("Press a key to continue... (DEBUG_ACPI)\n"); - getc(); //Azi: getchar(); + getchar(); #endif return 1; } Index: branches/azimutz/trunkAutoResolution/i386/libsaio/nvidia.c =================================================================== --- branches/azimutz/trunkAutoResolution/i386/libsaio/nvidia.c (revision 1038) +++ branches/azimutz/trunkAutoResolution/i386/libsaio/nvidia.c (revision 1039) @@ -891,7 +891,8 @@ headerlength = 8; } if (sig != 0x4edcbdcb) { - printf("bad display config block signature (0x%8x)\n", sig); + //Azi: match this with one below and add line number ? + printf("Bad display config block signature (0x%8x)\n", sig); return PATCH_ROM_FAILED; } } else if (dcbtable_version >= 0x14) { /* some NV15/16, and NV11+ */ Index: branches/azimutz/trunkAutoResolution/i386/libsaio/ati.c =================================================================== --- branches/azimutz/trunkAutoResolution/i386/libsaio/ati.c (revision 1038) +++ branches/azimutz/trunkAutoResolution/i386/libsaio/ati.c (revision 1039) @@ -456,7 +456,6 @@ { 0x9443, 0x00000000, CHIP_FAMILY_RV770, "ATI Radeon HD 4850 X2", kMotmot }, { 0x944C, 0x00000000, CHIP_FAMILY_RV770, "ATI Radeon HD 4800 Series", kMotmot }, { 0x944E, 0x00000000, CHIP_FAMILY_RV770, "ATI Radeon HD 4700 Series", kMotmot }, - { 0x944E, 0x00000000, CHIP_FAMILY_RV770, "ATI Radeon HD 4700 Series", kMotmot }, { 0x9450, 0x00000000, CHIP_FAMILY_RV770, "AMD FireStream 9270", kMotmot }, { 0x9452, 0x00000000, CHIP_FAMILY_RV770, "AMD FireStream 9250", kMotmot }, { 0x9460, 0x00000000, CHIP_FAMILY_RV770, "ATI Radeon HD 4800 Series", kMotmot }, Index: branches/azimutz/trunkAutoResolution/i386/libsaio/load.c =================================================================== --- branches/azimutz/trunkAutoResolution/i386/libsaio/load.c (revision 1038) +++ branches/azimutz/trunkAutoResolution/i386/libsaio/load.c (revision 1039) @@ -135,7 +135,7 @@ printf("ncmds: %x\n", (unsigned)mH->ncmds); printf("sizeofcmds: %x\n", (unsigned)mH->sizeofcmds); printf("flags: %x\n", (unsigned)mH->flags); - getc(); //Azi: getchar();; + getchar(); #endif ncmds = mH->ncmds; @@ -219,7 +219,7 @@ printf("segname: %s, vmaddr: %x, vmsize: %x, fileoff: %x, filesize: %x, nsects: %d, flags: %x.\n", segCmd->segname, (unsigned)vmaddr, (unsigned)vmsize, (unsigned)fileaddr, (unsigned)filesize, (unsigned) segCmd->nsects, (unsigned)segCmd->flags); - getc(); //Azi: getchar(); + getchar(); #endif } else @@ -239,7 +239,7 @@ printf("segname: %s, vmaddr: %x, vmsize: %x, fileoff: %x, filesize: %x, nsects: %d, flags: %x.\n", segCmd->segname, (unsigned)vmaddr, (unsigned)vmsize, (unsigned)fileaddr, (unsigned)filesize, (unsigned) segCmd->nsects, (unsigned)segCmd->flags); - getc(); //Azi: getchar(); + getchar(); #endif } @@ -317,7 +317,7 @@ #if DEBUG printf("symoff: %x, nsyms: %x, stroff: %x, strsize: %x\n", symTab->symoff, symTab->nsyms, symTab->stroff, symTab->strsize); - getc(); //Azi: getchar(); + getchar(); #endif symsSize = symTab->stroff - symTab->symoff; Index: branches/azimutz/trunkAutoResolution/i386/libsaio/cpu.c =================================================================== --- branches/azimutz/trunkAutoResolution/i386/libsaio/cpu.c (revision 1038) +++ branches/azimutz/trunkAutoResolution/i386/libsaio/cpu.c (revision 1039) @@ -286,7 +286,7 @@ /*if(bus_ratio_max > 0) bus_ratio = flex_ratio;*/ p->CPU.MaxRatio = max_ratio; p->CPU.MinRatio = min_ratio; - + myfsb = fsbFrequency / 1000000; verbose("Sticking with [BCLK: %dMhz, Bus-Ratio: %d]\n", myfsb, max_ratio); currcoef = bus_ratio_max; Index: branches/azimutz/trunkAutoResolution/i386/libsaio/disk.c =================================================================== --- branches/azimutz/trunkAutoResolution/i386/libsaio/disk.c (revision 1038) +++ branches/azimutz/trunkAutoResolution/i386/libsaio/disk.c (revision 1039) @@ -1636,7 +1636,7 @@ printf(" bvr: %d, dev: %d, part: %d, flags: %d, vis: %d\n", bvr, bvr->biosdev, bvr->part_no, bvr->flags, bvr->visible); } printf("count: %d\n", bvCount); - getc(); //Azi: getchar(); + getchar(); #endif *count = bvCount; Index: branches/azimutz/trunkAutoResolution/i386/libsaio/cpu.h =================================================================== --- branches/azimutz/trunkAutoResolution/i386/libsaio/cpu.h (revision 1038) +++ branches/azimutz/trunkAutoResolution/i386/libsaio/cpu.h (revision 1039) @@ -6,7 +6,7 @@ #ifndef __LIBSAIO_CPU_H #define __LIBSAIO_CPU_H -#include "libsaio.h" +//#include "libsaio.h" extern void scan_cpu(PlatformInfo_t *); Index: branches/azimutz/trunkAutoResolution/i386/libsaio/hpet.c =================================================================== --- branches/azimutz/trunkAutoResolution/i386/libsaio/hpet.c (revision 1038) +++ branches/azimutz/trunkAutoResolution/i386/libsaio/hpet.c (revision 1039) @@ -98,6 +98,6 @@ #if DEBUG_HPET printf("Press [Enter] to continue...\n"); - getc(); //Azi: getchar(); + getchar(); #endif } Index: branches/azimutz/trunkAutoResolution/i386/libsaio/biosfn.c =================================================================== --- branches/azimutz/trunkAutoResolution/i386/libsaio/biosfn.c (revision 1038) +++ branches/azimutz/trunkAutoResolution/i386/libsaio/biosfn.c (revision 1039) @@ -185,7 +185,7 @@ // Some BIOSes will simply ignore the value of ECX on entry. // Probably best to keep its value at 20 to avoid surprises. - //printf("Get memory map 0x%x, %d\n", rangeArray); getc(); //Azi: getchar(); + //printf("Get memory map 0x%x, %d\n", rangeArray); getchar(); if (maxRangeCount > (BIOS_LEN / sizeof(MemoryRange))) { maxRangeCount = (BIOS_LEN / sizeof(MemoryRange)); } @@ -252,10 +252,10 @@ #if DEBUG { int i; - printf("%d total ranges\n", count); getc(); //Azi: getchar(); + printf("%d total ranges\n", count); getchar(); for (i=0, range = rangeArray; itype, (unsigned int)range->base, (unsigned int)range->length); getc(); //Azi: getchar(); + range->type, (unsigned int)range->base, (unsigned int)range->length); getchar(); } } #endif @@ -509,8 +509,7 @@ printf("media_type: %x\n", pkt.media_type); printf("drive_num: %x\n", pkt.drive_num); printf("device_spec: %x\n", pkt.device_spec); -// printf("press a key->\n"); getc(); //Azi: getchar(); - pause(); + printf("press a key->\n"); getchar(); #endif /* Some BIOSes erroneously return cf = 1 */ @@ -676,7 +675,6 @@ print_drive_info(di); printf("uses_ebios = 0x%x\n", dp->uses_ebios); printf("result %d\n", ret); -// printf("press a key->\n"); getc(); //Azi: getchar(); pause(); #endif Index: branches/azimutz/trunkAutoResolution/i386/libsaio/saio_internal.h =================================================================== --- branches/azimutz/trunkAutoResolution/i386/libsaio/saio_internal.h (revision 1038) +++ branches/azimutz/trunkAutoResolution/i386/libsaio/saio_internal.h (revision 1039) @@ -49,8 +49,6 @@ extern int ebiosEjectMedia(int biosdev); extern void bios_putchar(int ch); extern void putca(int ch, int attr, int repeat); -extern int getc(void); //Azi: getchar(); -extern void pause(); //Azi: replace getc/getchar with ? console.c - btw, what is it doing here ?? there's a console.c section below... extern int readKeyboardStatus(void); extern int readKeyboardShiftFlags(void); extern unsigned int time18(void); @@ -90,14 +88,16 @@ extern bool gVerboseMode; extern bool gErrors; extern void initBooterLog(void); +extern void msglog(const char * format, ...); extern void setupBooterLog(void); extern int putchar(int ch); extern int getchar(void); -extern void msglog(const char * format, ...); extern int printf(const char *format, ...); extern int error(const char *format, ...); extern int verbose(const char *format, ...); extern void stop(const char *format, ...); +//Azi: replace getc/getchar with ? console.c +extern void pause(); /* disk.c */ extern void rescanBIOSDevice(int biosdev); Index: branches/azimutz/trunkAutoResolution/i386/boot2/resume.c =================================================================== --- branches/azimutz/trunkAutoResolution/i386/boot2/resume.c (revision 1038) +++ branches/azimutz/trunkAutoResolution/i386/boot2/resume.c (revision 1039) @@ -119,7 +119,7 @@ printf ("Resuming from Encrypted image is unsupported.\n" "Uncheck \"Use secure virtual memory\" in \"Security\" pane on system preferences.\n" "Press any key to proceed with normal boot.\n"); - getc(); //Azi: getchar(); + getchar(); return; } // depends on NVRAM @@ -143,7 +143,7 @@ if (!((long long)mem_base+allocSize<1024*bootInfo->extmem+0x100000)) { printf ("Not enough space to restore image. Press any key to proceed with normal boot.\n"); - getc(); //Azi: getchar(); + getchar(); return; } Index: branches/azimutz/trunkAutoResolution/i386/boot2/boot.c =================================================================== --- branches/azimutz/trunkAutoResolution/i386/boot2/boot.c (revision 1038) +++ branches/azimutz/trunkAutoResolution/i386/boot2/boot.c (revision 1039) @@ -187,7 +187,7 @@ bool dummyVal; if (getBoolForKey(kWaitForKeypressKey, &dummyVal, &bootInfo->bootConfig) && dummyVal) { printf("Press any key to continue..."); - getc(); //Azi: getchar(); + getchar(); } usb_loop(); @@ -381,7 +381,7 @@ #if DEBUG printf(" Default: %d, ->biosdev: %d, ->part_no: %d ->flags: %d\n", gBootVolume, gBootVolume->biosdev, gBootVolume->part_no, gBootVolume->flags); printf(" bt(0,0): %d, ->biosdev: %d, ->part_no: %d ->flags: %d\n", gBIOSBootVolume, gBIOSBootVolume->biosdev, gBIOSBootVolume->part_no, gBIOSBootVolume->flags); - getc(); //Azi: getchar(); + getchar(); #endif useGUI = true; Index: branches/azimutz/trunkAutoResolution/i386/boot2/modules.c =================================================================== --- branches/azimutz/trunkAutoResolution/i386/boot2/modules.c (revision 1038) +++ branches/azimutz/trunkAutoResolution/i386/boot2/modules.c (revision 1039) @@ -16,7 +16,7 @@ #if CONFIG_MODULE_DEBUG #define DBG(x...) printf(x); -#define DBGPAUSE() getc() // getchar(); +#define DBGPAUSE() getchar() #else #define DBG(x...) #define DBGPAUSE() @@ -86,7 +86,7 @@ else { // The module does not have a valid start function - printf("Unable to start %s\n", SYMBOLS_MODULE); getc(); //Azi: getchar(); + printf("Unable to start %s\n", SYMBOLS_MODULE); getchar(); } } } @@ -185,7 +185,7 @@ else // The module does not have a valid start function. This may be a library. { printf("WARNING: Unable to start %s\n", module); - getc(); //Azi: getchar(); + getchar(); } #else else msglog("WARNING: Unable to start %s\n", module); @@ -304,7 +304,7 @@ #if CONFIG_MODULE_DEBUG printf("Unable to locate symbol %s\n", name); - getc(); //Azi: getchar(); + getchar(); #endif if(strcmp(name, VOID_SYMBOL) == 0) return 0xFFFFFFFF; @@ -370,7 +370,7 @@ else { verbose("Invalid mach magic 0x%X\n", ((struct mach_header*)binary)->magic); - //getc(); //Azi: getchar(); + //getchar(); return NULL; } @@ -379,7 +379,7 @@ /*if(((struct mach_header*)binary)->filetype != MH_DYLIB) { printf("Module is not a dylib. Unable to load.\n"); - getc(); //Azi: getchar(); + getchar(); return NULL; // Module is in the incorrect format }*/ @@ -891,7 +891,7 @@ else { printf("Unable to bind symbol %s\n", symbolName); - getc(); //Azi: getchar(); + getchar(); } segmentAddress += sizeof(void*); @@ -910,7 +910,7 @@ else { printf("Unable to bind symbol %s\n", symbolName); - getc(); //Azi: getchar(); + getchar(); } segmentAddress += tmp + sizeof(void*); @@ -928,7 +928,7 @@ else { printf("Unable to bind symbol %s\n", symbolName); - getc(); //Azi: getchar(); + getchar(); } segmentAddress += (immediate * sizeof(void*)) + sizeof(void*); @@ -953,7 +953,7 @@ else { printf("Unable to bind symbol %s\n", symbolName); - getc(); //Azi: getchar(); + getchar(); } break; } @@ -1085,7 +1085,7 @@ #if CONFIG_MODULE_DEBUG //print_hook_list(); - //getc(); //Azi: getchar(); + //getchar(); #endif } @@ -1133,7 +1133,7 @@ void dyld_stub_binder() { printf("ERROR: dyld_stub_binder was called, should have been take care of by the linker.\n"); - getc(); //Azi: getchar(); + getchar(); } #else /* CONFIG_MODULES */ Index: branches/azimutz/trunkAutoResolution/i386/boot2/gui.c =================================================================== --- branches/azimutz/trunkAutoResolution/i386/boot2/gui.c (revision 1038) +++ branches/azimutz/trunkAutoResolution/i386/boot2/gui.c (revision 1039) @@ -143,11 +143,9 @@ extern MenuItem *menuItems; -char prompt[BOOT_STRING_LEN]; -//extern char gBootArgs[BOOT_STRING_LEN]; //Azi: getchar/prompt stuff +//char prompt[BOOT_STRING_LEN]; +extern char gBootArgs[BOOT_STRING_LEN]; -int prompt_pos = 0; - char prompt_text[] = "boot: "; menuitem_t infoMenuItems[] = @@ -942,8 +940,8 @@ void clearGraphicBootPrompt() { // clear text buffer - prompt[0] = '\0'; //Azi: getchar/prompt stuff - prompt_pos=0; + //prompt[0] = '\0'; + //prompt_pos=0; if( gui.bootprompt.draw == true ) @@ -957,17 +955,8 @@ return; } -void updateGraphicBootPrompt(int key) +void updateGraphicBootPrompt() { - if ( key == kBackspaceKey ) //Azi: getchar/prompt stuff - prompt[--prompt_pos] = '\0'; - else - { - prompt[prompt_pos] = key; - prompt_pos++; - prompt[prompt_pos] = '\0'; - } - fillPixmapWithColor( gui.bootprompt.pixmap, gui.bootprompt.bgcolor); makeRoundedCorners( gui.bootprompt.pixmap); @@ -979,16 +968,8 @@ // get the position of the end of the boot prompt text to display user input position_t p_prompt = pos( p_text.x + ( ( strlen(prompt_text) ) * font_console.chars[0]->width ), p_text.y ); -//Azi: getchar/prompt stuff - // calculate the position of the cursor - int offset = ( prompt_pos - ( ( gui.bootprompt.width / font_console.chars[0]->width ) - strlen(prompt_text) - 2 ) ); - if ( offset < 0) - offset = 0; - - drawStr( prompt+offset, &font_console, gui.bootprompt.pixmap, p_prompt); -// end - drawStr( prompt + offset, &font_console, gui.bootprompt.pixmap, p_prompt); + drawStr( gBootArgs, &font_console, gui.bootprompt.pixmap, p_prompt); gui.menu.draw = false; gui.bootprompt.draw = true; @@ -1612,7 +1593,7 @@ updateVRAM(); - key = getc(); //Azi: getchar(); + key = getchar(); if( key == kUpArrowkey ) if( currentline > 0 ) Index: branches/azimutz/trunkAutoResolution/i386/boot2/gui.h =================================================================== --- branches/azimutz/trunkAutoResolution/i386/boot2/gui.h (revision 1038) +++ branches/azimutz/trunkAutoResolution/i386/boot2/gui.h (revision 1039) @@ -1,22 +1,22 @@ /* - * gui.h - * + * gui.h + * * - * Created by Jasmin Fazlic on 18.12.08. - * Copyright 2008/09 Jasmin Fazlic All rights reserved. - * Copyright 2008/09 iNDi All rights reserved. + * Created by Jasmin Fazlic on 18.12.08. + * Copyright 2008/09 Jasmin Fazlic All rights reserved. + * Copyright 2008/09 iNDi All rights reserved. * */ +#ifndef __BOOT2_GUI_H +#define __BOOT2_GUI_H + #include "boot.h" #include "bootstruct.h" #include "graphics.h" #include "graphic_utils.h" #include "picopng.h" -#ifndef __BOOT2_GUI_H -#define __BOOT2_GUI_H - #define CHARACTERS_COUNT 223 #define BOOT_NORMAL 0 @@ -41,11 +41,11 @@ enum { kBackspaceKey = 0x08, kTabKey = 0x09, - kReturnKey = 0x0d, // '\n', //Azi: r926 + kReturnKey = '\r', kEscapeKey = 0x1b, kUpArrowkey = 0x4800, kDownArrowkey = 0x5000, - kASCIIKeyMask = 0x7f, //Azi: getchar()*** + kASCIIKeyMask = 0x7f, kF2Key = 0x3c00, //Azi:autoresolution kF5Key = 0x3f00, kF10Key = 0x4400 @@ -162,7 +162,7 @@ void showGraphicBootPrompt(); void clearGraphicBootPrompt(); -void updateGraphicBootPrompt(int key); +void updateGraphicBootPrompt(); void updateVRAM(); Index: branches/azimutz/trunkAutoResolution/i386/boot2/ramdisk.c =================================================================== --- branches/azimutz/trunkAutoResolution/i386/boot2/ramdisk.c (revision 1038) +++ branches/azimutz/trunkAutoResolution/i386/boot2/ramdisk.c (revision 1039) @@ -290,7 +290,7 @@ setCursorPosition(0, 0, 1); showInfoRAMDisk(); printf("\n\nPress any key to continue.\n"); - getc(); //Azi: getchar(); + getchar(); setActiveDisplayPage(0); } else @@ -303,7 +303,7 @@ printf("\n?rd m - mount ramdisk image\n?rd u - unmount ramdisk image"); printf("\n?rd e - enable bt(0,0) alias\n?rd d - disable bt(0,0) alias"); printf("\n\nPress any key to continue.\n"); - getc(); //Azi: getchar(); + getchar(); setActiveDisplayPage(0); } } Index: branches/azimutz/trunkAutoResolution/i386/boot2/options.c =================================================================== --- branches/azimutz/trunkAutoResolution/i386/boot2/options.c (revision 1038) +++ branches/azimutz/trunkAutoResolution/i386/boot2/options.c (revision 1039) @@ -158,7 +158,7 @@ } } - if( bootArgs->Video.v_display == GRAPHICS_MODE ) + if( bootArgs->Video.v_display != VGA_TEXT_MODE ) { drawProgressBar( gui.screen.pixmap, 100, gui.progressbar.pos , ( multi * 100 / multi_buff ) ); gui.redraw = true; @@ -174,8 +174,7 @@ //========================================================================== -//char gBootArgs[BOOT_STRING_LEN]; -static char gBootArgs[BOOT_STRING_LEN]; +char gBootArgs[BOOT_STRING_LEN]; static char * gBootArgsPtr = gBootArgs; static char * gBootArgsEnd = gBootArgs + BOOT_STRING_LEN - 1; static char booterCommand[BOOT_STRING_LEN]; @@ -186,7 +185,7 @@ gBootArgsPtr = gBootArgs; memset(gBootArgs, '\0', BOOT_STRING_LEN); - if (bootArgs->Video.v_display == GRAPHICS_MODE) { + if (bootArgs->Video.v_display != VGA_TEXT_MODE) { clearGraphicBootPrompt(); } } @@ -208,13 +207,12 @@ extern char bootPrompt[]; extern char bootRescanPrompt[]; - if ( bootArgs->Video.v_display == VGA_TEXT_MODE ) { -//Azi: getchar/prompt stuff + if( bootArgs->Video.v_display == VGA_TEXT_MODE ) { changeCursor( 0, row, kCursorTypeUnderline, 0 ); clearScreenRows( row, kScreenLastRow ); } - clearBootArgs(); + //clearBootArgs(); if (visible) { if (bootArgs->Video.v_display == VGA_TEXT_MODE) { @@ -222,13 +220,12 @@ printf( bootRescanPrompt ); } else { printf( bootPrompt ); -// printf( gBootArgs ); + printf( gBootArgs ); } } } else { - if (bootArgs->Video.v_display == GRAPHICS_MODE) { - clearGraphicBootPrompt(); -// End + if (bootArgs->Video.v_display != VGA_TEXT_MODE) { +// clearGraphicBootPrompt(); } else { printf("Press Enter to start up the foreign OS. "); } @@ -242,42 +239,41 @@ key &= kASCIIKeyMask; switch ( key ) - { + { case kBackspaceKey: if ( gBootArgsPtr > gBootArgs ) { + *--gBootArgsPtr = '\0'; + int x, y, t; getCursorPositionAndType( &x, &y, &t ); if ( x == 0 && y ) { x = 80; y--; } - if (x) - x--; + if (x) x--; + if( bootArgs->Video.v_display == VGA_TEXT_MODE ) { setCursorPosition( x, y, 0 ); putca(' ', 0x07, 1); -//Azi: getchar/prompt stuff - } else - updateGraphicBootPrompt(kBackspaceKey); - - *gBootArgsPtr-- = '\0'; - } - + } + else + { + updateGraphicBootPrompt(); + } + } break; default: if ( key >= ' ' && gBootArgsPtr < gBootArgsEnd) { - if( bootArgs->Video.v_display == VGA_TEXT_MODE ) - putchar(key); // echo to screen - else - updateGraphicBootPrompt(key); - *gBootArgsPtr++ = key; -// end + *gBootArgsPtr++ = key; + + if( bootArgs->Video.v_display != VGA_TEXT_MODE ) updateGraphicBootPrompt(); + else if ( key >= ' ' && key < 0x7f) putchar(key); } - + break; } } @@ -350,7 +346,7 @@ // Draw the visible items. - if( bootArgs->Video.v_display == GRAPHICS_MODE ) + if( bootArgs->Video.v_display != VGA_TEXT_MODE ) drawDeviceList(gMenuStart, gMenuEnd, gMenuSelection); @@ -387,7 +383,7 @@ if ( gMenuItems == NULL ) return 0; - if( bootArgs->Video.v_display == GRAPHICS_MODE ) + if( bootArgs->Video.v_display != VGA_TEXT_MODE ) { int res; @@ -704,7 +700,7 @@ } // ensure we're in graphics mode if gui is setup - if (gui.initialised && bootArgs->Video.v_display == VGA_TEXT_MODE) + if (firstRun && gui.initialised && bootArgs->Video.v_display == VGA_TEXT_MODE) { setVideoMode(GRAPHICS_MODE, 0); } @@ -872,7 +868,7 @@ } } - if (bootArgs->Video.v_display == GRAPHICS_MODE) { + if (bootArgs->Video.v_display != VGA_TEXT_MODE) { // redraw the background buffer gui.logo.draw = true; drawBackground(); @@ -913,13 +909,13 @@ showBootPrompt( nextRow, showPrompt ); do { - if (bootArgs->Video.v_display == GRAPHICS_MODE) { + if (bootArgs->Video.v_display != VGA_TEXT_MODE) { // redraw background memcpy( gui.backbuffer->pixels, gui.screen.pixmap->pixels, gui.backbuffer->width * gui.backbuffer->height * 4 ); // reset cursor co-ords gui.debug.cursor = pos( gui.screen.width - 160 , 10 ); } - key = getc(); //Azi: getchar(); + key = getchar(); updateMenu( key, (void **) &menuBVR ); newShowPrompt = (gDeviceCount == 0) || (menuBVR->flags & kBVFlagNativeBoot); @@ -950,13 +946,13 @@ * TODO: this needs to be refactored. */ if (strcmp( booterCommand, "video" ) == 0) { - if (bootArgs->Video.v_display == GRAPHICS_MODE) { + if (bootArgs->Video.v_display != VGA_TEXT_MODE) { showInfoBox(getVBEInfoString(), getVBEModeInfoString()); } else { printVBEModeInfo(); } } else if ( strcmp( booterCommand, "memory" ) == 0) { - if (bootArgs->Video.v_display == GRAPHICS_MODE ) { + if (bootArgs->Video.v_display != VGA_TEXT_MODE ) { showInfoBox("Memory Map", getMemoryInfoString()); } else { printMemoryInfo(); @@ -1097,7 +1093,7 @@ // Switch between text & graphic interfaces // Only Permitted if started in graphics interface if (useGUI) { - if (bootArgs->Video.v_display == GRAPHICS_MODE) { + if (bootArgs->Video.v_display != VGA_TEXT_MODE) { setVideoMode(VGA_TEXT_MODE, 0); setCursorPosition(0, 0, 0); @@ -1140,6 +1136,7 @@ // useGUI = true; updateVRAM(); + updateGraphicBootPrompt(); } } key = 0; @@ -1448,7 +1445,7 @@ int line_offset; int c; - if (bootArgs->Video.v_display == GRAPHICS_MODE) { + if (bootArgs->Video.v_display != VGA_TEXT_MODE) { showInfoBox( "Press q to quit\n",buf ); return; } @@ -1491,7 +1488,7 @@ printf("[Type %s%sq to quit viewer]", (line_offset > 0) ? "p for previous page, " : "", (*bp != '\1') ? "space for next page, " : ""); } - c = getc(); //Azi: getchar(); + c = getchar(); if (c == 'q' || c == 'Q') { break; } @@ -1511,7 +1508,7 @@ void showHelp(void) { - if (bootArgs->Video.v_display == GRAPHICS_MODE) { + if (bootArgs->Video.v_display != VGA_TEXT_MODE) { showInfoBox("Help. Press q to quit.\n", (char *)BootHelp_txt); } else { showTextBuffer((char *)BootHelp_txt, BootHelp_txt_len); @@ -1558,7 +1555,7 @@ printf("Typical boot devices are 80 (First HD), 81 (Second HD)\n"); printf("Enter two-digit hexadecimal boot device [%02x]: ", bootdevice); do { - key = getc(); //Azi: getchar(); + key = getchar(); switch (key & kASCIIKeyMask) { case kBackspaceKey: if (digitsI > 0) { @@ -1609,7 +1606,7 @@ bool promptForRescanOption(void) { printf("\nWould you like to enable media rescan option?\nPress ENTER to enable or any key to skip.\n"); - if (getc() == kReturnKey) { //Azi: getchar(); + if (getchar() == kReturnKey) { return true; } else { return false; Index: branches/azimutz/trunkAutoResolution/i386/modules/HelloWorld/HelloWorld.cpp =================================================================== --- branches/azimutz/trunkAutoResolution/i386/modules/HelloWorld/HelloWorld.cpp (revision 1038) +++ branches/azimutz/trunkAutoResolution/i386/modules/HelloWorld/HelloWorld.cpp (revision 1039) @@ -35,7 +35,7 @@ delete obj2; printf("Hello world from ExecKernel hook. Binary located at 0x%X\n", binary); - getc(); //Azi: getchar(); ?? + getchar(); } void HelloWorld_start() Index: branches/azimutz/trunkAutoResolution/i386/libsa/libsa.h =================================================================== --- branches/azimutz/trunkAutoResolution/i386/libsa/libsa.h (revision 1038) +++ branches/azimutz/trunkAutoResolution/i386/libsa/libsa.h (revision 1039) @@ -93,7 +93,7 @@ extern int strncmp(const char * s1, const char * s2, size_t n); extern char * strcpy(char * s1, const char * s2); extern char * strncpy(char * s1, const char * s2, size_t n); -extern size_t strlcpy(char * s1, const char * s2, size_t n); //Azi: ?? check! +extern size_t strlcpy(char * s1, const char * s2, size_t n); extern char * strstr(const char *in, const char *str); extern int atoi(const char * str); extern int ptol(const char * str); Index: branches/azimutz/trunkAutoResolution/i386/libsa/string.c =================================================================== --- branches/azimutz/trunkAutoResolution/i386/libsa/string.c (revision 1038) +++ branches/azimutz/trunkAutoResolution/i386/libsa/string.c (revision 1039) @@ -166,7 +166,7 @@ } size_t -strlcpy(char * s1, const char * s2, size_t n) //Azi: libsa.h +strlcpy(char * s1, const char * s2, size_t n) { while (n && (*s1++ = *s2++)) n--; Index: branches/azimutz/trunkAutoResolution/i386/util/fdisk/misc.c =================================================================== --- branches/azimutz/trunkAutoResolution/i386/util/fdisk/misc.c (revision 1038) +++ branches/azimutz/trunkAutoResolution/i386/util/fdisk/misc.c (revision 1039) @@ -142,9 +142,9 @@ printf("%s [%c] ", str, default_answer ? 'y' : 'n'); fflush(stdout); - first = ch = getchar(); //Azi: what about these ? + first = ch = getchar(); while (ch != '\n' && ch != EOF) - ch = getchar(); //Azi: not messing them :P + ch = getchar(); if (ch == EOF || first == EOF) errx(1, "eof"); Index: branches/azimutz/trunkAutoResolution/package/smbios.plist =================================================================== --- branches/azimutz/trunkAutoResolution/package/smbios.plist (revision 1038) +++ branches/azimutz/trunkAutoResolution/package/smbios.plist (revision 1039) @@ -4,7 +4,7 @@ SMbiosversion MP31.88Z.00C1.B00.0802091544 - SMmanufacter + SMmanufacturer Apple Inc. SMproductname MacPro3,1 @@ -20,25 +20,25 @@ 19 SMmemspeed 800 - SMmemmanufacter_1 + SMmemmanufacturer_1 0xAD00000000000000 SMmemserial_1 0x00001020 SMmempart_1 0x48594D503131325336344350362D59352020 - SMmemmanufacter_2 + SMmemmanufacturer_2 0xAD00000000000000 SMmemserial_2 0x00003021 SMmempart_2 0x48594D503131325336344350362D59352020 - SMmemmanufacter_3 + SMmemmanufacturer_3 0xAD00000000000000 SMmemserial_3 0x00003021 SMmempart_3 0x48594D503131325336344350362D59352020 - SMmemmanufacter_4 + SMmemmanufacturer_4 0xAD00000000000000 SMmemserial_4 0x00003021 @@ -46,3 +46,16 @@ 0x48594D503131325336344350362D59352020 + Index: branches/azimutz/trunkAutoResolution/CHANGES =================================================================== --- branches/azimutz/trunkAutoResolution/CHANGES (revision 1038) +++ branches/azimutz/trunkAutoResolution/CHANGES (revision 1039) @@ -4,6 +4,7 @@ number of bytes for boot2. - Added new ATi/AMD Graphics Card Enabler. - Added new SMBIOS patcher. + Includes changes to "manufacter" keys, from SM*manufacter to SM*manufacturer. - Added module system. - Added automatic P-States & C-States generation for native power management. - Added Booter Log Dump Tool Property changes on: branches/azimutz/trunkAutoResolution ___________________________________________________________________ Modified: svn:mergeinfo Merged /trunk:r1022-1038