Contribute
Register

Native DSDT/AML IDE & Compiler: MaciASL Open Beta

Status
Not open for further replies.
@SJ_UnderWater:
Thanks for the update.

Some more things:

- It would be nice to tab marked code blocks, forward and back
- I would like to see an option to view not just Methods in the left sidebar but also Names and maybe others.
- You might want to reduce the icon file sizes
 
I could add a hotkey to "refresh" the indentation on a selected block of text, but shift left/right / entab/detab doesn't quite follow how ASL works. Since the compiler has its own indentation algorithm which is used to indent decompiled AML, the goal is to match that output. Only DSL (plain text) files could preserve their formatting, but this is a real edge case.
This was discussed in the closed beta, but the elements shown in the navigator at left are the same ones addressable by the patching grammar, which is no coincidence. The source itself is fairly agnostic about which "scope" elements (containers = @[/*@"Alias", @"Buffer",*/ @"Device", @"DefinitionBlock", /*@"Function",*/ @"Method", /*@"Name", @"Package", @"PowerResource",*/ @"Processor", /*@"RawDataBuffer",*/ @"Scope", @"ThermalZone"];) are used to generate the tree (and in fact early builds did show Name which was very messy), but there is a direct relationship between something I can control (the tree) and something I cannot (the patching grammar). I was very careful to make sure the patching results were as close to DSDT Editor's as possible, using the exact same syntax to ensure portability of patches (without any help, I got no answer to my questions). Seeing an element appear in the tree does give the impression that it can be operated on, and I would rather not break that assumption.
I realize the icons are larger than most of the other assets, but this is because they comply with the new retina/high-resolution requirements, which I have every intention of following. Part of what drove me to make MaciASL was the desire to have real native cocoa tools which followed Apple's user interface guidelines, and this is part of that goal. There is no additional compression to apply to ICNS files, they are made very simply using the `iconutil` tool and my own `iconset` script.
 
The compiler doesn't really care about the formatting I guess but it would be really nice to have such a feature to clean up larger parts of code that were patched or edited.
This would be just for the dsl files, indeed; nevertheless it makes the code more readable.
I can live without it of course but it would be nice to see in some of the future builds.

I asked about the tree changes because I decided to compare my DSDT with Apple ones.
The tree gives a quick overview over the content which is quite useful but isn't enough for this task.
You could keep the impression and add the display of additional elements as a settings option which is deactivated by default.

The patching part is great by the way. It handles some regex replacements which DSDT Editor skips.

I guess I will just have to manually delete the icon files with every new release. :mrgreen:
 
again, my only point was all custom formatting is lost after compilation, not whether or not any formatting would be rejected by the compiler. Since nearly all will be using MaciASL with AML files, my only intention is to ensure edits look as though they were emitted by the compiler, for consistency. Unless you modify `iasl` you are stuck with its indentation algorithm.
i will consider an option to expand the list of containers, but it sounds like you're after a `diff` implementation instead.
wherever the patching implementation differs from DSDT Editor's, I would like a report, because that is not intentional.
considering the entire app is ~5MiB, and no icon is larger than iasl5, i would say high-resolution icons are a small price for compliance.
 
Here is the patch I tried to apply with DSDT Editor:
Code:
into_all all code_regex XHC code_regex_not XHC[COLOR=#666600][[/COLOR]a[COLOR=#666600]-[/COLOR]zA[COLOR=#666600]-[/COLOR]Z0[COLOR=#666600]-[/COLOR][COLOR=#006666]9[/COLOR][COLOR=#666600]][/COLOR] replaceall_matched [COLOR=#000088]begin[/COLOR] XHC1 [COLOR=#000088]end[/COLOR]

and the shortened result:
Code:
[COLOR=#880000]// into_all all code_regex XHC code_regex_not XHC[a-zA-Z0-9] replaceall_matched[/COLOR]
[COLOR=#666600]...[/COLOR]

[COLOR=#660066]Notify[/COLOR] [COLOR=#666600](\[/COLOR]_SB[COLOR=#666600].[/COLOR]PCI0[COLOR=#666600].[/COLOR]XHC[COLOR=#666600],[/COLOR] [COLOR=#006666]0x02[/COLOR][COLOR=#666600])[/COLOR]
[COLOR=#660066]If[/COLOR] [COLOR=#666600]([/COLOR][COLOR=#660066]LAnd[/COLOR] [COLOR=#666600](\[/COLOR]_SB[COLOR=#666600].[/COLOR]PCI0[COLOR=#666600].[/COLOR]XHC[COLOR=#666600].[/COLOR]PMES[COLOR=#666600],[/COLOR] [COLOR=#666600]\[/COLOR]_SB[COLOR=#666600].[/COLOR]PCI0[COLOR=#666600].[/COLOR]XHC[COLOR=#666600].[/COLOR]PMES[COLOR=#666600]))[/COLOR]
[COLOR=#666600]{[/COLOR]
  [COLOR=#660066]Store[/COLOR] [COLOR=#666600]([/COLOR][COLOR=#660066]One[/COLOR][COLOR=#666600],[/COLOR] [COLOR=#666600]\[/COLOR]_SB[COLOR=#666600].[/COLOR]PCI0[COLOR=#666600].[/COLOR]XHC[COLOR=#666600].[/COLOR]PMES[COLOR=#666600])[/COLOR]
[COLOR=#666600]}[/COLOR]
XHC was not replaced in this case.

I agree about the icons. I was just surprised by the huge size.

The main tabbing problem I was concerned about was the insertion of patches.
Thats fixed now.

EDIT #1:

New iasl version is available.
 
the code_regex_not may or may not be due to my interpretation. As I understand it, an element must match code_regex (then the patcher must hold the value for replace/remove later) and not match code_regex_not. So if your intent was to replace all XHC with XHC1, a better code_regex might be XHC(?![a-fA-F0-9]), that is all XHCs not suffixed by a hexadecimal digit. The negative lookahead is non-capturing, so you don't have to worry about replacing it
 
I understand it the same way.

That will do it and also is accepted by DSDT Editor.
 
Second beta now up, build #221, running until January 25th. This adds:
  • SSDT Generation now has a separate panel, inserting only the four previous parameters will generate the "old-style" SSDT
  • SSDTs can now be generated with additional parameters (see below)
  • Source Provider Definition update (see first post)
  • Hotkeys improved
  • Text view placeholders
  • CoreAnimation transaction warnings fix
  • Opens injected AML file instead of re-extracting
  • Jump to Line (Cmd+L)
  • Memory and speed improvements
  • Better singletons and lazy-loading of repos
  • Fixed timing issues with NSTask where task exits before pipes are empty
  • Attempt at universal entabbing of inserts and text entry
Known issues are: Convert to Hexadecimal is currently a stub, and zero-content-length elements don't entab insertions properly

SSDT generation is more flexible now, and can take a DSDT Editor-style patch to modify the generated SSDT. To modify the APSS parameters you can add either or both of the following comments to override the defaults:
Code:
#SSDT:MinFreq <FrequencyInDecimalMHz>
#SSDT:PowerSlope <NSComparisonPredicateMath>
See the SourceForge example for the default SSDT parameters, and Apple's NSPredicate grammar. For example the power operator 2^3 is 2 ** 3, you can use min and max to bound the values, but functions taking more than one argument use braces: abs(-1.3) min({2,3}) max({34.44,56.66})

Excelent job! Just a question: a new release of ACPICA is out (version 20130117). Can you include it in this or in the next beta, please?
Thanks!
 
sorry about the wait, I've been trying to compile Clover using clang, and getting nowhere; it looks like we're stuck with GCC 4.7.
At any rate, the newest iasl5 is now up and will be included in the next beta. In the meantime just use Preferences > iASL > Update iASL to download the new version. Once the download is complete the "info" section will update. As always I recommend using ACPI 4.0 instead.
 
I've got a big feature request :p :
Collapsable code sections. Again, in case you got nothing to focus on.

It seems it is crucial to disassemble the DSDT together with all SSDTs in order to maintain correct external method calls.
This would require the editor to get all SSDTs or ask for a storage place with already placed SSDTs first.
I'm fairly new to ACPI but this shouldn't be just version 5.0 specific, I guess.
(Refer to "Multiple Table Disassembly" in current aslcompiler.doc)
What do you think about it?
 
Status
Not open for further replies.
Back
Top