SourceGen creates "auto" labels when it finds a reference to an
address that doesn't have a label associated with it. The label for
address $1234 would be "L1234". This change allows the project to
specify alternative label naming conventions, annotating them with
information from the cross-reference data. For example, a subroutine
entry point (i.e. the target of a JSR) would be "S_1234". (The
underscore was added to avoid confusion when an annotation letter
is the same as a hex digit.)
Also, tweaked the way the preferred clipboard line format is stored
in the settings file (was an integer, now an enumeration string).
In the cross-reference table we now indicate whether the reference
source is doing a read, write, read-modify-write, branch, subroutine
call, is just referencing the address, or is part of the data.
If you double-click on the opcode of "JSR label", the code view
selection jumps to the label. This now works for partial operands,
e.g. "LDA #<label".
Some changes to the find-label-offset code affected the cc65 "is it
a forward reference to a direct-page label" logic. The regression
test now correctly identifies an instruction that refers to itself
as not being a forward reference.
Change 80da6c replaced \u23e9 (black right-pointing double triangle)
with a downward-pointing triangle, because it didn't render under
Win7 or Linux. It was also being used in the "info" window. This
change replaces that occurrence with a right-pointing triangle.
To avoid confusing the assembler, expressions with a leading
parenthesis like "(foo & $ffff) + 1" are prefixed with a "0+". This
is not necessary if the operand begins with a '#'.
(issue #16)
Before you could choose between Merlin-style and generic. Now
there's a combo box that lets you choose Merlin, cc65, or
"common", the latter being used for 64tass.
Gave cc65 its own expression generator, as the precedence table seems
atypical if not unique. Configured 64tass to use the "simple"
expression mode.
Added some operations on a 32-bit constant to 2007-labels-and-symbols
to exercise the current worst-case expression (shift + AND + add).
Tweaked the Merlin expression generator to handle it.
(issue #16)
Changed the "quick config" buttons for the asm config and pseudo-op
tabs into a drop-list and "set" button. The default values for
each assembler are now defined in the Asm*.cs file, rather than in
the settings code.
Rather than have each assembler get its own app config string for
the cross-assembler executable, we now have a collection of per-
assembler config items, of which the executable path name is one
member. The Asm Config tab has an auto-generated pop-up to select
the assembler.
The per-assembler settings block is serialized with the rather
unpleasant JSON-in-JSON approach, but nobody should have to look
at it.
This also adds assembler-specific column widths to the settings
dialog, though they aren't actually used yet.
Most of the decorative items associated with a file offset are
placed before the item in the display list, and given a span of
zero. This yields the correct behavior in a binary search: an
exact match finds the decorative item (e.g. a blank line), while a
match partway into the instruction or multi-byte data item causes
the binary search to move on to the next line, where it's resolved.
The problem is that we were adding a blank line *after* instructions
in the no-continue case. If the binary search found the blank line
before it found the instruction, it would guess "too high" rather
than "too low", and miss the actual instruction line.
We now set a flag and add the blank line as part of the following
item. We do a little dance at the start to ensure that the blank
line doesn't disappear during a partial update.
There's a common convention for using one of the thumb buttons on
the side of the mouse to mean "back", notably in web browsers. I
keep hitting it without thinking about it, so let's just make it
official.
When you edit the operand of an instruction that targets an in-file
address, you're given the opportunity to specify a shortcut that
applies the symbol to the instruction's target address in addition
to or instead of defining a weak symbol reference on the instruction
being edited.
This didn't work right for operands with adjustments, e.g. the store
instructions in self-modifying code. It put the label at the
unadjusted offset, which does nothing useful.
We now correctly back up to the start of the instruction or multi-
byte data area.
Change acf19870 fixed one bug but introduced another: the call to
update the highlight happened before the selection was restored, so
it could potentially refer to a line that no longer existed.
Worked around two crashes in Mono 5.16's WinForms implementation.
(See mono/mono#11070 for the details.)
Still very unstable, but it no longer crashes on startup.
Also, tweaked the "about" box title.
The instruction operand editor and data operand editor are very
different, but there's no need to impose that distinction on the
user. They want to edit the operand either way. We now provide a
single "edit operand" menu item, and open the appropriate dialog
based on what they have selected.
This uses Ctrl+O as the keyboard shortcut, stealing it from
File > Open.
(issue #11)
Two changes:
(1) Code and data hints are now only applied to the first byte on
each selected line. This allows you to slap a code hint on a
string without lighting up the whole string. Inline-data hints
and hint removal work as before.
(2) Added a menu item (with Ctrl+D as shortcut) to toggle the state
of the uncategorized data analyzer. This makes it easy to turn
off the feature that put the code into a string in the first
place.
Every once in a while, SourceGen will become unresponsive when it
tries to show a MessageBox. In the debugger you can see the GC
running frantically, but the stack trace is just sitting on the
MessageBox show call. Apparently, if you don't specify a parent
window argument, the MessageBox will occasionally end up behind
everything else, and you can get stuck.
I'm not sure what the GC frenzy is about, or whether this will fix
what I'm seeing, but it's easy to do and might solve the problem.
cf. https://stackoverflow.com/q/3467403/294248
Don't enable OK unless at least one address is valid.
Don't apply code hints unless asked.
Rename a couple of things for clarity.
Add documentation to manual.
(issue #10)
Allows specification of table data in various ways, for 16-bit and
24-bit addresses. Shows a preview so you can see if the addresses
look about right. Adds permanent labels at target offsets if none
are present. Optionally sets code hints.
Works beautifully on the A2-Amper-fdraw example, but needs some
additional testing, documentation, etc. Dialog is more complicated
that I would have liked, mostly because of 65816 support, but I
think it'll do.
(issue #10)
The Symbols window showed Type-Name-Value, which feels like the
natural order. However, the Value field has a narrow max width,
while the Name field can get pretty long. It makes more sense to
let Name fill out to the right edge, allowing the user to scroll
horizontally to view longer-than-usual names.
Also, noticed that the column sort preference wasn't being
restored. Fixed that.
(Issue #12)
If the main window was maximized before, maximize it when we
restart.
Changed the preferences to record the width of the right panels,
rather than the splitter distance, which is actually the width of
the middle of the screen.
Seems to work correctly on my non-uniform multi-monitor setup. I
added a check to confirm that the middle of the title bar falls in
the working area of the screen that WinForms thinks we're in, so it
shouldn't be possible to "lose" a window off the edge by dragging
it or by changing screen resolutions.
Updated the RuntimeData directory finder to work, and made the
stuff that crashed when the directory wasn't found crash in less
obvious ways. Under Mono+Linux it still falls over with some
complaints about ListViews. This will need some work.
The code that tries to make the last column of the Symbols and
References windows exactly fit the window goes into an infinite
loop for everybody except me. I'm removing the feature for now.