🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.acorn.programmer
Article #2

Re: Watford Electronics IDE Interface

#2
From: Reg Hems
Date: Mon, 01 Mar 1999 00:00
90 lines
4234 bytes
In article <487ebc3a73reghems@argonet.co.uk> (1-9-98) Reg Hems wrote:
> In article <487DFB729C%news@ymbj.demon.com.uk> Darren Salt wrote:
>> In message <487dc5d39areghems@argonet.co.uk> Reg Hems wrote:
>>> On Sat, 22 Aug 1998, Les Boorman wrote:

>>>> I've just plugged this into my RiscPC. It is a Watford 
>>>> Electronics Hard Disc Controller? Still none the wiser.
>>> I have a Watford Electronics IDE Interface with a 37 way D-Type
>>> connector on the rear of the card for an External Drive, needing
>>> a 37 way D-Type to 40 way IDC screened cable.

> I have been trying to reinitialise my 504 Mb Maxtor to 499 Mb i.e.
> - 1013 cylinders:
> -       1013 * 16 * 63 * 512/1.024^2 = 498.585.7 Mb
> to reduce the LFAU from 2048 to 1024 bytes but WE !IDEFormat 
> kept insisting on 2048 bytes.

Done it. At last :))))

> I identified the relevant PROC in !IDEFormat. First it calculates
> the Disk size in K, then:
 
> Disk size <  40 Kb           - LFAU  512 Kb
>           >= 40 AND <= 180   -      1024 Kb
>           >  180 Kb          -      2048 Kb

WE !IDEForm (v1.26 1991), based on Acorn's !Hform, was produced for
the 100 Mb Rodime, originally supplied with the Watford Interface.

> DEF PROCsize
>  Local s%
>  [....]
>  IF s% < 40*1024 THEN
>     PROCSetIconState2(driveconf%,filealloc%,0,0,28,STR$(512))
>  ELSE
>     IF s% > 180*1024 THEN
>        PROCSetIconState2(driveconf%,filealloc%,0,0,28,STR$(2048))
>     ELSE
>         PROCSetIconState2(driveconf%,filealloc%,0,0,28,STR$(1024))
>  ENDIF:ENDIF:E.

> I changed 180 to 499 and it produces LFAU 1024 (obviously)....
> However, when it looks for Disk defects it reaches 1012 (of 1013)
> cylinders and then gives a 'missing/unknown variable' error. 
> Oh well, I will have to try and step through the BASIC program...

Famous last words.

>> Hmm. Try this instead of the above IF ....
[snip]

I have now stepped through it using !Trace by Cliff Downs. This is
a cyclic debugging application which modifies the BASIC source
program and restores it again after debugging has finished.

The 'missing variable' occurred after leaving a For-NEXT loop.

: F.I%=0 TO Zones%*SecSize%-4 S.4
:  Buf%!I%=0
: N.I%

The last variables traced were:
    Zones%=126
    SecSize%=512    >> 126*512=64512=&FC00
    Buf%=224352     >> but Line 22090 : DIM buf% &8000    
    I%=64512

So the variable has been walking all over the memory map ;)

I changed Line 22090 : DIM buf% &FC01.

I now have an IDE HD of 522,805,248 bytes=498.585937 Mb
Running Fsck confirms LFAU=2048 Kb.
 
Thanks to Cliff for his !Trace program and Darren, Adny, John Kortink
for their help at various times. 
�
* Never be afraid to mislabel a product - Ferengi rule 239 of acquisition.

-- 
Reg Hems ZFC LXV2 \_
BBC B Micro Issue 3 \_
420/1-IDE-RO3.11-4 Mb \_
Atomwide Serial 2-Ports \_
USR Sportster 28.8-57600b \_
      reghems@argonet.co.uk |
Uploaded to news.dial.pipex.com on Tue,02 Mar 1999.00:03:23
Uploaded to news.dial.pipex.com on Tue,02 Mar 1999.02:01:26
Uploaded to news.dial.pipex.com on Tue,02 Mar 1999.02:01:39
Uploaded to news.dial.pipex.com on Tue,02 Mar 1999.11:07:21
Technical Details
Message-ID: <48dc313c0areghems@argonet.co.uk>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <487710bb08Les@downlands.demon.co.uk> <ant17164706c52QK@pinknoise.demon.co.uk> <48798c402dLes@downlands.demon.co.uk> <Pine.SOL.3.94.980824093415.5122B-100000@samphrey.dcs.ed.ac.uk> <19980829.112533.73@marketto.demon.co.uk> <487dc2bc64reghems@argonet.co.uk> <487dc5d39areghems@argonet.co.uk> <487DFB729C%news@youmustbejoking.demon.com.uk>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: fa3dd,cbf83f29d8823226,start
X-Google-Attributes: gidfa3dd,public
X-Google-Thread: 1046d6,cbf83f29d8823226,start
X-Google-Attributes: gid1046d6,public
From: Reg Hems <reghems@argonet.co.uk>
Subject: Re: Watford Electronics IDE Interface
Date: 1999/03/01
Message-ID: <48dc313c0areghems@argonet.co.uk>
X-Deja-AN: 450319469
Content-Transfer-Encoding: 8bit
References: <487710bb08Les@downlands.demon.co.uk> <ant17164706c52QK@pinknoise.demon.co.uk> <48798c402dLes@downlands.demon.co.uk>  <Pine.SOL.3.94.980824093415.5122B-100000@samphrey.dcs.ed.ac.uk> <19980829.112533.73@marketto.demon.co.uk> <487dc2bc64reghems@argonet.co.uk>  <487dc5d39areghems@argonet.co.uk> <487DFB729C%news@youmustbejoking.demon.com.uk>
Followup-To: comp.sys.acorn.programmer
Content-Type: text/plain; charset=iso-8859-1
X-NNTP-Poster: NewsHound v1.37�
Organization: Wazzat
Mime-Version: 1.0
User-Agent: Pluto/1.11d  (RISC-OS/3.1)
Newsgroups: comp.sys.acorn.programmer,argonet.acorn.assist