Here http://www.atarimax.com/flashcart/forum … .php?t=490 is the partition info. Also, would this be useful?
I have asked Sijmen for the source code, and will post it here when I get it. If I can figure out how to attach a file. You may want to ask Sijmen about the project.
Also, I received the Flash cart. + IDE today. SDX 4.39 works fine on it when patched to bank at $D52x. No access to IDE without driver for $D50x, but SDX works great.
TECHNICAL SECTION/DO THE MATH!:
This part is more in depth information on how MyIDE stores data and how it uses space on the IDE-device. Also you see how to calculate image and partition space.
Usage of IDE-space:
FDISK works with blocks of cylinders, not with sector (LBA) level. The minimum size of a partition (Image or Logical) being 1 cylinder. The numbers of cylinders used are always rounded up on the users-demand. Unused sectors at the end of a partition or image are lost unless configured to be used with your DOS.
Our example: IDE-device with 16 heads, 32 sectors and images at 256:
This means 1 cylinder has 16*32 = 512 sectors.
An 1040 image-partition uses 3 cylinders (+496 unused sectors)
>3 x 512 = 1536 sectors, 1040 for the image and 496 unused.
An 720 sector logical partition uses 2 cylinders (+304 unused sectors)
>2 x 512 = 1024 sectors, 720 for the image and 304 unused.
An 65535 sector logical partition uses 128 cylinders (+1 unused sector).
>128 x 512 = 65536 sectors, 65535 for the partition and 1 unused.
Images must start at a 256 cylinder boundary due to MyIDE-standard. So IDE-devices with less then 256 cylinders have no image-space.
Lets assume you want to start image-space at cylinder 256, how many sectors do you have left for logical partitions?
In our example, you have 254 free cylinders x 16 x 32 = free sectors.
Calculates 130048 sectors. Enough for D1: with 720 and D2: with 65535 sectors. But to little for two 65535 sector partitions.
Limitations:
MyIDE is a 8bit signal interface to support todays 16bit IDE-devices using only the lower 8 bit of the 16 bit word communication with the device. Therefore the usable capacity will be 50%. Also density support is based on the actual number of bytes used of a IDE-sector. IDE-sectors are 256 bytes and thus using only 128 bytes reduces the capacity by 50% again.
Current development has shown that CF-cards and IDE-modules can be switched to 8 bit mode. This makes is possible to use the whole capacity of the card/module. Unfortunately the sector-length increases to 512 bytes and thus does not improve the capacity for the current MyIDE-drivers.
One application that uses this 8 bit mode and thus the whole capacity of the CF-card or IDE-modules are the MyIDE-movies.
Format of partition-table / usage of cylinder 0:
FDISK used the following encryption to store the partition-information found on cylinder 0, head 0, sector 1. This first sector is divided into 9 groups of 8 bytes. The first group contains the physical size of the harddisk and how many partitions there are. The next 8 groups of 8 bytes are the drive-tables. The last 128 bytes are filled with zeros, to identify this drive as partitioned for MyIDE.
First 8 bytes:
Byte 0: Number of cylinders low-byte
Byte 1: Number of cylinders high-byte
Byte 2: Number of heads
Byte 3: Number of sectors Byte 4: Number of partitions
Byte 5: Drive-bits. Corresponding partition is present when bit=1
Byte 6: Start cylinder (high byte) of disk-images. (0=no images)
Byte 7: Number of cylinders used for 1 disk-image.
Next 8 groups of 8 bytes:
Byte 0: Logical drives number (#01-#08)
Byte 1: Starting cylinder low-byte
Byte 2: Starting cylinder high-byte
Byte 3: Ending cylinder low-byte
Byte 4: Ending cylinder high-byte
Byte 5: Density (0=128, 1=256 bytes/sector)
Byte 6: 1st group of 8 bytes: Option-byte, rest: reserved.
Byte 7: Reserved.
Note: The 4.x I/E MyIDE-OS loads only the first 32 bytes from the table.
So you can use only 3 partitions with this OS, disregarding all other partitions and locking out all Dx:-devices which are present in the drive-bits.
The Option-byte is a one-byte value. Decoded like this:
bit 7 Read only when set.
bit 4-6 Boot drive # when set. D1:-D8:
bit 3 Boot images when set.
bit 2 Skip Select when set.
bit 1 Disable IDE when set.
bit 0 Disable Onscreen Activity when set.
The rest of all the sectors of cylinder 0 are reserved.
The diskette version of the MyIDE-OS uses sectors 2-65 to store a copy of the MyIDE-OS for a fast second stage boot after a 3 sector bootdisk.
This is only for users that have NO MyIDE-OS installed or flashrom to boot the MyIDE-OS from.
Logical partitions:
The first logical partition start at Cylinder 1 and can continue on all cylinders until image-space or the end of the IDE-device is reached.
There is no encryption of data. All sectors are in sequence stored like this: Sectors first, then heads, then cylinders. Supported are 128 or 256 bytes on each sector.
FDISK will ensure that logical partitions do not overwrite Image partitions and visa versa.
Image partitions:
Starting at a multiplication of 256, consuming the rest of the IDE-device. Here image partitions are stored, each having a fixed size to support 720 or 1040 sector-images. Multiplication and size are displayed in the FDISK menu.
To calculate were a image starts:
>multiplication x 256 + (number-1) x size.
Using our example:
Image 0010 starts at: 1 x 256 + (10 1) X 3 = cylinder 283.
Each image has no encryption of data. All sectors are in sequence stored like this: Sectors first, then heads, then cylinders. Supported are 128 or 256 bytes on each sector.
On the last sector of each image space you find the name (byte 0-28) of the image and density (byte 30). density is encrypted like this: $AD=MD, $A4=DD, $B3=SD
For image 0010 in our example this is on cylinder 285, head 15, sector 32
KEY DEFINITIONS, MEMORY-USAGE, MyIDE-USAGE, IMAGE-USAGE.
Added keystrokes:
shift+control+tab : Re-boot Atari (except MyIDE-settings and Basic!)
3.5F hold OPTION to re-enter the bootmenu.
4.x I/E hold SELECT to coldstart MyIDE + Basic too.
shift+control+esc : Normal RESET. (saver to use then pressing RESET!)
shift+control+R : Clear and (try to) reload Configuration bytes.
shift+control+D : Disable Hard Disk
shift+control+E : Enable Hard Disk
shift+control+P : Protect (read only) Hard Disk
shift+control+U : Unprotect (read and write) Hard Disk
shift+control+A : Toggle On-screen Activity (Colors in border)
These keystrokes are available when booted in image partition.
shift+control+# : Mount Image No #. #=number 1....9.
Example #=2 to access disk 2. Images must be insequence on the MyIDE.
3.5F MyIDE Configuration bytes (default on reload=all $00):
-CBFA = Image-density. 0=128 bytes/s 1= 256 bytes/sector.
-CBFB = HDPRES
-CBFC = BITS
-CBFD = OPTION-BYTE
-CBFE = IMAGE LOW-BYTE
-CBFF = IMAGE HIGH-BYTE
4.x I/E MyIDE Configuration bytes (default on reload=all $00):
-03F9 = Image-density. 0=128 bytes/s 1= 256 bytes/sector.
-03FB = HDPRES
-03FC = BITS
-03FD = OPTION-BYTE
-03FE = IMAGE LOW-BYTE
-03FF = IMAGE HIGH-BYTE
Image loading routine.
Hold START during bootup/reset. Remember to dis/enable BASIC.
A screen like this will appear.
0001<CBN>name_29_characters S
0001 4-digit hex-number (joystick up/down left/right, fire=boot)
< copy from image to floppy (press fire)
C erase name (press fire)
B boot (press fire)
N save name (press fire)
> copy from floppy to image (press fire), enter name first
name keyboard, joystick left/right, NO function keys supported!
s Density of image. changeable s->m->d->s (fire). Automaticly set
when a image is saved. Only change this if you need to!
To confirm changes in density, then do N save name
Please be patient while copying DD disks to images. The first 3 sectors take long to read!
Information for programmers.
Extended vector table.
E483 = JMP HDINIT
E486 = JMP HDWRI
E489 = JMP HDREA
E48C = JMP HDIMA
OS-Identification Byte
Located at: $C005
bit-7:1=ram-OS, 0-rom-OS
bit-6:1=ext, 0=int MyIDE
bit-5:1=MyIDE-OS, 0=other OS
bit-0...4=serial number
How to transfer data bypassing the SIO-routines:
Set buffer address at $32/$33
Set length at $308 ($00=256 bytes). Except WRITE, this are 256 bytes.
Set $D103 (4.3I) or $D503 (4.3E) =sector ID ($01....max)
Set $D104 (4.3I) or $D504 (4.3E) =cylinder LOW
Set $D105 (4.3I) or $D505 (4.3E) =cylinder HIGH
Set $D106 (4.3I) or $D506 (4.3E) =head ID ($A0....$Amax, lower 4 bits)
JSR $E486 for write (OPTION-BYTE is checked. Minus = write protection)
JSR $E489 for read
BMI if an errors occurs
How to start an image (with your software):
Just set the starting cylinder and density in the MyIDE-configuration bytes. Then cold start you Atari with JMP E477. That's it.
Image-mode must be set to active with FDISK!
Some things to know about the HDINIT-routine:
1-If HD is disabled or no detection: No init, just RTS (preserve last loaded settings).
2-If not loaded and HD is present: load MyIDE-configuration bytes and partition-table.
3-If loaded, skip detection (preserve settings)
Some things to know about the HDIMA-routine:
1-Check if START was pressed and images are active (fdisk): do select image, set OPTION-BYTE and cold start (boot).
2-Check for image-load then set D1: as this image. set OPTION-BYTE, RTS
3-Check if in power up and if 'start image-load' is active (OPTION-BYTE): do select image, set OPTION-BYTE and cold start (boot).
Notes:
Remember that the IDE-settings are protected for resets.
So if you want to reload them use shift+control+R.