Edit: the download links have stopped working. I haven't uploaded the programs again because I no longer have the same versions on my hard drive and the current versions aren't ready for release.
---
(Sorry, my English is not very good.) Here are some NES programs by me. All of them use NROM and include source code (NESASM, comments in Finnish). I have tested them on a PowerPak on an NTSC NES.
You can download them here (both links lead to the same file): link 1, link 2. Last update: 2012-03-26 22:50 UTC.
KHS-NES-Brainfuck
An interpreter for the Brainfuck programming language. Features: maximum program length 255 instructions; 256 bytes of RAM for the Brainfuck program (wraps around); maximum output size 256 characters; ASCII character set; on-screen keyboard; shows an error message if brackets don't match; Brainfuck program can be aborted while it is running. The interpreter cannot print more than one character per frame but executes other instructions faster. Source code is included.
Video
Two video clips (64*48 'pixels', 4 colors, 10 fps, 4 seconds) and a PHP script that converts BMP files into the format used by the NES program.
BMP to NES converter
A Windows program that converts a BMP image into an NES ROM. Requires VB40032.DLL. The BMP file must be in the following format: 256*240 pixels, 2-6 color palette, no RLE. There are some BMPs and ROMs in the 'Examples' folder.
If there are more than two colors in the image, it must not contain more than about 512 different tiles. The worse the quality setting, the more the image is simplified to reduce the number of different tiles.
If there are more than four colors in the image, there will be attribute clash (though the program tries to minimize it).
Gradient Demo
Shows rapidly moving colors and text that moves in a circle (using a sine look-up table). Warning: may give you a seizure.
Text Reader
Shows text that you can scroll with up/down arrows. Press start to change color palette. Includes a PHP script that converts text files (30 kilobytes or less) into the format used by the NES program.
24 Balls
Shows 24 16*16-pixel balls that bounce off walls. The balls don't flicker because there's never more than four of them (eight sprites) per scanline. (That's because there are no more than two balls per scanline at the beginning and all balls have the same vertical velocity.) The color palette changes every 8th frame.
Static Demo
Shows static (like an analog TV tuner). Making the static random enough so that patterns can't be seen in it was more difficult than I thought. The program uses two Pattern Tables, two Name Tables, and two palettes that show either the first or the second bitplane. It also scrolls the screen.
Color Squares
Shows 16*14 squares of 12 different colors (plus black). On each frame, two adjacent squares are swapped.
KHS-NES-Paint
A simple paint program. Features: 64*48 'pixels'; four colors at a time; palette editor; two brush sizes. Source code is included.
Buttons: arrows: move cursor; A: draw using selected color; B: select a color; start: change brush size; select: enter palette editor.
Buttons in palette editor: up/down arrow: select a color to edit; left/right arrow: change hue; B/A: change brightness; select: exit.
Clock
A digital seven-segment 24-hour clock. Set the time with arrows, toggle between NTSC and PAL with A button, toggle the visibility of unlit segments with B, and press start to start the clock. I tried to make the clock more accurate than exactly 50 (PAL) or 60 (NTSC) frames per second.
Controller Ports
Shows the status of the input pins of the controller ports.
---
You may host these programs on the NESdev site if you want.
---
(Sorry, my English is not very good.) Here are some NES programs by me. All of them use NROM and include source code (NESASM, comments in Finnish). I have tested them on a PowerPak on an NTSC NES.
You can download them here (both links lead to the same file): link 1, link 2. Last update: 2012-03-26 22:50 UTC.
KHS-NES-Brainfuck
An interpreter for the Brainfuck programming language. Features: maximum program length 255 instructions; 256 bytes of RAM for the Brainfuck program (wraps around); maximum output size 256 characters; ASCII character set; on-screen keyboard; shows an error message if brackets don't match; Brainfuck program can be aborted while it is running. The interpreter cannot print more than one character per frame but executes other instructions faster. Source code is included.
Video
Two video clips (64*48 'pixels', 4 colors, 10 fps, 4 seconds) and a PHP script that converts BMP files into the format used by the NES program.
BMP to NES converter
A Windows program that converts a BMP image into an NES ROM. Requires VB40032.DLL. The BMP file must be in the following format: 256*240 pixels, 2-6 color palette, no RLE. There are some BMPs and ROMs in the 'Examples' folder.
If there are more than two colors in the image, it must not contain more than about 512 different tiles. The worse the quality setting, the more the image is simplified to reduce the number of different tiles.
If there are more than four colors in the image, there will be attribute clash (though the program tries to minimize it).
Gradient Demo
Shows rapidly moving colors and text that moves in a circle (using a sine look-up table). Warning: may give you a seizure.
Text Reader
Shows text that you can scroll with up/down arrows. Press start to change color palette. Includes a PHP script that converts text files (30 kilobytes or less) into the format used by the NES program.
24 Balls
Shows 24 16*16-pixel balls that bounce off walls. The balls don't flicker because there's never more than four of them (eight sprites) per scanline. (That's because there are no more than two balls per scanline at the beginning and all balls have the same vertical velocity.) The color palette changes every 8th frame.
Static Demo
Shows static (like an analog TV tuner). Making the static random enough so that patterns can't be seen in it was more difficult than I thought. The program uses two Pattern Tables, two Name Tables, and two palettes that show either the first or the second bitplane. It also scrolls the screen.
Color Squares
Shows 16*14 squares of 12 different colors (plus black). On each frame, two adjacent squares are swapped.
KHS-NES-Paint
A simple paint program. Features: 64*48 'pixels'; four colors at a time; palette editor; two brush sizes. Source code is included.
Buttons: arrows: move cursor; A: draw using selected color; B: select a color; start: change brush size; select: enter palette editor.
Buttons in palette editor: up/down arrow: select a color to edit; left/right arrow: change hue; B/A: change brightness; select: exit.
Clock
A digital seven-segment 24-hour clock. Set the time with arrows, toggle between NTSC and PAL with A button, toggle the visibility of unlit segments with B, and press start to start the clock. I tried to make the clock more accurate than exactly 50 (PAL) or 60 (NTSC) frames per second.
Controller Ports
Shows the status of the input pins of the controller ports.
---
You may host these programs on the NESdev site if you want.