Thanks Steve.
I'll have to look at this. File mode 4 has be baffled since I was only aware of 
three modes. 1-write, 2-append and, 3-read.
Since it already exists in LaddieAlpha I may just leave mComm alone,
Kurt

 

    On Tuesday, July 11, 2017 11:06 AM, John R. Hogerhuis <jho...@pobox.com> 
wrote:
 

 Effectively, it allows simulating random "block" access on a TPDD file.

It's not the either the TPDD-1 or TPDD-2 sector access mode. It's an extension 
Ken invented to the File Mode protocol.

Here's the Laddie code:

        private void RequestSeekExtension()        {            // Seek (Ken 
Pettit's proposal) for random access            // file must have been opened 
in mode 2 or 4            // ZZ, $09, $05, (type: Begin = 1, Current = 2, End = 
3), Little Endian 32-bit offset, checksum
            // decode seek type and offset            var seekType = 
(SeekType)Enum.ToObject(typeof(SeekType), (int)_lio.Req[4]);            UInt32 
offset = 0;            for (var k = 8; k >= 5; k--)            {                
offset <<= 8;                offset |= _lio.Req[k];            }
            switch (seekType)            {                case SeekType.Begin:
                    _fo.Seek((int)offset, SeekOrigin.Begin);                    
break;
                case SeekType.Current:
                    _fo.Seek((int)offset, SeekOrigin.Current);                  
  break;

                case SeekType.End:
                    _fo.Seek((int)offset, SeekOrigin.End);                    
break;
                default:                    FormatStatus(0x10);                 
   _state = State.Idle;                    break;            }        }

On Tue, Jul 11, 2017 at 10:54 AM, Kurt McCullum <kurt.mccul...@att.net> wrote:

John,
Is the SEEK command you are referring to similar to sector access mode or is it 
an add on to the original TPDD protocol?
Kurt
 

    On Tuesday, July 11, 2017 10:43 AM, John R. Hogerhuis <jho...@pobox.com> 
wrote:
 

 

On Tue, Jul 11, 2017 at 10:38 AM, Stephen Adolph <twospru...@gmail.com> wrote:

NEC still needs a disk solution.  Yes all RAM mode exists in both variants.



Other than a driver, I think external storage is already a solved problem.
LaddieAlpha already has a SEEK command which would allow it to be used for 
random access, sector based storage.
The command could easily be added to mcomm too, I'd guess.

I am not sure but Ken might have already added that extension to NADSBox.

A very small portable storage solution on the expansion port would be better. 
But you could certainly jerry-rig a Pi, LaddieAlpha and "juice pack" battery 
today over serial.

What I think would be needed is to modify the CP/M code allow use the TPDD 
protocol with SEEK extension.
-- John.


   



   

Reply via email to