Keyboard Shortcuts
Likes
- Z80MC
- Messages
Search
Re: Changes to Z80MC?
Woops, I see that 86h is valid as well now. :). Thanks for confirming what I thought about 0Eh! -Frank On Sun, Apr 27, 2025, 8:26?PM joshbensadon via <joshbensadon=[email protected]> wrote:
|
Re: Changes to Z80MC?
Hi Frank, Yes, partition type 0x0E does work and indeed the firmware should be updated to include this partition type. At the time, only types 4, 6 and 0x86 where identified as valid FAT16.?? If you read the code again, you will see there is a JP? NZ after CP 86h. Cheers, Josh
On Sunday, April 27, 2025 at 04:49:45 p.m. EDT, Frank Palazzolo via groups.io <frank@...> wrote:
Hi, This is an idea for a small change to the Z80MC firmware.? I did it on mine a while ago and it helped me at the time. I had formatted my SDCARD?from windows, and had a hard time booting off of it.? I can't remember which windows, but it was probably Windows 10. (Has anyone else had this problem?) It turned out that my FAT16 format was of type SD_PART_TYPE = 0Eh. This is a slightly?modern variant of FAT16, but I think it works fine with the rest of the Z80MC disk routines. The current firmware allows SD_PART_TYPE?4 or 6, and disallows type 86h: 2306 ?32 16FF ? ? ? ? ? LD (SD_PART_TYPE), A 2309 ?FE 04 ? ? ? ? ? ? CP 4 230B ?28 09 ? ? ? ? ? ? JR ? Z, INITFAT_PGOOD 230D ?FE 06 ? ? ? ? ? ? CP 6 230F ?28 05 ? ? ? ? ? ? JR ? Z, INITFAT_PGOOD 2311 ?FE 86 ? ? ? ? ? ? CP 86h 2313 ?C2 6624 ? ? ? ? ? JP ?NZ, INITFAT_FAIL I added one more case for 0Eh, and that allowed me to boot off of the card. If this firmware change is legit/correct, and?it makes it easier for Windows users, perhaps it would be good to go in with the next firmware update. You can read more about this FAT16 version here: But I have excerpted the relevant part here: Prior to 1995, versions of DOS accessed the disk via??addressing only. When?(MS-DOS 7.0) introduced??disk access, partitions could start being physically located outside the first c. 8?GB of this disk and thereby out of the reach of the traditional CHS addressing scheme. Partitions partially or fully located beyond the CHS barrier therefore had to be hidden from non-LBA-enabled operating systems by using the new partition type? ?in the partition table instead. FAT16 partitions using this partition type are also named?FAT16X.?The only difference, compared to previous FAT16 partitions, is the fact that some CHS-related geometry entries in the BPB record, namely the number of sectors per track and the number of heads, may contain no or misleading values and should not be used.-Frank On Sun, Apr 27, 2025, 2:02?PM Lee Hart via <leeahart=[email protected]> wrote:
|
Re: Changes to Z80MC?
Hi, This is an idea for a small change to the Z80MC firmware.? I did it on mine a while ago and it helped me at the time. I had formatted my SDCARD?from windows, and had a hard time booting off of it.? I can't remember which windows, but it was probably Windows 10. (Has anyone else had this problem?) It turned out that my FAT16 format was of type SD_PART_TYPE = 0Eh. This is a slightly?modern variant of FAT16, but I think it works fine with the rest of the Z80MC disk routines. The current firmware allows SD_PART_TYPE?4 or 6, and disallows type 86h: 2306 ?32 16FF ? ? ? ? ? LD (SD_PART_TYPE), A 2309 ?FE 04 ? ? ? ? ? ? CP 4 230B ?28 09 ? ? ? ? ? ? JR ? Z, INITFAT_PGOOD 230D ?FE 06 ? ? ? ? ? ? CP 6 230F ?28 05 ? ? ? ? ? ? JR ? Z, INITFAT_PGOOD 2311 ?FE 86 ? ? ? ? ? ? CP 86h 2313 ?C2 6624 ? ? ? ? ? JP ?NZ, INITFAT_FAIL I added one more case for 0Eh, and that allowed me to boot off of the card. If this firmware change is legit/correct, and?it makes it easier for Windows users, perhaps it would be good to go in with the next firmware update. You can read more about this FAT16 version here: But I have excerpted the relevant part here: Prior to 1995, versions of DOS accessed the disk via??addressing only. When?(MS-DOS 7.0) introduced??disk access, partitions could start being physically located outside the first c. 8?GB of this disk and thereby out of the reach of the traditional CHS addressing scheme. Partitions partially or fully located beyond the CHS barrier therefore had to be hidden from non-LBA-enabled operating systems by using the new partition type? ?in the partition table instead. FAT16 partitions using this partition type are also named?FAT16X.?The only difference, compared to previous FAT16 partitions, is the fact that some CHS-related geometry entries in the BPB record, namely the number of sectors per track and the number of heads, may contain no or misleading values and should not be used.-Frank On Sun, Apr 27, 2025, 2:02?PM Lee Hart via <leeahart=[email protected]> wrote:
|
Re: Changes to Z80MC?
Thanks for your suggestions, Kerem. ? 1. I am resolving the S8 problem by changing Q3 from an FJN3305 (internal 4.7k) to an FJN3304 (internal 47k). If anyone wants an FNJ3304, email me and I can send you one for free. ? 2. The piezo's beeps are indeed pretty weak. There simply was no room for anything better! That's why it's sitting on top of the ICs. However, a "naked" piezo doesn't make much noise. Some kind of speaker enclosure is needed to amplify the tiny movements of the disk into larger air movements. This usually take the form of a coin-shaped lid with a small hole in the center. For example, the lid of a pill bottle about the same diameter as the piezo disk, with a 1/8" hole in the center. That helps a lot (but adds height so it won't fit in an Altoids tin). ? A bigger or better speaker would be great. But where would I put it? ? 3. I standardized on the white Molex KK series connectors because they are available with gold contacts, and have good spring pressure to make reliable?connections. The black "Arduino" style connectors that have become popular are cheap, but not very reliable. If you pull out a pin and look at the actual contact surfaces, you'll see that they are rough, and only tin plated or gold-flashed which wears off quickly, and there is no spring pressure to maintain contact pressure. ? But the Arduino-style connectors certainly make assembly easier. They are actually needed for the Z80-SIO card because the Molex KK connector would hit the 5v regulator. ? I'm thinking about removing the 5v regulator, as I doubt anyone powers their Z80MC with anything other than a 5v supply. This makes room for Molex connectors at all P1 and P2 locations on the CPU card. It also makes room to include the P4 power/serial connector on all CPU cards. ? 4. Supporting NVRAM on the Z80-SIO card is a great idea! I'm not working on it at the moment, but will add it to my list of "things to do" when I order more PCBs. You could use a NVARM with built-in battery now; but they are expensive. Most likely, I'd use VIN (JP2 pin 20) to connect an external battery. ? 5. Yes, there is room in the ROM to include some self-test capability. Another project! :-) ? Anyone have any other ideas? ? Lee -- Excellence does not require perfection. -- Henry James But it *does* require attention to detail! -- Lee Hart -- Lee A. Hart |
Re: Changes to Z80MC?
testing z80s....
?
Unplug the built in one and plug in the one in question
if it boots and does all the usual stuff its a good Z80.
?
Over the years the only Z80s I've seen that were bad
were either missing pins (obvious), or subjected to
significant over voltage.? In general it takes a lot
of mistreatment to kill one.? However people do
manage to do that.? Enough ESD and you can
blow up a pin, its input or output circuit on the die.
?
More common this day and age is fake/fraud
marked parts that are not even z80.
?
?
Allison |
Re: Changes to Z80MC?
Hi Lee,
I am loving the Z80MC (thank you!), although so much to learn that is fine. Here are some suggestions for consideration (without altering the original art) :
1- Going back to 15K from 18K to resolve S8 button issue
2- Perhaps a micro piezo speaker
3- Instead of cutting one of the 10 pin connectors I used one of these black single row connectors. Much easier to cut and works fine.
4- If NVRAM is a viable option which I still couldn't figure out if it is plug and play (just like 1802 with super capacitor) or will require a lot of coding to work, nice to make it an option.
5- If there is room in the EPROM, some self test ROM/RAM capability accessed from the front panel would be great.
?
*- I wonder if Z80MC can be used to test another external Z80 for NMOS/CMOS and full functionality
?
Thank you and Best Regards,
Kerem |
Re: uSD card content?
Yes, those days are now really old...? ;)
?
I have a assortment of machines all speaking either CP/M or NS*DOS.
NS*DOS was a strange animal as it was basically bag and tag and tightly
bound to their hard sector controller.
?
The worst part of hard sector was it was only compatible with
itself (or same brand) making portability not happening.? I had
to?add a soft sector controller 765 based? and a 8" drive to get
compatibility with the world as in SSSD 8" CP/M format.
?
That said one of the more interesting things was to take the source
for NS*DOS and make it independent of the MDC controller.? The
result was a primitive file system but you could create directories
within directories.? It also was logical sector addressed and sector
size independant so that it could be 256 (original hard sector) or
512 (the double density version) or anything.??
?
ISIS was another OS that was truly intel and strange.
?
Most exciting to me was being able to tech the CP/M machine how
to read a RX01 (also SSSD8")? with RT filesystem (radix50 file names).
With that my CP/M crate to talk to the world of PDP11s and even
VAX/VMS machines that had floppy (RX06) or over the DECNET
Either pipe..
?
Networking was easy I read a few papers and then
William? Wongs (microcomputing) and it was?then easy
if speed was not the major issue.?
?
?
Most serial ports on s100 and similar could go fairly fast.? So
a protocol like?csma/cd at the physical level and then pile
stuff on it.? Only two signal lines signal and ground at
TTL levels.? I had easy interconnect wired into the BIOS
and 19.2 KB (faster always left a slow system behind).?
Proto networking between not less than 3 systems.
It would extend to 5 one being a LSI11/23 running
RT11.?
?
Allison |
Re: uSD card content?
Allison, ? Ah yes, the "good" old days. :-) ? My first disk system was a Heath H89 with a single H17 floppy. 40-track, hard-sectored, single-sided, single density, which stored 92k with CP/M. Operating with only one drive was tedious, but possible. Heath's clever BIOS created additional "phantom" disks (A: B: C: etc.) with one physical drive. So PIP B:=C:FILE.TXT would keep saying "put disk B in drive A and press Return" etc. as needed. Copying an entire disk was really slow. Lots of elbow exercise, but it worked! ? Later, I had an S-100 box with a Micromation "Doubler" and two SS Shugart SA801 8" drives, which stored 488k per disk. Then a Micromation "Doubler" and SD Sales "Versafloppy" controllers which put over 1 Mb on 8" floppies. ? Interestingly, my old 8" drives still all work, while most of my 5.25" drives are flakey, and the 3.5" drives are even worse. ? On networking: I have Woolf Software's "Move-It" program, which connects CP/M (and DOS) systems via their serial or parallel ports. Each box can see the other's drives. So A: B: C: are your local drives, and RA: RB: RC: are your remote drives. There was a DOS version as well, but I've lost it. That was my networking solution for many years. ? Lee ? -- Excellence does not require perfection. -- Henry James But it *does* require attention to detail! -- Lee Hart -- Lee A. Hart |
Re: uSD card content?
Remap...
?
Lets say drive B is a 8mb container file on some disk.
Elsewhere there are 124 more of them (1GB media).
?
My box can make any of those 124 others appear as
drive B: same for C: and D:.??
?
Mount is? CP/M program? written in BASIC that reads
a file DISK.DTA and that has all of the mappings
listed by name or a simple number (yet unnamed)
and what ones are active as? Drive letter.? I can
reassign B though C to any of those potential drives.
DISK.DTA is just a database.
?
In use I boot nominal first 4 drives A: is always fixed for
sanity and also since all the mainline programs
( marked system) are there.??
?
With that I can make C: into CLIB and D: into CPROG.
Or C: as PASLIB and D: PASCAL.? And so on.?
?
It allows me to deal with the lack of hierarchical directories
in CP/M.
?
The selected disk named are just? pointers to where that
"partition" starts on meda as everything else like size
are fixed.? So the only? parameter in the DPBlock is "offset"
as a variable.? ?That database also has information like
where it was before as in if B was CLIB and I change to
BASLIB it will have an entry listing what B was before.
?
I was a VMS user and used to moving around directories?
as needed to organize projects and all.? ?Closest thing is the?
directory system of Linux.?
?
?
Allison? |
Re: uSD card content?
Lee,
My first system with disk was Altair box NS* disk and 48K ram
and that was 1977.? FYI the NS disk was Sa400 35 tracks,
10 hard sectors and the boot disk has about 81K of usable space.?
Since the altair backpland and from panel were on a good day
flakey and only got worse with Z80....
?
Next system was Northstar Horizon crate.? Good backplane,
two serial ports, one parallel and 56K of ram and the NS* floppy
controller.? That would go from hard sector to softsector using
d765 and to 64K ram.? less than a year later St506 (5mb) and
soon after quantum D540 31mb. Boot was from eprom.
?
Multiple generations later...
?
The Compupro based in a new Northstar horizon box was
created to get the most possible out of CP/M.? It still lives.
That has many CPUs with slave cards and other smart
hardware support. by 1985 it had more resources than
the then average PC.
?
Actually the whole 20 CP/M systems still live and work as?
desired.
?
Needless to say there were many generations of BIOS to suit
hardware and support expanding ideas.? I did it to get
performance and avoiding the bag on the side 8088.
I managed to stay out of PC until the mid 90s networking
was the inflection point.
?
?
Allison |
Re: uSD card content?
I don't understand "remap"? >Also what's missing is a way to remap any container file on the media? to one of 4 drives.? CP/M allows that and I do that all the time on my
AmproLB+.? ?It allows me to use more of the larger disk without?
eating up the TPA for allocation tables.? ?Most of the systems
I've built are 4 logical drives (some 8 if the tables are in mapped
ram) with a mount utility to access other sections (containers)
on the larger disk on the fly.?
? |
Re: uSD card content?
Josh,
?
You still? need a ap on your PC to read the CP/M directory in the container file.
so going direct is one step less.? If the one available works great.
?
Fat with the container file fragmented (scatter gather) would be bad and
CP/M itself? has the scatter-gather in the file system.? So you can have a
literal double scatter.? ?That is unlikely as the FAT file is built as whatever
size on formatted media, delete it and write again all bets are off.
?
>>>needs extra firmware to format / load blank SD cards
?
Not so, the card has base format (unlike spinning rust).? So an unformatted
drive only needs?a valid directory to use it and that easy to do?
C> del? d:*.*
It assumes the BIOS knows where D: starts on the media.
?
Oddly in normal operation CP/M does more reads than writes.? Most
common is directory.? Second most common file loading.?
?
Indeed it beats floppies hands down.? ?Ask me how i know... ;)??
Hint a very early adopter....
?
Still baffled why anyone would? small container files (like 360K)??
Might as well all be 8mb for elbow room not as if it takes much of the uSD.
?
Also what's missing is a way to remap any container file on the media?
to one of 4 drives.? CP/M allows that and I do that all the time on my
AmproLB+.? ?It allows me to use more of the larger disk without?
eating up the TPA for allocation tables.? ?Most of the systems
I've built are 4 logical drives (some 8 if the tables are in mapped
ram) with a mount utility to access other sections (containers)
on the larger disk on the fly.?
?
?
Allison |
Re: uSD card content?
Hi, Using FAT16 as the underlaying model isn't as wasteful as you might think. When booting up, the BIOS looks at the main boot partition (Sector 0) to see where the FAT16 Partition starts. This becomes the base to further set two pointers, one for directory and the other for the FAT. The directory is searched for the files that will become DISK-A to DISK-D.? Once there, the location of the first cluster then becomes the pointer to that disk. Sectors are then added to that pointer and if it goes beyond a FAT16 cluster, then the code needs to look up the FAT table for the correct cluster. SD Cards are 512 byte sectors, that's 4 CP/M sectors.? Clusters are usually like 128 sectors, so there's 512 CP/M sectors.?? But the real thing to keep your eye on, there's just 1 pointer to load (then add your sector) to find your sector for most of the time.?? If FAT16 was not used, it would be about the same, 1 pointer (because you want to offset all the drives on a single SD Card) and add. Normal CP/M uses sequential reads/writes, this is not an issue and speed between FAT and raw-block would probably be about the same. If you're running a CP/M program that needs random access to the disk, then FAT would definitely slow you down. Even with the FAT hopping, it's still faster than real 8" drives (I know, because I've tried it). Bit banging with Z80 is about 90% as fast as parallel processing.? That bit of loss was worth the gain of 4 chips and PCB Space. This is because the Z80 is much faster (both speed and shorter cycle lengths).?? High up look: raw-block: -a bit faster 90% of time/use -a lot faster 10% of time (when using programs that need full random access of CP/M Disk) -needs extra firmware to format / load blank SD cards FAT16: -Entire disks can be duplicated using any PC that access FAT16 -Simple programming for CP/M File management of disks (CPM Disk Explorer tool) -SD Card can hold many other files of use (like operating firmware, user manual, etc) -Still not as slow as real floppy disks In a nutshell, using FAT16 just made the file system easy to access on any modern computer.? I just figured, that's a win-win. Cheers, Josh
On Saturday, April 19, 2025 at 01:57:33 p.m. EDT, dave <dev@...> wrote:
makes sense since you'd probably otherwise need a special app on the PC side to read/write into the raw block store.
|
Re: uSD card content?
Josh Bensadon originally wrote the Z80MC's CP/M code for his JAIR board. It's a single-board S-100 computer with an 8080 CPU, 64k RAM, boot ROM, 2 serial, 3 parallel ports, and a parallel interface to an SD-card serving as its "disk" drive. He noted that the 2 MHz 8080 parallel interface was about the same speed as the 4 MHz Z80 with "bit banged" SD-card interface. So that's what we went with for the Z80-SIO. ? It's not as fast as modern hard drives, but is certainly faster than any floppy disk system I've had. CP/M programs also tend to be small, so disk read/write time is not nearly as important as you might expect. ? Josh used FAT16 so you could read/write/format the SD-card on a PC. It does slow down the Z80 to read the FAT16 directory structure instead of the simpler CP/M structure, but was a straightforward way to allow up to a 2 Gb disk. ? Lee -- Excellence does not require perfection. -- Henry James But it *does* require attention to detail! -- Lee Hart -- Lee A. Hart |
Re: uSD card content?
Dave,
?
Code for direct sector access is currently only for CF (and IDE).? Since only two of
my machines are uSD I haven't gotten to it but the basic skeleton would based
off the CF versions with the device level interface and command protocols
being different.? ?For bit bang uSD that is a lot of code that is different but
it eliminates the code needed to find a directory and file under fat16.? The
read and write to a sector (physical 512) will be the same.
?
The two sections of the BIOS impacted is (D=Disk) DREAD and DWRITE.
If I get that far I'd likely add large buffers in one of the unused 32K ram
banks.? And foreground background as I have systems with that built in
most common use is print spooling.
?
As it stands the current code is very good and the TPA is large enough
to run most C compilers and screen editors.? I use BDS-C, BASCOM,
Mbasic, Pascal, assembler and macro assembler,?and Vedit.? Generally
save for screen specific code ( cursor and keyboard keys) if it runs
on Kaypro it runs on MC (using serial terminal).?
?
Right now I'm spending more time on RF analog stuff (222 transverter,
432 power amp).? ?Lots of drilling and blasting (mechanical construction).
?
?
Allison |
Re: uSD card content?
Generally its better.
?
Since the SPI interface is bit banged having to shuffle less means
less time doing bit bang to move stuff.? Think in terms of layers.
?
Code may be smaller as well, less code executed is faster.
However the BIOS changes!??
?
To date I only have two systems with uSD the z80MC and
SC131 (20mhz z180).? Note the Z180 uses the SPI interface on chip
so speed is very fast.? The rest of my systems are IDE one
with spinning media and two with CF (CF is byte parallel, faster).
The rest of my 8085/z80 systems have MFM-hard disks D540
31mb (spinning rust) and intelligent controllers.? I have over
20 CP/M systems of various designs and performance levels
many running BIOS I had to build.? Of those 5 are S100 crates.
Most portable of the is the Epsom PX-8s laptops I have.
?
Me, been using CP/M since '76 and did V1.3, 1.4, and usually V2.x.
I also use PCP/M variant and Zrdos enhanced CP/M clones.? The
clones are structurally similar but add features like logical devices
larger than 8MB as the internal math is more complex and can
directly address 1GB.? Only one comment is that big devices
have big flat directories that take forever to search.? CP/M
does not hierarchical directories.? So partitioning devices to
smaller 8MB is the general way.
?
I also write code for CP/M but also have modified CP/M internally
and run with ZCCP replacement for CCP.? ?For the non-CP/M fluent
the CCP is the command line processor, Bdos is the base logical
Filesystem and IO, the BIOS is the layer that does logical abstraction
to physical for IO and mass storage.
?
CP/M discussion are based on logical devices and physical.? For
example logical sector is always 128 bytes.? Physical can be anything
that is usually device inherent (IDE, CF, uSD that's 512bytes).??
?
A must have is the entire CP/M manual set (many thin manuals
or one thicker book) as they pretty much give the whole of
required information on use and modification.
?
I speak PDP-8, 8080,8085,Z80, fluently and passable conversations in
1802, TI9900 , PDP-11 and solder (hardware).
?
Allison |
Re: uSD card content?
That's super interesting. ?I wonder what the numbers are on the Z80MC for the elimination of the FAT layer relative to direct block I/O. ?I would guess that a majority of the time is spent in the bit-banged SPI, which might swamp out the benefits, but you never know until you measure... ?(and maybe ram/rom savings alone makes it worth it).
Anyway, if you have code, I wouldn't mind seeing it. ?I am Z80 competent, but a CP/M dilettante, so I'm sure I would have knumbskull questions. ?
-dave |