Path: csiph.com!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Benoit0123 Newsgroups: comp.sys.apple2.programmer Subject: Re: Different prerequisites for ProDOS 8 MLI API Date: Sun, 12 Feb 2017 10:52:28 -0000 (UTC) Organization: Mac GUI Lines: 73 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Injection-Date: Sun, 12 Feb 2017 10:52:28 -0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="6015bbf642f1c787c8b604e0a190b444"; logging-data="16530"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18DXzgo7pR6IcVtckW1pkQn" User-Agent: Mac GUI Usenet In-Reply-To: Cancel-Lock: sha1:tKlKV3lG+lSsrEJj8ipd3vVnoDA= Xref: csiph.com comp.sys.apple2.programmer:3272 John Brooks wrote: > On Monday, February 6, 2017 at 5:44:59 AM UTC-8, Benoit0123 wrote: >> Hi all, >> I am in the process of developing a ProDOS 8 utility, and am getting >> getting >> some weird results in some cases. >> I got a look at two reference manuals available online, that is: >> The ProDOS 8 TRM, and >> Beneath Apple ProDOS by Don Worth and Peter Lechner. >> >> The requirement being on the io_buffer address that should be passed to >> the >> OPEN MLI call. >> The PRM states that the io_buffer address should point to a non allocated >> 1024 bytes buffer beginning at a page address ("$XY00" address) >> The Beneath Apple ProDOS states that the io_buffer address should point >> to a >> page with the same properties as stated above but in addition that the >> page >> number be *even* (I understand: divisible by 2). One block for the index >> data storage, and the other block for the data storage itself. >> >> For the time being the buffer setup start @ address $B900 and ends @ >> address >> $BCFF and I am getting some weird result but not always. >> My asking is: do you know from your experience if the requirement that >> the >> page # for specifying the buffer begin be even is a valid requirement or >> not. >> >> The buffers setup by BI (BASIC.SYSTEM) start @ adress $9600, $9200, ... >> so >> are always compliant with the stricter constraints quoted above. >> >> Thank your for any information on this, >> >> Anyway tonight I will reorganize my code and give it a try once I am back >> @ >> home. >> >> Regards, >> Benoît >> >> >> -- >> Growing old is mandatory.. >> growing up is optional.. >> But the other way round is as true. > > In ProDOS 2.4.1, the 1KB 'open file' buffers only need to be page aligned. > Perhaps an earlier version of ProDOS required even page alignment, but I > see no such requirement in 2.4.1. > > What kind of 'weird results' are you seeing when the buffer starts on an > odd page? > > -JB > @JBrooksBSI OK in my experience, as the time to read disk blocks for faulty pages (starting at RAM page $AA), instead of accessing absolute disk block $52A9 as it should, it tries to read disk block $5200 (see posted document on my site as quoted in a previous message). I've set a breakpoint on my device driver entry point for doing so: emulators are sometimes great tools.. ;-) Benoît -- Growing old is mandatory.. growing up is optional.. But the other way round is as true.