From: David Wood (jbevren_at_starbase.globalpc.net)
Date: 2007-12-15 07:03:12
Jim, Right. The concept I had in mind was to write a couple adjacent buffers to a specific sector, read the target sector to write to these buffers, modify, and write the target sector back to disk. Then, the buffers are restored from the disk. However, I do realize that this limits the number of possible open files to (most likely) 3, as two buffers would be swapped out in the process. Some intelligent code could choose two adjacent buffers that aren't the one to be written I suspect, eliminating this issue. Since there are five buffers, there shouldn't be any instance where there aren't two adjacent buffers that won't be involved in a given disk transaction. You are correct in your assertion that IDE cannot seek within a sector. You'd have to RMW a sector if youre splitting them in half for CBMFS-type setups. However, reading wouldnt require additional buffering, as you can either read the first 256 bytes, or ignore the first 256 and read the second 256 bytes to the buffer, whichever sector half you need in a given access. Let me know if I'm missing out on something. I'm just flinging this off the top of my head. On Fri, 14 Dec 2007, Jim Brain wrote: > David Wood wrote: > > I realize this would be slow, but relative to the speed of the IEC protocol, > > why not swap bufferspace into and out of a couple reserved harddisk sectors? > > > I believe you'd still need a 512 byte sector somewhere, as you need to > write the data all at once, not repositioning the IDE drive once you > start (I don't think IDE can seek to a byte in the 512 byte sector. If > it could, we could just do that. > > But, 1K of additional RAM banked in somewhere where there is no > ROM/RAM/IO would work fine. You only need the 512 bytes during the > write operation. The tricky part is updating BAM. How does the 1541 > update BAM now? Doesn't it use the command channel buffer to read BAM > into, update, and write it back prior to writing the new sector? As > well, when you initially write out the sector, do you set next T&S to be > 0,255, and then go back when you lay in another sector and update? > > Still, all of the operations require a reusable 512 byte RAM. > > Jim > > > > > Message was sent through the cbm-hackers mailing list > Message was sent through the cbm-hackers mailing list
Archive generated by hypermail pre-2.1.8.