RetroBrew Computers Forum
Discussion forum for the RetroBrew Computers community.

Home » RBC Forums » General Discussion » Simple80, a low-cost, glue-less CP/M Ready Z80 SBC
Simple80, a low-cost, glue-less CP/M Ready Z80 SBC [message #6319] Sat, 18 May 2019 21:35 Go to next message
plasmo is currently offline  plasmo
Messages: 879
Registered: March 2017
Location: New Mexico, USA
Senior Member
This is yet another Z80 SBC. It is inspired by my observation that several eBay vendors are offering homebrew kits quite cheaply. The one that got my attention is this eBay item: https://www.ebay.com/itm/Z80-CPU-PIO-Kit-Z84C0020PEC-Z84C400 6PEC-HM628128-W27C512-74LS32-74HC00-74HC138/113067844658 which is a Z80/SIO/RAM/ROM kit with few TTL logic for $6.99. I bought the kit only to realize the seller had made a mistake and sent me a PIO instead of a SIO-0. Other than that, all the parts are functional. I communicated with the seller and worked out a even simpler and cheaper Z80 kit, https://www.ebay.com/itm/Simple80-Z80-CPU-SIO-Homebrew-IC-Ki t/113735638336 for $6. Bought two kits and designed the Simple80 as documented here: https://www.retrobrewcomputers.org/doku.php?id=builderpages: plasmo:simple80

What I want to achieve is a low cost Z80 SBC that's CP/M ready and with expansion buses. My experiences with buying parts on eBay have been generally favorable and I believe functioning, low-cost Z80 kits can be found on eBay such that a CP/M-ready Z80 should be possible for about $20 of part cost.

Received the kits today. Plug them into Simple80, both kits work fine. Cost breakdown:

* Simple80 Z80 Kit, $6 + $6 shipping,
* 7.37MHz oscillator $1,
* IDE44 adapter $2 (free shipping),
* PC boards from JLCPCB $14 (economy shipping) for 5 boards or $3 per set of boards,
* CF disk $2,
* Resistors, capacitors, connectors, IC sockets $??

$20 seems an achievable goal.

Bill
Re: Simple80, a low-cost, glue-less CP/M Ready Z80 SBC [message #6330 is a reply to message #6319] Sun, 19 May 2019 15:33 Go to previous messageGo to next message
etchedpixels is currently offline  etchedpixels
Messages: 333
Registered: October 2015
Senior Member
Very nice

I wonder if you may be able to go even further

Suppose instead of the needing an IDE adapter you wired up a bitbang SD card as an option ?

That needs CS (output) MISO (input) MOSI (output) CLK (output) plus power/ground and some resistors as its a 3v3 interface. By my count that would be RTSA/RTSB/CTSB/DTRB Cool - assuming you didn't want to fit 512K of RAM instead but that does rather up the price.

One other thought - you have the CF adapter at 0x80. If I remember rightly the 'official' CF adapter decodes at both 0x10 and 0x90 and RC2014 generally uses 0x80 for further SIO and 0x88 for CTC so would 0x90 be a better place for the CF adapter ?


Time for me to write another emulator Cool

Alan

[Updated on: Sun, 19 May 2019 15:52]

Report message to a moderator

Re: Simple80, a low-cost, glue-less CP/M Ready Z80 SBC [message #6331 is a reply to message #6330] Sun, 19 May 2019 18:22 Go to previous messageGo to next message
plasmo is currently offline  plasmo
Messages: 879
Registered: March 2017
Location: New Mexico, USA
Senior Member
The SimpleCF occupies I/O space 0x80 to 0xBF, so I can certainly define 0x90 as the base address for SimpleCF. The primitive decoding scheme of Simple80 & SimpleCF means it won't be compatible with RC2014. My thought here is finding a simple & cheap path to get a CP/M capable Z80 running. Later the parts can be reused for more sophisticated Z80 systems.

Simple80 is really a distraction from the original glue-less design based on KIO, https://www.retrobrewcomputers.org/forum/index.php?t=msg& ;th=378&start=0& Returning to KIO is probably a better choice for bit-banging SD disk and DS1302 RTC since KIO includes a PIO. In fact I have a KIO-based design (K80) being fabricated in JLCPCB right now. Currently it is not a simple design, but I hope to reduce it down to Simple80 equivalent but with RTC and SD disk. Simple80 can only run to 7.37MHz, limited by the SIO. KIO is spec'd to 12.5MHz and I've build enough of them to know it can in fact reliably run to 24MHz.

This particular seller of Simple80 Z80 kit also sell a kit with KIO, https://www.ebay.com/itm/Z80-IC-Chipset-CPU-KIO-SRAM-EPROM-8 255-8251-Kit-PLCC-Version/113467460260 He seems pretty flexible about creating new kit for new design, so once I have a working KIO-based design, I think I can get the seller to create a kit for it. I think it would be exciting to have an I/O-rich, fast, cheap, CP/M & FUZIX capable Z80 SBC for hobbyists.

Bill
Re: Simple80, a low-cost, glue-less CP/M Ready Z80 SBC [message #6335 is a reply to message #6331] Mon, 20 May 2019 12:23 Go to previous messageGo to next message
etchedpixels is currently offline  etchedpixels
Messages: 333
Registered: October 2015
Senior Member
The nice thing about using 0x90 is that it should also work with the generic RC2014 and your adapter ?
Re: Simple80, a low-cost, glue-less CP/M Ready Z80 SBC [message #6338 is a reply to message #6335] Mon, 20 May 2019 16:37 Go to previous messageGo to next message
plasmo is currently offline  plasmo
Messages: 879
Registered: March 2017
Location: New Mexico, USA
Senior Member
etchedpixels wrote on Mon, 20 May 2019 13:23
The nice thing about using 0x90 is that it should also work with the generic RC2014 and your adapter ?
Yes, you are right, the generic RC2014 CF board should work on Simple80 so setting the CF base address to 0x90 should facilitate using either the generic RC2014 CF board or the SimpleCF board.
Bill
Re: Simple80, a low-cost, glue-less CP/M Ready Z80 SBC [message #6405 is a reply to message #6338] Sat, 06 July 2019 01:38 Go to previous messageGo to next message
nealcrook is currently offline  nealcrook
Messages: 127
Registered: October 2015
Location: UK
Senior Member
Hi Bill,

nice-looking design. Thanks for sharing. How do you program the Flash (I don't mean "what's the algorithm", I mean "what kit do you use").

Sad that this Flash chip does not support a serial capability for programming (we are spoiled in modern chips Very Happy \). Also, do you make use of the boot-block capability of the Flash (eg, by programming a boot loader once in a separate rig and then allowing the board FW to be reprogrammed in-place?\)

thanks

Neal.
Re: Simple80, a low-cost, glue-less CP/M Ready Z80 SBC [message #6406 is a reply to message #6405] Sat, 06 July 2019 04:45 Go to previous messageGo to next message
plasmo is currently offline  plasmo
Messages: 879
Registered: March 2017
Location: New Mexico, USA
Senior Member
Neal,
The EPROM programmer I used is TL866-II Plus that's readily available from eBay. The PROM is electrically erasable but requires 12V to erase/program. It does not have a bootblock.
Bill
Re: Simple80, a low-cost, glue-less CP/M Ready Z80 SBC [message #6408 is a reply to message #6406] Sat, 06 July 2019 09:20 Go to previous messageGo to next message
nealcrook is currently offline  nealcrook
Messages: 127
Registered: October 2015
Location: UK
Senior Member
Hi Bill,
thanks. I looked at the part number on the schematic rather than the photo, hence my confusion about the boot block. I was wondering about the possibility of building a plug-on board that could be used as a one-time programmer. However, the approach that I had in mind was to use an avr/arduino and some of the bus-hold tricks used in just4fun's designs -- but the RC2014 bus is quite restricted (eg, no busrq). I saw your other thread about a dedicated z80-based programmer, that's also an interesting approach.

Neal.
Re: Simple80, a low-cost, glue-less CP/M Ready Z80 SBC [message #6409 is a reply to message #6408] Sat, 06 July 2019 12:54 Go to previous messageGo to next message
plasmo is currently offline  plasmo
Messages: 879
Registered: March 2017
Location: New Mexico, USA
Senior Member
Neal,
Oops, my mistake. I want a generic 32-pin flash memory so I used 28F001BX as a template but neglected to change the part name to "generic flash".

It is tricky for Z80 on RC2014 bus to hold up to 512K bytes of data and then turn around to program flash device up to 512K byte. Z280 has 16meg of address space with integrated DMA & MMU that can access these memory directly, so it is easier (and therefore cheaper) to build a programmer using Z280.

Bill
Re: Simple80, a low-cost, glue-less CP/M Ready Z80 SBC [message #6656 is a reply to message #6409] Mon, 14 October 2019 11:43 Go to previous messageGo to next message
etchedpixels is currently offline  etchedpixels
Messages: 333
Registered: October 2015
Senior Member
I have been having fun with the Simple80 as well as having found a bug along the way. The resistor for A16 pulls the wrong way making the second RAM bank hard to use.

That aside I now have a ROM bootable firmware including a ROMdisc, and capable of booting other OS off a disk. It also supports some interesting hacks I am playing with including support for 512K of RAM with nothing but a bit of wiring. Because the 512K and 128K RAM are almost the same pinout it's a simple matter of lifting pin 1 and pin 30 on the RAM and wiring it somewhere. Due to another plan I also lifted A16 (it's easier than fixing the resistor). I've used RTSA/RTSB/DTRB as the address lines. The end result works with 128K or 512K RAMs and the right firmware.

I'm now trying to get SD card support working using the now freed up WAIT/RDY line, the bits used for A16-A17 and CTSB as the input line.

The firmware also supports lifting pin 35 of the SIO2 and wiring it to A15, which moves the SIO to any 16bit I/O address with the top bit low allowing you to use pretty much any RC2014 card with Simple80 providing you use in (c) and out (c) forms.

The only non wires thing I'm also doing is adding a timer interrupt by running a 74HC4060 into DCDB.

https://github.com/EtchedPixels/RC2014-ROM/tree/master/Simpl e80

Alan
Re: Simple80, a low-cost, glue-less CP/M Ready Z80 SBC [message #6667 is a reply to message #6409] Tue, 15 October 2019 04:40 Go to previous messageGo to next message
plasmo is currently offline  plasmo
Messages: 879
Registered: March 2017
Location: New Mexico, USA
Senior Member
Alan,
This is great work. I'm in the middle of developing a VGA display for RC2014, but once that has reached a plateau, I'll make the same modifications to one of my Simple80 boards and check it out. I'll add the 74HC4060 as well. I can also make a new board revision with these changes. Thanks,
Bill
Re: Simple80, a low-cost, glue-less CP/M Ready Z80 SBC [message #6694 is a reply to message #6667] Sun, 20 October 2019 08:59 Go to previous messageGo to next message
plasmo is currently offline  plasmo
Messages: 879
Registered: March 2017
Location: New Mexico, USA
Senior Member
Alan,
I've done what I can with the video prototype for now so I'm working on modifying a Simple80 board according to your engineering changes. I cut traces to pin 2 and 30 of the RAM, connect pin 1 to SIO-25 (DTRB), pin 2 to SIO-17 (RTSA), and pin 30 to SIO-24 (RTSB), then I bent out the leg of SIO-35 (CE) and tie to Z80-5 (A15). I assembled the system.asm and burn it into W27C512 and applied power. I got this with CF disk inserted:

Simple 80 CP/M ROM 0.18
Formatting RAMdisc
Modified board detected
Initializing CF adapter
Simple 80 CP/M ROM 0.18
Formatting RAMdisc
Modified board detected
Initializing CF adapter
Simple 80 CP/M ROM 0.18
Formatting RAMdisc
Modified board detected
Initializing CF adapter
Simple 80 CP/M ROM 0.18
Formatting RAMdisc
Modified board detected
Initializing CF adapter

...repeating forever......


Or if I powered with CF disk removed, I got this:

Simple 80 CP/M ROM 0.18
Formatting RAMdisc
Modified board detected
Initializing CF adapter
þSimple 80 CP/M ROM 0.18
Formatting RAMdisc
Modified board detected
Initializing CF adapter
þSimple 80 CP/M ROM 0.18
Formatting RAMdisc
Modified board detected
Initializing CF adapter
þSimple 80 CP/M ROM 0.18
Formatting RAMdisc
Modified board detected
Initializing CF adapter
þSimple 80 CP/M ROM 0.18
Formatting RAMdisc
Modified board detected
Initializing CF adapter
CF card not detected
CP/M 2.2 (C) 1979 Digital Research


Then the console freeze, no CP/M prompt. I suspect I need to insert CPM.RAW into the EPROM starting from some location?

Bill
Re: Simple80, a low-cost, glue-less CP/M Ready Z80 SBC [message #6696 is a reply to message #6694] Sun, 20 October 2019 11:46 Go to previous messageGo to next message
etchedpixels is currently offline  etchedpixels
Messages: 333
Registered: October 2015
Senior Member
0.18 is too old to support the A15 SIO hack.

The CPM.RAW is supposed to get inserted by the Makefile, but if it's absent it will just mean your ROM drive is full of crap.

And now I look I've not actually put the newer versions of the ROM anywhere public. If you switch back to A7 for the SIO that ought to work.

Re: Simple80, a low-cost, glue-less CP/M Ready Z80 SBC [message #6697 is a reply to message #6696] Sun, 20 October 2019 15:30 Go to previous messageGo to next message
plasmo is currently offline  plasmo
Messages: 879
Registered: March 2017
Location: New Mexico, USA
Senior Member
Hook up A7 instead of A15 to SIO's CE and with a CF inserted, I got this:

Simple 80 CP/M ROM 0.18
Formatting RAMdisc
Modified board detected
Initializing CF adapter
CP/M 2.2 (C) 1979 Digital Research

E>dir
No file



Without the CF, I got this:

Simple 80 CP/M ROM 0.18
Formatting RAMdisc
Modified board detected
Initializing CF adapter
CF card not detected
CP/M 2.2 (C) 1979 Digital Research

Bdos E


It responds to each carriage return with:

Bdos Er

I guess this means there are no CP/M image in E:

I use Windows so I don't have dd, but I think I can append CPM.RAW in the EPROM programming file. What is the starting location of CPM.RAW?

Bill
Re: Simple80, a low-cost, glue-less CP/M Ready Z80 SBC [message #6698 is a reply to message #6697] Sun, 20 October 2019 16:08 Go to previous messageGo to next message
plasmo is currently offline  plasmo
Messages: 879
Registered: March 2017
Location: New Mexico, USA
Senior Member
Poke around a bit and I think ROM disk starts from 0x100? I concatenate CPM.RAW with an offset of 0x100 into SYSTEM.HEX and burn it into the EPROM. Now I can see PIP, XMODEM. DDT, STAT, and MBASIC in drive E. Hmmm, I wonder how that work? I'm guessing you are copying the ROM from 0x100 to below CP/M into RAM disk at powerup? I was going concatenate XMODEM with an offset of 0x100 into SYSTEM.HEX so when CP/M boot, the xmodem image is in 0x100 then I can do a "save 17 xmodem.com" to copy it to a new CF disk. I can then transfer rest of files to the new CF disk using xmodem. Your method is probably better.
Bill
Re: Simple80, a low-cost, glue-less CP/M Ready Z80 SBC [message #6699 is a reply to message #6698] Sun, 20 October 2019 17:15 Go to previous messageGo to next message
etchedpixels is currently offline  etchedpixels
Messages: 333
Registered: October 2015
Senior Member
Not quite. The ROM has various bootstrap code and vectors at 0000-00FF, then 0100-D9FF are currently the ROM file system. DA00-DBFF is the boot code, then CP/M follows then the BIOS and above the BIOS at the very top of memory is a chunk of code that is copied from ROM into each bank. That code because it is identical everywhere can turn the ROM back on, turn the RAM off, read a byte that may differ from RAM and reverse the process. It's not pretty but if you read the BIOS sources for do_get_rom all should be 'clear' (and ignore the comment about the RAM pulling down - that's obsolete .. and wrong)

F: is the RAM drive (still limited to the 60K or so as I've not yet done the code to do a big RAMdisc on 512K RAM)

I've pushed what should be the right code to github, it got in a bit of a mess with stuff not being committed and then things that didn't work out getting added on top but I've only emulator tested it. I think I am giving up on SD card - it's too hairy with the reuse of the lines, plus it means I don't have enough SIO input bits to add a joystick Cool

0.18 that you have also eats CF file systems so be warned. 0.19 fixed that, the current one is 0.22, which should work with the A15 change and aso fixes the fact we keep re-initializing the CF card each time we SELDSK it.

I don't know why you get the Bdos E without a CF card. That's weird. If you still see it in 0.22 let me know. I can't reproduce it here with the emulation but can try it on hardware, especially now I have some old Intel flash chips for the board and I'm not having to use EPROM erasers!

Lots of fun. I miss the days when computer magazines actually involved cunning rewiring tricks and extra chips on bits of veroboard or stacked on top of one another.

Alan
Re: Simple80, a low-cost, glue-less CP/M Ready Z80 SBC [message #6700 is a reply to message #6699] Mon, 21 October 2019 04:07 Go to previous messageGo to next message
plasmo is currently offline  plasmo
Messages: 879
Registered: March 2017
Location: New Mexico, USA
Senior Member
OK, I downloaded v022 of system.asm as well as cpm.raw. Assembled system.asm and combined with cpm.raw. Power up with CF disk:

Simple 80 CP/M ROM 0.22
Formatting RAMdisc
Modified board detected
Initializing CF adapter
CP/M 2.2 (C) 1979 Digital Research

E>dir
E: DDT COM : MBASIC COM : STAT COM : XMODEM COM
E: PIP COM
E>dir f:
No file
E>pip f:=*.*[v]

COPYING
DDT.COM
MBASIC.COM
STAT.COM
XMODEM.COM
PIP.COM

E>dir f:
F: DDT COM : MBASIC COM : STAT COM : XMODEM COM
F: PIP COM
E>


Power up without CF disk:

E>Simple 80 CP/M ROM 0.22
Formatting RAMdisc
Modified board detected
Initializing CF adapter
CF card not detected
CP/M 2.2 (C) 1979 Digital Research

E>dir
E: DDT COM : MBASIC COM : STAT COM : XMODEM COM
E: PIP COM
E>dir f:
No file
E>pip f:=*.*[v]

COPYING
DDT.COM
MBASIC.COM
STAT.COM
XMODEM.COM
PIP.COM

E>dir f:
F: DDT COM : MBASIC COM : STAT COM : XMODEM COM
F: PIP COM


MBASIC.COM executes the ASCII Mandelbrot correctly.
XMODEM does not work, however. What version of XMODEM is this?

Bill

PS, I'm pretty good at kludging, even had a series of prototypes with the prefix of "Franken-", e.g. Franken-GPS, which is a combination of salvaged boards and new board all wired into an existing product. Much to my regret some of the prototypes lasted many years and required my attention because I'm the only one can fix it.
Re: Simple80, a low-cost, glue-less CP/M Ready Z80 SBC [message #6702 is a reply to message #6700] Mon, 21 October 2019 10:27 Go to previous messageGo to next message
etchedpixels is currently offline  etchedpixels
Messages: 333
Registered: October 2015
Senior Member
I don't remember. I stuck it on there to test but never got around to it as I use cpmtools. Could also be the aux device code has a bug left I guess

Alan
Re: Simple80, a low-cost, glue-less CP/M Ready Z80 SBC [message #6703 is a reply to message #6702] Mon, 21 October 2019 11:56 Go to previous messageGo to next message
plasmo is currently offline  plasmo
Messages: 879
Registered: March 2017
Location: New Mexico, USA
Senior Member
OK, no problem. I'll put together a CPM image with the XMODEM I use.
Bill
Re: Simple80, a low-cost, glue-less CP/M Ready Z80 SBC [message #6704 is a reply to message #6703] Tue, 22 October 2019 03:35 Go to previous messageGo to next message
plasmo is currently offline  plasmo
Messages: 879
Registered: March 2017
Location: New Mexico, USA
Senior Member
I think there are two problems associated with xmodem: I knew that 115200 baud is marginal with 7.37MHz CPU. To make it work I have to make the serial receive routine as simple as possible, OR raise the CPU clock but keep the serial baud at 115200. I picked the 2nd approach and raised the CPU clock to 11MHz with a separate oscillator, the xmodem works now BUT only with the one I normally used which was downloaded from www.foxhollow.ca <--(unable to connect to foxhollow.ca right now, the xmodem.com is attached). I can't download with the xmodem in your ROM drive even with 11MHz CPU clock. It may be perfectly fine, but needs different commands to run.

There are some thing weird about the serial output; the transmit output strings are frequently truncated. I wonder the manipulation of the discrete output bits is affecting the serial port somehow.
Bill
  • Attachment: XMODEM.com
    (Size: 4.13KB, Downloaded 251 times)
Re: Simple80, a low-cost, glue-less CP/M Ready Z80 SBC [message #6705 is a reply to message #6704] Tue, 22 October 2019 13:12 Go to previous messageGo to next message
etchedpixels is currently offline  etchedpixels
Messages: 333
Registered: October 2015
Senior Member
Where do you see serial output truncated ? The modem bits are not supposed to affect anything, and in many use cases we don't even touch them. Eg if you run XMODEM from E: and transfer to CF card there shouldn't be any at all. More likely to be a bug in my BIOS if it's happening. Do you lose chunks of text or single characters ?

Re: Simple80, a low-cost, glue-less CP/M Ready Z80 SBC [message #6706 is a reply to message #6705] Tue, 22 October 2019 19:12 Go to previous messageGo to next message
plasmo is currently offline  plasmo
Messages: 879
Registered: March 2017
Location: New Mexico, USA
Senior Member
Hmmm, I'm unable to duplicate the loss of text now. I thought maybe the 11MHz CPU clock fixed it, but when I restore the clock to 7.37MHz, it is also working properly. I may have a flaky hardware on my bench.
Bill
Re: Simple80, a low-cost, glue-less CP/M Ready Z80 SBC [message #9190 is a reply to message #6706] Sat, 09 October 2021 17:56 Go to previous message
plasmo is currently offline  plasmo
Messages: 879
Registered: March 2017
Location: New Mexico, USA
Senior Member
Read an interesting post by norwestrzh on overclocking Grant Searle's Z80 to 20MHz where 10MHz SIO is running to 20MHz. ( https://www.retrobrewcomputers.org/forum/index.php?t=msg& ;th=636&start=0& ) So, I tried overclocking experiments on Simple80 which has no glue logic just 55nS RAM, 45nS ROM, 20MHz Z80 and 10MHz SIO running at 7.37MHz. The 7.37MHz clock is replaced with 29.4912MHz clock, serial port changed to 460800 and turned on the power...nothing. OK, changed the clock to 22MHz and I saw the power-on sign-on message on the scope except the baud rate is 345600, not a standard baud. Try another board and still nothing at 29.5MHz but same sign-on output at 22MHz. Try Simple80 rev1 where CF circuitry is incorporated on the motherboard. ( https://www.retrobrewcomputers.org/doku.php?id=builderpages: plasmo:simple80r1 ) Got something at 29.5MHz! But it hung waiting CF to respond. Changed to faster CF disk (SanDisk 256Meg) and it signed on successfully! Loading file at 460800 is blazing fast, but it had intermittent data corruption, so I raised voltage to 5.25V and it is working fine. Using XMODEM I uploaded and installed CP/M into the fast CF disk and ran zexall.com. It ran in 25 minutes.

So the take away is Z80 and SIO can be overclock to 29.5MHz. I knew 20MHz Z80 runs reliably at 29.5MHz, but having 10MHz SIO run up to 29.5MHz is pretty cool.

Bill
Previous Topic: my latest Z80 SBC
Next Topic: xmodem-1K, ymodem, or zmodem


Current Time: Wed May 01 14:55:37 PDT 2024

Total time taken to generate the page: 0.00774 seconds