Some questions about SD-card lay-out

101 views
Skip to first unread message

Nick Brok

unread,
May 12, 2020, 11:31:19 AM5/12/20
to retro...@googlegroups.com
Hello,

Scrumpel7d begins to become a nice computerproject. I've patched the xmodem utility from ROMWBW to my wishes and that it functions in Scrumpel. I've written some LCD software for controlling the LCD. With the 80C55 Parallel Port I can read and write to the LCD, so no delays are necessary. Also my own sd-card software using the SCI from the Z8S180 is working reliable. Now I want to use the SD-card with partitions on it. (Now I use a derivative of Mr Saerl's disk image.)
Is the following thought correct?

The first 2 sectors on the SD-card are used for the partition table, Then the next 30 sectors are used for loading the CP/M OS. The rest until 512 MB is used for the CP/M disks. So the first partition will begin after 512MB.

I want to implement this with in mind using the other partitions for Fuzix or as PC fat system.


Greetings,

Nick

Wayne Warthen

unread,
May 13, 2020, 10:24:08 PM5/13/20
to retro-comp
On Tuesday, May 12, 2020 at 8:31:19 AM UTC-7, Nick Brok wrote:
Hello,

Scrumpel7d begins to become a nice computerproject. I've patched the xmodem utility from ROMWBW to my wishes and that it functions in Scrumpel. I've written some LCD software for controlling the LCD. With the 80C55 Parallel Port I can read and write to the LCD, so no delays are necessary. Also my own sd-card software using the SCI from the Z8S180 is working reliable. Now I want to use the SD-card with partitions on it. (Now I use a derivative of Mr Saerl's disk image.)
Is the following thought correct?

The first 2 sectors on the SD-card are used for the partition table, Then the next 30 sectors are used for loading the CP/M OS. The rest until 512 MB is used for the CP/M disks. So the first partition will begin after 512MB.

It sounds like you are asking about the Grant Searle disk layout.  Yes, the first 32 sectors of the disk are used to load the OS.  Those 32 sectors are the "boot track" of the first slice of the disk.  I don't think Grant's disk layout makes any accommodation for a partition table.  If a partition table does exist on a disk, it would always reside in the first sector of the disk.

In the case of Grant's layout, he uses 8 slices of 8MB, which obviously fits into 64MB.  In theory, you could put other stuff after the 64MB.

I want to implement this with in mind using the other partitions for Fuzix or as PC fat system.

You will need to find a way to create and maintain a partition table in the first sector of the disk without breaking Grant's OS boot loader.  RomWBW does this by generally ignoring the first sector of the disk.

Good luck!

-Wayne

Alan Cox

unread,
May 13, 2020, 10:47:20 PM5/13/20
to retro-comp
And to fill in the PC world part.

Sector 0 is the partition table and PC boot block
Sectors 1-63 are the OS boot area, 1-2047 on more modern media
The rest is described by the partition table (actually so is the boot area by inference - the first sector of the first partition will be after the boot area)

Modern media also has GPT tables for big sized stuff (the PC partition system only goes so far). It lives at the far end of the disk. There is still a PC partition table as well usually for the bits that can be described for "legacy" systems.

On the old Grant Searle setups  the loader blindly loads the first 24 blocks to the top 12K of RAM and then jumps to (0xFFFE). So for Fuzix I put the partition table where expected and arrange that the boot code runs from 0xFE00 so the fact there is a partition table and a pile of unused sectors doesn't bother it.

Alan

Nick Brok

unread,
May 14, 2020, 8:01:58 AM5/14/20
to retro-comp

Thanks Alan and Wayne for the clear explanation. My bootloader needs an even number of sectors to load, so an offset of two sectors and my partitiontable keeps intact!

Greetings,

Nick

Reply all
Reply to author
Forward
0 new messages