An emulator for a hypothetical 16-bit computer from the 80s and 90s. Intended as a play-thing and educational tool.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.vscode
asm
bin
crashscreens
design
docs
src
test
.babelrc
.eslintignore
.eslintrc.js
.gitignore
.travis.yml
README.md
package-lock.json
package.json
tsconfig.json

README.md

Retroputer

Retroputer is intended as both a plaything and educational tool. It is intended to simulate what programming and using a computer from the late 1980s was like. Some liberties, however, are taken, including the following:

  • 256KiB is addressable; 256KiB is present -- in the 80s, this would have been pretty expensive
  • 64KiB devoted to 320x200 graphics
  • 256 color palette consisting of 8-bit r,g,b elements
  • 64KiB devoted to tile set definitions (4 sets x 16 KiB)
  • 16KiB devoted to up to four visible tile pages on screen at once (4 pages x 4KiB)
  • 16KiB of ROM
  • 256 traps or interrupts
  • A slightly larger register file than many CPUs of the time
  • 16-bit CPU with an 18-bit address bus

The above is to make programming for the Retroputer a little easier while also making it easy to translate the memory for screen graphics to an HTML5 canvas (which uses four bytes per pixel for RGBA). The tilesets are an affectation to make it easy to create levels and side-scrollers -- these are like (but not quite like) the character set definitions on many machines of the time.

Status

Currently works:

  • Assembler
  • Fetch, decode and execute
  • Screen
  • Keyboard

In Progress:

  • Timers (prep for sound)
  • ROM and KERNEL
  • Tests

TODO:

  • Sprites
  • Sound
  • Other devices
  • Optimizations!

Launching

You can try the online version. (Probably a few commits behind.)

You can launch the browser interface executing:

$ npm install
$ npm run webpack
$ npm run serve

Then navigate to http://localhost:8080/src/www.

Tests

You can run tests by executing npm test.

Docs

Documentation is available in the docs directory.

License

MIT License. Use as much or as little as you want.