1

(30 odpowiedzi, napisanych Fabryka - 8bit)

I'm using the mads assembler.  I'll send the code as soon as it's a little cleaner... it looks really bad now.  I need to do something about timeouts using RTCLOCK instead of just waiting in a loop until not busy.  Partition tables need work...  I'm using some ideas from Bob Woolley, (he helped us a lot back in the day).

When I get time off work, I'll dig in to this some more.

I was just glad to see it work!

If you don't mind sloppy, bad code, and could help with partition tables & stuff, I'll send the code as it is.

-Kyle

2

(30 odpowiedzi, napisanych Fabryka - 8bit)

OK, I have written a MYIDE.SYS driver for SDX that almost works.  I can assign drives, read, and write to the IDE drive.  It's still quite buggy, and I'm working on it.  I was able to copy MAC65.COM onto it, and C:>X MAC65 and it works.  I re-booted, and loaded MAC65 again (using X) and it worked again.

  It's going to take me a while to get back into the details of SDX... It's been 10 years or so since I worked on any of the SDX source code, and that was vers. 4.22.

  I'll send the driver up here when I get it to work at least semi-reliable.

-Kyle

3

(30 odpowiedzi, napisanych Fabryka - 8bit)

That won't help us 1200XL users... (No PBI or ECI).

I have been disassembling the OS routines.  I'll let you know when I get the read / write isolated.  Percom is another story, I don't think the original OS supports Percom.  It should be simple to add it, though.

Programs that use Sparta I/O shouldn't need to access sectors directly. 

I understand this isn't a total solution for the IDE system, but, it would be a cheap, portable system, especially for 1200XL users.

-Kyle

4

(30 odpowiedzi, napisanych Fabryka - 8bit)

It wouldn't really need to be partition compatible with MyIDE.  I'm not familiar with KMK/JZ, but if it were partitioned similar to it, only the low level hardware drivers would need to be written.

It seems like KMKJZ is the best IDE interface there is, but MyIDE is convienently all on a cart. I have a 256M flash IDE drive plugged into mine.  The whole DOS /IDE cart is totally portable, no need to modify the computer, just plug it in.

That's what I'd like to see.

I'll be happy to provide any help I can.

-Kyle

5

(30 odpowiedzi, napisanych Fabryka - 8bit)

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 today’s 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.

6

(30 odpowiedzi, napisanych Fabryka - 8bit)

This is what I found for MyIDE.... It should be very similar to Bob Woolley's IDE interface.  All IDE devices are basically the same, it's just the interface that differs.  In the MyIDE cart, the IDE registers start at $D500. the cart-bank registers are at $D520.  It might be good to support $D500 (cart) or $D100 (internal).   Possibly a DEVICE MYIDE $D500 (or $D100) in CONFIG.SYS, or auto-detect.   Also, leave a little extra space in the ROM image for the cart burning people to edit the default CONFIG.SYS with a hex-editor (would resolve the 8M Atarimax CLOCK.SYS problem, and also allow users to default to PROMPT $L$P>)

  Here's info from the MyIDE page.

Mr Atari's IDE-hardware for ATARI-XL/XEcomputers.

Chapter 1, IDE-protocoll

Port / Addresses used in ATARI.
(port can be D1xx=internal interface or D5xx=external):
----------------------------------------------------------
HEX.   DEC.  : READ    : WRITE
$D100 (54528): data    : data
$D101 (54529): error** : precomp***
$D102 (54530): R/W;sector count     (sectors to r/w, 0=256 sectors)
$D103 (54531): R/W;sector number    (sector, 1 t/m max sec/cyl)
$D104 (54532): R/W;cylinder low     (0 t/m max)
$D105 (54533): R/W;cylinder high
$D106 (54534): R/W;Drive+Head       (master xxx0xxxx, slave xxx1xxxx)
$D107 (54535): Status* : Command

*)      Set                            :Cleared
Bit 7 : busy                           :drive-logic is ready.
Bit 6 : ready for command              :busy or error.
Bit 3 : ready for data (after command) :error (invalid sector/head/cylinder).
Bit 1 : error during/after operation   :data transfer succesfull.

**)
Read this register to clear bit 1 or set bit 3 in status-register.

***)
precomp is not used by modern harddrives.

How to read/write :
-------------------
1) Set requested drive+head (Master or Slave becomes now active)
2) Read $D101 to clear any error-status.
3) Check/wait if status bit7 is cleared and drive is ready for command.
4) Set requested sectornumber, cylinder and sector-count.
5) Write command in command-register.
READ)  command is $21
       wait for status bit3 to set (data is ready)
       Check bit 1 and 6 for error (corrupt data)
       Read 256 bytes of data outof the data-register
WRITE) Command is $31
       Wait for status bit3 to set (ready for data)
       Write 256 bytes of data into the data-register
       Wait for status bit7 to clear (busy) and set (ready)
       Check bit 1 and 6 for error (corrupt write)

Note:
A IDE-interface handles 16 bit-words, but because a Atari is 8 bit,
the upper part of the word are zero's. This means, that only half
the drive-capacity can be used by the Atari.
The interface kan handle drives upto 65535 cylinders (32 GByte).

(Edited 8-mrt-2002 By Mr. Atari. No warranty)

7

(30 odpowiedzi, napisanych Fabryka - 8bit)

Hello.  I'm sorry if I posted in the wrong area, but I can't read Polish well.

What I want to do is, put SDX 4.39 on the Atarimax 1M + IDE.  The problem is, I need a driver in the SDX cart. for it so it can be booted and not need any OS-ROM changes.  OS in RAM is not an option, because I want to use TBASIC-XL. 

I know this would be a simple thing, to write a driver that checks for D1: on SIO, and if not found, boots from MyIDE.   

Would this be best put into SIO.SYS, or a new file CAR:MYIDE.SYS?

I know that MyIDE is not the best way to go, but it's all on a cart.  it's easily portable.  With the 128M flashdrive attached, it's a complete plug & play DOS & drive package.

Any and all help (in english) is HIGHLY appreciated!

Thanks!

-Kyle

kyle22(AT)operamail.com