Chameleon

Chameleon Commit Details

Date:2010-02-05 06:02:50 (14 years 2 months ago)
Author:Pradeesh
Commit:64
Parents: 63
Message:Updated 18seven's option.c thingy , now alt+l does legacy in 32-bit mode. It even works with SilentBoot
Changes:
M/branches/prasys/i386/boot2/options.c

File differences

branches/prasys/i386/boot2/options.c
711711
712712
713713
714
714
715715
716716
717717
......
724724
725725
726726
727
728
729727
728
730729
731
730
732731
733732
734733
......
738737
739738
740739
741
742
740
743741
744742
745743
......
765763
766764
767765
768
766
769767
770768
771769
772770
773771
774772
775
773
776774
777775
778776
779777
780778
781
782779
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800780
801781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
802796
803797
804798
firstRun = NO;
}
#define QUICK_KEYS_ENABLED 1
/*
Patch from 18seven & modified by me to make it even more mac like and to include couple of commands
* alt+v verbose (in mac its command +v)
* alt+x safe mode (aka boot args with -x , in macs its command +x)
* alt+l legacy mode (not sure why you need this)
* 6 +4 = 64-bit
* 3 + 2 = 32-bit
*/
#if QUICK_KEYS_ENABLED
{
bool f8 = false, altf = false, shiftf = false, alts = false, altv = false, 32 = false, 64 = false altx = false;
bool f8 = false, altf = false, shiftf = false, alts = false, altv = false, altl = false, altx = false;
int key;
while (readKeyboardStatus()) {
key = bgetc ();
if (key == 0x1F00) alts = true;
if (key == 0x2F00) altv = true;
if (key == 0x2D00) altx = true;
if (key == 0x0403) 32 = true;
if (key == 0x0705) 64 = true;
if (key == 0x0403) altl = true;
}
if (f8) {
gBootMode &= ~kBootModeQuiet;
*(gBootArgsPtr++) = '-';
*(gBootArgsPtr++) = 'v';
}
if ((altx) && (gBootArgsPtr + 5 < gBootArgsEnd)) {
if ((altx) && (gBootArgsPtr + 3 < gBootArgsEnd)) {
*(gBootArgsPtr++) = ' ';
*(gBootArgsPtr++) = '-';
*(gBootArgsPtr++) = 'x';
//*(gBootArgsPtr++) = '';
//*(gBootArgsPtr++) = '';
}
if ((32) && (gBootArgsPtr + 3 < gBootArgsEnd)) { // Boot into 32-bit Kernel
if ((altl) && (gBootArgsPtr + 3 < gBootArgsEnd)) {
*(gBootArgsPtr++) = ' ';
*(gBootArgsPtr++) = '-';
*(gBootArgsPtr++) = 'x';
*(gBootArgsPtr++) = '3';
*(gBootArgsPtr++) = '2';
// gBootArgsPtr only takes increasement by one char
}
if ((64) && (gBootArgsPtr + 3 < gBootArgsEnd)) { // Boot into 64-bit Kernel (in case those who are using 32-bit and wanna try 64-bit)
*(gBootArgsPtr++) = ' ';
*(gBootArgsPtr++) = '-';
*(gBootArgsPtr++) = 'x';
*(gBootArgsPtr++) = '6';
*(gBootArgsPtr++) = '4';
// gBootArgsPtr only takes increasement by one char
}
if ((altx) && (gBootArgsPtr + 5 < gBootArgsEnd)) {
*(gBootArgsPtr++) = ' ';
*(gBootArgsPtr++) = '-';
*(gBootArgsPtr++) = 'x';
//*(gBootArgsPtr++) = '';
//*(gBootArgsPtr++) = '';
}
}
#else
{
bool f8 = false;
int key;
while (readKeyboardStatus()) {
key = bgetc ();
if (key == 0x4200) f8 = true;
}
if (f8) {
gBootMode &= ~kBootModeQuiet;
timeout = 0;
}
}
#endif
if( bootArgs->Video.v_display == VGA_TEXT_MODE )
{

Archive Download the corresponding diff file

Revision: 64