A Brainfuck interpreter for the NES.
Table of contents:
*.bf: long Brainfuck programsassemble.sh: a Linux script that assembles the program (warning: deletes files)bf.asm: source code (assembles with ASM6)bf.nes.gz: the assembled program (iNES format, gzip compressed)chr.bin.gz: CHR ROM data (gzip compressed)chr.png: CHR ROM data as an image (can be encoded withnes_chr_encode.pyin my NES utilities)examples.txt: short Brainfuck programsmovies.tar.gz: FCEUX movie files that enter a Brainfuck program into the NES programsnap*.png: screenshotstxt2fm2.py: a Python script that converts a Brainfuck program into an FCEUX movie file that enters the Brainfuck program into the NES program
- maximum program size: 239 (8×30−1) instructions
- maximum output size: 240 (8×30) bytes
- Brainfuck RAM size: 1,024 bytes
- output speed: 1 character/frame
- mapper: NROM
- PRG ROM: 16 KiB
- CHR ROM: 8 KiB
- name table mirroring: vertical
- compatibility: NTSC & PAL
There are two modes.
- the program starts in this mode
- the cursor (blinking square) is always on the program input area
- note: the Brainfuck program won't run if brackets don't match
- there are three submodes:
- if the cursor is on the output area: the Brainfuck program is running
- if the cursor is on the virtual keyboard: the user is expected to enter a character
- if the cursor is next to the
B=exittext: the Brainfuck program has finished or the maximum output size has been reached
- press B at any time to return to edit mode
- output behavior:
- byte
0x0amoves the cursor to the start of the next line - other bytes advance the cursor by one
- byte
- output appearance:
- bytes
0x20to0x7e: as in ASCII - some bytes from
0x7fon contain special characters - other bytes are blank
- bytes
- input (virtual keyboard):
- newline symbol (↵ at bottom right) inserts byte
0x0a - other symbols insert bytes
0x20to0x7e
- newline symbol (↵ at bottom right) inserts byte