Chameleon

Chameleon Commit Details

Date:2013-06-11 14:18:58 (6 years 8 days ago)
Author:ErmaC
Commit:2245
Parents: 2244
Message:- Add boot support to 10.9 (thx old napalm) - Update gui Icons OS detection (ErmaC) - Update default theme Icon set (thx BlackOsx)
Changes:
A/trunk/artwork/themes/default/device_hfsraid_mav_o.png
A/trunk/artwork/themes/default/device_hfsraid_mav.png
A/trunk/artwork/themes/default/device_hfsfusion_mav_o.png
A/trunk/artwork/themes/default/device_hfsplus_mav_o.png
A/trunk/artwork/themes/default/device_hfsfusion_mav.png
A/trunk/artwork/themes/default/device_hfsplus_mav.png
M/trunk/i386/boot2/boot.c
M/trunk/i386/boot2/gui.c
M/trunk/i386/libsaio/nvidia.c
M/trunk/i386/libsaio/ati.c

File differences

trunk/i386/libsaio/nvidia.c
19061906
19071907
19081908
1909
19091910
19101911
19111912
......
20502051
20512052
20522053
2053
2054
20542055
20552056
20562057
else
{
printf("ERROR: unable to open nVidia Video BIOS File %s\n", nvFilename);
free(rom);
return false;
}
}
}
}
}
sprintf(biosVersion, "%s", (nvBiosOveride > 0) ? nvFilename : version_str);
sprintf(kNVCAP, "NVCAP_%04x", nvda_dev->device_id);
trunk/i386/libsaio/ati.c
19501950
19511951
19521952
1953
19531954
1955
19541956
19551957
19561958
......
19641966
19651967
19661968
1969
19671970
1971
19681972
19691973
19701974
......
20082012
20092013
20102014
2015
20112016
2017
20122018
20132019
20142020
......
21232129
21242130
21252131
2132
21262133
2134
21272135
21282136
21292137
......
21392147
21402148
21412149
2142
2150
21432151
21442152
21452153
verbose(" @0x%x\n", rom_addr);
}
else
{
rom_addr = (option_rom_header_t *)0xc0000;
}
if (!validate_rom(rom_addr, card->pci_dev))
{
card->rom = malloc(card->rom_size);
if (!card->rom)
{
return false;
}
memcpy(card->rom, (void *)rom_addr, card->rom_size);
// wait for SPLL_CHG_STATUS to change to 1
cg_spll_status = 0;
while (!(cg_spll_status & R600_SPLL_CHG_STATUS))
{
cg_spll_status = RegRead32(R600_CG_SPLL_STATUS);
}
RegWrite32(R600_ROM_CNTL, (rom_cntl & ~R600_SCK_OVERWRITE));
}
}
for (offset = 0; offset < 0x100; offset += 4)
{
config_space[offset / 4] = pci_config_read32(card->pci_dev->dev.addr, offset);
}
devprop_add_value(card->device, "ATY,PCIConfigSpace", config_space, 0x100);
free(config_space);
charname_parent[24];
inti;
intn_ports = 0;
card = malloc(sizeof(card_t));
if (!card)
{
trunk/i386/boot2/boot.c
198198
199199
200200
201
202
201
202
203
203204
204205
205206
......
238239
239240
240241
242
241243
242
243
244
244
245
246
247
248
249
245250
246251
247252
finalizeBootStruct();
// Jump to kernel's entry point. There's no going back now.
if ((checkOSVersion("10.7")) || (checkOSVersion("10.8"))) {
if ((checkOSVersion("10.7")) || (checkOSVersion("10.8")) || (checkOSVersion("10.9")))
{
// Notify modules that the kernel is about to be started
execute_hook("Kernel Start", (void*)kernelEntry, (void*)bootArgs, NULL, NULL);
// Use specify kernel cache file if not empty
if (cacheFile[0] != 0)
{
strlcpy(kernelCacheFile, cacheFile, sizeof(kernelCacheFile));
else {
// Lion and Mountain Lion prelink kernel cache file
if ((checkOSVersion("10.7")) || (checkOSVersion("10.8"))) {
}
else
{
// Lion, Mountain Lion and Mavericks prelink kernel cache file
if ((checkOSVersion("10.7")) || (checkOSVersion("10.8")) || (checkOSVersion("10.9")))
{
sprintf(kernelCacheFile, "%skernelcache", kDefaultCachePathSnow);
}
// Snow Leopard prelink kernel cache file
trunk/i386/boot2/gui.c
3939
4040
4141
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
8690
87
88
89
91
92
93
9094
91
92
93
94
95
96
97
98
99
100
101
95
96
97
98
99
100
101
102
103
104
105
102106
103
104
107
108
105109
106
107
110
111
108112
109
110
113
114
111115
112116
113117
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
118
119
131120
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
162137
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
187195
188196
189197
......
224232
225233
226234
227
235
228236
229237
230
231
238
239
240
241
232242
233243
234244
......
351361
352362
353363
364
365
354366
355367
356368
......
364376
365377
366378
379
380
367381
368382
369383
......
884898
885899
886900
901
902
903
887904
888905
889906
......
936953
937954
938955
939
956
940957
941958
942959
iBackground = 0,
iLogo,
iDeviceGeneric,
iDeviceGeneric_o,
iDeviceHFS,
iDeviceHFS_o,
iDeviceHFS_ML,
iDeviceHFS_ML_o,
iDeviceHFS_Lion,
iDeviceHFS_Lion_o,
iDeviceHFS_SL,
iDeviceHFS_SL_o,
iDeviceHFS_Leo,
iDeviceHFS_Leo_o,
iDeviceHFS_Tiger,
iDeviceHFS_Tiger_o,
iDeviceHFSRAID,
iDeviceHFSRAID_o,
iDeviceHFSRAID_ML,
iDeviceHFSRAID_ML_o,
iDeviceHFSRAID_Lion,
iDeviceHFSRAID_Lion_o,
iDeviceHFSRAID_SL,
iDeviceHFSRAID_SL_o,
iDeviceHFSRAID_Leo,
iDeviceHFSRAID_Leo_o,
iDeviceHFSRAID_Tiger,
iDeviceHFSRAID_Tiger_o,
iDeviceEXT3,
iDeviceEXT3_o,
iDeviceFreeBSD, /* FreeBSD/OpenBSD detection,nawcom's code by valv, Icon credits to blackosx */
iDeviceFreeBSD_o, /* FreeBSD/OpenBSD detection,nawcom's code by valv, Icon credits to blackosx */
iDeviceOpenBSD, /* FreeBSD/OpenBSD detection,nawcom's code by valv, Icon credits to blackosx */
iDeviceOpenBSD_o, /* FreeBSD/OpenBSD detection,nawcom's code by valv, Icon credits to blackosx */
iDeviceBEFS, /* Haiku detection and Icon credits to scorpius */
iDeviceBEFS_o, /* Haiku detection and Icon credits to scorpius */
iDeviceFAT,
iDeviceFAT_o,
iDeviceFAT16,
iDeviceFAT16_o,
iDeviceFAT32,
iDeviceFAT32_o,
iDeviceNTFS,
iDeviceNTFS_o,
iDeviceCDROM,
iDeviceCDROM_o,
iDeviceGeneric,
iDeviceGeneric_o,
iDeviceHFS,
iDeviceHFS_o,
iDeviceHFS_mav,
iDeviceHFS_mav_o,
iDeviceHFS_ML,
iDeviceHFS_ML_o,
iDeviceHFS_Lion,
iDeviceHFS_Lion_o,
iDeviceHFS_SL,
iDeviceHFS_SL_o,
iDeviceHFS_Leo,
iDeviceHFS_Leo_o,
iDeviceHFS_Tiger,
iDeviceHFS_Tiger_o,
iDeviceHFSRAID,
iDeviceHFSRAID_o,
iDeviceHFSRAID_mav,
iDeviceHFSRAID_mav_o,
iDeviceHFSRAID_ML,
iDeviceHFSRAID_ML_o,
iDeviceHFSRAID_Lion,
iDeviceHFSRAID_Lion_o,
iDeviceHFSRAID_SL,
iDeviceHFSRAID_SL_o,
iDeviceHFSRAID_Leo,
iDeviceHFSRAID_Leo_o,
iDeviceHFSRAID_Tiger,
iDeviceHFSRAID_Tiger_o,
iDeviceEXT3,
iDeviceEXT3_o,
iDeviceFreeBSD, /* FreeBSD/OpenBSD detection,nawcom's code by valv, Icon credits to blackosx */
iDeviceFreeBSD_o, /* FreeBSD/OpenBSD detection,nawcom's code by valv, Icon credits to blackosx */
iDeviceOpenBSD, /* FreeBSD/OpenBSD detection,nawcom's code by valv, Icon credits to blackosx */
iDeviceOpenBSD_o, /* FreeBSD/OpenBSD detection,nawcom's code by valv, Icon credits to blackosx */
iDeviceBEFS, /* Haiku detection and Icon credits to scorpius */
iDeviceBEFS_o, /* Haiku detection and Icon credits to scorpius */
iDeviceFAT,
iDeviceFAT_o,
iDeviceFAT16,
iDeviceFAT16_o,
iDeviceFAT32,
iDeviceFAT32_o,
iDeviceNTFS,
iDeviceNTFS_o,
iDeviceCDROM,
iDeviceCDROM_o,
iSelection,
iDeviceScrollPrev,
iDeviceScrollNext,
iSelection,
iDeviceScrollPrev,
iDeviceScrollNext,
iMenuBoot,
iMenuVerbose,
iMenuIgnoreCaches,
iMenuSingleUser,
iMenuMemoryInfo,
iMenuVideoInfo,
iMenuHelp,
iMenuVerboseDisabled,
iMenuIgnoreCachesDisabled,
iMenuSingleUserDisabled,
iMenuSelection,
iMenuBoot,
iMenuVerbose,
iMenuIgnoreCaches,
iMenuSingleUser,
iMenuMemoryInfo,
iMenuVideoInfo,
iMenuHelp,
iMenuVerboseDisabled,
iMenuIgnoreCachesDisabled,
iMenuSingleUserDisabled,
iMenuSelection,
iProgressBar,
iProgressBarBackground,
iProgressBar,
iProgressBarBackground,
iTextScrollPrev,
iTextScrollNext,
iTextScrollPrev,
iTextScrollNext,
iFontConsole,
iFontSmall,
iFontConsole,
iFontSmall,
};
image_t images[] = {
{.name = "background", .image = NULL},
{.name = "logo", .image = NULL},
{.name = "device_generic", .image = NULL},
{.name = "device_generic_o", .image = NULL},
{.name = "device_hfsplus", .image = NULL},
{.name = "device_hfsplus_o", .image = NULL},
{.name = "device_hfsplus_ml", .image = NULL},
{.name = "device_hfsplus_ml_o", .image = NULL},
{.name = "device_hfsplus_lion", .image = NULL},
{.name = "device_hfsplus_lion_o", .image = NULL},
{.name = "device_hfsplus_sl", .image = NULL},
{.name = "device_hfsplus_sl_o", .image = NULL},
{.name = "device_hfsplus_leo", .image = NULL},
{.name = "device_hfsplus_leo_o", .image = NULL},
{.name = "device_hfsplus_tiger", .image = NULL},
{.name = "device_hfsplus_tiger_o", .image = NULL},
{.name = "background", .image = NULL},
{.name = "logo", .image = NULL},
{.name = "device_hfsraid", .image = NULL},
{.name = "device_hfsraid_o", .image = NULL},
{.name = "device_hfsraid_ml", .image = NULL},
{.name = "device_hfsraid_ml_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_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 */
{.name = "device_freebsd_o", .image = NULL}, /* FreeBSD/OpenBSD detection,nawcom's code by valv, Icon credits to blackosx */
{.name = "device_openbsd", .image = NULL}, /* FreeBSD/OpenBSD detection,nawcom's code by valv, Icon credits to blackosx */
{.name = "device_openbsd_o", .image = NULL}, /* FreeBSD/OpenBSD detection,nawcom's code by valv, Icon credits to blackosx */
{.name = "device_befs", .image = NULL}, /* Haiku detection and Icon credits to scorpius */
{.name = "device_befs_o", .image = NULL}, /* Haiku detection and Icon credits to scorpius */
{.name = "device_fat", .image = NULL},
{.name = "device_fat_o", .image = NULL},
{.name = "device_fat16", .image = NULL},
{.name = "device_fat16_o", .image = NULL},
{.name = "device_fat32", .image = NULL},
{.name = "device_fat32_o", .image = NULL},
{.name = "device_ntfs", .image = NULL},
{.name = "device_ntfs_o", .image = NULL},
{.name = "device_cdrom", .image = NULL},
{.name = "device_cdrom_o", .image = NULL},
{.name = "device_generic", .image = NULL},
{.name = "device_generic_o", .image = NULL},
{.name = "device_hfsplus", .image = NULL},
{.name = "device_hfsplus_o", .image = NULL},
{.name = "device_hfsplus_mav", .image = NULL},
{.name = "device_hfsplus_mav_o", .image = NULL},
{.name = "device_hfsplus_ml", .image = NULL},
{.name = "device_hfsplus_ml_o", .image = NULL},
{.name = "device_hfsplus_lion", .image = NULL},
{.name = "device_hfsplus_lion_o", .image = NULL},
{.name = "device_hfsplus_sl", .image = NULL},
{.name = "device_hfsplus_sl_o", .image = NULL},
{.name = "device_hfsplus_leo", .image = NULL},
{.name = "device_hfsplus_leo_o", .image = NULL},
{.name = "device_hfsplus_tiger", .image = NULL},
{.name = "device_hfsplus_tiger_o", .image = NULL},
{.name = "device_selection", .image = NULL},
{.name = "device_scroll_prev", .image = NULL},
{.name = "device_scroll_next", .image = NULL},
{.name = "menu_boot", .image = NULL},
{.name = "menu_verbose", .image = NULL},
{.name = "menu_ignore_caches", .image = NULL},
{.name = "menu_single_user", .image = NULL},
{.name = "menu_memory_info", .image = NULL},
{.name = "menu_video_info", .image = NULL},
{.name = "menu_help", .image = NULL},
{.name = "menu_verbose_disabled", .image = NULL},
{.name = "menu_ignore_caches_disabled", .image = NULL},
{.name = "menu_single_user_disabled", .image = NULL},
{.name = "menu_selection", .image = NULL},
{.name = "progress_bar", .image = NULL},
{.name = "progress_bar_background", .image = NULL},
{.name = "text_scroll_prev", .image = NULL},
{.name = "text_scroll_next", .image = NULL},
{.name = "font_console", .image = NULL},
{.name = "font_small", .image = NULL},
{.name = "device_hfsraid", .image = NULL},
{.name = "device_hfsraid_o", .image = NULL},
{.name = "device_hfsraid_mav", .image = NULL},
{.name = "device_hfsraid_mav_o", .image = NULL},
{.name = "device_hfsraid_ml", .image = NULL},
{.name = "device_hfsraid_ml_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_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 */
{.name = "device_freebsd_o", .image = NULL}, /* FreeBSD/OpenBSD detection,nawcom's code by valv, Icon credits to blackosx */
{.name = "device_openbsd", .image = NULL}, /* FreeBSD/OpenBSD detection,nawcom's code by valv, Icon credits to blackosx */
{.name = "device_openbsd_o", .image = NULL}, /* FreeBSD/OpenBSD detection,nawcom's code by valv, Icon credits to blackosx */
{.name = "device_befs", .image = NULL}, /* Haiku detection and Icon credits to scorpius */
{.name = "device_befs_o", .image = NULL}, /* Haiku detection and Icon credits to scorpius */
{.name = "device_fat", .image = NULL},
{.name = "device_fat_o", .image = NULL},
{.name = "device_fat16", .image = NULL},
{.name = "device_fat16_o", .image = NULL},
{.name = "device_fat32", .image = NULL},
{.name = "device_fat32_o", .image = NULL},
{.name = "device_ntfs", .image = NULL},
{.name = "device_ntfs_o", .image = NULL},
{.name = "device_cdrom", .image = NULL},
{.name = "device_cdrom_o", .image = NULL},
{.name = "device_selection", .image = NULL},
{.name = "device_scroll_prev", .image = NULL},
{.name = "device_scroll_next", .image = NULL},
{.name = "menu_boot", .image = NULL},
{.name = "menu_verbose", .image = NULL},
{.name = "menu_ignore_caches", .image = NULL},
{.name = "menu_single_user", .image = NULL},
{.name = "menu_memory_info", .image = NULL},
{.name = "menu_video_info", .image = NULL},
{.name = "menu_help", .image = NULL},
{.name = "menu_verbose_disabled", .image = NULL},
{.name = "menu_ignore_caches_disabled", .image = NULL},
{.name = "menu_single_user_disabled", .image = NULL},
{.name = "menu_selection", .image = NULL},
{.name = "progress_bar", .image = NULL},
{.name = "progress_bar_background", .image = NULL},
{.name = "text_scroll_prev", .image = NULL},
{.name = "text_scroll_next", .image = NULL},
{.name = "font_console", .image = NULL},
{.name = "font_small", .image = NULL},
};
int imageCnt = 0;
static int getImageIndexByName(const char *name)
{
int i;
int i;
for (i = 0; i < sizeof(images) / sizeof(images[0]); i++)
{
if (strcmp(name, images[i].name) == 0)
return i; // found the name
if (strcmp(name, images[i].name) == 0)
{
return i; // found the name
}
}
return -1;
}
LOADPNG(device_generic_o, iDeviceGeneric);
LOADPNG(device_hfsplus, iDeviceGeneric);
LOADPNG(device_hfsplus_o, iDeviceHFS);
LOADPNG(device_hfsplus_mav, iDeviceHFS);
LOADPNG(device_hfsplus_mav_o, iDeviceHFS_mav);
LOADPNG(device_hfsplus_ml, iDeviceHFS);
LOADPNG(device_hfsplus_ml_o, iDeviceHFS_ML);
LOADPNG(device_hfsplus_lion, iDeviceHFS);
LOADPNG(device_hfsraid, iDeviceHFS);
LOADPNG(device_hfsraid_o, iDeviceHFSRAID);
LOADPNG(device_hfsraid_mav, iDeviceHFSRAID);
LOADPNG(device_hfsraid_mav_o, iDeviceHFSRAID_mav);
LOADPNG(device_hfsraid_ml, iDeviceHFSRAID);
LOADPNG(device_hfsraid_ml_o, iDeviceHFSRAID_ML);
LOADPNG(device_hfsraid_lion, iDeviceHFSRAID);
{
// Use HFS or HFSRAID icon depending on bvr flags. Fallbacks are handled by alt_image above.
switch (device->OSVersion[3]) {
case '9':
devicetype = (device->flags & kBVFlagBooter ? iDeviceHFSRAID_mav : iDeviceHFS_mav);
break;
case '8':
devicetype = (device->flags & kBVFlagBooter ? iDeviceHFSRAID_ML : iDeviceHFS_ML);
break;
break;
default:
devicetype = iDeviceGeneric;// Use Generic icon
devicetype = iDeviceGeneric;// Use Generic icon
break;
}
}

Archive Download the corresponding diff file

Revision: 2245