1
0
mirror of https://github.com/fadden/6502bench.git synced 2024-10-31 19:04:44 +00:00
Commit Graph

689 Commits

Author SHA1 Message Date
Andy McFadden
ce1a6d0109 Version 1.8.3 2022-05-18 08:23:32 -07:00
Andy McFadden
b8314b7f30 Version 1.8.3-dev3 2022-05-01 11:10:37 -07:00
Andy McFadden
8b1e70fa58 Expand C64 sprite visualizer
Added fonts and sprite sheets.  Updated documentation.
2022-05-01 11:09:41 -07:00
Andy McFadden
663a3d0230 Version 1.8.3-dev2 2022-05-01 09:03:46 -07:00
Andy McFadden
0878854759 Fix crash in font picker
It's possible to have multiple fonts with the same font family.
Don't use the list add method that throws an exception when it
finds a duplicate key.
2022-04-29 09:00:01 -07:00
Andy McFadden
6e52f9986c Version 1.8.3-dev1 2022-04-06 14:24:53 -07:00
Andy McFadden
d9fe0b5471 Fix crash in OMF converter tool
The OMF converter calls some of the project update routines at a
point where the data file hasn't been fully formed, making it a bit
fragile.
2022-04-06 14:20:11 -07:00
Andy McFadden
0ad30521ec Version 1.8.2 2022-03-07 14:57:28 -08:00
Andy McFadden
42fe037b55 Update copyright date in "about" 2022-03-02 09:37:18 -08:00
Andy McFadden
13dca8b78c More tweaks to def sym editing
If you edit an existing symbol, the "is the label unique" test will
always false-positive match itself, so we have to explicitly handle
that case.  Dialogs like Edit Instruction Operand make things a bit
more complicated because they don't flush results to the symbol
table immediately, which means the symbol we pass into the Edit Def
Symbol dialog to edit isn't necessarily the one we need to exclude
from the label uniqueness test.

The dialog was using the initial value as both "original" and
"initial", which caused some issues.  We now pass both values in.

Also, removed some dead code identified by VS.
2022-03-02 08:13:46 -08:00
Andy McFadden
1e8205159e Version 1.8.2-dev1 2022-02-28 15:12:50 -08:00
Andy McFadden
ca3b6a9adb Fix crash when editing project symbol
The recent tweaks to improve operand editing broke a common case
when creating a project symbol.

Also, tweaked the operand edit case a little more, for the case where
the operand's symbol was entered manually.
2022-02-28 15:03:09 -08:00
Andy McFadden
16cbe5b108 Version 1.8.1 2022-01-22 20:43:00 -08:00
Andy McFadden
740eeff843 Fix display of non-addressable symbols in HTML export
If a symbol is marked as "exported", it is added to the symbol table
generated at the end of the HTML output.  If the symbol identifies a
non-addressable location, we need to show that.

Also, added a header row.
2022-01-12 15:44:29 -08:00
Andy McFadden
55c80fb642 Improve double-click handling in symbols window
Double-clicking on an entry in the symbols window is supposed to take
you to the place where that symbol is defined.  This worked for code
labels but not for project/platform symbols.  We now jump to the
appropriate EQU statement, if one exists.
2022-01-12 15:28:59 -08:00
Andy McFadden
60b024d24e Improve instruction operand edit edge case
The instruction operand editor has a shortcut button for editing a
project symbol.  Attempting to change the comment field twice
without closing the operand editor in between would result in a
complaint about duplicate symbol names.
2022-01-12 14:17:28 -08:00
Andy McFadden
50a954cf4d Change default for "comma-separated bulk data"
The setting determines whether bulk data is displayed as an unbroken
string of hex digits, or as "$xx,$xx,...".  The latter is easier to
read and should be the default.

One place in the code did consider it to be the default, so if the
config file didn't have a value for the setting, the settings UI would
incorrectly show it as enabled.
2022-01-12 13:33:45 -08:00
Andy McFadden
75ccffe393 Update visualization bitmap API
The existing API was better suited to direct color than indexed
color.  The NES visualizer was using a slightly silly hack to avoid
duplicate colors; this has been removed.
2022-01-12 11:48:20 -08:00
Andy McFadden
92f304a030 Minor fixes
Escape '_' in filenames for the recents menu.

Fix status flag update for ROL.
2021-12-23 11:29:29 -08:00
Andy McFadden
27b47b9783 Version 1.8.1-dev1 2021-12-02 11:22:00 -08:00
Andy McFadden
865a5e58f7 Highlight local variable uses
When a single line is selected in a local variable table, highlight
the operands of every instruction that references that variable.
2021-11-25 13:53:25 -08:00
Andy McFadden
5a400ab738 Change highlight region
The ListView style was using "Stretch" for TextBoxes in the code list,
which caused the background of the entire address / label / operand
field to be drawn in the highlight color, rather than just the area
covered by the text.  This is fine for address and label, but it just
felt weird for the operand field because that tends to be very wide
(to accommodate strings, bulk hex data, etc).

There doesn't seem to be a way to specify HorizontalContentAlignment
per-column in WPF.  (Note this is different from HorizontalAlignment,
which *is* is a per-column property.)

This changes the style to use HorizontalContentAlignment=Left, so
the highlight just covers the text.  The only time this causes a
functional change is when you highlight an operand for a line that
doesn't have a label, because instead of highlighting an empty
rectangle you now see nothing at all.  (The address field is still
highlighted though.)
2021-11-17 11:40:36 -08:00
Andy McFadden
33aa0ff004 Add operand highlighting
When a code or data line is selected in the code list, if the operand
is an address inside the file, we highlight the address and label.
It's also useful to highlight the other way: when a code or data line
is selected, find all lines whose operands reference it, and highlight
the operand field.

This is a little trickier because there can be multiple references,
but all of the information we need is in the cross-reference table.
2021-11-17 11:18:23 -08:00
Andy McFadden
399d799ce8 Version 1.8.0 2021-11-14 09:24:40 -08:00
Andy McFadden
399a54efa7 Fix bit rot in sample
Also, use the "uninitialized data" feature in the amper-fdraw
project.
2021-11-14 09:21:15 -08:00
Andy McFadden
4537f24958 Rework tutorial for changes in v1.8
Biggest changes were to the address region handling in Tutorial1
and the use of StdInline.cs for the inline strings in Tutorial4.

Also, fixed the off-by-one error in Tutorial1.
2021-11-14 09:02:53 -08:00
Andy McFadden
713bb74cc0 Update Apple II ROM symbols 2021-11-14 08:24:55 -08:00
Andy McFadden
8d9a27ae0c Minor word-smithing on Tips
Also, tweaked the HTML templates.
2021-11-13 15:46:59 -08:00
Andy McFadden
75a86fbbc3 Fix crash
The code that sets and removes analyzer tags allows you to select a
mix of lines.  If the mix included the header comment, the negative
file offset would cause a crash.
2021-11-13 15:45:49 -08:00
Andy McFadden
d597c386c7 Version 1.8.0-beta1 2021-11-04 16:32:14 -07:00
Andy McFadden
fdf2a0777c Fix trailing backslash issue
If an end-of-line comment ended with '\', the code that "prettifies"
the JSON output would get confused, and would start inserting \r\n
after commas inside comment strings.  This didn't corrupt the project
files, but it did make them look funny, and required manual cleanup.

Added a sample.  This won't catch regressions of this particular
problem because it only happens when you save the file, but if
nothing else it'll act as documentation.
2021-11-04 15:11:59 -07:00
Andy McFadden
3ea07f3eb7 Tweak comment entry UI
End-of-line comments have a couple of guidelines: keep it short, and
don't use non-ASCII characters.  Violating these isn't an error, so
we should be making the text blue rather than red.
2021-11-03 20:23:27 -07:00
Andy McFadden
e622afd929 Tweak DVG visualizer
Adopted the naming conventions from the "Hitch-Hacker's Guide" doc.
Updated some comments.  No change in behavior.
2021-11-03 08:58:17 -07:00
Andy McFadden
d48ab7582f Add Atari DVG visualizer
The DVG format, used for vector games like Asteroids, is the
predecessor to the AVG graphics used in games like Battlezone.

Also, added some extended error checks on wireframe vertices.

Also, minor edits to the README and daily tips.
2021-11-02 08:54:07 -07:00
Andy McFadden
07f5396eee Ignore project/platform symbols in StdInline
External symbols don't have a file offset, so a JSR to an external
address can't reliably be matched to a label.
2021-10-27 20:23:34 -07:00
Andy McFadden
fa04c98dac Correct StdInline behavior for overlapping addresses
The implementation was mapping labels to addresses, then formatting
inline data at the matching address.  This may be incorrect when there
are multiple sections of the file mapped to the same address.  The
correct approach is to record the offsets of the matching labels, and
then do an address-to-offset translation for each JSR.

Also, show a note in the Info window when a JSR has been marked
no-continue by an extension script.

Also, updated Daily Tips.
2021-10-27 16:48:25 -07:00
Andy McFadden
a04557762d Fix keyboard nav after selection jump
If you change the selection by double-clicking in one of the side
windows (References, Notes, Symbols, Messages) and then attempt
to navigate with the arrow keys, the program will appear to hang
briefly, then jump to the start or end of the project and shift the
window focus to something else (like the Help menu in the menu bar).

For reasons I don't fully understand, the behavior is fixed by
removing unnecessary calls to codeListView.Focus().  The calls were
intended to shift input focus to the main ListView, but they're no
longer necessary, and appear to upset WPF.

(issue #113)
2021-10-25 15:45:42 -07:00
Andy McFadden
c59ad5b426 Fix MULTI_MASK pattern for NES PPU flags 2021-10-24 21:22:28 -07:00
Andy McFadden
236cf1d4a3 Allow leading whitespace in .sym65 comments
We allow empty lines and lines that begin with ';' in .sym65.  Lines
with nothing but whitespace, or comments with leading whitespace,
caused a warning.  It can be aesthetically nice to line up the start
of comments, and lines with pointless whitespace aren't problematic,
so we now allow these without complaint.

Added some samples to the 20170-external-symbols data file.  No
change to the test output.
2021-10-24 14:12:45 -07:00
Andy McFadden
6e9ff395d2 Add offset to PlSymbol
It's useful for extension scripts to be able to get the file offset
of symbols in non-addressable regions.  One example of this is CHR
ROM data for an NES cartridge.  However, we were getting the offset
by doing an address-to-offset mapping on the plugin side, which by
definition doesn't work for non-addressable memory.

So we now add the offset to PlSymbol objects for user labels and
address region pre-labels.  The NES visualizer has been updated to
use the new field.

Also, fixed a bogus complaint about bank overruns for non-addressable
regions.
2021-10-23 21:35:30 -07:00
Andy McFadden
1258dd89cb Version 1.8.0-alpha1 2021-10-23 10:57:56 -07:00
Andy McFadden
fa0d88c069 Fix Merlin code gen issue with '{'
Merlin 1.0 chokes on "LDA #'{'".
2021-10-23 10:56:21 -07:00
Andy McFadden
cd937709fa Tweak address region edit dialog
Altered the address region edit UI a little to improve clarity.

Also, close the hex dump viewer window when Escape is hit.  (The
tool windows don't have "cancel" buttons, so the key has to be
handled explicitly.)
2021-10-20 09:06:53 -07:00
Andy McFadden
22c47e1d0b Update reference manual formatting
Switched from XHTML to HTML5.  Added formatting for menu items and
keyboard shortcuts.

Made various minor edits to the text.
2021-10-18 17:56:08 -07:00
Andy McFadden
55f0230e6f Don't use "not" as a label in ACME output
The ACME assembler gets upset if you use "not" as a label.  We now
avoid doing so, using a generalized implementation of the opcode
mnemonic rename code.  (Issue #112.)

Renamed a label to "not" in the 20081-label-localizer test.
2021-10-18 13:04:10 -07:00
Andy McFadden
0fb0b4cca8 Fix some address region issues
Fixed a crash when the listing is refreshed while a .adrend line is
the only thing selected.

Fixed .adrend lines being spammed if the last thing before it is a
multi-byte item, and you edit a comment / note / label on that line.
Harmless, but weird.

Also, added keyboard shortcuts in DefSymbol editor, so you can change
from address to constant with Alt+C.
2021-10-17 18:02:29 -07:00
Andy McFadden
e30c60cb14 Version 1.8.0-dev2 2021-10-16 14:49:51 -07:00
Andy McFadden
d7dbd8d012 Minor tweak to instruction operand editor
If you put a value in the "symbol" field of an instruction with an
address operand, you're establishing a symbolic reference to a label
that may be at a different address than the numeric value of the
operand.  But if you then hit the "edit label" button, you'll edit
the label at the *numeric* reference address, which can be confusing.
We now disable the create/edit label button when the format has been
set to "symbol".

The button is just a short-cut, so disabling it doesn't prevent the
user from doing anything.
2021-10-16 14:46:13 -07:00
Andy McFadden
5ee01ee8a4 Add "StdInline" extension script
Inline strings and 16-bit addresses are sufficiently common that a
general-purpose extension script is useful.
2021-10-16 13:19:21 -07:00
Andy McFadden
adf5726f62 Add daily tips to start screen
The initial screen is largely blank, with just the four large buttons
for new/open/recent1/recent2.  It now also has a "tip of the day" box,
with text and an optional image.

The tips and images are kept in the RuntimeData directory.  They're
small enough that they could have been baked into the binary, but
there's enough other stuff going on there that it didn't seem
necessary.  Also, if the tips annoy you, removing the tips file will
hide the tip UI.

The index of the tip shown is based on the day of the year, modulo
the number of defined tips.  So it will be different every day (with
a bit of hand-waving at the end of the year).
2021-10-16 09:15:28 -07:00