27th August, 2008
Recently I was looking into ways to control music being played on the computer
from my N95, I wrote an application that connects over bluetooth and wifi to your computer
and send signals to the computer…
One of those signals is load XXX playlist, as i currently have more then 50 folders of music,
I was looking for a script to generate a playlist for each folder. (Winamp playlist).
But, I could not find one, so I wrote one 
(Written in tcl, run this inside your music folder)
|proc itterateFolder {} {
|Â Â Â set rawFolders [glob -type d *]
|Â Â Â set folders []
|Â Â Â set root [pwd]
|Â Â Â foreach x $rawFolders {
|Â Â Â Â Â Â if {[regexp -- {[a-zA-Z0-9]} $x]} {
|Â Â Â Â Â Â Â Â Â cd $x
|Â Â Â Â Â Â Â Â Â puts [pwd]
|Â Â Â Â Â Â Â Â Â catch {exec cmd /c dir /b *.mp3 > $x.m3u}
|Â Â Â Â Â Â Â Â Â if {![catch {glob -type d *}]} {
|Â Â Â Â Â Â Â Â Â Â Â Â itterateFolder
|Â Â Â Â Â Â Â Â Â }
|Â Â Â Â Â Â Â Â Â cd $root
|Â Â Â Â Â Â }
|Â Â Â }
|}
|
|itterateFolder
Cheers.
EItam.
Posted in random |
4th August, 2008
Hi,
Here are some tips about debugging Windows ACPI DSDT/ASL using windbg.
Installing the checked version of acpi.sys
You need to get the checked version of acpi.sys by downloading the checked version of your service pack, then unpack it locally and expand the acpi._sy file (it is actually a .cab file). The checked version will let you use the amli debugger in order to trace and step through ASL code.
Tracing ACPI ASL Code and Object evaluation
!amli set traceon spewon verboseon – This is a bit slow but produces a nice log file (for real man only).
ASL Debug Print
If you can change the code (dump and disassemble the DSDT and then compile and embed it again), you can add some string outputs to the ASL code, you can do that by two ways, if you connect a debugger then use the simple method of storing a string into the Debug local variable (example below), the other way is to use my asl print function which prints to an io port of your choice, this is not useful if you are not a platform developer or use a virtual machine.
Examples:
Store (“Debug asl print example – 1″, Debug)
\ZDBG (“Debug asl print example – 1″)
Break Points
- If you want to debug ASL code, you can set breakpoints with !amli bp
- You can embed a breakpoint by changing the DSDT and put the BreakPoint directive in the ASL code where you want the debugger to break.
After you broke onto the amli debugger, you can trace and step() through the code.
Posted in lowlevel, programming |