Table of Contents
65ALL Rev1, A Standalone 6502 Computer
Introduction
65ALL Rev1 corrected all the engineering changes of rev0 65ALL. It is functionally same as rev0 65ALL.
Features
- W65C02 clocked at 25.175MHz
- EPM7128SQC100, 128-macrocell CPLD
- 128KB RAM, 64K in use
- Compact flash interface
- VGA controller for 64×48 monochrome text display
- PS2 keyboard controller
- Bit bang serial port at 115200 N82
- 3 RC6502 expansion connectors
Theory of Operation
The 128-macrocell EPM7128S CPLD is the heart of 65ALL. It contains a 32-byte bootstrap ROM, decoding logic, VGA controller, PS2 keyboard controller, and a bit-bang serial port.
32-byte Bootstrap ROM
The 32-byte bootstrap ROM is located at top of 6502's memory from $FFE0-$FFFF. The same 32 bytes are replicated from $FC00 to $FFFF. When reset is negated, W65C02 executes the 32-byte bootstrap ROM to initialize the compact flash to read the contents of the master boot record and save to 6502's memory starting from $C002 to $C0E1. Compact flash is initially configured as 16-bit wide device but only the lower byte of the 16-bit word is saved to 6502's memory. When 224 bytes of data are saved from $C002 to $C0E1, 6502 jumps to $C002 and execute the program.
In theory any 224-byte program can be loaded and executed, but in practice the 224-byte program is a file loader that read in a monitor program resided in known location in CF disk and jump to the monitor
VGA Controller
The VGA controller interfaces to a 4Kx8 dual port RAM. One side of the dual port RAM is read/write accessible by 6502 as 4K memory space. 3K of the memory space maps to each character of the 64×48 display; the top 1K is font lookup table for characters 0x0-0x7F. 6502 can read/write to its side of dual port RAM anytime without affecting video display quality. The other side of the dual port RAM is read only accessible by the VGA controller. The VGA controller continuously reads the 3K video text memory and looks up corresponding font and output the pixel representation of the character on VGA outputs. This is a monochrome display.
VGA texts reside in memory 0xE000-0xEBFF; fonts reside in memory 0xEC00-0xEFFF.
PS2 Keyboard Controller
The PS2 controller converts PS2 data and clock to 8-bit data register and status register.
- When a byte of keyboard data is received, it does not generate interrupt but assert a data ready status flag instead. It also pull the PS2 clock low to inhibit keyboard from sending anymore data until the current data is read.
- When PS2 clock is high for 300uS or longer, it reset the bit-counting state machine. This re-synchronize the state machine in case there are spurious glitches on PS2 clock.
PS2 data register is located at 0xF8A1; PS2 status register is located at 0xF8A0
Bit-bang serial port
Bit-bang serial port has one writable register as transmitter and a location to read the state of receive input. The writable register is at location $F889 where data bit 0 determines the state of the transmit output. Writing '1' to data bit 0 causes transmit output to be high voltage level and writing '0' to data bit 0 causes transmit output to be low voltage level. The transmit output is at high voltage level at reset. The state of the receive input is represented by data bit 7 of address $F088 where a value of '1' means the receive input is at high voltage level and a value of '0' means the receive input is at low voltage level.
Design Information
Software
32-byte Bootstrap ROM resided in CPLD
Program stored in CF's master boot record ← this is 2nd stage bootstrap to load and run monitor program stored in CF disk.
65ALL monitor, rev0.4a
Klaus Dormann instruction test for 6502, program starts at 0x400
Klaus Dormann instruction test for 65C02, program starts at 0x400
Tinyload file loader, a small 256-byte program for uploading new monitor software replacing the existing monitor.
CFBoot utility software for saving programs to master boot record, saving monitor to CF disk, and saving supporting software to CF.
BadApple demo program. Program needs BadApple data file in CF. Program starts from 0x1000
CF image of 65ALL software. This image contains 2nd stage bootstrap in master boot record, font table, tinyload file loader, and 65ALL monitor. It also include data file for BadApple demo program.