On Tue, 23 Oct 2001, Floris 'Tamama' van Gog wrote:

> > to the specification of one these routines, the one for reading/writing
> > sectors from a drive (address &H4010 of the disk ROM, if I remember
> > correctly), the initial sector number to be accessed is expressed as a
> > 16 bit number, so it seems impossible to make partitions of more than
> > 32MB.
>
> If the drive can have more than 1 partition the interface can access more
> than 32MB as well.
> We simply need to read the _absolute_ sectors, and not the sectors relative
> to the partition.

Yes, but the problem is that the standard routines take 16 bit sector
numbers, which gives you a limit on the range. You could partition your
disk and write a driver around it so the user doesn't see it, but this
would imo be a really dirty hack.

The only good way to do this, is to write a driver for your OS (if it is
compatible to MSXDOS* or not is not important) for every disk interface
you want to use. The best way to make the whole thing work is then to
create some compiling options and distribute the source code. Hmm, this
sounds like the linux kernel? That's right, they use exactly this
principle: a user will compile his/her own piece of software, containing
only the drivers he/she actually needs. This reduces the size of the
product, which is a good thing.

Another nice thing about this approach is that it would be pretty easy to
use a different filesystem (ext2, reiserfs, ...) This is only possible,
however, if the hardware driver and the filesystem driver are seperately
programmed, so please do so (whoever will do it). You may want to support
different filesystems at the same time, so the floppy can be MSXDOS
(FAT12), the harddisk reiserfs and a different virtual drive NFS or SMB
(networking file systems). If you want to support the latter, you must
make sure not to assume that a partition has a length (or at least not a
fixed length). If anyone will start implementing this, I would like to be
told about it, so I can take part in the discussion about how to do it.

Unfortunately, I cannot do it myself, since I have an RSI (problems with
my hands because of too much typing :-( ). (Yes, this mail is much too
long.)

> I dont know if there is an interface for it, or that the diskrom is supposed
> to do all the partition work by itself...

The disk rom is the interface between the system calls and the hardware.
So it will be the task of the disk rom to find out on which partition to
write. To the software making the system calls, there will just be a
number of disks (MSXDOS is a pretty low-level shell over the system
calls).

Bye,

-- 
/** mastermind. input 4 numbers 0-5. output <right>.<in the right place> **/

 main(){int  c[4]   ,x=3  ,l=getpid()  ,i;;   for(  srand(l);c[  x]=-   rand
()%6         ,x--   ;);;  for(         ;44>   x;){  char         a[9] ,*p=
 "%.1f\n",   b[9];x=i=0;  gets(a);for   (l=4 ;l--   ;)x+=-(a[l]  -=48)==
       (b[l  ]=c[   l]);  ;for           (l=0;16    >i;l         =++i %4)x
+=(b[i/4]+   a[l]   ?0:(  a[l]=b[i/4]     =10))     ;printf(p,x  *.1)   ;};}

--
For info, see http://www.stack.nl/~wynke/MSX/listinfo.html

Reply via email to