Branch Finder v2.3
This program allows you to extract all branches from a supported log file type, and display them for easy viewing on the left. It also finds any redundant branch to addresses, and lists them on the right. The overall goal of this project was to make code types that are sometimes based on sequenced branch control easier to identify (Hit Anywhere, Collect Anywhere, Walk Through Anything, Invincibility, etc...) Also, the new addition of the Branch Log Analyzer and Branch Log Compare should also make life easier for those looking for hidden debug/secret options within games due to its ability to classify branches by execution throughout a given log file, along with comparing two log files for execution path differences.
Preview:
Features:
Requires:
.Net Framework 4.0
What is regex you may ask?
"A regular expression is a specific pattern that provides concise and flexible means to "match" (specify and recognize) strings of text, such as particular characters, words, or patterns of characters."
Wikipedia (Full Explanation)
Well that's fine, but what is required of the regex pattern I make?
You need to define a regex pattern that will group the Address, Type, and BranchTo Address into groups. Examples have been provided in the LogTypes.xml for some of the more popular systems.
Why doesn't my pattern match any branch lines in my log file?
- Make sure your pattern is referencing upper case characters as the program automatically converts the whole file to uppercase upon load.
- Make sure your pattern returns results in one of the listed test sites below.
- Post your regex pattern in a reply to this thread if you can't get it figured out.
Example Pattern:
Analyze Distance
This property is used to determine how many lines down to look to see if the branch completed. This can vary per asm type, and can be defined similar to the following example:
If the value is not defined, then the default value of 1 will be used by the application.
Having problems creating your own regex? Look below for help:
Regex Introduction (Decent basic introduction to Regular Expressions)
Rubular.com (Best place I know of to test your regex patterns, and also has a nice reference at the bottom.)
RegExr (Yet another testing area, but has a lot more community examples to work with.)
Google (Search here if you need more information or tutorials.)
I'm stuck. HELP!
Attach your log file to this thread, and I will do my best to make an appropriate regex pattern for it.
This program allows you to extract all branches from a supported log file type, and display them for easy viewing on the left. It also finds any redundant branch to addresses, and lists them on the right. The overall goal of this project was to make code types that are sometimes based on sequenced branch control easier to identify (Hit Anywhere, Collect Anywhere, Walk Through Anything, Invincibility, etc...) Also, the new addition of the Branch Log Analyzer and Branch Log Compare should also make life easier for those looking for hidden debug/secret options within games due to its ability to classify branches by execution throughout a given log file, along with comparing two log files for execution path differences.
Preview:
Features:
- Multiple Log File Types (Use the existing presets and even add your own on the fly!)
- Ability to edit the supported types XML to keep the application current to your desired setup (Requires Regex Knowledge).
- Auto Detect Log File Types
- Branch Extraction (with counts)
- Redundant Branch To Address Extraction (with counts)
- Displays statistics on branch activity throughout the file (optional) (Executed, True, False).
- Analyzed Data (Detects Branch Always, Never, and Sometimes based execution within the log file into organized lists)
- Log Compare (Allows you to compare the currently loaded log file to another log file to easily spot the differences between the two of the same execution count. Also lists exclusive branches per log file.)
- Common Address Multi-Selection
- Search (with Multi-Selection)
- Copy Options (Line Address, or "Branch To" Address)
- Selection Counts (Lets you know if there is more outside the viewing area.)
- Drag and Drop Support
- Save Options
Requires:
.Net Framework 4.0
What is regex you may ask?
"A regular expression is a specific pattern that provides concise and flexible means to "match" (specify and recognize) strings of text, such as particular characters, words, or patterns of characters."
Wikipedia (Full Explanation)
Well that's fine, but what is required of the regex pattern I make?
You need to define a regex pattern that will group the Address, Type, and BranchTo Address into groups. Examples have been provided in the LogTypes.xml for some of the more popular systems.
Why doesn't my pattern match any branch lines in my log file?
- Make sure your pattern is referencing upper case characters as the program automatically converts the whole file to uppercase upon load.
- Make sure your pattern returns results in one of the listed test sites below.
- Post your regex pattern in a reply to this thread if you can't get it figured out.
Example Pattern:
Code:
[COLOR="#0000FF"]Log Branches: [/COLOR] 12346 BLE $1234A 1235B BGT $12360 124AB BLT $124B4 [COLOR="#0000FF"]Pattern: [/COLOR] ^[COLOR="#FF0000"]([A-F0-9]{5})[/COLOR]\s{2}[COLOR="#FF0000"](B..)[/COLOR]\s{2}\$[COLOR="#FF0000"]([A-F0-9]{5})[/COLOR] [COLOR="#0000FF"]Group Matches:[/COLOR] [B]1:[/B] 12346 [B]2:[/B] BLE [B]3:[/B] 1234A [B]1:[/B] 1235B [B]2:[/B] BGT [B]3:[/B] 12360 [B]1:[/B] 124AB [B]2:[/B] BLT [B]3:[/B] 124B4
This property is used to determine how many lines down to look to see if the branch completed. This can vary per asm type, and can be defined similar to the following example:
Code:
<Log Type="MAME: SH-#/RISC" [COLOR="#0000FF"]AnalyzeDistance="2"[/COLOR]> <Pattern>^[COLOR="#FF0000"]([0-9A-F]{8})[/COLOR]\:\s[COLOR="#FF0000"](B..)[/COLOR]{1,5}.*\$[COLOR="#FF0000"]([0-9A-F]{8})[/COLOR]</Pattern> </Log>
Having problems creating your own regex? Look below for help:
Regex Introduction (Decent basic introduction to Regular Expressions)
Rubular.com (Best place I know of to test your regex patterns, and also has a nice reference at the bottom.)
RegExr (Yet another testing area, but has a lot more community examples to work with.)
Google (Search here if you need more information or tutorials.)
I'm stuck. HELP!
Attach your log file to this thread, and I will do my best to make an appropriate regex pattern for it.
Comment