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

Is this going to work? #1

Open
palmerj opened this issue Apr 28, 2022 · 4 comments
Open

Is this going to work? #1

palmerj opened this issue Apr 28, 2022 · 4 comments

Comments

@palmerj
Copy link

palmerj commented Apr 28, 2022

With TMS CPU instructions which can contain up to 6 byte instructions?

814520: 0780 09F0 0106           MOVE   A0,@10609F0h,1
814550: 0780 15A0 0106           MOVE   A0,@10615A0h,1
814BB0: 09C1 000A                MOVI   Ah,A1
814BD0: 09E7 5150 FF81           MOVI   FF815150h,A7
814C00: 0D5F 9DD0 FF96           CALLA  FF969DD0h
814C30: 0960                     RETS   
814C40: 4C01                     MOVE   A0,A1
814C50: 0B01 0020                ADDI   20h,A1
814C70: 9220                     MOVE   A1,*A0+,1
814C80: 09C1 0028                MOVI   28h,A1
814CA0: C080 66A0 FF9B           JA     FF9B66A0h
8194A0: B0B0 FF81                MOVE   B5,*B0(FF81h),0

Many thanks in advance.

@pjsoberoi
Copy link
Contributor

No, 6 bytes is just too much data. You can try doing all of the two byte instructions to help you get an initial layout. That might save you some time.

@palmerj
Copy link
Author

palmerj commented Apr 29, 2022

Thanks for the reply @pjsoberoi. Ok, wow, so that will be heaps of manual work because most instructions I have for this programme are larger than 2 bytes! I have no experience in doing this for Ghidra. So I need to map each unique instruction byte sequence, or are there some instructions (i.e. jump/move with memory addresses, or instructions with different immediates) that I don't need to map?

@pjsoberoi
Copy link
Contributor

I recommend at least disassembling all instructions. If the disassembly engine comes across an unknown instruction everything stops. If the pcode for particular instructions is too much of a pain to implement I suppose leaving some as nops shouldn't be a problem.

I actually ran GPMP on TMS in this thread: NationalSecurityAgency/ghidra#3990. I upload basically what would be the output of running it across all of the two byte instructions already. Maybe it will save you some time. Or maybe you can work with the other user in the thread .

@palmerj
Copy link
Author

palmerj commented May 15, 2022

Thanks @pjsoberoi. I asked the other user again and he's now released what he has. https://github.com/ZPaul2Fresh8/Ghidra_TMS34010 :-) So that's a great start!

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

No branches or pull requests

2 participants