Difference between revisions of "Z80 in 3 Chips"

From Land Boards Wiki
Jump to navigation Jump to search
 
(54 intermediate revisions by the same user not shown)
Line 9: Line 9:
 
* 512KB SRAM
 
* 512KB SRAM
 
* [https://www.mouser.com/new/Cypress-Semiconductor/cypress-psoc5lp/ PSoC5LP]
 
* [https://www.mouser.com/new/Cypress-Semiconductor/cypress-psoc5lp/ PSoC5LP]
 +
** [https://github.com/douggilliland/Retro-Computers/blob/master/Z80/PSOC/PSOC_Design_Files/Z80-PSoC-3-Chips_002/Z80_3Chip.cydsn/Z80_3Chip_datasheet.pdf Z80_PSoC Datasheet] - generated from PSoC Creator
 
** PSoC5 LP emulates standard Z80 peripheral chips
 
** PSoC5 LP emulates standard Z80 peripheral chips
 
*** Serial port with USB
 
*** Serial port with USB
Line 34: Line 35:
  
 
== Connectors ==
 
== Connectors ==
 +
 +
[[file:Z80_PSOC_Rev3_CAD.PNG]]
  
 
=== H1 - I2C Interface ===
 
=== H1 - I2C Interface ===
Line 62: Line 65:
 
=== J2, J3 - I/O Ports ===
 
=== J2, J3 - I/O Ports ===
  
* J3 connects to [[JOYPAD]]
+
* J3 connects to [[JOYPAD]] on GPA connector
  
 
[[File:Conn_J2_J3.PNG]]
 
[[File:Conn_J2_J3.PNG]]
Line 79: Line 82:
  
 
== Software ==
 
== Software ==
 +
 +
=== Software Configuration ===
 +
 +
* Hardware/Software options are set in the PSoC "Hardware_Config.h" file
 +
** Comment out all but one choice
 +
** Options
 +
*** GRANT_9_CHIP_Z80
 +
*** [http://searle.x10host.com/z80/SimpleZ80.html GRANT_7_CHIP_Z80]
 +
*** GRANT_7_CHIP_Z80_STANDALONE
 +
*** [http://searle.x10host.com/Multicomp/index.html GRANT_FPGA_CPM]
 +
*** MULTIBOOT_CPM
 +
 +
=== Operation ===
 +
 +
* Card waits on USB connection
 +
* Run PuTTY
 +
** Baud rate is auto-detected by PSoC
 +
* After PuTTY is running, card boots into Front Panel Control
 +
* LEDs are cycled
 +
* Message
 +
 +
<pre>
 +
Z80_PSoC - Running Front Panel
 +
 +
SW25 SW26 SW27 SW28 SW29 SW30 SW31 SW32
 +
Run  Mon  N/A  N/A  N/A  LDAD STOR INCA
 +
 +
SW17 SW18 SW19 SW20 SW21 SW22 SW23 SW24
 +
A15  A14  A13  A12  A11  A10  A9  A8
 +
 +
SW9  SW10 SW11 SW12 SW13 SW14 SW15 SW16
 +
A7  A6  A5  A4  A3  A2  A1  A0
 +
 +
SW1  SW2  SW3  SW4  SW5  SW6  SW7  SW7
 +
D7  D6  D5  D4  D3  D2  D1  D0
 +
 +
Press SW25 (upper left button) to exit Front Panel and run Z80
 +
Press SW26 to run Monitor/Test Code
 +
</pre>
 +
 +
* Options to run Z80 or PSoC Monitor
 +
** SW32 (Upper right) = Increment address, read
 +
** SW31 = Store data, increment address, read data
 +
** SW30 = Load Address, read memory
 +
** SW26 = Run Monitor
 +
** SW25 (Upper Left) = Run Z80
 +
 +
=== Front Panel ===
  
 
[[file:EightBitFrontPanel720px.JPG]]
 
[[file:EightBitFrontPanel720px.JPG]]
 +
 +
<pre>
 +
SW25 SW26 SW27 SW28 SW29 SW30 SW31 SW32
 +
Run  Mon  N/A  N/A  N/A  LDAD STOR INCA
 +
 +
SW17 SW18 SW19 SW20 SW21 SW22 SW23 SW24
 +
A15  A14  A13  A12  A11  A10  A9  A8
 +
 +
SW9  SW10 SW11 SW12 SW13 SW14 SW15 SW16
 +
A7  A6  A5  A4  A3  A2  A1  A0
 +
 +
SW1  SW2  SW3  SW4  SW5  SW6  SW7  SW7
 +
D7  D6  D5  D4  D3  D2  D1  D0
 +
</pre>
 +
 +
* Press SW25 (upper left button) to exit Front Panel and run Z80
 +
* Press SW26 to run Monitor/Test Code
  
 
=== Z80_PSoC Monitor ===
 
=== Z80_PSoC Monitor ===
  
* Press button one in from upper left RUN button on [[Front Panel For 8 Bit Computers]] (SW26) to run the Monitor
+
* Press SW26 button (one in from upper left) button on [[Front Panel For 8 Bit Computers]] to run the Monitor
 
* [https://github.com/douggilliland/Retro-Computers/tree/master/Z80/PSOC/PSOC_Design_Files/Z80-PSoC-3-Chips_002 PSoC Code Github repo]
 
* [https://github.com/douggilliland/Retro-Computers/tree/master/Z80/PSOC/PSOC_Design_Files/Z80-PSoC-3-Chips_002 PSoC Code Github repo]
 +
* SRAM can be examined/changed in SRAM from the Front Panel
 +
 +
<pre>
 +
Land Boards, LLC - Z80_PSoC monitor
 +
I - Initialize SD Card
 +
B - Blink LED
 +
F - Read Front Panel
 +
Rxxxxxxxx - Read sector xxxxxxxx from the SD Card
 +
N - Read next sector from the SD Card
 +
W - Write to the SD Card at 2GB - 1 sector
 +
X - eXit Monitor and run Z80
 +
? - Print this menu
 +
</pre>
 +
 +
* Type to check the SD card
 +
 +
<pre>
 +
R4000
 +
</pre>
 +
 +
* Result:
  
[[file:Z80_PSoC_Monitor.PNG]]
+
[[file:Z80_PSoC_Monitor_D_Command.PNG]]
  
=== Multiboot Multicomp ===
+
* Type X to exit and run Z80
 +
 
 +
=== Multiboot Multicomp (MULTIBOOT_CPM) ===
  
* Press upper left button on [[Front Panel For 8 Bit Computers]] (SW25) to run Multiboot software
 
* Z80 NASCOM BASIC
 
 
* [https://hackaday.io/project/167711-3-chip-z80-design/log/171007-multi-boot-multicomp-part-3 CP/M Multiboot] - Runs MultiComp 512KB SRAM version
 
* [https://hackaday.io/project/167711-3-chip-z80-design/log/171007-multi-boot-multicomp-part-3 CP/M Multiboot] - Runs MultiComp 512KB SRAM version
** CP/M 2.2, CP/M 3.0, BASIC
+
* Insert "M/CPM 512KB" SD card
** [https://www.retrobrewcomputers.org/doku.php?id=builderpages:rhkoolstar:sbc-2g-512 SBC-2G-512 on Retrobrewing site] - Original author
+
* Insert USB B cable
** [https://github.com/douggilliland/Retro-Computers/tree/master/Z80/Reference_Designs/MC-2G-512%20(SBC2.0%20by%20koolstar) GitHub copy of SBC-2G-512]
+
* Run PuTTY
 +
** 115,200 baud
 +
* Card will power up and cycle through all the LEDs on the Front Panel
 +
* Address = 0x0000, Data is displayed on LEDs
 +
* Press SW25 (upper left button) on [[Front Panel For 8 Bit Computers]] to run Multiboot software
 +
* PuTTY will display
 +
<pre>
 +
Press [SPACE] to activate console
 +
</pre>
 +
* Press SPACE
 +
* Press ? for help menu
 +
<pre>
 +
>
 +
  Available Commands:
 +
 
 +
  :ccxxxxiibbbbbb      Load Intel-Hex file record
 +
  Rxxxx        Run from address xxxx
 +
  Sddd          System boot
 +
  Iddd          Init: Format directory
 +
  Pddd[,xxxx]  PutSys: write system image[,loadaddress]
 +
                (No address: re-use last loadaddress)
 +
  Gddd[,xxxx]  GetSys: load system track
 +
 
 +
  Dxxxx[,yyyy]  Dump memory from xxxx [,to yyyy]
 +
                D (no address) shows next block
 +
  Cxxxx        Change/show memory at xxxx
 +
                CR advances "," quits
 +
 
 +
  ddd is a decimal volume number,
 +
  xxxx, yyyy is a hexadecimal address.
 +
  Leading zeros may be omitted.
 +
  ESC or ^C aborts.
 +
</pre>
 +
==== Mount Primary Volume ====
 +
 
 +
* Type '''Snnn''' to select OS at multiboot (loads to A:)
 +
** S1 - Dos+ 2.5  Copyright 1986 (c) by [http://web.archive.org/web/20080430103646/http://cbfalconer.home.att.net/download/index.htm C.B. Falconer], CCP+ Ver. 2.2  (CP/M 2.2 compatible) - wirks
 +
** S2 - [https://github.com/douggilliland/Retro-Computers/blob/master/Z80/Software/Manuals/CPM%202.2%20manual.pdf Z80 CP/M BIOS 2.20] (c) 1979 by Digital Research - works
 +
** S3 - [http://www.cpm.z80.de/manuals/cpm3-usr.pdf CP/M Version 3.0] BIOS (2016/9/13) - partly boots/then stops
 +
*** [http://www.cpm.z80.de/manuals/cpm3-sys.pdf CP/M Version 3.0 Operating System System Guide]
 +
** S4 - [https://github.com/douggilliland/Retro-Computers/blob/master/Z80/Software/Manuals/MPM_II_2.1_Release_Notes_1982.pdf MP/M II V2.1] - partly boots/then stops
 +
** S5 - [http://searle.wales/z80/SimpleZ80.html Z80 BASIC Ver 4.7b], Copyright (C) 1978 by Microsoft
 +
*** 57694 Bytes free
 +
** S6 - [https://github.com/douggilliland/Retro-Computers/blob/master/Z80/Software/Manuals/zsdos.pdf ZSDOS v1.1] (c) 1986-8 Harold F. Bower & Cameron W. Cotrill, ZCPR2 (c) 1982 by Richard Conn (CP/M 2.2 compatible)
 +
*** Fails to find clock but boots
 +
** S7 - [https://github.com/douggilliland/Retro-Computers/blob/master/Z80/Software/Manuals/zcpr3_the_manual.pdf ZCPR compatible system] for CP/M+ (CP/M 3.0) by Simeon Cran - works
 +
* [https://www.retrobrewcomputers.org/doku.php?id=builderpages:rhkoolstar:sbc-2g-512 SBC-2G-512 on Retrobrewing site] - Original author
 +
* [https://github.com/douggilliland/Retro-Computers/tree/master/Z80/Reference_Designs/MC-2G-512%20(SBC2.0%20by%20koolstar) GitHub copy of SBC-2G-512]
 +
* M: drive is a 892KB RAMDISK (doesn't seem to work)
 +
 
 +
==== Mount Additional Volumes ====
 +
 
 +
* Mount additional drives using mount command
 +
** mount d vol
 +
*** Ex: mount b: 9 will mount ZCPR3 Utilities A-O as drive b:
 +
*** Can (re-)mount different volume to same drive with same command
 +
* Additional Volumes
 +
** Inspired by mc-2g-1024 original but modified
 +
** [https://obsolescence.wixsite.com/obsolescence/multicomp-fpga-cpm-demo-disk Sources from here]
 +
** Volume.008 - ?
 +
** Volume.009 - [https://github.com/douggilliland/MultiComp/blob/master/MultiComp_On_RETRO-EP4CE15/Multicomp-MPM/ZCPR3_Utilities_A_O.txt ZCPR3 Utilities A-O]
 +
** Volume.010 - [https://github.com/douggilliland/MultiComp/blob/master/MultiComp_On_RETRO-EP4CE15/Multicomp-MPM/ZCPR3_Utilities_P_Z.txt ZCPR3 Utilities P-Z]
 +
** Volume.011 - [https://github.com/douggilliland/Retro-Computers/blob/master/Z80/Software/Manuals/Wordstar_3.3_Reference_Manual_1983.pdf Wordstar], [https://github.com/douggilliland/Retro-Computers/blob/master/Z80/Software/Manuals/dBASE_II_Users_Guide_Feb83.pdf DBase], SuperCal
 +
** Volume.012 - Games
 +
** Volume.013 - [https://github.com/douggilliland/Retro-Computers/blob/master/Z80/Software/Manuals/MuMath_and_MuSimp_1980_Soft_Warehouse_text.pdf MuMath]
 +
** Volume.014 - Documentation
 +
** Volume.015 - Languages ([https://github.com/douggilliland/Retro-Computers/blob/master/Z80/Software/Manuals/TURBO_Pascal_Reference_Manual_CPM_Version_3_Dec88.pdf TurboPascal], [https://github.com/douggilliland/Retro-Computers/blob/master/Z80/Software/Manuals/Microsoft_FORTRAN-80_Ver3.4_Users_Manual_Nov80.pdf Fortran], [https://github.com/douggilliland/Retro-Computers/blob/master/Z80/Software/Manuals/BBC%20Basic%20(Z80).pdf BBC  BASIC])
 +
** Volume.016 - Languages ([https://github.com/douggilliland/Retro-Computers/blob/master/Z80/Software/Manuals/Algol%20M%20Language%20Description.pdf Algol], [https://github.com/douggilliland/Retro-Computers/blob/master/Z80/Software/Manuals/Aztec_C_1.06_User_Manual_Mar84.pdf Aztec C], APL, PLI, FORTH)
 +
** Volume.017 - Languages (BDS Tiny C, Janis Ada15, MS COBOL, PILOT)
 +
** Volume.018-253 - User volumes
 +
 
 +
==== Z80 BASIC Ver 4.7b ====
  
 
[[file:Running_Grants_Code_scaled.png]]
 
[[file:Running_Grants_Code_scaled.png]]

Latest revision as of 11:20, 7 September 2022

Features

Z80 P865-cropped-720px.jpg

  • Z80
    • 12.5 MHz operation
  • 512KB SRAM
  • PSoC5LP
    • Z80_PSoC Datasheet - generated from PSoC Creator
    • PSoC5 LP emulates standard Z80 peripheral chips
      • Serial port with USB
    • Memory Management Unit (MMU)
      • Controls 512KB SRAM
    • Loader moves EPROM code to SRAM
    • Controls CPU reset
  • Optional MCP23017 16-bit port expander
    • I2C Addresses 0x24
  • Optional Front Panel
    • I2C Addresses 0x20-0x23
  • SPI interface for SDHC card

Stackup (top to bottom)

Z80 PSOC P936-CROPPED-720PX.jpg

Connectors

Z80 PSOC Rev3 CAD.PNG

H1 - I2C Interface

  • Connects to Front Panel Card via I2C

Conn H1.PNG

H2 - ISP Download

  • Connects to PSoC programmer

Conn H2.PNG

H3- Serial Port or SPI (SD Card)

Conn H3.PNG

H4 - I/O

Conn H4.PNG

J1 - USB B

  • 5V card Power
  • USB to Serial comm port

J2, J3 - I/O Ports

  • J3 connects to JOYPAD on GPA connector

Conn J2 J3.PNG

J4 - Audio Out

  • DAC is the Analog function generator in the PSoC

Conn J4.PNG

J5 - Z80 Signals

  • Useful for monitoring the CPU lines

Conn J5.PNG

Software

Software Configuration

  • Hardware/Software options are set in the PSoC "Hardware_Config.h" file

Operation

  • Card waits on USB connection
  • Run PuTTY
    • Baud rate is auto-detected by PSoC
  • After PuTTY is running, card boots into Front Panel Control
  • LEDs are cycled
  • Message
Z80_PSoC - Running Front Panel

SW25 SW26 SW27 SW28 SW29 SW30 SW31 SW32
Run  Mon  N/A  N/A  N/A  LDAD STOR INCA

SW17 SW18 SW19 SW20 SW21 SW22 SW23 SW24
A15  A14  A13  A12  A11  A10  A9   A8

SW9  SW10 SW11 SW12 SW13 SW14 SW15 SW16
A7   A6   A5   A4   A3   A2   A1   A0

SW1  SW2  SW3  SW4  SW5  SW6  SW7  SW7
D7   D6   D5   D4   D3   D2   D1   D0

Press SW25 (upper left button) to exit Front Panel and run Z80
Press SW26 to run Monitor/Test Code
  • Options to run Z80 or PSoC Monitor
    • SW32 (Upper right) = Increment address, read
    • SW31 = Store data, increment address, read data
    • SW30 = Load Address, read memory
    • SW26 = Run Monitor
    • SW25 (Upper Left) = Run Z80

Front Panel

EightBitFrontPanel720px.JPG

SW25 SW26 SW27 SW28 SW29 SW30 SW31 SW32
Run  Mon  N/A  N/A  N/A  LDAD STOR INCA

SW17 SW18 SW19 SW20 SW21 SW22 SW23 SW24
A15  A14  A13  A12  A11  A10  A9   A8

SW9  SW10 SW11 SW12 SW13 SW14 SW15 SW16
A7   A6   A5   A4   A3   A2   A1   A0

SW1  SW2  SW3  SW4  SW5  SW6  SW7  SW7
D7   D6   D5   D4   D3   D2   D1   D0
  • Press SW25 (upper left button) to exit Front Panel and run Z80
  • Press SW26 to run Monitor/Test Code

Z80_PSoC Monitor

Land Boards, LLC - Z80_PSoC monitor
I - Initialize SD Card
B - Blink LED
F - Read Front Panel
Rxxxxxxxx - Read sector xxxxxxxx from the SD Card
N - Read next sector from the SD Card
W - Write to the SD Card at 2GB - 1 sector
X - eXit Monitor and run Z80
? - Print this menu
  • Type to check the SD card
R4000
  • Result:

Z80 PSoC Monitor D Command.PNG

  • Type X to exit and run Z80

Multiboot Multicomp (MULTIBOOT_CPM)

  • CP/M Multiboot - Runs MultiComp 512KB SRAM version
  • Insert "M/CPM 512KB" SD card
  • Insert USB B cable
  • Run PuTTY
    • 115,200 baud
  • Card will power up and cycle through all the LEDs on the Front Panel
  • Address = 0x0000, Data is displayed on LEDs
  • Press SW25 (upper left button) on Front Panel For 8 Bit Computers to run Multiboot software
  • PuTTY will display
Press [SPACE] to activate console
  • Press SPACE
  • Press ? for help menu
>
  Available Commands:

  :ccxxxxiibbbbbb       Load Intel-Hex file record
  Rxxxx         Run from address xxxx
  Sddd          System boot
  Iddd          Init: Format directory
  Pddd[,xxxx]   PutSys: write system image[,loadaddress]
                (No address: re-use last loadaddress)
  Gddd[,xxxx]   GetSys: load system track

  Dxxxx[,yyyy]  Dump memory from xxxx [,to yyyy]
                D (no address) shows next block
  Cxxxx         Change/show memory at xxxx
                CR advances "," quits

  ddd is a decimal volume number,
  xxxx, yyyy is a hexadecimal address.
  Leading zeros may be omitted.
  ESC or ^C aborts.

Mount Primary Volume

Mount Additional Volumes

  • Mount additional drives using mount command
    • mount d vol
      • Ex: mount b: 9 will mount ZCPR3 Utilities A-O as drive b:
      • Can (re-)mount different volume to same drive with same command
  • Additional Volumes

Z80 BASIC Ver 4.7b

Running Grants Code scaled.png

Reference Designs

Hackaday Page

Videos

Assembly Sheet