[comp.sys.atari.st] High density Floppies on ST

pegram@uvm-gen.UUCP (pegram r) (11/23/89)

Rats! I looked up the possible seek rates last night, 6 msec is as slow
as she goes.  It would also be hard to boot from a floppy with this
mod (double - 16Mhz - clock for 1772 + formatter + "6"msec seek rate).
Do you have to have a seek rate setting boot sector on every boot
floppy and would that idea even work?

 
 Bob Pegram (pegram@griffin.uvm-gen.uvm.edu)
 
 

hase@netmbx.UUCP (Hartmut Semken) (11/26/89)

In article <1346@uvm-gen.UUCP> pegram@uvm-gen.UUCP (pegram r) writes:
>
>Rats! I looked up the possible seek rates last night, 6 msec is as slow
>as she goes.

Hmm, TOS will step at 6,12,2,3 msec (with rate codes 0,1,2,3).
Setting the controller to 6 msec and doubling the clock works for almost
all 3.5 inch HD drives.

>It would also be hard to boot from a floppy with this
>mod (double - 16Mhz - clock for 1772 + formatter + "6"msec seek rate).
>Do you have to have a seek rate setting boot sector on every boot
>floppy and would that idea even work?

Sure, that should work, since nosteps schould be necessary to read the
boot sector.
I boot from harddisk...

If the HD-floppy does not work after modifying the ST, the step pule
width is a probable cause.
In that case, use an edge-triggered monoflop to "resize" the pulse.

hase
-- 
Hartmut Semken, Lupsteiner Weg 67, 1000 Berlin 37 hase@netmbx.UUCP
Dennis had stepped up into the top seat whet its founder had died of a
lethal overdose of brick wall, taken while under the influence of a
Ferrari and a bottle of tequila. (Douglas Adams; the long dark teatime...)

pegram@uvm-gen.UUCP (pegram r) (11/27/89)

From article <3838@netmbx.UUCP>, by hase@netmbx.UUCP (Hartmut Semken):

> Hmm, TOS will step at 6,12,2,3 msec (with rate codes 0,1,2,3).  
>Setting the controller to 6 msec and doubling the clock works for almost 
> all 3.5 inch HD drives.  
> >>It would also be hard to boot
from a floppy with this 
>>mod (double - 16Mhz - clock for 1772 + formatter + "6"msec seek rate).  
>>Do you have to have a seek rate setting boot sector on every boot 
>>floppy and would that idea even work?  
> > Sure, that should work, since no steps should be necessary to read the 
> boot sector.  
> I boot from harddisk...  
> > If the HD-floppy does not work after modifying the ST, the step pulse 
> width is a probable cause.  
> In that case, use an edge-triggered monoflop (1-shot?? RBP III)to "resize" 
> the pulse.
> hase 
> -- > Hartmut Semken, Lupsteiner Weg 67, 1000 Berlin 37 hase@netmbx.UUCP

Thanks for all the info, Abacus books bite the dust again. I'll get a
HD 3.5 floppy drive and let the net know how my '85 520 likes it.
Could you please post how - where to get your HD formatter, I'm sure
others would also like to know.  This is, after all, a real drive
upgrade and not that hard to do (wish Atari had thought of it, it's
also cheap - right up their alley).  I will be checking to make sure
that 1772s can generally handle the 16 Mhz clock.  Any more comments
anyone?  Sure hope that different formats are noticed automatically, as I
think they are.
thanks,
Bob Pegram (pegram@griffin.uvm-gen.uvm.edu)

hase@netmbx.UUCP (Hartmut Semken) (11/30/89)

In article <1348@uvm-gen.UUCP> pegram@uvm-gen.UUCP (pegram r) writes:
>Thanks for all the info, Abacus books bite the dust again. I'll get a
Abacus Internals (or the german original, Atari ST Intern by Data
Becker) was source of my wisdom as well :-)
>HD 3.5 floppy drive and let the net know how my '85 520 likes it.
My 1985 520 ST plus likes it :-)

BTW, the WD1772 is specified to run at clock frequencies up to 10 MHz;
16 MHz is somewhat out of spec, but it works.

I'm preparing a more detailled set of instructions how to use HD
floppies with the ST. Hang on.

As for the formatter: here ist goes (it's so short...)
It was hacked from the example foramtter in the MWC Lexicon. it compiles
with MWC; link with -VGEMAPP to exclude the long startup (if You wish).

----
/* formath.c Formatter fuer High Density Disketten */
/* nur fuer angepasste Hardware! Floppycontroller und Laufwerk */
/* muessen High-Density tauglich sein! */
/* Hartmut Semken, Lupsteiner Weg 67 1000 Berlin 37 */
/* hase@netmbx.UUCP */
/* 03-SEP-89 */
#include <stdio.h>
#include <osbind.h>
#include <time.h>

#define SLEEPTIME 1	/* 1: Zeitschleife, 0: Taste */
#define BLANK (0xE5E5)
#define MAGIC (0x87654321L)
#define BUFSIZE (20*1024) /* Platz fuer mehr als 18 Sektoren... */

#define DEVICE 0	/* 0 = Floppy A, 1 = Floppy B	*/
#define SIDES 2		/* je  				*/
#define SECTORS 18	/* nach				*/
#define TRACKS 80	/*Belieben			*/

#define TOTSEC (TRACKS * SIDES * SECTORS)

extern int errno;

main(){
	int track;
	int side;
	int status;
	short *bf;
	register char reply;
	short *middle;
	char buffer[512];
		
	printf("\033E\n");
	printf("Public Domain High Density Mini Formatter\n");
	printf("von H. Semken\nDer Autor garantiert in keiner Weise fr die Funktion\nDieses Programmes.\nBenutzung auf eigene Gefahr.\n");
	printf("\n\n\n");
	printf("\007\033pFormatiere Diskette in Drive %c\033q\n%d Seiten\n%d Sektoren pro Spur\n%d Spuren\n\n", (65+DEVICE), SIDES, SECTORS, TRACKS);
	printf("Wirklich formatieren? ");
	fflush(stdout);
	if ((reply = Crawcin()) != 'y' && reply != 'Y' && reply != 'j' && reply != 'J') {
		printf("Nein. Floppy nicht formatiert.\n");
		sleep(1);
		Pterm0();
	}
	printf("Ja.\n");
	printf("Diskette einlegen; Taste drcken...");
	fflush(stdout);
	Crawcin();
	printf("\n");
	bf = malloc(BUFSIZE);
	for (track = TRACKS-1; track >= 0; track--) {
		for (side = 0; side < SIDES; side++) {
			printf("Formatiere Spur %d, Seite %d", track, side);
			fflush(stdout);
			status = Flopfmt(bf, 0L, DEVICE, SECTORS, track, side, 1, MAGIC, BLANK);
			if (status) {
				middle = bf;
				printf("\t%d\n", status);
				while (*middle) {
					printf("\tDefekter Sektor %d\n", *middle++);
				}
			} else {
				printf("\tokay\r");
			}
		}
	}
	printf("\n\nAlle Spuren formatiert\n");
	printf("Initialisiere Directory\n");
	for (track = 0; track < (BUFSIZE>>1); bf[track++] = 0);
	for (track = 0; track < 2;track++) {
		for (side = 0; side < SIDES; side++){
		if (status = Flopwr(bf, 0L, DEVICE, 1, track, side, SECTORS)) {
			errno = -status;
			perror("Write Error");
		}
		}
	}
	Protobt(buffer, (long)Random(),3,0); /* Prototyp Bootsector fr 
	                                      * 80 * 2 * 9 Sektoren */
	/* Prototyp Bootsektor fr das neue Format anpassen */
	/* Bytes 19 und 20 enthalten die Sektoren pro Disk */

	/* unteres Byte von TOTSEC */
	buffer[19] = (char)(((TOTSEC>>8)<<8)^TOTSEC);
	/* oberes Byte von TOTSEC; es lebe das Intel int-Format */
	buffer[20] = (char)(TOTSEC>>8);
	buffer[24] = (char)SECTORS; /* Sektoren pro Spur */
	status = Flopwr(buffer, 0L, DEVICE, 1, 0, 0, 1);
	if (status) {
		errno = -status;
		perror("Write Error (Bootsector)");
	}
	status = Flopver(buffer, 0L, DEVICE, 1, 0, 0, 1);
	if (status) {
		errno = -status;
		perror("Verify Error (Bootsector)");
	}
	printf("Diskette in Laufwerk %c formatiert\n", (65+DEVICE));
	sleep(1);
	Pterm0();
}

sleep(seconds)
int seconds;
#if SLEEPTIME
{
	clock_t t;
	for(t = clock();clock() < (t + CLK_TCK*seconds););
}
#else
{
	printf("Taste druecken\n");
	fflush(stdout);
	Crawcin();
}
#endif

-----
Set seek rate to 6 Milliseconds for *all* drives (with *any* TOS
version; tested on Rainbow TOS, BLiTTER TOS and TO 1.0):

/	module name seek6

	.shri

	.globl main_
main_:
	clr.l	-(sp)
	move.w	$0x20,-(sp)
	trap	$1
	addq.l	$6,a7
	move.l	d0,_save_ssp
	move.w	$0,0x440	/ 0,1,2,3 => 6,12,2,3 Milliseconds
	lea	0x46a,a0
	move.l	(a0),d0
	movea.l	d0,a0
	jsr	(a0)
	move.l	_save_ssp,-(sp)
	move.w	$0x20,-(sp)
	trap	$1
	addq.l	$6,a7
	.even
_save_ssp:
	.blkl	1


hase
-- 
Hartmut Semken, Lupsteiner Weg 67, 1000 Berlin 37 hase@netmbx.UUCP
Dennis had stepped up into the top seat whet its founder had died of a
lethal overdose of brick wall, taken while under the influence of a
Ferrari and a bottle of tequila. (Douglas Adams; the long dark teatime...)