neoapple2
neoapple2 copied to clipboard
Port of Stephen A. Edwards's Apple2fpga to PYNQ-Z1 (Xilinx Zynq FPGA), to emulate an Apple II+.
Apple II+ Emulation on PYNQ-Z1
NeoApple2 - A Port of Apple2fpga to Xilinx Zynq
Feng Zhou, 2021-7
EN | 中文
This is a port of Stephen A. Edwards's Apple2fpga to Xilinx Zynq platform. It runs on the PYNQ-Z1 FPGA board and emulates an Apple II Plus computer on the board. Here are the main features,
- Video output through the on-board HDMI port.
- PS/2 Keyboard input.
- Sound output through the on-board 3.5mm mono line-out jack.
- Switching between monochrome and color display modes.
- Loading of floppy disk images through .nib files on MicroSD cards.

Set up hardware and run the binary package
Easy way to get started is to download the binary package. There is a BOOT.BIN file inside it. This includes everything you need in terms of software. Before you can run that, however, you need the following hardware parts,
- A PYNQ-Z1 FPGA board.
- A Pmod PS2 adapter board for connecting the keyboard.
- A PS/2 keyboard (not USB keyboard).
- A MicroSD card, for holding disk images.
- A monitor with HDMI input.
- A HDMI cable.
- A MicroUSB cable.
- A computer, to talk to Z1 over USB.
- If you need sound, a 3.5mm audio cable from Z1 to speaker, or a headphone with 3.5mm plug.
To hook the hardware up,
- Plug the Pmod PS2 into the upper level of PMODA socket on Z1. Then plug the PS/2 keyboard into the Pmod PS2.
- Connect the Z1 board to your monitor through the HDMI OUT port on Z1.
- Connect your speaker cable or headphone to the audio jack on the left side of Z1.
- Connect Z1 to your computer with the MicroUSB cable.
- Switch the JP4 jumper (top-left) to MicroSD position. In this setting the board boots from the MicroSD card.
- Plugging the MicroSD card it into your computer with a card reader. Then format it in FAT32 (exFAT probably also works). Then copy the
BOOT.BINfile to the root directory. - Copy any Apple II disk images you have to the MicroSD card, also root dir. The Internet Archive has a rich library of these. Only
.nibfiles are supported. But.dskand.docan easily be converted to.nibby dsk2nib.
Now turn on the PYNQ Z1. Press any key on the keyboard. And you should be greeted with the ] prompt in a couple of seconds.
To load a disk image, open any serial console software on your PC (for example Putty). Then you have a command line,
listto list all disk images.load <x>to load a disk image.
Common Apple II commands,
CATALOG
PR#6
CALL -1184
LOAD
RUN
BRUN
Compile from source
Brief instructions for compiling from source.
- Install Xilinx Vivado Design Suite - HLx Editions - 2020.2. Then install PYNQ-Z1 board files.
- Install Digilent IP library.
- Build Vivado code in
neoapple2/to get the XSA that defines the hardware "platform".- Source
neoapple2/neoapple2.tclin Vivado Tcl Shell to create actual project files. - Open the generated project file
neoapple2.xprin Vivado. - Click "generate bitstream" (bottom-left) to build whole project.
File -> Export Hardware -> Include bitstream -> neoapple2.xsaTools -> Launch Vitis IDE
- Source
- In Vitis IDE, build the workspace in
neoapple2uito generate final SD card boot image,- If you are not already in the
neoapple2uiworkspace, open it byFile -> Switch Workspace. File -> New -> Platform Projectand name the projectneoapple2and for "hardware specification", choose theneoapple2.xsafile generated above. Then pressFinish.Project -> Build Allto build everything. If things went well, you will get the boot image atneoapple2ui/neoapple2ui_system/Debug/sd_card/BOOT.BIN.
- If you are not already in the
In-depth
I wrote about the design and implementation of the system in the technical report.
Video demo:
Feedback
Please leave your comments and feedback here.
