From 6fce8b8bf48a2c88a2477b3ac7c1b05e78b431f9 Mon Sep 17 00:00:00 2001 From: headkaze Date: Sun, 17 Jan 2021 20:11:03 -0500 Subject: [PATCH] Add default EDID for Apple displays --- Hackintool.xcodeproj/project.pbxproj | 8 +-- Hackintool/FixEDID.m | 86 +++++++++++++++++++++++++++- 2 files changed, 89 insertions(+), 5 deletions(-) diff --git a/Hackintool.xcodeproj/project.pbxproj b/Hackintool.xcodeproj/project.pbxproj index 5e8c8371..119ad1ea 100644 --- a/Hackintool.xcodeproj/project.pbxproj +++ b/Hackintool.xcodeproj/project.pbxproj @@ -717,7 +717,7 @@ CODE_SIGN_INJECT_BASE_ENTITLEMENTS = NO; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 0350; + CURRENT_PROJECT_VERSION = 0351; DEVELOPMENT_TEAM = 5LGHPJM9ZR; ENABLE_HARDENED_RUNTIME = YES; ENABLE_STRICT_OBJC_MSGSEND = NO; @@ -732,7 +732,7 @@ INFOPLIST_FILE = "Hackintool/Hackintool-Info.plist"; LD_RUNPATH_SEARCH_PATHS = "@loader_path/../Frameworks @executable_path/../Frameworks"; MACOSX_DEPLOYMENT_TARGET = 10.9; - MARKETING_VERSION = 3.5.0; + MARKETING_VERSION = 3.5.1; PRODUCT_BUNDLE_IDENTIFIER = com.Headsoft.Hackintool; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -753,7 +753,7 @@ CODE_SIGN_INJECT_BASE_ENTITLEMENTS = NO; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 0350; + CURRENT_PROJECT_VERSION = 0351; DEVELOPMENT_TEAM = 5LGHPJM9ZR; ENABLE_HARDENED_RUNTIME = YES; ENABLE_STRICT_OBJC_MSGSEND = NO; @@ -768,7 +768,7 @@ INFOPLIST_FILE = "Hackintool/Hackintool-Info.plist"; LD_RUNPATH_SEARCH_PATHS = "@loader_path/../Frameworks @executable_path/../Frameworks"; MACOSX_DEPLOYMENT_TARGET = 10.9; - MARKETING_VERSION = 3.5.0; + MARKETING_VERSION = 3.5.1; PRODUCT_BUNDLE_IDENTIFIER = com.Headsoft.Hackintool; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; diff --git a/Hackintool/FixEDID.m b/Hackintool/FixEDID.m index 6acdc837..521275c8 100755 --- a/Hackintool/FixEDID.m +++ b/Hackintool/FixEDID.m @@ -40,6 +40,14 @@ const uint8_t iMac_Serial[10] = { 0x06, 0x10, 0x12, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x16 }; const uint8_t iMac_Chroma[10] = { 0x6f, 0xb1, 0xa7, 0x55, 0x4c, 0x9e, 0x25, 0x0c, 0x50, 0x54 }; const uint8_t iMac_Details_Name[18] = { 0x00, 0x00, 0x00, 0xfc, 0x00, 0x69, 0x4d, 0x61, 0x63, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20 }; +const uint8_t iMac_EDID[256] = { 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x06, 0x10, 0x12, 0xa0, 0x00, 0x00, 0x00, 0x00, + 0x1c, 0x16, 0x01, 0x04, 0xb5, 0x30, 0x1b, 0x78, 0x22, 0x6f, 0xb1, 0xa7, 0x55, 0x4c, 0x9e, 0x25, + 0x0c, 0x50, 0x54, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, + 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x1a, 0x36, 0x80, 0xa0, 0x70, 0x38, 0x1f, 0x40, 0x30, 0x20, + 0x35, 0x00, 0xdb, 0x0b, 0x11, 0x00, 0x00, 0x1a, 0x8d, 0x0e, 0xc0, 0xa0, 0x30, 0x1c, 0x10, 0x20, + 0x30, 0x20, 0x35, 0x00, 0xdb, 0x0b, 0x11, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x69, + 0x4d, 0x61, 0x63, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xe7 }; uint32_t iMacVendorID = 0x0610; uint32_t iMacProductID = 0xA012; @@ -53,6 +61,14 @@ const uint8_t iMacRetina_Serial[10] = { 0x06, 0x10, 0x05, 0xb0, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x16 }; const uint8_t iMacRetina_Chroma[10] = { 0x6f, 0xb1, 0xa7, 0x55, 0x4c, 0x9e, 0x25, 0x0c, 0x50, 0x54 }; const uint8_t iMacRetina_Details_Name[18] = { 0x00, 0x00, 0x00, 0xfc, 0x00, 0x69, 0x4d, 0x61, 0x63, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20 }; +const uint8_t iMacRetina_EDID[128] = { 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x06, 0x10, 0x05, 0xb0, 0x00, 0x00, 0x00, 0x00, + 0x1c, 0x16, 0x01, 0x04, 0xb5, 0x3c, 0x22, 0x78, 0x22, 0x6f, 0xb1, 0xa7, 0x55, 0x4c, 0x9e, 0x25, + 0x0c, 0x50, 0x54, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, + 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x56, 0x5e, 0x00, 0xa0, 0xa0, 0xa0, 0x29, 0x50, 0x30, 0x20, + 0x35, 0x00, 0x55, 0x50, 0x21, 0x00, 0x00, 0x1a, 0x1a, 0x1d, 0x00, 0x80, 0x51, 0xd0, 0x1c, 0x20, + 0x40, 0x80, 0x35, 0x00, 0x55, 0x50, 0x21, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x69, + 0x4d, 0x61, 0x63, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x8e }; uint32_t iMacRetinaVendorID = 0x0610; uint32_t iMacRetinaProductID = 0xB005; @@ -62,6 +78,14 @@ const uint8_t MBP_Serial[10] = { 0x06, 0x10, 0x14, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x16 }; const uint8_t MBP_Chroma[10] = { 0x6f, 0xb1, 0xa7, 0x55, 0x4c, 0x9e, 0x25, 0x0c, 0x50, 0x54 }; const uint8_t MBP_Details_Name[18] = { 0x00, 0x00, 0x00, 0xfc, 0x00, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x4c, 0x43, 0x44, 0x0a, 0x20, 0x20, 0x20 }; +const uint8_t MBP_EDID[128] = { 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x06, 0x10, 0x14, 0xa0, 0x00, 0x00, 0x00, 0x00, + 0x0a, 0x16, 0x01, 0x04, 0xa5, 0x1d, 0x12, 0x78, 0x02, 0x6f, 0xb1, 0xa7, 0x55, 0x4c, 0x9e, 0x25, + 0x0c, 0x50, 0x54, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, + 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0xe2, 0x68, 0x00, 0xa0, 0xa0, 0x40, 0x2e, 0x60, 0x30, 0x20, + 0x36, 0x00, 0x1e, 0xb3, 0x10, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x43, 0x6f, 0x6c, + 0x6f, 0x72, 0x20, 0x4c, 0x43, 0x44, 0x0a, 0x20, 0x20, 0x20, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x8d }; uint32_t MBPVendorID = 0x0610; uint32_t MBPProductID = 0xA014; @@ -71,6 +95,14 @@ const uint8_t MBA_Serial[10] = { 0x06, 0x10, 0xf2, 0x9c, 0x00, 0x00, 0x00, 0x00, 0x1a, 0x15 }; const uint8_t MBA_Chroma[10] = { 0xef, 0x05, 0x97, 0x57, 0x54, 0x92, 0x27, 0x22, 0x50, 0x54 }; const uint8_t MBA_Details_Name[18] = { 0x00, 0x00, 0x00, 0xfc, 0x00, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x4c, 0x43, 0x44, 0x0a, 0x20, 0x20, 0x20 }; +const uint8_t MBA_EDID[128] = { 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x06, 0x10, 0xf2, 0x9c, 0x00, 0x00, 0x00, 0x00, + 0x1a, 0x15, 0x01, 0x04, 0x95, 0x1a, 0x0e, 0x78, 0x02, 0xef, 0x05, 0x97, 0x57, 0x54, 0x92, 0x27, + 0x22, 0x50, 0x54, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, + 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x20, 0x1c, 0x56, 0x86, 0x50, 0x00, 0x20, 0x30, 0x0e, 0x38, + 0x13, 0x00, 0x00, 0x90, 0x10, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x4c, + 0x50, 0x31, 0x31, 0x36, 0x57, 0x48, 0x34, 0x2d, 0x54, 0x4a, 0x41, 0x33, 0x00, 0x00, 0x00, 0xfc, + 0x00, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x4c, 0x43, 0x44, 0x0a, 0x20, 0x20, 0x20, 0x00, 0xbd }; uint32_t MBAVendorID = 0x0610; uint32_t MBAProductID = 0x9CF2; @@ -81,6 +113,14 @@ const uint8_t CHD_Chroma[10] = { 0xfe, 0x87, 0xa3, 0x57, 0x4a, 0x9c, 0x25, 0x13, 0x50, 0x54 }; const uint8_t CHD_Details_Name[18] = { 0x00, 0x00, 0x00, 0xfc, 0x00, 0x43, 0x69, 0x6e, 0x65, 0x6d, 0x61, 0x20, 0x48, 0x44, 0x0a, 0x00, 0x00, 0x00 }; const uint8_t CHD_Details_Serial[18] = { 0x00, 0x00, 0x00, 0xff, 0x00, 0x43, 0x59, 0x36, 0x34, 0x32, 0x30, 0x5a, 0x36, 0x55, 0x47, 0x31, 0x0a, 0x00 }; +const uint8_t CHD_EDID[128] = { 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x06, 0x10, 0x32, 0x92, 0xbe, 0x70, 0x00, 0x02, + 0x20, 0x10, 0x01, 0x03, 0x80, 0x40, 0x28, 0x78, 0x28, 0xfe, 0x87, 0xa3, 0x57, 0x4a, 0x9c, 0x25, + 0x13, 0x50, 0x54, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, + 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0xbc, 0x1b, 0x00, 0xa0, 0x50, 0x20, 0x17, 0x30, 0x30, 0x20, + 0x36, 0x00, 0x81, 0x91, 0x21, 0x00, 0x00, 0x1a, 0xb0, 0x68, 0x00, 0xa0, 0xa0, 0x40, 0x2e, 0x60, + 0x30, 0x20, 0x36, 0x00, 0x81, 0x91, 0x21, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, 0xff, 0x00, 0x43, + 0x59, 0x36, 0x33, 0x32, 0x31, 0x35, 0x55, 0x55, 0x47, 0x31, 0x0a, 0x00, 0x00, 0x00, 0x00, 0xfc, + 0x00, 0x43, 0x69, 0x6e, 0x65, 0x6d, 0x61, 0x20, 0x48, 0x44, 0x0a, 0x00, 0x00, 0x00, 0x01, 0x2d }; uint32_t CHDVendorID = 0x0610; uint32_t CHDProductID = 0x9232; @@ -96,6 +136,14 @@ const uint8_t TDB_Chroma[10] = { 0x6f, 0xb1, 0xa7, 0x55, 0x4c, 0x9e, 0x25, 0x0c, 0x50, 0x54 }; const uint8_t TDB_Details_Name[18] = { 0x00, 0x00, 0x00, 0xfc, 0x00, 0x54, 0x68, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x62, 0x6f, 0x6c, 0x74, 0x0a, 0x20 }; const uint8_t TDB_Details_Serial[18] = { 0x00, 0x00, 0x00, 0xff, 0x00, 0x43, 0x30, 0x32, 0x4a, 0x39, 0x30, 0x30, 0x58, 0x46, 0x32, 0x47, 0x43, 0x0a }; +const uint8_t TDB_EDID[128] = { 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x06, 0x10, 0x27, 0x92, 0x66, 0x0d, 0x0a, 0x19, + 0x0a, 0x19, 0x01, 0x04, 0xb5, 0x3c, 0x22, 0x78, 0x22, 0x6f, 0xb1, 0xa7, 0x55, 0x4c, 0x9e, 0x25, + 0x0c, 0x50, 0x54, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, + 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x56, 0x5e, 0x00, 0xa0, 0xa0, 0xa0, 0x29, 0x50, 0x30, 0x20, + 0x35, 0x00, 0x55, 0x50, 0x21, 0x00, 0x00, 0x1a, 0x1a, 0x1d, 0x00, 0x80, 0x51, 0xd0, 0x1c, 0x20, + 0x40, 0x80, 0x35, 0x00, 0x55, 0x50, 0x21, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0xff, 0x00, 0x43, + 0x30, 0x32, 0x50, 0x43, 0x32, 0x59, 0x57, 0x46, 0x32, 0x47, 0x43, 0x0a, 0x00, 0x00, 0x00, 0xfc, + 0x00, 0x54, 0x68, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x62, 0x6f, 0x6c, 0x74, 0x0a, 0x20, 0x01, 0xad }; uint32_t TDBVendorID = 0x0610; uint32_t TDBProductID = 0x9227; @@ -106,6 +154,14 @@ const uint8_t LED_Chroma[10] = { 0x6e, 0xa1, 0xa7, 0x55, 0x4c, 0x9d, 0x25, 0x0e, 0x50, 0x54 }; const uint8_t LED_Details_Name[18] = { 0x00, 0x00, 0x00, 0xfc, 0x00, 0x4c, 0x45, 0x44, 0x20, 0x43, 0x69, 0x6e, 0x65, 0x6d, 0x61, 0x0a, 0x20, 0x20 }; const uint8_t LED_Details_Serial[18] = { 0x00, 0x00, 0x00, 0xff, 0x00, 0x32, 0x41, 0x39, 0x30, 0x33, 0x34, 0x31, 0x5a, 0x30, 0x4b, 0x30, 0x0a, 0x20 }; +const uint8_t LED_EDID[128] = { 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x06, 0x10, 0x36, 0x92, 0x89, 0x70, 0x73, 0x02, + 0x25, 0x13, 0x01, 0x04, 0xa5, 0x34, 0x20, 0x78, 0x26, 0x6e, 0xa1, 0xa7, 0x55, 0x4c, 0x9d, 0x25, + 0x0e, 0x50, 0x54, 0x00, 0x00, 0x00, 0xd1, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, + 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x28, 0x3c, 0x80, 0xa0, 0x70, 0xb0, 0x23, 0x40, 0x30, 0x20, + 0x36, 0x00, 0x06, 0x44, 0x21, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, 0xff, 0x00, 0x32, 0x41, 0x39, + 0x33, 0x37, 0x32, 0x35, 0x54, 0x30, 0x4b, 0x30, 0x0a, 0x20, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x4c, + 0x45, 0x44, 0x20, 0x43, 0x69, 0x6e, 0x65, 0x6d, 0x61, 0x0a, 0x20, 0x20, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xfc }; uint32_t LEDVendorID = 0x0610; uint32_t LEDProductID = 0x9236; @@ -700,7 +756,35 @@ + (void)makeEDIDFiles:(Display *)display [FixEDID getEDIDData:display edidData:&edidData]; if (edidData == nil) - return; + { + switch(display.eDIDIndex) + { + case 0: // Display + edidData = [NSData dataWithBytes:iMacRetina_EDID length:128]; + break; + case 2: // iMac + edidData = [NSData dataWithBytes:iMac_EDID length:128]; + break; + case 3: // RetinaiMac + edidData = [NSData dataWithBytes:iMacRetina_EDID length:128]; + break; + case 4: // MacbookPro + edidData = [NSData dataWithBytes:MBP_EDID length:128]; + break; + case 5: // MacbookAir + edidData = [NSData dataWithBytes:MBA_EDID length:128]; + break; + case 6: // CinemaHD + edidData = [NSData dataWithBytes:CHD_EDID length:128]; + break; + case 7: // Thunderbolt + edidData = [NSData dataWithBytes:TDB_EDID length:128]; + break; + case 8: // LEDCinema + edidData = [NSData dataWithBytes:LED_EDID length:128]; + break; + } + } switch(display.eDIDIndex) {