nd100x

ND-100/CX Emulator written in C

For more information about the ND-100 series of minicomputers: https://www.ndwiki.org/wiki/ND-100

Origins

This project (nd100x) is a fork of nd100em, started in 2025 by Ronny Hansen. It remains under the GNU General Public License (GPL v2 or later).

This project is based upon the source code from the nd100em project. Their latest version was version 0.2.4, which can be found here https://github.com/tingox/nd100em Read more about the nd100em project here https://www.ndwiki.org/wiki/ND100_emulator_project

The original authors of the nd100em are:

Status

The emulator is under active development. Current work in progress includes:

Improvements

This project continues from nd100em version 0.2.4 and includes significant enhancements:

## Project Goals

Project Structure

The project is organized into several key components:

Build Requirements

Additional Dependencies for Floppy Menu

The floppy menu functionality requires additional libraries:

Install these dependencies on Ubuntu/Debian:

sudo apt update
sudo apt install libcurl4-openssl-dev libncurses5-dev

On FreeBSD

pkg install curl ncurses

Note: The floppy menu requires an internet connection to function properly.

Note 2: The floppy menu is disabled on RISC-V and WASM builds.

Building the Project

  1. Clone the repository: ```bash git clone https://github.com/HackerCorpLabs/nd100x.git cd nd100x

git submodule update –init –recursive


2. Build the project:
- For debug build (default):
```bash
make debug

Updating Git submodules

Sometimes the submodules are updated and you need to manually refresh them

Command Line Options for nd100x

The emulator supports the following command line options:

Usage: nd100x [options]

Options:
  -b, --boot=TYPE    Boot type (bp, bpun, aout, floppy, smd)
  -i, --image=FILE   Image file to load
  -s, --start=ADDR   Start address (default: 0)
  -a, --disasm       Enable disassembly output (dump after emulator stops)
  -d, --debugger     Enable Enable DAP debugger
  -v, --verbose      Enable verbose output
  -h, --help         Show this help message

Examples:

  build/bin/nd100x -b aout -i a.out -v -d    # Loads an a.out file from the current directory in verbose mode and enables disassembly

  build/bin/nd100x -b bpun -i images/FILSYS-INV-Q04.BPUN      # Loads the latest version of FILSYSTEM INVESTIGATOR (Version: Q04 - 1987-10-10)
  build/bin/nd100x -b bpun -i images/CONFIGURATIO-C08.BPUN    # Loads an old version of CONFIGURATION-C08
  build/bin/nd100x -b bpun -i images/INSTRUCTION-B.BPUN       # Loads an old version of INSTRUCTION VERIFIER

  build/bin/nd100x -b floppy                                  # Boots from a floppy file named FLOPPY.IMG
  
  

Boot Types:

Block devices (Floppy and SMD)

Currently the file names used for floppy and SMD are hard coded. And the files are expected to be in the current folder.

Other floppy images can be mounted via the Floppy Menu

Running SINTRAN in the Emulator

The emulator requires a system image file (SMD0.IMG) to run. Place the image file in the project root directory.

To boot a SINTRAN image from an SMD disk

build/bin/nd100x --boot=smd 

Read more about how to boot sintran

Boot Animation

Booting TPE-MON from floppy and running test programs

The emulator requires a floppy image to boot from. Place the image file in the current directory.

cp images/Nd-210523I01-XX-01D.img FLOPPY.IMG
build/bin/nd100x --boot=floppy

Now you have access to test programs like CONFIG, PAGING, INSTRUCTION and more.

Floppy Menu

The emulator includes a built-in floppy disk browser that allows you to browse and mount floppy disk images from the ND100 floppy database.

Accessing the Menu

While the emulator is running, press F12 to open the floppy menu.

Menu Animation

Requirements

Floppy database is available directly at https://ndlib.hackercorp.no/

Assembling your own programs

Using the assembly tool from Ragge nd100-as you can compile ND assembly to a.out format and load into the emulator.

This assembler is following the AT&T syntax so it differs a bit from the ND-100 MAC assembler.

lda foo
sta bar
opcom


bar: .word 11
foo: .word 22

Remember to end your code with ‘opcom’ to make the emulator stop executing your code.

Overview of all assembly instructions

Multiple systems

The nd100x emulator has been compuiled and tested on multiple different systems. For more information, read the Tested systems document

License

See the LICENSE file for detailed licensing information.

Contributing

See the CONTRIBUTING.md file for more information

TODO