1
0
mirror of https://github.com/fadden/6502bench.git synced 2025-08-05 09:25:39 +00:00
Commit Graph

954 Commits

Author SHA1 Message Date
Andy McFadden
7fdf459899 Version 1.9.2-dev3 v1.9.2-dev3 2025-06-27 15:11:28 -07:00
Andy McFadden
b6e6363234 Add "find all" feature
This uses the same (very weak) string search as the current Find
feature, but does it over the entire file.  Matches are added to a
table of results and displayed in the same dialog used by the
References panel "copy out" feature.

The reference table now jumps to a Location rather than just the
closest offset, so that we can jump to the middle of a multi-line
comment.
2025-06-27 15:00:38 -07:00
Andy McFadden
afd55d36e3 Add "always on top" checkbox to reference table
It's annoying to have to go digging for the dialog.  The default
setting is "true", and the value is remembered for the duration of
the current session.
2025-06-27 13:21:36 -07:00
Andy McFadden
10aa22c483 Tweak Edit Operand Target Label
If an instruction or data operand has been given an explicit symbol,
the user will expect to edit the label at that address rather than
the numeric address.  Same for project symbols.  If we detect that
a symbol has been set, edit that directly.  If the symbol doesn't
exist, or isn't a user label or project symbol (e.g. platform symbol
or address region pre-label), we open the full operand editor instead.
2025-06-27 13:07:38 -07:00
Andy McFadden
0d64e0a94f Handle LVT entries for operand target label edits
The "edit operand target label" feature now handles local variables.
The individual symbol is edited in the table, the same way it would
if the appropriate option were selected from the Edit Instruction
Operand dialog.

Also, show the address in the Edit Label dialog.  It feels
unobtrusive and is occasionally useful.
2025-06-26 09:59:54 -07:00
Andy McFadden
8ab6294c8f Version 1.9.2-dev2 v1.9.2-dev2 2025-06-22 15:12:42 -07:00
Andy McFadden
ab5818a204 Add "copy out" button to References window
The References window is handy for seeing everything that refers to
a particular address or symbol, but walking through the list is
annoying because the window gets reset every time you double-click
on an entry and the selection moves.

This adds a "copy out" button that copies the references to a
floating window.  References can be double-clicked as usual, but the
list doesn't update unless you click "copy out" again.

This might be better if it were somehow integrated into the main
window, e.g. as a tab in the Info panel, so that the focus isn't
bouncing between two independently Z-ordered windows.
2025-06-22 13:44:53 -07:00
Andy McFadden
ab0a93112f Version 1.9.2-dev1 v1.9.2-dev1 2025-06-21 17:35:12 -07:00
Andy McFadden
0eb417ac46 Add "edit operand target label" action
This adds a shortcut for editing the label at the address referenced
by an instruction operand or data address pseudo-op.  This can be
activated from the Actions menu, or with Ctrl+Shift+L.

For references inside the file, the Edit Label dialog is opened.  For
external addresses, the project symbol editor is opened.

Local variable table entries are currently not supported.

(issue #166)
2025-06-21 17:31:49 -07:00
Andy McFadden
898307eb73 Tweak instruction operand edit
The code that allowed easy editing of project symbol operands wasn't
handling overlapping multi-byte regions correctly.

This adds a new section to the 20200-ui-edge-cases test case that has
instructions with various kinds of address operands.
2025-06-19 09:23:37 -07:00
Andy McFadden
bde4f2ed07 Tweak Merlin32 generator
Merlin32 v1.2 requires DSK and TYP directives.  We now add these if
version 1.2 is detected.  (Earlier versions of Merlin32 accept them,
so at some point we may just want to output them always.)

The version-parsing code has been updated to deal with pre-release
version strings.
2025-05-04 07:58:49 -07:00
Andy McFadden
913dfb5dd2 Version 1.9.1 v1.9.1 2025-01-19 14:07:38 -08:00
Andy McFadden
c7090c9c52 Update comment 2024-12-22 20:25:43 -08:00
Andy McFadden
83ed8ed5d9 Minor updates 2024-09-17 15:11:03 -07:00
Andy McFadden
5aaaf43bf9 trivial change to nudge github 2024-09-17 13:20:26 -07:00
Andy McFadden
89be1a5800 Version 1.9.1-dev1 v1.9.1-dev1 2024-09-15 13:35:45 -07:00
Andy McFadden
ec9017cbc3 Add "omit implicit acc operand" feature
By default, implicit acc operands are shown, e.g. "LSR A" rather
than just "LSR".  I like showing operands for instructions that
have multiple address modes.

Not everyone agrees, so now it's a setting.  They're shown by default,
but enabling the option will strip them on-screen, in generated
assembly, and in the instruction chart.

They are always omitted for ACME output, which doesn't allow them.

(issue #162)
2024-09-15 13:29:04 -07:00
Andy McFadden
6c2eee806b Update tool reference 2024-08-19 13:12:53 -07:00
Andy McFadden
ba28d42536 Version 1.9.0 v1.9.0 2024-08-19 13:08:15 -07:00
Andy McFadden
eef1710d5d Update tutorial
Two main changes:
 - "Seek nearby targets" is no longer enabled by default.
 - The application asks the user to save new projects immediately.

Various minor edits were also made.

A couple of the images are slightly stale, showing ".org" rather than
".addrs", but they're in the advanced section and the difference
isn't notable.
2024-08-19 13:03:16 -07:00
Andy McFadden
5544014b71 Fix weird error message
When creating a new project, we now put up a "save as" dialog.  If
you cancel out of the dialog, and have auto-save enabled, we post a
strange message about being unable to create a file with an empty
filename string.
2024-08-09 20:26:46 -07:00
Andy McFadden
69d3cd1867 Version 1.9.0-alpha2 v1.9.0-alpha2 2024-08-09 20:17:26 -07:00
Andy McFadden
3a349b2761 Tweak 2024-08-09 20:15:13 -07:00
Andy McFadden
fca742e890 Auto-save, part 3 (of 3)
Added the recovery file check when a project is opened, and the GUI
elements for choosing which file to use.

If a recovery file exists but can't be opened, presumably because it's
open by another process, offer to open the project read-only.  (This
is a generally good idea, but we don't hold the project file open
in normal usage, so it only works when auto-save is enabled.)

After making a choice, auto-save is disabled until the first manual
save.

One thing we don't do: if we find a recovery file, but auto-save is
disabled, the recovery file won't be deleted after the user makes a
choice.  This might be a feature.

Updated documentation.

(issue #161)
2024-08-09 13:42:12 -07:00
Andy McFadden
1b2353c259 Auto-save, part 2
Periodically save the project to the recovery file if changes have
been made and the project is "dirty".

We need to handle a couple of things specially.  If the user uses
"Save As" to change the project name, we need to recreate the recovery
file as well.  If auto-save is enabled or disabled in app settings, we
need to create or discard the recovery file, and possibly change the
timer interval.  If the project is modified, auto-saved, and then the
change is un-done, the project won't be dirty, but will have a stale
recovery file with a newer modification date; we handle this by simply
truncating the stale recovery file.

To reduce the amount of auto-saving, we don't do an initial write to
the recovery file, and we reset the timer every time the user does a
manual save.  A user who saves diligently will always have an empty
recovery file.
2024-08-07 17:55:54 -07:00
Andy McFadden
3d4250cbc4 Auto-save, part 1
Added configuration option to app settings.  It's in the "code view"
tab, which isn't quite right, but none of the others fit better.

Also, force a Save As when a new project is first created.
2024-08-02 13:47:39 -07:00
Andy McFadden
ef13101923 Clarify some app settings
The pop-up that lets you choose which assembler to set configuration
options for looked like it let you choose an assembler generally.
Changed some wording and visuals for better clarity.
2024-08-01 15:08:43 -07:00
Andy McFadden
c78f1c945e Disable "seek nearby targets" for new projects
It's really handy for certain types of programs, but it's a
distraction in many others.  I find myself turning it off for most
things.

Some changes will be needed in the tutorial, which makes use of
the feature.  (The "odds & ends" section discusses it in detail.)
I'm putting that off until other changes are in.
2024-08-01 09:08:18 -07:00
Andy McFadden
ccead47529 Version 1.9.0-alpha1 v1.9.0-alpha1 2024-07-20 13:06:08 -07:00
Andy McFadden
b6a5408fbc Fix MLC equality operator 2024-07-20 13:05:50 -07:00
Andy McFadden
b946207e91 Tweak previous 2024-07-10 07:56:23 -07:00
Andy McFadden
b913541da4 Fix handling of operand wrap len == 0
This was supposed to select the default wrap length, but was actually
returning zero, causing a crash when a project was opened if the
settings file didn't happen to have the value specified.
2024-07-09 16:10:00 -07:00
Andy McFadden
ba9d6e7924 Version 1.9.0-dev3 v1.9.0-dev3 2024-07-08 14:09:01 -07:00
Andy McFadden
5c6d1b5016 Project/platform syms for address table formatting
The address table formatter tries to map the calculated addresses
to offsets within the file.  When that fails, it currently just
gives up.

We now try to resolve external addresses to project/platform symbols.

(issue #160)
2024-07-08 10:09:38 -07:00
Andy McFadden
5a560aa9eb Fancy comments, part 5 (of 5)
Added a "format help" button to the long comment edit window.  This
brings up a quick summary of the format tags in a modal dialog.

Updated documentation and tutorial.
2024-07-07 18:12:29 -07:00
Andy McFadden
15d3d123a5 Fancy comments, part 4
Handle [box] and [url] tags.  Dropped [sym].
2024-07-07 16:04:35 -07:00
Andy McFadden
227cdaab30 Fancy comments, part 3
Handle [br], [hr], [hr char='x'], and [width=nn].
2024-07-07 08:48:58 -07:00
Andy McFadden
1c84357bbf Fancy comments, part 2
Started implementing the fancy formatter.  It currently doesn't do
anything fancy, just word-wrapping.

Moved the static DebugShowRuler field into Formatter, so that the
cached data is discarded when the setting changes.

Also, updated SourceNotes with instructions for publishing a release.
2024-07-06 15:01:24 -07:00
Andy McFadden
83da0d952c Fancy comments, part 1
Added a "fancy" flag to MultiLineComment.  If set, we will use
formatting commands embedded in the text itself.  The max width pop-up
and "boxed" flag will be ignored in favor of width and boxing
directives.  (See issue #111.)

The current "fancy" formatter is just a placeholder that folds lines
every 10 characters.

Removed FormattedMlcCache (added two changes back).  Caching the
rendered string list in the MLC itself is simpler and more efficient
than having a separate cache, and it works for Notes as well.

Added anchors for more comments in the 20090 test.
2024-07-04 17:25:21 -07:00
Andy McFadden
14cacb4274 Eliminate BoxLineCommentDelimiter
This was used to prefix boxed lines with a comment delimiter, but
in practice we just need to do this whenever the box character
doesn't match the full-line comment delimiter.

This has no effect on generated assembly output, but the on-screen
(and exported HTML) form will now reflect the current settings.
2024-07-04 10:32:24 -07:00
Andy McFadden
54d559ad50 Add formatted MLC cache
Multi-line comments (MLCs) can span multiple lines, and are formatted
with word-wrapping.  This isn't too expensive now, but languages
with immutable strings aren't ideal for this sort of thing.  Before
we introduce fancier formatting, we want to ensure that we're not
going to adversely affect rendering performance.

The cache entry for a given offset is tied to the MLC object and the
Formatter; if either are changed, the cached string list will not be
used.
2024-07-02 14:49:17 -07:00
Andy McFadden
b1ca87e3c8 Fix Applesoft shape table visualizer
An edge case wasn't being handled correctly.
2024-06-28 13:45:57 -07:00
Andy McFadden
9784ad043e Use '*' for full-line Merlin comments
While it's okay to use ';', the classic Merlin editor will treat it
as an end-of-line comment and shove the entire thing off to the right
side of the screen.

This adds a configuration item to the app settings, with a default
value of ';'.
2024-06-26 10:54:46 -07:00
Andy McFadden
18674e6627 Rework Formatter.FormatConfig
It was defined as a struct with exposed fields.  Now it's a class
with simple properties.  Default values are set explicitly, and
the contents are copied with a copy constructor instead of using
the struct member assignment.

The only functional change should be that the DelimiterSet members
are now properly cloned.  The bulk of the changes are just refactoring
renames for the property names.

This also adds comments for all the properties.
2024-06-24 16:36:27 -07:00
Andy McFadden
967d468c58 Version 1.9.0-dev2 v1.9.0-dev2 2024-06-01 13:52:08 -07:00
Andy McFadden
c05b5b3a28 Fix sgmanual index 2024-06-01 13:40:34 -07:00
Andy McFadden
7ca11b0889 Use Merlin 32 "putbin" directive
I had missed the existence of Merlin 32's PUTBIN directive, which
provides the binary include feature.
2024-06-01 10:24:41 -07:00
Andy McFadden
4e5c34f457 Binary includes
This adds a new data format option, "binary include", that takes a
filename operand.  When assembly sources are generated, the section
of file is replaced with an appropriate pseudo-op, and binary files
are generated that hold the file contents.  This is a convenient way
to remove large binary blobs, such as music or sound samples, that
aren't useful to have in text form in the sources.

Partial pathnames are allowed, so you can output a sound blob to
"sounds/blather.bin".  For safety reasons, we don't allow the files
to be created above the project directory, and existing files will
only be overwritten if they have a matching length (so you don't
accidentally stomp on your project file).

The files are not currently shown in the GenAsm dialog, which lets
you see a preview of the generated sources.  The hex dump tool
can do this for the (presumably rare) situations where it's useful.

A new regression test, 20300-binary-include, has been added.  The
pseudo-op name can be overridden on-screen in the settings.

We don't currently do anything new for text/HTML exports.  It might
be useful to generate an optional appendix with a hex dump of the
excised sections.

(issue #144)
2024-05-31 14:22:39 -07:00
Andy McFadden
fa5d9ba890 Version 1.9.0-dev1 v1.9.0-dev1 2024-05-23 10:27:45 -07:00
Andy McFadden
3b20566b10 Minor tweaks
Note that address region isolation doesn't prevent explicit label
references from working (add update the test to prove it).

Added a note about pre-label xrefs.
2024-05-22 14:02:53 -07:00