1
0
mirror of https://github.com/fadden/6502bench.git synced 2024-07-06 16:29:03 +00:00
Commit Graph

80 Commits

Author SHA1 Message Date
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
17cccae131 Update Mono compatibility info 2018-10-12 10:43:28 -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
3d0937be0a Tweak 2018-10-09 17:34:21 -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
3cb4696598 Merge branch 'master' of https://github.com/fadden/6502bench 2018-10-08 18:05:21 -07:00
Andy McFadden
5cc29949dd
Update README.md 2018-10-08 18:05:07 -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
1fad470b20
Nudge 2018-10-08 17:06:33 -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
Andy McFadden
3a001c5f8a Merge menu items for "edit operand" and "edit data"
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)
2018-10-08 12:49:26 -07:00
Andy McFadden
9be99a7cac Make hint application less annoying
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.
2018-10-07 21:55:44 -07:00
Andy McFadden
93c76e219f Add keyboard shortcuts for applying hints
Each is a two-key combo.  Hit Ctrl+H, then Ctrl+C/D/I/R as desired.
Hitting Ctrl+H followed by any other key results in an error beep.
2018-10-07 21:13:37 -07:00
Andy McFadden
360204a16d Add parent window to all MessageBox.Show() invocations
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
2018-10-07 13:13:00 -07:00
Andy McFadden
74037928ee Version 1.0.0-alpha3 2018-10-07 12:22:01 -07:00
Andy McFadden
b4d47df637 Add split-address table formatting to tutorial
Also, show generated symbol name in preview list.
2018-10-07 10:39:41 -07:00
Andy McFadden
d20ffc73b8 Tweak README 2018-10-06 21:21:18 -07:00
Andy McFadden
309cc88a54 Improve split-address table formatter
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)
2018-10-06 21:15:59 -07:00
Andy McFadden
f4e4ac842d First cut of split-address table formatter
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)
2018-10-06 18:05:31 -07:00
Andy McFadden
d4726dac7e Rough prototype of split-address table formatter 2018-10-06 09:16:31 -07:00
Andy McFadden
3c4e6cfe7a Another swing at first-word-is-load-addr
If we set the length word to assemble at address zero, the rest of
the code will try to use it as a zero-page label, so don't do that.
Instead, we use the start address, creating an overlapping region.
Easy enough to edit if that's undesirable.

(issue #23)
2018-10-05 20:55:05 -07:00
Andy McFadden
440eec2396 Use two .ORGs for first-word-is-load-addr
First is always at zero, second is at the address.  This puts an
ORG directive right at the start of the code, and avoids potentially
assembler-specific wrap-around behavior when the desired load
address is $0000 or $0001.

(issue #23)
2018-10-05 17:25:41 -07:00
Andy McFadden
92add74fc3 Add first-word-is-load-addr parameter to system definitions
If set, the first word of the file is used to set the load address.
The initial code entry hint is placed at offset +000002 instead of
the start of the file.

Set it to true for the C64 system definition.

(issue #23)
2018-10-05 15:39:44 -07:00
Andy McFadden
a23c7e5ab6 Rename undocumented 6502 opcodes to match Unintended Opcodes doc
These *almost* match what cc65 has, and are accepted as primary or
aliases by 64tass.

This combines the LAX and LXA operations.  LXA is the immediate
form of LAX, and behaves somewhat differently (and is unstable).
I was treating them as two separate operations with independent
mnemonics, but that doesn't seem to be the preferred way to
handle it.

The cc65 generator wasn't generating LAX before; now it does.  This
required nudging the width disambiguator, as LAX is a second
example of an instruction with both DP,Y and ABS,Y operands.

(issue #20)
2018-10-05 14:28:45 -07:00