summaryrefslogtreecommitdiffstats
path: root/README
blob: 6b49aed25673613b99b95bf15255ba3cbcdf8530 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
This is an implementation of ABC80 in an FPGA by H. Peter Anvin
<hpa@zytor.com>.  Some of this information may be out of date; check
the CHANGES file.

This version uses an "Altera Nios Development Kit, Cyclone Edition"
combined with a "AleaRep Lancelot" daughtercard (for
VGA/Keyboard/Mouse/Sound -- see http://www.fpga.nl/).

To build, run "make" in the top directory on a Unix/Linux machine,
or under Cygwin on a Windows machine, then build the Quartus II
project "abc80.qsf".

As provided, the design runs at 25 MHz (the real ABC80 ran at 3 MHz.)
SW3 is set up as a "turbo button", selecting 25, 12, 6, or 3 MHz
operation. Turbo can also be selected via "out (144),n" where n=0 for
3 MHz and 3 for 25 MHz.  The speed is shown on the display.

There is an MMU which can address the 1 MB of SRAM on the card.  This
MMU works as follows:

There are 4 memory maps each consisting of 256 pages of 256 bytes
each.

To write the MMU:

   out (128),vpage
   out (129),map
   out (130),ppage_lo
   out (131),ppage_hi

To read the MMU:

   out (128),vpage
   out (129),map
   in ppage_lo,(130)
   in ppage_hi,(131)

To select which memory maps to use:

   ; Separate maps for read, write, and code
   out (132),(xmap << 4)+(wmap << 2)+rmap

To read the current memory maps:

   in maps,(132)

The MMU also supports "out (7),map" for compatibility with
Mikrodatorn's 64K expansion.  This sets all the maps to the same
value.

The top 4 bits of the physical page indicate memory device; the rest
is address; see data/mmuinit.pl for which memory devices exist.

The MMU replaces the address direction ROM in the real ABC80.

80-column mode is now fully supported.  Switching is via INP(4)/INP(3)
as normal. The script data/munge_basic.pl does the appropriate
patching of the BASIC ROM; it is specifically configured for a
checksum 9913 ROM; if you want to replace the BASIC ROM with an 11273
ROM you have to adjust this script.  The MMU controls whether or not
memory contents should be modified in 80-character mode, see
data/mmuinit.pl for details.  The BASIC checksum in 80-column mode is
9561.

In 80-column mode the low 1K is at address 29696 (0x7400).  This is
definitely different from the MyAB module, and I *think* from the GeJo
one, but is more efficient with the memory layout.  As far as I know
most (all?) programs that are 80-column aware use the table at address
884 anyway; I there were at least three different 80-column cards on
the market, and at least two of which had different memory layout.  If
you don't like the one I picked, just reprogram the MMU :)

The CompactFlash is now supported; the controller blindly assumes a
64 MB or larger card (specifically, 62,390,272 bytes or 121,856
512-byte sectors.)  It appears under UFD-DOS as HD0: to HD3:; the
UFD-DOS ROM for ABC80 from ABC-klubben is included.  Note that it uses
the top 64 bytes of the POKE-area (65472 to 65535) since it is a
binary port from ABC800.  It would probably be an easy patch to
provide it with some RAM in the lower memory map using the MMU and
avoid that hassle.  The "tools" directory contains a Perl script which
creates an empty UFD-DOS filesystem.