GitXplorerGitXplorer
a

deck65

public
11 stars
0 forks
0 issues

Commits

List of commits on branch main.
Unverified
d433a9ac46209df72022e5c7d6c8ae313eb7e937

SPI circuit

aand3rson committed a year ago
Verified
508bd12658a401d2c04e48381b77e66f89b1de68

Add .envrc into docker during build

aand3rson committed a year ago
Unverified
7cf62901ab71cb495b74b6d13162a6c6938b8428

Update README

aand3rson committed a year ago
Unverified
b99c2d56257f34c04208bb94c0c5d522f4c6271a

Update README

aand3rson committed a year ago
Verified
0c4205763d9c3a259853180154621628e5c967bb

Add case images

aand3rson committed a year ago
Verified
e3a834c75a183fd15e9b2c12adb81c09082df454

Case images

aand3rson committed a year ago

README

The README file for this repository.

Deck65

Homebrew 6502-based single-board computer with WiFi, built-in mechanical keyboard, uSD card adapter, I2C/SPI, EEPROM, & RTC.

Deck65 SBC Deck65 SBC Deck65 SBC

Pull with git pull --recurse-submodules.

Memory map

+--------------+-------+------------------+------+------------------------------------------+
| RANGE        | TYPE  | ADDR             | SIZE | Notes                                    |
+--------------+-------+------------------+------+------------------------------------------+
| $0000..$0FFF | RAM   | 0000------------ | 32 K | /EN = A15                                |
| $1000..$1FFF |       | 0001------------ |      | $0000..$1000 - zeropage & video buffer   |
| $2000..$2FFF |       | 0010------------ |      | $1000..$7FFF - programs from SD Card     |
| $3000..$3FFF |       | 0011------------ |      |                                          |
| $4000..$4FFF |       | 0100------------ |      |                                          |
| $5000..$5FFF |       | 0101------------ |      |                                          |
| $6000..$6FFF |       | 0110------------ |      |                                          |
| $7000..$7FFF |       | 0111------------ |      |                                          |
+--------------+-------+------------------+------+------------------------------------------+
| $8000..$8FFF | LOROM | 1000------------ | 16 K | /EN = NAND(A15, NAND(A14))               |
| $9000..$9FFF |       | 1001------------ |      | Contains OS ("MicroREPL")                |
| $A000..$AFFF |       | 1010------------ |      |                                          |
| $B000..$BFFF |       | 1011------------ |      |                                          |
+--------------+-------+------------------+------+------------------------------------------+
| $C000..$CFFF | N/C   | 1100------------ | 4 K  | Unused, may add extra '138 with /GA=/A13 |
+--------------+-------+------------------+------+------------------------------------------+
| $D000..$DFFF | I/O   | 1101------------ | 4 K  | G = A12, /GA = A13, /GB = NAND(A15, A14) |
|              |       | 1101-000-------- | 256B | $D000..$D0FF - RAM banking register      |
|              |       | 1101-001-------- | 256B | $D100..$D1FF - 6522 VIA                  |
|              |       | 1101-010-------- | 256B | $D200..$D2FF - 6551 ACIA                 |
|              |       | 1101-011-------- | 256B | $D300..$D3FF - T6963C LCD (240x64)       |
+--------------+-------+------------------+------+------------------------------------------+
| $E000..$EFFF | HIROM | 1110------------ | 8 K  | /EN = NAND(/NAND(A15, A14), A13)         |
| $F000..$FFFF |       | 1111------------ |      | Contains Kernel ("Kore")                 |
+--------------+-------+------------------+------+------------------------------------------+

LOROM (10xx) || HIROM (111x):
/EN = A15 && (/A14 || (A14 && A13))
/EN = NAND(A15, /A14 || /NAND(A14, A13))
/EN = NAND(A15, NAND(A14, NAND(A14, A13)))

Features

  • W65C02, 512 KB RAM (32KB visible to CPU, banked into 4 x 8 KB segments)

  • 240x64 LCD display (T6963C)

  • Built-in mechanical PS/2 keyboard, powered by ATmega328P

  • Internet! Works through ESP-01

  • VIA W65C22N(6TPG-14)

    Provides:

    • SPI (used for Micro SD Card adapter)
    • I2C (used for RTC & EEPROM)
    • PS/2 host (used for built-in or external keyboard)
  • ACIA W65C51N(6TPG-14)n

    Provides:

    • Communication with ESP-01
    • Communication with external devices through pin header

    Note: I'm using NMOS-compatible versions of VIA & ACIA (N suffix) with open-drain /IRQ line.
    See http://archive.6502.org/datasheets/wdc_w65c22_sep_13_2010.pdf (page 25) for more details.

  • Address decoder & underclocking - ATF16V8B-15PU

    Main crystal is 16 MHz, and the CPU runs at either 8 MHz or 2 MHz.
    Reason for this is that T6963C LCD can only operate on up to 2.75 MHz.
    So when CPU needs to acccess the LCD, ATF16V8 divides clock speed by 4, bringing it down to 2 MHz.
    This is done by implementing a 2-bit counter using registered outputs.

  • Memory banking: 74LS670

    Entire RAM (first 32 KB) is divided into 4 x 8 KB segments.
    Each segment can use one of its own 16 banks.
    This allows to selectively bank parts of RAM in and out.
    Using a machine-tooled socket actually allows to connect JCO-8 or JCO-14 oscillators.

  • Traco Power TSR 1-2450 (drop-in replacement for 7805)

    It runs much cooler than L7805 since it's a switching regulator.
    I use them a lot, although they are not as cheap as 7805.

V2.0 schematic: 65c02s SBC PCB

ROM

Kernel code currently provides the following features:

  • Simple REPL shell to monitor memory & run programs
  • 128x64 LCD (through VIA)
  • PS/2 keyboard (through VIA)
  • Micro SD Card in SPI mode (through VIA)
  • I2C & SPI support
  • Basic FAT16 support - listing root folder, loading/executing programs

Resources

So what can you do with it?

Playing snake, for example:

Snake on 65C02 SBC

Credits & references

Links