Hi! >> I think it's only possible with a basic device and not with a >> dos device. > >The method you described is the way to add a device to BASIC. The easiest >example is probably the MEM: device in the MSX2 subrom. By disassembling >that you can get an idea of how it works. That's true. The method of adding a basic device is very much close to the basic CALL handling and it is completely described in the "MSX Red Book". >There must also be a way to add a device to DOS, ramdisk programs do >this. But I don't know how, someone please enlighten us... If you just want a byte-oriented I/O device (without file structure on it) than you may use the standard AUX device, which acts as NUL on normal DOS. All you need is just supply two subroutines and hook them to: F327h: read from AUX (byte must be returned in A) F32Ch: write to AUX (byte written supplied in A) You can change AUX to other name by putting three byte code at F203h instead of 'AUX' (rename may not work in DOS2, i didn't check) BTW, the tweaked AUX device will work in basic as well as in DOS. If you want another file system device (==disk drive) you need to do a very complex task. The most correct way to add disk drive(s) is to write a complete driver, which handles sector read/write and other low-level operations found in Disk ROM at 4010h and up. The driver is then put into one of free mapper pages, and slot switching routines are modified to switch this page instead for example slot with code 0FFh, which code is put in the disk driver table and everywhere where a disk ROM slot code is expected. The description of all those is too big and complex to cover in this mail, but if you out there are really interested, i'll try to fix some documentation. Greets. Egor
