Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add patch for PCSPECIALIST 17,3" Vyper #102

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .maciasl
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@
[bat] Microxperts u731ga1 (Clevo rebrand) battery/battery_Microxperts-u731ga1.txt
[bat] MSI CX61 2PC battery/battery_MSI-CX61-2PC.txt
[bat] Partaker G3 battery/battery_Partaker_G3.txt
[bat] PCSPECIALIST 17,3" Vyper battery/battery_PCSPECIALIST_17_3_Vyper.txt
[bat] Razer Blade (2014) battery/battery_Razer-Blade-2014.txt
[bat] Razer Blade Pro battery/battery_Razer-Blade-Pro.txt
[bat] Samsung Ativ Book 7 battery/battery_Samsung_NP730U3E_X04IT.txt
Expand Down
66 changes: 66 additions & 0 deletions battery/battery_PCSPECIALIST_17_3_Vyper.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
#Maintained by: RehabMan for: Laptop Patches
#battery_PCSPECIALIST_17_3_Vyper.txt

# created by MatrixDJ96 2020-08-28
# based on MECHREVO x6TI by nayeweiyang

# works for:
# PCSPECIALIST 17"3 Vyper

# 16-bit registers
into device label EC0 code_regex XIF0,\s+16, replace_matched begin F000,8,F001,8, end;
into device label EC0 code_regex XIF1,\s+16, replace_matched begin F100,8,F101,8, end;
into device label EC0 code_regex XIF2,\s+16, replace_matched begin F200,8,F201,8, end;
into device label EC0 code_regex XIF3,\s+16, replace_matched begin F300,8,F301,8, end;
into device label EC0 code_regex XIF4,\s+16, replace_matched begin F400,8,F401,8, end;
into device label EC0 code_regex XIF5,\s+16, replace_matched begin F500,8,F501,8, end;
into device label EC0 code_regex XIF6,\s+16, replace_matched begin F600,8,F601,8, end;
into device label EC0 code_regex XIF7,\s+16, replace_matched begin F700,8,F701,8, end;
into device label EC0 code_regex XIF8,\s+16, replace_matched begin F800,8,F801,8, end;
into device label EC0 code_regex XST0,\s+16, replace_matched begin T000,8,T001,8, end;
into device label EC0 code_regex XST1,\s+16, replace_matched begin T100,8,T101,8, end;
into device label EC0 code_regex XST2,\s+16, replace_matched begin T200,8,T201,8, end;
into device label EC0 code_regex XST3,\s+16, replace_matched begin T300,8,T301,8, end;
into device label EC0 code_regex XTP0,\s+16, replace_matched begin XP00,8,XP01,8, end;
into device label EC0 code_regex CYCN,\s+16, replace_matched begin CC00,8,CC01,8, end;
into device label EC0 code_regex BIF0,\s+16, replace_matched begin BF00,8,BF01,8, end;
into device label EC0 code_regex BIF1,\s+16, replace_matched begin BF10,8,BF11,8, end;
into device label EC0 code_regex BIF2,\s+16, replace_matched begin BF20,8,BF21,8, end;
into device label EC0 code_regex BIF3,\s+16, replace_matched begin BF30,8,BF31,8, end;
into device label EC0 code_regex BIF4,\s+16, replace_matched begin BF40,8,BF41,8, end;
into device label EC0 code_regex BIF5,\s+16, replace_matched begin BF50,8,BF51,8, end;
into device label EC0 code_regex BIF6,\s+16, replace_matched begin BF60,8,BF61,8, end;
into device label EC0 code_regex BIF7,\s+16, replace_matched begin BF70,8,BF71,8, end;
into device label EC0 code_regex BIF8,\s+16, replace_matched begin BF80,8,BF81,8, end;
into device label EC0 code_regex BST0,\s+16, replace_matched begin BT00,8,BT01,8, end;
into device label EC0 code_regex BST1,\s+16, replace_matched begin BT10,8,BT11,8, end;
into device label EC0 code_regex BST2,\s+16, replace_matched begin BT20,8,BT21,8, end;
into device label EC0 code_regex BST3,\s+16, replace_matched begin BT30,8,BT31,8, end;
into device label EC0 code_regex BTP0,\s+16, replace_matched begin BP00,8,BP01,8, end;

# 64-bit registers
#into device label EC0 code_regex (XIF9,)\s+(64) replace_matched begin XF9X,%2,//%1%2 end;
#into device label EC0 code_regex (XIFA,)\s+(64) replace_matched begin XFAX,%2,//%1%2 end;
#into device label EC0 code_regex (XIFB,)\s+(64) replace_matched begin XFBX,%2,//%1%2 end;
#into device label EC0 code_regex (XIFC,)\s+(64) replace_matched begin XFCX,%2,//%1%2 end;
#into device label EC0 code_regex (BIF9,)\s+(64) replace_matched begin BF9X,%2,//%1%2 end;
#into device label EC0 code_regex (BIFA,)\s+(64) replace_matched begin BFAX,%2,//%1%2 end;
#into device label EC0 code_regex (BIFB,)\s+(64) replace_matched begin BFBX,%2,//%1%2 end;
#into device label EC0 code_regex (BIFC,)\s+(64) replace_matched begin BFCX,%2,//%1%2 end;

# fix 16-bit methods
into_all method parent_label BAT0 code_regex \^\^PCI0.LPCB.EC0.XIF1 replaceall_matched begin B1B2(^^PCI0.LPCB.EC0.F100,^^PCI0.LPCB.EC0.F101) end;
into_all method parent_label BAT0 code_regex \^\^PCI0.LPCB.EC0.XIF2 replaceall_matched begin B1B2(^^PCI0.LPCB.EC0.F200,^^PCI0.LPCB.EC0.F201) end;
into_all method parent_label BAT0 code_regex \^\^PCI0.LPCB.EC0.XIF3 replaceall_matched begin B1B2(^^PCI0.LPCB.EC0.F300,^^PCI0.LPCB.EC0.F301) end;
into_all method parent_label BAT0 code_regex \^\^PCI0.LPCB.EC0.XIF4 replaceall_matched begin B1B2(^^PCI0.LPCB.EC0.F400,^^PCI0.LPCB.EC0.F401) end;
into_all method parent_label BAT0 code_regex \^\^PCI0.LPCB.EC0.XIF7 replaceall_matched begin B1B2(^^PCI0.LPCB.EC0.F700,^^PCI0.LPCB.EC0.F701) end;
into_all method parent_label BAT0 code_regex \^\^PCI0.LPCB.EC0.XST0 replaceall_matched begin B1B2(^^PCI0.LPCB.EC0.T000,^^PCI0.LPCB.EC0.T001) end;
into_all method parent_label BAT0 code_regex \^\^PCI0.LPCB.EC0.XST1 replaceall_matched begin B1B2(^^PCI0.LPCB.EC0.T100,^^PCI0.LPCB.EC0.T101) end;
into_all method parent_label BAT0 code_regex \^\^PCI0.LPCB.EC0.XST2 replaceall_matched begin B1B2(^^PCI0.LPCB.EC0.T200,^^PCI0.LPCB.EC0.T201) end;
into_all method parent_label BAT0 code_regex \^\^PCI0.LPCB.EC0.XST3 replaceall_matched begin B1B2(^^PCI0.LPCB.EC0.T300,^^PCI0.LPCB.EC0.T301) end;
into_all method parent_label BAT0 code_regex \^\^PCI0.LPCB.EC0.CYCN replaceall_matched begin B1B2(^^PCI0.LPCB.EC0.CC00,^^PCI0.LPCB.EC0.CC01) end;

# utility
into method label B1B2 remove_entry;
into definitionblock code_regex . insert
begin Method (B1B2, 2, NotSerialized) { Return(Or(Arg0, ShiftLeft(Arg1, 8))) } end;