You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@nuttx.apache.org by Brennan Ashton <ba...@brennanashton.com> on 2021/02/20 19:34:27 UTC

z20x computer with Z80 microprocessor

I saw that Greg had started initial support for this retro computer a
year ago and I was curious if anyone else has experience with it.  I
was considering doing a board run and building one for myself and
would be happy to build a few if there are people interested since I
will have to order multiple PCBs anyway.

https://z20x.computer/

Greg, are you still doing anything on this?  I know you have had
interest in the past with it.

It looks like there has been some renewed interest in the Z80 with
Byron integrating the clang port.

--Brennan

Re: z20x computer with Z80 microprocessor

Posted by Brennan Ashton <ba...@brennanashton.com>.
On Sun, Feb 21, 2021 at 6:03 AM Gregory Nutt <sp...@gmail.com> wrote:
>
>
> > Greg I was thinking about going the module route so I could use the eZ80F91
> > (same chip Byron is using). Sounds like I should just start getting some of
> > the parts together, the board cost is not too bad which is nice. I know a
> > few other people around who would probably also be interested even outside
> > of NuttX.
>
> Too bad you cannot get access to the Ethernet from the module.

Yeah I am thinking I might be up for doing a custom module that
includes an ethernet phy then it could just drop into the existing
boards.

>
> When you get an estimate of the cost, I might be interested.  My
> motivation for board work has been low lately but I haven't passed on a
> retro project yet!

Great! I would be happy to send one along once I have some reasonable
confidence that it is working.

>
> An improvement might be to get better serial console support.  In the
> current board, there are two PS/2 connectors labeled KBD/PTR and
> PTR/COM.  The UART is shared with the COM PS/2 connector and a
> serial-USB bridge (MCP2221A).  The thing that was maddening for me was
> that there was no reset button so I had to cycle power to reset.  If you
> don't have a the MCP2221A isolated from the reset, then you lose the
> serial connection to the serial console Windows. That makes it
> essentially impossible to see debug output from power-up initialization.
>
> I ended up removing the  MCP2221Aand using the socket to connect a RS232
> converter.  Perhaps it is outdated, but there is nothing like an RS232
> to keep a stable connection during bring-up. (I should have been able to
> get to the UART via the PS/2 connector as well.).

Yeah that would be quite frustrating.  Looking at the schematic I have
a kind of hacky idea how to get around it, but maybe I can do
something to help with this on the module as well.  It actually would
have been nice if one of the GPIO pins on the MCP2221 was able to
drive the reset.

> The LCD is a purchased separately from the board.  It is a 7" SSD1963
> LCD. Really quite nice.  I suppose these are still available.  You could
> order them from Alibaba or from eBay at that time.  We just need to make
> sure that the pin arrangement is the same.

I have a few already coming from China, it is the same shop I ordered
them from previously so hopefully it will work out, I also ordered
some of the YM2413B.

--Brennan

Re: z20x computer with Z80 microprocessor

Posted by Gregory Nutt <sp...@gmail.com>.
> Greg I was thinking about going the module route so I could use the eZ80F91
> (same chip Byron is using). Sounds like I should just start getting some of
> the parts together, the board cost is not too bad which is nice. I know a
> few other people around who would probably also be interested even outside
> of NuttX.

Too bad you cannot get access to the Ethernet from the module.

When you get an estimate of the cost, I might be interested.  My 
motivation for board work has been low lately but I haven't passed on a 
retro project yet!

An improvement might be to get better serial console support.  In the 
current board, there are two PS/2 connectors labeled KBD/PTR and 
PTR/COM.  The UART is shared with the COM PS/2 connector and a 
serial-USB bridge (MCP2221A).  The thing that was maddening for me was 
that there was no reset button so I had to cycle power to reset.  If you 
don't have a the MCP2221A isolated from the reset, then you lose the 
serial connection to the serial console Windows. That makes it 
essentially impossible to see debug output from power-up initialization.

I ended up removing the MCP2221A and using the socket to connect a RS232 
converter.  Perhaps it is outdated, but there is nothing like an RS232 
to keep a stable connection during bring-up. (I should have been able to 
get to the UART via the PS/2 connector as well.).

The LCD is a purchased separately from the board.  It is a 7" SSD1963 
LCD. Really quite nice.  I suppose these are still available.  You could 
order them from Alibaba or from eBay at that time.  We just need to make 
sure that the pin arrangement is the same.

The board also works with the RC2014, 
https://www.tindie.com/products/semachthemonkey/rc2014-classic-homebrew-z80-computer-kit/





Re: z20x computer with Z80 microprocessor

Posted by Brennan Ashton <ba...@brennanashton.com>.
Greg and Byron,
Thanks for the info.

Greg I was thinking about going the module route so I could use the eZ80F91
(same chip Byron is using). Sounds like I should just start getting some of
the parts together, the board cost is not too bad which is nice. I know a
few other people around who would probably also be interested even outside
of NuttX.

--Brennan


On Sat, Feb 20, 2021, 12:50 PM Gregory Nutt <sp...@gmail.com> wrote:

> Another thing that I did not get around to was implementing the driver
> for SSD1963 LCD.  That was a lot of my motivation.  The SSD1963 has a
> framebuffer memory interface so, given proper DMA, ought to perform
> well.  I am not sure if the eZ80F92 has the horsepower to make it work
> well, however.
>
> On 2/20/2021 2:45 PM, Gregory Nutt wrote:
> > I was in the middle of working with this with Konstantin w hen COVID
> > stopped everything.
> >
> > We had just changed the crystal from 20MHz to 18MHz (as I recall) so
> > that the RAM could run with a single wait state.  I was implementing a
> > bootloader that would reside on-chip.  It would copy programs from
> > serial to SPI FLASH.  Then, at reset, it would copy the program from
> > SPI FLASH to RAM and run from RAM.  So, the 18MHz crystal should
> > actually give better performance when running from RAM.
> >
> > That was almost working when worked stopped.  But performance was
> > awful.  Too awful to be the slow chip so I think something was set up
> > wrong (or maybe the SPI was just very slow.  Never really dug into
> > that.)  The code is still set up to use the 20MHz crystal.
> >
> > By the way, when I say that the eZ80 is one of my favorite chips, I
> > meant the eZ80F91.  The stock Z20X has an eZ80F92 which is not as
> > capable.  It has fewer peripherals (no Ethernet for example) and,
> > worst of all, no PLL.  So it is limited to the crystal speed.  The
> > eZ80F91 usually uses something like a 4-5MHz crystal with the PLL
> > configured to run at 50MHz.  Given that it is SISC, that really
> > performs pretty well.
> >
> > Knivd has a daughter board that can be used to replace the eZ80F92
> > with the faster eZ80F91:
> > https://www.pcbway.com/project/member/?bmbno=4582C8E5-A4FF-44 . He
> > also has z380 and Zneo daughter boards.  The Zneo is supported by
> > NuttX (as z16f), but the z380 is not.
> >
> >
> > On 2/20/2021 1:34 PM, Brennan Ashton wrote:
> >> I saw that Greg had started initial support for this retro computer a
> >> year ago and I was curious if anyone else has experience with it.  I
> >> was considering doing a board run and building one for myself and
> >> would be happy to build a few if there are people interested since I
> >> will have to order multiple PCBs anyway.
> >>
> >> https://z20x.computer/
> >>
> >> Greg, are you still doing anything on this?  I know you have had
> >> interest in the past with it.
> >>
> >> It looks like there has been some renewed interest in the Z80 with
> >> Byron integrating the clang port.
> >>
> >> --Brennan
>

Re: z20x computer with Z80 microprocessor

Posted by Gregory Nutt <sp...@gmail.com>.
Another thing that I did not get around to was implementing the driver 
for SSD1963 LCD.  That was a lot of my motivation.  The SSD1963 has a 
framebuffer memory interface so, given proper DMA, ought to perform 
well.  I am not sure if the eZ80F92 has the horsepower to make it work 
well, however.

On 2/20/2021 2:45 PM, Gregory Nutt wrote:
> I was in the middle of working with this with Konstantin w hen COVID 
> stopped everything.
>
> We had just changed the crystal from 20MHz to 18MHz (as I recall) so 
> that the RAM could run with a single wait state.  I was implementing a 
> bootloader that would reside on-chip.  It would copy programs from 
> serial to SPI FLASH.  Then, at reset, it would copy the program from 
> SPI FLASH to RAM and run from RAM.  So, the 18MHz crystal should 
> actually give better performance when running from RAM.
>
> That was almost working when worked stopped.  But performance was 
> awful.  Too awful to be the slow chip so I think something was set up 
> wrong (or maybe the SPI was just very slow.  Never really dug into 
> that.)  The code is still set up to use the 20MHz crystal.
>
> By the way, when I say that the eZ80 is one of my favorite chips, I 
> meant the eZ80F91.  The stock Z20X has an eZ80F92 which is not as 
> capable.  It has fewer peripherals (no Ethernet for example) and, 
> worst of all, no PLL.  So it is limited to the crystal speed.  The 
> eZ80F91 usually uses something like a 4-5MHz crystal with the PLL 
> configured to run at 50MHz.  Given that it is SISC, that really 
> performs pretty well.
>
> Knivd has a daughter board that can be used to replace the eZ80F92 
> with the faster eZ80F91: 
> https://www.pcbway.com/project/member/?bmbno=4582C8E5-A4FF-44 . He 
> also has z380 and Zneo daughter boards.  The Zneo is supported by 
> NuttX (as z16f), but the z380 is not.
>
>
> On 2/20/2021 1:34 PM, Brennan Ashton wrote:
>> I saw that Greg had started initial support for this retro computer a
>> year ago and I was curious if anyone else has experience with it.  I
>> was considering doing a board run and building one for myself and
>> would be happy to build a few if there are people interested since I
>> will have to order multiple PCBs anyway.
>>
>> https://z20x.computer/
>>
>> Greg, are you still doing anything on this?  I know you have had
>> interest in the past with it.
>>
>> It looks like there has been some renewed interest in the Z80 with
>> Byron integrating the clang port.
>>
>> --Brennan

Re: z20x computer with Z80 microprocessor

Posted by Gregory Nutt <sp...@gmail.com>.
I was in the middle of working with this with Konstantin when COVID 
stopped everything.

We had just changed the crystal from 20MHz to 18MHz (as I recall) so 
that the RAM could run with a single wait state.  I was implementing a 
bootloader that would reside on-chip.  It would copy programs from 
serial to SPI FLASH.  Then, at reset, it would copy the program from SPI 
FLASH to RAM and run from RAM.  So, the 18MHz crystal should actually 
give better performance when running from RAM.

That was almost working when worked stopped.  But performance was 
awful.  Too awful to be the slow chip so I think something was set up 
wrong (or maybe the SPI was just very slow.  Never really dug into 
that.)  The code is still set up to use the 20MHz crystal.

By the way, when I say that the eZ80 is one of my favorite chips, I 
meant the eZ80F91.  The stock Z20X has an eZ80F92 which is not as 
capable.  It has fewer peripherals (no Ethernet for example) and, worst 
of all, no PLL.  So it is limited to the crystal speed.  The eZ80F91 
usually uses something like a 4-5MHz crystal with the PLL configured to 
run at 50MHz.  Given that it is SISC, that really performs pretty well.

Knivd has a daughter board that can be used to replace the eZ80F92 with 
the faster eZ80F91: 
https://www.pcbway.com/project/member/?bmbno=4582C8E5-A4FF-44 . He also 
has z380 and Zneo daughter boards.  The Zneo is supported by NuttX (as 
z16f), but the z380 is not.


On 2/20/2021 1:34 PM, Brennan Ashton wrote:
> I saw that Greg had started initial support for this retro computer a
> year ago and I was curious if anyone else has experience with it.  I
> was considering doing a board run and building one for myself and
> would be happy to build a few if there are people interested since I
> will have to order multiple PCBs anyway.
>
> https://z20x.computer/
>
> Greg, are you still doing anything on this?  I know you have had
> interest in the past with it.
>
> It looks like there has been some renewed interest in the Z80 with
> Byron integrating the clang port.
>
> --Brennan

Re: z20x computer with Z80 microprocessor

Posted by Byron Ellacott <bj...@the-wanderers.org>.
My hardware is an eZ80F91 ASSP CPU at 50MHz (but I used a 50MHz oscillator,
the PLL is unused) with SPI SD reader, Ethernet PHY, dual UARTs. Most of
what I'm looking at would be applicable with the z20x with an eZ80 CPU, but
relatively little would apply to the other CPUs you might use.

Software wise, I've successfully built NuttX up to running NSH on it,
mounting the SD card, with the RTC working. Here's the rough roadmap I have
for NuttX building:

  - Check EMAC support works, up to DHCP and using ntpdate
  - Implement a syscall facility (via a RST, I think)
  - Write an ELF loader for the Z80 machine family (done except for
relocations - but I can't fit a symbol table in Flash anyway)
  - Write a CP/M task, which also means supporting mixed memory mode -
should only affect IRQ handling and task switching, I think

There's still a number of integer size issues to work through first, I
think. I am building with -Werror -Wconversion, which generates a huge
number of errors. Most of them are harmless in practice, but ensuring I
catch 24 bit issues means checking them all.

An example is in sched/sched/sched_roundrobin.c:

  int decr;
  decr = MIN(tcb->timeslice, ticks);

In this, tcb->timeslice is an int32_t, ticks is a uint32_t, and the MIN
operation loses precision down to a 24-bit int. The round robin scheduler
with default values should be fine with 24 or even 8 bits - I think you'd
have to set ridiculous values to overflow anything.

-- 
Byron

On Sun, Feb 21, 2021 at 5:34 AM Brennan Ashton <ba...@brennanashton.com>
wrote:

> I saw that Greg had started initial support for this retro computer a
> year ago and I was curious if anyone else has experience with it.  I
> was considering doing a board run and building one for myself and
> would be happy to build a few if there are people interested since I
> will have to order multiple PCBs anyway.
>
> https://z20x.computer/
>
> Greg, are you still doing anything on this?  I know you have had
> interest in the past with it.
>
> It looks like there has been some renewed interest in the Z80 with
> Byron integrating the clang port.
>
> --Brennan
>