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

84 Commits

Author SHA1 Message Date
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
Andy McFadden
da91f86043 Get 64tass expressions working
We now insert parenthesis as needed.  This can cause problems in
some situations, so we always prefix parenthetical expressions with
"0+", which looks goofy and is unnecessary for immediate operands.
But it does generate working source code.

Renamed the "simple" expression mode to "common", as it's not
particularly simple but is what you'd expect most assemblers to do.
(OTOH, life has been full of surprises.)

(issue #16)
2018-10-24 14:57:09 -07:00
Andy McFadden
61914c8f79 Progress toward 64tass expression support
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)
2018-10-24 13:17:03 -07:00
Andy McFadden
f26a03869a Finish the underscore handling in the label localizer
Correctly handle pre-existing underscores and avoidance of
"reserved" labels.

Also, add more underscores to 2012-label-localizer to exercise
the code.

(issue #16)
2018-10-23 20:40:09 -07:00
Andy McFadden
f7e5cf2f45 Progress toward 64tass support
Most tests pass, but 2007-labels-and-symbols fails because the
expressions recognized by 64tass don't match up with either of the
other assemblers.

This is currently using a workaround for the local label syntax.
64tass uses '_' as the prefix, which is unfortunate since SourceGen
explicitly allowed underscores in labels.  (So does 64tass for that
matter, but it treats labels specially when the '_' comes first.)
We will need to rename any non-local user labels that start with '_'.

(issue #16)
2018-10-23 20:08:01 -07:00
Andy McFadden
eec37b684e Split C64 system def into .PRG/.BIN
One starts with a 16-bit load address, one does not.  Not sure
this is the right way to go, but it's worth a try.

(issue #33)
2018-10-23 12:30:19 -07:00
Andy McFadden
96ee33ae8c Optionally add spaces in the "bytes" column
Affects the display list and copy/paste text.  Makes the column
three spaces wider, but makes it easier to read.
2018-10-21 21:08:48 -07:00
Andy McFadden
80da6cc1df Replace symbol used to indicate embedded instructions
We were using \u23e9, BLACK RIGHT-POINTING DOUBLE TRIANGLE, but
neither Win7 SP1 nor Linux was able to display the glyph.  It also
gets all puffy in web browsers.  We now use \u25bc, BLACK
DOWN-POINTING TRIANGLE, which seems to work everywhere.  It also
feels more appropriate, because it appears next to the "containing"
opcode, with the embedded instruction appearing on the following
line.
2018-10-21 18:46:03 -07:00
Andy McFadden
7f06fdc079 Define a max asm column width 2018-10-21 17:51:07 -07:00
Andy McFadden
59f79645d2 Update docs for new assembler configuration scheme 2018-10-21 16:54:44 -07:00
Andy McFadden
ab9287fef8 Progress toward new assembler configuration
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.
2018-10-21 16:36:48 -07:00
Andy McFadden
9aabd988a8 Progress toward new assembler configuration
Use configured column widths when generating output.

The regression test always uses the assembler-preferred default
widths.
2018-10-20 21:24:28 -07:00
Andy McFadden
4f9af30455 Progress toward new assembler configuration
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.
2018-10-20 20:35:32 -07:00
Andy McFadden
f81c534d25 Merge Gen* and Asm* source files
Each supported assembler has an IGenerator interface and an
IAssembler interface.  They're still two separate classes, but now
both are implemented in the same source file.  (They'll probably
stay separate classes, since the two have little interaction.)

I'm keeping the "Asm*" filename.  Seems the more natural fit.

Also, changed AssemblerInfo to try to get all assembler-specific
stuff into a single table.
2018-10-17 13:50:28 -07:00
Andy McFadden
42e5223efb Version 1.1.0-dev1 2018-10-17 13:11:12 -07:00
Andy McFadden
1756fa081b Version 1.0.0 2018-10-16 10:32:48 -07:00
Andy McFadden
25b7faf43b Hex dump shows file offset, not address 2018-10-15 17:24:32 -07:00
Andy McFadden
23a4852838 Fix goto-by-offset
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.
2018-10-15 14:13:59 -07:00
Andy McFadden
46cb5ac6ce Version 1.0.0-beta2 2018-10-12 10:04:16 -07:00
Andy McFadden
a47e5bb895 Minor tweak to note formatting 2018-10-11 17:51:32 -07:00
Andy McFadden
e8d7057c2f Make the codeListView column-width setting work like the others
Don't serialize on every column change, just mark app settings as
"dirty" and box it up before writing the settings file.
2018-10-11 17:19:09 -07:00
Andy McFadden
2b6a76fad0 Recognize mouse thumb-button for navigate-back
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.
2018-10-11 17:03:08 -07:00
Andy McFadden
b97f7ca3d8 Fix add-label shortcut for adjusted operands
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.
2018-10-11 16:48:55 -07:00
Andy McFadden
b97a25797a Add some more Applesoft zero-page locations 2018-10-11 16:48:30 -07:00
Andy McFadden
ec33c74cd5 Add symbols for Atari Lynx
Another system I know nothing about.
2018-10-11 14:51:54 -07:00
Andy McFadden
26f8a01b5d Add a C128 Kernal entry point list
Looks like the C64 stuff is also available to the C128, so include
this and the C64 defs in the C128 system definition.
2018-10-11 10:46:47 -07:00
Andy McFadden
1ad4bcb150 Add a C64 Kernal entry point list
I know nothing about the C64, but there's a lot of info on the web.
This stuff looked important.

(issue #19)
2018-10-11 10:01:04 -07:00
Andy McFadden
457c981a2e Fix selection highlight update call
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.
2018-10-10 17:37:24 -07:00
Andy McFadden
a4e3680655 Remove some test symbols from Cxxx-IO 2018-10-10 16:41:33 -07:00
Andy McFadden
52388b4065 Update some comments 2018-10-10 16:41:03 -07:00
Andy McFadden
9363c3d852 Show a warning when running under Mono 2018-10-10 12:32:12 -07:00
Andy McFadden
b7dc8e1711 Improve behavior under Mono
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.
2018-10-10 11:07:04 -07:00
Andy McFadden
275c6dec8c Version 1.0.0-beta1 2018-10-09 20:34:47 -07:00
Andy McFadden
acf19870c2 Add advanced tutorial
Also, fixed a bug where the operand highlight would get out of sync
after an edit.
2018-10-09 14:55:16 -07:00
Andy McFadden
fd6d8273a9 Add custom flag updaters for ROL/ROR
There are some useful interactions between C/N and maybe Z.  Added
a quick test to 1003-flags-and-branches.

Also, updated the 2008-address-changes tests.  Change b37d3dba
extended the nearby-target range of out-of-file symbols by one, so
one line that didn't get an operand label now does.
2018-10-09 13:15:41 -07:00
Andy McFadden
0851746123 Merge branch 'master' of https://github.com/fadden/6502bench 2018-10-09 10:24:37 -07:00
Andy McFadden
705c6e383b Clean up HTML in manual 2018-10-09 10:04:10 -07:00
Andy McFadden
e31de84641 Add remaining Applesoft BASIC tokens 2018-10-08 18:03:04 -07:00
Andy McFadden
c182ecba35
Fix items in angle brackets 2018-10-08 17:11:03 -07:00
Andy McFadden
a83e4a2b8e Move menu items back to Actions menu when context menu closes
Otherwise you can't open the Actions menu with Alt-A.  This seems
like a flaw in WinForms, but maybe there's a reason for it.

(issue #26)
2018-10-08 16:25:34 -07:00
Andy McFadden
d728025144 Support command-line invocation 2018-10-08 16:18:56 -07:00
Andy McFadden
2c03216da9 Move symbol file and extension script docs into manual
Once upon a time, symbol files and extension scripts could only be
defined in the RuntimeData directory, so having the documentation
there made sense.  Since both of these things can now be defined in
project directories, the documentation belongs in the manual.

(issue #27)
2018-10-08 15:30:43 -07:00
Andy McFadden
b37d3dba02 Expand reach of external symbol nearby-target test
If PTR is defined as an external symbol, we were automatically
symbol-ifying PTR+1.  Now we also symbolify PTR+2.  This helps with
24-bit pointers on the 65816, and 16-bit "jump vectors", where the
address is preceded by a JMP opcode.

Removed the "AMPERV_" symbol I added to make the tutorial look
right.
2018-10-08 13:15:16 -07:00