Eats nibbles for breakfast.
Modern C compiler, make, and ncurses library (development files).
To install ncurses library development files on Ubuntu/Debian:
sudo apt-get install ncurses-dev
To build:
make
Only MSYS2 platform was tested on Windows. Ensure gcc
and make
are installed
before continuing.
To install ncurses library development files:
pacman -S ncurses-devel
To build:
make
To run:
./nibbler file.hex
There are some sample binaries that work with the emulator in examples/
.
These have been assembled from the official badge tools repo.
Keys:
- Q - end program and exit.
- Space - pause execution, or execute a single instruction if already paused.
- Enter - continue execution normally if paused.
- Left/Right - decrement/increment Page register.
-
<tab>
- key 0 (mode). -
1 2 3 4
- keys 1-4 (opcode). -
A S D F
- keys 5-8 (operand x). -
Z X C V
- keys 9-12 (operand y). -
/
- key 13 (data in).
Note that pressing Esc
results in a small delay as getch
is attempting to
parse the escape sequence.
- The -p option tells nibbler to pause at the start of the program before executing any instructions. This allows single stepping from the beginning. The default is to start executing directly.
- The -r option will color the page display area red on terminals that support colors. This better simulates the look for the real hardware.
Dimming is only supported for terminals with 256 colors.
It's possible to change TERM
environment variable to force a certain terminal
type (e.g. export TERM=xterm-256color
):
-
xterm-mono
- monochrome. -
xterm-color
- 8 colors. -
xterm-16color
- 16 colors. -
xterm-256color
- 256 colors.
- Simulated LED matrix shows active page.
- Dimmer is simulated using color output (interpolates between black and yellow).
- Clock and Sync registers supported. The simulation itself is very fast and can do faster than 100 KHz, but UI updates may introduce slight delays.
- All registers are mapped correctly onto user memory and can be visualized in the matrix just like on the real hardware.
- Basic support for keys. AnyPress and LastPress flags will be set the first time a recognized key is pressed and will stay like that. JustPress will be set every time a new key is recognized, and it will be reset when the program reads the register (as expected).
The core VM seems to work well with a variety of programs, but there may still be bugs.
The following features are not supported (or only partially supported):
- Key support is partial. Alt key is not supported, and since it's not possible to get key release events from the terminal, a key will be reported as released after a fixed amount of time (200 miliseconds).
- GPIO input is not implemented; pins will always show as 1.
- UART is not implemented.
There a lot more work to be done on the UI.