CP/M unstable on SC114 + "Missing Module" - troubleshooting ideas welcome!

716 views
Skip to first unread message

MogensB

unread,
Aug 28, 2020, 10:05:22 AM8/28/20
to retro-comp
Hi,
I build an SC114 and added Karl's "missing module" 61f with a 64 Mb CF card.
However, I cannot get CP/M running reliably. I can load cpm from the small computer monitor and get the A> prompt, do dir and even run DUMP.COM to do a hex display of a file.

But for instance when writing files, it does seem to go wrong quite consistently. If for example i use ED.COM to write a new file, it fails when exiting ED.COM and just "hangs" - but the new file is written correctly and with the right contents - I can verify that after a reset and reload of CP/M. Another example is when trying to launch XMODEM.COM. This will immediately cause the SC114 to freeze and needs a reset. Using DISPLAY.COM just exits to the small computer monitor asterisk prompt.

I also did a complete test of the CF card with the CF card test utility, and after an hour or so ALL sectors passed the checks - so somehow it seems the hardware is OK. Also checked CF card with win32dskimager's verify function and all is OK.

I have two different SC114s, and tested with both, and they show the same erratic behaviour.

The SC114 is fitted with the SCM S2 rom, and I have tried using the original image from Karl (on the CF card I received), as well as formatting CF and using PutSys to install CP/M. However I have only had partial success with that.
I have a suspicion that writing to the CF card from CP/M has issues; but since the small computer monitor CD card test runs a complete test without any errors I am running out of ideas... 

So - any suggestions and questions are welcome!

I have attached a text file with a log of some of the testing commands and example of failure in the last lines of the file.

Regards,
Mogens - Denmark
log.txt

Bill Shen

unread,
Aug 28, 2020, 11:32:32 AM8/28/20
to retro-comp
Hi,
I know you've already tried the CF test, but I like you to try this one command in CP/M.  This is my simple & quick CF integrity test.

pip h:=a:*.*[v]

This copies disk A, with verify, to disk H.  It takes less than a minute to run and is a quick test of CF in CP/M environment.
  Bill

Kurt Pieper

unread,
Aug 28, 2020, 1:36:18 PM8/28/20
to retro-comp

Hello to Denmark,

I have the same configuration and can confirm the problem with some CF products.

Bill Shen writes how you can control it well.

Copy the files into another drive and test there.
But it's not a solution - just a test.

The CF adapter should also be plugged into the CPU as much as possible
become.
 
Greetings from the Rhine
Kurt

MogensB

unread,
Aug 28, 2020, 2:14:48 PM8/28/20
to retro-comp
Hi,

Thx a lot for your feedback :)

I tried Bill's very good suggestion, and it does indeed indicate that there is a problem:

A>pip h:=a:*.*[v]

COPYING -
VERIFY ERROR: =A:*.*[V]

And then the SC114 freezes until reset.

Checking read/write/verify in Windows 10 with a flash card adapter, I can confirm that the 64 MB CF card itself is OK when formatted wit FAT (and Stephen C. Cousins test program run from the small computer monitor also verifies the card OK).

So... I guess, this is indicating that it probably is the CF adapter itself which is causing the trouble?
Or could this still be due to an incompatible CF card? Unfortunately, right now I don't have replacement parts for either to test with.

Regards,
Mogens - Denmark


Karl Albert Brokstad

unread,
Aug 28, 2020, 2:34:06 PM8/28/20
to retro-comp
Hi
I just want to start with stating that using a CF card for storage without a dedicated IDE controller is a hack.
But it has worked since Grant made his SBC, and it still work with Spencer's RC2014 pro and my storage devices.
But all these designs are prone to tolerance issues, and certain CF cards do not work very well.
If you are experience problems it is most probably caused by the CF card.
I am offering the storage device as a low cost option, but it has bothered me that it is not more robust.
Therefore, with input from Bill, I redesigned the storage modules and the "missing module" is in progress.
The new design appear to be more robust, but it will never match a system with dedicated IDE controller.
If you find that the supplied CF card do not work as expected, I will send you a new one.
Karl

Bill Shen

unread,
Aug 28, 2020, 2:55:58 PM8/28/20
to retro-comp
PIP with verify is just a test.  It shows the CF disk access is problematic, in fact it is most likely a read problem, based on past experiences.  The CF disk itself is fine, the problem is in the interface.

Please take a picture of your CF board.  I can suggest a small modification that may fix your problem.

  Bill

MogensB

unread,
Aug 28, 2020, 3:06:10 PM8/28/20
to retro-comp
20200828_205913.jpg20200828_205958.jpg

MogensB

unread,
Aug 28, 2020, 3:16:30 PM8/28/20
to retro-comp
Hi Karl,
Thx for the feedback - I wasn't really aware of the difference of using a dedicated IDE controller; I am kind of newbie in hardware, just got 40+ years of SW experience, and its refreshing to be able to start learning about HW too!
I will write to you if I don't get any further with Bill's ideas :)

Regards,
Mogens

Sergey Kiselev

unread,
Aug 28, 2020, 3:26:47 PM8/28/20
to retro-comp
Hi,

An easy recommendation would be to try another CF card - different manufacturer, maybe a newer one...

I had reliability issues with my own RC2014 compatible system and CF cards when running at slightly higher clock frequency. For example 8 MHz would work fine, but at 10 MHz it becomes unreliable.
If I am not mistaken, CF cards are designed to work at 8 MHz (typical IBM AT ISA bus clock), with Intel timing. Z80 timing is slightly different and bus cycles are shorter (3 T-cycles vs. 4 T-cycles).
Also ideally the CF card's data bus should buffered, but in RC2014 nothing is buffered. It is kind of a little miracle that it works at all, with some people putting a dozen of cards in their systems...

Thanks,
Sergey

MogensB

unread,
Aug 28, 2020, 3:39:48 PM8/28/20
to retro-comp
Hi,
All those Z80 systems are just fantastic little miracles :)
But just for the record, the system I am testing contains only the SC114, and "the missing module" version 61f.
Regards,
Mogens

Karl Albert Brokstad

unread,
Aug 28, 2020, 3:55:41 PM8/28/20
to retro-comp
Bill might have some clever way to fix the adapter.

Screen Shot 2020-08-28 at 21.50.02.png

Here is something you can try if you have the parts.
If you want to wait I will send you the revised board when its ready.

Karl

MogensB

unread,
Aug 28, 2020, 4:05:56 PM8/28/20
to retro-comp
I will definitely give it a try - failure is always an option :-) 
If it doesn’t work I will like to try the revised board once you have it ready!

Regards,
Mogens

Bill Shen

unread,
Aug 28, 2020, 5:44:35 PM8/28/20
to retro-comp
We've travelled down this road before and Karl knows what I was about to suggest.  Adding 100 ohm series resistor and 100pF filter cap for IORD signal is exactly what I was about to suggest.  You only need to make the modification for IORD signal.  This will not fix everything, but will significantly improve the interface with a number of CF disks. 
  Bill

Tadeusz Pycio

unread,
Aug 29, 2020, 4:03:50 AM8/29/20
to retro...@googlegroups.com
Hi Mogens,

Can you check whether the write on the card is correct? This is best done on a PC by comparing images. This is similar to my problems that I solved by using the HC245 buffer, because the only errors I had were when reading.

EDIT. Wrong path, you need to check on a working system :(
If you manage to run this program as in the picture and compare with the saved image on the PC of this card.
You don't need to check your writing.

duf05.png

MogensB

unread,
Aug 29, 2020, 10:34:20 AM8/29/20
to retro-comp
Hi
I tried to implement the patch with the resistor/capacitor on !RD. But I guess I failed :-) as things got worse - "Compact Flash not present" when trying to access the CF card, and cannot load CP/M.

But I am a newbie in HW, so chances are that I did not implement the patch correctly - I have added two pictures to show what I did.
When i measure from the bus connector pin !RD to the CF adapter i get 97.6 ohm so I guess that one is OK.
I cut the PCB connection to the pin and verified that there was no connection to the !RD pin afterwards.

Can you clever guys check my pictures and see if I implemented the patch correctly?

Regards,
Mogens

patch-1.jpgpatch-2.jpg

Bill Shen

unread,
Aug 29, 2020, 11:58:15 AM8/29/20
to retro-comp
One problem I can see is the capacitor is wrong value.  Value of 104 is 0.1uF, it should be 100pF or 101.  Sometime just add a terminating resistor will fix the problem for some CF disks, so remove the capacitor, power up and try again.
  Bill

MogensB

unread,
Aug 29, 2020, 1:50:48 PM8/29/20
to retro-comp
Hi,
@Bill: Ooops! My silly mistake... I removed the capacitor with the wrong value and left the resistor. At least, I am back to where I started troubleshooting :-)
CP/M loads and runs, but still unreliable as described earlier.
Right now I don't have any capacitors with the right value, so I will have to wait a little to test the fix with the capacitor.

I will be back with an update when I am ready to try the fix, hopefully with the right capacitor this time!

Thank you for your help this far, I am learning a lot.

Regards and have a nice weekend,

Mogens

Bill Shen

unread,
Aug 29, 2020, 7:53:58 PM8/29/20
to retro-comp
Looking at SC114, I see it has 7.37MHz CPU, so you can use capacitor value from 100pF to 1000pF.
  Bill

Eric Dittman

unread,
Sep 1, 2020, 1:18:44 PM9/1/20
to retro...@googlegroups.com
I've had very mixed luck with CF cards. A card and/or CF-IDE adapter
that works with one board won't work with another. I have a couple of
CF cards that prevent some of my systems from even starting up, but on
other systems they either work fine or at least don't prevent startup.
I also have one card that doesn't show up unless I have it in a dual-
slot CF-IDE adapter with another card.

I also have some DOMs that won't show up but they don't prevent the
systems from starting.

I dug out an old PATA IDE drive and tested it with Spencer's card and
Jim's JM003 and it worked with both. I also have a small SATA SSD with
an SSD-PATA adapter that I've tested with Spencer's and Jim's cards and
that worked as well.

The cards I have are:

Karl's 10f
Spencer's latest update of Ed's card
Jim McGinnis' JM003
Zippster's PPIDE board on a Zeta 2

The CF cards I've tried are Cisco, Verbatim, and SanDisk varying from
128MB to 4GB.
--
Eric Dittman

Bill Shen

unread,
Sep 1, 2020, 4:40:30 PM9/1/20
to retro-comp
Eric,
I believe you have a Z80MB64.  Its CF interface is quite robust.  Have you tried your problem CF on Z80MB64?
  Bill

Eric Dittman

unread,
Sep 1, 2020, 5:45:17 PM9/1/20
to retro...@googlegroups.com
I have not tried the CF cards that give me issues on the boards I
got from you. I'll give them a try on the Z80MB64 and see if they
work there.
> --
> You received this message because you are subscribed to the Google
> Groups "retro-comp" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to retro-comp+...@googlegroups.com
> <mailto:retro-comp+...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/retro-comp/9b36fa86-547a-4fef-8fe7-1f12866e4177n%40googlegroups.com
> <https://groups.google.com/d/msgid/retro-comp/9b36fa86-547a-4fef-8fe7-1f12866e4177n%40googlegroups.com?utm_medium=email&utm_source=footer>.


--
Eric Dittman

Bill Shen

unread,
Sep 1, 2020, 8:37:39 PM9/1/20
to retro-comp

The CF problem is data dependent.  If a file contains lots of 0xFF, it is more likely to fail than a file contains lots of 0x00.  Here are two files you can try: f.txt contains all 0xFF, z.txt contains all 0x00.  Try to PIP with verify.  You should see z.txt passes more readily than f.txt.
  Bill
z.txt
f.txt

Bill Shen

unread,
Sep 1, 2020, 9:28:47 PM9/1/20
to retro-comp
I have a CF board out to JLCPCB that hopefully can work with every CF disks.  I'll find out how well that works out when I have the board back next week.  I'll need the community's help to check out all CF disks that people are having problems with.  I'll provide more details in a different post.
  Bill

MogensB

unread,
Sep 3, 2020, 1:34:18 PM9/3/20
to retro-comp
Hi,

I finally got my box of mixed capacitors in the mail today, so I could patch the "missing module" with the correct 100pf cap (marked 101) and the 100ohm resistor on the  !RD pin.
(Thanks to Bill for pointing out my mistake using the wrong capacitor in my first attempt).

And - the test with the patch in place is indeed very succesful  :-D

CP/M loads and run without problems; I can copy files between drives using pip with verify. I installed and
configured Borland Turbo Pascal from an included package on the CF card, and wrote and tested a small Pascal program.
Also tested unpacking and running Microsoft Basic. Editing text files using ED.

Everything seems to work.

So at least for my setup/combo of the SC114 + "missing module 61f" + CF adapter and card, I believe this patch is a valid solution.

I will continue testing the system, to further verify the solution. 

Thanks to all of you who commented on this thread, and helped me troubleshoot this issue.
I learned a lot during the process!

Regards,
Mogens

Patch-working.jpg

Bill Shen

unread,
Sep 3, 2020, 10:29:02 PM9/3/20
to retro-comp
Excellent update.

The standard RC2014 CF board needs three design changes.  The filtering of IORD is probably the most important change that should allow majority of CF disks to work.  The second changes has to do with delaying IORD and IOWR by one clock to allow proper setup time from CF select to CF read/write.  The third changes is isolating CF data bus from RC2014 data bus.  With the 3 changes in place, the CF board should work with every brand of CF disk...that's my hope.

Karl Albert Brokstad

unread,
Sep 8, 2020, 3:29:14 PM9/8/20
to retro-comp
The CF-SAGA continues.....
Here is my latest contribution. 
I do feel that I have left the simple and cheap solution... better using a dedicated IDE controller.
Karl

Screen Shot 2020-09-08 at 21.23.52.png


Screen Shot 2020-09-08 at 21.23.15.png


Mark T

unread,
Sep 8, 2020, 5:31:44 PM9/8/20
to retro-comp
Doesn’t look any more complicated than the PIO version.

But i think you don’t want to ground the output enable of the ‘245.

Mark

Tadeusz Pycio

unread,
Sep 12, 2020, 3:22:46 AM9/12/20
to retro-comp
I do feel that I have left the simple and cheap solution... better using a dedicated IDE controller

 Hi Karl,

I think it's worth it. A dedicated IDE controller is reliability, that's a good idea. Complicated, it was the GIDE known from the ZX Spectrum, but this one worked in 16 bit mode. I do not know if this solution would not be the best as a replacement for the IDE 8255 card.

PS. The buffer must be of the HC family in order to match the levels at which the CF works. Often, when reading bytes with most H states, plain HCT or CMOS(!) processor bus changed random bits to L.
Hmm... Maybe better CF power filtering would solve our problems? I didn't try that, now this thought came to me ...

Michael Dadswell

unread,
Sep 12, 2020, 5:16:49 AM9/12/20
to retro-comp
Hi Karl,

As you know,  I recently built the 72a version of this design. 
I can report that it has enabled me to use CF disks that do not work with either your 10e card or Spencer's Compact Flash Module.
This very good news as I had a small pile of previously unusable CF disks!

Great work!
Thanks,
Mike

Bill Shen

unread,
Sep 12, 2020, 8:00:55 AM9/12/20
to retro-comp
Operating in the environment of Z80, 7.37MHz, and 8-bit mode, Karl's solution should work with vast majority of CF disks

I have a SimpleCF that is like Karl's design but without the buffer.  It works with every CF disks I have.  This particular design does not work with I/O address of RC2014.  It is specifically for Simple80.
https://www.retrobrewcomputers.org/doku.php?id=builderpages:plasmo:simple80

Note C1 is 100pF capacitor, but I didn't have it at the time, so I kludge in a SMT 100pF instead.
  BillSimple80_CF.jpg

Bill Shen

unread,
Sep 12, 2020, 8:23:42 AM9/12/20
to retro-comp
In a pinch, the terminating resistors can be handwired to existing CF adapter card by removing the pins corresponding to IORD, Data0-Data7 like the first picture.

Picture 2 shows handwiring in IORD and 16 data lines (8 resistors on the bottom side)was what I did to rev1 of Tiny68K so it would work with most CF disks.  However, with different processor, 16-bit interface, and faster clock, this is not an universal solution.  There are still CF disks that Tiny68K can not work with.  --BillDSC_54990104.jpgTiny68K_rev1_fixes_comp+copy.jpg

On Saturday, September 12, 2020 at 3:16:49 AM UTC-6 Michael Dadswell wrote:

MogensB

unread,
Sep 17, 2020, 2:55:54 PM9/17/20
to retro-comp
Hi!
Today I received Karl's revised serial+storage module version 61g (thank you very much to Karl (https://www.z80.no) for sending me the updated board).
The new board works 100% in my SC114-based Z80-system (I am using the same CF adapter and CF card with CP/M as with the previous version).
As this thread describes, the revised design adds data bus resistors and capacitors for filtering.
Regards,
Mogens
--
Just a couple of photos of the new board running:
61G-1.jpg
61G-2.jpg

Reply all
Reply to author
Forward
0 new messages