Shop OBEX P1 Docs P2 Docs Learn Events
P2Ninja - a P2 Disassembler (beta) — Parallax Forums

P2Ninja - a P2 Disassembler (beta)

SuracSurac Posts: 176
edited 2021-04-23 07:36 in Propeller 2

Hello.

here you can find a P2 disassembler for Windows. It is written in C# and uses the .Net Framework.
This is the very first release with only GUI and only Windows as target OS

Intention

I have written this disassembler to spoon-feed me the P2 assembler syntax and flags/condition system. I share this program for nothing more than science. If you can make any use out of it. perfect!

Installation:

just download the attached .zip file and expand it where you like.

Usage:

  • Start the P2Ninja.exe with a double-click. A P2Ninja window will open.
  • Now click the "Open" button and choose a P2 bin, or binary file.
  • The disassembled file appears in the big textbox of the P2Ninja window.
  • This is a Read-only textbox. If you like to save the contend just copy-paste everything
    from the textbox to a text editor.

Features

  • knows how to work with AUGS and AUGD instructions and "constructs" the next instruction to contain proper syntax for PNUT.
  • hopefully knows all P2 instructions
  • hopefully knows all P2 alias instructions (like NEG $1,$1 becomes only NEG $1)
  • replaces addresses of the special registers (PA, PB, PRTA....) with their names.

Limitations

  • Happily, disassembles data fields. There is no way to distinct data and instructions.
  • PNUT contains many ways to input illegal parameters for assembler instructions and silently produces some instruction. The Disassembler only sees the bin file and the P2 documentation.
  • It will produce what is written down in the bin file. So, any labels, symbols and comments are lost.
  • Cannot see org, orgf, orgh instruction. the .bin file is assumed to begin with address 0 in COG ram and go on to LUT and then HUB.

Comments

Sign In or Register to comment.