-
-
Notifications
You must be signed in to change notification settings - Fork 35
/
Nextor-2.1-alpha-1.txt
129 lines (74 loc) · 5.23 KB
/
Nextor-2.1-alpha-1.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
Nextor 2.1 Alpha 1b
-------------------
By Konamiman, 10/2014
http://www.konamiman.com#nextor
1. WHAT'S NEW IN ALPHA 1
Nextor 2.1 Alpha 1b has everything that Nextor 2.0 has plus one new feature: the ability to mount disk image files on drive letters. When a disk image file is mounted, you can access its contained files and directories by using regular MSX-DOS/MSX BASIC commands and tools.
Alpha 1b is the same as Alpha 1 with the bug fixes and new features that were added in versions 2.0.3 and 2.0.4.
2. HOW TO MOUNT A FILE
Files are mounted either by using the updated MAPDRV.COM tool from the COMMAND2.COM prompt, or the CALL MAPDRV command from the BASIC prompt.
The syntax for MAPDRV.COM is:
MAPDRV <drive> <file> [/ro]
For example, to mount file TOOLS.DSK on drive G: do
MAPDRV G: TOOLS.DSK
Adding "/ro" will cause the file to be mounted in read-only mode, that is, trying to write to the mounted drive will cause a "Write protected disk" error.
The syntax for CALL MAPDRV is:
CALL MAPDRV(<drive>, <file> [,0|1])
For example, again to mount file TOOLS.DSK on drive G: do
CALL MAPDRV("G:", "TOOLS.DSK")
Adding ",1" after the file name will cause the file to be mounted in read-only mode.
NOTE: If the disk image file has the read-only attribute set, it will ALWAYS be mounted in read-only mode, even if no "/ro" / ",1" modifier is specified.
To unmount the file, simply set a different mapping on the drive where the file is mounted (in the previous examples it would be G:). You can set a normal partition mapping, or just leave the drive unmapped:
MAPDRV <drive> U
CALL MAPDRV(<drive>, -1)
3. RULES AND RESTRICTIONS
To be mountable a disk image file must have a size of at least 512 bytes and at most 32 MBytes. The file is expected to contain a proper FAT filesystem already, it is not possible to apply the FORMAT command on a mounted drive.
Also, the following restrictions apply:
- The file cannot contain partitions, the contained filesystem is expected to start right at the beginning of the file.
- It is not possible to mount a file on the drive where the file itself is located:
MAPDRV A: A:TOOLS.DSK --> Error
- It is not possible to mount the same file in two drives at the same time:
MAPDRV B: TOOLS.DSK
MAPDRV C: TOOLS.DSK --> Error
- It is not possible to do a recursive file mount (mounting a file that is itself inside a mounted disk image file):
MAPDRV B: TOOLS.DSK
MAPDRV C: B:FILE.DSK --> Error
- It is not possible to alter the mapping state of a drive if it contains one or more files that are currently mounted:
MAPDRV B: A:TOOLS.DSK
MAPDRV A: U --> Error
- It is not possible to open or to alter (rename, move, delete, overwrite, change attributes) a mounted file:
MAPDRV B: TOOLS.DSK
TYPE TOOLS.DSK --> Error
ECHO HELLO > TOOLS.DSK --> Error (see "known bugs" below)
REN TOOLS.DSK X.DSK --> Error
MOVE TOOLS.DSK SOMEDIR\ --> Error
DEL TOOLS.DSK --> Error
ATTRIB +R TOOLS.DSK --> Error
4. CHANGES IN FUNCTION CALLS
The _MAPDRV function call (7Ch) has been expanded to allow mounting files. The input parameters to mount a file are:
B = 3
HL = Path to filename or FIB
D = 0 for default mount (write allowed unless the file has the read-only attribute set)
1 to force read-only mount
The _GDLI function call (79h) now returns the following information in the data buffer for drives where a file is mounted:
+0: 3
+1: Drive where the mounted file is located (0 = A:, etc)
+2: Flags: 1 if the file is mounted in read-only mode, 0 otherwise
+3: 0 (reserved for more flags)
+4: Filename in printable format (up to 12 characters, plus a terminating zero)
Please refer to the Nextor Progrmmers Reference for more details on these function calls.
5. NEW ERROR CODES
Two new error codes have been introduced:
- "File is mounted" (.FMNT, DOS error code B2h, BASIC error code 80)
This error appears when trying to open or alter a mounted file, or when trying to perform any other non allowed operation involving a mounted file (see "Rules and restrictions")
- "Bad file size" (.BFSZ, DOS error code B1h, BASIC error code 81)
This error appears when trying to mount a file that is smaller than 512 bytes or larger than 32 MBytes.
6. KNOWN BUGS
Trying to overwrite a mounted file via the "Create file handle" function call (_CREATE, 44h), for example by executing a "ECHO HELLO > TOOLS.DSK" command, will actually succeeed and the file will be overwritten; a "File is mounted" error should be returned instead.
7. OTHER USEFUL INFORMATION
WARNING: This is alpha software. It has not been thoroughly tested and could be buggy. Please backup your data before using it.
WARNING: After mounting a file do not extract or swap the medium where the file is contained. The behavior of Nextor if this is done is undefined and you could lose data.
The updated DRVINFO.COM tool and the CALL DRVINFO command will display the file name and the containing drive for drives where a file is mounted:
Drive G: is assigned to:
File TOOLS.DSK on drive A: (read-only)
The easiest way to create empty disk image files is to use the NestorDiskImageCreator tool available at Konamiman's MSX site (http://konamiman.com/msx/megascsi/ndicreat.lzh).