|
| | Er zijn 64 gasten en 2 MSX vrienden online
Je bent een anonieme bezoeker.
|
| |
Schrijver
| FCB and disk buffer usage?
| etxmato msx friend Berichten: 14 | Geplaatst: 02 December 2005, 00:16   | Hello,
I'm trying to get some old software which I developed about 20 years ago running on an MSX emulator. When I wrote the SW I did not use any harddisk and used the older MSX BDOS (I think what you guys call version 1). Anyway I need to re-write some of the disk routines as they don't work with the IDE harddisk.
My question is: Does anyone know if I can use a part of the memory reserved by MSX BASIC for loading data from disk and loading the FCB. For example can I use the buffer indentified by address F34D as a buffer to load 512 bytes from disk? If so, is there also a similar space that I can use for loading the FCB data from disk, i.e. can I do that on the buffer identified by address F351 or other?
I know I can use any address to do the above, but need to keep all RAM available for other usage if possible. Also I prefer not to mess up and 'BASIC' or 'DOS BASIC' data.
Thanks for your help!
Cheers, Marcel.
| | zeilemaker54 msx lover Berichten: 97 | Geplaatst: 02 December 2005, 10:08   | Quote:
| Hello,
I'm trying to get some old software which I developed about 20 years ago running on an MSX emulator. When I wrote the SW I did not use any harddisk and used the older MSX BDOS (I think what you guys call version 1). Anyway I need to re-write some of the disk routines as they don't work with the IDE harddisk.
My question is: Does anyone know if I can use a part of the memory reserved by MSX BASIC for loading data from disk and loading the FCB. For example can I use the buffer indentified by address F34D as a buffer to load 512 bytes from disk? If so, is there also a similar space that I can use for loading the FCB data from disk, i.e. can I do that on the buffer identified by address F351 or other?
I know I can use any address to do the above, but need to keep all RAM available for other usage if possible. Also I prefer not to mess up and 'BASIC' or 'DOS BASIC' data.
Thanks for your help!
Cheers, Marcel.
|
You are talking about the IDE interface, so I presume we are talking about diskkernel 2.x (Diskbasic 2.x). The buffer which pointer is in &HF34D is the diskdriver sectorbuffer, and should be used only by the diskdriver. diskkernel 2.x also missuses this buffer as a fake FAT sector buffer for diskkernel 1.x compatiblity, and for temporary storing (error) messages. So not very wise if you use this buffer.
The buffer which pointer is in &HF351 is a temporary sectorbuffer, and is used by the DSKI and DSKO statements. But this buffer is also used as pathname buffer with various statements. Also not very wise.
But why do you need to rewrite your program in the first place ? All BDOS calls of diskkernel 1.x are also available with diskkernel 2.x ! Also no problem in using FCB's with a harddisk (FAT16 may be a problem). | | etxmato msx friend Berichten: 14 | Geplaatst: 02 December 2005, 11:23   | Hallo MR Zeilemaker,
Thanks for your reply!
Reason why I need to rewrite my program is because I have used an FCB address and DMA address (I think thats what it is called, i.e. the address where the data is loaded from disk, or was it TPA??) which is not in the main RAM. The SW I have also used some HW with RAM on it. This RAM is located between address A000-C000 and mirrored on 2000-4000 in a different slot. In case I don't use IDE this is not a problem, i.e. I can use an FCB and DMA address in a different slot. With IDE this does not work for some reason, as far as I have found on the net I can only use FCBs and DMA address in main RAM with IDE.
Reason of doing this is that the SW is an assembler system in which I would like all main RAM to be available for any data/SW loading. I.e. I don't want a limitation on which address data can be loaded.
So from what you are saying should I conclude I can not use any buffers defined by basic for FCB and/or data loading?
Another option I have been thinking about is to somehow 'fool' IDE into loading into a different slot in page 2. I can understand the limitation on loading in page 0, 1 and 3 but I didn't think page 2 was used for any disk routines, could be wrong I have been out of MSX too long.... any ideas if that is possible?
Cheers, Marcel.
| | zeilemaker54 msx lover Berichten: 97 | Geplaatst: 03 December 2005, 10:01   | Quote:
| Hallo MR Zeilemaker,
Thanks for your reply!
Reason why I need to rewrite my program is because I have used an FCB address and DMA address (I think thats what it is called, i.e. the address where the data is loaded from disk, or was it TPA??) which is not in the main RAM. The SW I have also used some HW with RAM on it. This RAM is located between address A000-C000 and mirrored on 2000-4000 in a different slot. In case I don't use IDE this is not a problem, i.e. I can use an FCB and DMA address in a different slot. With IDE this does not work for some reason, as far as I have found on the net I can only use FCBs and DMA address in main RAM with IDE.
Reason of doing this is that the SW is an assembler system in which I would like all main RAM to be available for any data/SW loading. I.e. I don't want a limitation on which address data can be loaded.
So from what you are saying should I conclude I can not use any buffers defined by basic for FCB and/or data loading?
Another option I have been thinking about is to somehow 'fool' IDE into loading into a different slot in page 2. I can understand the limitation on loading in page 0, 1 and 3 but I didn't think page 2 was used for any disk routines, could be wrong I have been out of MSX too long.... any ideas if that is possible?
Cheers, Marcel.
|
You are right about the main RAM. All BDOS function can only transfer from/to the 'system' memorymapper (diskkernel 2.x, diskkernel 1.x is different). That mapper is invoked at the start of the diskkernel. But you can transfer to other pages or slots later. What you can do, is to reserve a memorymapper segment (with the DOS2 memorymapper bios calls), switch it in page 2, and then do your disk actions, copy the data to your page or slot, and switch back the orginal page 2 segment.
Take a look here: map.tni.nl/resources/dos2_environment.php#c5
cheers, Arjen. | | etxmato msx friend Berichten: 14 | Geplaatst: 05 December 2005, 12:18   | Thanks Arjen!
I decided not to use any of the reserved memory area as you recommended. Came up with another solution based on your suggestions.
Cheers, Marcel.
| |
| |
| |
| |