Why building this project ?--------------------------------------------------------------------------

Nowadays SCSI harddisks suitable for ATARI ST are hard to find (here in Germany) and very old. The needed SCSI controllers for Atari ST are even harder to find and expensive. There are no SCSI-cards and no small 2.5" SCSIharddisks avaliable. You can get only expensive SCSI-IDE adapters or SCSI card readers. Data exchange with PC is not so simple as by CF or SD cards.

Our solution (PPERA and me, POPSEL) is:

* Cheaper* Can be build at home* Needs less components* Is smaller (fits all into a 1040 ST case) * Offers better fexibility* Gives a higher speed than ACSI * Offers more than one TOS (optional)* Adds TOS 2.06 support (optional)* Comfortable to use* Silent operation if using a CF card

Information for building the IDE INTERFACE V2.0--------------------------------------------------------------------------

This is again a common project of PPERA & POPSEL.

Using this interface one can connect IDE harddisks or most

Compact Flash cards (in)to ATARI ST computers.

It is possible to build a 2.5" notebook harddisk into a 1040ST case.

With some modifications maximum speed of ATARI ST hardware is avaliable.

Normally only TOS 2.06 is able to boot from IDE.

PPERA found even solutions to boot from IDE with a patched TOS 1.4 or KAOS 1.4.2

An other big advantage is the ability to use up to 14 DOS (FAT16) compatible

partitions for easy file transfer with PC at maximum speed.

So one can copy data with PC onto harddisk / CF-card which can be used by ATARI

and vice versa.

This offers a maxium of 14 partitions with 2GB each = 28 GB total harddisk space,

even with TOS 1.4 or KAOS 1.4.2

To get the hightest maxium speed we need some special tricks:

* Partitioning of harddisk or CF-card on PC as type FAT16 * A special IDE-cable* A patched TOS* A special harddisk driver (PPERA's)* Freeware program BIGDOS in AUTO folder

To learn the details about setting up the software and usage

Ppera offers a separate software guide for this project.

Due to many ATARI mainboard versions I wanted to create an

IDE Interface as small as possible.

Now you can choose between two IDE Interface PCB versions:

There is one single sided PCB (some wires are required on bottom side).

Beside there is a double sided PCB version (no wires, not so easy to build).

Both versions have the same function. They are optimized to build at home.

This is an expansion for the IDE V2.00 Interface. So the IDE V2.00 Interface

can be used single or in combination with FLASHABLE TOS. If you want a

single Flashable TOS there is already a solution for this avaliable.

What can you do with a Flashable TOS ?

A TOS can be changed without opening the machine by programming

with PPERA's special software by using re-programmable EEPROM chips

for TOS instead of ROMS or EPROMS.

There is enough space to keep up to 4 TOS versions in two EEPROM chips.

Further there is build in support for TOS 2.06.

With this IDE-INTERFACE V2.00 there are several, bootable, TOS versions avaliable.

TOS versions below TOS 1.4 can only be used with Flashable TOS and floppys, because

they have too many errors to use it with a harddisk / CF-card.

To keep switching between TOS versions simple this task is manged by a very small

AVR-controller. This offers several functions with only one momentary switch.

* Switching between TOS versions* Activating and deactivating of hardware write-lock for TOS EEPROMS* TOS-locking to prevent unwanted switching of TOS while computer is in use* Optical feedback with a DUO-LED to show the state & function

Get more information by looking at the FLASHABLE TOS TOPIC in the guides section.

How to build this hardware ?-------------------------------------------------------------------------------

To build this project there is a separate guide with a lot of photos avaliable.

As is known, we need driver SW for hard disks/flash cards attached to Atari ST and followers. We need to partition hard disks/cards (in further text just 'drives' ) before usage, and after it to install autoboot driver for simplest and fastest work.

There is 2 type of partitioning used by Atari ST : AHDI type and PC DOS type. Atari defined some standards and recommendations for using hard disks with ST and followers. It has some minor flaws, but bigger problem is that it is now very obsolete. Today we don't need bad sector lists, low level format and similar things - new drives just not use or support such things.

As we don't have any support in TOS for AHDI type partitioning I don't see real reason to use it. We can use PC DOS type partitioning, what will ensure easy data transfer in relation Atari-PC, especially when use Flash cards. PC and Atari have support for FAT16 partitions (Atari in TOS), however such partitions are compatible only if are below 32MB, with clusters of 1KB. Most interesting, BIGDOS partitions (32MB-2GB) are not compatible, because of different parameters as logical sector size, and sector addressing ( 16 or 32 bit ). Fortunatelly, we have freeware program BIGDOS for Atari ST, which extends TOS, so it can work with larger BIGDOS PC partitions. By IDE drives/interfaces we have problem of speed too, because of different byte order by Intel and Motorola CPUs. It means that Atari needs to perform byte-swap by IDE disk R/W operations, what decreases speed significantly - more about later. Just to say that with HW byte-swap we can have both: max speed and compatibility at once.

So, what user can choice ? AHDI partitioning and using one of popular drivers as Hddriver or AHDI. There are some other drivers, but are pretty obsolete, together with AHDI, so only Hddriver is real choice with modern disks, but it is not cheap.Hddriver supports PC DOS partitioned disks too, but also needs BIGDOS and has problems with autoboot.

We recommend freeware solution, with driver under active development which supports up to 14 PC DOS partitions. There are some minor limitations and things to care, but when everything is set well it may work fine and can use larger capacities - tenths of GB-es.

First step, the partitioning: there is a lot of (freeware) partitioning programs for PC, so logical is to use them, as we want compatible drives. May use even part of DOS/Win FDISK. But it is not really recommended in age of Windows, for which we have better partitioners. As Win XP is most popular we will see how to solve partitioning under it. In case of some regular hard disk (3.5 or 2.5 inch one) things go pretty straighward: attach drive to PC (when is powered off, of course) and start machine. When Windows is up may go in: Control Panel, Administrative Tools, Computer Management, Disk Management and partition. By partitioning keep following: make only FAT16 partitions (except if want to use Mint - then may make FAT32 too). Always make 1 primary and others as logical drives in extended partition (which should use all remaining space). Some limitations: BIGDOS needs cluster size of minimum 2KB (4 sectors) - it means that if partition is under 64MB you need to set manually cluster size in partitioner. Max FAT16 partition size supported is 2GB, as is known. But we have additional limit for boot partition - 1GB. It is caused by inability of TOS 1.04, 1.06/1.62, 2.06 to load BIGDOS if cluster size is bigger than 16KB. Over 1GB cluster size is 32KB. KAOS TOS 1.4.2 can load BIGDOS even from 2GB partition. Note: boot partition may be any - selection is by driver loading, after reset of ST. In real usage it is enough to have max. 3-4 boot partitions for different configurations. If partition is not boot, it may be up to 2GB, and will be fine usable.

After partitioning is important to copy BIGDOS in every partition intended for be boot, while it is empty, as BIGDOS must be at partition beginning (for successfull load of). So create AUTO dir, and copy BIGDOS into. In some rare cases BIGDOS should be not the first program in AUTO - for instance if using Overscan). When BIGDOS is placed, may attach drive to Atari and installing driver.

IDEDUD09.ZIP

Installation is from floppy, of course. Program will print IDE connection type (regular or twisted) and after confirmation will be installed (if drive is really DOS partitioned). After it may start usage - restart ST. Driver will detect partitions and then may select boot-partition by pressing key D - last partition's letter. First partition on drive will be then pressed letter, and pressed one C (as boot partition is always C) - all AUTO, ACC, Desktop setting will be loaded from...

Driver is 'dual' what means that will work with regular and twisted IDE connection (cable) without any further settings, modifications.

Autoboot: only TOS 2.06 has autoboot from IDE drives, and of course only from regular IDE. So, now comes interesting part:

TOS patches for IDE autoboot:I made patches for TOS 1.04, KAOS 1.4.2, TOS 1.06/1.62 and TOS 2.06 . All them support autoboot from regular and twisted IDE, plus decrease waiting times if drive is not present (about half - 1 sec). Other drivers will autoboot only from TOS 2.06, regular IDE. Reason is that they use some new XBIOS calls by booting, present only in TOS 2.06. And of course no other driver supports twisted IDE.In archive are all patches with sources, description:

TOSIDEP2.ZIP

Patching is from 2 stages: first is jump to additional boot code, and is 6 bytes long - simplest is to do with some Hex file editor, at right place. Recommended one is free HxD for PC. Second is injecting of short BIN code into TOS ROM image file.With HxD it is pretty simple: load correct BIN patch file for your TOS and select All, Ctrl-C (Copy). Then load TOS image file and go to right position. With mouse select same count of bytes as long is patch BIN. Then press Ctrl-V (Paste). If HxD says that it will change file length you did something wrong, so cancel. Otherwise it will replace all selected bytes, and you may save patched TOS image.

In next part will describe how to override XP's one partition limit for removable drives...

You do not have the required permissions to view the files attached to this post.

Last edited by ppera on Wed Nov 26, 2008 1:04 pm, edited 1 time in total.

Windows XP allows access only to first partition on removable storage devices as Compact Flash, SD cards and similar. Also, partitioning of such devices is not possible under Win XP - you may create only one partition, without partition table. This is very bad situation for Atari ST users. Fortunately, we have some solutions against.

We need special driver, which will handle flash cards as fixed drives under XP:

xpfildrvr1224_320.zip

. Unpack it in some specific dir. Then open Regedit and go to: HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Enum\USBSTOR . Double click it to open. We need : Disk&Ven_Generic&Prod_USB_CF_Reader&Rev_1.01 and/or Disk&Ven_Generic&Prod_USB_SD_Reader&Rev_1.00 from there. Depending on your config you may have little different Key values. Use 'Copy Key Name' (after Right click) . It may happen that your registry key(s) are at little different space - may be ....\ControlSet00x... or ...\CurrentControlSet... .

We need only last part from, like: USBSTOR\Disk&Ven_Generic&Prod_USB_CF_Reader&Rev_1.01

Then open cfadisk.inf in Notepad from unpacked xpfildrv. Now you need to replace all lines %Microdrive_devdesc% = cfadisk_install, specific data with the end of line you copied from your registry like so.

There could be more lines so replace all and save the file. Best is to save with device type in name - cfadiskCF.inf for instance. For SD it may be cfadiskSD.inf ...

Now need only to install it: attach USB card reader with card inserted to PC, open device manager and double click proper card among 'disk drives' . Click tab Driver, Update Driver, Install from Specific location, and install just created cfadiskXX.inf .Now XP will see all partitions on card, and you will be able to (re)partition it. Note: you may do described for Pen drives too.

The partitioning:It can be done with XP's very good partitioning tool: Control Panel, Administrative Tools, Computer Management, Disk Management .... But I will give example of partitioning with freeware EASEUS partitioner.

It is very similar to Partition Magic. Always create first partition as primary and others as logical. Always FAT16 partitions, unless you plan to use Mint .BIGDOS limitation: minimal cluster size is 2KB (or 4 sectors). If partition is smaller than 64MB you need to fix it's cluster size: right click on part., and select format, then set 2KB.

easeus1.png

Maximal cluster size is 32KB, for partitions between 1GB and 2GB. However, we have additional limit here - TOS 1.04, 2.06, 1.06/1.62 will not load BIGDOS if cluster size is 32KB. So, boot partition must be max 1GB. Non-boot partitions may be up to 2GB. But I do not recommend so large sizes if drive is not so big. Work is much faster with smaller partitions. So, on some card of 2-4 GB is better to have several smaller partitions - up to 14 ones (C-P).

You do not have the required permissions to view the files attached to this post.

As Intel and Motorola CPUs have reversed high/low byte order in 16-bit words, and IDE IF is 16 bit it happened that we need to perform byte-swap if want to read datas written on other machine - or if want to be compatible.

Byte swap can be done by SW of course, but it degrades hard disk/memory card transfer speeds significantly. Instead some 1300KB/sec we have 350KB/sec. With blitter it can be better, around 700KB/sec.

Best solution is to do hardware byte-swap, especially if we already plan to patch TOS. HW swap may be done on IDE cable by separating lines 3-18 and turn them by 180 degrees (similar as floppy cable by PCs). It will result with swapping of bits: D0 with D8, D1 with D9... D7 with D15. Swapping can be done of course on IDE IF - for instance by cable connecting.