Home » RBC Forums » General Discussion » ZRCC, Z80+RAM+CPLD+Compact Flash (Z80 SBC)
ZRCC, Z80+RAM+CPLD+Compact Flash [message #7257] |
Mon, 16 March 2020 05:58  |
plasmo
Messages: 916 Registered: March 2017 Location: New Mexico, USA
|
Senior Member |
|
|
I like the idea of a low-cost Z80 running CP/M with minimum component count, but I don't like Z80 having to share the spot light with a processor many times its performance. So instead of using a powerful modern microcontroller as the I/O processor, I used a CPLD instead. The CPLD is Altera EPM7064S which is compatible with Atmel ATF1504. The CPLD's logic fabric can emulate a small ROM, 64 bytes, a simple serial port, and glue logic functions. The small ROM is enough to load program from the compact flash disk into RAM and execute. In case the compact flash is new and un-initialized, the ROM can also read in program from the serial port to initialize the new CF disk and load it with boot program. Beside the internal ROM, the CPLD also implemented a simple serial receiver and bit-bang serial transmitter. The serial receiver is just glorified shift register with fixed baud rate and protocol, 115200-N-8-1. The remaining CPLD is glue logic.
I name this simple computer ZRCC which stands for Z80+RAM+CPLD+CF which are the list of major components, i.e.,
* Z80 running at 22MHz
* 128K banked RAM, 512K optional
* EPM7064S CPLD
* Compact flash drive
* CP/M-ready
* 26-pin I/O expansion (RC2014-lite)
* Optional I2C bus
* 84mm x 51mm 2-layer pc board
There are two options depending on the programming of CPLD:
* 512K banked RAM. I hope to port RAM-only version of ROMWBW with that option
* I2C bus that can drive 128x64 OLED LED display and other I2C peripherals. I also found it is fast enough to drive RGB LED array based on WS2812B. The protocol is not I2C, just pulse width modulation, but that can be driven with bit-bang output. It'll be fun to have a LED light strip controller based on Z80.
PC board is out to JLCPCB yesterday.
Bill
|
|
|
|
|
|
|
|
|
|
|
|
|
Re: ZRCC, Z80+RAM+CPLD+Compact Flash [message #7438 is a reply to message #7436] |
Mon, 06 April 2020 15:33   |
plasmo
Messages: 916 Registered: March 2017 Location: New Mexico, USA
|
Senior Member |
|
|
Built up all 5 ZRCC to check out the design. 4 boards work right away, the 5th board gave me considerable trouble, but eventually I found the problem (it was a faulty pc board! and it is now working as well. CP/M2.2 is ported as well as Steve Cousin's SCMonitor. Working on porting CP/M 3 to it.
There are a total of 205 solder joints so it averages about 30 minutes to assemble, clean up, populate, and power up a board.
I'll sit down this week to finalize ZRCC design. I need to trim 1mm off the width of the pc board so it can be 50mm x XXmm where XX is 100mm or less. This way each 100x100mm pc board contains two ZRCC pc boards, this is a cost saving measure.
Per Greg's request, I will also design ZRCC2 that includes a 74LS32 so it can support 512K RAM as well as I2C bus.
Bill
|
|
|
Re: ZRCC, Z80+RAM+CPLD+Compact Flash [message #7440 is a reply to message #7438] |
Mon, 06 April 2020 16:01   |
mikemac
Messages: 250 Registered: March 2017
|
Senior Member |
|
|
Out of curiosity, what was wrong with the one PC board and what did you have to do to fix it? Just for my own education in case I ever produce more than a single board for any design.
Mike
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Re: ZRCC, Z80+RAM+CPLD+Compact Flash [message #7610 is a reply to message #7608] |
Wed, 06 May 2020 06:11   |
etchedpixels
Messages: 333 Registered: October 2015
|
Senior Member |
|
|
Also some bugs I think looking over the code
- in cfbootloader you set LBA3 to 0x40. That will break on some drives. The correct values for LBA3 at 0xE0 (master) and 0xF0 (slave). The other bits are sort of historical (encoding, sector size) but not every old device ignores them entirely.
- In the cfbootloader properly you should wait for drdy after writing the drive select/LBA mode. As you don't change drive I think that doesn't matter
Also if you need more room
in a,(foo)
and 80h
jp nz,
could easily be
in a,(foo)
rla ; or some people prefer add a
jr c,
etc (rra for low bit test)
You can make the CPLD a lot shorter (aside from simple optimizations like rla/rra for tests) because the ATA standard says that on power on or hardware reset
g) .... In either case the device shall set the Sector Count register to 01h, the Sector Number register to 01h, the Cylinder Low register to 00h, the Cylinder High register to 00h, and the Device/Head register to 00h. Device 0 shall store whether or not Device 1 was detected in step d) because this information is need in order to process any Software reset or EXECUTE DEVICE DIAGNOSTIC command later;
h) Device 0 posts diagnostic results to bits 6-0 of the Error Register;
i) Device 0 clears the BSY bit when ready to accept commands that do not require the DRDY bit to be equal
to 1. Device 0 shall clear the BSY bit no later than 31 seconds from the time that RESET- is negated;
j) Device 0 sets the DRDY bit when ready to accept any command."
I'd never really thought about that until today but that might save you a bit of room on the CPLD as you just need to wait for DRDY issue the read command, wait for DRQ inir dec h, jp (hl)
Oh yes - and barring the details on the memory page setting the emulator should now support zrcc - I've booted it to the monitor, ot yet assembled a CF card image with CP/M.
Alan
[Updated on: Wed, 06 May 2020 06:12] Report message to a moderator
|
|
|
|
|
|
Re: ZRCC, Z80+RAM+CPLD+Compact Flash [message #7669 is a reply to message #7628] |
Mon, 18 May 2020 21:39   |
plasmo
Messages: 916 Registered: March 2017 Location: New Mexico, USA
|
Senior Member |
|
|
I do have ZRCC kit as well as assembled/tested boards available. I've posted them on RBC Wiki Single Board Computer page. Kit is $20; assembled & tested is $45. Shipping is $5 in USA. I'm not shipping International right now because it is exceedingly slow.
Bill
[Updated on: Sun, 24 May 2020 05:15] Report message to a moderator
|
|
|
|
Re: ZRCC, Z80+RAM+CPLD+Compact Flash [message #7691 is a reply to message #7689] |
Sat, 23 May 2020 20:08   |
plasmo
Messages: 916 Registered: March 2017 Location: New Mexico, USA
|
Senior Member |
|
|
In instruction on New CF, I added an updated Teraterm macro that will install CP/M2.2, CP/M3, HiTech C, and Zork. It will also install a special edition of SCMonitor with Startrek BASIC game pre-loaded. This the link: https://www.retrobrewcomputers.org/lib/exe/fetch.php?media=b uilderpages:plasmo:zrcc:zrcc1:zrcc_install_all.zip
To add more drives, the CP/M BIOS needs to be changed. For CP/M2.2, it will diminish the available TPA with more drives. For CP/M 3, that's not a problem. ROMWBW has a dynamic way to assign drives which is much better way of adding more drives. I'm not there, yet.
I'm interested in your LCD work. I have designed a board based on ZRCC idea, but the Z80 is dedicated as the LCD controller for a 5.2" monochrome LCD panel, UG-32F01. Home page is here, I'll update it now with the latest picture. https://www.retrobrewcomputers.org/doku.php?id=builderpages: plasmo:z80lcd
Bill
Edit, add picture of Z80LCD, Z80 controller for UG32F01

[Updated on: Sun, 24 May 2020 05:17] Report message to a moderator
|
|
|
|
|
Re: ZRCC, Z80+RAM+CPLD+Compact Flash [message #7697 is a reply to message #7695] |
Sun, 24 May 2020 15:34   |
djmartins
Messages: 40 Registered: February 2018
|
Member |
|
|
That sounds great.
I looked at the free space on the tiny little 8 meg drives and found that they are mostly EMPTY.
I forgot how 8mb used to be a lot and I used to install 10 and 20 meg drives in new 8086 machines
and installed DOS on them.
I did look at the .ttl files to see how it was setup and have a better understanding than when I posted.
The D: drive with 3 Zorks still has over 7Mbs left.
Now you need like 15 GIGAbytes for Windows 10.....
If I use the raspberry pi terminal I can use a usb keyboard and a hdmi LCD screen so while those are not at all retro
these days they are easily sourced and work well.
I just scored two King Kludge RK61 keyboards at a discount place and have $10 into the pair.
They are a white 60% keyboard with nice RGB backlighting and red mechanical switches though I would have preferred blues.
I suppose with 8 drives ROMWBW isn't as needed and I do prefer to use (learn) CP/M Plus.
So there is enough space on a 64Mb compact flash card for four more 8 meg drives?
Slap some more text adventures, FORTH, word processor, and some other junk and be good to go.
[Updated on: Sun, 24 May 2020 15:35] Report message to a moderator
|
|
|
Current Time: Mon Mar 24 23:15:42 PDT 2025
Total time taken to generate the page: 0.04108 seconds
|