Index: branches/ErmaC/Trunk/i386/libsaio/bootstruct.c =================================================================== --- branches/ErmaC/Trunk/i386/libsaio/bootstruct.c (revision 1819) +++ branches/ErmaC/Trunk/i386/libsaio/bootstruct.c (revision 1820) @@ -110,7 +110,7 @@ reserveKernBootStruct(void) { if ((gMacOSVersion[0] == '1') && (gMacOSVersion[1] == '0') - && (gMacOSVersion[2] == '.') && (gMacOSVersion[3] == '7')) + && (gMacOSVersion[2] == '.') && ((gMacOSVersion[3] == '7') || (gMacOSVersion[3] == '8'))) { void *oldAddr = bootArgs; bootArgs = (boot_args *)AllocateKernelMemory(sizeof(boot_args)); Index: branches/ErmaC/Trunk/i386/libsaio/ati.c =================================================================== --- branches/ErmaC/Trunk/i386/libsaio/ati.c (revision 1819) +++ branches/ErmaC/Trunk/i386/libsaio/ati.c (revision 1820) @@ -492,7 +492,7 @@ { 0x6899, 0xE140174B, CHIP_FAMILY_CYPRESS, "ATI Radeon HD 5850", kUakari }, - { 0x6899, 0xE174174B, CHIP_FAMILY_CYPRESS, "ATI Sapphire Radeon HD 5850", kUakari }, + { 0x6899, 0xE174174B, CHIP_FAMILY_CYPRESS, "ATI Sapphire Radeon HD 5850", kUakari }, { 0x6899, 0x200A1787, CHIP_FAMILY_CYPRESS, "ATI Radeon HD 5850", kUakari }, { 0x6899, 0x22901787, CHIP_FAMILY_CYPRESS, "ATI Radeon HD 5850", kUakari }, @@ -676,6 +676,7 @@ { 0x6758, 0xE1941746, CHIP_FAMILY_TURKS, "AMD Radeon HD 6670", kBulrushes }, + { 0x6759, 0x20121787, CHIP_FAMILY_TURKS, "AMD Radeon HD 6570", kPithecia }, // ErmaC { 0x6759, 0xE193174B, CHIP_FAMILY_TURKS, "AMD Radeon HD 6570", kNull }, { 0x6760, 0x04CC1028, CHIP_FAMILY_CAICOS, "AMD Radeon HD 6490M", kNull }, @@ -687,9 +688,9 @@ { 0x6760, 0x1CB21043, CHIP_FAMILY_CAICOS, "AMD Radeon HD 6470M", kNull }, { 0x6779, 0x64501092, CHIP_FAMILY_CAICOS, "AMD Radeon HD 6450", kBulrushes }, + { 0x6779, 0xE164174B, CHIP_FAMILY_CAICOS, "AMD Radeon HD 6450", kBulrushes }, + { 0x6779, 0xE180174B, CHIP_FAMILY_CAICOS, "AMD Radeon HD 6450", kPithecia }, // ErmaC - { 0x6779, 0xE164174B, CHIP_FAMILY_CAICOS, "AMD Radeon HD 6450", kBulrushes }, - /* standard/default models */ { 0x9400, 0x00000000, CHIP_FAMILY_R600, "ATI Radeon HD 2900 XT", kNull }, { 0x9405, 0x00000000, CHIP_FAMILY_R600, "ATI Radeon HD 2900 GT", kNull }, Index: branches/ErmaC/Trunk/i386/boot0/boot0hfs.s =================================================================== --- branches/ErmaC/Trunk/i386/boot0/boot0hfs.s (revision 1819) +++ branches/ErmaC/Trunk/i386/boot0/boot0hfs.s (revision 1820) @@ -60,6 +60,11 @@ VERBOSE EQU CONFIG_BOOT0_VERBOSE ; +; Set to 1 to enable unstretch mode +; +UNSTRETCH EQU CONFIG_BOOT0_UNSTRETCH + +; ; Various constants. ; kBoot0Segment EQU 0x0000 @@ -230,6 +235,10 @@ call print_hex %endif +%if UNSTRETCH + call disable_scaler +%endif + ; ; Since this code may not always reside in the MBR, always start by ; loading the MBR to kMBRBuffer and LBA1 to kGPTBuffer. @@ -619,7 +628,7 @@ ; DS:SI = pointer to Disk Address Packet ; ; Returns: - ; AH = return status (sucess is 0) + ; AH = return status (success is 0) ; carry = 0 success ; 1 error ; @@ -758,13 +767,29 @@ ret %endif ;DEBUG - +%if UNSTRETCH ;-------------------------------------------------------------------------- +; Disable On-Chip Scaling for nVidia Cards +; +disable_scaler: + mov ax,4F14h ;VESA VBE OEM function + mov bl,2 ;Subfunction 02 = Set Panel Expansion/Centering + mov bh,1 ;00 = Return Current Setting, 01 = Set Centering/Expansion + mov cx,0001h ;Exp. mode: 00 = Scaled, 01 = Centered 1:1, 02 = Left Corner 1:1 + int 10h ;call VGA/VBE service + LogString(nv_scaler_str) + ret +%endif +;-------------------------------------------------------------------------- ; NULL terminated strings. ; log_title_str db 10, 13, 'boot0: ', 0 boot_error_str db 'error', 0 +%if UNSTRETCH +nv_scaler_str db 'Unstretch', 0 +%endif ;DEBUG + %if VERBOSE gpt_str db 'GPT', 0 test_str db 'test', 0 Index: branches/ErmaC/Trunk/i386/boot2/boot.c =================================================================== --- branches/ErmaC/Trunk/i386/boot2/boot.c (revision 1819) +++ branches/ErmaC/Trunk/i386/boot2/boot.c (revision 1820) @@ -196,7 +196,7 @@ finalizeBootStruct(); // Jump to kernel's entry point. There's no going back now. - if (checkOSVersion("10.7")) { + if ((checkOSVersion("10.7")) || (checkOSVersion("10.8"))) { // Notify modules that the kernel is about to be started execute_hook("Kernel Start", (void*)kernelEntry, (void*)bootArgs, NULL, NULL); @@ -230,10 +230,10 @@ if (cacheFile[0] != 0) strlcpy(kernelCacheFile, cacheFile, sizeof(kernelCacheFile)); else { - // Lion prelink kernel cache file - if (checkOSVersion("10.7")) { + // Mountain Lion and Lion prelink kernel cache file + if ((checkOSVersion("10.7")) || (checkOSVersion("10.8"))) { sprintf(kernelCacheFile, "%skernelcache", kDefaultCachePathSnow); - } + } // Snow Leopard prelink kernel cache file else if (checkOSVersion("10.6")) { sprintf(kernelCacheFile, "kernelcache_%s", (archCpuType == CPU_TYPE_I386) @@ -330,7 +330,7 @@ // Since the kernel cache file exists and is the most recent try to load it verbose("Loading kernel cache %s\n", kernelCachePath); - if (checkOSVersion("10.7")) { + if ((checkOSVersion("10.7")) || (checkOSVersion("10.8"))) { ret = LoadThinFatFile(kernelCachePath, binary); } else { ret = LoadFile(kernelCachePath); @@ -605,9 +605,9 @@ verbose("Loading Darwin %s\n", gMacOSVersion); - // If boot from boot helper partitions and OS is Lion use prelink kernel. + // If boot from boot helper partitions and OS is Mountain Lion or Lion use prelink kernel. // We need to find a solution to load extra mkext with a prelink kernel. - if (gBootVolume->flags & kBVFlagBooter && checkOSVersion("10.7")) + if (gBootVolume->flags & kBVFlagBooter && ((checkOSVersion("10.7")) || (checkOSVersion("10.8")))) useKernelCache = true; else useKernelCache = false; // by default don't use prelink kernel cache Index: branches/ErmaC/Trunk/i386/boot2/gui.c =================================================================== --- branches/ErmaC/Trunk/i386/boot2/gui.c (revision 1819) +++ branches/ErmaC/Trunk/i386/boot2/gui.c (revision 1820) @@ -43,6 +43,8 @@ iDeviceGeneric_o, iDeviceHFS, iDeviceHFS_o, + iDeviceHFS_Mountain, + iDeviceHFS_Mountain_o, iDeviceHFS_Lion, iDeviceHFS_Lion_o, iDeviceHFS_SL, @@ -53,6 +55,8 @@ iDeviceHFS_Tiger_o, iDeviceHFSRAID, iDeviceHFSRAID_o, + iDeviceHFSRAID_Mountain, + iDeviceHFSRAID_Mountain_o, iDeviceHFSRAID_Lion, iDeviceHFSRAID_Lion_o, iDeviceHFSRAID_SL, @@ -116,6 +120,8 @@ {.name = "device_hfsplus_o", .image = NULL}, {.name = "device_hfsplus_lion", .image = NULL}, {.name = "device_hfsplus_lion_o", .image = NULL}, + {.name = "device_hfsplus_mountain", .image = NULL}, + {.name = "device_hfsplus_mountain_o", .image = NULL}, {.name = "device_hfsplus_sl", .image = NULL}, {.name = "device_hfsplus_sl_o", .image = NULL}, {.name = "device_hfsplus_leo", .image = NULL}, @@ -125,14 +131,16 @@ {.name = "device_hfsraid", .image = NULL}, {.name = "device_hfsraid_o", .image = NULL}, - {.name = "device_hfsraid_lion", .image = NULL}, - {.name = "device_hfsraid_lion_o", .image = NULL}, - {.name = "device_hfsraid_sl", .image = NULL}, - {.name = "device_hfsraid_sl_o", .image = NULL}, - {.name = "device_hfsraid_leo", .image = NULL}, - {.name = "device_hfsraid_leo_o", .image = NULL}, - {.name = "device_hfsraid_tiger", .image = NULL}, - {.name = "device_hfsraid_tiger_o", .image = NULL}, + {.name = "device_hfsraid_lion", .image = NULL}, + {.name = "device_hfsraid_lion_o", .image = NULL}, + {.name = "device_hfsraid_mountain", .image = NULL}, + {.name = "device_hfsraid_mountain_o", .image = NULL}, + {.name = "device_hfsraid_sl", .image = NULL}, + {.name = "device_hfsraid_sl_o", .image = NULL}, + {.name = "device_hfsraid_leo", .image = NULL}, + {.name = "device_hfsraid_leo_o", .image = NULL}, + {.name = "device_hfsraid_tiger", .image = NULL}, + {.name = "device_hfsraid_tiger_o", .image = NULL}, {.name = "device_ext3", .image = NULL}, {.name = "device_ext3_o", .image = NULL}, {.name = "device_freebsd", .image = NULL}, /* FreeBSD/OpenBSD detection,nawcom's code by valv, Icon credits to blackosx */ @@ -366,6 +374,8 @@ LOADPNG(device_hfsplus_o, iDeviceHFS); LOADPNG(device_hfsplus_lion, iDeviceHFS_Lion); LOADPNG(device_hfsplus_lion_o, iDeviceHFS_Lion_o); + LOADPNG(device_hfsplus_mountain, iDeviceHFS_Mountain); + LOADPNG(device_hfsplus_mountain_o, iDeviceHFS_Mountain_o); LOADPNG(device_hfsplus_sl, iDeviceHFS_SL); LOADPNG(device_hfsplus_sl_o, iDeviceHFS_SL_o); LOADPNG(device_hfsplus_leo, iDeviceHFS_Leo); @@ -377,6 +387,8 @@ LOADPNG(device_hfsraid_o, iDeviceHFSRAID); LOADPNG(device_hfsraid_lion, iDeviceHFSRAID_Lion); LOADPNG(device_hfsraid_lion_o, iDeviceHFSRAID_Lion_o); + LOADPNG(device_hfsraid_mountain, iDeviceHFSRAID_Mountain); + LOADPNG(device_hfsraid_mountain_o, iDeviceHFSRAID_Mountain_o); LOADPNG(device_hfsraid_sl, iDeviceHFSRAID_SL); LOADPNG(device_hfsraid_sl_o, iDeviceHFSRAID_SL_o); LOADPNG(device_hfsraid_leo, iDeviceHFSRAID_Leo); @@ -893,6 +905,9 @@ if (device->flags & kBVFlagBooter) { switch (device->OSVersion[3]) { + case '8': + devicetype = is_image_loaded(iDeviceHFSRAID_Mountain) ? iDeviceHFSRAID_Mountain : is_image_loaded(iDeviceHFSRAID) ? iDeviceHFSRAID : iDeviceGeneric; + break; case '7': devicetype = is_image_loaded(iDeviceHFSRAID_Lion) ? iDeviceHFSRAID_Lion : is_image_loaded(iDeviceHFSRAID) ? iDeviceHFSRAID : iDeviceGeneric; break; @@ -915,6 +930,9 @@ { switch (device->OSVersion[3]) { + case '8': + devicetype = is_image_loaded(iDeviceHFS_Mountain) ? iDeviceHFS_Mountain : is_image_loaded(iDeviceHFS) ? iDeviceHFS : iDeviceGeneric; + break; case '7': devicetype = is_image_loaded(iDeviceHFS_Lion) ? iDeviceHFS_Lion : is_image_loaded(iDeviceHFS) ? iDeviceHFS : iDeviceGeneric; break;