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

8085 undocumented instructions are missing #6389

Open
RetroAND opened this issue Apr 7, 2024 · 5 comments
Open

8085 undocumented instructions are missing #6389

RetroAND opened this issue Apr 7, 2024 · 5 comments
Assignees
Labels
Feature: Processor/8085 Status: Internal This is being tracked internally by the Ghidra team Type: Bug Something isn't working

Comments

@RetroAND
Copy link

RetroAND commented Apr 7, 2024

Intel microprocessor has two undocumented flags in their documentation and a series of instructions both to work with those flags, 16 bit operations and even a software interrupt. All 8085 have those instructions even if they weren't documented by the designers. As GHidra follows the original Intel documentation the instruction set is incomplete.

I would have implemented the missing parts, however my skills with sleigh is null. For this reason I would like to ask if more experienced GHidra developers would help having this part completed.

Personally I use GHidra to help documenting old computer systems and unfortunately I found a system that uses this set of undocumented instructions. If someone could help, it would be greatly appreciated.

Thanks in advance

@GhidorahRex
Copy link
Collaborator

Can you provide any documentation on the instructions?

@GhidorahRex GhidorahRex self-assigned this Apr 8, 2024
@GhidorahRex GhidorahRex added Type: Bug Something isn't working Feature: Processor/8085 Status: Triage Information is being gathered labels Apr 8, 2024
@RetroAND
Copy link
Author

RetroAND commented Apr 8, 2024

Of course. The instructions were tested across batches and found to be working on all them. They were present in memos etc. but nobody knows why Intel decided to keep them a secret.

UnDoc85.pdf
Undoc_8085.pdf

The mnemonics used for this small set of instructions is the one from the second document (JNK, RSTV, etc.) but left the other for reference.

@hjanetzek
Copy link

hjanetzek commented Apr 15, 2024

This case is also discussed here #2299 with some preliminary you could try @RetroAND
1577081

For a thorough analysis how these flags are implemented:
http://www.righto.com/2013/02/looking-at-silicon-to-understanding.html

@RetroAND
Copy link
Author

Hello @hjanetzek ,

The truth is while I would want to do it myself I don't have neither the knowledge in Sleight nor the time to implement the routines. I am designing spare parts for the machine whose code I'm studying and this plus the hardware reverse engineering take up my entire time. Sorry if that's a disapointment, but I'm constrained at this point.

In any case thanks for your intervention.

@GhidorahRex GhidorahRex added Status: Prioritize This is currently being prioritized and removed Status: Triage Information is being gathered labels Apr 16, 2024
@hjanetzek
Copy link

Hi @RetroAND, no problem :) Just wanted to add some pointers - I'm a hobbyist reverse-engineer myself, specializing on mid-80s home organs.
In case you considered to use MAME for development (it has quite a lot RC2014 parts implemented and is generally a great reference to understand (old) hardware) I've started work on a plugin to link MAME debugger with Ghidra - without this tool some things would have been impossible for me to figure out https://github.com/orgs/mamedev/discussions/54#discussioncomment-8573209

I'll probably get back to a 8085 device soon and then could try to bring the undocumented instruction code into shape for a PR.

@GhidorahRex GhidorahRex added Status: Internal This is being tracked internally by the Ghidra team and removed Status: Prioritize This is currently being prioritized labels Apr 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature: Processor/8085 Status: Internal This is being tracked internally by the Ghidra team Type: Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants