Package: disfv1
disfv1Disassembler for Spin Semi FV-1Copyright (C) 2019-2021 Nathan FraserA simple disassembler for the Spin Semiconductor FV-1 DSP. This
disassembler will convert a FV-1 binary program file into strict
FV-1 assembler statements, suitable for use with asfv1 and the
Spin IDE.RequirementsPython > 2.6InstallationMake sure your system has a python interpreter
(preferably python3), then install from thePython Package Indexusing thepipcommand:$ pip3 install disfv1or$ pip install disfv1For system-specific installation instructions seeSystem Specific Installationbelow.Usage$ disfv1 input.bin output.asm

$ disfv1 -h
usage: disfv1 [-h] [-v] [-q] [-r] [-s] [-p {0,1,2,3,4,5,6,7}] infile [outfile]

Disassemble a single FV-1 DSP program.

positional arguments:
  infile                binary program file
  outfile               assembly program output file

optional arguments:
  -h, --help            show this help message and exit
  -v, --version         print version
  -q, --quiet           suppress warnings
  -r, --relative        use relative skip targets
  -s, --suppressraw     convert invalid/raw statements into nop
  -p {0,1,2,3,4,5,6,7}  program numberOverviewdisfv1 is based on information in the FV-1 datasheet and AN0001 "Basics
of the LFOs in the FV-1". It disassembles FV-1 machine code into strict
assembler compatible with asfv1.This disassembler converts a single 128 instruction DSP program binary
and outputs a corresponding assembly representation.Skip offsets are automatically replaced with labels. To suppress labels
and instead get the offset, use command line option -r (--relative).By default, the source is assumed to be a single program. To offset
into a bank file, use the command line option -p (--program) to
choose an alternate program.Invalid instructions are disassembled as 'raw' instructions, to
replace them with 'nop' use command line option -s (--suppressraw).Example$ disfv1 example.bin
info: Reading input from example.bin
info: Read 9 instructions.
	skp	RUN,addr03             	; flags:0x10 offset:0x02
	ldax	POT0                   	; reg:0x10
	wrax	REG0,0.0               	; reg:0x20 k:0x0000
addr03:	ldax	ADCL                   	; reg:0x14
	mulx	REG0                   	; reg:0x20
	wra	0,0.0                  	; del:0x0000 k:0x000
	rda	9830,0.5               	; del:0x2666 k:0x100
	rda	19660,0.5              	; del:0x4ccc k:0x100
	wrax	DACL,0.0               	; reg:0x16 k:0x0000System Specific InstallationThe preferred method for installation is to use your system's
packaged pip3 command to fetch and install disfv1 fromPyPiand set it up to work with a python3
interpreter.Linux with apt (Debian, Ubuntu)$ sudo apt install python3-venv python3-pip
$ pip3 install disfv1Linux with yum (Fedora 21)$ sudo yum install python3 python3-wheel
$ pip3 install disfv1Linux with dnf (Fedora 22)$ sudo dnf install python3 python3-wheel
$ pip3 install disfv1rch Linux$ sudo pacman -S python-pip
$ pip install disfv1MacOSDownload a copy of the "Latest Python 3 Release"
for Mac OS frompython.org.
Install the package, then open a terminal and run:$ pip3 install disfv1WindowsDownload a copy of the "Latest Python 3 Release"
for Windows frompython.org.
Install the package, then open a command prompt and run:C:\> pip3 install disfv1For more detailed information, please refer to thePython package installation documentationandinstalling pip with packaging managersatpackaging.python.org.Install from SourceIf you would prefer to not use pip, or if your system is provided with
and older version of Python (eg MacOS), disfv1 can be installed using
the included setup.py script. Fetch a copy of the latest source package,
unpack it and then run the installer as root:$ sudo python ./setup.py installAlternatively, the main source file can be run directly with a python
interpreter without the need to install any files:$ python ./disfv1.py infile.asm outfile.binLinksFV-1 assembler:https://github.com/ndf-zz/asfv1Spin FV-1 website:http://spinsemi.com/products.htmlDatasheet:http://spinsemi.com/Products/datasheets/spn1001/FV-1.pdfAN0001:http://spinsemi.com/Products/appnotes/spn1001/AN-0001.pdf