1
0
mirror of https://github.com/fadden/6502bench.git synced 2024-07-07 07:28:57 +00:00
Commit Graph

126 Commits

Author SHA1 Message Date
Andy McFadden
d97d715ae3 Version 1.3.0-dev1 2019-08-02 17:25:55 -07:00
Andy McFadden
98914e9f80 Treat BRK as a 1-byte instruction
The 65816 definition makes it a two-byte instruction, like COP.  On
the 6502 it acted like a two-byte instruction, but in practice very
few assemblers treat it that way.  Very few humans, for that matter.
So it's now treated as a single byte instruction, with the following
byte encoded as a data value.
2019-08-02 17:21:50 -07:00
Andy McFadden
0616e4e4a4 Define interfaces for inline call handlers and BRK
Instead of providing no-op CheckJsr/CheckJsl, plugins now declare
which calls they support by defining interfaces on the plugin class.

I added a CheckBrk call for code like Apple /// SOS calls, which
use BRK as an OS call mechanism.  The formatting doesn't work quite
right yet because I've been treating BRK as a two-byte instruction.
Hardly anything else does, and I think it's time I stopped (but not
in this commit).

Note: THIS BREAKS ALL PLUGINS that use the inline JSR/JSL feature,
which is pretty much all of them.
2019-08-02 16:06:27 -07:00
Andy McFadden
d41266442d Make the "continue" button actually do something 2019-08-02 16:00:58 -07:00
Andy McFadden
1219755e85 Remove WinForms code 2019-08-02 12:48:12 -07:00
Andy McFadden
be47b8912b Version 1.2.0 2019-07-29 14:00:13 -07:00
Andy McFadden
4aee3af089 Various doc fixes 2019-07-29 13:20:03 -07:00
Andy McFadden
330b4a238a Version 1.2.0-beta1 2019-07-21 16:56:25 -07:00
Andy McFadden
4f74430757 Minor fixes
- Updated the tutorial to track changes to WPF, and to clarify
  existing content.
- Fixed Ctrl+H Ctrl+C, which was getting masked by the Copy command
  handler.
- Fixed initial selection of address in Set Address.
2019-07-21 15:24:39 -07:00
Andy McFadden
02f6e884d7 Fix startup issues
- MakeDist now copies CommonWPF.dll.
- Spent a bunch of time tracking down a null-pointer deref that only
  happened when you didn't start with a config file.  Fixed.
- The NPE was causing the program to exit without any sort of useful
  diagnostic, so I added an uncaught exception handler that writes
  the crash to a text file in the current directory.
- Added a trace listener definition to App.config that writes log
  messages to a file, but it can't generally be enabled at runtime
  because you can't write files from inside the sandbox.  So it's
  there but commented out.
- Made the initial size of the main window a little wider.
2019-07-20 17:36:12 -07:00
Andy McFadden
06e28f89d1 Tweak window size 2019-07-20 13:30:30 -07:00
Andy McFadden
c64f72d147 Move WPF code from SourceGenWPF to SourceGen 2019-07-20 13:28:37 -07:00
Andy McFadden
e3906e021b Move WinForms code to SourceGenWF 2019-07-20 13:02:54 -07:00
Andy McFadden
e49ee6f20b Finish split-address table formatter
A lot of things react to other things in this dialog.  I think I
got everything behaving correctly.
2019-07-13 15:55:32 -07:00
Andy McFadden
9aa8b5c9a7 Minor documentation updates
Also, placate consistency hobgoblins.
2019-07-06 10:58:24 -07:00
Andy McFadden
9e525d1428 Populate symbol table, with filtering and sorting
The filtering uses the DataGrid View filtering mechanism.  The
built-in sorting only operates on a single column, and we really
want a secondary sort on label when the type is used as the key,
so we provide a custom sort method.
2019-06-12 15:14:21 -07:00
Andy McFadden
da825d3114 Make ResetList() 1000x faster
Rather than sending 540,000 "item has changed" events, send a
single "collection reset" message.
2019-05-30 16:30:59 -07:00
Andy McFadden
823aa072fb Update comments 2019-04-29 13:07:52 -07:00
Andy McFadden
ab590c5a2a Version 1.1.0 2019-04-19 14:54:10 -07:00
Andy McFadden
6185b85f7b Fix crash on asm gen when no settings file exists 2019-04-19 14:43:33 -07:00
Andy McFadden
6998eb4021 Minor doc edits
Added Ctrl+W to the tutorial.  Named the 64tass executable.
Performed various acts of word-smithing.
2019-04-19 14:10:48 -07:00
Andy McFadden
8d0ce87ec7 Experiment on uncategorized data analysis
Tried something to speed it up.  Didn't help.  Cleaned up the code
a bit though.
2019-04-18 15:58:43 -07:00
Andy McFadden
61d6cd597a Document the auto-label style setting 2019-04-15 16:04:11 -07:00
Andy McFadden
ba44774810 Version 1.1.0-dev3 2019-04-15 15:35:49 -07:00
Andy McFadden
97a372a884 Add selectable auto-label styles
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).
2019-04-15 15:14:04 -07:00
Andy McFadden
47b1363738 Add more detail to cross references
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.
2019-04-11 16:23:02 -07:00
Andy McFadden
84eceee085 Note removal of cc65 limitation 2018-11-18 15:20:12 -08:00
Andy McFadden
2065f4ef9e Attempt to generate segment names for cc65
This worked, sort of.  The problem is that SourceGen will revert to
hex output in certain situations, such as a broken symbolic
reference.  There happens to be one in the ZIPPY example, and it's
on a relative branch.

The goal with the segment stuff is to allow cc65 to treat the
source as relocatable code.  In that context, a relative branch to
an absolute address doesn't make any sense, so the assembler reports
a range error.

We don't currently have a mechanism that guarantees no references
are broken (and no affordance for finding them), so we can't make
this mode the default yet.

Instead, we continue to use the generic config, but generate the
correct set of lines as comments.

(issue #39)
2018-11-18 15:11:29 -08:00
Andy McFadden
17f0faa845 Add linker config scripts to cc65 generator output
The system configuration you get with "-t none" works for smaller
files but fails for larger ones.  This updates the generator to
produce a source file and linker script pair.  (I kinda saw this
one coming -- it's why the gen/asm dialog has a combo box for the
file preview -- so it didn't require that much work.)

This currently generates a fixed script for a generic system with
64KiB of RAM, using .ORGs to set the addresses as before.

With this change, assembling a file with 65536 NOPs succeeds.

(issue #39)
2018-11-18 14:28:44 -08:00
Andy McFadden
47acf92c2c Version 1.1.0-dev2 2018-11-12 10:12:27 -08:00
Andy McFadden
0e1530fe0f Add Actions > Format As Word (Ctrl+W)
Formats a pair of bytes into a 16-bit word.  As a special case,
attempts to grab the next byte if only one byte is selected.

(issue #29)
2018-11-11 17:25:02 -08:00
Andy McFadden
f5b36afd2e Add a bit to the tutorial
In the data operand edit section, walk through selecting a single
byte vs. multiple bytes when you want to set a multi-byte format.

(inspired by issue #41)
2018-11-08 11:54:33 -08:00
Andy McFadden
2f74fce80b Expand set of things that work with double-click on opcode
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.
2018-11-03 15:03:25 -07:00
Andy McFadden
a7e6b101c4 Upgrade "discard changes" dialog
Was a yes/no MessageBox, now it's a three-way with the option to
save your changes before continuing.
2018-11-03 14:36:01 -07:00
Andy McFadden
5b1dde290a Show assembler options in header comment 2018-11-03 14:02:52 -07:00
Andy McFadden
09d6512dd2 Note a cross-asm bug 2018-11-02 17:09:02 -07:00
Andy McFadden
a88c746419 Work around cc65 single-pass behavior
The cc65 assembler runs in a single pass, which means forward
address references default to 16 bits.  For zero-page references
we have to add an explicit width disambiguator.  (This is an
unusual situation that only occurs if you have a zero-page .ORG
in the file after code that references it.)

With this change, 2014-label-dp passes, and no other regression
tests were affected.

(issue #40)
2018-11-02 15:32:54 -07:00
Andy McFadden
c80be07f73 Work around Merlin 32 instruction parsing bug
The 2014-label-dp test now passes.  Prior regression tests are
unaffected.

Also, renamed an IGenerator interface to more accurately reflect
its role.

(issue #37)
2018-11-02 13:49:27 -07:00
Andy McFadden
2096bd2c66 Document another assembler quirk
(see issue #39)
2018-10-31 15:28:01 -07:00
Andy McFadden
7aa3e4dbcd Show "assembling" when assembling
Merlin 32 is slow enough with a 64K data file that you have
enough time to read the text.
2018-10-30 16:41:56 -07:00
Andy McFadden
50e8be186a Add 2014-label-dp
This is primarily to exercise a Merlin 32 failure (issue #37).
However, it also exercises a problem with cc65 (issue #40).
Currently, only 64tass can assemble this project.
2018-10-30 16:07:35 -07:00
Andy McFadden
3cb1596d90 Add more bugs & quirks 2018-10-30 15:42:13 -07:00
Andy McFadden
e995747cb0 Code cleanup
Should be no change in behavior.

(issue #32) (issue #35) (issue #36)
2018-10-29 15:48:19 -07:00
Andy McFadden
f307ffe8c0 Replace another instance of double-arrow glyph
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.
2018-10-29 12:59:58 -07:00
Andy McFadden
18994ef772 Update comments 2018-10-27 12:46:10 -07:00
Andy McFadden
c46afe377e Document the "spaces in bytes column" feature 2018-10-27 12:34:59 -07:00
Andy McFadden
372eea385d Clarify 2018-10-26 15:59:00 -07:00
Andy McFadden
a8af7e8794 Improve the "common" expression formatter
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)
2018-10-26 15:45:39 -07:00
Andy McFadden
975ae1eb28 Speculative fix for reported FormatDataOp crash
This adds a null check on the dfd argument in FormatDataOp() to see
if we can prevent a crash.  The opcode/operand are presented as
"!FAILED!" to make it obvious to the user that something has gone
wrong.  Hopefully this will allow capture of a project that exhibits
the problem.
2018-10-26 15:19:27 -07:00
Andy McFadden
2cb6b55802 Generalize expression style setting
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.
2018-10-24 17:23:30 -07:00