1 |
84 |
ja_rd |
|
2 |
|
|
Altair Basic is an early implementation of Basic (1975) for the 8080-based
|
3 |
|
|
Altair computer. I have included in the project a demo running the unmodified
|
4 |
|
|
binaries on the light8080 core. See instructions and status log below.
|
5 |
|
|
|
6 |
|
|
Assuming you are using Quartus-2 and targetting a Terasic DE-1 dev board (for
|
7 |
|
|
which the demo is tailored), you need to follow these steps:
|
8 |
|
|
|
9 |
|
|
1.- Create a new project for the DE-1 board, (device EP2C20F484C7, etc.).
|
10 |
|
|
2.- Add all the vhdl files in /vhdl/demos/4kbasic, plus the main cpu file
|
11 |
|
|
light8080.vhdl, to your project.
|
12 |
|
|
3.- Select file c2sb_4kbasic_cpu.vhdl as 'top' entity.
|
13 |
|
|
4.- Configure dual-purpose pin nCEO as regular i/o (Device settings->Device and
|
14 |
|
|
pin options->Dual-purpose pins)
|
15 |
|
|
5.- Import the pin location constraints from file /vhdl/demos/4kbasic/
|
16 |
|
|
c2sb_4kbasic.csv
|
17 |
|
|
|
18 |
|
|
Ready to go. Synthesize and program. It is advisable to have a terminal
|
19 |
|
|
connected before loading the FPGA (19200/8/N/1).
|
20 |
|
|
|
21 |
|
|
Since the demo does not use any external resources other than an oscillator, a
|
22 |
|
|
reset pushbutton and a serial port, it should be easy to port this demo to
|
23 |
|
|
almost any other hardware platform. Only the top file needs changing, all other
|
24 |
|
|
files should be vendor agnostic, though I have only tested them with Xilinx and
|
25 |
|
|
Altera synthesis tools.
|
26 |
|
|
|
27 |
|
|
Note that resetting the CPU does not reload the program (the program is stored
|
28 |
|
|
in an initialized 4K RAM which is all the CPU can see). Once the program has
|
29 |
|
|
started, the only way to cleanly restart it is reprogramming the FPGA. This is
|
30 |
|
|
why the terminal should be connected before programming.
|
31 |
|
|
I admit this is a nasty hack but it saves me the need to build a bootloader. For
|
32 |
|
|
this quick-and-dirty demo this limitation is acceptable.
|
33 |
|
|
|
34 |
|
|
Right after startup the program will ask you a few configuration questions. See
|
35 |
|
|
the picture below for a sample session. Remember the 4K Basic only uses caps
|
36 |
|
|
letters and is a bit unforgiving by today's standards.
|