#Maintained by: RehabMan for: Laptop Patches #battery_Gateway-ID49C07u.txt # created by stargazer418 2014-05-25 # works for: # Gateway ID49C07u # rehabman: # _PLD is supposed to return a variable length Package of Buffers into_all all code_regex (Name\s*\(_PLD,\s*)Buffer(\s\(0x10\)[^\)]*) replaceall_matched begin %1Package() { Buffer%2} end; # 1 error left over in a Return statement, had to do it again into_all all code_regex (Return\s)\(Buffer(\s\(0x10\)[^\)]*) replaceall_matched begin %1(Package() { Buffer%2} end; #16-bit registers into device label EC0 code_regex ERIB,\s+16, replace_matched begin RIB0,8,RIB1,8, end; into device label EC0 code_regex BRC0,\s+16, replace_matched begin RC00,8,RC01,8, end; into device label EC0 code_regex BSN0,\s+16, replace_matched begin SN00,8,SN01,8, end; into device label EC0 code_regex BPV0,\s+16, replace_matched begin PV00,8,PV01,8, end; into device label EC0 code_regex BDV0,\s+16, replace_matched begin DV00,8,DV01,8, end; into device label EC0 code_regex BDC0,\s+16, replace_matched begin DC00,8,DC01,8, end; into device label EC0 code_regex BFC0,\s+16, replace_matched begin FC00,8,FC01,8, end; into device label EC0 code_regex BSCU,\s+16, replace_matched begin SCU0,8,SCU1,8, end; into device label EC0 code_regex BAC0,\s+16, replace_matched begin AC00,8,AC01,8, end; into device label EC0 code_regex BTMA,\s+16, replace_matched begin TMA0,8,TMA1,8, end; into device label EC0 code_regex BDME,\s+16, replace_matched begin DME0,8,DME1,8, end; into device label EC0 code_regex BDAD,\s+16, replace_matched begin DAD0,8,DAD1,8, end; into device label EC0 code_regex BATM,\s+16 replace_matched begin ATM0,8,ATM1,8 end; into method label B1B2 remove_entry; into definitionblock code_regex . insert begin Method (B1B2, 2, NotSerialized) { Return(Or(Arg0, ShiftLeft(Arg1, 8))) }\n end; #fix 16-bit methods into method label FANG code_regex \sERIB\) replaceall_matched begin B1B2(RIB0,RIB1)) end; into method label FANW code_regex \sERIB\) replaceall_matched begin B1B2(RIB0,RIB1)) end; # stargazer418 16-bit patch into method label _BIF code_regex \(\^\^EC0\.BDC0, replaceall_matched begin (B1B2(\^\^EC0.DC00,\^\^EC0.DC01), end; into method label _BIF code_regex \(\^\^EC0\.BFC0, replaceall_matched begin (B1B2(\^\^EC0.FC00,\^\^EC0.FC01), end; into method label _BIF code_regex \(\^\^EC0\.BDV0, replaceall_matched begin (B1B2(\^\^EC0.DV00,\^\^EC0.DV01), end; into method label _BIF code_regex \(\^\^EC0\.BSN0, replaceall_matched begin (B1B2(\^\^EC0.SN00,\^\^EC0.SN01), end; into method label _BST code_regex \(\^\^EC0\.BPV0, replaceall_matched begin (B1B2(\^\^EC0.PV00,\^\^EC0.PV01), end; into method label _BST code_regex \(\^\^EC0\.BFC0, replaceall_matched begin (B1B2(\^\^EC0.FC00,\^\^EC0.FC01), end; into method label _BST code_regex \(\^\^EC0\.BAC0, replaceall_matched begin (B1B2(\^\^EC0.AC00,\^\^EC0.AC01), end; into method label BTIF code_regex \(\^\^LPCB\.EC0\.BDC0, replaceall_matched begin (B1B2(\^\^LPCB.EC0.DC00,\^\^LPCB.EC0.DC01), end; into method label BTIF code_regex \(\^\^LPCB\.EC0\.BPV0, replaceall_matched begin (B1B2(\^\^LPCB.EC0.PV00,\^\^LPCB.EC0.PV01), end; into method label BTIF code_regex \(\^\^LPCB\.EC0\.BSCU, replaceall_matched begin (B1B2(\^\^LPCB.EC0.SCU0,\^\^LPCB.EC0.SCU1), end; into method label BTIF code_regex \(\^\^LPCB\.EC0\.BRC0, replaceall_matched begin (B1B2(\^\^LPCB.EC0.RC00,\^\^LPCB.EC0.RC01), end; into method label BTIF code_regex \(\^\^LPCB\.EC0\.BFC0, replaceall_matched begin (B1B2(\^\^LPCB.EC0.FC00,\^\^LPCB.EC0.FC01), end; into method label BTIF code_regex \(\^\^LPCB\.EC0\.BDV0, replaceall_matched begin (B1B2(\^\^LPCB.EC0.DV00,\^\^LPCB.EC0.DV01), end; into method label BTIF code_regex \(\^\^LPCB\.EC0\.BDAD, replaceall_matched begin (B1B2(\^\^LPCB.EC0.DAD0,\^\^LPCB.EC0.DAD1), end; into method label BTIF code_regex \(\^\^LPCB\.EC0\.BSN0, replaceall_matched begin (B1B2(\^\^LPCB.EC0.SN00,\^\^LPCB.EC0.SN01), end; into method label BTIF code_regex \(\^\^LPCB\.EC0\.BTMA, replaceall_matched begin (B1B2(\^\^LPCB.EC0.TMA0,\^\^LPCB.EC0.TMA1), end; into method label BTIF code_regex \(\^\^LPCB\.EC0\.BDME, replaceall_matched begin (B1B2(\^\^LPCB.EC0.DME0,\^\^LPCB.EC0.DME1), end; into method label BTIF code_regex \(\^\^LPCB\.EC0\.BATM, replaceall_matched begin (B1B2(\^\^LPCB.EC0.ATM0,\^\^LPCB.EC0.ATM1), end; into method label BTIF code_regex \(\^\^LPCB\.EC0\.BPV0, replaceall_matched begin (B1B2(\^\^LPCB.EC0.PV00,\^\^LPCB.EC0.PV01), end; into method label BTIF code_regex \^\^LPCB\.EC0\.BTMA\) replaceall_matched begin B1B2(\^\^LPCB.EC0.TMA0,\^\^LPCB.EC0.TMA1)) end;