|
| 1 | +DAN64, an AVR based 8-bit microcomputer |
| 2 | +======================================= |
| 3 | + |
| 4 | +This is my personal attempt to build a 8-bit microcomputer based on |
| 5 | +the popular ATmega328 microcontroller (MCU) as an excuse to learn some |
| 6 | +electronics. Check `docs/` directory for further information. |
| 7 | + |
| 8 | +The microcomputer can be assembled and run in a breadboard with an |
| 9 | +Arduino Uno board. |
| 10 | + |
| 11 | +General features: |
| 12 | + |
| 13 | + - Composite video black and white output, 256 x 192 resolution, 32 x 24 |
| 14 | + characters (8 x 8 pixels font, code page 437 character set). |
| 15 | + - PS/2 keyboard support. |
| 16 | + - 6502 virtual machine with system call interface to native code |
| 17 | + services. |
| 18 | + - Linear 64KB memory access from the virtual machine (256 bytes page zero, |
| 19 | + 256 bytes hardware stack, 6144 bytes of video RAM and 58880 bytes for |
| 20 | + user programs). |
| 21 | + - External storage support via audio in/out. |
| 22 | + - Integrated 6502 assembler and disassembler. |
| 23 | + - Basic shell supporting peek, poke, load, run, etc. |
| 24 | + |
| 25 | +Project page: http://www.usebox.net/jjm/dan64/ |
| 26 | + |
| 27 | +General directory structure |
| 28 | +--------------------------- |
| 29 | + |
| 30 | + - `docs/`: documentation of the project. |
| 31 | + - `schematics/`: KiCad schematics and PCB design. |
| 32 | + - source code: |
| 33 | + - `include/`: general include files. |
| 34 | + - `init/`: main entry point for the firmware, including the implementation |
| 35 | + of the syscalls. |
| 36 | + - `video/`: composite video generation. |
| 37 | + - `input/`: PS/2 keyboard support. |
| 38 | + - `memory/`: memory functions. |
| 39 | + - `vm/`: 6502 virtual machine. |
| 40 | + - `test/`: virtual machine test suite. |
| 41 | + - `storage/`: storage using audio in/out. |
| 42 | + - `tools/`: wav audio file encoder. |
| 43 | + - `dasm/`: DAN64 assembler/disassembler. |
| 44 | + - `tools/`: standalone version. |
| 45 | + - `tools/`: some misc auxiliary tools (eg, font bitmap generation). |
| 46 | + - `cc65/`: CC65 runtime for cross-compiling C programs. |
| 47 | + - `examples/`: several user program examples in ca65 assembler and C. |
| 48 | + - `images/`: logos, pictures, screenshots, etc. |
| 49 | + |
| 50 | + |
| 51 | +Build instructions |
| 52 | +------------------ |
| 53 | + |
| 54 | +Install GCC AVR compiler and toolchain, and run `make` in the top level |
| 55 | +directory. |
| 56 | + |
| 57 | +If `avrdude` is installed and you want to deploy to an Arduino Uno board |
| 58 | +you can try `make upload`, although some tweaking may be requited. |
| 59 | + |
| 60 | +The examples and the CC65 runtime require the |
| 61 | +[CC65 compiler](https://github.com/cc65/cc65). If the binaries are in |
| 62 | +your path, just use `make`. |
| 63 | + |
| 64 | +The user programs can be encoded into audio using the `encode` tool in the |
| 65 | +storage module (requires POSIX `getopt` and `libsndfile`). |
| 66 | + |
| 67 | + |
| 68 | +Notes |
| 69 | +----- |
| 70 | + |
| 71 | +Video: |
| 72 | + |
| 73 | + - timing is set for PAL. |
| 74 | + - output is de-interlaced. |
| 75 | + - it may require set TV's AFC (Automatic Frequency Control) to "mode2" |
| 76 | + (usually for VCRs or Camcorders). |
| 77 | + |
| 78 | +Input: |
| 79 | + |
| 80 | + - supported UK PS/2 keyboard layout only, but is easy to adapt to other layouts. |
| 81 | + |
| 82 | +Storage: |
| 83 | + |
| 84 | + - audio in requires quite high volume, start with a 90% and adjust. |
| 85 | + |
| 86 | + |
| 87 | +Author and licensing |
| 88 | +-------------------- |
| 89 | + |
| 90 | +Juan J. Martinez <[email protected]> |
| 91 | + |
| 92 | +This software is free software (see LICENSE file for details), unless |
| 93 | +explicitly stated otherwise. |
| 94 | + |
0 commit comments