Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specasm v8 #11

Merged
merged 13 commits into from
Mar 10, 2024
Merged

Specasm v8 #11

merged 13 commits into from
Mar 10, 2024

Conversation

markdryan
Copy link
Owner

Specasm v8 contains numerous updates and improvements:

  • The keyboard handling is much improved. Phantom key strokes are no more and key repeat should feel more natural.
  • Binary files can now be included using the new '!' directive.
  • The existing '+' and '-' directives can now be used to include entire directories rather than individual files. This makes is easier to split programs up over multiple folders.
  • The order in which .x files are linked is now well defined. Previously, the file containing the .Main label was linked first with the remaining files being linked in an arbitrary order. In Specasm v8, the file containing the .Main label is still linked first but the remaining files are linked in ascending alphabetical order of their path names.
  • The existing contents of the editor are no longer deleted when opening a non-existent file.
  • Specasm now accepts one parameter on the command line, a .x file to open, e.g., .specasm sprite.x. (Next only)
  • There's now a proper clipboard, supporting proper cut, copy and paste. The clipboard is less clunky than the existing copy and move commands and allows code to be moved between files. (Next only)

This argument is the path of a .x file to load on startup.

Signed-off-by: Mark Ryan <[email protected]>
We don't need to pass obj down through every function.  It doesn't
change and passing it down through the functions makes the binary
bigger.
Some of the expression code was still in link_obj.c and the bank
associated with this file on the Next builds is running out of
bytes.  Move the remaining expression code into expression.c whose
associated bank has lots of free space.

Signed-off-by: Mark Ryan <[email protected]>
Which allows files to be included at specific locations in
the final binary generated by salink.

Signed-off-by: Mark Ryan <[email protected]>
There are now fewer erroneous characters when using the shift keys
or the cursors keys and delete on the Toastrack and the Next.

Keyboard repeat is improved as well.  Holding the key down repeats
things faster than repeatedly pressing the key.

Signed-off-by: Mark Ryan <[email protected]>
It is now possible for the user to control the order in which the
code in the various .x files that make up a Specasm project gets
written into the final binary.  The file with the .Main label
always comes first followed by the code in the remainining files
which are written in ascending order of their filenames.  This
feature is intended for programatically generated .x files like
compilers, which might generate more code that can fit into a
single .x file.

Signed-off-by: Mark Ryan <[email protected]>
In addition to be able to add individual .x files to the binary,
'-' and '+' can now be used to include all the .x files in a
given directory.  This makes it much easier to split the program
up into separate directories.  Directory inclusion is not recursive.
If the included directory contains a sub-directory with .x files
these files will be ignored by the linker unless that subdirectory
is also explicitly included.

Signed-off-by: Mark Ryan <[email protected]>
We were not detecting errors correctly in the Spectrum
peer layers.  This resulted in the code that handles
file not found errors in the editor from triggering,
which was a good thing as it was broken.  So we fix the
incorrect error detection in the peer layer and we fix
the editor.  This then fixes a long standing bug where
the contents of the editor are wiped when trying to
open a non-existent file.  Now they are preserved.

Signed-off-by: Mark Ryan <[email protected]>
There were two outstanding issues:

- On my Toastrack, reading the key directly after waitkey() returns
was somethings returning the wrong result for some of the new keys
like Delete or the arrow keys.  Adding a small delay fixes this.
- We had some key specific rules to handle the case where phantom
keys were generated after a shifted key, but these did not cover
all cases.  So now we have a generic solution that converts the
returned key to a scancode and masks off the shift keys, so we can
detect that DELETE followed by '0' are probably the same key.

Hopefully, this is fixed now once and for all.  Seems to work
well now on a KS2 Next, on a Toastrack and on a 48Kb Issue 3.

Signed-off-by: Mark Ryan <[email protected]>
On the Next the commands 'x', 'cc' and 'v', cut, copy and
paste to and from a clipboard.  This is much less clunky than
the existing move and copy mechanism and allows you to copy
code between different files for the first time.  The 'x'
command can also be used in selecting mode to cut the visibly
selected text to the clipboard.

Also fix a small UI issue when the original copy command fails
due to lack of space in the current file.

Signed-off-by: Mark Ryan <[email protected]>
Run clang-format on source code and fix any formatting issues.

Signed-off-by: Mark Ryan <[email protected]>
There's no need to copy unitnext to the /dot directory.  The dot
file can be run directly from its own directory.
@markdryan markdryan merged commit f6bbb12 into main Mar 10, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant