Help - Search - Members - Calendar
Full Version: Dsdt Editor And Patcher
Project OS X Forums > Snow Leopard Guides & Tutorials > Tools
oldnapalm
El Coniglio released this DSDT editor with automated patching capabilities



The main editor windows allows the user to open a DSL file or extract the DSDT from IOReg. It has some useful resources, like syntax highlighting, navigation tree and some options that came with the text editor component it uses, like regex matching, auto completion, jump to pair, etc.

The patcher window parses a script-like language representing the patches. The user can preview the modifications before applying them. This "language" allows us to write dynamic patches that can be applied in various situations. More specific commands can be written as they become necessary.

For now these are the implemented commands (which can be stacked separated by ";")
QUOTE
syntax:

into <type> <property1> <property_argument1> [<property2> <property_argument2> ... <propertyN> <property_argumentN>] <action> begin [action_argument] end
(will be applied to the first occurrence)

into_all <type> <property1> <property_argument1> [<property2> <property_argument2> ... <propertyN> <property_argumentN>] <action> begin [action_argument] end
(will be applied to all occurrences)

where

type: DefinitionBlock, Scope, Method, Device, Processor, ThermalZone, All

property:
label -- first argument for the constructor of selected type
name_adr -- Name (_ADR) value
name_hid -- Name (_HID) value
code_regex -- regular expression to match the code of the selected type (not other types inside of it)
code_regex_not -- regular expression NOT to match the code of the selected type (not other types inside of it)
parent_label -- parent label
parent_type -- parent type
parent_adr -- parent _ADR value
parent_hid -- parent _HID value

action:
insert <code> -- inserts the provided code to the type
set_label <new_label> -- sets the label
replace_matched <code> -- replaces the matched code for the property with the provided code. Regex groups are inserted with %1, %2, ... up to %9
replaceall_matched <code> -- same as replace_matched but will affect all matches
remove_matched -- removes the matched code
removeall_matched -- removes all the ocurrencies of the matched code
remove_entry -- removes the entry and all children nodes
replace_content -- replaces the content of the object (everything inside its main brackets)
store_%8 -- stores the matched group 1 into %8
store_%9 -- stores the matched group 1 into %9

note: replacer will always consider the last provided value


Changes in latest release:

  • new action (replace_content)
  • fixed DSDT extraction in new Linux distros
  • new font for Mac OS version
  • more auto-fixed errors
  • minor bugfixes


Download: (last updated on 29/Sep/2011)

Mac OS: Click to view attachment
Linux and Windows: Click to view attachment

Screenshots:

Linux


Windows



Credits:

Editor component: jsyntaxpane (http://code.google.com/p/jsyntaxpane/)
IASL Copyright © Intel Corporation
Written in Java
Mojodojo
Great! Will try it today at home.
THe KiNG
You made my day... smile.gif
Thanks!

Edit: Test it, looks nice, but a bit slow.., waiting for updates.
oldnapalm
Thanks, your feedback surely will encourage the developer to make it better.

It's really a bit slow, and the used editor component with syntax highlighting wasn't designed to handle such large files. We are looking for alternatives to make it faster. Next version will have compiling error handling and some other features.

Regards.
THe KiNG
I have two vital requests for it smile.gif
Colors, working with white background is a pain for my eyes...
Folding for brackets {}, like on BBEdit or xcode, too bad TextMate lacks this feature(is not automate)
Waiting for new version.

Thanks.
smith@@
QUOTE (THe KiNG @ Jul 2 2010, 05:11 AM) *
Folding for brackets {}, like on BBEdit or xcode, too bad TextMate lacks this feature(is not automate)


I agree with you, it's important.
Kano
great job!
oldnapalm
Hey guys, first post is updated with a new version. No code folding yet, but there are some improvements.
xSmurf
This looks pretty great! Grats! \o/
osxfr33k
Is there a feature in the Patcher that will do the basic fixes in a generic way without Specific Model (Manufacturer) Pc's.

Such as the RTC and HPET hacks? Something like what Fassl's/PCWiz's Patcher's did. The only problem with those patchers is it would pull the DSDT from the system which was not useful for me.

I want to be able to patch an already existing DSDT like koalala Patcher did but his that Patcher only worked in Windows and was unreliable when trying to patch an existing DSDT. It would just crash constantly.

Is there another set of generic fixes that your Patcher uses that are either built in or a Generic type that I can load? I am looking for the same type of Patch that koalala patcher codes besides the RTC and HPET fix such as:

Local0
Wak
DTGP
Mute

As well as the _T_0 and _T_ fixes but all with a generic patch not PC Specific.

Thanks
slipttees
oldnapalm great job, pity which has no association with .dst and .aml files =]
oldnapalm
First post is updated with a new version.

Changes:

  • More compilation errors are auto-fixed
  • Stores last selected folder for file load/save
  • Mac version can be associated with AML and DSL files in Finder


@osxfr33k: sorry for late reply. Some patches are included in the zip (including DTGP), some compilation errors are auto-fixed (like Local0), but no warning and remarks removing for now (such as Wak, Mute and _T_*).

@slipttees: thanks, your suggestion was implemented.
slipttees
QUOTE (oldnapalm @ Sep 13 2010, 11:41 PM) *
First post is updated with a new version.

Changes:

  • More compilation errors are auto-fixed
  • Stores last selected folder for file load/save
  • Mac version can be associated with AML and DSL files in Finder


@osxfr33k: sorry for late reply. Some patches are included in the zip (including DTGP), some compilation errors are auto-fixed (like Local0), but no warning and remarks removing for now (such as Wak, Mute and _T_*).

@slipttees: thanks, your suggestion was implemented.


The association AML and DSL haven't custom icons for associated files. But, It's Works lovely tongue.gif

Great Work !! laugh.gif
oldnapalm
First post updated with new version.

Changes:

  • Mac version handles multiple windows with Finder integration
  • IASL 20101013-32 Linux/Mac/Windows
  • More compilation errors auto-fixed
  • Bugfixes
madmac
great work, I've been using this tool for my system, I've got an ECS A780GM-A with an AMD X2 and 4GB ram, it does the job pretty well, I would like to let you know you could make it universal binary with the iasl I compiled but perhaps you realized it already, not my build but that it can be done, it just makes the file heavy and I also fixed that, please check it out: iasl UB small... very small... it's even smaller than the separate versions!
oldnapalm
First post updated with new version.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2012 Invision Power Services, Inc.