Counterfeit CF Card?

596 views
Skip to first unread message

Cube Central

unread,
May 4, 2018, 11:51:30 AM5/4/18
to RC2014-Z80
Howdy All!

I wanted to ask the brain-trust here about the best way to determine if the CF card you bought is a counterfeit one.

I recently purchased what appears to be a brand-name SanDisk CF Card in 256MB capacity.  They claim to be model numbers SDCFB-256 or SDCFJ-256.  After further review, and before they've arrived, I discovered a review for the product that claims these are fake:
"This is actually a counterfeit SanDisk product It uses a Phison controller and Samsung memory instead of Sandisk controllers and Sandisk memory. Because of this, it does not follow the data sheet regarding size specifications nor does it respond to IDE commands."
and another user said about a similar item:
"The item you will get is NOT made by SanDisk . It is a cheap DaneElec brand CF-Card. The quality is very questionable.  Don't be cheated !"

Other than imaging it and simply plugging it into the RC2014 CF Module and seeing if they work, is there procedure or tool that could reveal to me the controller details and memory manufacturer? 

I simply don't have a lot of experience with CF, other than maybe installing one in a network switch/router a decade ago.  Thanks in advance for any tools or information!  Cheers!

    -Randal   (at CubeCentral)
 
 

Steve Cousins

unread,
May 4, 2018, 12:18:08 PM5/4/18
to RC2014-Z80
Hi Randal

I wrote a little program to read the embedded information in a compact flash card. The program requires my Monitor ROM to work. 

Here is the output from two apparently identical Canon camera cards. 

Not sure if this information is also faked in a counterfeit card.

Source code and hex file attached.


Small Computer Monitor - LiNC80
*Ready

*
*g8000
Compact flash card information v0.1 by Stephen C Cousins

Number of sectors on card: $00007B00
Card size: 16 MB

Card model:       "Hitachi XXM2.3.0                        "
Serial number:    "0X04 502309012710083"
Firmware version: "Rev 3.00"

Default number of cylinders:  $00F6
Default number of heads:      $0004
Default sectors per track:    $0020
Unformatted bytes per sector: $0200
*

Small Computer Monitor - LiNC80
*g8000
Compact flash card information v0.1 by Stephen C Cousins

Number of sectors on card: $00007A80
Card size: 16 MB

Card model:       "SanDisk SDCFB-16                        "
Serial number:    "    0139011I03P29553"
Firmware version: "Vdg 1.23"

Default number of cylinders:  $01EA
Default number of heads:      $0002
Default sectors per track:    $0020
Unformatted bytes per sector: $0240
SCMon_CF_Info_code8000.zip

Cube Central

unread,
May 4, 2018, 12:30:57 PM5/4/18
to RC2014-Z80
Hello Steve!

Thanks for the information!  Would you provide a bit of a walk-through on how to get your Monitor ROM running?  I have a Vanilla RC2014 system configuration - or one with the 512K RAM/ROM Module with the RomWBW image.  I see that the RomWBW boot screen allows me to boot into a "Monitor" but have no idea how it works, or if it is similar.  I very much appreciate the help!

    -Randal   (at CubeCentral)

Wayne Warthen

unread,
May 4, 2018, 12:39:06 PM5/4/18
to RC2014-Z80
Hi Randal,

Just to clarify, the "Monitor" in RomWBW is a completely different animal than Steve's Monitor.  The RomWBW monitor is very old and quirky.  There is no good documentation on it.  The commands are listed as comments in the source code.

-Wayne

Steve Cousins

unread,
May 4, 2018, 12:39:58 PM5/4/18
to RC2014-Z80
Hi Randal

The download at www.scc.me.uk includes all the development tools, source code and hex files. 

In addition it includes sample programs, like the Compact Flash information program.

But most importantly there are a number of detailed guides (PDFs) included. One deals with installing a ROM and all those jumpers, another is a user guide and then there is a tutorial.

Rather than attempt to reproduce a summary here, might I suggest you look at these documents and then come back with any questions they leave unanswered.

Sorry, I can't comment on any RomWBW or 512k RAM/ROM board issues or compatibility with my monitor, as I do not have either of these and have not yet studied them.

Steve

CubeCentral

unread,
May 4, 2018, 12:42:46 PM5/4/18
to rc201...@googlegroups.com

Steve!  I must have missed the excellent documentation on your site!  My apologies!  I will, of course, begin reading at once!  Thanks for pointing that out to me, I’m not sure how I didn’t see it before.  Cheers!

 

                -Randal   (at CubeCentral)

--
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 post to this group, send email to rc201...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/rc2014-z80/3d61151a-d079-483b-94a1-de7e578fb889%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

CubeCentral

unread,
May 5, 2018, 7:28:50 PM5/5/18
to rc201...@googlegroups.com

Steve –

 

Thanks for the awesome Small Computer Monitor as well as this neat little program!  I was able to pull the following information off the 128MB CF Card that was included as part of my RC2014 Pro Kit:

 

Compact flash card information v0.1 by Stephen C Cousins

 

Number of sectors on card: $0003E000

Card size: 128 MB

 

Card model:       "InnoDisk Corp. - iCF2000 128MB          "

Serial number:    "                    "

Firmware version: "YUAN1026"

 

Default number of cylinders:  $03E0

Default number of heads:      $0010

Default sectors per track:    $0010

Unformatted bytes per sector: $0200

 

As soon as the other (probably counterfeit) CF cards arrive Wednesday, I will plug them in and subject them to this inquiry.   I will post the results here if there is interest.

 

I am looking forward to learning more about the Monitor and its capabilities.  I happen to have a number of EPROMs here and simply programmed the SCM onto one.  Your documentation on where to set the jumpers for the 64K RAM and 64K Pageable ROM Modules was invaluable, and greatly simplified the process of getting me up and running quickly (I used the “RC2014, 64k EPROM27C512,Monitor R3” flavor).

I also enjoyed playing with the “Hello World” example in the Tutorial as it has been some time since I’ve programmed in assembly.  Isn’t it amazing how much we now take for granted when coding?

I am also looking forward to running your SCM on the LiNC80 SBC1 after it arrives and is assembled!

 

Thank you again for your significant contribution and I look forward to updates of your software endeavors!  Cheers!

 

                -Randal   (at CubeCentral)

 

 

 

 

From: rc201...@googlegroups.com [mailto:rc201...@googlegroups.com] On Behalf Of Steve Cousins
Sent: Friday, May 4, 2018 10:18
To: RC2014-Z80 <rc201...@googlegroups.com>
Subject: [rc2014-z80] Re: Counterfeit CF Card?

 

Hi Randal

--

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 post to this group, send email to rc201...@googlegroups.com.

Bill Shen

unread,
May 6, 2018, 1:16:24 AM5/6/18
to RC2014-Z80
I have a number of Sandisk 256MB that were about 15-20 years old.  I modified Steve Cousins' program to run on my Z280 SBC.  Here are the CF information for the 256MB Sandisk:

Compact flash card information v0.1 by Stephen C Cousins, modified for TinyZ280                                                                              
                                                                               
Number of sectors on card: $0007A800                                           
Card size: > 128 MB                                                            
                                                                               
Card model:       "SanDisk SDCFJ-256                       "                   
Serial number:    "    1102800E04A89241"                                       
Firmware version: "HDX 4.06"                                                   
                                                                               
Default number of cylinders:  $03D4                                            
Default number of heads:      $0010                                            
Default sectors per track:    $0020                                            
Unformatted bytes per sector: $0240

To unsubscribe from this group and stop receiving emails from it, send an email to rc2014-z80+unsubscribe@googlegroups.com.

Steve Cousins

unread,
May 6, 2018, 4:04:38 AM5/6/18
to RC2014-Z80
Hi Randal

Thank you for the very kind words. It is great to hear from people who are finding my efforts useful or fun.

Please do post further scan results. It might be informative to see the range of different card details out there in the wild.

Yes, we do take for granted the thousands of lines of code it takes on a modern computer to do the simplest of things.

The LiNC80 SBC1 is a great retro system. You won't be disappointed.

Steve

To unsubscribe from this group and stop receiving emails from it, send an email to rc2014-z80+unsubscribe@googlegroups.com.

Steve Cousins

unread,
May 6, 2018, 4:13:04 AM5/6/18
to RC2014-Z80
Hi Bill

Hopefully it was not too much hassle modifying the program.

Interesting to see that your card claims to have 0x0240 unformatted bytes per sector. I have at least one card that also claims this. Most seem to have just the 0x0200 bytes. Seems a shame to waste that extra 0x0040 bytes, so what to do with them???

I've googled TinyZ80 SBC and found this:
https://www.retrobrewcomputers.org/forum/index.php?t=getfile&id=789&

Is this the SBC you have? If not could you point me to more info.

Steve

G Kr

unread,
May 6, 2018, 5:18:29 AM5/6/18
to RC2014-Z80
Hi,
I can also contribute a 128 MB CF card. I was hoping to use them in the RC2014. However, I can not copy the image of the original card on it - at least not directly, because the card is a few bytes less large. Since one thinks 128 MB is 128 MB ... far from it. Since I am still looking for a useful way to use the card yet.


Compact flash card information v0.1 by Stephen C Cousins

Number of sectors on card: $0003A900
Card size: 128 MB

Card model:       "SFCF0128H1BK1TO-I-MS-553-SMA            "
Serial number:    "0000063165491B001089"
Firmware version: "100511  "

Default number of cylinders:  $03A9
Default number of heads:      $0008

Default sectors per track:    $0020
Unformatted bytes per sector: $0200

Manufacturer: Swissbit, bought at Mouser

Incidentally, the monitor and the small additional tools are great tools. Many thanks to the developers. Well, as to all those who develop hard- and software here and provide ... also with all the documents that are needed. Where are you just taking the time ... but I do not want to digress.

Gerd

Steve Cousins

unread,
May 6, 2018, 5:56:38 AM5/6/18
to RC2014-Z80
Hi Gerd

Thanks for the Compact Flash info. It seems every card is different.

I have not yet tried copying a whole Compact Flash card as I don't have a Compact Flash adaptor for my PC (yet).

I have used Compact Flash cards I happen to have from old cameras.

Initially I used all Grant Searle's tools: Format, PutSys and Download.com. This is all documented on his website and allows you to create a complete CP/M set up.

Since then I have been adapting code to make it easier to use with SCMonitor. I have produced, and included with the SCMonitor download, a PutSysPlus utility to write CP/M to the compact disk with only one file rather than three. I am currently working on a more flexible format program. My goal is to provide a set of tools to work with SCMonitor which make CP/M easier to set up and use.

I understand there are tools for PC (and similar) to do this, so perhaps I should get a Compact Flash adaptor and use those. But where's the fun in that.

Steve

G Kr

unread,
May 6, 2018, 6:45:15 AM5/6/18
to RC2014-Z80
Hi Steve,
no question, you're doing great.

I've been away from CP/M for too long, but the way back is interesting and fun. In order not to have to reinvent every bit, I'm happy about a few working hardware and software elements.
Our first home-made computer got the CP/M from Cassette (Tape) ... no one wants that today, but it was exciting when it was loaded for the first time.
Now it comes from CF-card ... wonderful ... unimaginable at that time.
I am looking forward to further experience in combining new and old technology.
Gerd

Spencer Owen

unread,
May 6, 2018, 7:00:16 AM5/6/18
to rc201...@googlegroups.com

On Sun, 6 May 2018, 10:18 G Kr, <krie...@gmail.com> wrote:
Hi,
I can also contribute a 128 MB CF card. I was hoping to use them in the RC2014. However, I can not copy the image of the original card on it - at least not directly, because the card is a few bytes less large. Since one thinks 128 MB is 128 MB ... far from it. Since I am still looking for a useful way to use the card yet.

If you use Win32DiskImager to copy the image across, it will warn you about not having enough sectors on the target, but will allow you to copy them anyway.   From the testing I have done, this will work fine, although the P drive won't have it's full capacity, and might crash if you exceed what is actually available.

I'd love to know if anybody has already filled up drive A - O with software and needs all the space on P too :-)

Spencer 

Bill Shen

unread,
May 6, 2018, 7:25:06 AM5/6/18
to RC2014-Z80
Steve,
I find your program very well organized and easy to modify.  I used ZMAC assembler and your code is mostly compatible except the local label @loop.  The main program is mostly unmodified except I skipped over the CF presence detect.  The UART API is replaced with direct I/O.  My CF interface is 16-bit wide and located on a different I/O page so that's completely different.  I did have to do byte-swap of the 16-bit data.  That was awkward.

That old picture of TinyZ280 has static RAM and no DRAM.  What I have now has no static RAM but with a 4meg or 16 meg SIMM memory stick.  Here is a better starting page:
https://www.retrobrewcomputers.org/doku.php?id=builderpages:plasmo:tinyz280:final_step
Forum discussion about it here:
https://www.retrobrewcomputers.org/forum/index.php?t=msg&th=255&start=0&

I've redesigned the board, making it smaller, replacing the SIMM memory stick with a 2meg DRAM, and adding the RC2014 connector.  Should receive the pc board this week.  It is renamed to TinyZZ.  The original intent was a SBC slice that plugs directly into a solderless breadboard to assist me with experimentation, but then I discovered RC2014 a month ago.  That changed everything.  I'm new to the Z80 family (don't even have a Z80 right now) I have much to learn.

  Bill

Bill Shen

unread,
May 6, 2018, 7:53:46 AM5/6/18
to RC2014-Z80
Steve,
Attached is the modified program for Z280.

Thank you for your software.  As a part of my CF compatibility study, I bought over 80 used, assorted lots of CF off eBay from 64meg to 4G.  98% of them worked with Tiny68K and TinyZ280.  I have about 100 CF total and I'm curious to find more info about them.


  Bill

On Sunday, May 6, 2018 at 2:13:04 AM UTC-6, Steve Cousins wrote:
CF_info.zip

Steve Cousins

unread,
May 6, 2018, 7:59:02 AM5/6/18
to RC2014-Z80
Bill, that's a lot of memory.

Looks a really capable bit of kit. If you are going to make the design available for other builders and it has an RC2014 bus, then it belongs on the list of RC2014 compatible products. I trust you will keep us informed of progress.

I arrived here in RC2014 land in a similar way. I had some crazy idea about getting back into retro tech and building my own system. Then I found the RC2014 and like you say it changed everything. In my case I decided it was much better to start with some working kit and build from there. So I got my RC2014 and ended up spending my time writing software, so still haven't got far on the 'build my own hardware' front. I did build a simple Z80 motherboard with two RC2014 expansion sockets, but nothing like as powerful as your system.

I'm glad you had fun modifying my program.

Steve

Steve Cousins

unread,
May 6, 2018, 8:12:17 AM5/6/18
to RC2014-Z80
Bill, thanks for the source. I've had a quick look over it. Amazing how many different ways there are to cook an egg!

On the CF busy test, the data I read said the Busy bit is not the same thing as the [not] Ready bit and advised checking both bits. They event indicated testing one after the other. Thus my busy test function is different from yours. Not sure if the difference is significant.

You do seem to like lots of memory. All those CF cards as well as all that RAM. Careful you don't tarnish your retro credentials!!

Steve

Bill Shen

unread,
May 6, 2018, 8:26:36 AM5/6/18
to RC2014-Z80
Steve,
Z280 can address up to 16meg and 16meg SIMM is dirt cheap, so I thought 'why not'.  After that's done, I can't find a way to use 16 meg (other than big RAMdisk) so finally I settled down to 2 meg.

I'd love to offer the TinyZZ to the RC2014 community.  I will publish all the design information.  The problem is the CPLD is a SMT component at 0.65mm pitch, not easy for the regular hobbyists to assemble.  I can certainly assemble boards and offer them as assembled/tested boards, but I don't know how many people are interested in that.
  Bill

G Kr

unread,
May 6, 2018, 9:57:28 AM5/6/18
to RC2014-Z80
Hi Spencer,
(and as an info also to all others who might have to do it)

although it may not require confirmation: With Win32DiskImager I was able to clone the original CF card.

Thanks for the hint. Having a backup always makes sense.
I probably did something wrong on the first try ... or, I used Unixtools, which might not do what they should on a Win PC.
More likely, however, the error is 30 cm (or 15 inches) in front of the monitor. :-)

The table of contents is displayed correctly until O:. P: then no more,
"A>dir p:
P:   :   :   :  "
But that's more than you can expect.

Gerd

G Kr

unread,
May 6, 2018, 10:26:32 AM5/6/18
to RC2014-Z80
Hi Bill,
I am interested in the board when it is connectable to the RC2014 bus.
Gerd

CubeCentral

unread,
May 6, 2018, 10:31:13 AM5/6/18
to rc201...@googlegroups.com

Hi Bill – thanks for the information.  As I have some “SanDisk” 256MB cards en route, this was of interest to me.  I will post this program’s results when they arrive.

 

Steve - I see that it is showing “Card size: > 128 MB”  - is that due to a limit in software – something like too large of an integer to store in a couple of bytes?  Would there be a way for it to show the actual size of the card?  Thanks again!

To unsubscribe from this group and stop receiving emails from it, send an email to rc2014-z80+...@googlegroups.com.


To post to this group, send email to rc201...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/rc2014-z80/41ea45cc-1358-407f-a573-b30a41563f05%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--

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 post to this group, send email to rc201...@googlegroups.com.

Steve Cousins

unread,
May 6, 2018, 11:36:55 AM5/6/18
to RC2014-Z80
Hi Randal

The "> 128 MB" was just to save me the trouble of accounting for larger cards than the limit used by CP/M. As far as our CP/M systems are concerned anything over 128 MB is ignored, so I did not consider it important to state their actual size.

It would be possible to extend this in the program. As it seems to be of general interest here, I'll aim to extend the program soon'ish. Busy on a more flexible and more robust CF Format program at he moment.

Steve


To unsubscribe from this group and stop receiving emails from it, send an email to rc2014-z80+unsubscribe@googlegroups.com.


To post to this group, send email to rc201...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/rc2014-z80/41ea45cc-1358-407f-a573-b30a41563f05%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
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+unsubscribe@googlegroups.com.

CubeCentral

unread,
May 6, 2018, 11:45:55 AM5/6/18
to rc201...@googlegroups.com

Hi Steve!  Thanks for your quick reply.

I totally understand the limitation and it makes complete sense.  I intentionally picked up the 256MB cards rather than the 128MB cards to potentially save me from the issue Gerd was having, a failure to image the card due to it being a few bytes too small for the RC2014 image.

 

Looking forward to seeing what additions you can make to it, once you have some time – of course!  :)   Cheers!

 

                -Randal   (at CubeCentral)

 

 

From: rc201...@googlegroups.com [mailto:rc201...@googlegroups.com] On Behalf Of Steve Cousins
Sent: Sunday, May 6, 2018 09:37
To: RC2014-Z80 <rc201...@googlegroups.com>
Subject: Re: [rc2014-z80] Re: Counterfeit CF Card?

 

Hi Randal

To unsubscribe from this group and stop receiving emails from it, send an email to rc2014-z80+...@googlegroups.com.


To post to this group, send email to rc201...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/rc2014-z80/41ea45cc-1358-407f-a573-b30a41563f05%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
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 post to this group, send email to rc201...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/rc2014-z80/71beed3e-c92c-4526-a3da-5f3569829733%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--

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 post to this group, send email to rc201...@googlegroups.com.

Cube Central

unread,
May 9, 2018, 7:18:33 PM5/9/18
to RC2014-Z80
I used Steve's program to test the three CF cards I ordered and they all reported variations on the following:

Compact flash card information v0.1 by Stephen C Cousins

Number of sectors on card: $0007A800
Card size: > 128 MB

Card model:       "SanDisk SDCFB-256M                      "
Serial number:    "3__________________4"
Firmware version: "Ver2.35 "

Default number of cylinders:  $03D4
Default number of heads:      $0010
Default sectors per track:    $0020
Unformatted bytes per sector: $0200

Thanks to that program, I am very confident that these are not counterfeit cards.  I performed some additional testing with them and they all will work perfectly for my application.  Well done Steve!

    -Randal   (at CubeCentral)


KHWP

unread,
May 10, 2018, 9:06:35 AM5/10/18
to RC2014-Z80
Hmmm, I bought a Compact Flash card on Ebay - my test using Steve's program looks a bit suspect.  The card has a "Fujifilm 128Mb (20x)" sticky label.  I was able to format it (FAT) and read/write using Mac/OSX finder file copy.   I aim to test it over the weekend on my RC2014.

*g8000
Compact flash card information v0.1 by Stephen C Cousins

Number of sectors on card: $5903EA00
Card size: > 128 MB

Card model:       "YF 1Y8MBY   Y   Y   Y   Y   Y   Y   Y   "
Serial number:    "HG3YBACY0F0Y250Y003Y"
Firmware version: "Y5/1Y/15"

Default number of cylinders:   $59EA
Default number of heads:       $5908
Default sectors per track:        $0020
Unformatted bytes per sector: $5900

Steve Cousins

unread,
May 10, 2018, 9:22:22 AM5/10/18
to RC2014-Z80
Yes, those numbers look all wrong.

Way too many sectors, cylinders, heads and bytes per sector.

The card model string does not fill me with confidence either.

I'm working on an improved version of the program which I hope to post in a few days.

Steve

KHWP

unread,
May 10, 2018, 12:54:40 PM5/10/18
to RC2014-Z80
Steve, 
I think the trouble was the disk wasn't formatted - I used Grant Searle's formatter and all seems well.
Kevin

*g5000
CP/M Formatter by G. Searle 2012
ABCDEFGHIJKLMNOP
Formatting complete
*
*Ready

*
*g8000
Compact flash card information v0.1 by Stephen C Cousins

Number of sectors on card: $0003EA00
Card size: 128 MB

Card model:       "F 18MB                        "
Serial number:    "HG3BAC0F0250003"
Firmware version: "5/1/15"

Default number of cylinders:  $00EA
Default number of heads:      $0008
Default sectors per track:    $0020
Unformatted bytes per sector: $0000

Steve Cousins

unread,
May 10, 2018, 4:12:01 PM5/10/18
to RC2014-Z80
I've made some improvements to my Compact Flash tools.

Attached are two programs and their source files.

Both are written as Apps for the Small Computer Monitor v1.0, so you need the Monitor ROM installed to use them. The hex file is 'sent' to the RC2014 or LiNC80 from a terminal program and is started with the monitor command "G 8000"

Two programs are included: CF Format and CF Info

Both include the recommended status checking and error testing, so should be more reliable and informative that most of the Compact Flash code we normally use. That assumes the code works properly of course!

Both now identify cards from 1MB to 2TB, although I've only been able to test a few sizes.

Format will format cards of 8MB or more. Space above 128MB is not used by CP/M. Also the CP/M cbios versions we use are only configured for 64MB or 128MB, but you can use other sizes with a few caveats. See the ReadMe for more info.

I'd be interested in how well these work with different cards.

Steve



CF Tools.zip

KHWP

unread,
May 10, 2018, 4:57:20 PM5/10/18
to RC2014-Z80
Steve,

Results for Card 1 - supplied with my RC2014 CF board/kit:-

*G8000
Compact flash card information v0.2 by Stephen C Cousins
Number of sectors on card: $0003DC50
Card size: 128MB

Card model:       "InnoDisk Corp. - iCF2000 128MB          "
Serial number:    "                    "
Firmware version: "YUAN1026"
Default number of cylinders:  $00FB

Default number of heads:      $0010
Default sectors per track:    $003F

Unformatted bytes per sector: $0200
Card's self diagnostic test passed

Now Card 2 - (from Ebay Fujifilm)  - format first

*g8000
Compact Flash card format v0.2 by Stephen C Cousins
Card size: 1TB
Number of logical drives to format: 16
WARNING: Format will erase all data from the card
Do you wish to continue? (Y/N)
Formatting drives: ABCDEFGHIJKLMNOP
Verifying drives:  ABCDEFGHIJKLMNOP
Formatting complete
*
Note Card size of 1TB ????

Now diagnostic test

*g8000
Compact flash card information v0.2 by Stephen C Cousins

Number of sectors on card: $0003EA00
Card size: 128MB
Card model:       "F 18MB                        "
Serial number:    "HG3BAC0F0250003"
Firmware version: "5/1/15"
Default number of cylinders:  $00EA
Default number of heads:      $0008
Default sectors per track:    $0020
Unformatted bytes per sector: $0000
Card's self diagnostic test passed

Hope this helps (I wonder where the 1TB came from!)

Kevin

Steve Cousins

unread,
May 10, 2018, 5:20:50 PM5/10/18
to RC2014-Z80
Hi Kevin

Thanks for those results.

It appears that the information the card returns depends on the formatting. I'll have to have another read of the documentation and see what I'm missing. There must be something in all the identification information the cards provide that does not depend on the formatting, otherwise no reader would be able to determine the size reliably. I guess I've not selected the right bytes, so back to the drawing board.

There does seem to be something odd about your second card though as the bytes per sector is zero. You should be able to multiply cylinders x heads x sectors per track x bytes per sector, to get the number of bytes on the card.

Your earlier test result gave "Number of sectors on card: $5903EA00" which is a very large number of sectors and probably equates to 1TB. 

Thanks again

Steve

KHWP

unread,
May 10, 2018, 5:36:31 PM5/10/18
to RC2014-Z80
Hello Steve,

Yes, I think Card 2 - the Ebay FujiFilm is faulty as I can't load CP/M (neither by HEX loading nor an img).  Card 1 - the one supplied with the RC2014 was perfect.  It's strange because although I can't get CP/M to load on Card 2, I can format (FAT16) and copy files to and from my PC - nevermind I've ordered another so better luck with that when it arrives.

Thanks
Kevin

Bill Shen

unread,
May 11, 2018, 12:26:39 AM5/11/18
to RC2014-Z80

Here are CF info of 18 different types of CF I have on hand.  The data are collected using v0.1 of Steve Cousins software, modified for TinyZ280:
-----------------------------
Compact flash card information v0.1 by Stephen C Cousins, modified for TinyZ280
------------------------------
SanDisk 64MB

Number of sectors on card: $0001EA00
Card size: 64 MB

Card model:       "SanDisk SDCFJ-64                        "
Serial number:    "    1062401H04T61515"
Firmware version: "HDX 4.03"


Default number of cylinders:  $01EA
Default number of heads:      $0008
Default sectors per track:    $0020
Unformatted bytes per sector: $0240
-------------------------------
SanDisk 128MB standard grade (#81)

Number of sectors on card: $0003D400
Card size: 128 MB

Card model:       "SanDisk SDCFB-128                       "
Serial number:    "    1145121K08W46350"
Firmware version: "HDX 2.15"


Default number of cylinders:  $03D4
Default number of heads:      $0008
Default sectors per track:    $0020
Unformatted bytes per sector: $0240
-----------------------------
SanDisk 256MB


Number of sectors on card: $0007A800
Card size: > 128 MB

Card model:       "SanDisk SDCFJ-256                       "
Serial number:    "    1102800E04A89241"
Firmware version: "HDX 4.06"

Default number of cylinders:  $03D4
Default number of heads:      $0010
Default sectors per track:    $0020
Unformatted bytes per sector: $0240
----------------------------
SanDisk 128MB (#17)

Number of sectors on card: $0003D400
Card size: 128 MB

Card model:       "SanDisk SDCFH-128                       "
Serial number:    "    2080802G03M41221"
Firmware version: "FhDA0145"


Default number of cylinders:  $03D4
Default number of heads:      $0008
Default sectors per track:    $0020
Unformatted bytes per sector: $0240
-----------------------------
SanDisk 512MB

Number of sectors on card: $000F45F0
Card size: > 128 MB

Card model:       "SanDisk SDCFJ-512                       "
Serial number:    "    1102211E04F73240"
Firmware version: "HDX 4.03"

Default number of cylinders:  $03E1

Default number of heads:      $0010
Default sectors per track:    $003F
Unformatted bytes per sector: $0240
----------------------------
Cisco 64MB (#23)

Number of sectors on card: $0001EA00
Card size: 64 MB

Card model:       "STI Flash 8.0.0                         "
Serial number:    "S ITM1b8043725902094"
Firmware version: "06/20/07"


Default number of cylinders:  $01EA
Default number of heads:      $0008
Default sectors per track:    $0020
Unformatted bytes per sector: $0000
------------------------------
CISCO 128MB (#13)

Number of sectors on card: $0003E000
Card size: 128 MB

Card model:       "UGB30SHP0128F6-ESX-1SD                  "
Serial number:    "NUGINE      04204009"
Firmware version: "FW100924"


Default number of cylinders:  $03E0
Default number of heads:      $0008
Default sectors per track:    $0020
Unformatted bytes per sector: $0200
-----------------------------
CISCO 128MB (#14)

Number of sectors on card: $0003D200
Card size: 128 MB

Card model:       "TOSHIBA THNCF128MDG                     "
Serial number:    "STCB21M86014T12300A0"
Firmware version: "3.00    "

Default number of cylinders:  $03D2

Default number of heads:      $0008
Default sectors per track:    $0020
Unformatted bytes per sector: $0210
-----------------------------
Cisco systems 256MB (#56)

Number of sectors on card: $0007A400
Card size: > 128 MB

Card model:       "TOSHIBA THNCF256MDG                     "
Serial number:    "STCB52M6501XW99893A7"
Firmware version: "3.00    "

Default number of cylinders:  $03D2

Default number of heads:      $0010
Default sectors per track:    $0020
Unformatted bytes per sector: $0210
----------------------------
Silicon Systems 4GB SSD-C04G-3500

Number of sectors on card: $007DE860
Card size: > 128 MB

Card model:       "SILICONSYSTEMS INC 4GB                  "
Serial number:    "9B5213DD3WGQ9081ZT20"
Firmware version: "241-0230"

Default number of cylinders:  $1FFA

Default number of heads:      $0010
Default sectors per track:    $003F
Unformatted bytes per sector: $0200
------------------------
XceedCF Smart Modular Technologies

Number of sectors on card: $007A1FC0
Card size: > 128 MB

Card model:       "SMART CF                                "
Serial number:    "02900113503904660466"
Firmware version: "FX080905"

Default number of cylinders:  $1F04

Default number of heads:      $0010
Default sectors per track:    $003F
Unformatted bytes per sector: $0200
------------------------------
Photo Steno 128MB (#54)

Number of sectors on card: $0003D100
Card size: 128 MB

Card model:       " 128MB Flash Card                       "
Serial number:    "          0F10217793"
Firmware version: "CFBA217I"

Default number of cylinders:  $03D1

Default number of heads:      $0008
Default sectors per track:    $0020
Unformatted bytes per sector: $0200
----------------------------
PNY 1G (#57)

Number of sectors on card: $001E87F0
Card size: > 128 MB

Card model:       "TOSHIBA THNCF1G02PG                     "
Serial number:    "STCBG1205016B53272C9"
Firmware version: "1.00    "

Default number of cylinders:  $07C1

Default number of heads:      $0010
Default sectors per track:    $003F
Unformatted bytes per sector: $0210
------------------------------
Toshiba 256MB ($58)

Number of sectors on card: $0007A400
Card size: > 128 MB

Card model:       "TOSHIBA THNCF256MDG                     "
Serial number:    "STCB52M6501XW99893A7"
Firmware version: "3.00    "

Default number of cylinders:  $03D2

Default number of heads:      $0010
Default sectors per track:    $0020
Unformatted bytes per sector: $0210
--------------------------------
Silicon Systems 512MB (#55)

Number of sectors on card: $000F8CD0
Card size: > 128 MB

Card model:       "SILICONSYSTEMS INC 512MB                "
Serial number:    "9B22136DZ3QWB040R030"
Firmware version: "V2.27d  "

Default number of cylinders:  $03F3

Default number of heads:      $0010
Default sectors per track:    $003F
Unformatted bytes per sector: $0200
--------------------------------
Transcend 128MB (#4)

Number of sectors on card: $0003D860
Card size: 128 MB

Card model:       "PIO                                     "
Serial number:    "02904031    4C7207AF"
Firmware version: "20071116"

Default number of cylinders:  $00FA

Default number of heads:      $0010
Default sectors per track:    $003F
Unformatted bytes per sector: $0240
----------------------------
No brand 128MB (#19)
Number of sectors on card: $0003D800
Card size: 128 MB

Card model:       "LEXAR ATA FLASH                         "
Serial number:    "21128203011999900141"
Firmware version: "V1.02   "

Default number of cylinders:  $03D8

Default number of heads:      $0008
Default sectors per track:    $0020
Unformatted bytes per sector: $0200
-----------------------------
SimpleTech 128MB

Number of sectors on card: $0003D200
Card size: 128 MB

Card model:       "Hitachi XXM2.3.0                        "
Serial number:    "0X38 102506010216081"
Firmware version: "Rev 3.00"

Default number of cylinders:  $03D2

Default number of heads:      $0008
Default sectors per track:    $0020
Unformatted bytes per sector: $0200

KHWP

unread,
May 11, 2018, 3:10:22 AM5/11/18
to RC2014-Z80
Steve,
If it would help I'm happy to post the faulty card to you - just private message your postal address.   Otherwise it's going in the bit-bucket.
Kevin

Steve Cousins

unread,
May 12, 2018, 3:57:51 AM5/12/18
to RC2014-Z80
Hi Bill

Thanks for all those results.

One of your cards shows zero bytes per sector. I've done a bit more digging and found the bytes per sector value is now considered obsolete, which I guess explains the odd numbers found there. It is now assumed that there will always be 512 bytes per sector.

Otherwise your card data seems to make sense.

I'll remove the bytes per sector value from the output in the next version of the program.

Steve

Steve Cousins

unread,
May 12, 2018, 4:04:32 AM5/12/18
to RC2014-Z80
Hi Kevin

As mentioned above, it turns out the bytes per sector value is now considered to be obsolete, so a value of zero is not an error.

The incorrect size value might be simply due to the fact that the card appears to be faulty, but having it correct after formatting is interesting. From what I have read so far I would not have expected that.

I think I will write a Compact Flash test program to write and read back a variety of test patterns. It could be a useful utility to have. So yes please, if you don't mind posting it, it will give me something to test my code on. I'll contacting you privately.

Steve

Bill Shen

unread,
May 12, 2018, 7:02:28 AM5/12/18
to RC2014-Z80
Steve,

I'm setting aside these 18 CF for regression tests of CF interfaces.  It is my experience that CF interface, especially the 16-bit mode, are prone to data corruption.  The corruption is data pattern sensitive, load capacitance sensitive, occurred on read, and highly dependent on the brand of CF.  I've added filters and terminating resistors to my CF interface which solved the data corruption problem for the 18 types of CF, but I'm always worried when I changed the design and layout.  Having an assortment of CF is a way of checking out the robustness of the CF interface; having a robust CF test program is even better.  Right now I have 2 tests: pip with verify and sector read with comparison to the previous sector read.  I avoid writing too much to CF because I *think* the data corruption occurred on read and because I worried about wearing out the limited endurance memories.  While concerning about wearing out the CF, I should mention that most my CF were purchased off eBay used and I've not encountered failures due to wearing with all the testings I've done.  In fact I've had no failures with these eBay used CF disks at all, once I solved the data corruption issue.

I'm very interested in your implementation of the CF test.

  Bill

Bill Shen

unread,
May 12, 2018, 8:00:44 AM5/12/18
to RC2014-Z80
Steve,

I thought I include the pictures of CF interface of the prototype RCZ280 (I know the silkscreen says "TinyZZ", but I'm changing it to RCZ280 because it is intended for RC2014).  This is a bus-connected interface, i.e. 16-bit CPU data bus connected directly to CF data bus.  The 100-ohms series terminating resistors, RC filter for nIORD control line, and pull-up resistors for half of  the 16-bit data bus are the circuitry I needed to eliminate data corruption.  The same circuitry are used successfully for TinyZ280 and Tiny68K.

I should mention that I've designed a 16-bit CF interface using 82C55 in a 68000 system.  It has greatly reduced the occurrence of data corruption, but still has problems with certain brand of CF.  A comprehensive CF diagnostic plus an assortment of CF disks are needed to check out the interface.


  Bill

On Saturday, May 12, 2018 at 2:04:32 AM UTC-6, Steve Cousins wrote:
TinyZZ_CF_interface_bottom copy.jpg
TinyZZ_CF_interface_top copy.jpg

Steve Cousins

unread,
May 12, 2018, 1:15:53 PM5/12/18
to RC2014-Z80
Hi Bill

It sounds like you have had lots of fun with compact flash cards.

I've attached my first attempt at a compact flash test program. Also included are updates to my other compact flash tools.

If you have any suggestions for tests I'd be very interested to hear them.

Steve
CF Tools.zip

Bill Shen

unread,
May 13, 2018, 6:17:44 AM5/13/18
to RC2014-Z80
Steve,
Instead of hacking on your code to fit my tools and hardware, perhaps it is time to port SC Monitor to my Z280 SBC.  Is there an existing topic for adding new hardware to SC Monitor?
  Bill

Steve Cousins

unread,
May 13, 2018, 6:31:05 AM5/13/18
to RC2014-Z80
Hi Bill

There isn't much documentation for porting SCM to other hardware or adding hardware support to SCM. What there is can be found in the ReadMe.txt file in the SCMonitor folder of the distribution package at www.scc.me.uk

The source code is modular and well split into hardware independent and hardware dependent sections. The hardware dependent sections are relatively small and should be reasonably easy to modify or replace.

The main source file (!main.asm) deals with conditional compilation for different hardware.

If you have a look at the source and see what you think, we can then discuss how to move forward.

Steve

Bill Shen

unread,
May 13, 2018, 7:05:25 AM5/13/18
to RC2014-Z80
I've downloaded your software and played with the assembler and examined its output.  You have very nice documentations, but I was looking for a porting guide and didn't find it.  I like to create a sub-folder for the Z280 SBC and follow your existing template for adding hardware to SC Monitor.

What I like to start off is treating SC Monitor as an application that I can load into memory.  My Z280 SBC (I'll now call it RCZ280) has no ROM.  There is a hardware-assisted multistage booting process that loads a small monitor (I'll refer it as ZZMon) from CF into RAM from 0x400.  The top of the ZZMon program (stack) is at 0xFFF.  ZZMon does not use interrupts, page 0 (0x0-0xFF) is not used by ZZMon.  SC Monitor can start from 0x1000 and initialize page 0 for its use.  ZZMon has a Intel Hex loader that can load SC Monitor.

Z280 is downward compatible with Z80 but the I/O structure is slightly different.  There are 16 addresses for I/O devices so up to 65536 devices can be addressed.  The upper byte of I/O address is controlled by an I/O page register.  The lower byte of the I/O address is the standard Z80 I/O address controlled by the IN and OUT instructions.   The internal UART is used as console located at I/O page 0xFF.  CF interface is external to Z280 located at I/O page 0x0.  There is a small piece of code that switches I/O page register depending on whether I want to use CF or UART.  There are many more internal I/O resources (MMU, DMA, timers) and external I/O resources (on-board SPI, I2C, off-board RC2014 I/O devices) but once the structure for switching I/O page is in place, these resources can be accessed in similar manner.

  • SC Monitor can be relocated by changing kCode variable,
  • Z280 UART in polling mode is simple to set up and interface
  • CF interface is 16-bit, but most registers are addressed as 8-bit devices.  The 16-bit data register requires Z280 extended instruction to access, but it is just one instruction that can be done with in-line constant.
  • The manipulation of the I/O page register is the only thing out of ordinary.  The code for it looks like this:
; init page i/o reg to point to compactflash
CFPage:
    push bc        
; save register
    push hl
    ld c
,08h        ; reg c points to I/O page register
    ld l
,0        ; set I/O page register to 0
    db
0edh,6eh    ; this is the op code for LDCTL (C),HL
;    ldctl (c),hl    ; write to I/O page register
    pop hl        
; restore reg
    pop bc
    ret

; init page i/o reg to point to UART
UARTPage:
    push bc        
; save register
    push hl
    ld c
,08h        ; reg c points to I/O page register
    ld l
,0feh        ; set I/O page register to 0xFE
    db
0edh,6eh    ; this is the op code for LDCTL (C),HL
;    ldctl (c),hl    ; write to I/O page register
    pop hl        
; restore reg
    pop bc
    ret



I need guidance in setting up a proper framework for new hardware and what to do about manipulating the I/O page register.  Thanks,
  Bill

Steve Cousins

unread,
May 13, 2018, 7:24:29 AM5/13/18
to RC2014-Z80
Bill

I've taken the liberty of moving this to a new topic.

Steve

Bill Shen

unread,
May 13, 2018, 7:27:25 AM5/13/18
to RC2014-Z80
I should add that RCZ280 is working well.  I've built up 5 boards and they all working the same way.  CF interface works with every brand & size of CF I have on hand.  2-meg RAM diagnostic passes, CP/M2.2 is running as well as CP/M3 (non-banked version).  Xmodem is working fine.  I can even play Zork ;-)

I have no RC2014 modules other than the 5-slot backplane, so I'm unable to check out how it interface to other RC2014 modules.  Since RCZ280 already have clock, memory and CF, I only want to interface to other RC2014 I/O modules (music, dual serial, etc).  I'll also need helps in this area. 

  Bill

PS, love to port z88dk to it as well, but I need to grow a smarter brain first.

CubeCentral

unread,
May 13, 2018, 8:47:59 AM5/13/18
to rc201...@googlegroups.com

Bill,

 

If there is any testing I could help with, please let me know.  I have all of the RC2014 modules here, and would be happy to check out how they work with the RCZ280.  Feel free to e-mail me directly.

 

Incidentally, if the top of the ZZMon program (stack) is at 0xFFF, would that make it ZZTop??  :)

 

                -Randal   (at CubeCentral)

 

From: rc201...@googlegroups.com [mailto:rc201...@googlegroups.com] On Behalf Of Bill Shen
Sent: Sunday, May 13, 2018 05:27
To: RC2014-Z80 <rc201...@googlegroups.com>
Subject: [rc2014-z80] Re: Counterfeit CF Card?

 

I should add that RCZ280 is working well.  I've built up 5 boards and they all working the same way.  CF interface works with every brand & size of CF I have on hand.  2-meg RAM diagnostic passes, CP/M2.2 is running as well as CP/M3 (non-banked version).  Xmodem is working fine.  I can even play Zork ;-)

--

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 post to this group, send email to rc201...@googlegroups.com.

Bill Shen

unread,
May 13, 2018, 11:24:08 PM5/13/18
to RC2014-Z80
Randal,
Thanks for your generous help.  I'm still a few weeks from sending out prototype hardware.  I'll contact you when I'm ready to talk to real hardware.

So that explains why when ZZMon stack underflow it prints:
"I been up, I been down
Take my word, my way around"

  Bill

To unsubscribe from this group and stop receiving emails from it, send an email to rc2014-z80+unsubscribe@googlegroups.com.

Reply all
Reply to author
Forward
0 new messages