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

Add Z80 Support #59

Merged
merged 2 commits into from
Jun 29, 2024
Merged

Add Z80 Support #59

merged 2 commits into from
Jun 29, 2024

Conversation

WillLillis
Copy link
Collaborator

@WillLillis WillLillis commented Jan 7, 2024

Note: Keeping this as a draft for now. Before it's ready I'd like to:

  • Sync this branch up with the pending changes in the other PRs Just should be merged after refactor: Assign Register and Instruction arch field at read time #68
  • Create an internal TargetConfig-like struct with all optional fields. Use this to deserialize config files and then translate any missing fields to "false" in the actual TargetConfig. This way we can add the Z80 as a configuration option without breaking anyone's existing config files. In my own testing, having the extra z80 field under instruction sets doesn't prevent deserializing of the TargetConfig struct using an older version of the lsp.
  • Do a more thorough read over, taking out TODO comments, cleaning things up, etc. Done!

This PR will add support for the Zilog Z80 CPU. Hover and autocomplete support for registers and instructions, as well as instruction signature help are included.

A huge thank you to @gilbertfrancois for writing the initial python script to translate instruction data from some of the online docs. I'll add some demo gifs for all the features once things are finalized, but I was kinda happy with this in particular:

Z80DocsDemo

The Z80 user manual has different sections for each instruction form, meaning the manual can be opened to any form's entry by adding a fragment to the url.

I realize this is very much on the long side of things, so no worries if it takes some time to review once it's ready. If anything's too messy/ needs to be refactored I'm more than happy to take another pass at it.

Closes #39

@WillLillis WillLillis changed the title First pass Z80 register xml file Add Z80 Support Jan 7, 2024
@gilbertfrancois
Copy link

Thank you so much for adding Z80 support. I don't know how to proceed from here. If there is anything that I can add or contribute, let me know.

@gilbertfrancois
Copy link

The features shown in the GIF are amazing! I can't wait having this functionality in the final asm-lsp! Well done @WillLillis.

Hover support for Z80 registers

Remove extraneous semicolons

Short Z80 register descriptions

Initial commit for z80 instructions xml and its generator.
Co-authored-by: gilbertfrancois <>

Checkpoint commit, sketching out z80 data structs

Appease clippy

Chore: Update opcodes (bergercookie#40)

* Chore: Update opcodes xml files

* Update parser for updated xml files

Cleaning up

More clean up, syncing up with master branch

Simplifying things...

Most z80 features working, need to polish instruction hover support

Hover display tweaks, correct URL escaping, formatting

Z80 documentation now opens at correct section

Initial work on instruction descriptions

Instruction descriptions done

Z80 Signature Help support

Fix logic bug for file word grab
@WillLillis WillLillis merged commit 1816817 into bergercookie:master Jun 29, 2024
15 checks passed
@WillLillis WillLillis deleted the Z80_support branch June 29, 2024 15:34
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.

Add support for Z80 instruction sets
2 participants