2019-07-01 21:07:30 +00:00
|
|
|
<!--
|
|
|
|
Copyright 2019 faddenSoft
|
|
|
|
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
you may not use this file except in compliance with the License.
|
|
|
|
You may obtain a copy of the License at
|
|
|
|
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
See the License for the specific language governing permissions and
|
|
|
|
limitations under the License.
|
|
|
|
-->
|
|
|
|
|
2019-07-20 20:28:10 +00:00
|
|
|
<Window x:Class="SourceGen.WpfGui.EditProjectProperties"
|
2019-07-01 21:07:30 +00:00
|
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
2019-08-13 00:01:50 +00:00
|
|
|
xmlns:system="clr-namespace:System;assembly=mscorlib"
|
2019-07-20 20:28:10 +00:00
|
|
|
xmlns:local="clr-namespace:SourceGen.WpfGui"
|
2019-07-01 21:07:30 +00:00
|
|
|
mc:Ignorable="d"
|
|
|
|
Title="Edit Project Properties"
|
2019-10-02 01:20:51 +00:00
|
|
|
Width="640" Height="400" ResizeMode="NoResize"
|
2019-07-01 21:07:30 +00:00
|
|
|
ShowInTaskbar="False" WindowStartupLocation="CenterOwner"
|
2019-11-05 01:39:59 +00:00
|
|
|
Loaded="Window_Loaded" Closing="Window_Closing">
|
2019-07-01 21:07:30 +00:00
|
|
|
|
2019-07-03 21:27:54 +00:00
|
|
|
<Window.Resources>
|
|
|
|
<!-- don't center the column headers -->
|
|
|
|
<Style TargetType="{x:Type GridViewColumnHeader}">
|
|
|
|
<Setter Property="HorizontalContentAlignment" Value="Left" />
|
|
|
|
</Style>
|
2019-08-13 00:01:50 +00:00
|
|
|
|
2019-11-05 01:39:59 +00:00
|
|
|
<system:String x:Key="str_ConfirmDiscardChanges">Some changes have not been applied. Discard them?</system:String>
|
|
|
|
<system:String x:Key="str_ConfirmDiscardChangesCaption">Discard Changes?</system:String>
|
|
|
|
|
2019-08-13 00:01:50 +00:00
|
|
|
<!-- strings for combo boxes -->
|
|
|
|
<system:String x:Key="str_6502">MOS 6502</system:String>
|
|
|
|
<system:String x:Key="str_65C02">WDC W65C02S</system:String>
|
|
|
|
<system:String x:Key="str_65816">WDC W65C816S</system:String>
|
|
|
|
|
|
|
|
<system:String x:Key="str_DisableStringScan">None (disabled)</system:String>
|
|
|
|
|
|
|
|
<system:String x:Key="str_AutoLabelSimple">Simple ("L1234")</system:String>
|
|
|
|
<system:String x:Key="str_AutoLabelAnnotated">Annotated ("W_1234")</system:String>
|
|
|
|
<system:String x:Key="str_AutoLabelFullyAnnotated">Fully Annotated ("DWR_1234")</system:String>
|
2019-07-03 21:27:54 +00:00
|
|
|
</Window.Resources>
|
|
|
|
|
2019-07-01 21:07:30 +00:00
|
|
|
<DockPanel Margin="8">
|
|
|
|
<DockPanel DockPanel.Dock="Bottom">
|
|
|
|
<Button DockPanel.Dock="Right" Name="cancelButton" Content="Cancel" IsCancel="True"
|
|
|
|
Width="70" Margin="4,0,0,0"/>
|
|
|
|
<Button DockPanel.Dock="Right" Name="okButton" Content="OK" IsDefault="True"
|
|
|
|
Width="70" Click="OkButton_Click"/>
|
|
|
|
<Button DockPanel.Dock="Right" Name="applyButton" Content="Apply" Margin="0,0,20,0"
|
|
|
|
Width="70" IsEnabled="{Binding IsDirty}" Click="ApplyButton_Click"/>
|
|
|
|
<TextBlock DockPanel.Dock="Left" Text="NOTE: changes are added to the undo/redo buffer"/>
|
|
|
|
</DockPanel>
|
|
|
|
|
|
|
|
<TabControl Name="tabControl" DockPanel.Dock="Top" Margin="0,0,0,8">
|
|
|
|
<TabItem Name="generalTab" Header="General">
|
|
|
|
<Grid>
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
<ColumnDefinition Width="Auto"/>
|
|
|
|
<ColumnDefinition Width="Auto"/>
|
|
|
|
<ColumnDefinition Width="*"/>
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<Grid.RowDefinitions>
|
|
|
|
<RowDefinition Height="Auto"/>
|
|
|
|
<RowDefinition Height="Auto"/>
|
|
|
|
<RowDefinition Height="Auto"/>
|
|
|
|
</Grid.RowDefinitions>
|
|
|
|
|
2019-07-03 21:27:54 +00:00
|
|
|
<GroupBox Header="CPU" Grid.Column="0" Grid.Row="0" Padding="2,4">
|
2019-07-01 21:07:30 +00:00
|
|
|
<StackPanel>
|
2019-07-03 21:27:54 +00:00
|
|
|
<ComboBox Name="cpuComboBox" ItemsSource="{Binding CpuItems}" DisplayMemberPath="Name"
|
|
|
|
SelectionChanged="CpuComboBox_SelectionChanged"/>
|
|
|
|
<CheckBox Margin="0,4,0,0" Content="Enable undocumented instructions"
|
|
|
|
IsChecked="{Binding IncludeUndocumentedInstr}"/>
|
Optionally treat BRKs as two-byte instructions
Early data sheets listed BRK as one byte, but RTI after a BRK skips
the following byte, effectively making BRK a 2-byte instruction.
Sometimes, such as when diassembling Apple /// SOS code, it's handy
to treat it that way explicitly.
This change makes two-byte BRKs optional, controlled by a checkbox
in the project settings. In the system definitions it defaults to
true for Apple ///, false for all others.
ACME doesn't allow BRK to have an arg, and cc65 only allows it for
65816 code (?), so it's emitted as a hex blob for those assemblers.
Anyone wishing to target those assemblers should stick to 1-byte mode.
Extension scripts have to switch between formatting one byte of
inline data and formatting an instruction with a one-byte operand.
A helper function has been added to the plugin Util class.
To get some regression test coverage, 2022-extension-scripts has
been configured to use two-byte BRK.
Also, added/corrected some SOS constants.
See also issue #44.
2019-10-09 21:55:56 +00:00
|
|
|
<CheckBox Margin="0,4,0,0" Content="Treat BRK as two-byte instruction"
|
|
|
|
IsChecked="{Binding TwoByteBrk}"/>
|
2019-07-01 21:07:30 +00:00
|
|
|
</StackPanel>
|
|
|
|
</GroupBox>
|
2019-07-03 21:27:54 +00:00
|
|
|
<GroupBox Header="Entry Flags" Grid.Column="0" Grid.Row="1" Padding="2,4">
|
2019-07-01 21:07:30 +00:00
|
|
|
<StackPanel>
|
|
|
|
<StackPanel Orientation="Horizontal">
|
|
|
|
<TextBlock Text="Flags:"/>
|
2019-07-03 21:27:54 +00:00
|
|
|
<TextBlock Name="currentFlagsText" Margin="4,2,0,0"
|
|
|
|
Text="N- V- M- X- D- I- Z- C- E-"
|
|
|
|
FontFamily="{StaticResource GeneralMonoFont}"/>
|
2019-07-01 21:07:30 +00:00
|
|
|
</StackPanel>
|
2019-07-03 21:27:54 +00:00
|
|
|
<Button Width="75" Content="Change" Margin="0,4,0,0"
|
|
|
|
HorizontalAlignment="Left" Click="ChangeFlagButton_Click"/>
|
2019-07-01 21:07:30 +00:00
|
|
|
</StackPanel>
|
|
|
|
</GroupBox>
|
|
|
|
|
2019-07-03 21:27:54 +00:00
|
|
|
<GroupBox Header="Analysis Parameters" Grid.Column="1" Grid.Row="0" Grid.RowSpan="2"
|
|
|
|
Margin="4,0,0,0" Padding="2,4">
|
2019-07-01 21:07:30 +00:00
|
|
|
<StackPanel>
|
2019-09-02 22:57:59 +00:00
|
|
|
<CheckBox Content="Analyze uncategorized data"
|
2019-07-03 21:27:54 +00:00
|
|
|
IsChecked="{Binding AnalyzeUncategorizedData}"/>
|
2019-09-02 22:57:59 +00:00
|
|
|
<CheckBox Margin="0,4,0,0" Content="Seek nearby targets"
|
2019-07-03 21:27:54 +00:00
|
|
|
IsChecked="{Binding SeekNearbyTargets}"/>
|
2020-07-04 00:37:04 +00:00
|
|
|
<CheckBox Margin="0,4,0,0" Content="Use relocation data (experimental)"
|
|
|
|
IsChecked="{Binding UseRelocData}" IsEnabled="{Binding IsRelocDataAvailable}"/>
|
2019-09-02 22:57:59 +00:00
|
|
|
<CheckBox Margin="0,4,0,0" Content="Smart PLP handling"
|
|
|
|
IsChecked="{Binding SmartPlpHandling}"/>
|
2020-07-10 02:36:22 +00:00
|
|
|
<CheckBox Margin="0,4,0,0" Content="Smart PLB handling"
|
|
|
|
IsChecked="{Binding SmartPlbHandling}"/>
|
2019-08-13 00:01:50 +00:00
|
|
|
|
|
|
|
<StackPanel Orientation="Horizontal" Margin="0,4,0,0">
|
|
|
|
<TextBlock Margin="0,3,0,0" Text="Default text encoding:"/>
|
|
|
|
<ComboBox Name="defaultTextEncComboBox" Margin="8,2,0,0"
|
|
|
|
Width="142"
|
|
|
|
ItemsSource="{Binding DefaultTextScanModeItems}" DisplayMemberPath="Name"
|
|
|
|
SelectionChanged="DefaultTextEncComboBox_SelectionChanged"/>
|
|
|
|
</StackPanel>
|
|
|
|
|
|
|
|
<StackPanel Orientation="Horizontal" Margin="0,4,0,0">
|
|
|
|
<TextBlock Margin="0,3,0,0" Text="Min chars for string detection:"/>
|
|
|
|
<ComboBox Name="minStringCharsComboBox" Margin="8,2,0,0" Width="100"
|
|
|
|
ItemsSource="{Binding MinCharsItems}" DisplayMemberPath="Name"
|
|
|
|
SelectionChanged="MinStringCharsComboBox_SelectionChanged"/>
|
|
|
|
</StackPanel>
|
2019-07-01 21:07:30 +00:00
|
|
|
</StackPanel>
|
|
|
|
</GroupBox>
|
|
|
|
|
2019-07-03 21:27:54 +00:00
|
|
|
<GroupBox Header="Miscellaneous" Grid.Column="0" Grid.Row="2" Grid.ColumnSpan="2"
|
|
|
|
Padding="2,4">
|
2019-07-01 21:07:30 +00:00
|
|
|
<DockPanel>
|
2019-07-03 21:27:54 +00:00
|
|
|
<TextBlock DockPanel.Dock="Left" Text="Auto-label style:" Margin="0,2,8,0"/>
|
|
|
|
<ComboBox DockPanel.Dock="Left" Name="autoLabelStyleComboBox"
|
2019-08-13 00:01:50 +00:00
|
|
|
Width="300" HorizontalAlignment="Left"
|
2019-07-03 21:27:54 +00:00
|
|
|
ItemsSource="{Binding AutoLabelItems}" DisplayMemberPath="Name"
|
|
|
|
SelectionChanged="AutoLabelStyleComboBox_SelectionChanged"/>
|
2019-07-01 21:07:30 +00:00
|
|
|
</DockPanel>
|
|
|
|
</GroupBox>
|
|
|
|
</Grid>
|
|
|
|
</TabItem>
|
|
|
|
|
|
|
|
|
|
|
|
<TabItem Name="projectSymbolsTab" Header="Project Symbols">
|
|
|
|
<Grid>
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
<ColumnDefinition Width="*"/>
|
|
|
|
<ColumnDefinition Width="Auto"/>
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<Grid.RowDefinitions>
|
|
|
|
<RowDefinition Height="Auto"/>
|
2019-07-03 21:27:54 +00:00
|
|
|
<RowDefinition Height="*"/>
|
2019-07-01 21:07:30 +00:00
|
|
|
</Grid.RowDefinitions>
|
|
|
|
|
|
|
|
<TextBlock Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="2"
|
2019-07-03 21:27:54 +00:00
|
|
|
Margin="4,0,0,0" Text="Symbols defined in project:"/>
|
2019-07-01 21:07:30 +00:00
|
|
|
|
2019-10-02 01:20:51 +00:00
|
|
|
<DataGrid Name="projectSymbolsList" Grid.Column="0" Grid.Row="1" Margin="4,4,4,0"
|
2019-07-05 21:53:45 +00:00
|
|
|
ItemsSource="{Binding ProjectSymbols}"
|
2019-10-02 01:20:51 +00:00
|
|
|
IsReadOnly="True"
|
|
|
|
FontFamily="{StaticResource GeneralMonoFont}"
|
|
|
|
SnapsToDevicePixels="True"
|
|
|
|
GridLinesVisibility="Vertical"
|
|
|
|
VerticalGridLinesBrush="#FF7F7F7F"
|
|
|
|
AutoGenerateColumns="False"
|
|
|
|
HeadersVisibility="Column"
|
|
|
|
CanUserReorderColumns="False"
|
|
|
|
SelectionMode="Single"
|
2019-07-05 23:20:31 +00:00
|
|
|
SelectionChanged="List_SelectionChanged"
|
2019-10-02 01:20:51 +00:00
|
|
|
Sorting="ProjectSymbolsList_Sorting"
|
|
|
|
MouseDoubleClick="ProjectSymbolsList_MouseDoubleClick">
|
|
|
|
<DataGrid.Resources>
|
|
|
|
<!-- make the no-focus color the same as the in-focus color -->
|
|
|
|
<!-- thanks: https://stackoverflow.com/a/13053511/294248 -->
|
|
|
|
<SolidColorBrush x:Key="{x:Static SystemColors.InactiveSelectionHighlightBrushKey}"
|
|
|
|
Color="{x:Static SystemColors.HighlightColor}"/>
|
|
|
|
<SolidColorBrush x:Key="{x:Static SystemColors.InactiveSelectionHighlightTextBrushKey}"
|
|
|
|
Color="{x:Static SystemColors.HighlightTextColor}"/>
|
|
|
|
</DataGrid.Resources>
|
|
|
|
<DataGrid.Columns>
|
|
|
|
<DataGridTextColumn Header="Name" Width="118" Binding="{Binding Label}"/>
|
|
|
|
<DataGridTextColumn Header="Value" Width="72" Binding="{Binding Value}"/>
|
|
|
|
<DataGridTextColumn Header="Type" Width="45" Binding="{Binding Type}"/>
|
|
|
|
<DataGridTextColumn Header="Width" Width="45" Binding="{Binding Width}"/>
|
|
|
|
<DataGridTextColumn Header="Comment" Width="300" Binding="{Binding Comment}"/>
|
|
|
|
</DataGrid.Columns>
|
|
|
|
</DataGrid>
|
2019-07-01 21:07:30 +00:00
|
|
|
|
|
|
|
<StackPanel Grid.Column="1" Grid.Row="1">
|
2019-07-05 21:53:45 +00:00
|
|
|
<Button Name="newSymbolButton" Width="120" Margin="4" Content="_New Symbol..."
|
|
|
|
Click="NewSymbolButton_Click"/>
|
|
|
|
<Button Name="editSymbolButton" Width="120" Margin="4,4" Content="_Edit Symbol..."
|
|
|
|
Click="EditSymbolButton_Click"/>
|
|
|
|
<Button Name="removeSymbolButton" Width="120" Margin="4,4" Content="_Remove"
|
|
|
|
Click="RemoveSymbolButton_Click"/>
|
|
|
|
<Button Name="importSymbolsButton" Width="120" Margin="4,20,4,0" Content="_Import..."
|
|
|
|
Click="ImportSymbolsButton_Click"/>
|
2019-07-01 21:07:30 +00:00
|
|
|
</StackPanel>
|
|
|
|
</Grid>
|
|
|
|
</TabItem>
|
|
|
|
|
|
|
|
|
|
|
|
<TabItem Name="symbolFilesTab" Header="Symbol Files">
|
|
|
|
<Grid>
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
<ColumnDefinition Width="300"/>
|
|
|
|
<ColumnDefinition Width="Auto"/>
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<Grid.RowDefinitions>
|
|
|
|
<RowDefinition Height="Auto"/>
|
|
|
|
<RowDefinition Height="*"/>
|
|
|
|
<RowDefinition Height="Auto"/>
|
|
|
|
</Grid.RowDefinitions>
|
|
|
|
|
2019-07-03 21:27:54 +00:00
|
|
|
<TextBlock Grid.Column="0" Grid.Row="0" Margin="4,0,0,0"
|
|
|
|
Text="Currently configured symbol files:"/>
|
2019-07-01 21:07:30 +00:00
|
|
|
|
2019-07-05 23:20:31 +00:00
|
|
|
<ListBox Name="symbolFilesListBox" Grid.Column="0" Grid.Row="1" Margin="4"
|
|
|
|
SelectionMode="Extended"
|
|
|
|
ItemsSource="{Binding PlatformSymbolIdentifiers}"
|
|
|
|
SelectionChanged="List_SelectionChanged"/>
|
2019-07-01 21:07:30 +00:00
|
|
|
|
2019-10-09 20:24:09 +00:00
|
|
|
<StackPanel Grid.Column="0" Grid.Row="2" Grid.ColumnSpan="2" Orientation="Horizontal">
|
|
|
|
<Button Width="200" Margin="4"
|
2019-10-13 22:21:05 +00:00
|
|
|
Content="Add Symbol Files from Runtime..."
|
2019-10-09 20:24:09 +00:00
|
|
|
Click="AddSymbolFilesPlatformButton_Click"/>
|
|
|
|
<Button Width="200" Margin="4"
|
|
|
|
Content="Add Symbol Files from Project..."
|
|
|
|
IsEnabled="{Binding HasProjectDir}"
|
|
|
|
Click="AddSymbolFilesProjectButton_Click"/>
|
|
|
|
</StackPanel>
|
2019-07-01 21:07:30 +00:00
|
|
|
|
2019-07-03 21:27:54 +00:00
|
|
|
<StackPanel Grid.Column="2" Grid.Row="1">
|
2019-07-05 23:20:31 +00:00
|
|
|
<Button Name="symbolFileUpButton" Width="75" Margin="4" Content="_Up"
|
|
|
|
Click="SymbolFileUpButton_Click"/>
|
|
|
|
<Button Name="symbolFileDownButton" Width="75" Margin="4,4" Content="_Down"
|
|
|
|
Click="SymbolFileDownButton_Click"/>
|
|
|
|
<Button Name="symbolFileRemoveButton" Width="75" Margin="4,20,4,0" Content="_Remove"
|
|
|
|
Click="SymbolFileRemoveButton_Click"/>
|
2019-07-01 21:07:30 +00:00
|
|
|
</StackPanel>
|
|
|
|
</Grid>
|
|
|
|
</TabItem>
|
|
|
|
|
|
|
|
|
|
|
|
<TabItem Name="extensionScriptsTab" Header="Extension Scripts">
|
|
|
|
<Grid>
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
<ColumnDefinition Width="300"/>
|
|
|
|
<ColumnDefinition Width="Auto"/>
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<Grid.RowDefinitions>
|
|
|
|
<RowDefinition Height="Auto"/>
|
|
|
|
<RowDefinition Height="*"/>
|
|
|
|
<RowDefinition Height="Auto"/>
|
|
|
|
</Grid.RowDefinitions>
|
|
|
|
|
2019-07-03 21:27:54 +00:00
|
|
|
<TextBlock Grid.Column="0" Grid.Row="0" Margin="4,0,0,0"
|
2019-10-02 01:20:51 +00:00
|
|
|
Text="Currently configured extension scripts:"/>
|
2019-07-01 21:07:30 +00:00
|
|
|
|
2019-07-05 23:20:31 +00:00
|
|
|
<ListBox Name="extensionScriptsListBox" Grid.Column="0" Grid.Row="1" Margin="4"
|
|
|
|
SelectionMode="Extended"
|
|
|
|
ItemsSource="{Binding ExtensionScriptIdentifiers}"
|
|
|
|
SelectionChanged="List_SelectionChanged"/>
|
2019-07-01 21:07:30 +00:00
|
|
|
|
2019-10-09 20:24:09 +00:00
|
|
|
<StackPanel Grid.Column="0" Grid.Row="3" Grid.ColumnSpan="2" Orientation="Horizontal">
|
|
|
|
<Button Width="200" Margin="4"
|
2019-10-13 22:21:05 +00:00
|
|
|
Content="Add Scripts from Runtime..."
|
2019-10-09 20:24:09 +00:00
|
|
|
Click="AddExtensionScriptsPlatformButton_Click"/>
|
|
|
|
<Button Width="200" Margin="4"
|
|
|
|
Content="Add Scripts from Project..."
|
|
|
|
IsEnabled="{Binding HasProjectDir}"
|
|
|
|
Click="AddExtensionScriptsProjectButton_Click"/>
|
|
|
|
</StackPanel>
|
2019-07-01 21:07:30 +00:00
|
|
|
|
|
|
|
<StackPanel Grid.Column="1" Grid.Row="1">
|
2019-07-05 23:20:31 +00:00
|
|
|
<Button Name="extensionScriptRemoveButton" Width="75" Margin="4" Content="_Remove"
|
|
|
|
Click="ExtensionScriptRemoveButton_Click"/>
|
2019-07-01 21:07:30 +00:00
|
|
|
</StackPanel>
|
|
|
|
</Grid>
|
|
|
|
</TabItem>
|
|
|
|
</TabControl>
|
|
|
|
|
|
|
|
</DockPanel>
|
|
|
|
</Window>
|