Keyboard Shortcuts
Likes
Search
FORMATTING THE uSD
The supplied uSD with the Z80MC according to the docs must be formatted FAT16...
Mine out of the box has a label Z80-SIO... a good thing but was it formatted to FAT 16? If not I have one more system to try, an older 32bit running Ubuntu 12 to try as all the others do not offer FAT16 formatting.?? Suggestions.... Allison |
If it's not FAT16, the SD Init will fail and let you know it's a bad partition type.?
On Sunday, December 31, 2023 at 11:27:29 p.m. EST, ajparent1/kb1gmx <kb1gmx@...> wrote:
Problem solved... Used a old(CA 2004) Compaq pentium based machine running? NT4 that would do FAT16.?? However the drd was already formatted fat 16. Solved. |
开云体育I'm pretty sure mkfs.fat will create a FAT16 disk -- from the man page, "mkfs.fat? is? used? to? create an MS-DOS filesystem under Linux on a device". -Bob
On 12/31/23 21:26, ajparent1/kb1gmx
wrote:
The supplied uSD with the Z80MC according to the docs must be formatted FAT16... |
Hi Allison, ? Yes, the SD-card has to be formatted FAT16. This is also why you can't use cards over 2 Gb. It's hard for me to imagine needing over 2 Gb on a computer as small as the Z80MC! ? Since small cards are getting rare and modern PCs often make it difficult or impossible to format FAT16, I include a 2 Gb SD-card, and format it in FAT16 for you. ? I agree that the SD-card socket and USB-to-SD-card adapter supplied with the kit are poor (Chinese quality). But that's about all I can find these days. :-( ? I'm trying to follow the file size/format discussions, but don't really have a clue about how the internals of CP/M disk formats work. But I should mention that there is a *lot* of RAM on the Z80MC. The Z80-SIO comes with a 128K RAM, of which only 32k is in use. And it has jumpers and bank-switching logic to use a 512k RAM instead. ? Happy New Year! Lee -- Excellence does not require perfection. -- Henry James -- Lee A. Hart -----Original Message-----
From: <[email protected]> Sent: Dec 31, 2023 8:26 PM To: <[email protected]> Subject: [Z80MC] FORMATTING THE uSD ? The supplied uSD with the Z80MC according to the docs must be formatted FAT16...Mine out of the box has a label Z80-SIO... a good thing but was it formatted to FAT 16? If not I have one more system to try, an older 32bit running Ubuntu 12 to try as all the others do not offer FAT16 formatting.?? Suggestions.... Allison ? |
It apparently does but that is not helpful.
Man page on my system says the same thing save for I get... ? :mkfs.fat: unable to open /dev/sdb: No medium found Same for all variants of? sdb (stick)...? /dev/sdb et al Its a known good lexar 1GB stick formatted as ext4 that I could afford to break. What's notable is once done its a one time use.? I will load a utility to do what many?here use xmodem for.? The difference is my code is on all the other dozen or so CP/M system I have and they talk nicely via serial line. Its a flavor of Wong's (w Wong , October, 1983 Microsystems) network? ?Simply party line network (think 9600baud csma/cd). Allison |
Thanks Lee.
I used parted to examine the uSD and discovered it was basic fat 16. I come from a time when a ST506 (5MB) seemed like more space than usable.. That lasted maybe a month.? Most systems with disk I found more than 60mb? was more than excess and a 128MB CF being largely unused. Two limits for that... One is CP/M 2 max file system size is 8MB (65535 sectors max). The other is each drive eats about 256bytes for the allocation map and with 64K ram, one word, ouch. The common solution was some utility to allow for one drive as system and up to three mapped (MOUNTED) in as needed. For larger file systems CPM3 or the clones P2dos, Novados, Zrdos, or Zsystem fixed an internal BDOS bug (and enhanced many things) and allows for up to 262144 sectors (logical 128 byte) or 33MB but the solution came with a directory that could take a while to parse.? A penalty of a flat file system. Generally for large media (IDE, CF and SD) that is LBA addressed I use: ?Sectors= (alloc/128)/4 as, or 8 physical sectors per track ?8MB logical disk? (8mb/4096 alloc size) for 2048 Tracks. CP/M actually passes a 16bit value for track and sector passed in register pair BC.? Sector is typically less than 256 and track can be as high as needed to address 8MB total. That allows for a new logical partition spaced every 16384 physical sectors ((2048 * 4096= 8MB))/512= 16384 physical sectors.? Also CHKS is a checksum for directory to lock out possible floppy changes mid operation.? For most systems with fixed media (SD qualifies) the value is 0 (zero). The only headache for CP/M Z80 is track and sector (logical 128) is 16bit values, aka one track of 1 local sector * 65536 tracks, or? 256 sectors * 256 tracks, or and combination that multiplies out to 16bit (65535) without overflow.? So for devices larger? the offset is applied per drive number with 24 or 32 bit math added to create a LBA value large enough for the device in use. The application of this is for a 128MB CF that's 262144 512 byte physical sectors. or 16384 physical sectors per 8MB logical disk. since they can be addressed from LBA 0000 each logical disk starts every 16384 logical sectors for a total of 16 possible logical drives. ITs then a simple matter of adding (32bit) 16384 (0x004000) For each logical drive (at the Bios level) or 0x004000 * drive number. Its easily handled using a BIOS internal table that the external BDOS does not access. I keep it simple as since the whole initial system loads from Eprom to ram that leaves out "system" tracks completely. A simplification.? If that system needs upgrade the easy way load a file and overlay the existing system, a handy way to load improved CCP, BDOS or BIOS. What I can't imagine is using a large device (more than 8mb)? as a bunch of 8"SSSD floppies (241KB useable space)? The acid test for disk adequacy is: ASM cpm22.BCD? ? ; assemble a large version of CPM fully commented at 104KB ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? : source on B, hex on C, and PRN on D FYI the resulting PRN file barely fits on a empty 8"SSSD floppy.?? That's why everyone from then want the largest disks possible. Also why I started down the hard disk path in 1980 as even 2SDD 8" (1mb) was still slowing me down and a 4 drive box was heavy, huge, and loud! Allison |
Hi:
If I comprehend the question, you're not sure how to tell what file system the SD card is formatted for? And further, how to format a partition as FAT16? On WINDOWS, go to "MY COMPUTER" and right-click on the SD card drive. Select "properties" and it will show you (see below). If using Linux, which I think you are, you can use 'fdisk' to show you how each partition is formatted. See the last line below. toshl755d $ sudo fdisk -l /dev/sdc
Disk /dev/sdc: 7.4 GiB, 7948206080 bytes, 15523840 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x00000000
?
Device? ? ?Boot Start? ? ? End? Sectors? Size Id Type
/dev/sdc1? ? ? ? 8192 15523839 15515648? 7.4G? b W95 FAT32
As far as formatting under Linux, you can run (sudo or as root) GPARTED or as stated above, mkfs.vfat but be aware that mkfs.vfat allows you to specify the type of FAT used to format the partition with the '-F' option:? ? mkfs.fat 3.0.28 (2015-05-16)
? No device specified!?
? Usage: mkfs.fat [-a][-A][-c][-C][-v][-I][-l bad-block-file][-b backup-boot-sector]
? ? ? ? ?[-m boot-msg-file][-n volume-name][-i volume-id]
? ? ? ? ?[-s sectors-per-cluster][-S logical-sector-size][-f number-of-FATs]
? ? ? ? ?[-h hidden-sectors][-F fat-size][-r root-dir-entries][-R reserved-sectors]
? ? ? ? ?[-M FAT-media-byte][-D drive_number]
? ? ? ? ?[--invariant]
? ? ? ? ?[--help]
? ? ? ? ?/dev/name [blocks]
From the mkfs.vfat man file: ? -F FAT-SIZE ? ? ? ? ? ? ? Specifies the type of file allocation tables used (12, 16 or 32 bit).? If nothing is?
? ? ? ? ? specified, mkfs.fat will? automatically select between 12, 16 and 32 bit, whatever?
fits better for the filesystem size.
? ?
Hope that helps. Happy New Year! Peace and blessings, JQ |
I think I've seen an ST506 back in the day... but for the most part, I was playing with ST-225's on PDP's.? 20Meg was very nice but still not enough for any large systems. For the big 8Meg disks, I go with 64 sectors then lay out the maximum block to get 8meg without going over 65536 CP/M sectors.?? For the boot disk, 1 reserve 1 track.? I have an updated Z80MC_GO to load 59K CP/M instead of 61K.? I needed the extra 2K for the large disk allocation maps.? 512bytes times 4 disks. The CP/M BIOS is in Z80MC_GO.? It will load CCP and BDOS from the disk... so the disk must have CP/M (assembled for 59K). It would have definitely been a lot easier if I created my own format on the SD Card and even tossed away 3/4 of the disk sectors (ie, use the first 128 bytes of each 512 byte SD CARD sector). But I kind of liked the idea of working within a FAT16 file that can later be tossed around in Windows.?? Converting 512 byte SD Card sectors to CP/M 128 byte sectors was a real challenge for me.? Great thought process. So you read in the 512 bytes and use 1/4 of that buffer to return to CP/M.? Of course, CP/M is very likely going to ask for the next sector and sure enough, it's already there in RAM. When CP/M asks for another sector that's not there in RAM, it's time to read the next SD Card sector... but wait... did CP/M change any data in those sectors?? If so, we better write that before reading the next SD Card Sector.? Now, what if CP/M wants to write to a sector that's not yet in RAM, well, it needs to be read first.? Yeah, sort story, I had to write my own data caching logic.? Fun stuff. Cheers, Josh
On Monday, January 1, 2024 at 03:57:46 p.m. EST, ajparent1/kb1gmx <kb1gmx@...> wrote:
Thanks Lee. I used parted to examine the uSD and discovered it was basic fat 16. I come from a time when a ST506 (5MB) seemed like more space than usable.. That lasted maybe a month.? Most systems with disk I found more than 60mb? was more than excess and a 128MB CF being largely unused. Two limits for that... One is CP/M 2 max file system size is 8MB (65535 sectors max). The other is each drive eats about 256bytes for the allocation map and with 64K ram, one word, ouch. The common solution was some utility to allow for one drive as system and up to three mapped (MOUNTED) in as needed. For larger file systems CPM3 or the clones P2dos, Novados, Zrdos, or Zsystem fixed an internal BDOS bug (and enhanced many things) and allows for up to 262144 sectors (logical 128 byte) or 33MB but the solution came with a directory that could take a while to parse.? A penalty of a flat file system. Generally for large media (IDE, CF and SD) that is LBA addressed I use: ?Sectors= (alloc/128)/4 as, or 8 physical sectors per track ?8MB logical disk? (8mb/4096 alloc size) for 2048 Tracks. CP/M actually passes a 16bit value for track and sector passed in register pair BC.? Sector is typically less than 256 and track can be as high as needed to address 8MB total. That allows for a new logical partition spaced every 16384 physical sectors ((2048 * 4096= 8MB))/512= 16384 physical sectors.? Also CHKS is a checksum for directory to lock out possible floppy changes mid operation.? For most systems with fixed media (SD qualifies) the value is 0 (zero). The only headache for CP/M Z80 is track and sector (logical 128) is 16bit values, aka one track of 1 local sector * 65536 tracks, or? 256 sectors * 256 tracks, or and combination that multiplies out to 16bit (65535) without overflow.? So for devices larger? the offset is applied per drive number with 24 or 32 bit math added to create a LBA value large enough for the device in use. The application of this is for a 128MB CF that's 262144 512 byte physical sectors. or 16384 physical sectors per 8MB logical disk. since they can be addressed from LBA 0000 each logical disk starts every 16384 logical sectors for a total of 16 possible logical drives. ITs then a simple matter of adding (32bit) 16384 (0x004000) For each logical drive (at the Bios level) or 0x004000 * drive number. Its easily handled using a BIOS internal table that the external BDOS does not access. I keep it simple as since the whole initial system loads from Eprom to ram that leaves out "system" tracks completely. A simplification.? If that system needs upgrade the easy way load a file and overlay the existing system, a handy way to load improved CCP, BDOS or BIOS. What I can't imagine is using a large device (more than 8mb)? as a bunch of 8"SSSD floppies (241KB useable space)? The acid test for disk adequacy is: ASM cpm22.BCD? ? ; assemble a large version of CPM fully commented at 104KB ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? : source on B, hex on C, and PRN on D FYI the resulting PRN file barely fits on a empty 8"SSSD floppy.?? That's why everyone from then want the largest disks possible. Also why I started down the hard disk path in 1980 as even 2SDD 8" (1mb) was still slowing me down and a 4 drive box was heavy, huge, and loud! Allison |
Te St506 predated the st225 by about two years.? I have a few of the latter?
as they were free (RD 31 and also St250s RD32).? I prefered the RD52 Quatum drives much faster and more reliable.? I think I still have 10 or 12 of them.? And a bunch of BA42 boxes. The ST250s I have some of the few remaining as they ran hot and tended to fail without a lot of air.? That and RQDX2 and RQDX 3 controllers with formatting software XXDP) plus MSCP SCSI (CMD). Primary use was one of the many Qbus PDP11s and a pair of Qbus MicroVAXII as swapfile drives.?? Still use both PDP11 (primary is 11/73) and a bunch of MicroVAX mostly 3100s. When I'm bored I fire up the PDP-8f for a dose of serious front panel. The right way to handle large disks as most all are 512 byte is to treat a physical sector as 4 logical so SPT can easily be 4 and then 16384 tracks with deblocking. NEver considered just using half a sector even though they were cheap and plentiful.? Both efficient and fast as then each sector read is usually a preread for the next 3.? If you make it 32SPT you get a whole allocation unit 4KB) in the buffer, obviously banked ram is needed to keep system size large.? That and a write back timer to keep the file system clean. However as mentioned a 1 or 2gb device is far bigger than CP/M can use even with multiple loadable disks.? The largest compendium of CP/M software barely fills a old school Cdrom even that has duplicates of duplicates.? My largest system uses CF? a 128MB device in 8bit (memory)? mode for easy interface.? Its partitioned in BIOS as 16 possible drives with any 4 "on line" (61Kb system). and a loader program to use B: through D: as any one of 15 not assigned.? Not one of those 8MB partitions is fully used.? However they are organized with application specific files like? one logical drive BDS C compiler, another HiTEC C, and one for Pascal and so on. The FAT approach is interesting but its nearly as a large as the whole CP/M BDOS as it implements minimalist DOS. A dos within a dos.? The BIOS seems to need the ZMC15 eprom for some of the low level work.? Still digesting all of it.? However a thought that pops up is a Z80 that runs PC Compatable at the filesystem level DOS but has a full set of Z80 aps so that file transfers are DOS, even better if a hierarchical files were doable.? It would be consistent with the late 80s with people trying to get to better than CP/M or maybe Unix. I still build fast and high performing CP/M systems experimenting with things like networking, supporting slave processors, and improving performance.? Turns out very few system really exploited the possible though the Kaypro 4/84, AmproLB+ for physically small and the Compropro S100 crate offered things like RAMDISK, fast controllers (DMA) and even a system multiplexer with 8085 to off load the main cpu (z80 at 10mhz).? Enough nattering on... Allison |
Hi, I uploaded a correction just now, (Jan 2).? Please download and use this version. Yes, copy all these files in the zip to the SD Card from your PC.? Insert SD Card to Z80MC.? Turn on and stand back. Cheers, Josh.
On Tuesday, January 2, 2024 at 12:18:55 p.m. EST, ajparent1/kb1gmx <kb1gmx@...> wrote:
Its not clear in the docs or I have to reread them... I assume the process is to use the PC to copy the contents bigboot.zip after extraction to the uSD and that's it. Allison |