] I hope I interpreted the source correctly (Alex, please correct me if I
] didn't), but the routines that are actually called are copied into RAM
] somewhere without interfering with the other code. The code initializing
] this is called once and will not be called again.
This is correct.
] The only problem that
] could occur is the selection of drives cannot be so easily changed, but if
] you just set the drives that are used by the IDE-Interface (which is easy as
] every drive is a seperate byte). Currently this is DOS2. If there would be a
] 'DOS3' then it would be silly to implement it.
Indeed. I use a table of 8 bytes to specify per logical drive if CPU
switching is required or not. In the distribution of the program (the archive
file with the compiled version) I use a small basic program to load the bin
program. This small basic program loads the bin program and pokes the
appropriate values in this list of 8 characters. This gives the people the
opportunity to customize the behaviour for their own hardware configuration.
]
] >2. Like said in previous mail:
] >> Also technically speaking it is not possible to call R800
] >switching
] >> routines from within the IDE bios...
There is no need to call the R800 switching routines. Under normal
circumstances the R800 is enabled (at least, when you are working in turbo
mode). However, since the standard floppy disk interface can not handle this,
the DOS2 of the MSX turbo R has a build-in feature to switch back to Z80 just
before calling the low-level i/o driver of the disk interface. This switching
is handled by a hook in the system ram area. I capture this hook and bend it
to my routine. There I check if the CPU should be switched back to Z80 or not
(depending on the value in the table). If the CPU must be switched back to
Z80, I will allow the DOS2 routines to call the appropriate code. Otherwise,
I prevent the DOS2 routines from doing so.
The DOS2 routines in their turn make sure that they select the BIOS, call the
CPU switch routine and restore the memory configuration afterwards.
So, my code is rather simple, since it is DOS2 that does the hard part of
switching the CPU. The main purpose that I had with publishing the code was
to illustrate how to make resident programs that stay in the memory of the
MSX. That this code also demonstrates how to prevent DOS2 from switching the
CPU is just a nice side effect...
Kind regards,
Alex Wulms
--
Visit The MSX Plaza (http://www.inter.nl.net/users/A.P.Wulms) for info
on XelaSoft, Merlasoft, Quadrivium, XSA Disk images, the MSX Hardware list,
SD-Snatcher on fMSX, documentation and lots more.
****
MSX Mailinglist. To unsubscribe, send an email to [EMAIL PROTECTED]
and put "unsubscribe msx [EMAIL PROTECTED]" (without the quotes) in
the body (not the subject) of the message.
Problems? contact [EMAIL PROTECTED]
More information on MSX can be found in the following places:
The MSX faq: http://www.faq.msxnet.org/
The MSX newsgroup: comp.sys.msx
The MSX IRC channel: #MSX on Undernet
****