This is an 1980s-era Apple ][+ implemented in VHDL for FPGAs.

Stephen A. Edwards, sedwards@cs.columbia.edu
http://www1.cs.columbia.edu/~sedwards
------------------------------
The current implementation uses the Altera DE2 board and takes advantage
of its off-chip SRAM, VGA DAC, SD card, and PS/2 keyboard interface.

It was designed to be fairly easy to port: the apple2.vhd file should
be implementation-agnostic: it only assumes the external availability
of 48K of RAM and a keyboard.

It contains a simple read-only Disk II emulator that expects
"nibblized" disk images written raw onto an SD or MMC card (i.e., it
does not use a FAT or any other type of filesystem).

The VGA controller (not part of an original Apple) doubles each line
and interprets the Apple's NTSC-compatible color signals to produce a color
640 X 480 VGA display.
------------------------------
To compile under Altera's Quartus software, open the apple2fpga.qpf
project file and compile.
------------------------------
To write a .nib image to an SD/MMC card, I use

dd bs=256 count=910 if=dos22master.nib of=/dev/sdd

Of course, your card may appear as something other than /dev/sdd.
------------------------------
VHDL files, in order of elaboration:

timing_generator.vhd		Timing signal generation, video counters
character_rom.vhd		The beautiful 5 X 8 uppercase-only text font
video_generator.vhd		Text, lores, and hires mode shift registers
main_roms.vhd			8K ROMs: Applesoft and the Monitor D000-FFFF
cpu6502.vhd			The 6502 CPU core
apple2.vhd			Top-level of the Apple: mostly address decode
vga_controller.vhd		NTSC-to-VGA color interpolation, line doubler
PS2_Ctrl.vhd			Low-level PS/2 keyboard interface
kbd_transl.vhd			PS/2 scancode-to-ASCII table
kbd_intf.vhd			PS/2 keyboard-to-Apple interface
disk_ii_rom.vhd			C600-C6FF ROM: Disk II bootstrap
disk_ii.vhd			Read-only Disk II emulator
spi_controller.vhd		SD/MMC card controller: reads raw tracks
DE2_TOP.vhd			Top-level entity for the Altera DE2 board
testbench.vhd			A top-level testbench

Other files:

dsk2nib.c			Converts a 140K .dsk image file to the
				raw 228K .nib format used by the
				Disk II emulator

rom2vhdl			Script to convert raw ROM files into
				synthesizable VHDL models

apple2fpga.qpf			Project file for Altera's Quartus
DE2_TOP.qsf			Mostly pin assignments for Altera's Quartus

dos33master.dsk			140K disk image for Apple DOS 3.3 system master

apple_II.rom			8K Apple ][+ ROM
slot6.rom			Disk II interface card bootstrap ROM C600-C6FF

Makefile			Rules for compiling with the ghdl simulator
------------------------------
Credits:

The 6502 CPU core is from Peter Wendrich's Commodore 64 emulator
http://www.syntiac.com/fpga64.html pwsoft@syntiac.com

The low-level PS/2 keyboard controller is from ALSE http://www.alse-fr.com

The Apple ][ keyboard emulation is from Alex Freed's FPGApple,
http://mirrow.com/FPGApple/
