Skip to main content

Renesas (NEC) 78K0 disassembler

Project description

Overview

k0dasm is a disassembler for NEC 78K0 binaries that generates output compatible with the as78k0 assembler. It can be used to disassemble firmware for many 8-bit NEC 78K0 microcontrollers. Note that NEC has several microcontroller families with similar names, such as 78K0S, that use different instruction sets. These are not supported.

k0dasm was developed to disassemble the firmware of the Volkswagen Premium V car radios made by Delco. These radios use the undocumented NEC µPD78F0831Y microcontroller, which is similar to the µPD78F0833Y. A companion program, k0emu, is a 78K0 emulator developed for the same project.

Features

  • Identical Reassembly. The assembly language output of k0dasm will assemble to a bit-for-bit exact copy of the original binary using as78k0. This has been tested using several real firmware binaries.

  • Code / Data Separation. Starting from the vectors at the bottom of memory, k0dasm uses recursive traversal disassembly to separate code from data. This automates much of the disassembly process but indirect jumps (br ax) will still need to be resolved manually.

  • Symbol Generation. k0dasm tries not to write hardcoded addresses in the output when possible. It will automatically add symbols for hardware registers and vectors, other memory locations used, and will add labels for branches and subroutines.

Installation

k0dasm is written in Python and requires Python 3.4 or later. Packages are available on the Python Package Index (PyPI). You can download them from there or you can use pip to automatically install or upgrade k0dasm:

$ pip install -U k0dasm

Usage

k0dasm accepts a plain binary file as input:

$ k0dasm input.bin > output.asm

The file is assumed to be a ROM image that should be aligned to the bottom of memory. For example, if a 32K file is given, k0dasm will assume the image should be located at 0x0000-0x7FFF. After loading the image, the disassembler reads the vectors and starts tracing instructions from their targets.

Author

Mike Naberezny

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

k0dasm-1.0.1.tar.gz (27.7 kB view details)

Uploaded Source

Built Distribution

k0dasm-1.0.1-py2.py3-none-any.whl (27.6 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file k0dasm-1.0.1.tar.gz.

File metadata

  • Download URL: k0dasm-1.0.1.tar.gz
  • Upload date:
  • Size: 27.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

File hashes

Hashes for k0dasm-1.0.1.tar.gz
Algorithm Hash digest
SHA256 819d940b468ee7c9d43312c37c9a5a3730b1086aa03adcace80d04389cfa8f71
MD5 796afc5b92092c4a3586d8d75f753bc9
BLAKE2b-256 984e599a99321c89f911109a1ac3b442e06ac3904a026bc862a52f297f750043

See more details on using hashes here.

File details

Details for the file k0dasm-1.0.1-py2.py3-none-any.whl.

File metadata

  • Download URL: k0dasm-1.0.1-py2.py3-none-any.whl
  • Upload date:
  • Size: 27.6 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

File hashes

Hashes for k0dasm-1.0.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 118f8a9b079ef5e3e9da461fca98889fde330ccadb53534691b2d51d17856761
MD5 6a94c77500d286332d97e30f5bfeb5e4
BLAKE2b-256 6508311e336840ad6d4468fdf6625e18a7c69c74bca7a243892c219025b12b4c

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page