Simple80, a traditional Z80 motherboard without glue logic

1,164 views
Skip to first unread message

Bill Shen

unread,
Apr 15, 2019, 9:15:23 AM4/15/19
to RC2014-Z80
I noticed there are a number of Z80 kits available from eBay.  Some are quite inexpensive such as this one: https://www.ebay.com/itm/Z80-CPU-PIO-Kit-Z84C0020PEC-Z84C4006PEC-HM628128-W27C512-74LS32-74HC00-74HC138/113067844658

So the questions come to mind are a), are these working components? and b), what kind of Z80 can be built with them?  I went ahead and order one kit and have been thinking about a Z80 design.  This is what I come up with, I call it Simple80:

It is a 100mm X 100mm motherboard with 3 classic RC2014 connectors.  The motherboard has no glue logic, just the traditional Z80/RAM/ROM/SIO2.  It uses two discrete outputs on the SIO2 to switch banks between RAM and ROM.  It is very similar to the KIO testbed that I posted a week ago but the KIO is replaced with SIO and the ROM-to-RAM switch over is automatic.  Since I already have the KIO testbed pc board, I built up a Z80/ROM/RAM on the KIO testbed but without the KIO.  On a prototype board I added SIO2.  I ported SCMonitor to it and it is working pretty well.

I still have 74138, 7400, and 7432 left over from the kit.  I prototyped a simple CF interface using 7400 and 7432.  I can talk to the CF disk, but need to port CP/M to it.  The remaining 74138 may use for better decoding of SIO2 or I can just leave it out to keep the design simple.

I think it is possible to have banked RAM by using the two remaining discrete outputs from SIO2 to support CP/M3, but I have not tried it.  Waiting for the kit to show up now...

  Bill

simple80_scm.pdf
SimpleCF_scm.pdf
DSC_43710413.jpg
DSC_43690413.jpg
DSC_43770415.jpg

Alan Cox

unread,
Apr 15, 2019, 10:27:32 AM4/15/19
to rc201...@googlegroups.com
Getting the 128K looks easy - and in fact one of the hacks for Grant
Searle style boards is to wire A16 of the RAM to the SIO2 (the other
useful one is to wire a low frequency square wave to a suitable SIO/2
input so that you have a clock interrupt). That is enough to add a
ramdisc to CP/M 2 but not enough for banked CP/M 3 because banked CP/M
3 needs some of the upper space to be common and I'm not sure I
understand how you would do that with the design you have ?

Alan

Bill Shen

unread,
Apr 15, 2019, 2:24:24 PM4/15/19
to RC2014-Z80

I don't know, haven't tried it yet.  I thought the challenge in banked cpm3 is to come up with a xmove routine, there maybe more to that.  For xmove, I want to use the "shadow write" feature where program is read from ROM but data writes go to RAM.  I'm thinking of using stack pointer as the DMA pointer and Z80 register files as temporary data buffer, pushing and popping between two RAM areas to do xmove.  It is probably very slow.
  Bill
Message has been deleted

Tom Szolyga

unread,
Apr 15, 2019, 3:12:45 PM4/15/19
to RC2014-Z80
HI BIll,
What if the OE for the RAM and ROM were simply the inverse of each other.  This requires an inverter on the output enable signal between the RAM and ROM.  It would eliminate the data bus series resistors.  One could use the '138 to do the function also.
Tom

Bill Shen

unread,
Apr 15, 2019, 3:35:58 PM4/15/19
to RC2014-Z80
An inverter would make life easier.  An inverter can also drive a crystal to provide the Z80 clock. 

The series resistors, R1-R8 are not eliminated by the inverter, however.  At power up, the content of ROM is copied into RAM so during switching over from ROM to RAM, there are no data contention because RAM content is the same as ROM.  The reason for the resistors R1-R8 is to limit current between Z80 and RAM when Z80 is writing data to RAM.  Because RAM's output enable is asserted all the time, the RAM output is driven during the brief time between RAM's chipselect asserted with nMREQ and the time RAM's write enable is asserted with nWR.  Once RAM's write enable is asserted, the RAM output is tri-state.
  Bill

Alan Cox

unread,
Apr 15, 2019, 4:55:42 PM4/15/19
to rc201...@googlegroups.com
On Mon, 15 Apr 2019 at 19:24, Bill Shen <coinst...@gmail.com> wrote:
>
>
> I don't know, haven't tried it yet. I thought the challenge in banked cpm3 is to come up with a xmove routine, there maybe more to that. For xmove, I want to use the "shadow write" feature where program is read from ROM but data writes go to RAM. I'm thinking of using stack pointer as the DMA pointer and Z80 register files as temporary data buffer, pushing and popping between two RAM areas to do xmove. It is probably very slow.

Actually its very fast. The routine I have in some Fuzix ports is
special cased for the size and src == dst but is actually faster than
ldir. For the general case see the discussion in the comments at:

https://pluspora.com/people/46a85290ad6c013646b1005056268def

after the SPI discussion.

However you don't need xmove for CP/M 3 (it's optional), but you
always need top chunk of memory to be shared read/write. Fuzix can
cope with two banks and only a shared ROM (by writing some code into
both banks at the same addresses) but it's a bit exciting and CP/M
never did.

A CP/M 2.2 ramdisk obviously is doable as is banking the whole of CP/M
2.2 by wrapping the bdos and bios entry point to adjust calls that
transfer data buffers to the user to bounce data buffers. It's home
some CP/M 2.2 boxes got a 63K TPA

Alan

Mark T

unread,
Apr 15, 2019, 7:20:57 PM4/15/19
to RC2014-Z80
If you had a spare AND gate, then RAM /WE = ROM /OE AND /WR, would mean you could read from ROM and write that same data to RAM without needing to perform a write cycle. Sort of a fly by DMA.

Mark

Bill Shen

unread,
Apr 17, 2019, 3:28:27 PM4/17/19
to RC2014-Z80
Still thinking about how to do banked CP/M 3, but I figure I need to take baby steps and get CP/M2.2 running first.  The CF card as presented in the schematic above is a bit flaky, the timing spec requires some setup time from CF chipselect asserted to CF read/write.  The combinatorial logic with NAND & OR gates may not be sufficient.  In the past I'd add a clock of delay with a flipflop.  However, I suspect the real problem is the ground bounce caused by the fast CF card driving databus that causes glitches on the CF_read control signal.  I usually fix it by adding a RC filter (100 ohm with 100pF) in series with the CF_read signal.  I did that, and the CF interface works well with CISCO 64Meg CF.  Hopefully a better pc board layout will fix this problem without the RC filter kludge.

With the RC filter fix, it passes ZEXALL Z80 instruction test.  It executes the asciiart mandelbrot benchmark in 2 minutes and 33 seconds with 7.37MHz CPU clock.

Now, let see if I can do banked CPM3 with this hardware...
  Bill



Simple80_with_CF module.jpg
Simple CF module.jpg
Simple80 mandelbrot benchmark.jpg

Bill Shen

unread,
Apr 23, 2019, 9:16:48 PM4/23/19
to RC2014-Z80
Received the Simple80 and SimpleCF pc boards today and build up the first system.  It works.  Attached are updated schematics.  I'll document the whole design on retrobrewcomputer website.
  Bill

simple80_scm.pdf
SimpleCF_scm.pdf
DSC_43880423.jpg
DSC_43890423.jpg
Message has been deleted

Bill Shen

unread,
Apr 23, 2019, 9:40:29 PM4/23/19
to RC2014-Z80
Now I've stared at the board for a while, I realize there are room on the Simple80 motherboard for the 7400 and 7432 as well as the compact flash adapter.  It will no longer be a "glue-less" design, however...
  Bill
Simple80+CF.jpg

Bill Shen

unread,
May 3, 2019, 9:37:51 AM5/3/19
to RC2014-Z80
I received the parts from the eBay vendor that I mentioned in the first post of this thread, unfortunately the "SIO" described in his advertisement was in fact a PIO (see the attached picture of parts I have received).  I supplied my own SIO and checked out the remaining parts which are working fine.  The vendor was apologetic about the mistake and will send me a SIO replacement.  We also had several rounds of communications resulting in a Z80 kit specifically for Simple80, https://www.ebay.com/itm/Simple80-Z80-CPU-SIO-Homebrew-IC-Kit/113735638336  I'm ordering two kits and will report back how well they work.
  Bill
DSC_43970427.jpg

Tom Szolyga

unread,
May 3, 2019, 2:01:33 PM5/3/19
to RC2014-Z80
Hi Bill,

The kit has a SIO/1 instead of SIO/2.  The SIO/2 pinout is much more desirable.

Tom

Bill Shen

unread,
May 3, 2019, 7:19:20 PM5/3/19
to RC2014-Z80
According to the datasheet, the differences between SIO-0/SIO-1/SIO-2 are minor and on channel B only. I'm not using SYNCB nor DTRB in my design so I can use SIO-0/1/2. I do need to add some jumpers to adjust for few different pin assignments.
Bill
-------------------------------------------Z80 CPU Peripheral User Manual---------------------------------
The constraints of a 40-pin package make it impossible to bring out the Receive Clock, Transmit Clock, Data Terminal Ready, and Sync signals for both channels. Therefore, Channel B must sacrifice a signal or have two signals bonded together. Because user requirements vary, three bonding options are offered:

Z80 SIO/0 contains all four signals, but TxCB and RxCD are bonded together.

Z80 SIO/1 sacrifices DTRB and keeps TxCB, RxCD and SYNCB.

Z80 SIO/2 sacrifices SYNCB and keeps TxCB, RxCB and DTRB.


Greg Holdren

unread,
May 3, 2019, 7:33:14 PM5/3/19
to RC2014-Z80
And the DART can be used too with minor adjustments for channel B.

Greg

Bill Shen

unread,
Jun 5, 2019, 9:22:15 AM6/5/19
to RC2014-Z80
This is so addictive, I just can't stop tweaking the design, and I'm supposed to be out there gardening.  The Simple80 has a CF interface now and can run CP/M, but it is no longer glue-less.  It is still a pretty simple design, nevertheless.
  Bill

DSC_44480605.jpg

Edzard Kolks

unread,
Jun 5, 2019, 11:25:31 AM6/5/19
to RC2014-Z80


Op woensdag 5 juni 2019 15:22:15 UTC+2 schreef Bill Shen:
This is so addictive, I just can't stop tweaking the design, and I'm supposed to be out there gardening.  The Simple80 has a CF interface now and can run CP/M, but it is no longer glue-less.  It is still a pretty simple design, nevertheless.
  Bill


Hello Bill,

Just caught this one in time...was about to order some (old) PCB's this afternoon.

Is there any chance that you update the files of the design (gerber etc.)?

Thanks for your time and effort!


Kind regards,

Edzard

Bill Shen

unread,
Jun 5, 2019, 11:28:35 PM6/5/19
to RC2014-Z80
Edzard,
Are you in USA? If so, PM me your address and I'll mail you a free pc board.

Attached is the schematic & Gerber file for rev1 Simple80.  I've designed it for SIO/0, SIO/1, and SIO/2 with different jumper configurations.  In the next few days I'll create a new webpage for rev1 Simple80 with better instruction on how to build and configure the hardware.

The CF adapter is too close to U7 so it is necessary to nibble away the unused corner of the CF adapter to fit. (see the photo).  The reset logic (just a simple RC circuit) is not particularly reliable.  You may need to press the reset button after power up to boot the Z80.

The CF interface appears to be quite robust.  I've tried all of my troublesome CF disks and they all worked so I believe it'll should handle any CF disks.

Software for Rev1 is same as Rev 0.  This includes a version of SC Monitor with Startrek program included.  Alan Cox has written a simulator for Simple80 and bootROM firmware that should boot directly into CP/M with ROM disk and RAM disk although it is not quite working at the moment.   Once I've figure it out, I'll make it available with Alan permission.  I've picked up a few tricks from Alan's CP/M BIOS so IOByte is now working and it can now run Kermit file transfer protocol.

I have 6 spare boards;  anyone in the USA wants a blank board, PM me your address.  I'll send you a free pc board via 1st Class letter mail.  It is too expensive to ship outside of USA, you are better off order 5 boards from JLCPCB for $2 and use the economy shipping option.

  Bill
Simple80_rev1_scm.pdf
Simple80_r1.zip
Simpe80_r1_engineering change.jpg

Alan Cox

unread,
Jun 6, 2019, 7:35:20 PM6/6/19
to rc201...@googlegroups.com
> Software for Rev1 is same as Rev 0. This includes a version of SC Monitor with Startrek program included. Alan Cox has written a simulator for Simple80 and bootROM firmware that should boot directly into CP/M with ROM disk and RAM disk although it is not quite working at the moment. Once I've figure it out, I'll make it available with Alan permission. I've picked up a few tricks from Alan's CP/M BIOS so IOByte is now working and it can now run Kermit file transfer protocol.

I've pushed a newer version (fixed the alignment of CP/M itself and
some other bits) to github. This one passes all the sanity checks I
added to the simulator to spot violations of the rule about only
writing to RAM the same value as is in EPROM at that address when the
ROM is mapped.

One other thing I fixed - you had pointers to zero sized check buffers
in your DPB. For non removable media the pointer needs to be zero not
a pointer to 0 bytes of memory.

The simulator version also now runs Fuzix providing you add a square
wave source to the right SIO pin (same way I run on Grant's board and
my test code is on Tom's SBC)

Emulators: https://github.com/EtchedPixels/RC2014
ROM work: https://github.com/EtchedPixels/RC2014-ROM


Alan

Edzard Kolks

unread,
Jun 7, 2019, 6:38:22 AM6/7/19
to RC2014-Z80
Bill,

Thanks for you respond and offer. It's very generous!



I have 6 spare boards;  anyone in the USA wants a blank board, PM me your address.  I'll send you a free pc board via 1st Class letter mail.  It is too expensive to ship outside of USA, you are better off order 5 boards from JLCPCB for $2 and use the economy shipping option.


I live in Europe so I just ordered some boards from JLCPCB.

If someone in Europe would like a board, please let me know.



Kind regards,


Edzard

Bill Shen

unread,
Jun 7, 2019, 8:36:04 AM6/7/19
to RC2014-Z80
Edzard,

I mentioned various sources for Simple80 in an email but I'll re-post it here:

Assuming you already have the basic resistors, capacitors, IC sockets and hardware, the integrated circuits can be ordered cheaply from this eBay seller;  I've ordered two kits and they both worked:  https://www.ebay.com/itm/Simple80-Z80-CPU-SIO-Homebrew-IC-Kit/113735638336

The kit does not have 7.37MHz oscillator, so you need to order it separately.

I order many IDE44 adapters from this source: https://www.ebay.com/itm/IDE-44-Pin-Male-to-CF-Compact-Flash-Male-Adapter-Connector-DT/252403445892  There are many other sources, but I know this one works.

CISCO brand of CF disks is most reliable, but I've done enough tests and willing to stick my neck out to say it should work with any brand of CF disks. 

The pin assignment of the serial port is designed for direct connection to 6-pin CP2102 USB adapter such as this one: https://www.ebay.com/itm/10PCS-6Pin-USB-2-0-to-TTL-UART-Module-Serial-Converter-CP2102-STC-Replace-Ft232/252037049769  This is the vendor I ordered from, but there are many others on eBay.

  Good luck,  Bill

Colin MacArthur

unread,
Jun 7, 2019, 1:28:06 PM6/7/19
to RC2014-Z80
Just a thought.
You MAY be able to eliminate the "NIBBLE" on the CF adapter by using a Female header.
This also allow the CF adapter to be removed so you can use a SD adapter ETC.
CM

karlab

unread,
Jun 7, 2019, 1:38:20 PM6/7/19
to RC2014-Z80
Thats a good idea Colin.
I ordered a bunch  2-3 weeks ago, still in post.
It will be supplied with "my missing module" .
I have tried the male type with a ribbon cable, but it doesnt work.
I assume the length of the cable affects the signal, or the cable muddles the signal and I have to redesign the pad.
karl

Colin MacArthur

unread,
Jun 7, 2019, 1:50:09 PM6/7/19
to RC2014-Z80
I had the same issue with the cable, check the cable to see if it swaps the pinout IE pin 1 is now pin 2 ETC...
(I have had to make a special cables in the past)
CM

Bill Shen

unread,
Jun 7, 2019, 2:25:41 PM6/7/19
to RC2014-Z80
Colin,
That is a great idea especially because the remaining CF adapter is hanging over U7 such that it (U7) can't be inserted or extracted. Another word, U7 either has to be soldered directly in the pc board, or it needs to be installed in the socket prior to the CF adapter is soldered. With a female header, the CF adapter is raised high enough that U7 can be inserted and extracted without interfering with CF adapter.

Would you like a Simple80 Rev1 board? I have plenty of spares.
Bill

Bill Shen

unread,
Dec 22, 2022, 8:37:56 PM12/22/22
to RC2014-Z80
I noticed Simple80 kit is still available on eBay after almost 4 years.  The kit is now $7 plus $9 shipping; IIRC it was $6 and $6 shipping 4 years ago.  It says 97 kits has been sold and I'm going to order another kit to check if it still work.  Can anyone tell me their experience with the kit?  I've purchased 3 kits (this next one is the 4th kit) and they all worked except one time the seller shipped me a PIO instead of SIO.  If he sent a PIO again, I'll design a glue-less Z80 with PIO instead of SIO.  I still think this is the cheapest way of getting a CP/M-ready Z80 computer.  Come to think of it, I'll buy 2 kits; if both work, I'll sell the assembled/tested Simple80 on eBay for $20 each.
  Bill

Lionel Peterson

unread,
Dec 22, 2022, 10:47:58 PM12/22/22
to rc201...@googlegroups.com
The simple80 kit you linked to looks interesting, I assume these instructions would guide me thru the building process:


But I'm wondering about programming the monitor into the eprom/eeprom... aside from that issue the build looks pretty straightforward with minimal 'glue' (additional bits). I assume needed parts are available from mouser/digikey/etc and the PCB is easy enough to order from Japan.

Thanks,

Ken

On Dec 22, 2022, at 19:37, Bill Shen <coinst...@gmail.com> wrote:

I noticed Simple80 kit is still available on eBay after almost 4 years.  The kit is now $7 plus $9 shipping; IIRC it was $6 and $6 shipping 4 years ago.  It says 97 kits has been sold and I'm going to order another kit to check if it still work.  Can anyone tell me their experience with the kit?  I've purchased 3 kits (this next one is the 4th kit) and they all worked except one time the seller shipped me a PIO instead of SIO.  If he sent a PIO again, I'll design a glue-less Z80 with PIO instead of SIO.  I still think this is the cheapest way of getting a CP/M-ready Z80 computer.  Come to think of it, I'll buy 2 kits; if both work, I'll sell the assembled/tested Simple80 on eBay for $20 each.
--
You received this message because you are subscribed to the Google Groups "RC2014-Z80" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rc2014-z80+...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/rc2014-z80/8788a631-6860-4765-b9c5-0aa89c5b225dn%40googlegroups.com.

Bill Shen

unread,
Dec 22, 2022, 11:43:10 PM12/22/22
to RC2014-Z80
The eBay seller only provides IC, you still need to buy 7.37MHz oscillator, IC sockets, resistors, capacitors, power jack, RC2014 bus socket, etc.  For CP/M capability, you'll need CF disk, and 44-pin IDE CF adapter.  You'll definitely need a flash programmer such as TL866ii to program the flash.  You can go with rev1 pc board which has compact flash interface built in or you can go with rev0 pc board but will also need to order SimpleCF pc board to plug into one of the RC2014 expansion socket.  Both rev0 and rev1 boards use the same software.
  Bill

Lionel Peterson

unread,
Dec 23, 2022, 1:20:41 AM12/23/22
to rc201...@googlegroups.com
Yuck, I have no problem ordering needed parts, PCBs, but the EEPROM programming puts it out of my reach. Oh well, thanks!

Ken

On Dec 22, 2022, at 22:43, Bill Shen <coinst...@gmail.com> wrote:

The eBay seller only provides IC, you still need to buy 7.37MHz oscillator, IC sockets, resistors, capacitors, power jack, RC2014 bus socket, etc.  For CP/M capability, you'll need CF disk, and 44-pin IDE CF adapter.  You'll definitely need a flash programmer such as TL866ii to program the flash.  You can go with rev1 pc board which has compact flash interface built in or you can go with rev0 pc board but will also need to order SimpleCF pc board to plug into one of the RC2014 expansion socket.  Both rev0 and rev1 boards use the same software.

Bill Shen

unread,
Dec 23, 2022, 7:37:06 AM12/23/22
to RC2014-Z80
Your frustration with PROM programmer is a familiar theme.  Programmer is such a specialized equipment useful only for retrocomputing, it is hard to justify buying.  I've built programmers based on Z280 and 6502 but they are not user friendly.  It may be worthwhile to design a programmer for RC2014 community.
  Bill

Alan Cox

unread,
Dec 23, 2022, 12:48:15 PM12/23/22
to rc201...@googlegroups.com
On Fri, 23 Dec 2022 at 12:37, Bill Shen <coinst...@gmail.com> wrote:
>
> Your frustration with PROM programmer is a familiar theme. Programmer is such a specialized equipment useful only for retrocomputing, it is hard to justify buying. I've built programmers based on Z280 and 6502 but they are not user friendly. It may be worthwhile to design a programmer for RC2014 community.

This is one reason I've always loved the 68HC11. You can bootstrap an
HC11 from the serial port and use that to in-system program things
like the flash for the machine itself. It also makes for a truly
minimal machine as you only need a reset controller and some RAM (ROM
optional) to get a full system with SD storage.

If you stick to modern flash parts however there are also a ton of
quick and easy Arduino flash programmer type projects

https://mint64.home.blog/2018/07/29/parallel-nor-flash-eeprom-programmer-using-an-arduino-part-1-the-sst39sf040-and-planning/

Bill Shen

unread,
Dec 23, 2022, 2:09:00 PM12/23/22
to RC2014-Z80
Nice article, SST39SF040 is the flash of choice for dedicated programmer.  I remember on 6502.org proposing a 6502-based programmer to help newbie.  Of course the logical & cheaper approach is something based on Arduino, but I was a tad disturbed that seasoned 6502 designers would immediately abandon 6502 and suggest solutions based on different modern microcontrollers.  Perhaps that was inevitable, but I was hoping the old timers would at least suggest a solution based on 6502, especially for the newbie's sake.  Eventually I did designed a 6502-based EPROM programmer (SST39SF040 is the targeted device), but the ROM-less bootstrap method was very convoluted to explain.  I even offered free PC board but no taker.

Getting computer to run without ROM is a difficult problem; just look at all the expensive hardware front panel of the early day computers.
  Bill

Mark T

unread,
Dec 23, 2022, 2:39:24 PM12/23/22
to RC2014-Z80
There is always the option of using an FT245. I think you also explored this with 6502 but was a bit more complicated due to 6502 dummy read cycles.

I have wondered if this might be possible to boot from cassette tape using a 6402 type UART for a more retro romless system. Or maybe a ttl based cassette interface using fm coding.


Bill Shen

unread,
Dec 23, 2022, 7:37:03 PM12/23/22
to RC2014-Z80
Mark,
My 6502 programmer is based on FT245 and 6502 dummy cycle did caused some complication but it all worked out OK.  

I explored the serial port approach but was frustrated by that most serial devices needed initialization prior to receiving.  Thanks for mentioning 6402 UART, I wasn't aware of it; so after reading the datasheet, I'll try another version of 6502 programmer using 6402 UART.
  Bill

Bill Shen

unread,
Jan 7, 2023, 11:23:55 AM1/7/23
to RC2014-Z80
Received 2 set of Simple80 I ordered Dec 22, 2 week delivery from China.   I noticed Z80 and SIO/0 have the original markings which is a departure from the re-marked parts I usually received from China.  SIO/0 appears to be NMOS.  The parts are packaged in white foam and wrapped with plastic film, but I noticed the foam and plastic film have an oily coating similar to pink antistatic foam and bag.  rubbing them on nylon jacket do not generate the "static cling", so they may well be antistatic packaging materials.

Build up a couple boards with rev 1.2 pc board which has integrated CF interface.  Power consumption is 110mA which is significantly higher than the nominal 60mA with all CMOS parts so SIO/0 is NMOS just as its label indicated.  Both boards worked at 7.37MHz@110mA but none worked at 14.7MHz unlike all-CMOS parts that can operate reliably at 14.7MHz.

CF disk compatibility is mentioned frequently on this forum, so I test it with 16 different CF disks I have on hand plus a SD-to-CF adapter .  it all passed so the CF interface is quite robust.

The RAM is 128KB but the 2nd 64KB bank is not in use.  It is possible to change RAM bank with SIO discrete output plus some tricky software.  I suspect Ladislau has already done similar work successfully with his HiTech C rework so I'll see if I can port it to Simple80.

I don't need anymore boards in my already cluttered lab, so when I'm done playing I'll open a Tindie account and sell them for $20 each to recover my cost.
  Bill
DSC_71650107.jpg
DSC_71640107.jpg
DSC_71600107.jpg

Phillip Stevens

unread,
Jan 7, 2023, 11:56:20 AM1/7/23
to RC2014-Z80
On Saturday, 7 January 2023  Bill Shen wrote:
The RAM is 128KB but the 2nd 64KB bank is not in use.  It is possible to change RAM bank with SIO discrete output plus some tricky software.  I suspect Ladislau has already done similar work successfully with his HiTech C rework so I'll see if I can port it to Simple80.

It is nowhere as complete and extensive as Ladislau’s malloc function for high RAM, but there’s a relocatable 64kB high RAM LDIR equivalent written in 32 Bytes. It relies on only one fixed reference pointer to allow it to be freely relocated, and the actual routine which can be placed or moved as needed. There are C function wrappers to ease its use to copy “up” or “down” in RAM.

Just a lightweight alternative to the full malloc solution if managing a large buffer is all that is needed.
P.

Alan Cox

unread,
Jan 7, 2023, 6:06:25 PM1/7/23
to rc201...@googlegroups.com
> The RAM is 128KB but the 2nd 64KB bank is not in use. It is possible to change RAM bank with SIO discrete output plus some tricky software. I suspect Ladislau has already done similar work successfully with his HiTech C rework so I'll see if I can port it to Simple80.

Did you fix it so the 128K RAM works on these boards ? If I remember
rightly R16 pulls the wrong way. Not hard to fix. Just pick somewhere
else to solder the other end.

Bill Shen

unread,
Jan 7, 2023, 7:05:18 PM1/7/23
to RC2014-Z80
I didn't fix it on the pc board, but like you said, it is easy to pull to ground instead of VCC because there is a ground pad near by.  I just made the fix and am working on a test software right now to see if I can copy between two banks.  I'll fix it on next pcb revision.
  Bill

Bill Shen

unread,
Jan 10, 2023, 10:52:21 AM1/10/23
to RC2014-Z80
The current thread on "RC2014 Pro Case..." is quite inspirational.  I have a number of PacTec CM5-125 enclosures which is perfect for 100mmX100mm boards but not tall enough to accommodate vertical CF disk.  However, there are DOM disks with 90 degree connector that can plug into the backside of Simple80 IDE44 connector as shown in the photo.  This resulted in a low-profile motherboard fit inside CM5-125.  The standoffs in the picture are too long so 1/4" can be removed for better fit.

Front and rear panels of an enclosure are labor intensive with drilling, labelling and manual wiring.  CM5-125 has front and rear panel slots that are 1.6mm wide which are designed to fit 4.75"x 1.3" standard pc boards as front/rear panels.  White silkscreen on black solder mask makes nice looking front panel.  PacTec also makes a taller CM5-200 that can accommodate additional RC2014 expansion boards (such as sound and video) that are built with straight header as RC2014 connector instead of the normal 90 degree header.  This way the expansion board can plug in horizontally, parallel to the motherboard to fit the limited head room.  Many interesting possibilities.
  Bill
DSC_71690110.jpg
DSC_71670110.jpg
DSC_71680110.jpg

Bill Shen

unread,
Jan 14, 2023, 9:06:17 AM1/14/23
to RC2014-Z80
I've worked out a couple routines to put and get data from 2nd bank of 64K RAM very similar to Steve Cousin's API for SC108.  The routines are installed in both RAM banks at power up and reside at high memory, $FF00, away from other applications.

While thinking about how to test and use these routines, I recalled my VGA-piggybacked-on-RAM board.  It is a monochrome text-based VGA display with 3K of video memory and 1K of font memory.  It is designed to shadow 4K memory region at high memory ($1C000-$1CFFF) of 128K RAM.  By "shadow" I mean it is a write-only memory monitoring data written to the video memory region and displaying the written data to VGA monitor as 64x48 text with 128 programmable character fonts.  To use it, I simply replace the existing 128KB RAM with VGAxRAM and SImple80 will work the same but now with a VGA display  hidden feature.  Pictures of SImple80 with its 128K RAM removed and VGAxRAM before insertion and picture of Simple80 writing text to VGAxRAM via the "put" system call.

Since font and video RAM are located at high 64K of 128K RAM, normal applications have no easy way of accessing it other than the "put" and "get" system calls.  The overhead of "put" and "get" does slow down the video access.  I want to write a few applications to check it out. 

  Bill

PS, I think VGAxRAM also works with SC108 and SC114.  It'll be interesting to try that.



DSC_71710114.jpg
DSC_71700114.jpg

Alan Cox

unread,
Jan 14, 2023, 12:43:11 PM1/14/23
to rc201...@googlegroups.com
One option is that you bank the entire CP/M BIOS except for the
tables. If you've got a shared stack at say FF00-FF7F then you just
save sp, switch SP to FF80, and call into the BIOS via shared code.
Some stuff ends up on the FF00-FF7F stack in each bank but as you push
pop it back and restore stack that works fine. It's fairly easy put
all the video BIOS (and thus the font and emulation code) into the
other bank, and you can also put almost all the disk handling for CP/M
2.2 - you just need to deal with the read/write copy from the
deblocking buffer to the CP/M bank.

In theory you can do the same with GSX or some other drawing library
(or implement drawing via character codes which is how OS/9 sneaked
around that issue on 6809 setups.

Bill Shen

unread,
Jan 14, 2023, 3:38:23 PM1/14/23
to RC2014-Z80
I have a Z80 version of VGA/PS2 board that places 4K video/font RAM in the I/O space so it does not take up BIOS memory space.  This piggyback VGA was really meant for 6502 and CPU without I/O space.  Yet putting the video memory in high 64K RAM and accessing it via bank switching also save quite a bit of BIOS memory.  Furthermore it has the added benefit of putting other BIOS routines in high memory and save even more BIOS memory.  Yet another benefit is not having to design Z80 version of VGA that's different than 6502 version of VGA.  So that is an unexpected outcome of this little adventure.  Something to think about more...
  Bill

Bill Shen

unread,
Jan 15, 2023, 9:38:04 AM1/15/23
to RC2014-Z80
This is a 10 second video of "BadApple!" playing with VGAxRAM on Simple80 using "put" system call.  CPU clock is 14.7MHz, twice standard RC2014 clock.

TL;DR:  
The VGAxRAM displays 64 x 48 text; I can quadruple the resolution to 128x96 with interpolation by programming 16 fonts to represent the 16 possible permutation of 2x2 pixel array; thus each text character can represent 2x2 pixels.  It takes 3 CF sectors (1.5KB) to represent a frame of picture.  This BadApple video is originally played at 20 frames a second, so I have 50mS to display a frame.  Using "put" system call to push every video byte to VGAxRAM, I measured 40mS to display 1.5KB.  The software inserted 10mS delay between each frame to achieve 20 frames/sec.  However, this is with 14.7MHz Z80; it is not possible to achieve 20 frames/s with the standard 7.37MHz Z80.

I also wrote another version of same software to run in high memory so it has direct access to VGAxRAM (not using "put" system call).  It is able to write 1.5KB in 17.6mS (Z80 at 14.7MHz), 2.3 times faster than using "put" system call.  It should be possible to play vido at 20 frames/sec with standard 7.37MHz Z80.
BadApple_Simple80_14MHz_put_syscall.gif
  Bill
Shadow_mover_code_fragment.txt
Reply all
Reply to author
Forward
0 new messages