On Tuesday, April 10, 2018 at 11:25 AM, Robert Armstrong wrote:
> >I suspect that might be ok.

In general reading and writing the data in a file in "RAW" mode vs "SIMH" mode 
should produce the same result.  RAW uses open,read,write and close, while SIMH 
uses the C RTL fopen,fread,fwrite, and fclose.  The C RTL does I/O when it 
thinks it needs to using buffers (I/O size) that it likes.  RAW I/O uses the 
buffers (and I/O size) explicitly provided by the calling program.

As it turns out, you can successfully open a CDROM drive with either RAW or 
CRTL APIs, however read I/O to the CDROM generally has sector size and 
alignment concerns that the aren't well behaved using the CRTL's buffering.

To address this, RQ disk container files  are now first opened in RAW mode and 
if that succeeds, things proceed just fine.  If the RAW open fails (for 
whatever reason) things fall back to using CRTL I/O.  So, for most files, 
you'll see them being accessed in RAW mode going forward, but as Johnny says it 
shouldn't matter one way or another.

>   Well, empirically it doesn't work.  The file foo.rd54 is never created and 
> the
> disk appears offline to any guest OK.  Not OK.  Sorry.

This is a case I didn't test (attach a non-existing file) on Linux/Unix.  What 
is happening here is that open is being called with mode O_RDONLY and that open 
succeeds and you see the strange behavior.

This is fixed now.

- Mark
_______________________________________________
Simh mailing list
Simh@trailing-edge.com
http://mailman.trailing-edge.com/mailman/listinfo/simh

Reply via email to