annotate docs/myram.doc @ 3255:d0e8324af298

level3: nitro module: Use KrnBlk instead of hardcoded $3F Helps porting to non-CoCo3 platforms.
author Tormod Volden <debian.tormod@gmail.com>
date Wed, 29 Aug 2018 08:44:37 +0200
parents 0e5881ce0d31
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2976
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
1 level2/modules/myram.asm
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
2 level2/modules/mr0.asm
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
3
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
4 RAM disk driver for NitrOS-9 Level 2
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
5 Copyright (C) 2014 Gene Heskett
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
6
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
7 See update message near bottom of file
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
8
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
9 These docs describe a new mram.dr for OS-9 level 2 systems. With a bit of
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
10 further editing, and the help of the conditional assembly commands in xsm,
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
11 this should now run on either cpu. Although the object grew a few bytes in
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
12 the conversion, the megaread times are very similar, averaging 10.5 seconds
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
13 on this 6309 native system. On a regular 6809 system, the os9 call F$Move
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
14 hasn't been optimized, so expect the megaread times to be at least doubled.
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
15
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
16 As there have been at least 70 people who downloaded the 6309 only version
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
17 which apparently worked well enough that I have NOT had any "I can't make it
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
18 work" messages (none, nada, zip), either nobody is using it, or it works
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
19 just fine which is exactly what its done for me here. This 6809 version
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
20 didn't work in its previous, missing one "y register restore" version on my
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
21 plain 512k machine at work earlier today. With that command added it is
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
22 currently running as a 1 megabyte drive on this machine as I type this.
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
23
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
24 1. In my experience, trying to format "rammer" seemed to be an exercice in
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
25 futility as it was the most blob sensitive util I've tried to use. In fairness
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
26 to rammer, this machine historicly has been a great blob detector.
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
27
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
28 2. The only ram driver I could make run reliably was the developers pack
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
29 version after it had been patched for a couple of bugs.
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
30
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
31 3. That driver served as the model for this one in that I didn't change the
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
32 method used to size the device. Having only one variable to control how big it
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
33 is sure simplifies things. That variable is of course "sct" in the dmode
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
34 report, meaning sectors per track. Its a one track device, just a variable
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
35 length of track.
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
36
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
37 4. Several things in the devpack ram.dr were hard coded. This prevented
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
38 it from being used at equivalent sizes above the 504k mark. At that point,
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
39 the FAT was a full sector, and above that required another sector.
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
40 Unforch, the position of the FD and root dirs was fixed. Asking for memory
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
41 above that point also seemed to write rather willy-nilly to other, not owned
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
42 by ram, memory. Crashes, while not the order, did happen from time to time.
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
43
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
44 5. The really major effort in this was a total, start from scratch, re-write
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
45 of the init routine. Wholesale hunks of code got moved around, lots more
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
46 smarts added, etc. Yes, its bigger, and yes with effort I could in all
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
47 probablility shrink it some. However this works reasonably well for sct=1b00
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
48 sized ramdisks. Thats 1.7 something megabytes in a 2 meg machine! With mfree
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
49 reporting 96k free, I can still do about everything except run umuse3. That
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
50 needs at least 128k plus a few more pages of system ram than most programs.
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
51
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
52 6. The reason RBF apparently ignores any and all error codes that I'd built
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
53 into the InitChecker routine is that OS9 in fact does call the Init function
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
54 first! This means that you can copy or move anything you want to to /r0
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
55 without any errors.
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
56
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
57 However . . .
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
58
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
59 OS9 keeps a link count of users of the device, and if the aformentioned
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
60 copy operation was the only link, then when the copy is done and the link
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
61 count is reduced to zero, the "Term"inate routine is then called.
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
62 So /r0 was dynamicly initialized for the duration of the copy operation,
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
63 gave no errors because of that, and then was de-initialized at the end of
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
64 the copy by the closing of the only open path! By-by file! I've been bit at
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
65 least 1000 times, probably more, many more!
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
66
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
67 Verified by setting the priority down to zip, initiating a copy while the
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
68 descriptor had been dmoded to about 1.5 megs, and running mmap repeatedly
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
69 while the copy was being done. And by putting a call to F$regdmp (os9p4) in
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
70 the Term routine. It did execute.
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
71
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
72 Now there are folks out there who no doubt knew all this, so please bear with
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
73 me as I prevent this zero open paths automatic deinit of /r0.
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
74
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
75 I have been able to do the "autoinit" in a manner that doesn't deinit the
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
76 device after the write path is closed. And it doesn't prevent it from being
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
77 deinit'ed if and when you want to return the ramdisk memory to the machine
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
78 memory pool.
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
79
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
80 Despite the statement in Kevins "Inside OS9 Level II" book to the effect
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
81 that the device table is not available to the programmer, it is in fact
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
82 available IF you are a device driver loaded in the os9boot file as it loads.
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
83 Otherwise the address returned from a load of the direct page offset $80-81
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
84 will be in some other block of memory instead of in the system's memory. And
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
85 while the exact offset of our entry may be available from some other var in
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
86 the direct page, I haven't found that define yet. So I searched to find our
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
87 assigned V$STAT memory assignment instead. It searches each 9 byte entry in
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
88 the device table till it either finds it and then incs the associated V$USRS
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
89 count, or reads a $0000, in which case BIG trouble. It will do an F$Exit and
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
90 report. I used E$DevOvf as the error in that event. You should NEVER see
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
91 that error unless something else has badly corrupted the system vars in
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
92 which case its reboot time, RIGHT NOW!
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
93
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
94 The major problem with attempts to locate our own entry in the device table
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
95 during the init routine is that our entry in the device table does not exist
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
96 until the Init routine of a device driver has been exec'd and has returned
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
97 to OS-9. This meant that the "stay resident" code had to be split up, a
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
98 single instruction setting a flag during the initialization, a quick, one
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
99 line test of the flag is done at every read or write function. If set, it
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
100 finds its own entry in the now valid device table and increments the link
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
101 (V$USRS) count in the table, one time only as that same piece of code then
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
102 clears the tested flag. Once done, the additional read/write overhead is
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
103 only the flag test which if zero, jumps immediately to the read or write it
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
104 came here to do. I'd guess not more than a 2% slowdown averaged over a 100k
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
105 write or read.
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
106
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
107 The current size is coded into your device descriptor as "sct", so if you want
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
108 it to survive a big file thru the C compiler, be sure to dmode it big enough
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
109 to handle the expected files before running the compiler. I'd suggest patching
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
110 the descriptor right on the disk so you can even afford to forget that most of
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
111 the time. You do have 2 megs don't you? I have set mine for "sct=1000", giving
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
112 a 1,024 kilobyte ramdisk when it does do the automatic initialization.
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
113
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
114 In the event of an overflow or "device full", it really does return an error
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
115 #248! The devpack one didn't as you all know well. Attempts to format it using
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
116 "format /r0" will get an illegal service request error exit when format
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
117 attempts to access it for recovering the device parms. It does not support any
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
118 getstt or setstt calls.
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
119
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
120 Speedwise, megaread is 10.5 seconds from /r0, 13 seconds from my Maxtor 7120s.
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
121 Both obviously limited by machine speed, not the drives. That would be mainly
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
122 in the OS-9 call "F$Move", the linkage between memory we own and some other
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
123 memory not currently in our process map.
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
124
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
125 My own megaread was redone in Basic09 early on because the drive I had at that
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
126 time had a couple of bad sectors in the first megabyte, so I had to re-read
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
127 the first 256k 4 times. That adds a couple of millisecs for seek time of
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
128 course.
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
129
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
130 There is one other item that caused me to go back and make the initial
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
131 allocation for the root directory another 8 sectors longer, seems that dcheck
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
132 didn't like the extended root directory caused by my stuffing about 700k worth
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
133 of small files into it. So now the allocation for the sector zero, FAT, root
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
134 FD, and root dir is $10 sectors total. And dcheck can't find anything at all
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
135 to fuss about with that same long list of small files copied to ram, without
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
136 pre"iniz"ing it. I've been doing this on my hard drives for years, modifying
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
137 it with ded before I write anything else to the drive, it sure cuts down on
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
138 dchecks useless (but confusing to the newcomer) caterwalling and mewling
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
139 about extended root directories (not associated with a file type msgs) that
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
140 dcheck is truely famous for. Its only bug possibly. One I've been fussing
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
141 about, and wishing the author would fix for years!
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
142
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
143 If you do a "free /r0" on it, you'll find the volume name is "Gene's RamDisk",
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
144 I had to get my name in there someplace! And for those who have a copy of
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
145 "dtype", a kludge I wrote years ago to help me identify the 100's of disks I
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
146 had in various flavors of drive styles and os-9 levels/versions, it will ident
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
147 it as a floppy of course, but the rest of its report is accurate. That was a
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
148 last minute addition that didn't run it back above $300 bytes in 6309
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
149 versions.
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
150
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
151 UPDATE MESSAGE
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
152
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
153 The earlier version didn't attempt to set its "creation date" in the sector
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
154 zero information, and in fact due to a foible of os9, couldn't use the
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
155 regular F$Time call as it returned nothing. This one does, but the method
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
156 used requires it to be in the os9boot file to work, (the second reason in
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
157 fact) else it will copy garbage to that area of sector zero. That reason is
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
158 that in order to make the method recommended work, I must convince the
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
159 system that ram is indeed a system module for the approximatly 100
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
160 microseconds it takes the I$Attach call now used to execute.
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
161
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
162 Alan Dekok and company (of Nitros9 fame) have, if a message I received is
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
163 correct, rendered my auto linking routine null and void, and possibly made a
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
164 crash, by expanding the format of the device table for additional data
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
165 entries. When that is confirmed, I'll release this newer, fixed version that
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
166 now also sets the create date correctly. It has to jump thru a few more hoops
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
167 than the older version in order to do the linking in a way that won't be
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
168 broken by newer versions of Nitros9 (1.21+). So of course it gained a couple
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
169 of bytes sizewise. While I haven't tryed it yet, from messages I've
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
170 received, this new method won't break. I also did some tweeking of the
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
171 allocation mapping, and the required 8k blocks of memory which effects those
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
172 with only 128k will notice right away, memory usage is 1 256 byte page less
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
173 than it was when sct was an even $x800 or $x000, and the read errors because
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
174 it didn't get enough blocks of memory to hold the last $1f sectors when sct
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
175 was less than the above should be gone also. Setting sct=170 will cause it
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
176 to aquire enough blocks to hold $180 sectors instead of chopping it off at
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
177 $15F under those conditions like it did before. The fat will however reflect
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
178 the $170 you asked for. (Putting on my Jimmy Stewart hat here) So ya might
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
179 as well ask for the whole block!
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
180
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
181 END of UPDATE message
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
182
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
183 I hope this is of some help to the OS-9 community.
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
184 Cheers All, Gene Heskett, WDTV5@delphi.com
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
185
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
186
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
187 RAM disk driver for NitrOS-9 Level 2
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
188 Copyright (C) 2014 Gene Heskett
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
189
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
190 This program is free software; you can redistribute it and/or
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
191 modify it under the terms of the GNU General Public License
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
192 as published by the Free Software Foundation; either version 2
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
193 of the License, or (at your option) any later version.
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
194
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
195 This program is distributed in the hope that it will be useful,
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
196 but WITHOUT ANY WARRANTY; without even the implied warranty of
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
197 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
198 GNU General Public License for more details.
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
199
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
200 You should have received a copy of the GNU General Public License
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
201 along with this program; if not, write to the Free Software
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
202 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
0e5881ce0d31 docs: Add myram.doc from Gene
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
203