>Hi,
>
>Does BDOS use the standard TPA segments if you use the
>BDOS call random block read to read a file ?
>
>The reason i ask is that whenever i want to load the file in a
>segment switched by my memory manager (memman) the
>data is not present! It seems BDOS switches back the standard
>TPA segment and places the data in the standard TPA segment
>whenever loading. After that my segment is placed back... ?
>
>Only if i do not switch any segments or use the standard
>segment from the TPA the data is loaded correctly ?
>
>Is this correct ? or am i doing something wrong ?

I don't know about MemMan (what ver. nr. are you using?),
but this might help you:

Using own mapperSWITCH-routines (fast!)
======================================
If you allocate memory in Dos2 environment, you get a mapperpage ID back in
the A-register. This value corresponds with the value written to the
mapperselect-registers (I/O ports #FC-#FF).

So instead of using the Dos2 routines for mapperswitching, you can directly
write the value to the I/O-port of the page you want to select. However,
this has some sideeffects. You can't 'get' the current mapperpage with the
routines for that and the (some?) BDOS-routines set back the page to the
'original' page. Dos2 mapperselectroutines are as fast as possible, the only
thing they do is write the value to the mapperport and back it up somewhere
in the memory. The latter is not done when directly accessing the I/O ports
and I don't know if the used adresses are fixed.

So the problem is that the mapperpages aren't backed up. However, this can
be solved quite easily, the solution is to call the 'official'
mapperselect-routines and set the pages right before you call the BDOS. This
will work fine, and if one calls the BDOS it is clear that speed is not an
issue.

But please get this right: I am only talking about mapperswitching, not
about having your own allocation-routines (which highly likely won't work
all because the chance is large that you overwrite some other program's
memory, like the mem of LUNA or DOS itself or some other TSR).


More TPA.
==========
Antal, you already know this (I got the trick from you guys)...
If you need more TPA, then you can achieve that by switching away the system
area in page 3. As long as you have your own interruptroutine and don't call
the BDOS this will work fine. Use your own mapperroutines as described
above, and if you call the BDOS then just put back the system area and set
the pages 0-2 using the official mapperselect-routines. Then call the BDOS,
and afterwards put everything back the way you want it to be.

But now we're going VERY experimental. More TPA is in most cases not needed,
because if you don't use the Dos2-mapperroutines for mapperswitching (but DO
use them for allocating!) then switching a 16k segment only takes about 20
T-states... It isn't worth the hassle I think.


~Grauw


--
>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<
          email me: [EMAIL PROTECTED] or ICQ: 10196372
             visit the Datax homepage at http://datax.cjb.net/
MSX fair Bussum / MSX Marathon homepage: http://msxfair.cjb.net/
>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<


****
MSX Mailinglist. To unsubscribe, send an email to [EMAIL PROTECTED] and put
in the body (not subject) "unsubscribe msx [EMAIL PROTECTED]" (without the
quotes :-) Problems? contact [EMAIL PROTECTED] (www.stack.nl/~wiebe/mailinglist/)
****

Reply via email to