Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
71e242f
Archival commit of non-finished port. Disk read/write remains to be i…
venomix666 Sep 21, 2025
4884448
Implemented read and write. It boots but the filesystem is not read c…
venomix666 Sep 23, 2025
eda7533
Fixed deblocking of 512 byte sectors, untested
venomix666 Sep 23, 2025
ae70b7f
Fixed warmboot. Now boots and runs great with basic functionality
venomix666 Sep 24, 2025
5544087
Changed boot sector format to include separate load and boot adresses
venomix666 Sep 24, 2025
d97edc2
Added basic support for USB keyboard and HDMI output to BIOS
venomix666 Sep 25, 2025
9c11737
Remove higest bit in text output
venomix666 Sep 25, 2025
b35e81e
Added IOBYTE support and implemented LIST, READER and PUNCH with supp…
venomix666 Sep 27, 2025
2287701
Correct IO_PAGE constant for UART_B
venomix666 Sep 27, 2025
5d9c57c
Added a B drive
venomix666 Sep 27, 2025
ccb7c68
Cleanup of multidisk code
venomix666 Sep 27, 2025
367828f
Reconfigured for 4x4MB drives
venomix666 Sep 27, 2025
307668c
Added TTY support
venomix666 Sep 29, 2025
2afe510
Also include actual tty code...
venomix666 Sep 29, 2025
6adafd7
Harmonized naming
venomix666 Sep 29, 2025
c01fadc
Added baudrate setting utility
venomix666 Sep 29, 2025
46896ec
Added simple serial terminal program with X-modem support
venomix666 Oct 2, 2025
9e696df
Changed SD-card boot sector to 0x00000000
venomix666 Oct 2, 2025
f81dd78
Merged updates from master
venomix666 Oct 2, 2025
0ac350f
Update README.md
venomix666 Oct 2, 2025
52b9955
Update README.md
venomix666 Oct 2, 2025
ed62232
Cleanup and commenting
venomix666 Oct 2, 2025
9e11aec
Update README.md
venomix666 Oct 2, 2025
554ab1d
Update README.md
venomix666 Oct 2, 2025
73a50f4
Added tools for setting color
venomix666 Oct 3, 2025
6ed6053
Changed to 14x4 MB drives
venomix666 Oct 3, 2025
25c53f7
Update README.md
venomix666 Oct 3, 2025
daefafc
Added cls tool
venomix666 Oct 3, 2025
79ba3dc
Fix usage message for colorbg
venomix666 Oct 3, 2025
0b49a6a
Optimized delay loop
venomix666 Oct 3, 2025
a3e6f9c
Update README.md
venomix666 Oct 3, 2025
6b5fde5
Fix register usage in color setting tools
venomix666 Oct 4, 2025
0c5ea1c
Delays...
venomix666 Oct 4, 2025
850f91e
Remove ugly delay loop and add timeout to tty busy flag check instead
venomix666 Oct 9, 2025
1986b91
Added tool for changing the arrow key configuration
venomix666 Oct 10, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ Currently it supports these platforms:
- [the Brother WP-2450DS typewriter (and probably others)](arch/brother/wp2450/README.md)
- [the Brother PN-8510MDS SuperPowerNote laptop (and probably others)](arch/brother/pn8510/README.md)
- [the Brother PN-8800FXB SuperPowerNote laptop (and probably others)](arch/brother/pn8800/README.md)
- [the nano-z80 SoC for the Tang Nano 20k FPGA board](arch/nano-z80/README.md)

(Some of these are pretty stale due to difficulty of testing and may not work.
Later entries are newer! If you have any problems, please report bugs.)
Expand Down
60 changes: 60 additions & 0 deletions arch/nano-z80/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
Platform: the nano-z80
======================

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.

What you get with this port:

- 14x4 MB drives on the SD-card
- Most of an ADM-3a / Kaypro II terminal emulator supporting 80x30 text
- A TPA of 57 kB
- Two serial ports, one on the built in USB UART and on a TTL UART header
- A crude but functional terminal program with X-modem file transfer support
- Utilities for changing baudrate and setting the display color
- A fully implemented IO-byte which allows using monitor/keyboard or any of serial ports for the console.

How to use it
-------------
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.

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.

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`.

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.

If you put the SD-card in a SD-card reader on a Linux machine, the diskdefs file in the
cpmish root allows you to read and write files to the A: drive, e.g.:

cpmcp -f nanoz80 -i /dev/sdf 0:oncpm onlinux

Modifying the IO byte at boot
--------------
The IO is mapped in the following way:
- CRT: USB keyboard and HDMI output
- TTY/LPT: UART header on carrier board
- PTP/PTR/UC1: USB UART on Tang Nano 20k board

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`.

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.
```
LIST PUNCH READER CONSOLE
0x81 - 10 00 00 01 - LPT: TTY: TTY: CRT:
0x95 - 10 01 01 01 - LPT: PTP: PTR: CRT:
0x80 - 10 00 00 00 - LPT: TTY: TTY: TTY:
0x83 - 10 00 00 11 - LTP: TTY: TTY: UC1:
0x97 - 10 01 01 11 - LTP: PTP: PTR: UC1:
```


Who?
----

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/).






Loading