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)
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.
If an address resolves to a user label in an isolated region, we
don't want to use it. However, we still want to try to match it
to a project/platform symbol.
For example, suppose the isolated code wants to reference address
$1C00, which is a memory-mapped I/O location in one area, but a
regular bunch of code in the other. We don't want it to map to
the regular code, but we do want it to resolve to our table of
platform I/O addresses.
We now handle this correctly. The regression test has been updated
to check this. The current implementation does a linear scan through
the symbol table, but I'm hoping this is not a common situation.
The reference manual has been updated to describe the new feature.
The cc65 docs say VICE labels start with '.'. Also, output local
labels prefixed with '@', per ca65 convention. The default output
file is now "labels.lbl".
Added some minimal documentation.
(issue #151)
The tutorial was creating a new address region at +000002 without
removing the previous one, which leaves the 16-bit file load address
sitting at $1000 when it should be non-addressable. The text now
shows the correct procedure. Some screen shots had to be recaptured
to show the greyed-out address field.
This doesn't change anything meaningful about the disassembly -- the
PRG optimization hides the region start/end markers either way -- but
it's more correct this way, and it's an opportunity to introduce
the use of non-addressable regions for file headers.
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.
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.)
Added a pop-up menu with three options: default (curly quotes),
straight, and Merlin. Removed the "reset to defaults" buttons.
Also, slightly rearranged the Display Format tab so that the quick
set pop-up is on the left, near the items it affects. Moved the
"use comma-separated format for bulk data" checkbox over as well,
since it's part of the set.
This allows regions that hold variable storage to be marked as data
that is initialized by the program before it is used. Previously
the choices were to treat it as bulk data (initialized) or junk
(totally unused), neither of which are correct.
This is functionally equivalent to "junk" as far as source code
generation is concerned (though it doesn't have to be).
For the code/data/junk counter, uninitialized data is counted as
junk, because it technically does not need to be part of the binary.
This action removes operand formatting from all code and data in the
selected range. In most cases this is equivalent to simply editing
the various items and clicking the "default" format radio button,
but the feature can be used to remove data formats that end up inside
multi-byte instructions. Instructions with such formats cause warnings
and were tricky to fix.
Labels embedded in multi-byte items are also tricky to remove, so this
clears those as well. It does not remove visible labels. This is
done in a single pass, which means that labels that would become visible
after the formatting is cleared will still be removed.
Also, fix inclusion of address range end lines when restoring the
selection. Their peculiar nature -- being associated with the offset
of the last byte of multi-byte items -- was interfering with the
selection save code. This does not add them to the selection when
an address region deletion is undone, since technically they weren't
part of the selection.
Also, moved Edit Note higher in the Actions menu.
Added a warning to the index page that only appears when viewing it
over http/https. The issue is that the manual on the web reflects the
tip-of-tree sources, which may be inaccurate for whatever version the
user has.
Also, provide an alternate path to opening the manual in-app when
under development.
Move the SourceGen manual to a subdirectory in "docs", so that it can
be accessed directly from the 6502bench web site. The place where
it's installed in the distribution doesn't change.
It's useful to have an example of an extension script that handles
multiple types of things. It's also good to show that scripts can
handle data types other than strings, and can chase an address to
format data items elsewhere in the code.
This required updating the tutorial binary, adding the new script,
and updating the tutorial text and associated screen shots.
Renamed from "*-incl.html" to "incl-*.html" so they sort together.
Moved <div> for all but incl-head inside include file.
Overall this shouldn't do anything but move the magic comments around
inside the HTML files.
Doesn't really affect the pages on the web, but it's easier to
preview them in the filesystem when linked to "../main.css" rather
than "/main.css".
The common portion of the <head> section is now in a separate
"include" file.
Added some indentation to masthead/topnav/sidenav so it looks nicer
in the merged source listing.
The idea is to remove everything but the "HOME" link from the topnav
bar on very narrow devices, so that it doesn't look cramped. Right
now we don't have a ton of stuff in topnav, and losing the tutorial
link is annoying.
If we want to restore this feature, we should also add a link to the
tutorial in the body of the page.
A bit of Javascript was used to remove the hamburger icon when a
page doesn't have a #sidenav. This worked when sidenav-incl was
being loaded with jQuery load(), because that mechanism works
asynchronously, and #sidenav was part of the DOM before it ran.
Once we started merging HTML fragments directly into the pages, the
script got called before #sidenav was defined, so the icon was
always being removed.
One solution would be to move the script to footer-incl.html, to
follow the preferred practice of placing scripts at the bottom of
the <body>. The better solution was to move the "no-sidenav" class
from #main to <body>, so that all components can see it. This lets
us use CSS rules to hide the icon.
Replaced the link at the top of the manual. Remove reference to
old tutorial doc. Added an obsolescence notice to the top of the
old tutorial. Updated tutorial message and link in README.
Also, fixed sidenav style.
This change applies the substitution scripts on the HTML files,
replacing away the jQuery load() calls with the actual file contents,
and setting the correct URLs to the prev/next buttons.
This isn't currently needed anywhere else, so the list of filenames
is just hard-coded into the script. Instead of making substitutions
in the source data, this just generates the full data.
Fairly straightfoward in Python.
Also, fixed the sidenav references, which should be using the file
in the sgtutorial subdirectory.
Also, tweaked index.html a bit.
Added a SourceGen tutorial with lots of screen shots. Uses
"responsive web design" so it works well on mobile devices.
This version is using jQuery load() calls to pull in pieces, but
that causes a lot of blink when loading because the loads are
asynchronous and may not complete until after the initial page
render has finished.
Tutorial prev/next links not yet working.