Skip to content

Commit 7f37cae

Browse files
authored
Merge pull request #83 from venomix666/nanoZ80
Port of CP/Mish to the nano-z80
2 parents 2d1e4de + 1986b91 commit 7f37cae

File tree

19 files changed

+2141
-2
lines changed

19 files changed

+2141
-2
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ Currently it supports these platforms:
4343
- [the Brother WP-2450DS typewriter (and probably others)](arch/brother/wp2450/README.md)
4444
- [the Brother PN-8510MDS SuperPowerNote laptop (and probably others)](arch/brother/pn8510/README.md)
4545
- [the Brother PN-8800FXB SuperPowerNote laptop (and probably others)](arch/brother/pn8800/README.md)
46+
- [the nano-z80 SoC for the Tang Nano 20k FPGA board](arch/nano-z80/README.md)
4647

4748
(Some of these are pretty stale due to difficulty of testing and may not work.
4849
Later entries are newer! If you have any problems, please report bugs.)

arch/nano-z80/README.md

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
Platform: the nano-z80
2+
======================
3+
4+
The [nano-z80](https://github.com/venomix666/nano-z80) is a Z80 based SoC for the [Tang Nano 20k FPGA Board](https://wiki.sipeed.com/hardware/en/tang/tang-nano-20k/nano-20k.html). It is specifically designed to run CP/M but on modern hardware - with HDMI output, USB keyboard, SD-card and the processor running at ~25 MHz.
5+
6+
What you get with this port:
7+
8+
- 14x4 MB drives on the SD-card
9+
- Most of an ADM-3a / Kaypro II terminal emulator supporting 80x30 text
10+
- A TPA of 57 kB
11+
- Two serial ports, one on the built in USB UART and on a TTL UART header
12+
- A crude but functional terminal program with X-modem file transfer support
13+
- Utilities for changing baudrate and setting the display color
14+
- A fully implemented IO-byte which allows using monitor/keyboard or any of serial ports for the console.
15+
16+
How to use it
17+
-------------
18+
Write `nano-z80.img` to a micro-SD card using `dd` and press `B` in the nano-z80 monitor to boot from the SD-card.
19+
20+
By default, only drive `A:` is formatted. To use the additional drives, run `mkfs B:` up to `mkfs N:` to format the other drives once you have booted to CP/M.
21+
22+
UART B (the one on the TTL UART header) supports changing baudrates, this can be done either using the `baudrate.com` tool or from inside `nanoterm`.
23+
24+
The USB keyboard arrow key configuration defaults to ADM3A key codes. This can be changed to WordStar or EMACS/MINCE key codes with the `arrowkey.com` tool.
25+
26+
If you put the SD-card in a SD-card reader on a Linux machine, the diskdefs file in the
27+
cpmish root allows you to read and write files to the A: drive, e.g.:
28+
29+
cpmcp -f nanoz80 -i /dev/sdf 0:oncpm onlinux
30+
31+
Modifying the IO byte at boot
32+
--------------
33+
The IO is mapped in the following way:
34+
- CRT: USB keyboard and HDMI output
35+
- TTY/LPT: UART header on carrier board
36+
- PTP/PTR/UC1: USB UART on Tang Nano 20k board
37+
38+
The default value is 0x81, so that the HDMI output and USB keyboard is used for the console. It can be modified according to the table below before booting by first loading to image from the SD-card using the `L` command in the monitor and then writing to address 0xF833 by running for instance `WF633,83` to redirect the console to the USB UART, and then booting by running `JF600`.
39+
40+
As the monitor is diplayed both on the USB UART and the HDMI-output/USB-keyboard by default, this can be useful when running with no external display connected.
41+
```
42+
LIST PUNCH READER CONSOLE
43+
0x81 - 10 00 00 01 - LPT: TTY: TTY: CRT:
44+
0x95 - 10 01 01 01 - LPT: PTP: PTR: CRT:
45+
0x80 - 10 00 00 00 - LPT: TTY: TTY: TTY:
46+
0x83 - 10 00 00 11 - LTP: TTY: TTY: UC1:
47+
0x97 - 10 01 01 11 - LTP: PTP: PTR: UC1:
48+
```
49+
50+
51+
Who?
52+
----
53+
54+
CP/Mish was written David Given, and is covered under the terms of the whole CP/Mish project. See the documentation in the project root for more information. This port and the nano-z80 project was made by [Henrik Löfgren](https://github.com/venomix666/).
55+
56+
57+
58+
59+
60+

0 commit comments

Comments
 (0)