From 6f81d748eea2088d600090c465b057472dfe50bb Mon Sep 17 00:00:00 2001 From: Andy McFadden Date: Sun, 15 Sep 2019 13:37:38 -0700 Subject: [PATCH] Rename FormatSplitAddress to FormatAddressTable Updated menus and docs to match. --- SourceGen/MainController.cs | 6 +-- SourceGen/RuntimeData/Help/index.html | 2 +- SourceGen/RuntimeData/Help/mainwin.html | 41 +++++++++++-------- SourceGen/RuntimeData/Help/tutorials.html | 7 ++-- SourceGen/SourceGen.csproj | 6 +-- ...itAddress.xaml => FormatAddressTable.xaml} | 8 ++-- ...ess.xaml.cs => FormatAddressTable.xaml.cs} | 4 +- SourceGen/WpfGui/MainWindow.xaml | 8 ++-- SourceGen/WpfGui/MainWindow.xaml.cs | 8 ++-- 9 files changed, 50 insertions(+), 40 deletions(-) rename SourceGen/WpfGui/{FormatSplitAddress.xaml => FormatAddressTable.xaml} (98%) rename SourceGen/WpfGui/{FormatSplitAddress.xaml.cs => FormatAddressTable.xaml.cs} (99%) diff --git a/SourceGen/MainController.cs b/SourceGen/MainController.cs index dc80163..485d6f2 100644 --- a/SourceGen/MainController.cs +++ b/SourceGen/MainController.cs @@ -2181,14 +2181,14 @@ namespace SourceGen { } } - public bool CanFormatSplitAddress() { + public bool CanFormatAddressTable() { EntityCounts counts = SelectionAnalysis.mEntityCounts; // Must be at least one line of data, and no code. Note this is lines, not bytes, // so we can't screen out single-byte lines without additional work. return (counts.mDataLines > 0 && counts.mCodeLines == 0); } - public void FormatSplitAddress() { + public void FormatAddressTable() { TypedRangeSet trs = GroupedOffsetSetFromSelected(); if (trs.Count == 0) { // shouldn't happen @@ -2196,7 +2196,7 @@ namespace SourceGen { return; } - FormatSplitAddress dlg = new FormatSplitAddress(mMainWin, mProject, trs, + FormatAddressTable dlg = new FormatAddressTable(mMainWin, mProject, trs, mOutputFormatter); dlg.ShowDialog(); diff --git a/SourceGen/RuntimeData/Help/index.html b/SourceGen/RuntimeData/Help/index.html index d3d5d64..2fccfa1 100644 --- a/SourceGen/RuntimeData/Help/index.html +++ b/SourceGen/RuntimeData/Help/index.html @@ -58,7 +58,7 @@ and 65816 code. The official web site is
  • Info Window
  • Navigation
  • Adding and Removing Hints
  • -
  • Format Split-Address Table
  • +
  • Format Address Table
  • Toggle Single-Byte Format
  • Format As Word
  • Toggle Data Scan
  • diff --git a/SourceGen/RuntimeData/Help/mainwin.html b/SourceGen/RuntimeData/Help/mainwin.html index 1ab19c7..3ac7d4d 100644 --- a/SourceGen/RuntimeData/Help/mainwin.html +++ b/SourceGen/RuntimeData/Help/mainwin.html @@ -195,7 +195,7 @@ enabled will depend on what you have selected in the main window.

    at least one line has hints. The keyboard shortcuts for hints are two-key combinations. -
  • Format Split-Address Table. Formats +
  • Format Address Table. Formats a series of bytes as parts of a table of addresses.
  • Toggle Single-Byte Format. Toggles a range of lines between default format and single-byte format. Enabled @@ -357,7 +357,7 @@ again to re-enable the string & fill analyzer.

    menu item to "flatten" the item.

    -

    Format Split-Address Table

    +

    Format Address Table

    Tables of addresses are fairly common. Sometimes you'll find them as a series of 16-bit words, like this:

    @@ -383,12 +383,14 @@ values are to be pushed onto the stack for an RTS call.

    While the .dd2 case is easy to format with the data operand editor, formatting addresses whose components are split into multiple tables can -be tedious.

    +be tedious. Even in the easy case, you may want to create labels and set +code hints for each item.

    -

    The Split-Address Table Formatter helps you associate symbols with the -addresses in the table. To use it, start by selecting the entire table. -In the example above, you would select all 6 bytes. The number of bytes -in each part must be equal: here, it's 3 low bytes, followed by 3 high +

    The Address Table Formatter helps you associate symbols with the +addresses in the table. It works for simple and "split" tables.

    +

    To use it, start by selecting the entire table. In the examples above, +you would select all 6 bytes. The number of bytes in each part of a +split table must be equal: here, it's 3 low bytes, followed by 3 high bytes. If the number of bytes selected can't be evenly divided by the number of parts -- two parts for 16-bit data, three parts for 24-bit data -- the formatter will report an error.

    @@ -398,15 +400,19 @@ is split into sections.

    For a 16-bit address, you have three choices: low byte first, high byte @@ -443,7 +451,8 @@ pages. You just need to have all of the data selected.

    data in question is part of a table. The formatting, labels, and code hints are applied as if you entered them all individually by hand. The formatter is just significantly more convenient. It also does everything as a single -undoable action, so if it comes out looking wrong, just hit "undo".

    +undoable action, so if it comes out looking wrong, just hit "undo" and +try something else.

    Toggle Single-Byte Format

    diff --git a/SourceGen/RuntimeData/Help/tutorials.html b/SourceGen/RuntimeData/Help/tutorials.html index 7e603d5..0ce0926 100644 --- a/SourceGen/RuntimeData/Help/tutorials.html +++ b/SourceGen/RuntimeData/Help/tutorials.html @@ -333,7 +333,7 @@ on to the next tutorial to learn more.

    can do. We assume you've already finished the Basic Features tutorial.

    -

    Split-Address Table Formatting

    +

    Address Table Formatting

    Start a new project. Select the Apple //e platform, click Select File and navigate to the Examples directory. In A2-Amper-fdraw, select @@ -381,9 +381,10 @@ to make the operand there say >FUNC. (If it says You could repeat these steps for the remaining items, but there's a faster way. Click on the line at address $1d97, then shift-click the line at address $1da9 (which should be .FILL 12,$1e). Select -Actions > Format Split-Address Table.

    +Actions > Format Address Table.

    The message at the top should indicate that there are 30 bytes -selected. In Address Characteristics, click the "adjusted for RTS/RTL" +selected. In Address Characteristics, click the "Parts are split across +sub-tables" checkbox and the "adjusted for RTS/RTL" checkbox. As soon as you do, the first line of the Generated Addresses list should show the symbol "FUNC". The rest of the addresses will look like (+) T1DD0. The "(+)" means that a label was not found at diff --git a/SourceGen/SourceGen.csproj b/SourceGen/SourceGen.csproj index a35cd11..7d21f10 100644 --- a/SourceGen/SourceGen.csproj +++ b/SourceGen/SourceGen.csproj @@ -137,8 +137,8 @@ FontPicker.xaml - - FormatSplitAddress.xaml + + FormatAddressTable.xaml GotoBox.xaml @@ -306,7 +306,7 @@ Designer MSBuild:Compile - + Designer MSBuild:Compile diff --git a/SourceGen/WpfGui/FormatSplitAddress.xaml b/SourceGen/WpfGui/FormatAddressTable.xaml similarity index 98% rename from SourceGen/WpfGui/FormatSplitAddress.xaml rename to SourceGen/WpfGui/FormatAddressTable.xaml index 6fd8db5..ab05d53 100644 --- a/SourceGen/WpfGui/FormatSplitAddress.xaml +++ b/SourceGen/WpfGui/FormatAddressTable.xaml @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. --> - @@ -55,7 +55,7 @@ limitations under the License. Content="16-bit" Checked="WidthRadio_CheckedChanged"/> - @@ -129,7 +129,7 @@ limitations under the License.