home *** CD-ROM | disk | FTP | other *** search
/ ftp.whtech.com / ftp.whtech.com.tar / ftp.whtech.com / articles / archives / limanews.exe / LFT4.TXT < prev    next >
Text File  |  2006-10-19  |  22KB  |  343 lines

  1.        ORIGINALLY PUBLISHED IN LIMA NEWSLETTER JUNE 1993
  2.  
  3.              LETTER from AUSTRALIA - No. 4  Mar / 93   
  4.              ---------------------------------------   
  5.         
  6.              Last letter it was coming up to Xmas, and now the New Year
  7.        is well and truly under way, and already it is starting to feel
  8.        like summer had never really happened.  We just had a Federal
  9.        election yesterday, Saturday.  US readers of course had theirs on
  10.        regular schedule last November, but Canadian readers, if any,
  11.        will understand the system here where elections occur more or
  12.        less at the convenience of the pollies.  Also to confuse US
  13.        readers, the conservative party is called Liberal for historical
  14.        reasons, but was pushing policies to make Baroness Margaret
  15.        Thatcher proud, and proposing to make the medical system as like
  16.        the American model as possible.  The result caught two particular
  17.        people in Australia as an immense surprize.  The less surprized
  18.        of these was the previous Prime Minister who was partially
  19.        expecting to lose, and the other the Opposition Leader who
  20.        absolutely expected to win.  The PM had no trouble switching to
  21.        to a winner's acceptance speech, but the other fellow just
  22.        couldn't believe the result, and was pretty reluctant to admit
  23.        defeat and positively ungracious.  I had a look at the newspaper
  24.        headlines in the Sydney Sunday rags when I went down to the Minit
  25.        Mart for some milk the next morning (the more serious papers have
  26.        the same owners but come out in weekend editions on Saturday) and
  27.        here was the headline "Photo Finish" with a picture of the
  28.        Liberal leader underneath.  Not quite Chicago Tribune 1948 (it
  29.        did have a two way bet quality), but it was quite obvious which
  30.        way the editors had expected the result to go.  The TV networks
  31.        and all the computers had made it clear late the night before
  32.        that the current ALP government would be returned with an
  33.        increased majority.  No doubt all the promises from the pollies
  34.        are inoperative now the elections are over.  That seems to be a
  35.        political universal.  
  36.         
  37.              The Libs had imported some hired guns from George Bush's
  38.        campaigns, who came up with some very nasty TV ads, one showing a
  39.        voter in the cross-hairs of an assassin's rifle.  I guess these
  40.        guys are now two time losers.  How about the pollsters? Well
  41.        maybe some of them got it right within sampling error at the very
  42.        end, but at 6 pm on the TV news just as the voting closed in the
  43.        east of Australia, Gary Morgan - big cheese of the Morgan Gallup
  44.        poll - declared for a narrow Lib win.  The funny thing was his
  45.        own organization's exit polls showed clearly the opposite was
  46.        going to happen.  Such is the power of the running pack.  It's
  47.        like thinking that just because everyone is buying 80x86 PCs,
  48.        they are computers to be enthusiastic about.   
  49.         
  50.              Just reading the latest BB&P article on the CYC list.  Good
  51.        to see the Vincent and Gill book, 'Software Development Handbook'
  52.        mentioned.  This has been over the years my main source of
  53.        background information on 9995 and 99000 details, as well as a
  54.        good reference on 9900 family assembly programming.  Only part of
  55.        it is really relevant to 99/4a users, but it is a good general
  56.        text on program design.  I had always wondered if it had ever
  57.        made it to the US of A, as it was a product of the UK operation
  58.        of TI.  I saw it in the RadioSpares catalog years ago and ordered
  59.        a copy for the library.  I gather that 9900 series processors
  60.        were widely used in England in commercial applications, more so
  61.        than in USA.  
  62.         
  63.              I think I may have been too kind about Myarc in recent
  64.        Letters.  The 80-track ROM in my Myarc Floppy Disk Controller
  65.        (FDC hereafter) is not a genuine Myarc original but a modified
  66.        version from Richard Sierakowski in England, and works
  67.        consistently on DSQD (80-track) disks with 2 sectors per
  68.        allocation unit.  Recently I had occasion to install an original
  69.        Myarc DSR 80-track ROM in the Hawks Nest machine and found that
  70.        this this did not handle sector counts correctly in DSQD,
  71.        sometimes losing track of the last sector on record by record
  72.        saves of text files.   
  73.         
  74.              The gremlin that inhabited one of my 192Kb HRDs finally
  75.        stuck its head up far enough to get it lopped off.  This card,
  76.        though extremely neatly put together has always been strangely
  77.        unreliable on power cycling, even with the extra wire prescribed.
  78.        The other two live in the second machine which resides at Hawks
  79.        Nest, 50 miles away, while the Kotara home machine is supposed to
  80.        rely on the HRD3000b, and these have always been reliable, with
  81.        this third one as emergency backup.  With all the HRD3000
  82.        problems it has had to take the leading role again, even though
  83.        DSSD is inadequate for a serious collection of utilities.  It had
  84.        been behaving itself but then decided to die every time.  Maybe
  85.        it was surprize at seeing William back on the TI.  Nothing is
  86.        more likely to get a TI-99 consigned in anger to the back of the
  87.        deepest closet than a dodgy system boot HRD, and now both were
  88.        bad.  Out with the voltmeter, and all the NiCads looked good when
  89.        checked individually --- but in circuit the one at the earthy end
  90.        appeared to have reversed voltage reading.  Aha -- here was the
  91.        clue to all the troubles! The total voltage across the string of
  92.        good NiCads was fairly small.  The obvious conclusion was a open
  93.        circuit between the + end of the first cell and the solder tab,
  94.        and indeed the connection in the battery holder was only a press
  95.        fit which could be rotated.  So there it was, a dodgy battery
  96.        holder.  Now I know what the problem is, it just does not seem so
  97.        frustrating any more.  Geoff Trott down in Wollongong very kindly
  98.        checked out the HRD3000 and found that the 8K RAM chip was
  99.        causing it to hang.  The design seems fairly critical in these as
  100.        several samples had been substituted before.  So it worked but
  101.        now died on power cycling.  The green LED turned out to be one of
  102.        the low voltage jobs so I added a series diode as per Bud's
  103.        recent change order.  No joy on power cycling.  With the extra
  104.        diode raising the ante, the 3v lithium battery with its reverse
  105.        protection diode now seemed too low a supply.  After finding any
  106.        Li battery with solder leads, let alone a 4.5 V, impossible to
  107.        buy in Newcastle, I settled for a Varta 4 V NiCad battery as
  108.        replacement and installed it with suitable charging resistor.
  109.        Joy of joys, it worked like a charm, and I was even thinking the
  110.        time had come to install the RAMBO.  Then a week or so later it
  111.        started locking up again, and the old gloom descended.  At least
  112.        the small HRD is functional now.  Actually my own preference for
  113.        experiments in expanded memory in the past was to use my third
  114.        small HRD, but I have never felt able to spare it for that.  
  115.         
  116.              The !I Gotcha!s struck here too, renaming and apparently
  117.        reformatting a drive.  I was not at all amused, and singularly
  118.        unimpressed.  I must say I find the comment by Gary Bowser that
  119.        "it takes the system a very long time to realize an invalid drive
  120.        number or letter was picked" difficult to understand in any
  121.        reasonable ROS code.  Somehow it seems that doing some checksums
  122.        at power-up might be a better idea for user protection.  The
  123.        comment is almost as strange as that published in the Nov/92
  124.        Micropendium about the RAMBO developer's package.   
  125.         
  126.              One thing I can attest to is that the new SCSI card should
  127.        work quite well at the lowest level when the DSR is done.  It
  128.        will be at TI rather than Amiga speeds, but it works.  A real
  129.        attraction of SCSI for TI owners is that SCSI devices are
  130.        transferable to or from other machines.  How can I be so
  131.        confident? Well, there has been one in this very PE box,
  132.        communicating with a SCSI device over the bus (a 52 MB Quantum
  133.        drive, the preferred test device here - if any SCSI fixed hard
  134.        drive will upset a controller, a Quantum will).  William has now
  135.        gone to Sydney to a job in computer graphics and special effects,
  136.        but his last task in January before moving was to get back on the
  137.        TI to write the low level SCSI driver for the card.  So that was
  138.        done, with the benefit of years of experience of writing SCSI
  139.        drivers for Amiga cards, by a former master of 9900 code, and
  140.        should be a pretty solid foundation for the higher level DSR
  141.        functions being done elsewhere.  As he said a week or two ago,
  142.        when overcoming difficulties getting a new SCSI device, a
  143.        magneto-optical drive, running on his big Amiga - "SCSI is easy
  144.        -- if you know how to roll your own drivers".   
  145.         
  146.              The review topic for this Letter will be VDP memory and
  147.        disk DSRs, triggered by a letter I received and by the public
  148.        discussion of the I Gotchas.  The TI-99 was designed originally
  149.        in the days when memory cost a fortune and 8K was normal on most
  150.        smaller computers.  The disk peripheral was to be usable without
  151.        the 32K expansion, and to accomodate this need the disk DSR was
  152.        designed to operate with all RAM used (except for a small block
  153.        in the scratchpad) being in VDP memory as were Basic or XB
  154.        programs in the unexpanded machine.  The overall regular device
  155.        independent DSR structure of the machine has been an essential
  156.        reason for its continuing even now 10 years after its creators
  157.        set it adrift, but the downside of the original design is that we
  158.        are still living with that decision of TI's to use VDP memory for
  159.        functions that had nothing to do with video display.  TI allowed
  160.        for other devices to steal VDP memory, which permitted major new
  161.        developments such as 80-column cards to function.  In summary
  162.        then, as TI left it, disk DSR memory usage was as follows  
  163.         
  164.           (1) The DSR ROM itself in the range >4000 up to >6000 with
  165.           some addresses used for memory mapped byte wide
  166.           communication with the disk controller chip.   
  167.         
  168.           (2) CPU RAM in the scratchpad, >22 bytes from FAC at >834A
  169.           for communication with the DSR and scratch usage, as
  170.           specified and reserved by TI for use by any DSR.  Strictly
  171.           speaking DSR writers were at this stage not even allowed to
  172.           assume PAD was at >8300, and it had to derived from the GPL
  173.           workspace location.   
  174.         
  175.           (3) Areas in VDP RAM used transiently by the program for
  176.           setting up Peripheral Access Blocks (PABs) and for data
  177.           buffer areas, as generally specified by TI for all DSRs.   
  178.         
  179.           (4) A permanent block of VDP RAM used by the DSR to hold
  180.           disk information and for stack usage.  This had a
  181.           prescribed header at a VDP address stored in PAD at MAXMEM
  182.           >8370, a location to remember.  Normally space was allowed
  183.           at power-up for 3 files to be open, and more space had to
  184.           be assigned for extra files, or could be removed for fewer.
  185.           The disk DSR block extended up from there towards the top
  186.           of memory, and the internal details were not officially
  187.           available for applications programmers, though they
  188.           gradually became known.  TI did specify clearly in internal
  189.           documents that the TI disk DSR did not assume that the
  190.           block extended to the top of VDP at >3FFF, and that its
  191.           position always be located from the MAXMEM pointer.  This
  192.           block is only a detail that went with TI's FDC, and not an
  193.           essential feature of disk DSRs.  
  194.         
  195.              So that was the situation on Black Friday, 1983.  The first
  196.        new development was the CorComp disk controller, which apart from
  197.        that silly capture of the screen on power-up and non-standard
  198.        method of loading its disk manager, otherwise obeyed all of TI's
  199.        rules and matched TI's usage of VDP exactly.  Come to think of
  200.        it, I forgot to mention this in the last Letter as an example of
  201.        a DSR that captured the machine, but we have never had one so it
  202.        did not come to mind.  A later update eliminated the annoying
  203.        initial screen, and should be the one used in 80-column systems.
  204.        Most if not all programs of this era which attempted low level
  205.        access to disk details assumed absolute addresses in the VDP
  206.        block (TI internal documents emphasizing use of MAXMEM had not
  207.        leaked outside a tight and secretive circle at this time).   
  208.         
  209.              Next came the Myarc FDC, first and only ever seen here as a
  210.        PE box card.  This card was very different from the TI/CorComp in
  211.        its memory use.  The DSR ROM was bankswitched in two 4 Kb blocks
  212.        at >4000 and had an internal 2 Kb RAM at >5000.  It used more of
  213.        PAD on a temporary basis, otherwise its software intensive design
  214.        with minimal hardware assists would never have been able to
  215.        handle DD tracks (DD raw track reads are still dodgy at best but
  216.        are not routinely used, and it also has various file level bugs
  217.        and disk sector allocation incompatibilities).  The real change
  218.        was the use of the internal RAM for all disk buffering instead of
  219.        upper VDP, and also a convention for programs to signal use of
  220.        CPU RAM for data buffer areas.  The DSR initialized VDP RAM in
  221.        mimicry of TI cards but then ignored it.  The designers chose to
  222.        emulate the TI DSR in restricting the number of open files
  223.        according to CALL FILES(x) setting of the VDP pointer, instead of
  224.        always using the number available in the DSR RAM.  The later HFDC
  225.        seems to have followed the same general outline.  This approach
  226.        of faking handling of VDP was unnecessary and in retrospect a
  227.        very unwise decision that gave users less performance than they
  228.        could have had.  Myarc users could have had cassette length Basic
  229.        programs from disk all along. 
  230.         
  231.              It is clear then that the Myarc FDC had no business in VDP
  232.        supporting CALL FILES(x) in the first place, as the function was
  233.        specific to TI/CorComp disk DSR usage of VDP, and it was only
  234.        ever a command line function in Basic or XB.  Various TI programs
  235.        such as the Formatter and Assembler did manipulate VDP memory
  236.        allocation, but only to let an assumed TI FDC have adequate open
  237.        files.  The correct behavior for an FDC or emulation is to
  238.        support the >16 VDP file allocation subprogram as defined for TI
  239.        FDCs only if the DSR uses VDP in TI-style, and for programs which
  240.        call it to clear the error byte at >8350 first, and only flag an
  241.        error if the error byte is set, whether or not the subprogram is
  242.        found.  What is also crystal clear in retrospect, though obscured
  243.        at the time, was that as soon as the Myarc FDC card appeared, any
  244.        programming technique that assumed use of upper VDP by disk DSRs,
  245.        let alone intimate details of that area, was no longer generally
  246.        valid.  Funnelweb's boot tracking code after that time still
  247.        looked in VDP for TI/CorComp data but also checked for the Myarc
  248.        FDC, and if found assumed specific details in the Myarc internal
  249.        RAM.  The Funnelweb system always gave the user the option to
  250.        turn off this search altogether.  Long after this commercial
  251.        programs were still being issued that would not run on Myarc FDCs
  252.        because they rigidly assumed TI/CorComp VDP usage details.  
  253.         
  254.              The next big step was the first of the continuing family of
  255.        Horizon RAMdisks.  The Johnson/Ballman Miami ROSs for these cards
  256.        remained externally similar to the TI original (except that they
  257.        improperly ignored MAXMEM) and shared use of the VDP area with
  258.        the FDC, and observed the CALL FILES(x) limit.  Again in
  259.        hindsight this was an unnecessary and performance limiting design
  260.        decision.  When 80-column cards came along the last (Vn 7.3) of
  261.        these ROSs had to be patched to respect MAXMEM, but the public
  262.        availability of source code made this running correction
  263.        possible.  The HRDs by their nature contained RAM, and all
  264.        sectors on the simulated disks already were accessible at CPU RAM
  265.        speed and so did not need to be buffered from slow physical disks
  266.        to RAM for reasons of speed.  The later OPA Vn 8.1x ROSs have
  267.        embodied this understanding.  The HV99 Quest RD, though
  268.        internally very different, uses a ROS like 7.3 to this day, and
  269.        provides the test in my Myarc FDC based system of correct
  270.        function for TI/CorComp.  Funnelweb's internal Files(x)
  271.        equivalent routine became more complex to allow for possible
  272.        pushdown of MAXMEM by unknown small amount with arbitrary number
  273.        of files set.  It has to reserve VDP just in case it is needed by
  274.        a TI tyoe disk DSR so that all FDCs are handled transparently.
  275.        Life would be very much simpler all around if all disk DSRs were
  276.        like the Myarc model without the unnecessary CALL FILES.   
  277.         
  278.              Why are programmers interested in the leavings of disk DSRs
  279.        anyway? The reason is that most substantial program packages need
  280.        to load subsidiary files automatically from their original disk,
  281.        and the TI operating system made no direct provision for
  282.        returning information on which drive this disk was in.  Within
  283.        the package it is under control, but it is that first load by the
  284.        OS or another program that is the difficulty.  An elegant but
  285.        partial solution to this problem was given by Bruce Harrison
  286.        recently.  It relies on the prior use of standard form DSRLNK
  287.        routines to load the main program initially, that store
  288.        intermediate pointers in known PAD locations, and backtracks into
  289.        the DSR devicename list to find the last one used.  Given the
  290.        pointers, this is a properly device independent method.  I always
  291.        knew there had to be a reason why nonstandard DSRLNKs never
  292.        appealed.  Funnelweb now uses Bruce's method in FW and LOAD, with
  293.        the usual override provision.  You can't always work in the
  294.        simple-minded way of looking for "n" in the name "DSKn." so
  295.        expected.  Files loaded through a disk volume name or hard drive
  296.        path do not fit this model in the final detail, which is why
  297.        Funnelweb still needs alternative support for configuring in
  298.        pathname access.  Also direct DSR program level access (MENU, FW,
  299.        LOAD or whatever) as supported by Horizon style DSRs fails to
  300.        satisfy the necessary conditions.  The solution here is for the
  301.        DSR writer to arrange that the DSR ROM pointer in PAD is left at
  302.        the drive name entry "DSKn." on which the program called directly
  303.        by name was stored, just as if it had been loaded normally.  The
  304.        CRU pointer should already be correct.   
  305.         
  306.              This brings us to the latest letter from OPA as attached to
  307.        the March BB&P.  In the light of the above discussion, a well
  308.        written DSR for HRDs has no business with VDP at all, except to
  309.        look at PABs and read or write data if so instructed.  Since the
  310.        function of the HRD is to be indistinguishable from physical
  311.        drives, application programs must treat all alike.  This means
  312.        that if the Files(x) function is needed to cover TI type FDCs,
  313.        the program should provide its own universal routine to cover all
  314.        possibilities, or else handle the >16 subprogram correctly as
  315.        covered above.  Calling the physical FDC's VDP allocation routine
  316.        (subprogram >16) may not be adequate for the worst case of a 7.3
  317.        style ROS using VDP, combined with an FDC that ignores VDP and
  318.        this subprogram.  The OPA letter seems to be an implicit
  319.        admission that ROS 8.14 still has misconceived and bad code in
  320.        this area.  Pity, because it does so many other things so well.
  321.        There is this legacy of programs which make obsolete and now
  322.        clearly illegitimate VDP references, at absolute addresses in
  323.        worst case.  I believe the best way to handle such problems is to
  324.        do the DSR correctly in the first place, and provide special
  325.        options to handle ill-behaved programs, callable when needed
  326.        (like the AVPC's TI-Mode).  It is sometimes possible to cover up
  327.        for bad applications by cunning code called transparently.  If
  328.        Gary Bowser is unwilling or unable to update ROS 8.14 to fix its
  329.        sins of comission (VDP reference or interference, I Gotchas) or
  330.        omission (no 800K DSQD equivalent drives in big HRDs) then Bud
  331.        should hand it over to someone who will, as a solid DSR is an
  332.        essential part of the HRD, and leave OPA to supply alternative
  333.        third party products, all of them no doubt wonderful.  
  334.         
  335.              That had better be all for now folks, or it will soon be
  336.        Text Buffer Full.   
  337.         
  338.        Tony McGovern   
  339.        Funnelweb Farm  
  340.        Mar / 14 / 93   
  341.        .PL 1 
  342.  
  343.